PR target/86812
[official-gcc.git] / gcc / ChangeLog
bloba7585bbe53dd3a9198ce97c0f229051bc0eb923f
1 2018-09-13  Eric Botcazou  <ebotcazou@adacore.com>
3         PR target/86812
4         * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
6 2018-09-13  Richard Biener  <rguenther@suse.de>
8         PR tree-optimization/87263
9         * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
10         (struct unwind_state): Add max_rpo field.
11         (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
12         Compute max_rpo, the max RPO number a block can be backwards reached
13         from.  Re-write non-iterating mode to a RPO ordered worklist approach,
14         separating it from the iterating mode.
16 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
18         * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
19         (rfs_decision): New scheduling decision.
21 2018-09-13  Richard Biener  <rguenther@suse.de>
23         PR bootstrap/87134
24         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
25         (vn_nary_op_insert_pieces_predicated): Do not write useless
26         valid_dominated_by_p entry outside of the allocated storage.
28 2018-09-13  Omar Sandoval  <osandov@osandov.com>
29             Tom de Vries  <tdevries@suse.de>
31         PR debug/86985
32         * dwarf2out.c (is_c): New function.
33         (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
35 2018-09-13  Sam Tebbs  <sam.tebbs@arm.com>
37         PR target/85628
38         * config/aarch64/aarch64.md (*aarch64_bfxil):
39         Define.
40         * config/aarch64/constraints.md (Ulc): Define.
41         * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
42         Define.
43         * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
44         New function.
46 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
48         * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
49         * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
50         aarch64_layout_frame call. 
51         (aarch64_expand_epilogue): Likewise.
52         (aarch64_initial_elimination_offset): Likewise.
53         (aarch64_get_separate_components): Likewise.
54         (aarch64_use_return_insn_p): Likewise.
55         (aarch64_layout_frame): Remove unneeded check.
57 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
59         * configure.ac: Only append
60         " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
61         gcc_config_arguments if it was never reconfigured or last reconfigure
62         was with different arguments.
63         * configure: Regenerated.
65 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
66             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
68         PR middle-end/87290
69         * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
70         (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
72 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
74         PR tree-optimization/87287
75         * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
76         X % C == 0 to X % (unsigned) C == 0 optimization to ...
77         * match.pd (X % C == 0): ... here.  New optimization.
79 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
81         PR middle-end/82853
82         * expr.h (maybe_optimize_mod_cmp): Declare.
83         * expr.c (mod_inv): New function.
84         (maybe_optimize_mod_cmp): New function.
85         (do_store_flag): Use it.
86         * cfgexpand.c (expand_gimple_cond): Likewise.
88 2018-09-09  Cesar Philippidis  <cesar@codesourcery.com>
89             Julian Brown  <julian@codesourcery.com>
91         PR middle-end/86336
92         * gimplify.c (gimplify_scan_omp_clauses): Set
93         target_firstprivatize_array_bases in OpenACC parallel and kernels
94         region contexts.  Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
95         OpenACC data regions.
97 2018-09-12  Uros Bizjak  <ubizjak@gmail.com>
99         * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
100         (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
102 2018-09-12  Richard Biener  <rguenther@suse.de>
104         PR tree-optimization/87280
105         * tree-ssa-sccvn.c (process_bb): Handle the case of executable
106         edge but unreachable target.
107         (do_rpo_vn): For conservatively handling a PHI only mark
108         the backedge executable but not the block reachable.
110 2018-09-12  Richard Biener  <rguenther@suse.de>
112         PR tree-optimization/87266
113         * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
114         visited blocks.
116 2018-09-12  Andreas Krebbel  <krebbel@linux.ibm.com>
118         * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
119         constants.
120         ("trunc<BFP:mode><DFP_ALL:mode>2")
121         ("trunc<DFP_ALL:mode><BFP:mode>2")
122         ("extend<BFP:mode><DFP_ALL:mode>2")
123         ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
124         according to the target operand type.
126 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
127             Andreas Krebbel  <krebbel@linux.ibm.com>
129         PR tree-optimization/86844
130         * gimple-ssa-store-merging.c
131         (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
132         there are any overlapping stores in between them, make sure they are
133         also coalesced or we give up completely.
135 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
137         PR middle-end/87248
138         * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
139         BIT_AND_EXPR's second operand is a power of two.  Formatting fix.
141 2018-09-12  Tom de Vries  <tdevries@suse.de>
143         * common.opt (gdescribe-dies): Add option.
144         * dwarf2out.c (add_name_and_src_coords_attributes): Add description
145         attribute for artifical and nameless decls.
146         (dwarf2out_register_external_die): Add description attribute to
147         external reference die.
148         (add_desc_attribute): New functions.
149         (gen_subprogram_die): Add description attribute to
150         DW_TAG_call_site_parameter.
151         * tree-pretty-print.c (print_generic_expr_to_str): New function.
152         * tree-pretty-print.h (print_generic_expr_to_str): Declare.
153         * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
154         -gno-describe-dies.
155         (@item -gdescribe-dies): Add.
157 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
159         * tree-vrp.c (vrp_shift_undefined_p): Remove.
160         (extract_range_from_binary_expr_1: Call
161         wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
162         * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
163         depend on sign.
165 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
167         * gimple-ssa-warn-alloca.c
168         (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
169         field for ALLOCA_BOUND_*_LARGE.
171 2018-09-11  Nathan Sidwell  <nathan@acm.org>
173         * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
175 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
177         * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
178         for clobbers.  Remove obsolete comment.
180 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
182         * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
183         mpxchk, mpxld and mpxst types.
184         (define_attr length_immediate): Remove all processing of mpx types.
185         (define_attr prefix_0f): Ditto.
186         (define_attr memory): Ditto.
188 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
190         * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
191         (log<mode>2): Change operand 1 predicate to general_operand.
192         Extend operand 1 to XFmode and generate logxf3 insn.
193         (log10<mode>2): Change operand 1 predicate to general_operand.
194         Extend operand 1 to XFmode and generate log10xf3 insn.
195         (log2<mode>2): Change operand 1 predicate to general_operand.
196         Extend operand 1 to XFmode and generate log2xf3 insn.
197         (fyl2xp1_extend<mode>xf3_i387): Remove.
198         (log1p<mode>2): Change operand 1 predicate to general_operand.
199         Extend operand 1 to XFmode and generate log1pxf3 insn.
200         (fxtract_extend<mode>xf3_i387): Remove.
201         (logb<mode>2): Change operand 1 predicate to general_operand.
202         Extend operand 1 to XFmode and generate logbxf3 insn.
203         (ilogb<mode>2): Change operand 1 predicate to general_operand.
204         Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
205         (significand<mode>2): Change operand 1 predicate to general_operand.
206         Extend operand 1 to XFmode and generate significandxf3 insn.
208 2018-09-11  Nathan Sidwell  <nathan@acm.org>
210         * gcc.c (perror_with_name, pfatal_with_name): Delete.
211         (load_specs): Use fatal_error.
212         (DELETE_IF_ORDINARY, process_command): Use error.
213         (execute, run_attempt): Use fatal_error.
215 2018-09-11  Andrew Stubbs  <ams@codesourcery.com>
217         * diagnostic-core.h (sorry_at): New prototype.
218         * diagnostic.c (sorry_at): New function.
220 2018-09-11  Aldy Hernandez  <aldyh@redhat.com>
222         * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
223         by zero as VR_UNDEFINED.
225 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
227         * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
228         (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
229         (<sincos>mode2): New expander.
230         (sincos_extend<mode>xf3_i387): Remove insn pattern.
231         (sincos -> sin, cos splitters): Remove splitter patterns.
232         (sincos<mode>3): Change operand 2 predicate to general_operand.
233         Extend operand 2 to XFmode and generate sincosxf3 insn.
234         (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
235         Change operand 3 predicate to const1_operand.
236         (fptan_extend<mode>xf4_i387): Remove insn pattern.
237         (tanxf2): Update operands in the call to fptanxf4_i387.
238         (tan<mode>2): Change operand 1 predicate to general_operand.
239         Extend operand 1 to XFmode and generate tanxf3 insn.
240         (atan2xf3): Rename from *fpatanxf3_i387.
241         (fpatan_extend<mode>xf3_i387): Remove insn pattern.
242         (atan2xf3): Remove expander.
243         (atan2<mode<3):  Change operand 1 and 2 predicates to general_operand.
244         Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
245         (atan<mode>2): Change operand 1 predicate to general_operand.
246         Extend operand 1 to XFmode and generate atanxf3 insn.
248 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
250         * config/i386/i386.md (x87/SSE constant load splitter): Use
251         memory_operand instead of nonimmediate_operand for input operand
252         predicate.
254 2018-09-09  Uros Bizjak  <ubizjak@gmail.com>
256         * config/i386/i386.md (float partial SSE register stall splitter): Move
257         splitter near its instruction pattern.
258         (float_extend partial SSE register stall splitter): Ditto.
259         (float_truncate partial SSE register stall splitter): Ditto.
261 2018-09-09  Hans-Peter Nilsson  <hp@bitrange.com>
263         PR target/86794
264         * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
265         to speculation_safe_value_not_needed.
267         PR target/85666
268         * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
269         non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
270         (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
271         leaf_function_p, instead use has_hard_reg_initial_val.
273 2018-09-09  Nathan Sidwell  <nathan@acm.org>
275         * gcc.h (pfatal_with_name): Don't declare here.
276         * gcc.c (pfatal_with_name): Make static.
278 2018-09-09  Xianmiao Qu  <xianmiao_qu@c-sky.com>
280         * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
281         earlyclobber.
283 2018-09-08  John David Anglin  <danglin@gcc.gnu.org>
285         PR rtl-optimization/85458
286         * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
287         priority hook to reduce the priority of EXPR.
289 2018-09-07  Uros Bizjak  <ubizjak@gmail.com>
291         * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
292         DImode for x87 on 32bit targets.  Conditionally disable x87 modes
293         with X87_ENABLE_FLOAT.  Remove preparation code.
294         (*float<SWI48:mode><MODEF:mode>2): Rename from
295         *float<SWI48:mode><MODEF:mode>2_mixed.  Handle x87, SSE and mixed
296         math using "enabled" attribute.
297         (*floatdi<MODEF:mode>2_i387): Rename from
298         *float<SWI48x:mode><MODEF:mode>2_i387.  Handle only DImode and
299         enable for 32bit targets only.
300         (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
301         splitter.
302         (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
303         as operand 1 predicate.  Rewrite as define_insn_and_split.
304         (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
306 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
308         * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
309         to fallthru to FLOAT case.
311 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
313         PR target/86731
314         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
315         around folding of vec_sl to handle out of range shift values.
317 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
319         * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
320         Update callers to gen_fix_trunc<mode>_i387_fisttp
321         (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
322         nonimmediate_operand.
323         (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
324         and corresponding splitters.
325         (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
326         (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
327         (fix_truncdi_i387_with_temp): Remove insn pattern
328         and corresponding splitters.
329         (fix_trunc<mode>_i387): Change operand 0 predicate to
330         nonimmediate_operand.
331         (fix_trunc<mode>_i387_with_temp): Remove insn pattern
332         and corresponding splitters.
333         (*fistdi2_1): Remove.
334         (fistdi2): Ditto.
335         (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
336         (lrintxfdi2): Remove expander.  Reimplement as define_insn.
337         (*fist<mode>2_1): Remove.
338         (fist<mode>2): Ditto.
339         (fist<mode>2_with_temp): Remove insn pattern and corresponding
340         splitters.
341         (lrintxf<mode>2): Remove expander.  Reimplement as define_insn.
342         (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
343         (fistdi2_<rounding>): Change operand 0 predicate to
344         nonimmediate_operand.
345         (fistdi2_<rounding>_with_temp): Remove insn pattern
346         and corresponding splitters.
347         (fist<mode>2_<rounding>): Change operand 0 predicate to
348         nonimmediate_operand.
349         (fist<mode>2_<rounding>_with_temp): Remove insn pattern
350         and corresponding splitters.
352         (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
354 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
356         * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
357         the init value.
359 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
361         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
362         early gimple folding of vec_splat().
363         * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
364         * gimple-fold.h: Add an extern define for tree_vec_extract().
366 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
368         * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
369         wrappers around TREE_TYPE comparisons.
371 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
373         PR target/80080
374         * config/s390/predicates.md: Add nonsym_memory_operand.
375         * config/s390/s390.c (s390_legitimize_cs_operand): If operand
376         contains a SYMBOL_REF, load it into an intermediate pseudo.
377         (s390_emit_compare_and_swap): Legitimize operand.
378         * config/s390/s390.md: Use the new nonsym_memory_operand
379         with UNSPECV_CAS patterns.
381 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
383         PR target/80080
384         * config/s390/s390-passes.def: New file.
385         * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
386         declaration.
387         (make_pass_s390_early_mach): Add declaration.
388         * config/s390/s390.c (make_pass_s390_early_mach):
389         (s390_option_override): Remove dynamic registration.
390         * config/s390/t-s390: Add s390-passes.def.
392 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
394         * config/s390/s390.c (s390_decompose_constant_pool_ref):
395         Remove UNSPEC_LTREL_BASE check.
396         (annotate_constant_pool_refs): Likewise.
397         (find_constant_pool_ref): Likewise.
398         (find_ltrel_base): Removed.
399         (replace_ltrel_base): Removed.
400         (s390_mainpool_finish): Remove replace_ltrel_base call.
401         (s390_chunkify_start): Remove pending LTREL_BASE logic.
402         (s390_chunkify_finish): Remove replace_ltrel_base call.
403         * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
405 2018-09-06  Hans-Peter Nilsson  <hp@axis.com>
407         PR target/86779
408         * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
409         to speculation_safe_value_not_needed.
411 2018-09-05  Cesar Philippidis  <cesar@codesourcery.com>
412             Bernd Schmidt  <bernds_cb1@t-online.de>
414         * config/nvptx/nvptx-opts.h: New file.
415         * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
416         * config/nvptx/nvptx.h: Include "nvptx-opts.h".
417         (ASM_SPEC): Define.
418         (TARGET_SM35): New macro.
419         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
420         correct predicate.
421         * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
422         values.
423         (misa=): New option.
424         * doc/invoke.texi (Nvidia PTX Options): Document -misa.
426 2018-09-05  Uros Bizjak  <ubizjak@gmail.com>
428         * config/i386/i386.md (truncdfsf2): Remove expander.
429         (truncdfsf2_with_temp): Ditto.
430         (truncxf<mode>2): Ditto.
431         (*truncdfsf_fast_mixed): Remove insn pattern.
432         (*truncdfsf_fast_i387): Ditto.
433         (*truncdfsf_mixed): Ditto.
434         (*truncdfsf_i387): Ditto.
435         (*truncdfsf2_i387_1): Ditto.
436         (*truncxfsf2_mixed): Ditto.
437         (*truncxfdf2_mixed): Ditto.
438         (*truncxf<mode>2_i387_noop): Ditto. Update callers
439         to call gen_truncxf<mode>2 instead.
440         (*truncxf<mode>2_i387): Remove.
441         (reg->reg splitters): Remove splitter pattern.
442         (reg->mem splitters): Ditto.
444         (truncdfsf2): New insn pattern.
445         (truncxf<mode>2): Ditto.
447 2018-09-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
449         * tree-ssa-math-opts.c (is_mult_by): New function.
450         (is_square_of): Use the above.
451         (optimize_recip_sqrt): New function.
452         (pass_cse_reciprocals::execute): Use the above.
454 2018-09-05  Richard Biener  <rguenther@suse.de>
456         PR bootstrap/87134
457         * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
458         to zero-init the emplaced vec.
460 2018-09-05  Martin Liska  <mliska@suse.cz>
462         PR tree-optimization/87205
463         * tree-switch-conversion.c (pass_lower_switch::execute):
464         Group cases for switch statements.
466 2018-09-05  Richard Biener  <rguenther@suse.de>
468         PR tree-optimization/87217
469         * tree-ssa-sccvn.c (vuse_valueize): New.
470         (vn_reference_lookup_pieces): Use it.
471         (vn_reference_lookup): Likewise.
473 2018-09-05  Nathan Sidwell  <nathan@acm.org>
475         PR c++/87137
476         * stor-layout.c (place_field): Scan forwards to check last
477         bitfield when ms_bitfield_placement is in effect.
479 2018-09-05  Richard Biener  <rguenther@suse.de>
481         PR bootstrap/87225
482         * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
483         return.
485 2018-09-05  Siddhesh Poyarekar  <siddhesh@sourceware.org>
486             Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
488         * config/aarch64/falkor-tag-collision-avoidance.c: New file.
489         * config.gcc (extra_objs): Build it.
490         * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
491         Likewise.
492         * config/aarch64/aarch64-passes.def
493         (pass_tag_collision_avoidance): New pass.
494         * config/aarch64/aarch64.c (qdf24xx_tunings): Add
495         AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
496         (aarch64_classify_address): Remove static qualifier.
497         (aarch64_address_info, aarch64_address_type): Move to...
498         * config/aarch64/aarch64-protos.h: ... here.
499         (make_pass_tag_collision_avoidance): New function.
500         * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
501         New tuning flag.
503 2018-09-05  Martin Liska  <mliska@suse.cz>
505         * doc/gcov.texi: Update documentation of humar
506         readable mode.
507         * gcov.c (format_count): Print one decimal place, it provides
508         more fine number of situations like '1G' vs. '1.4G'.
510 2018-09-05  Martin Liska  <mliska@suse.cz>
512         PR target/87164
513         * config/rs6000/rs6000.opt: Mark the option as Deprecated.
514         * optc-gen.awk: Allow 'Var' for Deprecated options in order
515         to generate a MASK value.
517 2018-09-04  H.J. Lu  <hongjiu.lu@intel.com>
519         PR debug/86593
520         * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
521         if frame pointer isn't used.
522         (compute_frame_pointer_to_fb_displacement): Likewise.
524 2018-09-04  Jakub Jelinek  <jakub@redhat.com>
526         PR target/87198
527         * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
528         OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
529         OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
530         (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
531         and OPTION_MASK_ISA_XSAVEC_UNSET.
533 2018-09-04  Max Filippov  <jcmvbkbc@gmail.com>
535         * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
536         XOR operations in NAND case.
538 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
540         * wide-int-range.cc (wide_int_range_convert): New.
541         * wide-int-range.h (wide_int_range_convert): New.
542         * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
543         code into wide_int_range_convert.
544         (extract_range_into_wide_ints): Do not munge anti range constants
545         into the entire domain.  Just return the range back.
547 2018-09-04  Martin Liska  <mliska@suse.cz>
549         * genmatch.c (output_line_directive): Add new argument
550         fnargs.
551         (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
553 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
555         * doc/invoke.texi (Option Summary): Add whitespace.
557         * doc/invoke.texi (Option Summary): Add -Waligned-new.
559 2018-09-04  Richard Biener  <rguenther@suse.de>
561         PR tree-optimization/87211
562         * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
563         backedge value we're supposed to treat as VARYING also number
564         the PHI to VARYING in case it got a different value-number already.
566 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
568         * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
569         (extract_range_from_binary_expr_1): Do not call
570         vrp_can_optimize_bit_op.
571         * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
572         static.
573         (wide_int_range_get_mask_and_bounds): New.
574         (wide_int_range_optimize_bit_op): New.
575         (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
576         (wide_int_range_bit_and): Same.
577         * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
578         (wide_int_range_optimize_bit_op): New.
579         (wide_int_range_get_mask_and_bounds): New.
581 2018-09-04  Richard Biener  <rguenther@suse.de>
583         PR tree-optimization/87176
584         * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
585         variable.  When value-numbering a virtual PHI node make sure
586         to not value-number to the backedge value.
588 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
590         * doc/extend.texi (Long Long, Hex Floats): Document support for
591         long long and hex floats in more recent versions of ISO C++.
593 2018-09-03  Richard Biener  <rguenther@suse.de>
595         PR tree-optimization/87177
596         * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
597         cleanup.
599 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
601         * bb-reorder.c (edge_order): Convert to C-qsort-style
602         tri-state comparator.
603         (reorder_basic_blocks_simple): Change std::stable_sort to gcc_stablesort.
605 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
607         * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
608         tri-state comparator.
609         (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
611 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
613         * sort.cc (struct sort_ctx): New field 'nlim'.  Use it...
614         (mergesort): ... here as maximum count for using netsort.
615         (gcc_qsort): Set nlim to 3 if stable sort is requested.
616         (gcc_stablesort): New.
617         * system.h (gcc_stablesort): Declare.
619 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
621         * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
622         * system.h (qsort): Always redirect to gcc_qsort.  Update comment.
623         * vec.c (qsort_chk): Do not call gcc_qsort.  Update comment.
625 2018-09-03  Segher Boessenkool  <segher@kernel.crashing.org>
627         * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
628         lxsdx and stxsdx alternatives.
629         (*mov<mode>_hardfloat64): Ditto.
630         * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
632 2018-09-03  Richard Biener  <rguenther@suse.de>
634         PR tree-optimization/87200
635         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
636         simplify result.
638 2018-09-03  Martin Liska  <mliska@suse.cz>
640         PR tree-optimization/87201
641         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
642         Fix parenthesis in an expression.
644 2018-09-03  Richard Biener  <rguenther@suse.de>
646         PR tree-optimization/87197
647         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
648         visited.  CSE the VN_INFO hashtable lookup.
650         PR tree-optimization/87169
651         * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
652         iterating make sure there's no extra backedges from irreducible
653         regions feeding the header.  Mark the destination block
654         executable.
656 2018-09-03  Martin Liska  <mliska@suse.cz>
658         PR driver/83193
659         * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
660         * common/common-targhooks.c (default_get_valid_option_values):
661         New function.
662         * common/common-targhooks.h (default_get_valid_option_values):
663         Likewise.
664         * common/config/i386/i386-common.c: Move processor_target_table
665         from i386.c.
666         (ix86_get_valid_option_values): New function.
667         (TARGET_GET_VALID_OPTION_VALUES): New macro.
668         * config/i386/i386.c (struct ptt): Move to i386-common.c.
669         (PTA_*): Move all defined masks into i386-common.c.
670         (ix86_function_specific_restore): Use new processor_cost_table.
671         * config/i386/i386.h (struct ptt): Moved from i386.c.
672         (struct pta): Likewise.
673         * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
674         * doc/tm.texi.in: Likewise.
675         * opt-suggestions.c (option_proposer::suggest_option):
676         Pass prefix to build_option_suggestions.
677         (option_proposer::get_completions): Likewise.
678         (option_proposer::build_option_suggestions): Use the new target
679         hook.
680         * opts.c (struct option_help_tuple): New struct.
681         (print_filtered_help): Use the new target hook.
683 2018-09-03  Martin Liska  <mliska@suse.cz>
685         PR middle-end/59521
686         * predict.c (set_even_probabilities): Add likely_edges
687         argument and handle cases where we have precisely one
688         likely edge.
689         (combine_predictions_for_bb): Catch also likely_edges.
690         (tree_predict_by_opcode): Handle gswitch statements.
691         * tree-cfg.h (find_case_label_for_value): New declaration.
692         (find_taken_edge_switch_expr): Likewise.
693         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
694         Find pivot in decision tree based on probabily, not by number of
695         nodes.
697 2018-09-02  Gerald Pfeifer  <gerald@pfeifer.com>
699         * doc/standards.texi (Standards): Update Objective-C reference.
701 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
703         * doc/install.texi (Prerequisites): Update link for MPC.
705 2018-09-01  Michael Matz  <matz@suse.de>
707         PR tree-optimization/87074
708         * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
709         PHIs for outer-loop uses.
711 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
713         * doc/generic.texi (OpenMP): Adjust link to openmp.org.
714         * doc/invoke.texi (C Dialect Options): Ditto.
716 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
718         * doc/install.texi (Prerequisites): Adjust link mpfr.org.
720 2018-08-31  Richard Biener  <rguenther@suse.de>
722         PR tree-optimization/87168
723         * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
724         (rpo_elim::eliminate_avail): When OP was not visited it must
725         be available.
727 2018-08-31  David Malcolm  <dmalcolm@redhat.com>
729         * tree-vrp.c (copy_value_range): Convert param "from" from
730         "value_range *" to "const value_range *".
731         (range_is_null): Likewise for param "vr".
732         (range_int_cst_p): Likewise.
733         (range_int_cst_singleton_p): Likewise.
734         (symbolic_range_p): Likewise.
735         (value_ranges_intersect_p): Likewise for both params.
736         (value_range_nonnegative_p): Likewise for param "vr".
737         (value_range_constant_singleton): Likewise.
738         (vrp_set_zero_nonzero_bits): Likewise for param "ar".
739         (extract_range_into_wide_ints): Likewise for param "vr".
740         (extract_range_from_multiplicative_op): Likewise for params "vr0"
741         and "vr1".
742         (vrp_can_optimize_bit_op): Likewise.
743         (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
744         "vr1_".
745         (extract_range_from_unary_expr): Likewise.
746         (debug_value_range): Likewise for param "vr".
747         (value_range::dump): Add "const" qualifier.
748         (vrp_prop::check_array_ref): Convert local "vr" from
749         "value_range *" to "const value_range *".
750         (vrp_prop::check_mem_ref): Likewise.
751         (vrp_prop::visit_stmt): Likewise for local "old_vr".
752         (vrp_intersect_ranges_1): Likewise for param "vr_1".
753         (vrp_intersect_ranges): Likewise.
754         (simplify_stmt_for_jump_threading): Likewise for local "vr".
755         (vrp_prop::vrp_finalize): Likewise.
756         * tree-vrp.h (value_range::dump): Add "const" qualifier.
757         (vrp_intersect_ranges): Add "const" qualifier to params as above.
758         (extract_range_from_unary_expr): Likewise.
759         (value_range_constant_singleton): Likewise.
760         (symbolic_range_p): Likewise.
761         (copy_value_range): Likewise.
762         (extract_range_from_binary_expr_1): Likewise.
763         (range_int_cst_p): Likewise.
764         (vrp_set_zero_nonzero_bits): Likewise.
765         (range_int_cst_singleton_p): Likewise.
767 2018-08-31  Vlad Lazar  <vlad.lazar@arm.com>
769         * config/aarch64/arm_neon.h (vabsd_s64): New.
770         (vnegd_s64): Likewise.
772 2018-08-31  Martin Jambor  <mjambor@suse.cz>
774         * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
776 2018-08-31  Martin Liska  <mliska@suse.cz>
778         * ipa-icf.c (sem_item::add_type): Use
779         sem_item::m_type_hash_cache.
780         * ipa-icf.h: Move the cache from sem_item_optimizer
781         to sem_item.
783 2018-08-31  Nathan Sidwell  <nathan@acm.org>
785         * doc/extend.texi (Backwards Compatibility): Remove implicit
786         extern C leeway of () being (...).
788 2018-08-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
790         * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
792 2018-08-31  Segher Boessenkool  <segher@kernel.crashing.org>
794         PR target/86684
795         PR target/87149
796         * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
798 2018-08-31  Jakub Jelinek  <jakub@redhat.com>
800         PR middle-end/87138
801         * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
802         gen_int_mode.  Formatting fixes.
804 2018-08-30  Sandra Loosemore  <sandra@codesourcery.com>
806         * target.def (custom_function_descriptors): Improve documentation.
807         * doc/tm.texi.in (Trampolines): Expand discussion of function
808         descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
809         beginning of the section.
810         * doc/tm.texi: Regenerated.
812 2018-08-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
814         * cfg.h (class auto_edge_flag): Spell out the template-id of the
815         base class in the initializer list.  This is a workaround for
816         building with older GCC.
817         (class auto_bb_flag): Likewise.
819 2018-08-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
821         * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
822         (altivec_vcmpequ<VI_char>_p): Remove star.
823         * config/rs6000/rs6000-string.c (do_load_for_compare): Support
824         vector load modes.
825         (expand_strncmp_vec_sequence): New function.
826         (emit_final_str_compare_vec): New function.
827         (expand_strn_compare): Add support for vector strncmp.
828         * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
829         length specification to bytes.
830         * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
831         (vcmpnezb_p): New pattern.
832         * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
833         for option -mstring-compare-inline-limit.
835 2018-08-30  Thiago Macieira  <thiago.macieira@intel.com>
837         * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
838         (PTA_SKYLAKE): Add PTA_AES.
839         (PTA_GOLDMONT): Likewise.
841 2018-08-29  Jan Hubicka  <jh@suse.cz>
843         PR lto/86517
844         * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
845         * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
847 2018-08-29  Jan Hubicka  <jh@suse.cz>
849         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
850         TYPE_STUB_DECL.
851         (hash_tree): Do not visit TYPE_STUB_DECL.
852         * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
853         stream TYPE_STUB_DECL.
854         * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
855         * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
856         after free_lang_data.
857         (type_in_anonymous_namespace_p): Likewise.
859 2018-08-29  Jan Hubicka  <jh@suse.cz>
861         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
862         comment that it has to be even number.
863         (class sreal): Change m_sig type to int32_t.
864         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
865         int64_t for temporary calculations.
866         (sreal_verify_basics): Drop one bit from minimum and maximum.
868 2018-08-30  Richard Biener  <rguenther@suse.de>
870         PR tree-optimization/87147
871         * tree-ssa-sccvn.c (SSA_VISITED): New function.
872         (visit_phi): When the degenerate result is from the backedge and
873         we didn't visit its definition yet drop to VARYING.
874         (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
876 2018-08-29  Jan Hubicka  <jh@suse.cz>
878         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
879         DECL_VINDEX.
880         (hash_tree): Likewise.
882 2018-08-29  Jan Hubicka  <jh@suse.cz>
884         * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
885         and TYPE_NEXT_REF_TO.
887 2018-08-29  Jan Hubicka  <jh@suse.cz>
889         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
890         comment that it has to be even number.
891         (class sreal): Change m_sig type to int32_t.
892         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
893         int64_t for temporary calculations.
894         (sreal_verify_basics): Drop one bit from minimum and maximum.
896 2018-08-30  Tamar Christina  <tamar.christina@arm.com>
898         * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
900 2018-08-30  Vlad Lazar  <vlad.lazar@arm.com>
902         PR middle-end/86995
903         * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
904         if to_add is negative.
906 2018-08-29  Bernd Edlinger  <bernd.edlinger@hotmail.de>
908         PR middle-end/87053
909         * builtins.c (c_strlen): Improve range checks.
911 2018-08-29  Martin Sebor  <msebor@redhat.com>
912             Jeff Law  <law@redhat.com>
914         PR tree-optimization/86714
915         PR tree-optimization/86711
916         * builtins.c (c_strlen): Add arguments to call to string_constant.
917         * expr.c (string_constant): Add argument.  Detect missing nul
918         terminator and outermost declaration it's missing in.
919         * expr.h (string_constant): Add argument.
920         * fold-const.c (read_from_constant_string): Add arguments to call to
921         string_constant.
922         (c_getstr): Likewise.
923         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
924         to string_constant.
925         * tree-ssa-strlen.c (get_stridx): Likewise.
927 2018-08-29  Jan Hubicka  <jh@suse.cz>
929         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
930         Do not stream DECL_VINDEX.
931         * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
932         * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
933         (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
935 2018-08-29  Richard Biener  <rguenther@suse.de>
937         * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
938         virtual operands that are not default defs to honor region
939         boundaries.
940         (rpo_vn_valueize): Remove ineffective code here.
942 2018-08-29  Richard Biener  <rguenther@suse.de>
944         PR tree-optimization/87132
945         * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
946         when skipping defs reachable over backedges.
948 2018-08-29  Richard Biener  <rguenther@suse.de>
950         * tree-core.h: Document use of deprecated_flag in SSA_NAME.
951         * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
952         * tree-into-ssa.c (pass_build_ssa::execute): Initialize
953         function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
954         * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
955         (vn_reference_lookup_3): Remove use of const_parms.
956         (free_rpo_vn): Do not free const_parms.
957         (do_rpo_vn): Do not call init_const_parms.
958         * tree-ssa-alias.c (refs_may_alias_p_1): Honor
959         SSA_NAME_POINTS_TO_READONLY_MEMORY.
960         (call_may_clobber_ref_p_1): Likewise.
962 2018-08-29  Alexander Monakov  <amonakov@ispras.ru>
964         PR other/86726
965         * invoke.texi (Optimization Options): List -ftree-scev-cprop.
966         (-O): Ditto.
967         (-ftree-scev-cprop): Document.
969 2018-08-29  Jan Hubicka  <jh@suse.cz>
971         * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
972         parameters.
973         (sreal constructor): Update.
974         * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
975         sreal:operator/): Update.
977 2018-08-29  Martin Liska  <mliska@suse.cz>
979         * tree-switch-conversion.c (switch_conversion::expand):
980         Strenghten assumption about gswitch statements.
982 2018-08-29  Richard Biener  <rguenther@suse.de>
984         PR tree-optimization/87117
985         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
986         re-value-number released SSA VDEFs.
988 2018-08-29  Richard Biener  <rguenther@suse.de>
990         PR tree-optimization/87126
991         * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
993 2018-08-28  Jim Wilson  <jimw@sifive.com>
995         * config/riscv/pic.md: Rewrite.
996         * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
997         invalid address.
998         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
999         (SOFTF, default_load, softload, softstore): New.
1001 2018-08-28  Jeff Law  <law@redhat.com>
1003         * fold-const.c (fold_binary_loc): Remove recently added assert.
1005 2018-08-28  Joern Rennecke  <joern.rennecke@riscy-ip.com>
1007         * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
1008         to OP parmeter of generated function.
1010 2018-08-28  MCC CS  <deswurstes@users.noreply.github.com>
1012         PR tree-optimization/87009
1013         * match.pd: Add boolean optimizations.
1015 2018-08-28  Martin Sebor  <msebor@redhat.com>
1017         PR middle-end/86631
1018         * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
1019         * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
1020         (pass_walloca::gate): Use it.
1021         (alloca_call_type): Same.
1022         (pass_walloca::execute): Same.
1023         * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
1025 2018-08-28  David Malcolm  <dmalcolm@redhat.com>
1027         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
1028         GCC_VERSION for usage of "__gcc_dump_printf__" format from
1029         >= 3005 to >= 9000.
1031 2018-08-28  Richard Biener  <rguenther@suse.de>
1033         PR tree-optimization/87124
1034         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
1035         constants before looking up avail.
1037 2018-08-28  Jakub Jelinek  <jakub@redhat.com>
1039         PR middle-end/87099
1040         * calls.c (maybe_warn_nonstring_arg): Punt early if
1041         warn_stringop_overflow is zero.  Don't call get_range_strlen
1042         on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
1043         Swap comparison operands to have constants on rhs.  Only use
1044         lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
1045         increment lenrng[0].
1047 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
1049         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
1050         use of tree_to_shwi.  Remove duplicated test for the size being
1051         a whole number of bytes.
1053 2018-08-28  Richard Biener  <rguenther@suse.de>
1055         PR tree-optimization/87117
1056         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
1057         Handle removed stmt without LHS (GIMPLE_NOP).
1059 2018-08-28  Richard Biener  <rguenther@suse.de>
1061         PR tree-optimization/87117
1062         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
1063         void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
1065 2018-08-28  Richard Biener  <rguenther@suse.de>
1067         PR tree-optimization/87117
1068         * tree-ssa-pre.c (compute_avail): Do not make expressions
1069         with predicated values available.
1070         (get_expr_value_id): Assert we do not run into predicated value
1071         expressions.
1073 2018-08-28  Richard Biener  <rguenther@suse.de>
1075         PR tree-optimization/87117
1076         * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
1077         get virtual operands.
1078         (get_expr_operands): Handle STRING_CST like other decls.
1080 2018-08-28  Martin Liska  <mliska@suse.cz>
1082         * tree.h: Update documentation of fndecl_built_in_p
1083         functions.
1086 2018-08-27  Jeff Law  <law@redhat.com>
1087         PR tree-optimization/87110
1088         * tree-ssa-dse.c (compute_trims): Handle non-constant
1089         TYPE_SIZE_UNIT.
1091 2018-08-27  Martin Sebor  <msebor@redhat.com>
1093         PR tree-optimization/86914
1094         * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
1096 2018-08-27  Martin Sebor  <msebor@redhat.com>
1098         PR tree-optimization/87112
1099         * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
1100         the type of the bound argument.
1102 2018-08-27  Jeff Law  <law@redhat.com>
1104         * tree-ssa-dse.c (compute_trims): Handle case where the reference's
1105         type does not have a TYPE_SIZE_UNIT.
1107 2018-08-27  Steve Ellcey  <sellcey@cavium.com>
1109         * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
1110         with include of backend.h.
1112 2018-08-27  Richard Biener  <rguenther@suse.de>
1114         PR tree-optimization/86927
1115         * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
1116         use const cond reduction code.
1118 2018-08-27  Alexander Monakov  <amonakov@ispras.ru>
1120         PR tree-optimization/85758
1121         * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
1123 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
1125         PR c++/87091
1126         * diagnostic-show-locus.c (class layout_range): Update for
1127         conversion of show_caret_p to a tri-state.
1128         (layout_range::layout_range): Likewise.
1129         (make_range): Likewise.
1130         (layout::maybe_add_location_range): Likewise.
1131         (layout::should_print_annotation_line_p): Don't show annotation
1132         lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
1133         (layout::get_state_at_point): Update for conversion of
1134         show_caret_p to a tri-state.  Bail out early for
1135         SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
1136         underlining or source colorization.
1137         (gcc_rich_location::add_location_if_nearby): Update for conversion
1138         of show_caret_p to a tri-state.
1139         (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
1140         (selftest::test_one_liner_fixit_replace_equal_secondary_range):
1141         Likewise.
1142         (selftest::test_one_liner_labels): Likewise.
1143         * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
1144         conversion of show_caret_p to a tri-state.
1145         * pretty-print.c (text_info::set_location): Likewise.
1146         * pretty-print.h (text_info::set_location): Likewise.
1147         * substring-locations.c (format_warning_n_va): Likewise.
1148         * tree-diagnostic.c (default_tree_printer): Likewise.
1149         * tree-pretty-print.c (newline_and_indent): Likewise.
1151 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
1153         PR c++/87091
1154         * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
1155         line above for line-insertion fix-it hints.
1156         (selftest::test_fixit_insert_containing_newline): Update the
1157         expected results, and add a test with line-numbering enabled.
1159 2018-08-27  Martin Liska  <mliska@suse.cz>
1161         PR sanitizer/86962
1162         * sanopt.c (sanitize_rewrite_addressable_params): Ignore
1163         params with DECL_HAS_VALUE_EXPR_P.
1165 2018-08-27  Martin Liska  <mliska@suse.cz>
1167         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
1168         selected expansion strategy.
1170 2018-08-27  Martin Liska  <mliska@suse.cz>
1172         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
1173         * builtins.c (is_builtin_fn): Likewise.
1174         * attribs.c (diag_attr_exclusions): Use new function
1175         fndecl_built_in_p and remove check for FUNCTION_DECL if
1176         possible.
1177         (builtin_mathfn_code): Likewise.
1178         (fold_builtin_expect): Likewise.
1179         (fold_call_expr): Likewise.
1180         (fold_builtin_call_array): Likewise.
1181         (fold_call_stmt): Likewise.
1182         (set_builtin_user_assembler_name): Likewise.
1183         (is_simple_builtin): Likewise.
1184         * calls.c (gimple_alloca_call_p): Likewise.
1185         (maybe_warn_nonstring_arg): Likewise.
1186         * cfgexpand.c (expand_call_stmt): Likewise.
1187         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
1188         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
1189         (cgraph_node::verify_node): Likewise.
1190         * cgraphclones.c (build_function_decl_skip_args): Likewise.
1191         (cgraph_node::create_clone): Likewise.
1192         * config/arm/arm.c (arm_insert_attributes): Likewise.
1193         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
1194         * dse.c (scan_insn): Likewise.
1195         * expr.c (expand_expr_real_1): Likewise.
1196         * fold-const.c (operand_equal_p): Likewise.
1197         (fold_binary_loc): Likewise.
1198         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
1199         * gimple-low.c (lower_stmt): Likewise.
1200         * gimple-pretty-print.c (dump_gimple_call): Likewise.
1201         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
1202         * gimple.c (gimple_build_call_from_tree): Likewise.
1203         (gimple_call_builtin_p): Likewise.
1204         (gimple_call_combined_fn): Likewise.
1205         * gimplify.c (gimplify_call_expr): Likewise.
1206         (gimple_boolify): Likewise.
1207         (gimplify_modify_expr): Likewise.
1208         (gimplify_addr_expr): Likewise.
1209         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
1210         * ipa-cp.c (determine_versionability): Likewise.
1211         * ipa-fnsummary.c (compute_fn_summary): Likewise.
1212         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
1213         * ipa-split.c (visit_bb): Likewise.
1214         (split_function): Likewise.
1215         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
1216         * lto-cgraph.c (input_node): Likewise.
1217         * lto-streamer-out.c (write_symbol): Likewise.
1218         * omp-low.c (setjmp_or_longjmp_p): Likewise.
1219         (lower_omp_1): Likewise.
1220         * predict.c (strip_predict_hints): Likewise.
1221         * print-tree.c (print_node): Likewise.
1222         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
1223         * trans-mem.c (is_tm_irrevocable): Likewise.
1224         (is_tm_load): Likewise.
1225         (is_tm_simple_load): Likewise.
1226         (is_tm_store): Likewise.
1227         (is_tm_simple_store): Likewise.
1228         (is_tm_abort): Likewise.
1229         (tm_region_init_1): Likewise.
1230         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
1231         * tree-cfg.c (verify_gimple_call): Likewise.
1232         (move_stmt_r): Likewise.
1233         (stmt_can_terminate_bb_p): Likewise.
1234         * tree-eh.c (lower_eh_constructs_2): Likewise.
1235         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
1236         * tree-inline.c (remap_gimple_stmt): Likewise.
1237         (copy_bb): Likewise.
1238         (estimate_num_insns): Likewise.
1239         (fold_marked_statements): Likewise.
1240         * tree-sra.c (scan_function): Likewise.
1241         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
1242         (optimize_stack_restore): Likewise.
1243         (pass_fold_builtins::execute): Likewise.
1244         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
1245         (mark_all_reaching_defs_necessary_1): Likewise.
1246         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
1247         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
1248         (pass_forwprop::execute): Likewise.
1249         * tree-ssa-loop-im.c (stmt_cost): Likewise.
1250         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
1251         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
1252         * tree-ssa-strlen.c (get_string_length): Likewise.
1253         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
1254         (find_func_aliases_for_call): Likewise.
1255         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
1256         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
1257         * tree-tailcall.c (find_tail_calls): Likewise.
1258         * tree.c (need_assembler_name_p): Likewise.
1259         (free_lang_data_in_decl): Likewise.
1260         (get_call_combined_fn): Likewise.
1261         * ubsan.c (is_ubsan_builtin_p): Likewise.
1262         * varasm.c (incorporeal_function_p): Likewise.
1263         * tree.h (DECL_BUILT_IN): Remove and replace with
1264         fndecl_built_in_p.
1265         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
1266         (fndecl_built_in_p): New.
1268 2018-08-27  Martin Liska  <mliska@suse.cz>
1270         PR tree-optimization/86847
1271         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
1272         Dump also subtree probability.
1273         (switch_decision_tree::do_jump_if_equal): New function.
1274         (switch_decision_tree::emit_case_nodes): Handle special
1275         situations in balanced tree that can be emitted much simpler.
1276         Fix calculation of probabilities that happen in tree expansion.
1277         * tree-switch-conversion.h (struct cluster): Add
1278         is_single_value_p.
1279         (struct simple_cluster): Likewise.
1280         (struct case_tree_node): Add new function has_child.
1281         (do_jump_if_equal): New.
1283 2018-08-27  Martin Liska  <mliska@suse.cz>
1285         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
1286         Add new argument to bit_test_cluster constructor.
1287         (bit_test_cluster::emit): Set bits really number of values
1288         handlel by a test.
1289         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
1290         probability argument.
1291         * tree-switch-conversion.h (struct bit_test_cluster):
1292         Add m_handles_entire_switch.
1294 2018-08-27  Martin Liska  <mliska@suse.cz>
1296         PR tree-optimization/86702
1297         * tree-switch-conversion.c (jump_table_cluster::emit):
1298         Make probabilities even for values in jump table
1299         according to number of cases handled.
1300         (switch_decision_tree::compute_cases_per_edge): Pass
1301         argument to reset_out_edges_aux function.
1302         (switch_decision_tree::analyze_switch_statement): Likewise.
1303         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
1304         Make it static.
1306 2018-08-27  Martin Liska  <mliska@suse.cz>
1308         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
1309         cfun argument explicitly.
1310         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
1311         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
1312         function gimple_switch_default_bb.
1313         (convert_switch_statements):
1314         (expand_builtins):
1315         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
1316         * stmt.c (label_to_block_fn): Use label_to_block and pass
1317         cfun argument explicitly and use gimple_switch_label_bb.
1318         (expand_case): Likewise.
1319         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
1320         cfun argument explicitly. Likewise.
1321         (make_edges_bb): Likewise.
1322         (make_cond_expr_edges): Likewise.
1323         (get_cases_for_edge): Likewise.
1324         (make_gimple_switch_edges): Likewise.
1325         (label_to_block_fn): Likewise.
1326         (label_to_block): Likewise.
1327         (make_goto_expr_edges): Likewise.
1328         (make_gimple_asm_edges): Likewise.
1329         (main_block_label): Likewise.
1330         (group_case_labels_stmt): Likewise.
1331         (find_taken_edge_computed_goto): Likewise.
1332         (find_taken_edge_switch_expr): Likewise.
1333         (gimple_verify_flow_info): Likewise.
1334         (gimple_redirect_edge_and_branch): Likewise.
1335         (gimple_switch_label_bb): New function.
1336         (gimple_switch_default_bb): Likewise.
1337         (gimple_switch_edge): Likewise.
1338         (gimple_switch_default_edge): Likewise.
1339         * tree-cfg.h (label_to_block_fn): Remove and replace ...
1340         (label_to_block): ... with this.
1341         (gimple_switch_label_bb): New.
1342         (gimple_switch_default_bb): Likewise.
1343         (gimple_switch_edge): Likewise.
1344         (gimple_switch_default_edge): Likewise.
1345         * tree-cfgcleanup.c (convert_single_case_switch): Use
1346         new gimple functions and pass new argument to label_to_block.
1347         (cleanup_control_flow_bb):
1348         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
1349         cfun argument explicitly.
1350         (make_eh_edges): Likewise.
1351         (redirect_eh_dispatch_edge): Likewise.
1352         (lower_resx): Likewise.
1353         (lower_eh_dispatch): Likewise.
1354         (maybe_remove_unreachable_handlers): Likewise.
1355         (unsplit_eh): Likewise.
1356         (cleanup_empty_eh): Likewise.
1357         (verify_eh_edges): Likewise.
1358         (verify_eh_dispatch_edge): Likewise.
1359         * tree-ssa-dom.c (record_edge_info): Likewise.
1360         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
1361         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
1362         (thread_through_normal_block): Likewise.
1363         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
1364         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
1365         * tree-switch-conversion.c (switch_conversion::collect): Use new
1366         gimple functions.
1367         (switch_conversion::check_final_bb): Likewise.
1368         (switch_conversion::gather_default_values): Pass new argument
1369         to label_to_block.
1370         (switch_conversion::build_constructors): Likewise.
1371         (switch_decision_tree::compute_cases_per_edge): Use new
1372         gimple_switch_edge function.
1373         (switch_decision_tree::analyze_switch_statement): Pass new argument
1374         to label_to_block.
1375         (switch_decision_tree::try_switch_expansion): Use
1376         gimple_switch_default_edge.
1377         * tree-vrp.c (find_switch_asserts): Pass new argument
1378         to label_to_block.
1379         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
1380         (vr_values::simplify_switch_using_ranges): Likewise.
1382 2018-08-27  Richard Biener  <rguenther@suse.de>
1384         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
1385         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
1387         * tree-ssa-sccvn.h (struct vn_pval): New structure.
1388         (struct vn_nary_op_s): Add unwind_to member.  Add
1389         predicated_values flag and put result into a union together
1390         with a linked list of vn_pval.
1391         (struct vn_ssa_aux): Add name member to make maintaining
1392         a map of SSA name to vn_ssa_aux possible.  Remove no longer
1393         needed info, dfsnum, low, visited, on_sccstack, use_processed
1394         and range_info_anti_range_p members.
1395         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
1396         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
1397         New functions.
1398         (vn_valueize): New global.
1399         (vn_context_bb): Likewise.
1400         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
1401         VN_INFO_PTR_INFO): Remove.
1402         * tree-ssa-sccvn.c: ... (rewrite)
1403         (pass_fre::execute): For -O2+ initialize loops and run
1404         RPO VN in optimistic mode (iterating).  For -O1 and -Og
1405         run RPO VN in non-optimistic mode.
1406         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
1407         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
1408         * doc/invoke.texi (sccvn-max-scc-size): Remove.
1409         (rpo-vn-max-loop-depth): Document.
1410         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
1411         when valuezing the VUSE signals we walked out of the region.
1412         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
1413         (phi_translate): Set VN context block to use for availability
1414         lookup.
1415         (compute_avail): Likewise.
1416         (pre_valueize): New function.
1417         (pass_pre::execute): Adjust to the RPO VN API.
1419         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
1420         (propagate_constants_for_unrolling): Remove.
1421         (tree_unroll_loops_completely): Perform value-numbering
1422         on the unrolled bodies loop parent.
1424 2018-08-27  Richard Biener  <rguenther@suse.de>
1426         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
1427         for partial antic compute.
1429 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
1431         PR rtl-optimization/87065
1432         * combine.c (simplify_if_then_else): Formatting fix.
1433         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
1434         check.
1435         (known_cond): Don't return const_true_rtx for vector modes.  Use
1436         CONST0_RTX instead of const0_rtx.  Formatting fixes.
1438 2018-08-27  Martin Liska  <mliska@suse.cz>
1440         PR gcov-profile/87069
1441         * gcov.c (process_file): Record files already processed
1442         and warn about a file being processed multiple times.
1444 2018-08-27  Martin Liska  <mliska@suse.cz>
1446         PR driver/83193
1447         * config/aarch64/aarch64.c (aarch64_override_options_internal):
1448         Set default values for x_aarch64_*_string strings.
1449         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
1450         prefix.  For -mabi do not print '=ABI' in help and use
1451         <option_value> format for -msve-vector-bits and -moverride
1452         options.
1454 2018-08-26  Jeff Law  <law@redhat.com>
1456         * config/mips/frame-header-opt.c: Include "backend.h" rather than
1457         "cfg.h"
1459 2018-08-26  Marek Polacek  <polacek@redhat.com>
1461         PR c++/87029, Implement -Wredundant-move.
1462         * doc/invoke.texi: Document -Wredundant-move.
1464 2018-08-25  Martin Sebor  <msebor@redhat.com>
1466         PR tree-optimization/87059
1467         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
1468         to the same type as the other.
1469         * fold-const.c (fold_binary_loc): Assert expectation.
1471 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
1473         * config/darwin.c (machopic_legitimize_pic_address): Clean up
1474         extraneous parentheses, dead code section and formatting.
1476 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
1478         PR c++/87091
1479         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
1480         wide enough for jumps in the line-numbering to be visible.
1481         (layout::print_gap_in_line_numbering): New member function.
1482         (layout::calculate_line_spans): When using line numbering, merge
1483         line spans that are only 1 line apart.
1484         (diagnostic_show_locus): When printing line numbers, show gaps in
1485         line numbering directly, rather than printing headers.
1486         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
1487         line-numbering with multiple line spans.
1488         (selftest::test_fixit_insert_containing_newline_2): Add test of
1489         line-numbering, in which the spans are close enough to be merged.
1491 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
1493         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
1494         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
1495         * tree-vrp.c (range_is_nonnull): Remove.
1496         (range_includes_zero_p): Accept value_range instead of min/max.
1497         (extract_range_from_binary_expr_1): Do not early bail on
1498         POINTER_PLUS_EXPR.
1499         Use range_includes_zero_p instead of range_is_nonnull.
1500         (extract_range_from_unary_expr): Use range_includes_zero_p instead
1501         of range_is_nonnull.
1502         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
1503         special case VR_ANTI_RANGE.
1504         (vrp_finalize): Same.
1505         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
1506         instead of min/max.
1507         (range_is_nonnull): Remove.
1508         * vr-values.c (vrp_stmt_computes_nonzero): Use
1509         range_includes_zero_p instead of range_is_nonnull.
1510         (extract_range_basic): Pass value_range to range_includes_zero_p
1511         instead of range_is_nonnull.
1513 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
1515         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
1516         * emit-rtl.h (rtl_data): Remove return_bnd.
1517         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
1518         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
1519         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
1520         (POINTER_BOUNDS_MODE): Remove definition.
1521         (make_pointer_bounds_mode): Remove.
1522         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
1523         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
1524         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
1525         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
1526         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
1527         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
1528         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
1530         * config/i386/i386-modes.def (BND32, BND64): Remove.
1531         * config/i386/i386.c (dbx_register_map): Remove bound registers.
1532         (dbx64_register_map): Ditto.
1533         (svr4_dbx_register_map): Ditto.
1534         (indirect_thunk_bnd_needed): Remove.
1535         (indirect_thunks_bnd_used): Ditto.
1536         (indirect_return_bnd_needed): Ditto.
1537         (indirect_return_via_cx_bnd): Ditto.
1538         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
1539         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
1540         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
1541         (output_indirect_thunk_function): Remove handling of
1542         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
1543         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
1544         (ix86_save_reg): Remove handling of crtl->return_bnd.
1545         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
1546         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
1547         and UNSPEC_BNDLX_ADDR.
1548         (ix86_output_indirect_branch_via_reg): Remove handling of
1549         indirect_thunk_prefix_bnd.
1550         (ix86_output_indirect_branch_via_push): Ditto.
1551         (ix86_output_function_return): Ditto.
1552         (ix86_output_indirect_function_return): Ditto.
1553         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
1554         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
1555         (CALL_USED_REGISTERS): Ditto.
1556         (REG_ALLOC_ORDER): Update for removal of bound registers.
1557         (HI_REGISTER_NAMES): Ditto.
1558         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
1559         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
1560         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
1561         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
1562         (FIRST_PSEUDO_REG): Update.
1563         (BND): Remove mode iterator.
1564         * config/i386/predicates.md (bnd_mem_operator): Remove.
1566 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
1568         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
1569         vectors.
1571 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
1573         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
1574         the case in which the permute needs only a single element and
1575         repeats for every vector of the result.  Extend that case to
1576         handle variable-length vectors.
1577         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1579 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
1581         PR debug/79342
1582         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
1583         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
1585 2018-08-24  Richard Biener  <rguenther@suse.de>
1587         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
1588         bb_flags_allocated members.
1589         (auto_flag): New RAII class for allocating flags.
1590         (auto_edge_flag): New RAII class for allocating edge flags.
1591         (auto_bb_flag): New RAII class for allocating bb flags.
1592         * cfgloop.c (verify_loop_structure): Allocate temporary edge
1593         flag dynamically.
1594         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
1595         in favor of temporarily allocated BB flag.
1596         * hsa-brig.c: Re-order includes.
1597         * hsa-dump.c: Likewise.
1598         * hsa-regalloc.c: Likewise.
1599         * print-rtl.c: Likewise.
1600         * profile-count.c: Likewise.
1602 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
1604         PR target/86989
1605         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
1606         the TOC register.
1608 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
1610         PR 87073/bootstrap
1611         * wide-int-range.cc (wide_int_range_div): Do not ignore result
1612         from wide_int_range_multiplicative_op.
1614 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1616         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
1617         "permutaion".
1619 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
1621         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
1622         to 'expanded'.
1624 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
1626         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
1627         full GENERIC expression used for replacement.
1629 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
1631         * tree-vrp.c (abs_extent_range): Remove.
1632         (extract_range_into_wide_ints): Pass wide ints by reference.
1633         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
1634         Pass wide ints by reference in all calls to
1635         extract_range_into_wide_ints.
1636         * wide-int-range.cc (wide_int_range_div): New.
1637         * wide-int-range.h (wide_int_range_div): New.
1638         (wide_int_range_includes_zero_p): New.
1639         (wide_int_range_zero_p): New.
1641 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
1643         * config/aarch64/aarch64.md (arches): New enum.
1644         (arch): New enum attr.
1645         (arch_enabled): New attr.
1646         (enabled): Now uses arch_enabled only.
1647         (simd, sve, fp16): Removed attribute.
1648         (fp): Attr now defined in terms of 'arch'.
1649         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
1650         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
1651         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
1652         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
1653         attributes into 'arch'.
1654         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
1655         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
1656         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
1657         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
1658         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
1659         'simd' attribute into 'arch'.
1660         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
1661         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
1662         Convert use of 'fp' attribute to 'arch'.
1663         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
1664         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
1665         into 'arch'.
1666         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
1667         (different modes) Merge 'fp' and 'simd' into 'arch'.
1668         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
1669         'simd' into 'arch'.
1671 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
1673         PR rtl-optimization/87026
1674         * expmed.c (canonicalize_comparison): If we can no longer create
1675         pseudoregisters, don't.
1677 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
1679         PR target/86951
1680         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
1681         prototype.
1682         * config/arm/arm.c (speculation_barrier_libfunc): New static
1683         variable.
1684         (arm_init_libfuncs): Initialize it.
1685         (arm_emit_speculation_barrier): New function.
1686         * config/arm/arm.md (speculation_barrier): Call
1687         arm_emit_speculation_barrier for architectures that do not have
1688         DSB or ISB.
1689         (speculation_barrier_insn): Only match on Armv7 or later.
1691 2018-08-23  Richard Biener  <rguenther@suse.de>
1693         PR middle-end/87024
1694         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
1695         calls.
1697 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
1699         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
1700         of single-vector TBLs.
1701         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
1702         one input is given.
1704 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
1706         PR target/85910
1707         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
1708         aarch64_evpc_tbl guard.
1710 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1712         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
1713         behaviour.
1715 2018-08-22  Martin Sebor  <msebor@redhat.com>
1717         PR middle-end/87052
1718         * tree-pretty-print.c (pretty_print_string): Add argument.
1719         (dump_generic_node): Call to pretty_print_string with string size.
1721 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
1723         PR rtl-optimization/86771
1724         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
1725         of two SETs into those two SETs, one to be placed at i2, if that SETs
1726         destination is modified between i2 and i3.
1728 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
1730         PR tree-optimization/86725
1731         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
1732         function.
1733         (vect_analyze_scalar_cycles_1): Check it.
1735 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
1737         PR tree-optimization/86725
1738         * tree-vect-loop.c (vect_is_simple_reduction): When treating
1739         an outer loop phi as a double reduction, make sure that the
1740         single user of the phi result is an inner loop phi.
1742 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
1744         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
1745         grouped stores with gaps to a strided group.
1747 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
1749         * tree-vect-stmts.c (get_group_load_store_type)
1750         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
1751         first statement in a group.
1753 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
1755         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
1756         the sequence used in gcc/gcc.c.
1758 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
1760         PR other/704
1761         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
1762         building it.
1764 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
1766         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
1767         Darwin10-specific unwinder-shim.
1768         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
1769         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC): 
1770         New to cater for Darwin10 Rosetta.
1772 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
1774         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
1775         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
1777 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
1779         PR bootstrap/81033
1780         PR target/81733
1781         PR target/52795
1782         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
1783         (dwarf2out_switch_text_section): Generate a local label for the
1784         second function sub-section and apply it as the second FDE start
1785         label.
1786         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
1787         second sub-section start.
1789 2018-08-22  Richard Biener  <rguenther@suse.de>
1791         PR tree-optimization/86988
1792         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
1794 2018-08-22  Richard Biener  <rguenther@suse.de>
1796         PR tree-optimization/86945
1797         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
1799 2018-08-22  Alexandre Oliva <oliva@adacore.com>
1801         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
1802         a comment about how uses of r2 for .sdata2 come about.
1804 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
1806         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
1808 2018-08-21  Marek Polacek  <polacek@redhat.com>
1810         PR c++/86981, Implement -Wpessimizing-move.
1811         * doc/invoke.texi: Document -Wpessimizing-move.
1813 2018-08-21  Jan Hubicka  <jh@suse.cz>
1815         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
1816         * tree.h (is_redundant_typedef): Remove.
1817         * dwarf2out.c (is_redundant_typedef): Turn into static function.
1819 2018-08-21  Jan Hubicka  <jh@suse.cz>
1821         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
1822         when possible.
1824 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
1826         * expmed.c (extract_low_bits): Reject invalid subregs early.
1828 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1830         PR middle-end/86121
1831         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
1832         behaviour.
1834 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
1836         * config/vxworks.h: Guard vxworks_asm_out_constructor and
1837         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
1838         * config/vxworks.c: Likewise.
1840 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
1842         * config/vxworks.c: Set targetm.have_ctors_dtors
1843         if HAVE_INITFINI_ARRAY_SUPPORT.
1844         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
1845         if HAVE_INITFINI_ARRAY_SUPPORT.
1847 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
1849         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
1850         default search path for VxWorks < 7.
1852 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1854         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
1855         (get_format_string): Refer to c_getstr.
1857 2018-08-21  Tom de Vries  <tdevries@suse.de>
1859         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1860         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1861         (debuginfo_early_stop): Declare.
1862         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1863         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1864         (debuginfo_early_stop): New function.
1865         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
1866         and debuginfo_early_stop.
1867         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
1868         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
1869         (general_init): Call debuginfo_early_init.
1870         (finalize): Call debuginfo_fini.
1871         (do_compile): Call debuginfo_init.
1872         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
1873         -fdump-early-debug.
1874         (@item -fdump-debug, @item -fdump-earlydebug): Add.
1876 2018-08-21  Tom de Vries  <tdevries@suse.de>
1878         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
1879         flag_dump_noaddr and flag_dump_unnumbered.
1881 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
1883         * wide-int-range.cc (wide_int_range_abs): New.
1884         (wide_int_range_order_set): Rename from wide_int_range_min_max.
1885         * wide-int-range.h (wide_int_range_abs): New.
1886         (wide_int_range_min_max): New.
1887         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
1888         case to call wide_int_range_abs.
1889         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
1890         (extract_range_from_abs_expr): Delete.
1892 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
1894         PR target/87033
1895         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
1896         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
1897         for indexed loads.
1899 2018-08-20  Nathan Sidwell  <nathan@acm.org>
1900             Jeff Law <law@redhat.com>
1902         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
1903         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
1905 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
1907         PR other/84889
1908         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
1909         (decl_attributes): Likewise.
1910         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
1911         instance.
1912         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
1913         * diagnostic-core.h (class auto_diagnostic_group): New class.
1914         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
1915         (diagnostic_report_diagnostic): Handle the first diagnostics within
1916         a group.
1917         (emit_diagnostic): Add auto_diagnostic_group instance.
1918         (inform): Likewise.
1919         (inform_n): Likewise.
1920         (warning): Likewise.
1921         (warning_at): Likewise.
1922         (warning_n): Likewise.
1923         (pedwarn): Likewise.
1924         (permerror): Likewise.
1925         (error): Likewise.
1926         (error_n): Likewise.
1927         (error_at): Likewise.
1928         (sorry): Likewise.
1929         (fatal_error): Likewise.
1930         (internal_error): Likewise.
1931         (internal_error_no_backtrace): Likewise.
1932         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
1933         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
1934         * diagnostic.h (struct diagnostic_context): Add fields
1935         "diagnostic_group_nesting_depth",
1936         "diagnostic_group_emission_count", "begin_group_cb",
1937         "end_group_cb".
1938         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
1939         Add auto_diagnostic_group instance(s).
1940         (find_explicit_erroneous_behavior): Likewise.
1941         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
1942         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
1943         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
1944         (gimplify_va_arg_expr): Likewise.
1945         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
1946         (HSA_SORRY_AT): Likewise.
1947         * ipa-devirt.c (compare_virtual_tables): Likewise.
1948         (warn_odr): Likewise.
1949         * multiple_target.c (expand_target_clones): Likewise.
1950         * opts-common.c (cmdline_handle_error): Likewise.
1951         * reginfo.c (globalize_reg): Likewise.
1952         * substring-locations.c (format_warning_n_va): Likewise.
1953         * tree-inline.c (expand_call_inline): Likewise.
1954         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
1955         * tree-ssa-loop-niter.c
1956         (do_warn_aggressive_loop_optimizations): Likewise.
1957         * tree-ssa-uninit.c (warn_uninit): Likewise.
1958         * tree.c (warn_deprecated_use): Likewise.
1960 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
1962         PR target/87014
1963         * config/i386/i386.md (eh_return): Always update EH return
1964         address in word_mode.
1966 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
1968         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
1969         TARGET_SPLIT_COMPLEX_ARG is defined.
1971 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1973         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
1975 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1977         PR target/86984
1978         * expr.c (expand_assignment): Assert that bitpos is positive.
1979         (store_field): Likewise
1980         (expand_expr_real_1): Make sure that bitpos is positive.
1981         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
1982         integer overflow.
1984 2018-08-20  Nathan Sidwell  <nathan@acm.org>
1986         * Makefile.in (CPP_ID_DATA_H): Delete.
1987         (CPP_INTERNAL_H): Don't add it.
1988         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
1989         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
1991 2018-08-20  Richard Biener  <rguenther@suse.de>
1993         PR tree-optimization/78655
1994         * tree-vrp.c (extract_range_from_binary_expr_1): Make
1995         pointer + offset nonnull if either operand is nonnull work.
1997 2018-08-20  Tom de Vries  <tdevries@suse.de>
1999         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
2000         unless the referenced die describes the added property using
2001         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
2002         Otherwise, add a DW_AT_location to the referenced die.
2004 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
2006         PR target/86994
2007         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
2008         register_operand when calling ix86_set_reg_reg_cost.
2009         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
2010         Set *total to 0 for operands that satisfy x86_64_immediate_operand
2011         predicate and to 1 otherwise.
2013 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
2015         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
2016         emit a diagnostic that it is not supported and reset the option.
2017         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
2018         supported and consume the option.  (ASM_FINAL_SPEC): New.
2020 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
2022         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
2023         a sentence.
2025 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
2027         C-SKY port: Documentation
2029         * doc/extend.texi (C-SKY Function Attributes): New section.
2030         * doc/invoke.texi (Option Summary): Add C-SKY options.
2031         (C-SKY Options): New section.
2032         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
2034 2018-08-17  Jojo  <jijie_rong@c-sky.com>
2035             Huibin Wang  <huibin_wang@c-sky.com>
2036             Sandra Loosemore  <sandra@codesourcery.com>
2037             Chung-Lin Tang  <cltang@codesourcery.com>
2039         C-SKY port: Backend implementation
2041         * config/csky/*: New.
2042         * common/config/csky/*: New.
2044 2018-08-17  Jojo  <jijie_rong@c-sky.com>
2045             Huibin Wang  <huibin_wang@c-sky.com>
2046             Sandra Loosemore  <sandra@codesourcery.com>
2047             Chung-Lin Tang  <cltang@codesourcery.com>
2048             Andrew Jenner  <andrew@codesourcery.com>
2050         C-SKY port: Configury
2052         * config.gcc (csky-*-*): New.
2053         * configure.ac: Add csky to targets for dwarf2 debug_line support.
2054         * configure: Regenerated.
2056 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
2058         * dump-context.h: Include "dumpfile.h".
2059         (dump_context::dump_printf_va): Convert final param from va_list
2060         to va_list *.  Convert from ATTRIBUTE_PRINTF to
2061         ATTRIBUTE_GCC_DUMP_PRINTF.
2062         (dump_context::dump_printf_loc_va): Likewise.
2063         * dumpfile.c: Include "stringpool.h".
2064         (make_item_for_dump_printf_va): Delete.
2065         (make_item_for_dump_printf): Delete.
2066         (class dump_pretty_printer): New class.
2067         (dump_pretty_printer::dump_pretty_printer): New ctor.
2068         (dump_pretty_printer::emit_items): New member function.
2069         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
2070         function.
2071         (dump_pretty_printer::emit_item): New member function.
2072         (dump_pretty_printer::stash_item): New member function.
2073         (dump_pretty_printer::format_decoder_cb): New member function.
2074         (dump_pretty_printer::decode_format): New member function.
2075         (dump_context::dump_printf_va): Reimplement in terms of
2076         dump_pretty_printer.
2077         (dump_context::dump_printf_loc_va): Convert final param from va_list
2078         to va_list *.
2079         (dump_context::begin_scope): Reimplement call to
2080         make_item_for_dump_printf.
2081         (dump_printf): Update for change to dump_printf_va.
2082         (dump_printf_loc): Likewise.
2083         (selftest::test_capture_of_dump_calls): Convert "stmt" from
2084         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
2085         with %T, %E, and %G.
2086         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
2087         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
2088         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
2089         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
2090         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
2091         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
2092         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
2093         within a dump_printf_loc call to "%wu".
2094         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
2095         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
2096         missing space after "=".
2097         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
2098         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
2099         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
2100         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
2101         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
2102         duplicate "vectorized" from message.
2104 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
2106         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
2107         polyNxK_t element's TYPE_STRING_FLAG.
2109 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
2111         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
2112         (they were unnamed before).  Fix comments.
2114 2018-08-17  Nathan Sidwell  <nathan@acm.org>
2116         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
2118 2018-08-17  Richard Biener  <rguenther@suse.de>
2120         PR tree-optimization/86841
2121         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
2123 2018-08-17  Martin Liska  <mliska@suse.cz>
2125         * common.opt: Remove Warn, Init and Report for options with
2126         Ignore/Deprecated flag. Warning is done automatically for
2127         Deprecated flags.
2128         * config/i386/i386.opt: Likewise.
2129         * config/ia64/ia64.opt: Likewise.
2130         * config/rs6000/rs6000.opt: Likewise.
2131         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
2132         Remove usage of flag_check_pointer_bounds.
2133         * lto-wrapper.c (merge_and_complain): Do not handle
2134         OPT_fcheck_pointer_bounds.
2135         (append_compiler_options): Likewise.
2136         * opt-functions.awk: Do not handle Deprecated.
2137         * optc-gen.awk: Check that Var, Report and Init are not
2138         used for an option with Ignore/Deprecated flag.
2139         * opts-common.c (decode_cmdline_option): Do not report
2140         CL_ERR_DEPRECATED.
2141         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
2142         options.
2143         * opts.h (struct cl_option): Remove cl_deprecated flag.
2144         (CL_ERR_DEPRECATED): Remove error enum value.
2146 2018-08-17  Richard Biener  <rguenther@suse.de>
2148         PR middle-end/86505
2149         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
2150         across a va-arg-pack using call adjust its return value accordingly.
2152 2018-08-16  Martin Sebor  <msebor@redhat.com>
2154         PR tree-optimization/86853
2155         * gimple-ssa-sprintf.c (struct format_result): Rename member.
2156         (struct fmtresult): Add member and initialize it in ctors.
2157         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
2158         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
2159         (format_directive): Set POSUNDER4K when MAYFAIL is set.
2160         (parse_directive): Handle %C same as %c.
2161         (sprintf_dom_walker::compute_format_length): Adjust.
2162         (is_call_safe): Adjust.
2164 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2166         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
2167         for determining how to count the elements.
2168         * builtins.h (c_strlen): Adjust prototype.
2169         * expr.c (string_constant): Add new parameter mem_size.
2170         Set *mem_size appropriately.
2171         * expr.h (string_constant): Adjust protoype.
2172         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
2173         * gimple-fold.h (get_range_strlen): Adjust prototype.
2174         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
2175         (format_string): Call get_string_length with eltsize.
2177 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
2179         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
2180         to emit the span, rather than setting it as the prefix.
2182 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
2184         * diagnostic-show-locus.c (layout::start_annotation_line): Add
2185         "margin_char" parameter, defaulting to space.  Use it in place
2186         of pp_space for the initial part of the margin.
2187         (layout::print_leading_fixits): Use '+' when filling the margin
2188         of line-insertion fix-it hints.
2190 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
2192         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
2193         Delete.
2195 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
2197         * config/rs6000/altivec.md: Don't set length attribute to the default
2198         value.
2199         * config/rs6000/darwin.md: Ditto.
2200         * config/rs6000/dfp.md: Ditto.
2201         * config/rs6000/htm.md: Ditto.
2202         * config/rs6000/rs6000.md: Ditto.
2203         * config/rs6000/sync.md: Ditto.
2204         * config/rs6000/vsx.md: Ditto.
2206 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
2208         * config/rs6000/altivec.md: Don't set length attribute to the default
2209         value, for branch instructions.
2210         * config/rs6000/darwin.md: Ditto.
2211         * config/rs6000/rs6000.md: Ditto.
2213 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
2215         * config/rs6000/rs6000.md (length): Always define as const_int 4.
2216         (unnamed conditional branch define_insn): Set length to 4 or 8
2217         depending on offset.
2218         (<bd>_<mode>): Similar, for alternative 0.
2219         (<bd>tf_<mode>): Ditto.
2221 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
2223         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
2225 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
2227         * doc/rtl.texi: Replace old RTX class names with new names.
2230 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
2232         * expmed.h (canonicalize_comparison): New declaration.
2233         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
2234         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
2235         * optabs.c (prepare_cmp_insn): Likewise.
2236         * rtl.h (unsigned_condition_p): New function which checks if a
2237         comparison operator is unsigned.
2239 2018-08-16  Nathan Sidwell  <nathan@acm.org>
2241         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
2242         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
2244 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
2246         PR target/84711
2247         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
2248         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
2249         (mov<mov>): ..this and enable unconditionally.
2251 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
2253         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
2255 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
2257         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
2258         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
2259         "Common" with "Target".
2261 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
2263         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
2264         * doc/invoke.texi (mmitigate-rop): Remove.
2265         * config/i386/i386.c: Do not include "regrename.h".
2266         (ix86_rop_should_change_byte_p, reg_encoded_number)
2267         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
2268         Remove.
2269         (ix86_reorg): Remove call to ix86_mitigate_rop.
2270         * config/i386/i386.md (attr "modrm_class"): Remove.
2271         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
2272         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
2273         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
2275 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
2277         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
2278         allow folding of mergeh() and mergel() for the float and double types.
2279         (fold_mergehl_helper): Rework to handle building a permute tree
2280         for float vectors.
2282 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
2284         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
2285         for TARGET_SSE.
2287 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
2289         * common.opt (fdiagnostics-show-labels): New option.
2290         * diagnostic-show-locus.c (class layout_range): Add field
2291         "m_label".
2292         (class layout): Add field "m_show_labels_p".
2293         (layout_range::layout_range): Add param "label" and use it to
2294         initialize m_label.
2295         (make_range): Pass in NULL for new "label" param of layout_range's
2296         ctor.
2297         (layout::layout): Initialize m_show_labels_p.
2298         (layout::maybe_add_location_range): Pass in loc_range->m_label
2299         when constructing layout_range instances.
2300         (struct line_label): New struct.
2301         (layout::print_any_labels): New member function.
2302         (layout::print_line): Call it if label-printing is enabled.
2303         (selftest::test_one_liner_labels): New test.
2304         (selftest::test_diagnostic_show_locus_one_liner): Call it.
2305         * diagnostic.c (diagnostic_initialize): Initialize
2306         context->show_labels_p.
2307         * diagnostic.h (struct diagnostic_context): Add field
2308         "show_labels_p".
2309         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2310         -fno-diagnostics-show-labels.
2311         * dwarf2out.c (gen_producer_string): Add
2312         OPT_fdiagnostics_show_labels to the ignored options.
2313         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
2314         param.
2315         (gcc_rich_location::maybe_add_expr): Likewise.
2316         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
2317         label" param, defaulting to NULL.
2318         (gcc_rich_location::add_expr): Add "label" param.
2319         (gcc_rich_location::maybe_add_expr): Likewise.
2320         (class text_range_label): New class.
2321         (class range_label_for_type_mismatch): New class.
2322         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
2323         of format_warning_va.
2324         (fmtwarn_n): Likewise for new params of format_warning_n_va.
2325         * lto-wrapper.c (merge_and_complain): Add
2326         OPT_fdiagnostics_show_labels to the "pick one setting" options.
2327         (append_compiler_options): Likewise to the dropped options.
2328         (append_diag_options): Likewise to the passed-on options.
2329         * opts.c (common_handle_option): Handle the new option.
2330         * selftest-diagnostic.c
2331         (test_diagnostic_context::test_diagnostic_context): Enable
2332         show_labels_p.
2333         * substring-locations.c: Include "gcc-rich-location.h".
2334         (format_warning_n_va): Add "fmt_label" and "param_label" params
2335         and use them as appropriate.
2336         (format_warning_va): Add "fmt_label" and "param_label" params,
2337         passing them on to format_warning_n_va.
2338         (format_warning_at_substring): Likewise.
2339         (format_warning_at_substring_n): Likewise.
2340         * substring-locations.h (format_warning_va): Add "fmt_label" and
2341         "param_label" params.
2342         (format_warning_n_va): Likewise.
2343         (format_warning_at_substring): Likewise.
2344         (format_warning_at_substring_n): Likewise.
2345         * toplev.c (general_init): Initialize global_dc->show_labels_p.
2347 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
2349         PR testsuite/86519
2350         * builtins.c (expand_builtin_memcmp): Do not expand the call
2351         when overflow is detected.
2353 2018-08-15  Martin Sebor  <msebor@redhat.com>
2355         PR tree-optimization/71625
2356         * config/aarch64/aarch64-builtins.c
2357         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
2359 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
2361         * config/s390/s390.c (s390_reorg): Remove loop.
2363 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
2365         * config/darwin.c
2366          (darwin_function_switched_text_sections): Delete.
2367         * gcc/config/darwin.h
2368          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
2370 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
2372         PR target/81685
2373         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
2374         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
2375         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
2377 2018-08-15  Martin Liska  <mliska@suse.cz>
2379         PR tree-optimization/86925
2380         * predict.c (expr_expected_value_1): When taking
2381         later predictor, assign also probability.
2382         Use fold_build2_initializer_loc in order to fold
2383         the expression in -frounding-math.
2385 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
2387         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
2388         patterns.
2389         (expand_vec_perm_1): Try the new method.
2391 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
2393         PR target/86547
2394         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
2395         Check whether lra_live_max_point is 0 before dividing.
2397 2018-08-14  Martin Sebor  <msebor@redhat.com>
2399         PR tree-optimization/86650
2400         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
2401         (vrp_prop::check_mem_ref): Same.
2403 2018-08-13  Liu Hao <lh_mouse@126.com>
2405         * pretty-print.c (eat_esc_sequence): Swap the foreground and
2406         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
2407         and clear it thereafter, as it only works for DBCS.
2409 2018-08-13  Liu Hao <lh_mouse@126.com>
2411         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
2412         handle returned by _get_osf_handle().
2414 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
2416         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
2417         for folding vec_perm.
2419 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
2421         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
2422         Add support for gimple-folding of vec_pack() and vec_unpack()
2423         intrinsics.
2425 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
2427         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
2428         vec_xst variants to the list.
2429         (rs6000_gimple_fold_builtin): Add support for folding unaligned
2430         vector loads and stores.
2432 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
2434         * config.gcc (rs6000-ibm-aix4.x): Delete.
2435         (rs6000-ibm-aix5.1): Delete.
2436         (rs6000-ibm-aix5.2): Delete.
2437         (rs6000-ibm-aix5.3): Delete.
2438         * config/rs6000/aix43.h: Delete.
2439         * config/rs6000/aix51.h: Delete.
2440         * config/rs6000/aix52.h: Delete.
2441         * config/rs6000/t-aix43: Delete.
2443 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
2445         * config/s390/s390.c (s390_decompose_constant_pool_ref):
2446         New function.
2447         (s390_decompose_address): Factor out constant pool ref
2448         decomposition.
2450 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
2452         * config/nds32/nds32-predicates.c
2453         (nds32_can_use_bclr_p): Change return type as bool.
2454         (nds32_can_use_bset_p): Ditto.
2455         (nds32_can_use_btgl_p): Ditto.
2456         (nds32_can_use_bitci_p): Ditto.
2457         * config/nds32/nds32-protos.h
2458         (nds32_can_use_bclr_p): Change declaration.
2459         (nds32_can_use_bset_p): Ditto.
2460         (nds32_can_use_btgl_p): Ditto.
2461         (nds32_can_use_bitci_p): Ditto.
2463 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
2465         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
2466         Support -msched-prolog-epilog option.
2467         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
2469 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
2471         * common/config/nds32/nds32-common.c
2472         (nds32_option_optimization_table): Enalbe -malways-align.
2474 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
2476         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
2477         extra_headers.
2478         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
2479         OPT_misr_secure_ case.
2480         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
2481         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
2482         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
2483         secure attribute.
2484         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
2485         (nds32_isr_info): New field security_level.
2486         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
2487         * config/nds32/nds32.md (return_internal): Consider critical attribute.
2488         * config/nds32/nds32.opt (misr-secure): New option.
2489         * config/nds32/nds32_init.inc: New file.
2490         * config/nds32/nds32_isr.h: New file.
2492 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
2494         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
2495         Update comment for atomic instructions.
2496         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
2497         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
2498         Remove.
2499         (atomic_loaddi): Revise fence expansion to only emit fence prior to
2500         load for __ATOMIC_SEQ_CST model.
2501         (atomic_loaddi_1): Remove float register target.
2502         (atomic_storedi): Handle CONST_INT values.
2503         (atomic_storedi_1): Remove float register source.  Add special case
2504         for zero value.
2505         (memory_barrier): New expander and insn.
2507 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
2509         PR tree-optimization/86835
2510         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
2511         new_stmt after def_gsi, make sure to insert new_square_stmt after
2512         that stmt, not 2 stmts before it.
2514 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
2516         PR target/82418
2517         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
2518         instead of SWI48.
2520 2018-08-10  Martin Liska  <mliska@suse.cz>
2522         PR target/83610
2523         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
2524         function type.
2525         * builtins.c (expand_builtin_expect_with_probability):
2526         New function.
2527         (expand_builtin_expect_with_probability): New function.
2528         (build_builtin_expect_predicate): Add new argumnet probability
2529         for BUILT_IN_EXPECT_WITH_PROBABILITY.
2530         (fold_builtin_expect):
2531         (fold_builtin_2):
2532         (fold_builtin_3):
2533         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
2534         * builtins.h (fold_builtin_expect): Set new argument.
2535         * doc/extend.texi: Document __builtin_expect_with_probability.
2536         * doc/invoke.texi: Likewise.
2537         * gimple-fold.c (gimple_fold_call): Pass new argument.
2538         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
2539         also BUILT_IN_EXPECT_WITH_PROBABILITY.
2540         * predict.c (get_predictor_value): New function.
2541         (expr_expected_value): Add new argument probability. Assume
2542         that predictor and probability are always non-null.
2543         (expr_expected_value_1): Likewise.  For __builtin_expect and
2544         __builtin_expect_with_probability set probability.  Handle
2545         combination in binary expressions.
2546         (tree_predict_by_opcode): Simplify code by simply calling
2547         get_predictor_value.
2548         (pass_strip_predict_hints::execute): Add handling of
2549         BUILT_IN_EXPECT_WITH_PROBABILITY.
2550         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
2551         new predictor.
2552         * tree.h (DECL_BUILT_IN_P): New function.
2554 2018-08-10  Martin Liska  <mliska@suse.cz>
2556         PR tree-optimization/85799
2557         * passes.def: Add argument for pass_strip_predict_hints.
2558         * predict.c (class pass_strip_predict_hints): Add new argument
2559         early_p.
2560         (strip_predictor_early): New function.
2561         (pass_strip_predict_hints::execute): Call the function to
2562         strip predictors.
2563         (strip_predict_hints): New function.
2564         * predict.def: Fix comment.
2566 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
2568         * Makefile.in: Clarify which tm.texi to copy over to assert the
2569         right to grant a GFDL license for all.
2571 2018-08-09  Jeff Law  <law@redhat.com>
2573         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
2574         unused variable.
2576 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
2578         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
2579         prototype.
2581 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
2583         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
2584         reductions for variable-length vectors.
2586 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
2588         PR other/84889
2589         * common.opt (fdiagnostics-show-line-numbers): New option.
2590         * diagnostic-show-locus.c (class layout): Add fields
2591         "m_show_line_numbers_p" and "m_linenum_width";
2592         (num_digits): New function.
2593         (test_num_digits): New function.
2594         (layout::layout): Initialize new fields.  Update m_x_offset
2595         logic to handle any left margin.
2596         (layout::print_source_line): Print line number when requested.
2597         (layout::start_annotation_line): New member function.
2598         (layout::print_annotation_line): Call it.
2599         (layout::print_leading_fixits): Likewise.
2600         (layout::print_trailing_fixits): Likewise.  Update calls to
2601         move_to_column for new parameter.
2602         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
2603         it to potentially call start_annotation_line.
2604         (layout::show_ruler): Call start_annotation_line.
2605         (selftest::test_line_numbers_multiline_range): New selftest.
2606         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
2607         and selftest::test_line_numbers_multiline_range.
2608         * diagnostic.c (diagnostic_initialize): Initialize
2609         show_line_numbers_p.
2610         * diagnostic.h (struct diagnostic_context): Add field
2611         "show_line_numbers_p".
2612         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2613         -fno-diagnostics-show-line-numbers.
2614         * dwarf2out.c (gen_producer_string): Add
2615         OPT_fdiagnostics_show_line_numbers to the ignored options.
2616         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
2617         one setting" options.
2618         (append_compiler_options): Likewise to the dropped options.
2619         (append_diag_options): Likewise to the passed-on options.
2620         * opts.c (common_handle_option): Handle the new option.
2621         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
2623 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2625         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
2626         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
2627         third argument of type "const signed char" to descriptions of
2628         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
2629         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
2630         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
2631         __builtin_bcdsub_ov functions.
2633 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
2635         PR tree-optimization/86858
2636         * tree-vect-loop.c (vect_is_simple_reduction): Restore
2637         flow_bb_inside_loop_p calls.
2639 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
2641         PR tree-optimization/86871
2642         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
2643         instead of gimple_assign_lhs.
2645 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
2647         PR target/86887
2648         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
2649         register constraint to operand 0.
2650         (add<mode>3_carryinC): Likewise.
2651         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
2653 2018-08-09  Martin Liska  <mliska@suse.cz>
2655         PR c/86895
2656         * common.opt: Remove extra line.
2658 2018-08-09  Martin Liska  <mliska@suse.cz>
2660         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
2661         at the end of a line, make first letter capital and end up
2662         a sentence with a dot.
2663         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
2664         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
2665         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
2666         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
2667         (PARAM_MAX_ISL_OPERATIONS): Likewise.
2668         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
2669         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
2670         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
2671         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
2672         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
2673         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
2674         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
2675         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
2676         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
2677         (PARAM_TREE_REASSOC_WIDTH): Likewise.
2678         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
2679         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
2680         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
2682 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
2684         PR target/84332
2685         * config/s390/s390.c (s390_option_override_internal): Reduce the
2686         stack-clash-protection-probe-interval param if it would be too big
2687         for z900.
2689 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
2691         PR target/46179
2692         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
2693         * config/m68k/m68k.c (handle_move_double): Don't call
2694         m68k_final_prescan_insn.
2695         (m68k_adjust_decorated_operand): Renamed from
2696         m68k_final_prescan_insn, remove first and third operand and
2697         simplify.
2698         (print_operand): Call it.
2699         (print_operand_address): Call it.
2701 2018-08-08  Nathan Sidwell  <nathan@acm.org>
2703         * diagnostic.c (diagnostic_report_current_module): Use
2704         linemap_included_from & linemap_included_from_linemap.
2706 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
2708         * config/aarch64/aarch64-cores.def: Add phecda core.
2709         * config/aarch64/aarch64-tune.md: Regenerate.
2710         * doc/invoke.texi: Add phecda core.
2712 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
2714         PR target/85295
2715         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
2716         definitions.
2717         * config/s390/s390.md ("movti"): Add more alternatives for
2718         constant to GPR copies.
2720 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
2722         * config/s390/s390.c: Fix whitespace damage throughout the file.
2723         * config/s390/s390.h: Likewise.
2724         * config/s390/tpf.h: Likewise.
2726 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
2728         * config/s390/s390.c (s390_loadrelative_operand_p):
2729         Remove TARGET_CPU_ZARCH usages.
2730         (s390_rtx_costs): Likewise.
2731         (s390_legitimate_constant_p): Likewise.
2732         (s390_cannot_force_const_mem): Likewise.
2733         (legitimate_reload_constant_p): Likewise.
2734         (s390_preferred_reload_class): Likewise.
2735         (legitimize_pic_address): Likewise.
2736         (legitimize_tls_address): Likewise.
2737         (s390_split_branches): Removed.
2738         (s390_add_execute): Removed.
2739         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
2740         (s390_mainpool_start): Likewise.
2741         (s390_mainpool_finish): Likewise.
2742         (s390_mainpool_cancel): Removed.
2743         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
2744         (s390_chunkify_cancel): Likewise.
2745         (s390_return_addr_rtx): Likewise.
2746         (s390_register_info): Remove split_branches_pending_p uages.
2747         (s390_optimize_register_info): Likewise.
2748         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
2749         split_branches_pending_p usages.
2750         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
2751         (s390_load_got): Likewise.
2752         (s390_expand_split_stack_prologue): Likewise.
2753         (output_asm_nops): Likewise.
2754         (s390_function_profiler): Likewise.
2755         (s390_emit_call): Likewise.
2756         (s390_conditional_register_usage): Likewise.
2757         (s390_optimize_prologue): Likewise.
2758         (s390_reorg): Remove TARGET_CPU_ZARCH and
2759         split_branches_pending_p usages.
2760         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
2761         usages.
2762         (s390_output_indirect_thunk_function): Likewise.
2763         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
2764         (TARGET_CPU_ZARCH_P): Removed.
2765         (struct machine_function): Remove split_branches_pending_p.
2766         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
2768 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
2770         * common/config/s390/s390-common.c (processor_flags_table):
2771         Remove flags.
2772         * config.gcc: Remove with_arch/with_tune support.
2773         * config/s390/2064.md: Remove cpu attribute comparisons.
2774         * config/s390/driver-native.c (s390_host_detect_local_cpu):
2775         Remove MTN.
2776         * config/s390/linux.h (ASM_SPEC):
2777         Remove -march support.
2778         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
2779         Use a table to get an arch level.
2780         * config/s390/s390-opts.h (enum processor_type):
2781         Remove enum values.
2782         * config/s390/s390.c
2783         (processor_table): Remove entries, add arch_level values.
2784         (s390_issue_rate): Remove cases.
2785         (s390_option_override): Adjust
2786         s390_option_override_internal() call.
2787         (s390_option_override_internal): Remove deprecation warning.
2788         (s390_valid_target_attribute_tree): Adjust
2789         s390_option_override_internal() call.
2790         * config/s390/s390.h (struct s390_processor):
2791         Share with s390-c.c, add arch_level field.
2792         * config/s390/s390.md:
2793         Remove occurrences in cpu attribute.
2794         * config/s390/s390.opt: Remove -march/-mtune support.
2795         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
2796         * doc/invoke.texi: Remove deprecation warning.
2798 2018-08-08  Luis Machado  <luis.machado@linaro.org>
2800         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
2801         global.
2802         (qdf24xx_tunings): Set vector cost structure to
2803         qdf24xx_vector_cost.
2805         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
2806         <register_sextend>: Set to 3.
2808 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
2810         PR target/86838
2811         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
2812         * config/aarch64/aarch64-simd.md
2813         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
2814         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
2815         (aarch64_frecpx<mode>): ...this new pattern.
2816         * config/aarch64/aarch64-simd-builtins.def: Remove comment
2817         about aarch64_frecp<FRECP:frecp_suffix><mode>.
2819 2018-08-07  Martin Liska  <mliska@suse.cz>
2821         PR middle-end/83023
2822         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
2823         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
2824         * predict.def (PRED_MALLOC_NONNULL): New predictor.
2825         * doc/extend.texi: Document that malloc attribute adds
2826         hit to compiler.
2828 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
2830         PR target/86785
2831         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2832         Define to speculation_safe_value_not_needed.
2834 2018-08-06  Jeff Law  <law@redhat.com>
2836         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
2837         the vr_values instance to cprop_into_stmt.
2838         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
2839         (cprop_operand): Also query EVRP to determine if OP is a constant.
2841 2018-08-06  Nathan Sidwell  <nathan@acm.org>
2843         * diagnostic.c (diagnostic_report_current_module): Reroll
2844         included-at loop.  Translate text.
2846 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
2848         * function-tests.c (selftest::test_expansion_to_rtl): Call
2849         free_after_compilation.
2851 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2853         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
2855 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
2857         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
2858         loops with memory block operations from getting unrolled.
2860 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
2862         PR target/86807
2863         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2864         Define to speculation_safe_value_not_needed.
2866 2018-08-06  Jeff Law  <law@redhat.com>
2868         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
2869         assert.
2871 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2873         PR target/86662
2874         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
2875         with all enabled __intN types.
2877         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
2879 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2881         * alias.c (record_set): Check for clobber high.
2882         * cfgexpand.c (expand_gimple_stmt): Likewise.
2883         * combine-stack-adj.c (single_set_for_csa): Likewise.
2884         * combine.c (find_single_use_1): Likewise.
2885         (set_nonzero_bits_and_sign_copies): Likewise.
2886         (get_combine_src_dest): Likewise.
2887         (is_parallel_of_n_reg_sets): Likewise.
2888         (try_combine): Likewise.
2889         (record_dead_and_set_regs_1): Likewise.
2890         (reg_dead_at_p_1): Likewise.
2891         (reg_dead_at_p): Likewise.
2892         * dce.c (deletable_insn_p): Likewise.
2893         (mark_nonreg_stores_1): Likewise.
2894         (mark_nonreg_stores_2): Likewise.
2895         * df-scan.c (df_find_hard_reg_defs): Likewise.
2896         (df_uses_record): Likewise.
2897         (df_get_call_refs): Likewise.
2898         * dwarf2out.c (mem_loc_descriptor): Likewise.
2899         * haifa-sched.c (haifa_classify_rtx): Likewise.
2900         * ira-build.c (create_insn_allocnos): Likewise.
2901         * ira-costs.c (scan_one_insn): Likewise.
2902         * ira.c (equiv_init_movable_p): Likewise.
2903         (rtx_moveable_p): Likewise.
2904         (interesting_dest_for_shprep): Likewise.
2905         * jump.c (mark_jump_label_1): Likewise.
2906         * postreload-gcse.c (record_opr_changes): Likewise.
2907         * postreload.c (reload_cse_simplify): Likewise.
2908         (struct reg_use): Add source expr.
2909         (reload_combine): Check for clobber high.
2910         (reload_combine_note_use): Likewise.
2911         (reload_cse_move2add): Likewise.
2912         (move2add_note_store): Likewise.
2913         * print-rtl.c (print_pattern): Likewise.
2914         * recog.c (decode_asm_operands): Likewise.
2915         (store_data_bypass_p): Likewise.
2916         (if_test_bypass_p): Likewise.
2917         * regcprop.c (kill_clobbered_value): Likewise.
2918         (kill_set_value): Likewise.
2919         * reginfo.c (reg_scan_mark_refs): Likewise.
2920         * reload1.c (maybe_fix_stack_asms): Likewise.
2921         (eliminate_regs_1): Likewise.
2922         (elimination_effects): Likewise.
2923         (mark_not_eliminable): Likewise.
2924         (scan_paradoxical_subregs): Likewise.
2925         (forget_old_reloads_1): Likewise.
2926         * reorg.c (find_end_label): Likewise.
2927         (try_merge_delay_insns): Likewise.
2928         (redundant_insn): Likewise.
2929         (own_thread_p): Likewise.
2930         (fill_simple_delay_slots): Likewise.
2931         (fill_slots_from_thread): Likewise.
2932         (dbr_schedule): Likewise.
2933         * resource.c (update_live_status): Likewise.
2934         (mark_referenced_resources): Likewise.
2935         (mark_set_resources): Likewise.
2936         * rtl.c (copy_rtx): Likewise.
2937         * rtlanal.c (reg_referenced_p): Likewise.
2938         (single_set_2): Likewise.
2939         (noop_move_p): Likewise.
2940         (note_stores): Likewise.
2941         * sched-deps.c (sched_analyze_reg): Likewise.
2942         (sched_analyze_insn): Likewise.
2944 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2946         * cse.c (invalidate_reg): New function extracted from...
2947         (invalidate): ...here.
2948         (canonicalize_insn): Check for clobber high.
2949         (invalidate_from_clobbers): invalidate clobber highs.
2950         (invalidate_from_sets_and_clobbers): Likewise.
2951         (count_reg_usage): Check for clobber high.
2952         (insn_live_p): Likewise.
2953         * cselib.c (cselib_expand_value_rtx_1):Likewise.
2954         (cselib_invalidate_regno): Check for clobber in setter.
2955         (cselib_invalidate_rtx): Pass through setter.
2956         (cselib_invalidate_rtx_note_stores):
2957         (cselib_process_insn): Check for clobber high.
2958         * cselib.h (cselib_invalidate_rtx): Add operand.
2960 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2962         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
2963         (mark_not_eliminable): Likewise.
2964         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
2965         * lra-lives.c (process_bb_lives): Check for clobber high.
2966         * lra.c (new_insn_reg): Remember clobber highs.
2967         (collect_non_operand_hard_regs): Check for clobber high.
2968         (lra_set_insn_recog_data): Likewise.
2969         (add_regs_to_insn_regno_info): Likewise.
2970         (lra_update_insn_regno_info): Likewise.
2972 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2974         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
2975         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
2977 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2979         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
2980         (copy_insn_1): Likewise.
2981         (gen_hard_reg_clobber_high): New gen function.
2982         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
2983         * genemit.c (gen_exp): Likewise.
2984         (gen_emit_seq): Pass through info.
2985         (gen_insn): Check for CLOBBER_HIGH.
2986         (gen_expand): Pass through info.
2987         (gen_split): Likewise.
2988         (output_add_clobbers): Likewise.
2989         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
2990         (remove_clobbers): Likewise.
2991         * rtl.h (gen_hard_reg_clobber_high): New declaration.
2993 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2995         * doc/rtl.texi (clobber_high): Add.
2996         (parallel): Add in clobber high
2997         * rtl.c (rtl_check_failed_code3): Add function.
2998         * rtl.def (CLOBBER_HIGH): Add expression.
2999         * rtl.h (RTL_CHECKC3): Add macro.
3000         (rtl_check_failed_code3): Add declaration.
3001         (XC3EXP): Add macro.
3003 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
3005         PR target/86386
3006         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
3007         cfun->machine->max_used_stack_alignment if needed.
3009 2018-08-04  Martin Sebor  <msebor@redhat.com>
3011         PR tree-optimization/86571
3012         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
3013         NaN output to 4.
3015 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
3017         PR target/86799
3018         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3019         Define.
3021 2018-08-03  Jeff Law  <law@redhat.com>
3023         PR target/86795
3024         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3025         Define to speculation_safe_value_not_needed.
3027 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
3029         * doc/gcov.texi (-x): Remove duplicate "to".
3030         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
3031         (-Wif-not-aligned): Remove duplicate "is".
3032         (-flto): Remove duplicate "the".
3033         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
3034         duplicate "v5.00.b".
3035         (MSP430 Options): Remove duplicate "and" from the description
3036         of "-mgprel-sec=regexp".
3037         (x86 Options): Remove duplicate copies of "vmldLog102" and
3038         vmlsLog104 from description of "-mveclibabi=type".
3040 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
3042         * internal-fn.h (first_commutative_argument): Declare.
3043         * internal-fn.c (first_commutative_argument): New function.
3044         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
3045         restrictions for pattern statements.  Use first_commutative_argument
3046         to look for commutative operands in calls to internal functions.
3048 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
3050         * Makefile.in (wide-int-range.o): New.
3051         * tree-vrp.c: Move all the wide_int_* functions to...
3052         * wide-int-range.cc: ...here.
3053         * tree-vrp.h: Move all the wide_int_* prototypes to...
3054         * wide-int-range.h: ...here.
3056 2018-08-03  Tom de Vries  <tdevries@suse.de>
3058         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
3059         UI_NONE.
3060         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
3061         * except.c (output_function_exception_table): Do early exit if
3062         targetm_common.except_unwind_info (&global_options) == UI_NONE.
3064 2018-08-03  Martin Liska  <mliska@suse.cz>
3066         * predict.c (dump_prediction): Change to 2 digits
3067         in fraction part.
3069 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
3071         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
3072         neon_dup_q to...
3073         (falkor_am_1_gtov_gtov): ... a new insn reservation.
3075 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
3077         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
3078         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
3079         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
3080         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
3081         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
3083 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
3085         * diagnostic-show-locus.c (diagnostic_show_locus): Use
3086         pp_take_prefix when saving the existing prefix.
3087         * diagnostic.c (diagnostic_append_note): Likewise.
3088         * langhooks.c (lhd_print_error_function): Likewise.
3089         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
3090         param's type.  Free the existing prefix.
3091         (pp_take_prefix): New function.
3092         (pretty_printer::pretty_printer): Drop the prefix parameter.
3093         Rename the length parameter to match the comment.
3094         (pretty_printer::~pretty_printer): Free the prefix.
3095         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
3096         parameter.
3097         (struct pretty_printer): Drop the "const" from "prefix" field's
3098         type and clarify memory management.
3099         (pp_set_prefix): Drop the "const" from the 2nd param.
3100         (pp_take_prefix): New decl.
3102 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
3104         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
3105         for word_mode_ok here instead of passing as argument.
3106         (expand_block_compare): Change select_block_compare_mode() call.
3107         (expand_strncmp_gpr_sequence): New function.
3108         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
3110 2018-08-02  Jeff Law  <law@redhat.com>
3112         PR target/86790
3113         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3114         Define to speculation_safe_value_not_needed.
3116         PR target/86784
3117         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3118         Define to speculation_safe_value_not_needed.
3120 2018-08-02  Tom de Vries  <tdevries@suse.de>
3122         PR target/86660
3123         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
3124         function.  Return UI_TARGET unconditionally.
3125         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
3126         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
3128 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
3130         * genemit.c (print_overload_test): Fix typo.
3132 2018-08-02  Richard Biener  <rguenther@suse.de>
3134         PR tree-optimization/86816
3135         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
3136         which checks for value availability before querying it.
3137         (gvn_uses_equal): Use it.
3138         (same_succ_hash): Likewise.
3139         (gimple_equal_p): Likewise.
3141 2018-08-02  Nick Clifton  <nickc@redhat.com>
3143         PR target/86813
3144         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3145         Define to speculation_safe_value_not_needed.
3147         PR target/86810
3148         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3149         Define to speculation_safe_value_not_needed.
3151         PR target/86810
3152         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3153         Define to speculation_safe_value_not_needed.
3155         PR target/86803
3156         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3157         Define to speculation_safe_value_not_needed.
3159         PR target/86797
3160         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3161         Define to speculation_safe_value_not_needed.
3163         PR target/86791
3164         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3165         Define to speculation_safe_value_not_needed.
3167         PR target/86789
3168         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3169         Define to speculation_safe_value_not_needed.
3171         PR target/86787
3172         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3173         Define to speculation_safe_value_not_needed.
3175         PR target/86782
3176         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3177         speculation_safe_value_not_needed.
3179         PR target/86781
3180         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
3181         to speculation_safe_value_not_needed.
3183 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
3185         * doc/md.texi: Expand the documentation of instruction names
3186         to mention port-local uses.  Document '@' in pattern names.
3187         * read-md.h (overloaded_instance, overloaded_name): New structs.
3188         (mapping): Declare.
3189         (md_reader::handle_overloaded_name): New member function.
3190         (md_reader::get_overloads): Likewise.
3191         (md_reader::m_first_overload): New member variable.
3192         (md_reader::m_next_overload_ptr): Likewise.
3193         (md_reader::m_overloads_htab): Likewise.
3194         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
3195         m_next_overload_ptr and m_overloads_htab.
3196         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
3197         (get_mode_token, get_code_token, get_int_token): New functions.
3198         (map_attr_string): Add an optional argument that passes back
3199         the associated iterator.
3200         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
3201         (md_reader::handle_overloaded_name, add_overload_instance): New
3202         functions.
3203         (apply_iterators): Handle '@' names.  Report an error if '@'
3204         is used without iterators.
3205         (initialize_iterators): Initialize the new iterator_group fields.
3206         * genopinit.c (handle_overloaded_code_for)
3207         (handle_overloaded_gen): New functions.
3208         (main): Use them to print declarations of maybe_code_for_* and
3209         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
3210         * genemit.c (print_overload_arguments, print_overload_test)
3211         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
3212         (main): Use it to print definitions of maybe_code_for_* and
3213         maybe_gen_* functions.
3214         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
3215         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
3216         instead of explicit mode checks.
3217         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
3218         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
3219         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
3220         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
3221         (aarch64_expand_compare_and_swap): Likewise
3222         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
3223         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
3224         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
3225         (aarch64_constant_pool_reload_icode): Delete.
3226         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
3227         instead of aarch64_constant_pool_reload_icode.  Use
3228         code_for_aarch64_reload_mov instead of explicit mode checks.
3229         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
3230         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
3231         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
3232         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
3233         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
3234         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
3235         (aarch64_atomic_load_op_code): Delete.
3236         (aarch64_emit_atomic_load_op): Likewise.
3237         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
3238         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
3239         instead of aarch64_emit_atomic_load_op.
3240         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
3241         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
3242         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
3243         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
3244         character before the pattern name.
3245         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
3246         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
3247         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
3248         (aarch64_frecps<mode>): Likewise.
3249         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
3250         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
3251         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
3252         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
3253         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
3255 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
3257         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
3258         Allow HFmode constants if TARGET_FP_F16INST.
3260 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
3262         PR target/86014
3263         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
3264         No longer check last store for clobber of address register.
3266 2018-08-02  Martin Liska  <mliska@suse.cz>
3268         PR gcov-profile/86817
3269         * gcov.c (process_all_functions): New function.
3270         (main): Call it.
3271         (process_file): Move functions processing to
3272         process_all_functions.
3274 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
3276         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
3277         "const" to the "gimple *" and "rtx_insn *" parameters.
3278         * dumpfile.h (dump_user_location_t::dump_user_location_t):
3279         Likewise.
3280         (dump_location_t::dump_location_t): Likewise.
3282 2018-08-01  Martin Sebor  <msebor@redhat.com>
3284         PR tree-optimization/86650
3285         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
3286         rather than a "gcall *".  Directly pass the data of interest
3287         to percent_K_format, rather than building a temporary CALL_EXPR
3288         to hold it.
3289         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
3290         (gimple_fold_builtin_strncat): Adjust.
3291         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
3292         gcall* argument with gimple*.
3293         * gimple-ssa-warn-restrict.c (check_call): Same.
3294         (wrestrict_dom_walker::before_dom_children): Same.
3295         (builtin_access::builtin_access): Same.
3296         (check_bounds_or_overlap): Same
3297         (maybe_diag_overlap): Same.
3298         (maybe_diag_offset_bounds): Same.
3299         * tree-diagnostic.c (default_tree_printer): Move usage of
3300         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
3301         to this callsite.
3302         * tree-pretty-print.c (percent_K_format): Add argument.
3303         * tree-pretty-print.h: Add argument.
3304         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
3305         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
3306         (maybe_diag_stxncpy_trunc): Same.
3307         (handle_builtin_stxncpy): Same.
3308         (handle_builtin_strcat): Same.
3310 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3312         * match.pd: Optimise pointer range checks.
3314 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3316         PR tree-optimization/86758
3317         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
3318         to remove pattern statements.
3320 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3322         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
3323         result of dfs_enumerate_from when constructing stmt_vec_infos,
3324         instead of additionally calling get_loop_body.
3326 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3328         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
3329         parameter.
3330         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
3331         When creating an iv, assert that the step is not known to be zero.
3332         (vect_setup_realignment): Update call accordingly.
3333         * tree-vect-stmts.c (vectorizable_store): Likewise.
3334         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
3336 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3338         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
3339         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
3340         (vectorizable_reduction): Likewise.
3341         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3342         (vect_detect_hybrid_slp_stmts): Likewise.
3343         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3345 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
3347         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
3348         (wide_int_set_zero_nonzero_bits): ...this.
3349         (zero_nonzero_bits_from_vr): Rename to...
3350         (vrp_set_zero_nonzero_bits): ...this.
3351         (extract_range_from_multiplicative_op_1): Abstract wide int
3352         code...
3353         (wide_int_range_multiplicative_op): ...here.
3354         (extract_range_from_binary_expr_1): Extract wide int binary
3355         operations into their own functions.
3356         (wide_int_range_lshift): New.
3357         (wide_int_range_can_optimize_bit_op): New.
3358         (wide_int_range_shift_undefined_p): New.
3359         (wide_int_range_bit_xor): New.
3360         (wide_int_range_bit_ior): New.
3361         (wide_int_range_bit_and): New.
3362         (wide_int_range_trunc_mod): New.
3363         (extract_range_into_wide_ints): New.
3364         (vrp_shift_undefined_p): New.
3365         (extract_range_from_multiplicative_op): New.
3366         (vrp_can_optimize_bit_op): New.
3367         * tree-vrp.h (value_range::dump): New.
3368         (wide_int_range_multiplicative_op): New.
3369         (wide_int_range_lshift):New.
3370         (wide_int_range_shift_undefined_p): New.
3371         (wide_int_range_bit_xor): New.
3372         (wide_int_range_bit_ior): New.
3373         (wide_int_range_bit_and): New.
3374         (wide_int_range_trunc_mod): New.
3375         (zero_nonzero_bits_from_bounds): Rename to...
3376         (wide_int_set_zero_nonzero_bits): ...this.
3377         (zero_nonzero_bits_from_vr): Rename to...
3378         (vrp_set_zero_nonzero_bits): ...this.
3379         (range_easy_mask_min_max): Rename to...
3380         (wide_int_range_can_optimize_bit_op): this.
3381         * vr-values.c (simplify_bit_ops_using_ranges): Rename
3382         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
3384 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3386         * tree-vectorizer.h (vect_orig_stmt): New function.
3387         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
3388         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
3389         (vect_create_epilog_for_reduction): Likewise.
3390         (vectorizable_live_operation): Likewise.
3391         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
3392         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
3393         * tree-vect-stmts.c (vectorizable_call): Likewise.
3394         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
3396 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3398         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
3399         argument.
3400         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
3401         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
3402         (vect_transform_loop): Likewise.
3403         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3405 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3407         * tree-vectorizer.h (vect_schedule_slp): Return void.
3408         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3409         (vect_schedule_slp): Likewise.
3411 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3413         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
3414         argument.
3415         (vect_transform_loop): Update calls accordingly.  Schedule SLP
3416         instances before the main loop, if any exist.
3418 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3420         PR tree-optimization/86749
3421         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
3422         If the lhs is used in a COND_EXPR, check that it is being used
3423         as the "then" or "else" value.
3425 2018-08-01  Tom de Vries  <tdevries@suse.de>
3427         PR target/86800
3428         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3429         speculation_safe_value_not_needed.
3431 2018-08-01  Richard Biener  <rguenther@suse.de>
3433         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
3434         as base and offset.
3436 2018-08-01  Martin Liska  <mliska@suse.cz>
3438         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
3439         format how successful transformation is dumped.
3440         (gimple_mod_pow2_value_transform): Likewise.
3441         (gimple_mod_subtract_transform): Likewise.
3442         (gimple_stringops_transform): Likewise.
3444 2018-08-01  Martin Liska  <mliska@suse.cz>
3446         PR value-prof/35543
3447         * value-prof.c (interesting_stringop_to_profile_p):
3448         Simplify the code and add BUILT_IN_MEMMOVE.
3449         (gimple_stringops_transform): Likewise.
3451 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
3453         * config/aarch64/aarch64-simd.md
3454         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
3455         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
3456         use GPI iterator instead of SI mode.
3458 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
3460         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
3461         rs6000_speculation_barrier.
3462         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
3463         new barrier pattern name.
3465 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
3467         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
3468         (speculation_barrier): New insn.
3470 2018-08-01  Richard Biener  <rguenther@suse.de>
3472         PR bootstrap/86724
3473         * graphite.h: Include isl/id.h and isl/space.h to allow build
3474         with ISL 0.20.
3476 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
3478         PR target/86651
3479         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
3480         mode for COFF targets.
3481         * defaults.h (TARGET_COFF): Define.
3482         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
3483         TARGET_COFF): Define.
3484         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
3485         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
3486         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
3488 2018-07-31  Alexandre Oliva <oliva@adacore.com>
3490         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
3491         * gimple-streamer-out.c (output_bb): Save it.
3492         * lto-streamer-in.c (input_struct_function_base): Restore
3493         instance discriminator if available.  Create map on demand.
3494         * lto-streamer-out.c (output_struct_function_base): Save it if
3495         available.
3496         * final.c (decl_to_instance_map): Document LTO strategy.
3498 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
3499             Olivier Hainque  <hainque@adacore.com>
3501         * debug.h (decl_to_instance_map_t): New type.
3502         (decl_to_instance_map): Declare.
3503         (maybe_create_decl_to_instance_map): New inline function.
3504         * final.c (bb_discriminator, last_bb_discriminator): New statics,
3505         to track basic block discriminators.
3506         (final_start_function_1): Initialize them.
3507         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
3508         bb_discriminator.
3509         (decl_to_instance_map): New variable.
3510         (map_decl_to_instance, maybe_set_discriminator): New functions.
3511         (notice_source_line): Set discriminator.
3513 2018-07-31  Ian Lance Taylor  <iant@golang.org>
3515         * targhooks.c (default_have_speculation_safe_value): Add
3516         ATTRIBUTE_UNUSED.
3518 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
3520         * dump-context.h: Include "pretty-print.h".
3521         (dump_context::refresh_dumps_are_enabled): New decl.
3522         (dump_context::emit_item): New decl.
3523         (class dump_context): Add fields "m_test_pp" and
3524         "m_test_pp_flags".
3525         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3526         (temp_dump_context::get_dumped_text): New decl.
3527         (class temp_dump_context): Add field "m_pp".
3528         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
3529         (dump_context::refresh_dumps_are_enabled): ...and add a test for
3530         m_test_pp.
3531         (set_dump_file): Update for above change.
3532         (set_alt_dump_file): Likewise.
3533         (dump_loc): New overload, taking a pretty_printer *.
3534         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
3535         to any test pretty-printer.
3536         (make_item_for_dump_gimple_stmt): New function, adapted from
3537         optinfo::add_gimple_stmt.
3538         (dump_context::dump_gimple_stmt): Call it, and use the result,
3539         eliminating the direct usage of dump_file and alt_dump_file in
3540         favor of indirectly using them via emit_item.
3541         (make_item_for_dump_gimple_expr): New function, adapted from
3542         optinfo::add_gimple_expr.
3543         (dump_context::dump_gimple_expr): Call it, and use the result,
3544         eliminating the direct usage of dump_file and alt_dump_file in
3545         favor of indirectly using them via emit_item.
3546         (make_item_for_dump_generic_expr): New function, adapted from
3547         optinfo::add_tree.
3548         (dump_context::dump_generic_expr): Call it, and use the result,
3549         eliminating the direct usage of dump_file and alt_dump_file in
3550         favor of indirectly using them via emit_item.
3551         (make_item_for_dump_printf_va): New function, adapted from
3552         optinfo::add_printf_va.
3553         (make_item_for_dump_printf): New function.
3554         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
3555         and use the result, eliminating the direct usage of dump_file and
3556         alt_dump_file in favor of indirectly using them via emit_item.
3557         (make_item_for_dump_dec): New function.
3558         (dump_context::dump_dec): Call it, and use the result,
3559         eliminating the direct usage of dump_file and alt_dump_file in
3560         favor of indirectly using them via emit_item.
3561         (make_item_for_dump_symtab_node): New function, adapted from
3562         optinfo::add_symtab_node.
3563         (dump_context::dump_symtab_node): Call it, and use the result,
3564         eliminating the direct usage of dump_file and alt_dump_file in
3565         favor of indirectly using them via emit_item.
3566         (dump_context::begin_scope): Reimplement, avoiding direct usage
3567         of dump_file and alt_dump_file in favor of indirectly using them
3568         via emit_item.
3569         (dump_context::emit_item): New member function.
3570         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3571         Set up test pretty-printer on the underlying context.  Call
3572         refresh_dumps_are_enabled.
3573         (temp_dump_context::~temp_dump_context): Call
3574         refresh_dumps_are_enabled.
3575         (temp_dump_context::get_dumped_text): New member function.
3576         (selftest::verify_dumped_text): New function.
3577         (ASSERT_DUMPED_TEXT_EQ): New macro.
3578         (selftest::test_capture_of_dump_calls): Run all tests twice, with
3579         and then without optinfo enabled.  Add uses of
3580         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
3581         * dumpfile.h: Update comment for the dump_* API.
3582         * optinfo-emit-json.cc
3583         (selftest::test_building_json_from_dump_calls): Update for new
3584         param for temp_dump_context ctor.
3585         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
3586         and "m_owned" field.
3587         (optinfo_item::~optinfo_item): Likewise.
3588         (optinfo::add_item): New member function.
3589         (optinfo::emit): Update comment.
3590         (optinfo::add_string): Delete.
3591         (optinfo::add_printf): Delete.
3592         (optinfo::add_printf_va): Delete.
3593         (optinfo::add_gimple_stmt): Delete.
3594         (optinfo::add_gimple_expr): Delete.
3595         (optinfo::add_tree): Delete.
3596         (optinfo::add_symtab_node): Delete.
3597         (optinfo::add_dec): Delete.
3598         * optinfo.h (class dump_context): New forward decl.
3599         (optinfo::add_item): New decl.
3600         (optinfo::add_string): Delete.
3601         (optinfo::add_printf): Delete.
3602         (optinfo::add_printf_va): Delete.
3603         (optinfo::add_gimple_stmt): Delete.
3604         (optinfo::add_gimple_expr): Delete.
3605         (optinfo::add_tree): Delete.
3606         (optinfo::add_symtab_node): Delete.
3607         (optinfo::add_dec): Delete.
3608         (optinfo::add_poly_int): Delete.
3609         (optinfo_item::optinfo_item): Remove "owned" param.
3610         (class optinfo_item): Remove field "m_owned".
3612 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
3614         PR middle-end/86705
3615         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
3616         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
3617         requested variable alignment.
3618         (expand_one_ssa_partition): Likewise.
3619         (expand_one_var): Likewise.
3621 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3623         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3624         to speculation_safe_value_not_needed.
3626 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3628         * targhooks.h (speculation_safe_value_not_needed): New prototype.
3629         * targhooks.c (speculation_safe_value_not_needed): New function.
3630         * target.def (have_speculation_safe_value): Update documentation.
3631         * doc/tm.texi: Regenerated.
3633 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3635         * config/aarch64/iterators.md (ALLI_TI): New iterator.
3636         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
3637         expand.
3638         (despeculate_copy<ALLI:mode>_insn): New insn.
3639         (despeculate_copyti_insn): New insn.
3640         (despeculate_simple<ALLI:mode>): New insn
3641         (despeculate_simpleti): New insn.
3642         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
3643         function.
3644         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
3645         aarch64_speculation_safe_value.
3646         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
3648 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3650         * config/aarch64/aarch64-speculation.cc: New file.
3651         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
3652         before pass_reorder_blocks.
3653         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
3654         prototype.
3655         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
3656         X14 and X15 when tracking speculation.
3657         * config/aarch64/aarch64.md (register name constants): Add
3658         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
3659         (unspec): Add UNSPEC_SPECULATION_TRACKER.
3660         (speculation_barrier): New insn attribute.
3661         (cmp<mode>): Allow SP in comparisons.
3662         (speculation_tracker): New insn.
3663         (speculation_barrier): Add speculation_barrier attribute.
3664         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
3665         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
3666         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
3668 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3670         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
3671         aarch64_track_speculation is true.
3672         (tb<optab><mode>1): Likewise.
3673         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
3674         generate CB[N]Z when tracking speculation.
3675         (aarch64_split_compare_and_swap): Likewise.
3676         (aarch64_split_atomic_op): Likewise.
3678 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3680         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
3682 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3684         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
3685         (speculation_barrier): New insn.
3687 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3689         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
3690         * config/arm/arm.md (speculation_barrier): New expand.
3691         (speculation_barrier_insn): New pattern.
3693 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3695         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
3696         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
3697         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
3698         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
3699         list.
3700         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
3701         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
3702         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
3703         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
3704         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
3705         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
3706         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
3707         * builtins.c (expand_speculation_safe_value): New function.
3708         (expand_builtin): Call it.
3709         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
3710         * doc/extend.texi: Document __builtin_speculation_safe_value.
3711         * doc/md.texi: Document "speculation_barrier" pattern.
3712         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
3713         TARGET_HAVE_SPECULATION_SAFE_VALUE.
3714         * doc/tm.texi: Regenerated.
3715         * target.def (have_speculation_safe_value, speculation_safe_value): New
3716         hooks.
3717         * targhooks.c (default_have_speculation_safe_value): New function.
3718         (default_speculation_safe_value): New function.
3719         * targhooks.h (default_have_speculation_safe_value): Add prototype.
3720         (default_speculation_safe_value): Add prototype.
3722 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
3724         * dump-context.h (dump_context::dump_loc): New decl.
3725         * dumpfile.c (dump_context::dump_loc): New member function.
3726         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
3727         and dump_gimple_stmt.
3728         (dump_context::dump_gimple_expr_loc): Likewise, using
3729         dump_gimple_expr.
3730         (dump_context::dump_generic_expr_loc): Likewise, using
3731         dump_generic_expr.
3732         (dump_context::dump_printf_loc_va): Likewise, using
3733         dump_printf_va.
3734         (dump_context::begin_scope): Explicitly using the global function
3735         "dump_loc", rather than the member function.
3737 2018-07-31  Martin Sebor  <msebor@redhat.com>
3739         PR tree-optimization/86741
3740         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
3742 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
3744         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
3745         depend on whether prefetch instructions will be emitted or not.
3746         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
3747         will be emitted or not.
3748         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
3749         (TARGET_SETMEM_PFD): New macros.
3751 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3753         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
3754         (NULL_STMT_VEC_INFO): Delete.
3755         (stmt_vec_info::operator*): Likewise.
3756         (stmt_vec_info::operator gimple *): Likewise.
3757         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
3758         of NULL_STMT_VEC_INFO.
3759         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3760         (vect_reassociating_reduction_p): Likewise.
3761         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
3762         (vectorizable_store): Likewise.
3763         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
3764         (vec_info::free_stmt_vec_infos): Likewise.
3766 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3768         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
3769         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
3771 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3773         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
3774         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3775         (vec_info::free_stmt_vec_info): New private member functions.
3776         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
3777         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
3778         * tree-parloops.c (gather_scalar_reductions): Remove calls to
3779         set_stmt_vec_info_vec and free_stmt_vec_infos.
3780         * tree-vect-loop.c (_loop_vec_info): Remove call to
3781         set_stmt_vec_info_vec.
3782         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
3783         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
3784         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
3785         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3786         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
3787         assignments in {vec_info::,}new_stmt_vec_info that are redundant
3788         with the clearing in the xcalloc.
3789         (stmt_vec_info_vec): Delete.
3790         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
3791         (vectorize_loops): Likewise.
3792         (vec_info::~vec_info): Remove argument from call to
3793         free_stmt_vec_infos.
3794         (vec_info::add_stmt): Remove vinfo argument from call to
3795         new_stmt_vec_info.
3797 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3799         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
3800         rather than a gimple stmt.
3801         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
3802         information for pattern statements when passed the original
3803         statement; instead wait to be passed the pattern statement itself.
3804         Don't call set_vinfo_for_stmt here.
3805         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
3806         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
3807         stmt_vec_infos here.
3808         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
3809         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
3810         stmt_vec_infos entry.
3812 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3814         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
3815         * tree-vectorizer.c (vec_info::replace_stmt): New function.
3816         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
3817         * tree-vect-stmts.c (vectorizable_call): Likewise.
3818         (vectorizable_simd_clone_call): Likewise.
3820 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3822         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
3823         * tree-vectorizer.c (vec_info::remove_stmt): New function.
3824         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
3825         * tree-vect-loop.c (vect_transform_loop): Likewise.
3826         * tree-vect-slp.c (vect_schedule_slp): Likewise.
3827         * tree-vect-stmts.c (vect_remove_stores): Likewise.
3829 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3831         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
3832         (vect_dr_stmt): Delete.
3833         * tree-vectorizer.c (vec_info::lookup_dr): New function.
3834         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
3835         of DR_VECT_AUX.
3836         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
3837         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
3838         (vect_verify_datarefs_alignment, vect_peeling_supportable)
3839         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3840         (vect_analyze_data_refs): Likewise.
3841         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
3842         argument.
3843         (vect_find_same_alignment_drs): Likewise.
3844         (vect_slp_analyze_node_dependences): Update calls accordingly.
3845         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
3846         instead of DR_VECT_AUX.
3847         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
3848         of a vector data references.  Use vec_info::lookup_dr instead of
3849         DR_VECT_AUX.
3850         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
3851         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
3852         instead of DR_VECT_AUX.
3854 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3856         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
3857         dr_vec_info.
3858         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
3859         accordingly.
3860         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3861         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3862         (vect_gen_prolog_loop_niters): Likewise.
3864 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3866         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
3867         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
3868         (vect_known_alignment_in_bytes, vect_dr_behavior)
3869         (vect_get_scalar_dr_size): Take references as dr_vec_infos
3870         instead of data_references.  Update calls to other routines for
3871         which the same change has been made.
3872         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
3873         dr_vec_infos instead of stmt_vec_infos.
3874         (vect_analyze_data_ref_dependence): Update call accordingly.
3875         (vect_slp_analyze_data_ref_dependence)
3876         (vect_record_base_alignments): Use DR_VECT_AUX.
3877         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
3878         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
3879         (vector_alignment_reachable_p, vect_get_data_access_cost)
3880         (vect_peeling_supportable, vect_analyze_group_access_1)
3881         (vect_analyze_group_access, vect_analyze_data_ref_access)
3882         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
3883         (vect_compile_time_alias, vect_small_gap_p)
3884         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
3885         (vect_supportable_dr_alignment): Take references as dr_vec_infos
3886         instead of data_references.  Update calls to other routines for
3887         which the same change has been made.
3888         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
3889         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
3890         (vect_slp_analyze_and_verify_node_alignment)
3891         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3892         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3893         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
3894         above changes.
3895         (_vect_peel_info::dr): Replace with...
3896         (_vect_peel_info::dr_info): ...this new field.
3897         (vect_peeling_hash_get_most_frequent)
3898         (vect_peeling_hash_choose_best_peeling): Update accordingly.
3899         (vect_peeling_hash_get_lowest_cost):
3900         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
3901         routines for which the same change has been made.
3902         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
3903         data_reference.
3904         * tree-vect-loop-manip.c (get_misalign_in_elems)
3905         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
3906         above changes.
3907         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3908         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
3909         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
3910         (get_group_load_store_type, get_negative_load_store_type)
3911         (vect_get_data_ptr_increment, vectorizable_store)
3912         (vectorizable_load): Likewise.
3913         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
3914         Update calls to other routines for which the same change has been made.
3916 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3918         * tree-vectorizer.h (vec_info::move_dr): New member function.
3919         (dataref_aux): Rename to...
3920         (dr_vec_info): ...this and add "dr" and "stmt" fields.
3921         (_stmt_vec_info::dr_aux): Update accordingly.
3922         (_stmt_vec_info::data_ref_info): Delete.
3923         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
3924         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
3925         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
3926         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
3927         of data_ref.
3928         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
3929         (STMT_VINFO_DR_INFO): New macro.
3930         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
3931         (set_dr_misalignment): Update after rename of dataref_aux.
3932         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
3933         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
3934         initialization of STMT_VINFO_DATA_REF.
3935         * tree-vectorizer.c (vec_info::move_dr): New function.
3936         * tree-vect-patterns.c (vect_recog_bool_pattern)
3937         (vect_recog_mask_conversion_pattern)
3938         (vect_recog_gather_scatter_pattern): Use it.
3939         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
3940         the "dr" and "stmt" fields of dr_vec_info instead of
3941         STMT_VINFO_DATA_REF.
3943 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3945         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
3946         (is_pattern_stmt_p): Use it.
3947         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
3948         on pattern statements.
3950 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3952         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
3953         original stmt as a stmt_vec_info rather than a gimple stmt.
3954         (vect_pattern_recog_1): Take the statement directly as a
3955         stmt_vec_info, rather than via a gimple_stmt_iterator.
3956         Update call to vect_mark_pattern_stmts.
3957         (vect_pattern_recog): Update calls accordingly.
3959 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3961         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
3962         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
3963         a vect_def_type for the first argument.
3964         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
3965         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
3966         operand if it isn't defined by a vectorized statement.
3967         (vect_build_gather_load_calls): Remove the mask_dt argument and
3968         update calls to vect_get_vec_def_for_stmt_copy.
3969         (vectorizable_bswap): Likewise the dt argument.
3970         (vectorizable_call): Update calls to vectorizable_bswap and
3971         vect_get_vec_def_for_stmt_copy.
3972         (vectorizable_simd_clone_call, vectorizable_assignment)
3973         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
3974         (vectorizable_comparison): Update calls to
3975         vect_get_vec_def_for_stmt_copy.
3976         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
3977         vect_is_simple_use.
3978         (vect_get_loop_based_defs): Remove dt argument and update call
3979         to vect_get_vec_def_for_stmt_copy.
3980         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
3981         and vect_get_vec_def_for_stmt_copy.
3982         (vectorizable_load): Update calls to vect_build_gather_load_calls
3983         and vect_get_vec_def_for_stmt_copy.
3984         * tree-vect-loop.c (vect_create_epilog_for_reduction)
3985         (vectorizable_reduction, vectorizable_live_operation): Update calls
3986         to vect_get_vec_def_for_stmt_copy.
3988 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3990         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
3991         and gimple stmt arguments with a stmt_vec_info.
3992         (vect_record_base_alignments): Update calls accordingly.
3993         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
3994         and gimple stmt arguments with a stmt_vec_info.
3995         (vect_build_slp_tree_1): Remove vinfo argument and update call
3996         to vect_record_max_nunits.
3997         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
3998         and vect_record_max_nunits.
4000 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4002         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
4003         file and take a stmt_vec_info instead of a gimple stmt.
4004         (supportable_widening_operation, vect_finish_replace_stmt)
4005         (vect_finish_stmt_generation, vect_get_store_rhs)
4006         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
4007         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
4008         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
4009         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
4010         (vect_create_data_ref_ptr, bump_vector_ptr)
4011         (vect_permute_store_chain, vect_setup_realignment)
4012         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
4013         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
4014         (vectorizable_reduction, vectorizable_induction)
4015         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
4016         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
4017         than gimple stmts as arguments.
4018         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
4019         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
4020         (can_group_stmts_p, vect_check_gather_scatter)
4021         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
4022         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
4023         (vect_permute_load_chain, vect_shift_permute_load_chain)
4024         (vect_transform_grouped_load)
4025         (vect_record_grouped_load_vectors): Likewise.
4026         * tree-vect-loop.c (vect_fixup_reduc_chain)
4027         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
4028         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
4029         (vectorizable_reduction, vectorizable_induction)
4030         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
4031         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
4032         (vect_get_load_store_mask): Likewise.
4033         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
4034         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
4035         * tree-vect-stmts.c (vect_mark_relevant)
4036         (is_simple_and_all_uses_invariant)
4037         (exist_non_indexing_operands_for_use_p, process_use)
4038         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
4039         (vect_get_vec_def_for_operand, vect_get_vec_defs)
4040         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
4041         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
4042         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
4043         (get_negative_load_store_type, get_load_store_type)
4044         (vect_check_load_store_mask, vect_check_store_rhs)
4045         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
4046         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4047         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4048         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4049         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
4050         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
4051         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
4052         (supportable_widening_operation): Likewise.
4054 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4056         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
4057         a stmt_vec_info instead of a gcall.
4058         (vect_check_gather_scatter): Update call accordingly.
4059         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
4060         of a gphi.
4061         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
4062         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
4063         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
4064         instead of a gimple stmt.
4065         (vect_transform_loop): Update calls accordingly.
4066         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
4067         stmt_vec_infos instead of gimple stmts.
4068         (vect_analyze_slp_instance): Update use accordingly.
4069         * tree-vect-stmts.c (read_vector_array, write_vector_array)
4070         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
4071         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
4072         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
4073         (vect_gen_widened_results_half, vect_get_loop_based_defs)
4074         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
4075         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
4076         down to subroutines.
4078 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4080         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
4081         of the worklist from a vector of gimple stmts to a vector of
4082         stmt_vec_infos.
4083         * tree-vect-stmts.c (vect_mark_relevant, process_use)
4084         (vect_mark_stmts_to_be_vectorized): Likewise
4086 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4088         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
4089         statement before passing it to vect_analyze_stmt.
4090         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
4091         the chain of phi vector definitions.  Track the exit phi via its
4092         stmt_vec_info.
4093         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
4094         STMT_VINFO_REDUC_DEF.
4095         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
4096         stmt_vec_infos to handle the statement chains.
4097         (vect_get_slp_defs): Record the first statement in the node
4098         using a stmt_vec_info.
4099         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
4100         statements here and pass their stmt_vec_info down to subroutines.
4101         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
4102         down to vect_finish_stmt_generation.
4103         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
4104         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
4105         stmt_vec_infos to subroutines.
4106         (vect_remove_stores): Use stmt_vec_infos to handle the statement
4107         chains.
4109 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4111         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
4112         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
4113         (vect_permute_store_chain, vect_setup_realignment)
4114         (vect_permute_load_chain, vect_shift_permute_load_chain)
4115         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
4116         stmts internally, and when passing values to other vectorizer routines.
4117         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4118         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
4119         (vect_analyze_loop_operations, get_initial_def_for_reduction)
4120         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
4121         (vectorizable_reduction, vectorizable_induction)
4122         (vectorizable_live_operation, vect_transform_loop_stmt)
4123         (vect_transform_loop): Likewise.
4124         * tree-vect-patterns.c (vect_reassociating_reduction_p)
4125         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
4126         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
4127         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4128         (vect_slp_analyze_node_operations_1): Likewise.
4129         * tree-vect-stmts.c (vect_mark_relevant, process_use)
4130         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
4131         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
4132         (vect_finish_stmt_generation_1, get_group_load_store_type)
4133         (get_load_store_type, vect_build_gather_load_calls)
4134         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4135         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4136         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4137         (vectorizable_store, vectorizable_load, vectorizable_condition)
4138         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
4139         (supportable_widening_operation): Likewise.
4140         (vect_get_vector_types_for_stmt): Likewise.
4141         * tree-vectorizer.h (vect_dr_behavior): Likewise.
4143 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4145         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4146         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
4147         (vect_permute_store_chain, vect_permute_load_chain)
4148         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
4149         repeated stmt_vec_info lookups.
4150         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4151         (vect_update_ivs_after_vectorizer): Likewise.
4152         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
4153         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4154         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
4155         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4156         (vect_bb_slp_scalar_cost): Likewise.
4157         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
4159 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4161         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
4162         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
4163         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
4164         to get gassigns and gcalls, rather than operating on generc gimple
4165         stmts.
4166         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
4167         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
4168         (vectorizable_load, vect_analyze_stmt): Likewise.
4169         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
4171 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4173         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
4174         return stmt_vec_infos rather than gimple stmts.  Do not accept
4175         null arguments.
4176         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
4177         of a gimple stmt.
4178         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
4179         Update use of get_later_stmt.
4180         (vect_get_constant_vectors): Update call accordingly.
4181         (vect_schedule_slp_instance): Likewise
4182         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
4183         (vect_slp_analyze_instance_dependence): Likewise.
4184         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
4186 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4188         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
4189         (stmt_info_for_cost::stmt_info): ...this new field.
4190         (add_stmt_costs): Update accordingly.
4191         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4192         (vect_get_known_peeling_cost): Likewise.
4193         (vect_estimate_min_profitable_iters): Likewise.
4194         * tree-vect-stmts.c (record_stmt_cost): Likewise.
4196 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4198         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
4199         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4200         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
4201         accordingly.
4202         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
4204 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4206         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
4207         a gimple stmt to a stmt_vec_info.
4208         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
4210 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4212         * tree-vectorizer.h (vec_info::grouped_stores): Change from
4213         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4214         (_loop_vec_info::reduction_chains): Likewise.
4215         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
4216         accordingly.
4217         * tree-vect-slp.c (vect_analyze_slp): Likewise.
4219 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4221         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
4222         a gimple stmt to a stmt_vec_info.
4223         (_stmt_vec_info::next_element): Likewise.
4224         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
4225         (vect_slp_analyze_and_verify_node_alignment)
4226         (vect_analyze_group_access_1, vect_analyze_group_access)
4227         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
4228         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
4229         (vect_supportable_dr_alignment): Update accordingly.
4230         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
4231         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
4232         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
4233         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
4234         * tree-vect-slp.c (vect_build_slp_tree_1)
4235         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
4236         (vect_split_slp_store_group, vect_analyze_slp_instance)
4237         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
4238         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
4239         (get_group_load_store_type, get_load_store_type)
4240         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
4241         (vect_transform_stmt, vect_remove_stores): Likewise.
4243 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4245         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
4246         than a gimple stmt.
4247         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4248         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
4249         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
4250         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
4251         (vector_alignment_reachable_p, vect_get_data_access_cost)
4252         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
4253         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
4254         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
4255         (vect_analyze_group_access_1, vect_analyze_group_access)
4256         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
4257         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
4258         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
4259         result of vect_dr_stmt and use the stmt_vec_info instead of
4260         the associated gimple stmt.
4261         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4262         (vect_gen_prolog_loop_niters): Likewise.
4263         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4265 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4267         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
4268         to a vec<stmt_vec_info>.
4269         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
4270         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
4271         vec<stmt_vec_info>.
4272         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
4273         to a vec<stmt_vec_info>.
4274         (bst_traits::value_type, bst_traits::value_type): Likewise.
4275         (bst_traits::hash): Update accordingly.
4276         (vect_get_and_check_slp_defs): Change the stmts parameter from
4277         a vec<gimple *> to a vec<stmt_vec_info>.
4278         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
4279         (vect_build_slp_tree): Likewise.
4280         (vect_build_slp_tree_2): Likewise.  Update uses of
4281         SLP_TREE_SCALAR_STMTS.
4282         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
4283         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
4284         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
4285         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
4286         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
4287         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
4288         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
4289         (vect_get_constant_vectors, vect_get_slp_defs)
4290         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
4291         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
4292         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
4293         instead of gimple stmts.
4294         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
4295         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
4296         (vect_slp_analyze_instance_dependence): Update uses of
4297         SLP_TREE_SCALAR_STMTS.
4298         (vect_slp_analyze_and_verify_node_alignment): Likewise.
4299         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
4300         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
4301         (get_initial_defs_for_reduction): Likewise.
4302         (vect_create_epilog_for_reduction): Likewise.
4303         (vectorize_fold_left_reduction): Likewise.
4304         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
4305         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
4306         (can_vectorize_live_stmts): Likewise.
4308 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4310         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
4311         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4312         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
4313         than gimple stmts.
4314         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
4315         of a gimple stmt.
4316         (gather_scalar_reductions): Update after above interface changes.
4317         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
4318         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
4319         than gimple stmts.
4320         (vect_force_simple_reduction): Likewise.
4321         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
4322         LOOP_VINFO_REDUCTIONS.
4323         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4325 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4327         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
4328         a gimple stmt to a stmt_vec_info.
4329         * tree-vect-loop.c (vect_active_double_reduction_p)
4330         (vect_force_simple_reduction, vectorizable_reduction): Update
4331         accordingly.
4333 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4335         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
4336         vec<gimple *> to a vec<stmt_vec_info>.
4337         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
4338         the reduction_phis argument from a vec<gimple *> to a
4339         vec<stmt_vec_info>.
4340         (vectorizable_reduction): Likewise the phis local variable that
4341         is passed to vect_create_epilog_for_reduction.  Update for new type
4342         of SLP_TREE_VEC_STMTS.
4343         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
4344         (vectorizable_live_operation): Likewise.
4345         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
4346         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
4348 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4350         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
4351         a gimple stmt to a stmt_vec_info.
4352         (vectorizable_condition, vectorizable_live_operation)
4353         (vectorizable_reduction, vectorizable_induction): Pass back the
4354         vectorized statement as a stmt_vec_info.
4355         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
4356         use of STMT_VINFO_VEC_STMT.
4357         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
4358         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
4359         as stmt_vec_infos rather than gimple stmts.
4360         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
4361         to a stmt_vec_info.
4362         (vectorizable_live_operation): Likewise.
4363         (vectorizable_reduction, vectorizable_induction): Likewise,
4364         updating use of STMT_VINFO_VEC_STMT.
4365         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
4366         of STMT_VINFO_VEC_STMT.
4367         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
4368         (vectorizable_simd_clone_call, vectorizable_conversion)
4369         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4370         (vectorizable_store, vectorizable_load, vectorizable_condition)
4371         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
4372         from a gimple stmt to a stmt_vec_info.
4373         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
4374         pointer to a stmt_vec_info to the vectorizable_* routines.
4376 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4378         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
4379         a gimple stmt to a stmt_vec_info.
4380         (is_pattern_stmt_p): Update accordingly.
4381         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
4382         (vect_record_grouped_load_vectors): Likewise.
4383         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
4384         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
4385         (vect_model_reduction_cost): Likewise.
4386         (vect_create_epilog_for_reduction): Likewise.
4387         (vectorizable_reduction, vectorizable_induction): Likewise.
4388         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4389         Return the stmt_vec_info for the pattern statement.
4390         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
4391         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
4392         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4393         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
4394         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
4395         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
4396         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
4397         (free_stmt_vec_info, vect_is_simple_use): Likewise.
4399 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4401         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
4402         (vect_finish_stmt_generation): Likewise.
4403         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4404         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
4405         (vect_build_gather_load_calls): Use the return value of the above
4406         functions instead of a separate call to vinfo_for_stmt.  Use narrow
4407         scopes for the input gimple stmt and wider scopes for the associated
4408         stmt_vec_info.  Use vec_info::lookup_def when setting these
4409         stmt_vec_infos from an SSA_NAME definition.
4410         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4411         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4412         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4413         (vectorizable_store, vectorizable_load, vectorizable_condition)
4414         (vectorizable_comparison): Likewise.
4415         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
4416         (vectorizable_reduction): Likewise.
4418 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4420         * tree-vectorizer.h (vect_is_simple_use): Add an optional
4421         stmt_vec_info * parameter before the optional gimple **.
4422         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4423         (process_use, vect_get_vec_def_for_operand_1): Update callers.
4424         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
4425         * tree-vect-loop.c (vectorizable_reduction): Likewise.
4426         (vectorizable_live_operation): Likewise.
4427         * tree-vect-patterns.c (type_conversion_p): Likewise.
4428         (vect_look_through_possible_promotion): Likewise.
4429         (vect_recog_rotate_pattern): Likewise.
4430         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4432 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4434         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
4435         a typedef to a wrapper class.
4436         (NULL_STMT_VEC_INFO): New macro.
4437         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
4438         (stmt_vec_info::operator*): New function.
4439         (stmt_vec_info::operator gimple *): Likewise.
4440         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
4441         (add_stmt_costs): Likewise.
4442         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
4443         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4444         (vect_get_known_peeling_cost): Likewise.
4445         (vect_estimate_min_profitable_iters): Likewise.
4446         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4447         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
4448         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
4449         (vectorizable_store, free_stmt_vec_infos): Likewise.
4450         (new_stmt_vec_info): Change return type of xcalloc to
4451         _stmt_vec_info *.
4453 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4455         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
4456         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
4457         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
4458         a single_imm_use-based sequence.
4459         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
4461 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4463         * tree-vectorizer.h (vec_info::lookup_def): Declare.
4464         * tree-vectorizer.c (vec_info::lookup_def): New function.
4465         * tree-vect-patterns.c (vect_get_internal_def): Use it.
4466         (vect_widened_op_tree): Likewise.
4467         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4468         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
4469         (vectorizable_reduction): Likewise.
4470         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
4471         of a gimple *.
4472         (vect_is_slp_reduction): Update calls accordingly.  Use
4473         vec_info::lookup_def.
4474         (vect_is_simple_reduction): Likewise
4475         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
4477 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4479         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
4480         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
4481         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
4482         of vinfo_for_stmt.
4483         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
4484         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
4485         (vect_update_vf_for_slp, vect_analyze_loop_operations)
4486         (vect_is_slp_reduction, vectorizable_induction)
4487         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
4488         * tree-vect-patterns.c (vect_init_pattern_stmt):
4489         (vect_determine_min_output_precision_1, vect_determine_precisions)
4490         (vect_pattern_recog): Likewise.
4491         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
4492         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
4493         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
4494         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4495         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
4496         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
4497         info field from a loop to a loop_vec_info.
4499 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4501         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
4502         (vec_info::add_stmt): Declare.
4503         * tree-vectorizer.c (vec_info::add_stmt): New function.
4504         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
4505         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
4506         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4507         (vectorizable_induction): Likewise.
4508         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
4509         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4510         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
4511         (vectorizable_load): Likewise.
4512         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4513         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
4514         (vect_recog_gather_scatter_pattern): Likewise.
4515         (append_pattern_def_seq): Likewise.  Remove a check that is
4516         performed by add_stmt itself.
4518 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4520         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
4521         which make_ssa_name was called with new_stmt before new_stmt
4522         had been created.
4524 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4526         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
4527         split out from...
4528         (vect_is_slp_reduction): ...here...
4529         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
4530         that are already known to be false.
4532 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4534         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
4535         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
4536         STMT_VINFO_NUM_SLP_USES when it's true.
4537         (vect_free_slp_instance): Add a final_p parameter and pass it to
4538         vect_free_slp_tree.
4539         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
4540         (vect_analyze_slp_instance): Likewise.
4541         (vect_slp_analyze_operations): Likewise.
4542         (vect_slp_analyze_bb_1): Likewise.
4543         * tree-vectorizer.c (vec_info): Likewise.
4544         * tree-vect-loop.c (vect_transform_loop): Likewise.
4546 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4548         * tree-vect-loop.c (vectorizable_reduction): Assert that the
4549         function is not called for second and subsequent members of
4550         a reduction group.
4552 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4554         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
4555         cases for nested loops from here to ...
4556         (vect_create_epilog_for_reduction): ...here.  Only call
4557         vect_is_simple_use for inner-loop reductions.
4559 2018-07-31  Martin Liska  <mliska@suse.cz>
4561         PR gcov-profile/85338
4562         PR gcov-profile/85350
4563         PR gcov-profile/85372
4564         * profile.c (struct location_triplet): New.
4565         (struct location_triplet_hash): Likewise.
4566         (output_location): Do not output a BB that
4567         is already recorded for a line.
4568         (branch_prob): Use streamed_locations.
4570 2018-07-31  Martin Liska  <mliska@suse.cz>
4572         PR gcov-profile/85370
4573         * coverage.c (coverage_begin_function): Do not mark target
4574         clones as artificial functions.
4576 2018-07-31  Martin Liska  <mliska@suse.cz>
4578         PR gcov-profile/83813
4579         PR gcov-profile/84758
4580         PR gcov-profile/85217
4581         PR gcov-profile/85332
4582         * profile.c (branch_prob): Do not record GOTO expressions
4583         for GIMPLE statements which locations are already streamed.
4585 2018-07-31  Olivier Hainque  <hainque@adacore.com>
4587         * gcc.c (handle_spec_function): Accept a soft_matched_part
4588         argument, as do_spec_1.  Pass it down to ...
4589         (eval_spec_function): Accept a soft_matched_part argument,
4590         and pass it down to ...
4591         (do_spec_2): Accept a soft_matched_part argument, and pass
4592         it down to do_spec_1.
4593         (do_spec_1): Pass soft_matched_part to handle_spec_function.
4594         (handle_braces): Update call to handle_spec_function.
4595         (driver::set_up_specs): Update calls to do_spec_2.
4596         (compare_debug_dump_opt_spec_function): Likewise.
4597         (compare_debug_self_opt_spec_function): Likewise.
4599 2018-07-31  Olivier Hainque  <hainque@adacore.com>
4601         * common.opt (nolibc): New option.
4602         * doc/invoke.texi (Link Options): Document it.
4603         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
4604         * config/alpha/linux.h: Likewise.
4605         * config/arc/elf.h: Likewise.
4606         * config/arm/uclinux-elf.h: Likewise.
4607         * config/arm/unknown-elf.h: Likewise.
4608         * config/avr/avrlibc.h: Likewise.
4609         * config/bfin/bfin.h: Likewise.
4610         * config/bfin/linux.h: Likewise.
4611         * config/bfin/uclinux.h: Likewise.
4612         * config/darwin.h: Likewise.
4613         * config/darwin10.h: Likewise.
4614         * config/darwin12.h: Likewise.
4615         * config/gnu-user.h: Likewise.
4616         * config/lm32/uclinux-elf.h: Likewise.
4617         * config/pa/pa-hpux11.h: Likewise.
4618         * config/pa/pa64-hpux.h: Likewise.
4619         * config/sparc/sparc.h: Likewise.
4621 2018-07-31  Olivier Hainque  <hainque@adacore.com>
4623         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
4624         undefined variables.
4626 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
4628         PR target/86640
4629         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
4630         instead of GEN_INT.
4632 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4634         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4635         terminated string literal.
4637 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
4639         PR rtl-optimization/85160
4640         * combine.c (is_just_move): New function.
4641         (try_combine): Allow combining two instructions into two if neither of
4642         the original instructions was a move.
4644 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
4646         PR target/86673
4647         * doc/extend.texi (Global Register Variables): Discourage use of type
4648         qualifiers.
4649         (Local Register Variables): Likewise.
4651 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
4653         PR tree-optimization/86506
4654         * hwint.h (ceil_log2): Resync with hwint.c implementation.
4656 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
4658         PR target/86547
4659         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
4660         hard_regno, make sure no insn between `from` and `to` clobbers it.
4662 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
4663             Tom de Vries  <tdevries@suse.de>
4665         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
4666         (PTX_DEFAULT_RUNTIME_DIM): ... this.
4667         (nvptx_goacc_validate_dims): Set default worker and gang dims to
4668         PTX_DEFAULT_RUNTIME_DIM.
4669         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
4671 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
4673         * config/pa/pa.c (pa_output_addr_vec): Align address table.
4674         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
4675         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
4677 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
4679         * config/rs6000/constraints.md (wG constraint): Delete, no longer
4680         used.
4681         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
4682         predicate to reflect toc fusion has been deleted.
4683         (toc_fusion_mem_raw): Delete, no longer used.
4684         (toc_fusion_mem_wrapped): Likewise.
4685         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
4686         fusion mask bit.
4687         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
4688         Delete, no longer used.
4689         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
4690         meant to be used for toc fusion.
4691         (rs6000_debug_print_mode): Delete toc fusion debugging.
4692         (rs6000_debug_reg_global): Likewise.
4693         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
4694         fusion and secondary reload support that were never used.
4695         (rs6000_option_override_internal): Delete TOC fusion, that was only
4696         partially defined, and it did not work unless you also used the
4697         -mcmodel= switch.
4698         (rs6000_legitimate_address_p): Delete TOC fusion support.
4699         (rs6000_opt_masks): Likewise.
4700         (fusion_wrap_memory_address): Delete function, no longer used.
4701         (fusion_split_address); Delete TOC fusion support.
4702         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
4703         longer used with toc fusion being deleted.
4704         (TARGET_TOC_FUSION_FP): Likewise.
4705         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
4706         UNSPEC.
4707         (toc fusion spliter): Delete TOC fusion support.
4708         (toc_fusionload_<mode>): Likewise.
4709         (toc_fusionload_di): Likewise.
4710         (fusion_gpr_load_<mode>): Delete generator function, this insn no
4711         longer needs to be named.  Rename predicate to delete TOC fusion.
4712         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4713         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4714         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4715         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4716         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
4718 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4720         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
4721         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
4722         __int128 in built-in function prototypes.
4723         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
4724         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
4726 2018-07-27  Martin Sebor  <msebor@redhat.com>
4728         PR tree-optimization/86696
4729         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
4730         types, including enums.
4731         (handle_char_store): Be prepared for the above function to fail.
4733 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
4735         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
4736         when optimization level is lower than 2 or optimize for size.
4738 2018-07-26  Martin Sebor  <msebor@redhat.com>
4740         PR tree-optimization/86043
4741         PR tree-optimization/86042
4742         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
4743         (get_string_cst_length): Rename...
4744         (get_min_string_length): ...to this.  Add argument.
4745         (handle_char_store): Extend to handle multi-character stores by
4746         MEM_REF.
4747         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
4748         * tree.h (initializer_zerop): Add argument.
4750 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
4752         PR middle-end/86660
4753         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
4754         declare target to variables if they have always,{to,from,tofrom} map
4755         kinds.
4757 2018-07-26  Martin Liska  <mliska@suse.cz>
4759         PR lto/86548
4760         * lto-wrapper.c: Add linker_output as prefix
4761         for ltrans_output_file.
4763 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
4765         PR rtl-optimization/85805
4766         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
4767         value for hard registers if that was written in the same mode.
4769 2018-07-26  Martin Liska  <mliska@suse.cz>
4771         PR gcov-profile/86536
4772         * gcov.c (format_gcov): Use printf format %.*f directly
4773         and do not handle special values.
4775 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
4777         * common/config/arc/arc-common.c (arc_option_optimization_table):
4778         Update default optimizations for size.
4780 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
4782         * config/arc/arc.md (movsf_insn): Add short instruction selection.
4783         * config/arc/constraints.md (CfZ): New constraint.
4784         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
4785         (subsf3_fpu): Likewise.
4786         (cmpsf_fpu): Likewise.
4787         (cmpsf_fpu_uneq): Likewise.
4789 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
4791         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
4792         accesses as well.
4793         (arc_is_uncached_mem_p): uncached applies to both the variable and
4794         the pointer.
4796 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
4798         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
4799         register names.
4801 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
4803         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
4804         field "m_scopes" from vec to auto_vec.
4806 2018-07-25  Martin Liska  <mliska@suse.cz>
4808         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
4809         return type.
4811 2018-07-25  Richard Biener  <rguenther@suse.de>
4813         PR debug/86654
4814         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
4815         special wrt context_die late.
4816         (gen_subprogram_die): Re-use DIEs in local scope.
4818 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
4820         PR tree-optimization/86644
4821         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
4823 2018-07-25  Martin Liska  <mliska@suse.cz>
4825         PR middle-end/86645
4826         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
4827         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
4829 2018-07-25  Martin Liska  <mliska@suse.cz>
4831         PR sanitizer/79635
4832         * params.def: Explain ASan abbreviation and provide
4833         a documentation link.
4835 2018-07-24  Martin Sebor  <msebor@redhat.com>
4837         PR tree-optimization/86622
4838         PR tree-optimization/86532
4839         * builtins.h (string_length): Declare.
4840         * builtins.c (c_strlen): Correct handling of non-constant offsets.
4841         (check_access): Be prepared for non-constant length ranges.
4842         (string_length): Make extern.
4843         * expr.c (string_constant): Only handle the minor non-constant
4844         array index.  Use string_constant to compute the length of
4845         a generic string constant.
4847 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
4849         PR tree-optimization/86618
4850         * tree-vect-stmts.c (vectorizable_call): Don't take the address
4851         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
4853 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
4855         PR tree-optimization/86636
4856         * json.cc (json::object::set): Fix comment.  Add assertions.
4857         (json::array::append): Move here from json.h.  Add comment and an
4858         assertion.
4859         (json::string::string): Likewise.
4860         * json.h (json::array::append): Move to json.cc.
4861         (json::string::string): Likewise.
4862         * optinfo-emit-json.cc
4863         (optrecord_json_writer::impl_location_to_json): Assert that we
4864         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
4865         wrapper around it.  Expand the location once, rather than three
4866         times.
4867         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
4868         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
4869         wrappers.
4870         (optrecord_json_writer::optinfo_to_json): Likewise, in four
4871         places.  Fix some overlong lines.
4873 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
4875         * config/aarch64/aarch64-simd.md
4876         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
4877         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
4878         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
4879         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
4880         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
4881         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
4882         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
4883         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
4884         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
4886 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
4888         PR middle-end/86627
4889         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
4890         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
4891         and abs_d == d, do the power of two handling if profitable.
4893 2018-07-24  Richard Biener  <rguenther@suse.de>
4895         * match.pd: Add BIT_FIELD_REF canonicalizations.
4897 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4899         PR c/86617
4900         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
4902 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4904         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
4905         terminated STRING_CST object.
4907 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4909         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
4911 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
4913         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
4914         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
4915         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
4916         the elements into a register.
4917         (rs6000_split_v4si_init_di_reg): Delete.
4918         (rs6000_split_v4si_init): Delete.
4919         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
4920         (vsx_init_v4si): Rewrite as a define_expand.
4922 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
4924         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
4925         zero_extend argument from memory): New.
4927 2018-07-22  Martin Sebor  <msebor@redhat.com>
4929         PR bootstrap/86621
4930         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
4931         diagnosing calls with unknown arguments unless -Walloca-larger-than
4932         is restricted to less than PTRDIFF_MAX bytes.
4934 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
4936         * doc/gcov.texi (Invoking Gcov): Editorial changes.
4938 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
4940         * pretty-print.c (text_info::set_location): Remove redundant
4941         "line_table" parameter from call to rich_location::set_range.
4943 2018-07-20  Martin Sebor  <msebor@redhat.com>
4945         PR middle-end/82063
4946         * builtins.c (expand_builtin_alloca): Adjust.
4947         * calls.c (alloc_max_size): Simplify.
4948         * cgraphunit.c (cgraph_node::expand): Adjust.
4949         * common.opt (larger_than_size, warn_frame_larger_than): Remove
4950         variables.
4951         (frame_larger_than_size): Same.
4952         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
4953         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
4954         Initialize.
4955         * doc/invoke.texi (GCC Command Options): Document option arguments.
4956         Explain byte-size arguments and suffixes.
4957         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
4958         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
4959         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
4960         * doc/options.texi (UInteger): Expand.
4961         (Host_Wide_Int, ByteSize): Document new properties.
4962         * final.c (final_start_function_1): Include sizes in an error message.
4963         * function.c (frame_offset_overflow): Same.
4964         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
4965         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
4966         Diagnose unbounded alloca calls only for limits of less than
4967         PTRDIFF_MAX.
4968         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
4969         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
4970         for alloca(0).
4971         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
4972         only for limits of less than PTRDIFF_MAX.
4973         * langhooks-def.h (lhd_handle_option): Change function argument
4974         to HOST_WIDE_INT.
4975         * langhooks.c (lhd_handle_option): Same.
4976         * langhooks.h (handle_option): Same.
4977         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
4978         ByteSize flags.
4979         (var_type, var_type_struct): Same.
4980         (var_set): Handle ByteSize flag.
4981         * optc-gen.awk: Add comments to output to ease debugging.  Make
4982         use of HOST_WIDE_INT where appropriate.
4983         * opts-gen-save.awk:  Use %lx to format unsigned long.
4984         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
4985         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
4986         arguments.  Parse bytes-size suffixes.
4987         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
4988         (enum_value_to_arg): Same.
4989         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
4990         (handle_option): Adjust.
4991         (generate_option): Change function argument to HOST_WIDE_INT.
4992         (cmdline_handle_error): Adjust.
4993         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
4994         (set_option): Change function argument to HOST_WIDE_INT.
4995         (option_enabled): Handle cl_host_wide_int.
4996         (get_option_state): Handle CLVC_SIZE.
4997         (control_warning_option): Same.
4998         * opts.c (common_handle_option): Change function argument to
4999         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
5000         OPT_Wvla_larger_than_.
5001         * opts.h (enum cl_var_type): Add an enumerator.
5002         * stor-layout.c (layout_decl): Print a more meaningful warning.
5003         * toplev.c (output_stack_usage): Adjust.
5005 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
5007         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
5008         call to inline_expand_builtin_string_cmp.
5009         (expand_builtin_strcmp): Likewise.
5010         (expand_builtin_strncmp): Likewise.
5011         (inline_string_cmp): Delete the last parameter, change char_type_node
5012         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
5013         two operands.
5014         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
5015         the inlining expansion on target where the type of the call has same or
5016         narrower precision than unsigned char.
5018 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
5020         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
5021         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
5022         * common.opt (fsave-optimization-record): New option.
5023         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
5024         * doc/invoke.texi (-fsave-optimization-record): New option.
5025         * dumpfile.c: Include "optinfo-emit-json.h".
5026         (struct kv_pair): Move to coretypes.h.
5027         (optgroup_options): Make non-static.
5028         (dump_context::end_scope): Call
5029         optimization_records_maybe_pop_dump_scope.
5030         * dumpfile.h (optgroup_options): New decl.
5031         * json.cc: New file.
5032         * json.h: New file.
5033         * optinfo-emit-json.cc: New file.
5034         * optinfo-emit-json.h: New file.
5035         * optinfo.cc: Include "optinfo-emit-json.h".
5036         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
5037         (optinfo_enabled_p): Check optimization_records_enabled_p.
5038         (optinfo_wants_inlining_info_p): Likewise.
5039         * optinfo.h: Update comment.
5040         * profile-count.c (profile_quality_as_string): New function.
5041         * profile-count.h (profile_quality_as_string): New decl.
5042         (profile_count::quality): New accessor.
5043         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
5044         and optinfo_emit_json_cc_tests.
5045         * selftest.h (selftest::json_cc_tests): New decl.
5046         (selftest::optinfo_emit_json_cc_tests): New decl.
5047         * toplev.c: Include "optinfo-emit-json.h".
5048         (compile_file): Call optimization_records_finish.
5049         (do_compile): Call optimization_records_start.
5050         * tree-ssa-live.c: Include optinfo.h.
5051         (remove_unused_scope_block_p): Retain inlining information if
5052         optinfo_wants_inlining_info_p returns true.
5054 2018-07-20  Richard Biener  <rguenther@suse.de>
5056         PR debug/86585
5057         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
5058         to cover -flto-partition=none.
5060 2018-07-20  Martin Liska  <mliska@suse.cz>
5062         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
5063         (get_decl_source_range): Remove unused function.
5065 2018-07-20  Richard Biener  <rguenther@suse.de>
5067         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
5068         (struct vn_phi_s): Likewise.
5069         (struct vn_reference_s): Likewise.
5070         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
5071         for searching the slot of an entry known to be in the hash itself.
5072         (vn_phi_hasher::equal): Likewise.
5073         (vn_reference_hasher::equal): Likewise.
5074         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
5075         globals.
5076         (optimistic_info, current_info): Remove, keeping only valid_info.
5077         (vn_reference_lookup_1): Remove fallback lookup.
5078         (vn_reference_lookup_2): Likewise.
5079         (vn_nary_op_lookup_1): Likewise.
5080         (vn_phi_lookup): Likewise.
5081         (vn_nary_build_or_lookup_1): Make sure to not chain the built
5082         hash element.
5083         (vn_reference_insert): Adjust, chain the inserted hash element
5084         at last_inserted_ref.
5085         (vn_reference_insert_pieces): Likewise.
5086         (visit_reference_op_call): Likewise.
5087         (vn_nary_op_insert_into): Chain the inserted hash element at
5088         last_inserted_nary.
5089         (vn_nary_op_insert_pieces): Adjust.
5090         (vn_nary_op_insert): Likewise.
5091         (vn_nary_op_insert_stmt): Likewise.
5092         (vn_phi_insert): Adjust, chain the inserted hash element at
5093         last_inserted_phi.
5094         (process_scc): Remove clearing and copying the optimistic
5095         table.  Instead remove elements inserted during an optimistic
5096         iteration from the single table we maintain.
5097         (init_scc_vn): Adjust.
5098         (free_scc_vn): Likewise.
5099         (sccvn_dom_walker::record_cond): Likewise.
5100         (sccvn_dom_walker::after_dom_children): Likewise.
5102 2018-07-19  Martin Sebor  <msebor@redhat.com>
5104         PR tree-optimization/84047
5105         PR tree-optimization/83776
5106         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
5107         (check_array_bounds): Call it.
5109 2018-07-19  Martin Sebor  <msebor@redhat.com>
5111         * align.h (align_flags): Use member initialization.
5113 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
5115         * Makefile.in (OBJS): Add optinfo.o.
5116         * coretypes.h (class symtab_node): New forward decl.
5117         (struct cgraph_node): New forward decl.
5118         (class varpool_node): New forward decl.
5119         * dump-context.h: New file.
5120         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
5121         "tree-pass.h".
5122         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
5123         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
5124         (set_alt_dump_file): Likewise.
5125         (dump_context::~dump_context): New dtor.
5126         (dump_gimple_stmt): Move implementation to...
5127         (dump_context::dump_gimple_stmt): ...this new member function.
5128         Add the stmt to any pending optinfo, creating one if need be.
5129         (dump_gimple_stmt_loc): Move implementation to...
5130         (dump_context::dump_gimple_stmt_loc): ...this new member function.
5131         Start a new optinfo and add the stmt to it.
5132         (dump_gimple_expr): Move implementation to...
5133         (dump_context::dump_gimple_expr): ...this new member function.
5134         Add the stmt to any pending optinfo, creating one if need be.
5135         (dump_gimple_expr_loc): Move implementation to...
5136         (dump_context::dump_gimple_expr_loc): ...this new member function.
5137         Start a new optinfo and add the stmt to it.
5138         (dump_generic_expr): Move implementation to...
5139         (dump_context::dump_generic_expr): ...this new member function.
5140         Add the tree to any pending optinfo, creating one if need be.
5141         (dump_generic_expr_loc): Move implementation to...
5142         (dump_context::dump_generic_expr_loc): ...this new member
5143         function.  Add the tree to any pending optinfo, creating one if
5144         need be.
5145         (dump_printf): Move implementation to...
5146         (dump_context::dump_printf_va): ...this new member function.  Add
5147         the text to any pending optinfo, creating one if need be.
5148         (dump_printf_loc): Move implementation to...
5149         (dump_context::dump_printf_loc_va): ...this new member function.
5150         Start a new optinfo and add the stmt to it.
5151         (dump_dec): Move implementation to...
5152         (dump_context::dump_dec): ...this new member function.  Add the
5153         value to any pending optinfo, creating one if need be.
5154         (dump_context::dump_symtab_node): New member function.
5155         (dump_context::get_scope_depth): New member function.
5156         (dump_context::begin_scope): New member function.
5157         (dump_context::end_scope): New member function.
5158         (dump_context::ensure_pending_optinfo): New member function.
5159         (dump_context::begin_next_optinfo): New member function.
5160         (dump_context::end_any_optinfo): New member function.
5161         (dump_context::s_current): New global.
5162         (dump_context::s_default): New global.
5163         (dump_scope_depth): Delete global.
5164         (dumpfile_ensure_any_optinfo_are_flushed): New function.
5165         (dump_symtab_node): New function.
5166         (get_dump_scope_depth): Reimplement in terms of dump_context.
5167         (dump_begin_scope): Likewise.
5168         (dump_end_scope): Likewise.
5169         (selftest::temp_dump_context::temp_dump_context): New ctor.
5170         (selftest::temp_dump_context::~temp_dump_context): New dtor.
5171         (selftest::verify_item): New function.
5172         (ASSERT_IS_TEXT): New macro.
5173         (ASSERT_IS_TREE): New macro.
5174         (ASSERT_IS_GIMPLE): New macro.
5175         (selftest::test_capture_of_dump_calls): New test.
5176         (selftest::dumpfile_c_tests): Call it.
5177         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
5178         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
5179         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
5180         descriptive comment.
5181         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
5182         (dump_node, dump_bb): Move these unrelated decls.
5183         (class dump_manager): Add leading comment.
5184         * optinfo.cc: New file.
5185         * optinfo.h: New file.
5187 2018-07-19  Michael Collison  <michael.collison@arm.com>
5188             Richard Henderson <rth@redhat.com>
5190         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
5191         (subti): Handle op1 zero.
5192         (subvti4, usub4ti4): New.
5193         (*sub<GPI>3_compare1_imm): New.
5194         (sub<GPI>3_carryinCV): New.
5195         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
5196         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
5198 2018-07-19  Michael Collison  <michael.collison@arm.com>
5199             Richard Henderson <rth@redhat.com>
5201         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
5202         (addti3): Create simpler code if low part is already known to be 0.
5203         (addvti4, uaddvti4): New.
5204         (*add<GPI>3_compareC_cconly_imm): New.
5205         (*add<GPI>3_compareC_cconly): New.
5206         (*add<GPI>3_compareC_imm): New.
5207         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
5208         handle constants within this pattern..
5209         (*add<GPI>3_compareV_cconly_imm): New.
5210         (*add<GPI>3_compareV_cconly): New.
5211         (*add<GPI>3_compareV_imm): New.
5212         (add<GPI>3_compareV): New.
5213         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
5214         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
5215         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
5216         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
5217         with 'comparison' operator.
5218         (*add<GPI>3_compareV_cconly_imm): Ditto.
5219         (*add<GPI>3_compareV_cconly): Ditto.
5220         (*add<GPI>3_compareV_imm): Ditto.
5221         (add<GPI>3_compareV): Ditto.
5222         (add<mode>3_carryinC): Ditto.
5223         (*add<mode>3_carryinC_zero): Ditto.
5224         (*add<mode>3_carryinC): Ditto.
5225         (add<mode>3_carryinV): Ditto.
5226         (*add<mode>3_carryinV_zero): Ditto.
5227         (*add<mode>3_carryinV): Ditto.
5229 2018-07-19  Michael Collison  <michael.collison@arm.com>
5230             Richard Henderson <rth@redhat.com>
5232         * config/aarch64/aarch64-modes.def (CC_V): New.
5233         * config/aarch64/aarch64-protos.h
5234         (aarch64_addti_scratch_regs): Declare
5235         (aarch64_subvti_scratch_regs): Declare.
5236         (aarch64_expand_subvti): Declare.
5237         (aarch64_gen_unlikely_cbranch): Declare
5238         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
5239         for signed overflow using CC_Vmode.
5240         (aarch64_get_condition_code_1): Handle CC_Vmode.
5241         (aarch64_gen_unlikely_cbranch): New function.
5242         (aarch64_addti_scratch_regs): New function.
5243         (aarch64_subvti_scratch_regs): New function.
5244         (aarch64_expand_subvti): New function.
5246 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5248         * config/aarch64/aarch64-option-extensions.def: New entry for profile
5249         extension.
5250         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
5251         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
5252         extension.
5254 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5256         PR target/83009
5257         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5258         address check not strict.
5260 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5262         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
5263         Umq with Umn.
5264         (store_pair_lanes<mode>): Likewise.
5265         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
5266         enum value 'ADDR_QUERY_LDP_STP_N'.
5267         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
5268         (aarch64_print_address_internal): Add declaration.
5269         (aarch64_print_ldpstp_address): Remove.
5270         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
5271         (aarch64_print_operand): Change printing of 'y'.
5272         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
5273         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
5274         'true' rather than '1'.
5275         * config/aarch64/constraints.md (Uml): Likewise.
5276         (Uml): Rename to Umn.
5277         (Umq): Remove.
5279 2018-07-19  Richard Biener  <rguenther@suse.de>
5281         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
5282         a trailing array.
5283         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
5284         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
5285         (vn_reference_hasher): Likewise.
5286         (struct vn_tables_s): Remove obstack and alloc-pool members.
5287         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
5288         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
5289         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
5290         (vn_reference_insert_pieces): Likewise.
5291         (alloc_vn_nary_op_noinit): Adjust.
5292         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
5293         (vn_phi_eq): Adjust.
5294         (shared_lookup_phiargs): Remove.
5295         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
5296         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
5297         (visit_reference_op_call): Likewise.
5298         (copy_nary, copy_phi, copy_reference): Remove.
5299         (process_scc): Rewind the obstack when iterating.  Do not
5300         copy the elements to valid_info but just move them from one
5301         hashtable to the other.
5302         (allocate_vn_table): Adjust.
5303         (free_vn_table): Likewise.
5304         (init_scc_vn): Likewise.
5305         (free_scc_vn): Likewise.
5307 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
5309         PR target/86560
5310         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
5311         indirect_return as function type attribute.
5312         (ix86_attribute_table): Change indirect_return to function
5313         type attribute.
5314         * doc/extend.texi: Update indirect_return attribute.
5316 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
5318         * wide-int.h (widest2_int): New.
5319         * gimple-fold.c (arith_overflowed_p): Use it.
5320         * tree.h (widest2_int_cst): New.
5321         * tree-vrp.c (wide_int_binop_overflow): Rename from
5322         vrp_int_const_binop.
5323         Rewrite to work on trees.
5324         (extract_range_from_multiplicative_op_1): Abstract code to...
5325         (wide_int_range_min_max): ...here.
5326         (wide_int_range_cross_product): ...and here.
5327         (extract_range_from_binary_expr_1): Abstract overflow code to...
5328         (wide_int_range_mult_wrapping): ...here.
5329         * tree-vrp.h (wide_int_range_cross_product): New.
5330         (wide_int_range_mult_wrapping): New.
5332 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
5333             Julia Koval  <julia.koval@intel.com>
5335         * config/i386/x86-tune-costs.h (skylake_memcpy,
5336         skylake_memset): Replace rep_prefix with unrolling for size 512.
5338 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
5340         PR middle-end/86544
5341         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
5342         comparision with EQ_EXPR in last stmt.
5344 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5346         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
5347         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
5348         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
5349         previously known as "PowerPC AltiVec Built-in Functions".  Move
5350         some material to new subsubsections "PowerPC AltiVec Built-in
5351         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
5352         ISA 2.07".
5353         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
5354         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
5355         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
5356         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
5358 2018-07-18  Richard Biener  <rguenther@suse.de>
5360         PR tree-optimization/86557
5361         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
5362         EXACT_DIV_EXPR.
5364 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
5366         * config/s390/s390.c (s390_function_profiler): Generate CFI.
5368 2018-07-17  Jeff Law  <law@redhat.com>
5370         * config/arm/arm.c (get_label_padding): Update for recent
5371         changes to label_to_alignment.
5373         PR tree-optimization/86010
5374         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
5376         * config/mips/mips.c (vr4130_align_insns): Update for recent
5377         changes to label_to_alignment.
5379         * config/frv/frv.c (frv_label_align): Update for recent changes
5380         to label_to_alignment.
5382         * config/nios2/nios2.c (nios2_label_align): Update for recent
5383         changes which dropped ALIGN_LABELS_LOG.
5385 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
5387         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
5388         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
5390 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
5392         * config/arc/arc.c (arc_label_align): Use align_labels instead of
5393         deprecated align_labels_log.
5395 2018-07-17  Richard Biener  <rguenther@suse.de>
5397         PR lto/86456
5398         * dwarf2out.c (init_sections_and_labels): Always generate
5399         a debug_line_str_section for early LTO debug.
5400         (dwarf2out_finish): Reset debug_line_str_hash output early.
5401         Bump counter for extra dwarf5 .debug_loc labels to not conflict
5402         with fat LTO part.
5403         (dwarf2out_early_finish): Output debug_line_str.
5405 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
5407         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
5408         index register on z196 or later.
5410 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
5412         * config/s390/s390.c (s390_default_align): Set default function
5413         alignment to 16.
5414         (s390_override_options_after_change): Call s390_default align.
5415         (s390_option_override_internal): Call s390_default_align.
5416         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
5418 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
5420         PR middle-end/86542
5421         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
5422         to _looptemp_ clauses, other than the first two.
5424 2018-07-17  Martin Liska  <mliska@suse.cz>
5426         * opts.c: Do not enable OPT_falign_* for -Os.
5428 2018-07-17  Martin Liska  <mliska@suse.cz>
5430         * align.h (MAX_CODE_ALIGN): New.
5431         (MAX_CODE_ALIGN_VALUE): New.
5432         * common/config/i386/i386-common.c (ix86_handle_option):
5433         (MAX_CODE_ALIGN): Moved to align.h.
5434         * final.c (MAX_CODE_ALIGN): Likewise.
5435         * opts.c (parse_and_check_align_values):
5436         (MAX_CODE_ALIGN): Likewise.
5437         (MAX_CODE_ALIGN_VALUE): Likewise.
5439 2018-07-17  Martin Liska  <mliska@suse.cz>
5441         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
5442         in order to fulfil coding style.
5443         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
5444         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5445         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5446         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
5447         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
5448         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
5449         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
5450         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
5451         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5453 2018-07-17  Martin Liska  <mliska@suse.cz>
5455         * align.h: New file.
5456         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
5457         directly.
5458         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
5459         align_flags of label_to_alignment.
5460         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
5461         align_flags class.
5462         * config/m68k/m68k.c: Do not use removed align_labels_value and
5463         align_loops_value.
5464         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
5465         (LOOP_ALIGN): Likewise.
5466         (LABEL_ALIGN): Likewise.
5467         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5468         Remove not used macro.
5469         (rs6000_loop_align): Change return type to align_flags.
5470         (rs6000_loop_align_max_skip): Remove.
5471         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
5472         Change return type to align_flags.
5473         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5474         Remove not used macro.
5475         (rs6000_loop_align):  Change return type to align_flags.
5476         (rs6000_loop_align_max_skip): Remove.
5477         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
5478         * config/rx/rx-protos.h (rx_align_for_label): Make it
5479         static function.
5480         * config/rx/rx.c (rx_align_for_label): Change return type
5481         to align_flags.
5482         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
5483         macro definitions.
5484         into align_flags class.
5485         (LABEL_ALIGN): Likewise.
5486         (LOOP_ALIGN): Likewise.
5487         * config/s390/s390.c (s390_label_align): Use align_flags
5488         class member.
5489         (s390_asm_output_function_label): Likewise.
5490         * config/sh/sh.c (sh_override_options_after_change):
5491         Use align_flags class directly without macros.
5492         (find_barrier): Likewise.
5493         (barrier_align): Likewise.
5494         (sh_loop_align): Likewise.
5495         * config/spu/spu.c (spu_option_override):
5496         Use align_flags_tuple::get_value instead of removed macros.
5497         (spu_sched_init): Likewise.
5498         * config/spu/spu.h (GTY): Likewise.
5499         * config/visium/visium.c (visium_option_override):
5500         Set "8" as default secondary alignment.
5501         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
5502         in order to guarantee secondary alignment of 8.
5503         * coretypes.h: Include align.h header file.
5504         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
5505         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
5506         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
5507         * doc/tm.texi.in: Likewise.
5508         * final.c (struct label_alignment): Remove not used structure.
5509         (LABEL_ALIGN): Change type to align_flags.
5510         (LOOP_ALIGN): Likewise.
5511         (JUMP_ALIGN): Likewise.
5512         (default_loop_align_max_skip): Remove.
5513         (default_label_align_max_skip): Likewise.
5514         (default_jump_align_max_skip): Likewise.
5515         (default_label_align_after_barrier_max_skip):
5516         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
5517         (LABEL_TO_MAX_SKIP): Remove.
5518         (label_to_alignment): Return align_flags type instead of integer.
5519         (label_to_max_skip): Remove.
5520         (align_fuzz): Use align_flags type.
5521         (compute_alignments): Use align_flags type and use align_flags::max
5522         to combine multiple alignments.
5523         (grow_label_align): Grow vec instead of C array.
5524         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
5525         (shorten_branches):  Use align_flags type and use align_flags::max
5526         to combine multiple alignments.
5527         (final_scan_insn_1): Remove usage of secondary alignment that comes
5528         from label alignment, but instead use proper secondary alignment
5529         which is computed in grow_label_align.
5530         * flags.h (struct align_flags_tuple): Move to align.h.
5531         (struct align_flags): Likewise.
5532         (state_align_loops): Rename to align_loops.
5533         (state_align_jumps): Rename to align_jumps.
5534         (state_align_labels): Rename to align_labels.
5535         (state_align_functions): Rename to align_functions.
5536         (align_loops_log): Remove.
5537         (align_jumps_log): Remove.
5538         (align_labels_log): Remove.
5539         (align_functions_log): Remove.
5540         (align_loops_max_skip): Remove.
5541         (align_jumps_max_skip): Remove.
5542         (align_labels_max_skip): Remove.
5543         (align_functions_max_skip): Remove.
5544         (align_loops_value): Remove.
5545         (align_jumps_value): Remove.
5546         (align_labels_value): Remove.
5547         (align_functions_value): Remove.
5548         * output.h (label_to_alignment): Change return type to align_flags.
5549         (label_to_max_skip): Remove.
5550         * target.def: Remove loop_align_max_skip, label_align_max_skip,
5551         jump_align_max_skip macros.
5552         * targhooks.h (default_loop_align_max_skip): Remove.
5553         (default_label_align_max_skip): Likewise.
5554         (default_jump_align_max_skip): Likewise.
5555         (default_label_align_after_barrier_max_skip): Remove.
5556         * toplev.c (read_log_maxskip): Use ::normalize function.
5557         (parse_N_M): Remove not used argument and also call ::normalize.
5558         (parse_alignment_opts): Do not pass unused arguments.
5559         * varasm.c (assemble_start_function): Use directly align_functions
5560         instead of removed macros.
5561         * system.h: Do not poison removed macros.
5563 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
5565         PR middle-end/86539
5566         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
5567         and cond temporaries don't have reference type if iterator has
5568         pointer type.  For init use &for_pre_body instead of pre_p if
5569         for_pre_body is non-empty.
5571 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
5573         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
5574         double-double modes to SFmode directly directly.
5575         (trunc<mode>sf2_fprs): Delete.
5577 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
5579         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
5580         for conversions between IFmode and the decimal floating point modes.
5581         (init_float128_ieee): Use the correct names for conversions between
5582         KFmode and the decimal floating point modes.
5584 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
5586         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
5587         for the conversions between TDmode and IFmode.
5588         (init_float128_ieee): Use more correct names for the conversions
5589         between TDmode and KFmode.
5591 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
5593         PR tree-optimization/86526
5594         * builtins.c (expand_builtin_memcmp): Formatting fixes.
5595         (inline_expand_builtin_string_cmp): Likewise.
5596         (inline_string_cmp): Likewise.  Use c_readstr instead of
5597         builtin_memcpy_read_str.  Add unit_mode temporary.
5599 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5601         PR middle-end/86528
5602         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
5603         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
5605 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5607         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
5608         Alphabetize prototypes of built-in functions, separating out
5609         built-in functions that are listed in this section but should be
5610         described elsewhere.
5612 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
5614         PR target/86511
5615         * expmed.c (emit_store_flag): Do not emit setcc followed by a
5616         conditional move when trapping comparison was split to a
5617         non-trapping one (and vice versa).
5619 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
5621         * config/s390/s390.c (s390_function_profiler): Generate nops
5622         instead of profiler call sequences.
5623         * config/s390/s390.opt: Add the new option.
5625 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
5627         * config/s390/s390.c (s390_function_profiler): Generate
5628         __mcount_loc section.
5629         * config/s390/s390.opt: Add the new option.
5631 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
5633         * common.opt: Add the new warning.
5634         * config/s390/s390.c (s390_function_profiler): Emit "brasl
5635         %r0,__fentry__" when -mfentry is specified.
5636         (s390_option_override_internal): Disallow -mfentry for 31-bit
5637         CPUs.
5638         * config/s390/s390.opt: Add the new option.
5640 2018-07-16  Richard Biener  <rguenther@suse.de>
5642         PR lto/86523
5643         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
5644         for function-local FUNCTION_DECL and RESULT_DECL immediately.
5646 2018-07-16  Martin Liska  <mliska@suse.cz>
5648         PR ipa/86529
5649         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
5650         to ::get_create.
5652 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
5654         * config/arc/arcHS.md: Update ARCHS scheduling rules.
5656 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
5658         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
5659         for ARCHS4x.
5660         * config/arc/arc-cpus.def (hs4x): New cpu.
5661         (hs4xd): Likewise.
5662         * config/arc/arc-tables.opt: Regenerate.
5663         * config/arc/arc.c (arc_sched_issue_rate): New function.
5664         (TARGET_SCHED_ISSUE_RATE): Define.
5665         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
5666         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
5667         fpu_cvt.
5668         (attr tune): Add ARCHS4x tune values.
5669         (attr tune_dspmpy): Define.
5670         (*tst): Correct instruction type.
5671         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
5672         * config/arc/arcHS4x.md: New file.
5673         * config/arc/fpu.md: Update instruction type attributes.
5674         * config/arc/t-multilib: Regenerate.
5676 2018-07-16  Tom de Vries  <tdevries@suse.de>
5678         PR debug/86455
5679         * var-tracking.c (vt_initialize): Fix pre_dec handling.
5681 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
5683         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
5684         early clobber.
5686 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
5688         PR tree-optimization/86514
5689         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
5690         conversion to a boolean type from a type with greater precision.
5692 2018-07-16  Tom de Vries  <tdevries@suse.de>
5694         * var-tracking.c (vt_initialize): Print adjusted insn slim if
5695         dump_flags request TDF_SLIM.
5697 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
5699         * fold-const.c (int_const_binop_1): Abstract...
5700         (wide_int_binop): ...wide int code here.
5701         (poly_int_binop): ...poly int code here.
5702         Abstract the rest of int_const_binop_1 into int_const_binop.
5703         * fold-const.h (wide_int_binop): New.
5704         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
5705         Remove useless PLUS/MINUS_EXPR case.
5706         (zero_nonzero_bits_from_vr): Move wide int code...
5707         (zero_nonzero_bits_from_bounds): ...here.
5708         (extract_range_from_binary_expr_1): Move mask optimization code...
5709         (range_easy_mask_min_max): ...here.
5710         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
5711         (range_easy_mask_min_max): New.
5713 2018-07-15  Jeff Law  <law@redhat.com>
5715         PR target/85993
5716         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
5717         block.
5719 2018-07-14  Jim Wilson  <jimw@sifive.com>
5721         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
5723 2018-07-14  Paul Koning  <ni1d@arrl.net>
5725         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
5727 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
5729         * lto-streamer-out.c (copy_function_or_variable): Dump info about
5730         copying section.
5732 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
5733             Steve Munroe  <munroesj52@gmail.com>
5735         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
5736         (_mm_andnot_si128): Likewise.
5737         (_mm_or_si128): Likewise.
5738         (_mm_xor_si128): Likewise.
5740 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
5742         PR middle-end/78809
5743         * builtins.c (expand_builtin_memcmp): Inline the calls first
5744         when result_eq is false.
5745         (expand_builtin_strcmp): Inline the calls first.
5746         (expand_builtin_strncmp): Likewise.
5747         (inline_string_cmp): New routine. Expand a string compare
5748         call by using a sequence of char comparison.
5749         (inline_expand_builtin_string_cmp): New routine. Inline expansion
5750         a call to str(n)cmp/memcmp.
5751         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
5752         New option.
5753         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
5755 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
5757         * config/arm/driver-arm.c: Include arm-native.h.
5758         (host_detect_local_cpu): Use auto-generated data tables.
5759         (vendors, arm_cpu_table): Delete.  Move part information to ...
5760         * config/arm/arm-cpus.in: ... here.
5761         * config/arm/parsecpu.awk (gen_native): New function.
5762         (vendor, part): New CPU fields.
5763         (END): Add support for building the native CPU detection tables.
5764         * config/arm/t-arm (arm-native.h): Add build rule.
5765         (driver-arm.o): Add dependency on arm-native.h.
5767 2018-07-13  Richard Biener  <rguenther@suse.de>
5769         PR middle-end/85974
5770         * match.pd (addr1 - addr2): Allow either of the operand to
5771         have a conversion.
5773 2018-07-13  Tom de Vries  <tdevries@suse.de>
5775         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
5776         in remap_ssa_name.
5778 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
5780         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
5781         arrays instead of numbered variables.
5783 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
5785         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
5786         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
5788 2018-07-13  Richard Biener  <rguenther@suse.de>
5790         PR debug/86452
5791         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
5792         instead of get_context_die.
5794 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
5795             Richard Biener  <rguenther@suse.de>
5797         PR middle-end/86489
5798         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
5799         that the loop latch destination where phi is defined.
5801 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
5803         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
5804         (riscv_expand_epilogue): Add assertion to check interrupt mode.
5805         (riscv_set_current_function): Extract getting interrupt type to new
5806         function.
5807         (riscv_get_interrupt_type): New function.
5808         (riscv_merge_decl_attributes): New function, checking interrupt type is
5809         same.
5810         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
5812 2018-07-12  Paul Koning  <ni1d@arrl.net>
5814         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
5815         directive.
5817 2018-07-12  Paul Koning  <ni1d@arrl.net>
5819         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
5820         zero reference, add doloop_end instead.
5821         * doc/md.texi (decrement_and_branch_until_zero): Remove.
5822         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
5823         detail for doloop_end.
5825 2018-07-12  Martin Sebor  <msebor@redhat.com>
5827         PR c/86453
5828         * attribs.c (decl_attributes): Reject conflicting attributes before
5829         calling attribute handlers.
5831 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
5833         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
5834          parameter.
5835         (gcc::dump_manager::get_dump_file_name): likewise.
5836         (dump_begin): Likewise.
5837         * dumpfile.h (dump_begin): Update prototype.
5838         (gcc::dump_manager::get_dump_file_name,
5839         gcc::dump_manager::get_dump_file_name): Update prototype.
5841 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
5843         * internal-fn.h (vectorizable_internal_fn_p): New function.
5844         * tree-vect-slp.c (compatible_calls_p): Likewise.
5845         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
5846         to internal functions.
5847         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
5849 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
5851         * fold-const.h (inverse_conditions_p): Declare.
5852         * fold-const.c (inverse_conditions_p): New function.
5853         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
5854         that test the inverse condition of a conditional internal function.
5855         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
5856         * internal-fn.c (internal_fn_mask_index): Handle conditional
5857         internal functions.
5858         (vectorized_internal_fn_supported_p): New function.
5859         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
5860         (any_pred_load_store): Replace with...
5861         (need_to_predicate): ...this new variable.
5862         (redundant_ssa_names): New variable.
5863         (ifcvt_can_use_mask_load_store): Move initial checks to...
5864         (ifcvt_can_predicate): ...this new function.  Handle tree codes
5865         for which a conditional internal function exists.
5866         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
5867         instead of ifcvt_can_use_mask_load_store.  Update after variable
5868         name change.
5869         (predicate_load_or_store): New function, split out from
5870         predicate_mem_writes.
5871         (check_redundant_cond_expr): New function.
5872         (value_available_p): Likewise.
5873         (predicate_rhs_code): Likewise.
5874         (predicate_mem_writes): Rename to...
5875         (predicate_statements): ...this.  Use predicate_load_or_store
5876         and predicate_rhs_code.
5877         (combine_blocks, tree_if_conversion): Update after above name changes.
5878         (ifcvt_local_dce): Handle redundant_ssa_names.
5879         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
5880         general conditional functions.
5881         * tree-vect-stmts.c (vectorizable_call): Likewise.
5883 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
5884             Alan Hayward  <alan.hayward@arm.com>
5885             David Sherwood  <david.sherwood@arm.com>
5887         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
5888         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
5889         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
5890         plus and minus and convert them into IFN_COND_FMA-based sequences.
5891         (convert_mult_to_fma): Handle conditional plus and minus.
5893 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
5895         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
5896         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
5897         (cond_fnms_optab): New optabs.
5898         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
5899         internal functions.
5900         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
5901         * internal-fn.h (get_conditional_internal_fn): Declare.
5902         (get_unconditional_internal_fn): Likewise.
5903         * internal-fn.c (cond_ternary_direct): New macro.
5904         (expand_cond_ternary_optab_fn): Likewise.
5905         (direct_cond_ternary_optab_supported_p): Likewise.
5906         (FOR_EACH_COND_FN_PAIR): Likewise.
5907         (get_conditional_internal_fn): New function.
5908         (get_unconditional_internal_fn): Likewise.
5909         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
5910         (gimple_match_op::gimple_match_op): Add a new overload for 5
5911         operands.
5912         (gimple_match_op::set_op): Likewise.
5913         (gimple_resimplify5): Declare.
5914         * genmatch.c (decision_tree::gen): Generate simplifications for
5915         5 operands.
5916         * gimple-match-head.c (gimple_simplify): Define an overload for
5917         5 operands.  Handle calls with 5 arguments in the top-level overload.
5918         (convert_conditional_op): Handle conversions from unconditional
5919         internal functions to conditional ones.
5920         (gimple_resimplify5): New function.
5921         (build_call_internal): Pass a fifth operand.
5922         (maybe_push_res_to_seq): Likewise.
5923         (try_conditional_simplification): Try converting conditional
5924         internal functions to unconditional internal functions.
5925         Handle 3-operand unconditional forms.
5926         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
5927         Define ternary equivalents of the current rules for binary conditional
5928         internal functions.
5929         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
5930         ternary operations.
5931         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
5932         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
5933         (optab): Handle them.
5934         (SVE_COND_FP_TERNARY): New int iterator.
5935         (sve_fmla_op, sve_fmad_op): New int attributes.
5936         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
5937         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
5938         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
5940 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
5942         * target.def (preferred_else_value): New target hook.
5943         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
5944         * doc/tm.texi: Regenerate.
5945         * targhooks.h (default_preferred_else_value): Declare.
5946         * targhooks.c (default_preferred_else_value): New function.
5947         * internal-fn.h (conditional_internal_fn_code): Declare.
5948         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
5949         (get_conditional_internal_fn): Use it.
5950         (conditional_internal_fn_code): New function.
5951         * gimple-match.h (gimple_match_cond): New struct.
5952         (gimple_match_op): Add a cond member function.
5953         (gimple_match_op::gimple_match_op): Update all forms to take a
5954         gimple_match_cond.
5955         * genmatch.c (expr::gen_transform): Use the same condition as res_op
5956         for the suboperation, but don't specify a particular else_value.
5957         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
5958         (visit_nary_op, visit_reference_op_load): Pass
5959         gimple_match_cond::UNCOND to the gimple_match_op constructor.
5960         * gimple-match-head.c: Include tree-eh.h
5961         (convert_conditional_op): New function.
5962         (maybe_resimplify_conditional_op): Likewise.
5963         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
5964         (gimple_resimplify2): Likewise.
5965         (gimple_resimplify3): Likewise.
5966         (gimple_resimplify4): Likewise.
5967         (maybe_push_res_to_seq): Return null for conditional operations.
5968         (try_conditional_simplification): New function.
5969         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
5970         constructor.
5971         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
5972         IFN_COND_* call.
5973         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
5974         function.
5975         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
5977 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
5979         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
5980         DECL_FCONTEXT
5981         (hash_tree): Do not hash DECL_FCONTEXT
5982         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
5983         Do not stream DECL_FCONTEXT.
5984         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
5985         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
5987 2018-07-12  Richard Biener  <rguenther@suse.de>
5989         PR debug/86462
5990         * dwarf2out.c (gen_block_die): Only output blocks when they have
5991         at least one !DECL_IGNORED_P variable.
5993 2018-07-12  Richard Biener  <rguenther@suse.de>
5995         PR target/84829
5996         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
5997         Remove -mieee-fp handling.
5999 2018-07-12  Richard Biener  <rguenther@suse.de>
6001         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
6002         left-over from last patch.
6004 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
6006         PR tree-optimization/86492
6007         * gimple-ssa-store-merging.c
6008         (imm_store_chain_info::coalesce_immediate_stores): Call
6009         check_no_overlap even for the merge_overlapping case.  Formatting fix.
6011 2018-07-12  Richard Biener  <rguenther@suse.de>
6013         PR middle-end/86479
6014         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
6015         move possibly trapping operations into the conditional.
6017 2018-07-12  Richard Biener  <rguenther@suse.de>
6019         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
6020         (vn_lookup_simplify_result): Remove recursion limit applied
6021         here.
6022         (vn_nary_build_or_lookup_1): Adjust.
6023         (try_to_simplify): Likewise.
6024         * gimple-match-head.c (gimple_resimplify1): Instead apply one
6025         here.
6026         (gimple_resimplify2): Likewise.
6027         (gimple_resimplify3): Likewise.
6028         (gimple_resimplify4): Likewise.
6030 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
6032         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
6033         Use __mmask64 type instead of __mmask8 for __M argument.
6034         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
6035         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
6036         __U argument.
6037         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
6038         __mmask16 for __M argument.
6039         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
6040         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
6041         to __mmask16 instead of __mmask8.
6042         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
6043         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
6044         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
6045         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
6046         instead of __mmask16 for __U argument.
6047         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
6048         __mmask16 instead of __mmask8 for __U argument.
6049         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
6050         __U argument.
6051         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
6052         __mmask16.
6053         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
6054         argument.
6055         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
6056         __U argument.
6057         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
6058         __mmask16.
6059         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
6060         of __mmask16.
6061         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
6062         __U argument.
6063         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
6064         __U argument.
6065         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
6066         __U argument.
6067         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
6068         __U argument.
6069         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
6070         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
6071         return type as well as __M argument type and all casts from __mmask8
6072         to __mmask32.
6073         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
6074         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
6075         return type as well as __M argument type and all casts from __mmask8
6076         to __mmask16.
6077         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
6078         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
6079         return type as well as __M argument type and all casts from __mmask8
6080         to __mmask32.
6081         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
6082         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
6083         return type as well as __M argument type and all casts from __mmask8
6084         to __mmask16.
6085         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
6086         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
6087         __mmask16.
6089 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
6091         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
6092         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
6093         for __U argument.
6095 2018-07-11  Paul Koning  <ni1d@arrl.net>
6097         * doc/md.texi (define_subst): Document how multiple occurrences of
6098         the same argument in the replacement pattern are handled.
6100 2018-07-11  Paul Koning  <ni1d@arrl.net>
6102         * doc/extend.texi (Common Variable Attributes): Move "mode" into
6103         alphabetical order.
6104         (Common Type Attributes): Add "mode" attribute.
6106 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
6108         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
6109         stream DECL_ORIGINAL_TYPE.
6110         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
6111         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
6112         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
6113         Do not walk original type.
6114         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
6115         external decls.
6116         (write_ts_decl_non_common_tree_pointers): Do not stream
6117         DECL_ORIGINAL_TYPE
6118         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
6119         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
6121 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
6123         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
6124         thread twice from the same starting edge.
6126 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
6128         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
6129         * gimple.c (gimple_call_nonnull_result_p): ...here...
6130         (gimple_call_nonnull_arg): ...and here.
6131         * gimple.h (gimple_call_nonnull_result_p): New.
6132         (gimple_call_nonnull_arg): New.
6134 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
6136         * config/arm/arm-cpus.in: Move information from fpu field of each
6137         cpu definition to the isa field.
6138         * config/arm/parsecpu.awk (fpu): Delete match rule.
6139         (gen_comm_data): Don't add bits from the CPU's FPU entry.
6141 2018-07-11  Richard Biener  <rguenther@suse.de>
6143         PR debug/86457
6144         * dwarf2out.c (init_sections_and_labels): Use
6145         output_asm_line_debug_info consistently.
6146         (dwarf2out_early_finish): Likewise.
6147         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
6148         type units.
6150 2018-07-11  Richard Biener  <rguenther@suse.de>
6152         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
6153         Rework father_bb setting in a way to avoid propagating constants
6154         multiple times on a loop body.
6156 2018-07-10  Mark Wielaard  <mark@klomp.org>
6158         PR debug/86459
6159         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
6161 2018-07-10  Richard Biener  <rguenther@suse.de>
6163         * hash-map.h (hash_map::iterator::operator*): Return
6164         references to key and value.
6166 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
6168         PR c++/86443
6169         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
6170         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
6171         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
6172         (gimplify_omp_for): For composite loops, move outer
6173         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
6174         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
6175         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
6176         TREE_LIST for both the original class iterator and the "last" helper
6177         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
6178         loop, remember has_decl_expr from outer composite loops for the
6179         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
6181 2018-07-09  Martin Sebor  <msebor@redhat.com>
6183         PR middle-end/77357
6184         PR middle-end/86428
6185         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
6186         accessing implicitly initialized array elements.
6187         * expr.c (string_constant): Handle string initializers of
6188         character arrays within aggregates.
6189         * gimple-fold.c (fold_array_ctor_reference): Add argument.
6190         Store element offset.  As a special case, handle zero size.
6191         (fold_nonarray_ctor_reference): Same.
6192         (fold_ctor_reference): Add argument.  Store subobject offset.
6193         * gimple-fold.h (fold_ctor_reference): Add argument.
6195 2018-07-09  Paul Koning  <ni1d@arrl.net>
6197         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
6198         (pdp11_insn_cost): New function.
6199         (pdp11_md_asm_adjust): New function.
6200         (TARGET_INVALID_WITHIN_DOLOOP): Define.
6201         (pdp11_rtx_costs): Update to match machine better.
6202         (output_addr_const_pdp11): Correct format mismatch warnings.
6203         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
6204         * config/pdp11/pdp11.md: General change to add base_cost and/or
6205         length attributes for use by new pdp11_insn_cost function.
6206         (MIN_BRANCH): Correct definition.
6207         (MIN_SOB): Ditto.
6208         (doloop_end): Use standard pattern name for looping pattern.
6209         (doloop_end_nocc): New.
6210         (movsf): Add another constraint alternative.
6211         (zero_extendqihi2): Add constraint alternatives for not in place
6212         extend.
6213         (zero_extendhisi2): Remove.
6214         (shift patterns): Add CC handling variants.
6215         (bswaphi2): New.
6216         (bswapsi2): New.
6217         (rothi3): New.
6218         (define_peephole2): New peephole to recognize mov that sets CC for
6219         subsequent test.
6221 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6223         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
6224         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
6225         wi::add.
6227 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
6229         PR c/86420
6230         * real.c (real_nextafter): Return true if result is denormal.
6232 2018-07-09  Martin Liska  <mliska@suse.cz>
6234         * common.opt: Add back wrongly removed attribute.
6236 2018-07-09  Richard Biener  <rguenther@suse.de>
6238         PR debug/86413
6239         * dwarf2out.c (gen_block_die): For an early generated DIE
6240         always output high/low PC attributes.
6242 2018-07-09  Tom de Vries  <tdevries@suse.de>
6244         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
6245         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
6246         onto VAR_DECL with abstract origin.
6248 2018-07-07  Jim Wilson  <jimw@sifive.com>
6250         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
6252 2018-07-07  Tom de Vries  <tdevries@suse.de>
6254         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
6256 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
6258         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
6259         overflow_type.
6260         (combine_bound): Use wide-int overflow calculation instead of
6261         rolling our own.
6262         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
6263         overflow_type.
6264         * fold-const.c (int_const_binop_2): Same.
6265         (extract_muldiv_1): Same.
6266         (fold_div_compare): Same.
6267         (fold_abs_const): Same.
6268         * match.pd: Same.
6269         * poly-int.h (add): Same.
6270         (sub): Same.
6271         (neg): Same.
6272         (mul): Same.
6273         * predict.c (predict_iv_comparison): Same.
6274         * profile-count.c (slow_safe_scale_64bit): Same.
6275         * simplify-rtx.c (simplify_const_binary_operation): Same.
6276         * tree-chrec.c (tree_fold_binomial): Same.
6277         * tree-data-ref.c (split_constant_offset_1): Same.
6278         * tree-if-conv.c (idx_within_array_bound): Same.
6279         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
6280         * tree-ssa-phiopt.c (minmax_replacement): Same.
6281         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
6282         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
6283         * vr-values.c (vr_values::adjust_range_with_scev): Same.
6284         * wide-int.cc (wi::add_large): Same.
6285         (wi::mul_internal): Same.
6286         (wi::sub_large): Same.
6287         (wi::divmod_internal): Same.
6288         * wide-int.h: Change overflow type to overflow_type for neg, add,
6289         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
6290         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
6291         mul_internal, divmod_internal.
6292         (overflow_type): New enum.
6293         (accumulate_overflow): New.
6295 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
6297         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
6298         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
6300 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
6302         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
6303         argument is checked for zero before entering loop, avoid checking again.
6305 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
6307         * gimplify.h (generic_expr_could_trap_p): Set as global function.
6308         * gimplify.h (generic_expr_could_trap_p): Likwise.
6309         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
6311 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
6313         PR tree-optimization/86401
6314         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
6315         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
6316         (fold_bit_and_mask): ... here.  New helper function for match.pd.
6317         * fold-const.h (fold_bit_and_mask): Declare.
6318         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
6320 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
6322         PR target/86324
6323         * target.def (translate_mode_attribute): New hook.
6324         * targhooks.h (default_translate_mode_attribute): Declare.
6325         * targhooks.c (default_translate_mode_attribute): New function.
6326         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
6327         * doc/tm.texi: Regenerate.
6328         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
6329         (rs6000_translate_mode_attribute): New function.
6331 2018-07-06  Paul Koning  <ni1d@arrl.net>
6333         * doc/md.texi (define_split): Document DONE and FAIL.
6334         (define_peephole2): Ditto.
6336 2018-07-05  Jeff Law  <law@redhat.com>
6338         PR tree-optimization/86010
6339         * tree-ssa-dse.c (compute_trims): More aggressively trim at
6340         both the head and tail of mem* and str* calls.
6342 2018-07-05  Jim Wilson  <jimw@sifive.com>
6344         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
6346 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
6348         * config/aarch64/aarch64-simd.md: correct flags text for
6349         MIN_EXPR replacement.
6351 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
6353         * configure: Regenerated.
6355 2018-07-05  Carl Love  <cel@us.ibm.com>
6357         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
6358         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
6359         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
6360         VSX_BUILTIN_DOUBLEL_V4SF.
6362 2018-07-05  Martin Sebor  <msebor@redhat.com>
6364         PR c++/86400
6365         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
6366         than its domain to compute its the upper bound of a char array.
6368 2018-07-05  Nathan Sidwell  <nathan@acm.org>
6370         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
6371         * doc/cpp.texi: Update comment.
6372         * doc/tm.texi: Rebuilt.
6373         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
6374         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
6375         * doc/extend.texi (Backwards Compatibility): Clarify it is system
6376         headers affected by extern "C".
6377         * system.h: Poison NO_IMPLICIT_EXTERN_C.
6378         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
6379         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
6380         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
6381         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
6382         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
6383         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
6384         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
6385         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
6386         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
6387         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
6388         config/sparc/sp64-elf.h, config/spu/spu.h,
6389         config/stormy16/stormy16.h, config/v850/v850.h,
6390         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
6391         define NO_IMPLICIT_EXTERN_C.
6392         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
6394 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
6396         PR target/84711
6397         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
6398         instead of GET_MODE_SIZE when comparing Units.
6400 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
6402         PR target/84711
6403         * rtlanal.c (set_noop_p): Constrain on mode change,
6404         include hard-reg-set.h
6406 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
6408         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
6410 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
6412         Revert
6413         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
6415         PR sanitizer/84250
6416         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6417         libasan.
6418         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6420 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
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.
6427 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
6429         PR middle-end/86380
6430         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
6432 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
6434         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
6435         neg_*_op* variables.
6437 2018-07-04  Martin Liska  <mliska@suse.cz>
6439         * tree-switch-conversion.c: Define
6440         max_ratio_for_speed and max_ratio_for_size constants.
6442 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
6443             Martin Liska  <mliska@suse.cz>
6445         PR middle-end/66240
6446         PR target/45996
6447         PR c/84100
6448         * common.opt: Rename align options with 'str_' prefix.
6449         * common/config/i386/i386-common.c (set_malign_value): New
6450         function.
6451         (ix86_handle_option): Use it to set -falign-* options/
6452         * config/aarch64/aarch64-protos.h (struct tune_params): Change
6453         type from int to string.
6454         * config/aarch64/aarch64.c: Update default values from int
6455         to string.
6456         * config/alpha/alpha.c (alpha_override_options_after_change):
6457         Likewise.
6458         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
6459         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6460         max skip conditionally.
6461         * config/i386/freebsd.h (SUBALIGN_LOG): New.
6462         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6463         max skip conditionally.
6464         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6465         max skip conditionally.
6466         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
6467         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6468         max skip conditionally.
6469         * config/i386/i386.c (struct ptt): Change type from int to
6470         string.
6471         (ix86_default_align): Set default values.
6472         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
6473         max skip conditionally.
6474         * config/i386/iamcu.h (SUBALIGN_LOG): New.
6475         (ASM_OUTPUT_MAX_SKIP_ALIGN):
6476         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
6477         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6478         max skip conditionally.
6479         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
6480         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
6481         * config/i386/x86-64.h (SUBALIGN_LOG): New.
6482         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6483         max skip conditionally.
6484         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6485         * config/ia64/ia64.c (ia64_option_override): Set default values
6486         for alignment options.
6487         * config/m68k/m68k.c: Handle new str_align_* options.
6488         * config/mips/mips.c (mips_set_compression_mode): Change
6489         type of constants.
6490         (mips_option_override): Set default values for options.
6491         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
6492         Likewise.
6493         * config/rs6000/rs6000.c (rs6000_option_override_internal):
6494         Likewise.
6495         * config/rx/rx.c (rx_option_override): Likewise.
6496         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
6497         (LABEL_ALIGN): Use align_labels_log.
6498         (LOOP_ALIGN): Use align_loops_align.
6499         * config/s390/s390.c (s390_asm_output_function_label): Use new
6500         macros.
6501         * config/sh/sh.c (sh_override_options_after_change):
6502         Change type of constants.
6503         * config/spu/spu.c (spu_sched_init): Likewise.
6504         * config/sparc/sparc.c (sparc_option_override): Set default
6505         values for options.
6506         * config/visium/visium.c (visium_option_override): Likewise.
6507         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
6508         emit p2align format with last argument if it's not needed.
6509         * doc/invoke.texi: Document extended format of -falign-*.
6510         * final.c: Use align_labels alignment.
6511         * flags.h (struct target_flag_state): Change type to use
6512         align_flags.
6513         (struct align_flags_tuple): New.
6514         (struct align_flags): Likewise.
6515         (align_loops_log): Redefine macro to use new types.
6516         (align_loops_max_skip): Redefine macro to use new types.
6517         (align_jumps_log): Redefine macro to use new types.
6518         (align_jumps_max_skip): Redefine macro to use new types.
6519         (align_labels_log): Redefine macro to use new types.
6520         (align_labels_max_skip): Redefine macro to use new types.
6521         (align_functions_log): Redefine macro to use new types.
6522         (align_loops): Redefine macro to use new types.
6523         (align_jumps): Redefine macro to use new types.
6524         (align_labels): Redefine macro to use new types.
6525         (align_functions): Redefine macro to use new types.
6526         (align_functions_max_skip): Redefine macro to use new types.
6527         (align_loops_value): New macro.
6528         (align_jumps_value): New macro.
6529         (align_labels_value): New macro.
6530         (align_functions_value): New macro.
6531         * function.c (invoke_set_current_function_hook): Propagate
6532         alignment values from flags to global variables default in
6533         topleev.h.
6534         * ipa-icf.c (sem_function::equals_wpa): Use
6535         cl_optimization_option_eq instead of memcmp.
6536         * lto-streamer.h (cl_optimization_stream_out): Support streaming
6537         of string types.
6538         (cl_optimization_stream_in): Likewise.
6539         * optc-save-gen.awk: Support strings in cl_optimization.
6540         * opth-gen.awk: Likewise.
6541         * opts.c (finish_options): Remove error checking of invalid
6542         value ranges.
6543         (MAX_CODE_ALIGN): Remove.
6544         (MAX_CODE_ALIGN_VALUE): Likewise.
6545         (parse_and_check_align_values): New function.
6546         (check_alignment_argument): Likewise.
6547         (common_handle_option): Use check_alignment_argument.
6548         * opts.h (parse_and_check_align_values): Declare.
6549         * toplev.c (init_alignments): Remove.
6550         (read_log_maxskip): New.
6551         (parse_N_M): Likewise.
6552         (parse_alignment_opts): Likewise.
6553         (backend_init_target): Remove usage of init_alignments.
6554         * toplev.h (parse_alignment_opts): Declare.
6555         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
6556         argument.
6557         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
6558         * tree.c (cl_option_hasher::equal): New.
6559         * varasm.c: Use new global macros.
6561 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
6563         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
6564         Use a simpler align directive also if MAXSKIP = ALIGN-1.
6565         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6566         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6567         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6568         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6569         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
6570         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
6571         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
6572         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6573         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6574         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6575         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6577 2018-07-04  Martin Liska  <mliska@suse.cz>
6578             Jonathan Wakely  <jwakely@redhat.com>
6580         * coverage.c: Use correct type.
6581         * doc/invoke.texi: Language correction.
6583 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
6585         PR target/85620
6586         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
6587         ENDBRANCH for non-tail call which may return via indirect branch.
6588         * doc/extend.texi: Document indirect_return attribute.
6590 2018-07-03  Martin Sebor  <msebor@redhat.com>
6592         PR tree-optimization/86274
6593         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
6594         precondition.
6595         (format_floating): Correct handling of infinities and NaNs.
6597 2018-07-03  Martin Sebor  <msebor@redhat.com>
6599         * print-tree.c (print_real_cst): New function.
6600         (print_node_brief): Call it.
6601         (print_node): Ditto.
6603 2018-07-03  Jeff Law  <law@redhat.com>
6605         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
6606         into a single pattern.
6608         * config/h8300/h8300.md (ors code_iterator): New.
6609         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
6610         a single pattern and single splitter.
6611         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
6612         (iorqi3_1, xorqi3_1): Likewise.
6613         (iorqi3, xorqi3 expanders): Similarly.
6615         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
6616         (movmd_internal) into a single pattern using the P mode iterator.
6617         (movmd splitters): Similarly.
6618         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
6619         (movsd splitters): Similarly.
6621         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
6622         ADDB, ADDW and ADDL into a single ADD attribute which selects the
6623         right table based on the size of the operand.
6624         * config/h8300/h8300.md (length_table): Corresponding changes. All
6625         references to "addb", "addw" and "addl" changed to "add".
6626         (btst patterns): Merge two variants into a single pattern.
6627         (tstqi, tsthi): Likewise.
6628         (addhi3_incdec, addsi3_incdec): Likewise.
6629         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
6630         (mulhi3, mulsi3): Likewise.
6631         (udivhi3, udivsi3): Likewise.
6632         (divhi3, divsi3): Likewise.
6633         (andorqi3, andorhi3, andorsi3): Likewise.
6635 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
6637         PR target/85694
6638         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
6639         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
6641 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6643         PR tree-optimization/85694
6644         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
6645         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
6646         UNSPEC_URHADD.
6647         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
6648         (<u>avg<mode>3_ceil): New patterns.
6650 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
6652         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
6653         scan-tree-dump directive.
6654         * gcc.dg/vect/slp-perm-2.c: Likewise.
6655         * gcc.dg/vect/slp-perm-3.c: Likewise.
6656         * gcc.dg/vect/slp-perm-5.c: Likewise.
6657         * gcc.dg/vect/slp-perm-6.c: Likewise.
6658         * gcc.dg/vect/slp-perm-7.c: Likewise.
6659         * gcc.dg/vect/slp-perm-8.c: Likewise.
6661 2018-07-03  Marek Polacek  <polacek@redhat.com>
6663         PR middle-end/86202
6664         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
6666 2018-07-03  Richard Biener  <rguenther@suse.de>
6668         PR ipa/86389
6669         * tree-ssa-structalias.c (find_func_clobbers): Properly
6670         handle indirect calls.
6672 2018-07-03  Jeff Law  <law@redhat.com>
6674         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
6675         (shifts): New code iterator.
6676         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
6677         expander.  Fix HImode handling on H8/SX.
6678         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
6679         (subqi3, subhi3, subsi3 expanders): Likewise.
6680         (andqi3, andhi3, andsi3 expanders): Likewise.
6681         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
6682         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
6683         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
6684         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
6685         (zero_extendqihi2, zero_extendqisi2): Likewise.
6686         (extendqihi2, extendqisi2): Likewise.
6687         (rotlqi3, rotlhi3, rotlsi3): Likewise.
6688         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
6689         (rotlqi3_1, rotlhi3_1): Likewise.
6690         (logicalhi3_sn, logicalsi3_sn): Likewise.
6691         (logicalhi3, logicalsi3): Likewise.
6693 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6695         * tree-vect-patterns.c (vect_recog_rotate_pattern)
6696         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6697         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
6698         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
6699         type to append_pattern_def_seq instead of creating a stmt_vec_info
6700         directly.
6701         (build_mask_conversion): Likewise.  Remove vinfo argument.
6702         (vect_add_conversion_to_patterm): Likewise, renaming to...
6703         (vect_add_conversion_to_pattern): ...this.
6704         (vect_recog_mask_conversion_pattern): Update call to
6705         build_mask_conversion.  Pass the vector type to
6706         append_pattern_def_seq here too.
6707         (vect_recog_gather_scatter_pattern): Update call to
6708         vect_add_conversion_to_pattern.
6710 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6712         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
6713         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6714         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
6715         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
6716         STMT_VINFO_PATTERN_DEF_SEQ to null here.
6717         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
6718         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
6719         append_pattern_def_seq instead of new_pattern_def_seq.
6720         (vect_recog_divmod_pattern): Do both of the above.
6721         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
6722         is null.
6724 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6726         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
6727         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
6728         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
6729         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
6730         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
6731         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6732         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
6733         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6734         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6735         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
6736         parameter with a single stmt_vec_info.
6737         (vect_recog_func_ptr): Likewise.
6738         (vect_recog_gather_scatter_pattern): Likewise, folding in...
6739         (vect_try_gather_scatter_pattern): ...this.
6740         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
6741         the stmt_vec_info of the statement to be matched.  Don't clear
6742         STMT_VINFO_RELATED_STMT.
6743         (vect_pattern_recog): Update call accordingly.
6745 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6747         PR tree-optimization/85694
6748         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
6749         (uavgM3_ceil): Document new optabs.
6750         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
6751         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
6752         functions.
6753         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
6754         (savg_ceil_optab): New optabs.
6755         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
6756         (vect_vect_recog_func_ptrs): Add it.
6757         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
6758         constant directly from the associated lhs.
6760 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6762         * tree-vect-patterns.c (vect_split_statement): New function.
6763         (vect_convert_input): Use it to try to split an existing cast.
6765 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6767         * poly-int.h (print_hex): New function.
6768         * dumpfile.h (dump_dec, dump_hex): Declare.
6769         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
6770         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
6771         min_input_precision, operation_precision and operation_sign.
6772         * tree-vect-patterns.c (vect_get_range_info): New function.
6773         (vect_same_loop_or_bb_p, vect_single_imm_use)
6774         (vect_operation_fits_smaller_type): Delete.
6775         (vect_look_through_possible_promotion): Add an optional
6776         single_use_p parameter.
6777         (vect_recog_over_widening_pattern): Rewrite to use new
6778         stmt_vec_info infomration.  Handle one operation at a time.
6779         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
6780         (vect_truncatable_operation_p, vect_set_operation_type)
6781         (vect_set_min_input_precision): New functions.
6782         (vect_determine_min_output_precision_1): Likewise.
6783         (vect_determine_min_output_precision): Likewise.
6784         (vect_determine_precisions_from_range): Likewise.
6785         (vect_determine_precisions_from_users): Likewise.
6786         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
6787         (vect_vect_recog_func_ptrs): Put over_widening first.
6788         Add cast_forwprop.
6789         (vect_pattern_recog): Call vect_determine_precisions.
6791 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6793         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
6794         statements that have been replaced by further pattern statements.
6795         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
6797 2018-07-03  Richard Biener  <rguenther@suse.de>
6799         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
6800         always set *dt.  Dump vectype in vectype overload.
6801         * dumpfile.h (dump_gimple_expr): New function.
6802         (dump_gimple_expr_loc): Likewise.
6803         * dumpfile.c (dump_gimple_expr): New function.
6804         (dump_gimple_expr_loc): Likewise.
6806 2018-07-02  Jeff Law  <law@redhat.com>
6808         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
6809         the H8/300, H8/300H and H8/S variants into a single pattern.
6810         (movhi_h8300, movqi_h8300hs): Similarly.
6811         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
6812         (QHI mode iterator): New.
6814         * config/h8300/h8300.md: Remove trailing whitespace.
6816 2018-07-02  Jim Wilson  <jimw@sifive.com>
6818         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
6819         instead of emit_insn for interrupt returns.
6820         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
6821         (riscv_sret, riscv_uret): Likewise.
6823 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
6825         * pretty-print.c (selftest::test_pp_format): Move save and restore
6826         of quotes to class auto_fix_quotes, and add an instance.
6827         * selftest.c: Include "intl.h".
6828         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
6829         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
6830         * selftest.h (selftest::auto_fix_quotes): New class.
6832 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
6834         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
6835         (aarch64_sve_prepare_conditional_op): Remove.
6836         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
6837         Allow aarch64_simd_reg_or_zero as select operand; remove
6838         the aarch64_sve_prepare_conditional_op call.
6839         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
6840         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6841         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
6842         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
6843         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
6844         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
6845         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
6846         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
6847         and a splitters to match all of the *_any patterns.
6848         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
6850         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
6851         (SVE_COND_FP_BINARY_REV): Remove.
6852         (sve_int_op_rev, sve_fp_op_rev): New.
6853         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
6854         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
6855         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
6856         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
6857         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
6858         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
6859         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
6860         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
6861         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
6863         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
6864         Remove match_dup 1 from the inner unspec.
6865         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6867         * config/aarch64/aarch64.md (movprfx): New attr.
6868         (length): Default movprfx to 8.
6869         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
6870         (*madd<SVE_I>, *msub<SVE_I): Likewise.
6871         (*<su>mul<SVE_I>3_highpart): Likewise.
6872         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
6873         (*v<ASHIFT><SVE_I>3): Likewise.
6874         (*<su><MAXMIN><SVE_I>3): Likewise.
6875         (*<su><MAXMIN><SVE_F>3): Likewise.
6876         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
6877         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
6878         (*div<SVE_F>4): Likewise.
6880 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
6882         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
6883         in dump string.
6885 2018-07-02  Richard Biener  <rguenther@suse.de>
6887         PR tree-optimization/86363
6888         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
6889         memset argument refers to a non-variable address.
6891 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
6893         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
6894         {PLUS,MINUS}_EXPR code to...
6895         (adjust_symbolic_bound): ...here,
6896         (combine_bound): ...here,
6897         (set_value_range_with_overflow): ...and here.
6899 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
6901         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
6902         code...
6903         (extract_range_from_abs_expr): ...here.
6905 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
6907         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
6908         -fno-omit-frame-pointer when not optimizing.
6910 2018-07-02  Martin Liska  <mliska@suse.cz>
6912         PR ipa/86279
6913         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
6914         (propagate_nothrow): Likewise.
6916 2018-07-02  Martin Liska  <mliska@suse.cz>
6918         PR ipa/86323
6919         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
6921 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
6923         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
6924         function in r262149, changing "loc" param from source_location to
6925         const dump_location_t &.
6926         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
6927         declaration, as above.
6929 2018-07-01  Paul Koning  <ni1d@arrl.net>
6931         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
6932         -munit-asm, -mgnu-asm, -mdec-asm.
6933         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
6934         (pdp11_output_labelref): New.
6935         (pdp11_output_def): New.
6936         (pdp11_output_addr_vec_elt): New.
6937         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
6938         %# and %@ format codes.
6939         (pdp11_option_override): New.
6940         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
6941         (pdp11_output_ident): New.
6942         (pdp11_asm_named_section): New.
6943         (pdp11_asm_init_sections): New.
6944         (pdp11_file_start): New.
6945         (pdp11_file_end): New.
6946         (output_ascii): Use .ascii/.asciz for -mdec-asm.
6947         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
6948         %o, like %c but octal.
6949         (pdp11_option_override): New.
6950         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
6951         -mdec-asm.
6952         (DATA_SECTION_ASM_OP): Ditto.
6953         (READONLY_DATA_SECTION_ASM_OP): New.
6954         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
6955         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
6956         (ASM_OUTPUT_LABELREF): Ditto.
6957         (ASM_OUTPUT_DEF): Ditto.
6958         (ASM_OUTPUT_EXTERNAL): New.
6959         (ASM_OUTPUT_SOURCE_FILENAME): New.
6960         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
6961         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
6962         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
6963         %# and %@ format codes.
6964         * config/pdp11/pdp11.opt (mgnu-asm): New.
6965         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
6966         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
6967         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
6969 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
6971         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
6972         dereferencing path[] beyond its length.
6973         (debug_path): New.
6974         (debug_all_paths): New.
6975         (rewire_first_differing_edge): New.
6976         (adjust_paths_after_duplication): New.
6977         (duplicate_thread_path): Call adjust_paths_after_duplication.
6978         Add new argument.
6979         (thread_through_all_blocks): Add new argument to
6980         duplicate_thread_path.
6982 2018-06-30  Jim Wilson  <jimw@sifive.com>
6984         * config/riscv/predicates.md (p2m1_shift_operand): New.
6985         (high_mask_shift_operand): New.
6986         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
6987         pattern using p2m1_shift_operand.
6988         (lshsi3_zero_extend_3+2): New combiner pattern using
6989         high_mask_shift_operand.
6991 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
6993         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
6994         split out from...
6995         (vect_recog_rotate_pattern): ...here.
6996         (vect_convert_input): Try to insert casts of invariants in the
6997         preheader.
6998         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
6999         preheader to be empty.
7001 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
7003         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
7004         vector type.  If given, install it in the new statement's
7005         STMT_VINFO_VECTYPE.
7006         (vect_element_precision): New function.
7007         (vect_unpromoted_value): New struct.
7008         (vect_unpromoted_value::vect_unpromoted_value): New function.
7009         (vect_unpromoted_value::set_op): Likewise.
7010         (vect_look_through_possible_promotion): Likewise.
7011         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
7012         (vect_widened_op_tree, vect_convert_input): Likewise.
7013         (vect_convert_inputs, vect_convert_output): Likewise.
7014         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
7015         to handle the optional cast of the multiplication result and
7016         vect_widened_op_tree to detect the widened multiplication itself.
7017         Do not require the input and output of promotion casts to have
7018         the same sign, but base the signedness of the operation on the
7019         input rather than the result.  If the pattern includes two
7020         promotions, check that those promotions have the same sign.
7021         Do not restrict the MULT_EXPR handling to a double-width result;
7022         handle quadruple-width results and wider.  Use vect_convert_inputs
7023         to convert the inputs to the common type.
7024         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
7025         to handle the optional cast of the ABS result.  Also allow a sign
7026         change or a sign extension between the ABS and MINUS.
7027         Use vect_widened_op_tree to detect the widened subtraction and use
7028         vect_convert_inputs to convert the inputs to the common type.
7029         (vect_handle_widen_op_by_const): Delete.
7030         (vect_recog_widen_op_pattern): New function.
7031         (vect_recog_widen_mult_pattern): Use it.
7032         (vect_recog_widen_shift_pattern): Likewise.
7033         (vect_recog_widen_sum_pattern): Use
7034         vect_look_through_possible_promotion to handle the promoted
7035         PLUS_EXPR operand.
7037 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
7039         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
7040         the containing gimple_seq *.
7041         * gimple-iterator.h (gsi_for_stmt): Declare it.
7042         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
7043         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
7044         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
7045         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
7046         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
7047         checks.
7048         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
7049         split out from...
7050         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
7051         statement being replaced is part of an existing pattern
7052         definition sequence, inserting the new pattern statements before
7053         the original one.
7054         (vect_pattern_recog_1): Don't return a bool.  If the statement
7055         is already part of a pattern, instead apply pattern matching
7056         to the pattern definition statements.  Don't clear the
7057         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
7058         (vect_pattern_recog): Don't break after the first match;
7059         continue processing the pattern definition statements instead.
7060         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
7062 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
7064         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
7065         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7066         (vect_recog_widen_sum_pattern): Use it.
7068 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
7070         * tree-vect-loop.c (vectorizable_reduction): Assert that the
7071         phi is not a pattern statement and has not been replaced by
7072         a pattern statement.
7073         * tree-vect-patterns.c (type_conversion_p): Don't check
7074         STMT_VINFO_IN_PATTERN_P.
7075         (vect_recog_vector_vector_shift_pattern): Likewise.
7076         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
7077         the pattern statement rather than the original statement; check
7078         directly for a WIDEN_MULT_EXPR here.
7079         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
7080         vect_is_simple_use to return the pattern statement rather
7081         than the original statement; use is_pattern_stmt_p to check
7082         for such a pattern statement.
7083         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
7084         to return the pattern statement rather than the original statement;
7085         don't do the same transformation here.
7086         (vect_is_simple_use): If the defining statement has been replaced
7087         by a pattern statement, return the pattern statement instead.
7088         Remove the corresponding (local) transformation from the vectype
7089         overload.
7091 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
7093         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
7094         end and default to null.
7095         * tree-vect-loop.c (vect_create_epilog_for_reduction)
7096         (vectorizable_reduction): Update calls accordingly, dropping the
7097         gimple ** argument if the passed-back statement isn't needed.
7098         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
7099         (vect_recog_rotate_pattern): Likewise.
7100         (vect_recog_mask_conversion_pattern): Likewise.
7101         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
7102         (vect_mask_constant_operand_p): Likewise.
7103         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
7104         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
7105         (get_group_load_store_type, get_load_store_type): Likewise.
7106         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
7107         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
7108         (vectorizable_conversion, vectorizable_assignment): Likewise.
7109         (vectorizable_shift, vectorizable_operation): Likewise.
7110         (vectorizable_store, vect_is_simple_cond): Likewise.
7111         (vectorizable_condition, vectorizable_comparison): Likewise.
7112         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
7113         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
7114         and move it to the end.  Cope with null def_stmt_outs.
7116 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7118         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
7120 2018-06-29  Jeff Law  <law@redhat.com>
7122         * config/v850/v850.c (v850_legitimate_address_p): Handle large
7123         displacements for TARGET_V850E2V3 and newer.
7124         (TARGET_LRA_P): Remove.  Defaults to LRA now.
7125         * config/v850/v850.md (sign23byte_load): Remove.
7126         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
7127         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
7129 2018-06-29  Martin Liska  <mliska@suse.cz>
7131         PR lto/85759
7132         * coverage.c (coverage_init): Mangle full path name.
7133         * doc/invoke.texi: Document the change.
7134         * gcov-io.c (mangle_path): New.
7135         * gcov-io.h (mangle_path): Likewise.
7136         * gcov.c (mangle_name): Use mangle_path for path mangling.
7138 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7140         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
7141         if starting source register is not even.
7143 2018-06-29  Martin Liska  <mliska@suse.cz>
7145         PR tree-optimization/86263
7146         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
7147         Make edge redirection.
7149 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
7151         * dumpfile.c (dump_loc): Add indentation based on scope depth.
7152         (dump_scope_depth): New variable.
7153         (get_dump_scope_depth): New function.
7154         (dump_begin_scope): New function.
7155         (dump_end_scope): New function.
7156         * dumpfile.h (get_dump_scope_depth): New declaration.
7157         (dump_begin_scope): New declaration.
7158         (dump_end_scope): New declaration.
7159         (class auto_dump_scope): New class.
7160         (AUTO_DUMP_SCOPE): New macro.
7161         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
7162         AUTO_DUMP_SCOPE.
7164 2018-06-29  Richard Biener  <rguenther@suse.de>
7166         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
7167         compute_all_dependences succeeds.
7168         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
7169         exceed --param loop-max-datarefs-for-datadeps.
7171 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
7173         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
7175 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
7177         PR target/86348
7178         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
7179         alternative 0 in preferred_for_speed attribute.
7181 2018-06-28  Paul Koning  <ni1d@arrl.net>
7183         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
7184         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
7185         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
7186         * config/pdp11/pdp11.md: Correct "length" attribute calculation
7187         for shift insn patterns.
7189 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
7191         * cgraph.c (cgraph_node::get_body): Replace assignments to
7192         "dump_file" with calls to set_dump_file.
7193         * dumpfile.c (alt_dump_file): Make static, and group with...
7194         (alt_flags): ...this definition.
7195         (dumps_are_enabled): New variable.
7196         (refresh_dumps_are_enabled): New function.
7197         (set_dump_file): New function.
7198         (set_alt_dump_file): New function.
7199         (gcc::dump_manager::dump_start): Replace assignments to
7200         "dump_file" and "alt_dump_file" with calls to set_dump_file and
7201         set_alt_dump_file.
7202         (gcc::dump_manager::dump_finish): Likewise.
7203         * dumpfile.h (alt_dump_file): Delete decl.
7204         (dumps_are_enabled): New variable decl.
7205         (set_dump_file): New function decl.
7206         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
7207         global.
7208         * tree-nested.c (lower_nested_functions): Replace assignments to
7209         "dump_file" with calls to set_dump_file.
7211 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
7213         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
7214         goto_locus of each outgoing edge of each basic block.
7216 2018-06-28  Richard Biener  <rguenther@suse.de>
7218         * dwarf2out.c (decl_scope_table): Remove.
7219         (push_decl_scope): Likewise.
7220         (pop_decl_scope): Likewise.
7221         (gen_type_die_for_member): Do not call push/pop_decl_scope.
7222         (gen_struct_or_union_type_die): Likewise.
7223         (gen_tagged_type_die): Likewise.
7224         (dwarf2out_init): Do not initialize decl_scope_table.
7225         (dwarf2out_c_finalize): Do not free it.
7227 2018-06-28  Richard Biener  <rguenther@suse.de>
7229         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
7230         deciding whether to not re-use a DIE.
7232 2018-06-28  Richard Biener  <rguenther@suse.de>
7234         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
7235         DW_AT_abstract_origin attribute.
7237 2018-06-28  Martin Liska  <mliska@suse.cz>
7239         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7240         Use newly introduced constants.
7241         * tree-switch-conversion.h (struct jump_table_cluster):
7242         Define max_ratio_for_size and max_ratio_for_speed.
7244 2018-06-28  Martin Liska  <mliska@suse.cz>
7246         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7247         Add new checking assert to catch invalid state.
7248         (jump_table_cluster::can_be_handled): Handle single case
7249         clusters.
7250         (jump_table_cluster::is_beneficial): Bail out for such case.
7251         (bit_test_cluster::find_bit_tests):
7252         Add new checking assert to catch invalid state.
7253         (bit_test_cluster::can_be_handled): Handle single case
7254         clusters.
7255         (bit_test_cluster::is_beneficial): Bail out for such case.
7256         (switch_decision_tree::analyze_switch_statement):
7257         Fix comment.
7259 2018-06-28  Martin Liska  <mliska@suse.cz>
7261         * common.opt: Introduce -completion option.
7262         * gcc.c (driver_handle_option): Handle it.
7263         (driver::main): Print completions if completion
7264         is set.
7265         * opt-suggestions.c (option_proposer::get_completions):
7266         New function.
7267         (option_proposer::suggest_completion): Likewise.
7268         (option_proposer::find_param_completions): Likewise.
7269         (verify_autocompletions): Likewise.
7270         (test_completion_valid_options): Likewise.
7271         (test_completion_valid_params): Likewise.
7272         (in_completion_p): Likewise.
7273         (empty_completion_p): Likewise.
7274         (test_completion_partial_match): Likewise.
7275         (test_completion_garbage): Likewise.
7276         (opt_proposer_c_tests): Likewise.
7277         * opt-suggestions.h: Declare new functions.
7278         * opts.c (common_handle_option): Handle OPT__completion_.
7279         * selftest-run-tests.c (selftest::run_tests): Add
7280         opt_proposer_c_tests.
7281         * selftest.c (assert_str_startswith): New.
7282         * selftest.h (assert_str_startswith): Likewise.
7283         (opt_proposer_c_tests): New.
7284         (ASSERT_STR_STARTSWITH): Likewise.
7286 2018-06-28  Martin Liska  <mliska@suse.cz>
7288         * Makefile.in: Add opt-suggestions.o.
7289         * gcc-main.c: Include opt-suggestions.h.
7290         * gcc.c (driver::driver): Likewise.
7291         (driver::~driver): Remove m_option_suggestions.
7292         (driver::build_option_suggestions): Moved to option_proposer.
7293         (driver::suggest_option): Likewise.
7294         (driver::handle_unrecognized_options): Use option_proposer.
7295         * gcc.h (class driver): Add new memver m_option_proposer.
7296         * opt-suggestions.c: New file.
7297         * opt-suggestions.h: New file.
7299 2018-06-28  Martin Liska  <mliska@suse.cz>
7301         * vec.h (class auto_string_vec): New (moved from auto_argvec).
7302         (auto_string_vec::~auto_string_vec): Likewise.
7304 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
7306         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
7307         prevent_decl_creation_for_types fields up and add reset_location field.
7308         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
7309         statement if id->reset_location is true.
7310         (copy_edges_for_bb): Do not set goto_locus on the new edges if
7311         id->reset_location is true.
7312         (copy_phis_for_bb): Force input_location on the arguments if
7313         id->reset_location is true.
7314         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
7315         is set on the function to be inlined.
7317 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
7319         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
7321 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
7323         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
7324         registers for Pmode.
7325         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
7326         hard registers for the clobbered pseudo.
7328 2018-06-27  Paul Koning  <ni1d@arrl.net>
7330         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
7331         mutually exclusive options.
7332         * config/pdp11/constraints.md (h): New constraint.
7333         (O): Update definition to match shift code generation.
7334         (D): New constraint.
7335         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
7336         (CCFP): Remove.
7337         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
7338         function.
7339         (output_jump): Change arguments.
7340         (pdp11_fixed_cc_regs): New function.
7341         (pdp11_cc_mode): Ditto.
7342         (pdp11_expand_shift): Ditto.
7343         (pdp11_assemble_shift): Ditto.
7344         (pdp11_small_shift): Ditto.
7345         (pdp11_branch_cost): Remove.
7346         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
7347         from output.
7348         (pdp11_register_move_cost): Update for CC registers.
7349         (pdp11_rtx_costs): Add case for LSHIFTRT.
7350         (pdp11_output_jump): Add CCNZ mode conditional branches.
7351         (notice_update_cc_on_set): Remove.
7352         (pdp11_cc_mode): New function.
7353         (simple_memory_operand): Correct pre/post decrement case.
7354         (no_side_effect_operand): New function.
7355         (pdp11_regno_reg_class): Add CC_REGS class.
7356         (pdp11_fixed_cc_regs): New function.
7357         (pdp11_small_shift): New function.
7358         (pdp11_expand_shift): New function to expand shift insns.
7359         (pdp11_assemble_shift): New function to output shifts.
7360         (pdp11_branch_cost): Remove.
7361         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
7362         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
7363         (WCHAR_TYPE): Ditto.
7364         (PTRDIFF_TYPE): Ditto.
7365         (ADJUST_INSN_LENGTH): New macro.
7366         (FIXED_REGISTERS): Add CC registers.
7367         (CALL_USED_REGISTERS): Ditto.
7368         (reg_class): Ditto.
7369         (REG_CLASS_NAMES): Ditto.
7370         (REG_CLASS_CONTENTS): Ditto.
7371         (SELECT_CC_MODE): Use new function.
7372         (TARGET_FLAGS_REGNUM): New macro.
7373         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
7374         (cc0_reg_rtx): Remove.
7375         (CC_STATUS_MDEP): Remove.
7376         (CC_STATUS_MDEFP_INIT): Remove.
7377         (CC_IN_FPU): Remove.
7378         (NOTICE_UPDATE_CC): Remove.
7379         (REGISTER_NAMES): Add CC registers.
7380         (BRANCH_COST): Change to constant 1.
7381         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
7382         handling.
7383         * config/pdp11/pdp11.opt (mbcopy): Remove.
7384         (mbcopy-builtin): Remove.
7385         (mbranch-cheap): Remove.
7386         (mbranch-expensive): Remove.
7387         * config/pdp11/predicates.md (expand_shift_operand): Update to
7388         match shift code generation.
7389         (ccnz_operator): New predicate.
7390         * doc/invoke.texi (PDP-11 Options): Remove deleted options
7391         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
7392         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
7393         exclusive options.
7394         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
7395         description of O constraint.
7397 2018-06-27  Jeff Law  <law@redhat.com>
7398             Austin Law  <austinklaw@gmail.com>
7400         * config/v850/v850.md (addsi3_set_flags): New pattern.
7401         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
7402         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
7403         (zero_extendhisi2_v850_set_flags): Likewise.
7404         (zero_extendqisi2_v850_set_flags): Likewise.
7405         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
7406         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
7407         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
7409         * config/v850/v850-protos.h (notice_update_cc): Remove.
7410         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
7411         (v850_print_operand): Handle 'D' and "d".
7412         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
7413         Add handling of arithmetic/logical operations compared against zero.
7414         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
7415         Do not look at v850_compare_op, instead get mode from last argument.
7416         (v850_gen_compare): Remove
7417         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
7418         after reload for prologue insns.
7419         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
7420         patterns.
7421         (construct_save_jarl): Likewise.
7422         (TARGET_FLAGS_REGNUM): Define.
7423         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
7424         (NOTICE_UPDATE_CC): Remove.
7425         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
7426         than cc0.  Conditionalize on reload_completed.
7427         (cmpsi_insn, setfcc_insn): Likewise.
7428         (tst1 splitter): Turn into define_and_split which sets the flags
7429         after reload.
7430         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
7431         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
7432         (cstoresf4, cstoredf4): Clobber the flags.
7433         (cmpsi, cmpsf, cmpdf): Remove expanders.
7434         (setf_insn): Remove pattern.
7435         (addsi3): Turn into define_and_split which clobbers the flags after
7436         reload and a suitable pattern (addsi3_clobber_flags) for use after
7437         reload.
7438         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
7439         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
7440         (ashrsi3, ashrsi3_v850e2): Likewise.
7441         (bins): Clobber the flags.
7442         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
7443         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
7444         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
7445         (call_value_internal_short, call_value_internal_long): Likewise.
7446         (callt_save_interrupt, callt_return_interrupt): Likewise.
7447         (save_interrupt, return_interrupt): Likewise.
7448         (callt_save_all_interrupt, save_all_interrupt): Likewise.
7449         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
7450         (restore_all_interrupt, _restore_all_interrupt): Likewise.
7451         (All FP comparisons): Only allow after reload has completed.
7452         (trfsr): Likewise.
7453         (divh, divhu): Tweak output template.
7454         (branch_z_normal, branch_z_invert): Remove
7455         (branch_nz_normal, branch_nz_invert): Likewise.
7456         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
7458         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
7459         * config/v850/v850.c (notice_update_cc): Remove.
7460         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
7461         (CC_NO_CARRY): Likewise.
7462         (NOTICE_UPDATE_CC): Define to nothing.
7463         * config/v850/v850.md: Remove block comment on cc0 handling
7464         Remove "cc" attribute from all patterns.  Remove cc_status handling
7465         from all patterns.  Minor formatting fixes.
7467 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7469         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
7470         (cortex-a76.cortex-a55): Likewise.
7471         * config/aarch64/aarch64-tune.md: Regenerate.
7472         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
7473         cortex-a76.cortex-a55.
7475 2018-06-27  Jeff Law  <law@redhat.com>
7477         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
7478         (MULTILIB_DIRNAMES): Similarly.
7480 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
7482         * gimple.h (gimple_return_retbnd): Delete.
7483         (gimple_return_set_retbnd): Likewise.
7484         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
7485         gimple_return_set_retbnd.
7486         * gimple-pretty-print.c (dump_gimple_return): Remove call to
7487         gimple_return_retbnd and adjust.
7488         * tree-inline.h (struct copy_body_data): Remove retbnd field.
7489         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
7490         Explicitly return NULL in a couple more cases.  Move assertion
7491         on debug statements and remove unreachable code.
7492         (reset_debug_binding): Do not test id->retbnd.
7493         (expand_call_inline): Do not set it.
7495 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
7497         * configure.ac: Add --disable-gcov option.
7498         * configure: Regenerate.
7499         * Makefile.in: Honour @enable_gcov@.
7500         * doc/install.texi: Document --disable-gcov.
7502 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7504         * config/arm/arm-cpus.in (cortex-a76): New entry.
7505         (cortex-a76.cortex-a55): Likewise.
7506         * config/arm/arm-tables.opt: Regenerate.
7507         * config/arm/arm-tune.md: Likewise.
7508         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
7509         * doc/invoke.texi (ARM Options): Document cortex-a76 and
7510         cortex-a76.cortex-a55.
7512 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
7514         PR target/85769
7515         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
7517 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
7519         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
7520         comment.
7521         (EPILOGUE_USES): Likewise.
7523 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
7525         * tree-inline.c (remap_location): New function extracted from...
7526         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
7527         (copy_phis_for_bb): ...here.  Call remap_location.
7528         (copy_cfg_body): Adjust call to copy_edges_for_bb.
7530 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
7532         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
7533         unaligned vsx for 16B memset.
7535 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
7537         PR target/86285
7538         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
7539         ieee128_float_type_node to long_double_type_node unless
7540         TARGET_LONG_DOUBLE_128 is set.
7542 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
7544         * cfgloop.c (get_loop_location): Convert return type from
7545         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
7546         by implicit construction from rtx_insn *, and using
7547         dump_user_location_t::from_function_decl for the fallback case.
7548         * cfgloop.h (get_loop_location): Convert return type from
7549         location_t to dump_user_location_t.
7550         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
7551         dump_printf_loc to pass in a dump_location_t rather than a
7552         location_t, via the gimple stmt.
7553         * coverage.c (get_coverage_counts): Update calls to
7554         dump_printf_loc to pass in dump_location_t rather than a
7555         location_t.
7556         * doc/optinfo.texi (Dump types): Convert example of
7557         dump_printf_loc from taking "locus" to taking "insn".  Update
7558         description of the "_loc" calls to cover dump_location_t.
7559         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
7560         "selftest.h".
7561         (dump_user_location_t::dump_user_location_t): New constructors,
7562         from gimple *stmt and rtx_insn *.
7563         (dump_user_location_t::from_function_decl): New function.
7564         (dump_loc): Make static.
7565         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
7566         const dump_location_t &.
7567         (dump_generic_expr_loc): Delete.
7568         (dump_printf_loc): Convert param "loc" from location_t to
7569         const dump_location_t &.
7570         (selftest::test_impl_location): New function.
7571         (selftest::dumpfile_c_tests): New function.
7572         * dumpfile.h: Include "profile-count.h".
7573         (class dump_user_location_t): New class.
7574         (struct dump_impl_location_t): New struct.
7575         (class dump_location_t): New class.
7576         (dump_printf_loc): Convert 2nd param from source_location to
7577         const dump_location_t &.
7578         (dump_generic_expr_loc): Delete.
7579         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
7580         const dump_location_t &.
7581         * gimple-fold.c (fold_gimple_assign): Update call to
7582         dump_printf_loc to pass in a dump_location_t rather than a
7583         location_t, via the gimple stmt.
7584         (gimple_fold_call): Likewise.
7585         * gimple-loop-interchange.cc
7586         (loop_cand::analyze_iloop_reduction_var): Update for change to
7587         check_reduction_path.
7588         (tree_loop_interchange::interchange): Update for change to
7589         find_loop_location.
7590         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
7591         change in return-type of find_loop_location.
7592         (graphite_regenerate_ast_isl): Likewise.
7593         * graphite-optimize-isl.c (optimize_isl): Likewise.
7594         * graphite.c (graphite_transform_loops): Likewise.
7595         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
7596         pass in a dump_location_t rather than a location_t, via the
7597         gimple stmt.
7598         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7599         * ipa.c (walk_polymorphic_call_targets): Likewise.
7600         * loop-unroll.c (report_unroll): Convert "locus" param from
7601         location_t to dump_location_t.
7602         (decide_unrolling): Update for change to get_loop_location's
7603         return type.
7604         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
7605         location_t to dump_user_location_t.
7606         (grid_find_single_omp_among_assignments_1): Updates calls to
7607         dump_printf_loc to pass in a dump_location_t rather than a
7608         location_t, via the gimple stmt.
7609         (grid_parallel_clauses_gridifiable): Convert "tloc" from
7610         location_t to dump_location_t.  Updates calls to dump_printf_loc
7611         to pass in a dump_location_t rather than a location_t, via the
7612         gimple stmt.
7613         (grid_inner_loop_gridifiable_p): Likewise.
7614         (grid_dist_follows_simple_pattern): Likewise.
7615         (grid_gfor_follows_tiling_pattern): Likewise.
7616         (grid_target_follows_gridifiable_pattern): Likewise.
7617         (grid_attempt_target_gridification): Convert initialization
7618         of local "grid" from memset to zero-initialization; FIXME: does
7619         this require C++11?  Update call to dump_printf_loc to pass in a
7620         optinfo_location rather than a location_t, via the gimple stmt.
7621         * profile.c (read_profile_edge_counts): Updates call to
7622         dump_printf_loc to pass in a dump_location_t rather than a
7623         location_t
7624         (compute_branch_probabilities): Likewise.
7625         * selftest-run-tests.c (selftest::run_tests): Call
7626         dumpfile_c_tests.
7627         * selftest.h (dumpfile_c_tests): New decl.
7628         * tree-loop-distribution.c (pass_loop_distribution::execute):
7629         Update for change in return type of find_loop_location.
7630         * tree-parloops.c (parallelize_loops): Likewise.
7631         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
7632         "locus" from location_t to dump_user_location_t.
7633         (canonicalize_loop_induction_variables): Likewise.
7634         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
7635         for change in return type of find_loop_location.
7636         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
7637         to dump_printf_loc to pass in a dump_location_t rather than a
7638         location_t, via the stmt.
7639         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
7640         Likewise.
7641         * tree-vect-loop-manip.c (find_loop_location): Convert return
7642         type from source_location to dump_user_location_t.
7643         (vect_do_peeling): Update for above change.
7644         (vect_loop_versioning): Update for change in type of
7645         vect_location.
7646         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
7647         from location_t to dump_user_location_t.
7648         (vect_estimate_min_profitable_iters): Update for change in type
7649         of vect_location.
7650         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
7651         location_t to dump_location_t.
7652         (vect_slp_bb): Update for change in type of vect_location.
7653         * tree-vectorizer.c (vect_location): Convert from source_location
7654         to dump_user_location_t.
7655         (try_vectorize_loop_1): Update for change in vect_location's type.
7656         (vectorize_loops): Likewise.
7657         (increase_alignment): Likewise.
7658         * tree-vectorizer.h (vect_location): Convert from source_location
7659         to dump_user_location_t.
7660         (find_loop_location): Convert return type from source_location to
7661         dump_user_location_t.
7662         (check_reduction_path): Convert 1st param from location_t to
7663         dump_user_location_t.
7664         * value-prof.c (check_counter): Update call to dump_printf_loc to
7665         pass in a dump_user_location_t rather than a location_t; update
7666         call to error_at for change in type of "locus".
7667         (check_ic_target): Update call to dump_printf_loc to
7668         pass in a dump_user_location_t rather than a location_t, via the
7669         call_stmt.
7671 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
7673         * config/s390/s390.h (enum processor_flags): Do not use
7674         default tune parameter when -march was specified.
7676 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
7678         PR target/86314
7679         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
7680         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
7681         operands.
7683 2018-06-26  Richard Biener  <rguenther@suse.de>
7685         PR tree-optimization/86287
7686         PR bootstrap/86316
7687         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
7688         (vect_analyze_loop): Initialize n_stmts.
7690 2018-06-26  Richard Biener  <rguenther@suse.de>
7692         PR middle-end/86271
7693         * fold-const.c (fold_convertible_p): Pointer extension
7694         isn't valid.
7696 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
7698         PR debug/86064
7699         * dwarf2out.c (loc_list_has_views): Adjust comments.
7700         (dw_loc_list): Split single cross-partition range with
7701         nonzero locview.
7703 2018-06-25  Jeff Law  <law@redhat.com>
7705         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
7706         on -mbig-switch by default.
7708         * config/v850/predicates.md (const_float_1_operand): Fix match_code
7709         test.
7710         (const_float_0_operand): Remove unused predicate.
7711         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
7712         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
7713         (recipsf2): New expander.  Original pattern now called
7714         (recipsf2_insn).
7715         (recipdf2, recipdf2_insn): Similarly.
7716         (rsqrtsf2, rsqrtsf2_insn): Similarly
7717         (rsqrtdf2, rsqrtdf2_insn): Similarly
7719 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
7721         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
7722         Simplify logic for FreeBSD (twice).
7724 2018-06-25  Martin Sebor  <msebor@redhat.com>
7726         PR tree-optimization/86204
7727         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
7728         a strnlen result if it's less than the length of the string.
7730 2018-06-25  Martin Sebor  <msebor@redhat.com>
7732         PR tree-optimization/85700
7733         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
7734         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
7735         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
7737 2018-06-25  Martin Sebor  <msebor@redhat.com>
7739         * doc/extend.texi (Zero-length arrays): Update and clarify.
7741 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
7743         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
7744         added IEEE/IBM long double multilib support on PowerPC little
7745         endian Linux systems.
7746         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
7747         (MULTILIB_DEFAULTS): Likewise.
7748         * config/rs6000/rs6000.c (rs6000_option_override_internal):
7749         Likewise.
7750         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
7751         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
7752         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
7754 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
7756         PR middle-end/86311
7757         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
7758         (REORDER_45): Likewise.
7760 2018-06-25  Jeff Law  <law@redhat.com>
7762         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
7763         dividend to 32 bits.  Adjust length.
7764         (udivmodhi4): Cleanup output template.  Fix length.
7766 2018-06-25  Carl Love  <cel@us.ibm.com>
7768         * config/rs6000/vsx.md: Change word selector to prefered location.
7770 2018-06-25  Richard Biener  <rguenther@suse.de>
7772         PR tree-optimization/86304
7773         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
7774         epilogue-if-converted loops as well.
7776 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
7778         * lto-section-out.c (lto_begin_section): Do not print section
7779         name for noaddr and unnumbered dumps.
7781 2018-06-25  Richard Biener  <rguenther@suse.de>
7783         * tree-vectorizer.h (struct vec_info_shared): New structure
7784         with parts split out from struct vec_info and loop_nest from
7785         struct _loop_vec_info.
7786         (struct vec_info): Adjust accordingly.
7787         (struct _loop_vec_info): Likewise.
7788         (LOOP_VINFO_LOOP_NEST): Adjust.
7789         (LOOP_VINFO_DATAREFS): Likewise.
7790         (LOOP_VINFO_DDRS): Likewise.
7791         (struct _bb_vec_info): Likewise.
7792         (BB_VINFO_DATAREFS): Likewise.
7793         (BB_VINFO_DDRS): Likewise.
7794         (struct _stmt_vec_info): Add dr_aux member.
7795         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
7796         (DR_MISALIGNMENT_UNINITIALIZED): New.
7797         (set_dr_misalignment): Adjust.
7798         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
7799         (vect_analyze_loop): Adjust prototype.
7800         (vect_analyze_loop_form): Likewise.
7801         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
7802         Compute dependences lazily.
7803         (vect_record_base_alignments): Use shared datarefs/ddrs.
7804         (vect_verify_datarefs_alignment): Likewise.
7805         (vect_analyze_data_refs_alignment): Likewise.
7806         (vect_analyze_data_ref_accesses): Likewise.
7807         (vect_analyze_data_refs): Likewise.
7808         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
7809         constructor parameter for shared part.
7810         (vect_analyze_loop_form): Pass in shared part and adjust.
7811         (vect_analyze_loop_2): Pass in storage for the number of
7812         stmts.  Move loop nest finding to the caller.  Compute
7813         datarefs lazily.
7814         (vect_analyze_loop): Pass in shared part.
7815         (vect_transform_loop): Verify shared datarefs are unchanged.
7816         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
7817         constructor parameter for shared part.
7818         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
7819         (vect_slp_bb): Verify shared datarefs are unchanged before
7820         transform.
7821         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
7822         change.
7823         (new_stmt_vec_info): Initialize DR_AUX misalignment to
7824         DR_MISALIGNMENT_UNINITIALIZED.
7825         * tree-vectorizer.c (vec_info::vec_info): Add constructor
7826         parameter for shared part.
7827         (vec_info::~vec_info): Adjust.
7828         (vec_info_shared::vec_info_shared): New.
7829         (vec_info_shared::~vec_info_shared): Likewise.
7830         (vec_info_shared::save_datarefs): Likewise.
7831         (vec_info_shared::check_datarefs): Likewise.
7832         (try_vectorize_loop_1): Construct shared part live for analyses
7833         of a single loop for multiple vector sizes.
7834         * tree-parloops.c (gather_scalar_reductions): Adjust.
7836 2018-06-25  Richard Biener  <rguenther@suse.de>
7838         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
7839         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
7840         (vect_analyze_data_refs): Remove similar code from here and
7841         simplify accordingly.
7843 2018-06-25  Richard Biener  <rguenther@suse.de>
7845         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
7846         for reverse storage order accesses rather than asserting
7847         they cannot happen here.
7849 2018-06-25  Tom de Vries  <tdevries@suse.de>
7851         PR debug/86257
7852         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
7853         Use data16 instead of .byte for insn prefix.
7855 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
7857         PR C++/86082
7858         * parser.c (make_char_string_pack): Pass this literal chars
7859         through cpp_interpret_string.
7860         (cp_parser_userdef_numeric_literal): Check the result of
7861         make_char_string_pack.
7863 2018-06-24  Maya Rashish  <coypu@sdf.org>
7865         * ginclude/stddef.h: Simplify conditions around avoiding
7866         re-definition of __size_t.
7868 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
7870         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
7871         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
7873 2018-06-22  Maya Rashish  <coypu@sdf.org>
7875         * doc/invoke.texi (mno-fancy-math-387): Update for changes
7876         made to OpenBSD and NetBSD through the years.
7878 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7880         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7881         behavior of vec_pack (vector double, vector double) to match
7882         behavior of vec_float2 (vector double, vector double).
7884 2018-06-22  Olivier Hainque  <hainque@adacore.com>
7886         * gimplify.c (gimplify_function_tree): Prevent creation
7887         of a trampoline for the address of the current function
7888         passed to entry/exit instrumentation hooks.
7890 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
7892         PR target/86222
7893         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
7894         correctly.
7896 2018-06-22  Martin Liska  <mliska@suse.cz>
7898         PR tree-optimization/86263
7899         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7900         Bail out if is_enabled is false.
7901         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
7902         New declaration.
7903         (jump_table_cluster::is_enabled): New function.
7905 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
7907         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
7908         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
7909         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
7910         (lto_input_ts_binfo_tree_pointers): Likewise.
7911         * tree-streamer-out.c (streamer_write_tree_bitfields,
7912         write_ts_binfo_tree_pointers): Likewise.
7913         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
7915 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
7917         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
7919 2018-06-22  Martin Liska  <mliska@suse.cz>
7921         * symbol-summary.h (get): Make it pure and inline move
7922         functionality from ::get function.
7923         (get): Remove and inline into ::get and ::get_create.
7924         (get_create): Move code from ::get function.
7926 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7928         PR target/85994
7929         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
7930         -x assembler-with-cpp.
7932 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7934         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
7935         _FILE_OFFSET_BITS=64 for C++.
7937 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
7939         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
7940         conversion insn that shows up when pr85657-3.c is compiled using
7941         IEEE 128-bit long double.
7942         (neg<mode>2_internal): Use the correct mode to check whether the
7943         mode is IBM extended.
7944         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
7945         multiply and divide external functions from being created more
7946         than once.
7948 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
7950         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
7951         functions.
7952         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
7953         the edge can be forwarded.
7954         (cfg_layout_merge_blocks): Likewise.
7956 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
7958         * except.c (finish_eh_generation): Commit edge insertions only after
7959         the EH edges have been redirected from post-landing to landing pads.
7961 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
7963         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
7964         create_tmp_var_for to create the FRAME decl.
7965         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
7967 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
7969         * tree-inline.c (copy_edges_for_bb): Minor tweak.
7970         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
7971         debug statement when resetting its value.
7972         (expand_call_inline): Copy the locus of the call onto the assignment
7973         of the return value, if any.  Use local variable in more cases.
7975 2018-06-21  Martin Liska  <mliska@suse.cz>
7977         * ipa-pure-const.c (propagate_nothrow): Use
7978         funct_state_summaries->get.
7979         (dump_malloc_lattice): Likewise.
7980         (propagate_malloc): Likewise.
7982 2018-06-21  Richard Biener  <rguenther@suse.de>
7984         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
7985         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
7986         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
7987         comment.
7988         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
7989         BLOCK_ABSTRACT_ORIGIN unconditionally.
7991 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
7993         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
7994         deleting it.
7995         * ipa-reference.c (ipa_reference_c_finalize): Delete
7996         ipa_ref_opt_sum_summaries and set it to NULL.
7998 2018-06-21  Tom de Vries  <tdevries@suse.de>
8000         PR tree-optimization/85859
8001         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
8002         test with comment from bb_no_side_effects_p.
8004 2018-06-21  Richard Biener  <rguenther@suse.de>
8006         PR tree-optimization/86232
8007         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
8008         max for constant niter.
8010 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8012         * config/aarch64/aarch64-simd.md
8013         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
8015 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8017         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
8018         Make opernads of the unspec commutative.
8020 2018-06-21  Richard Biener  <rguenther@suse.de>
8022         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
8023         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
8024         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
8025         (vect_analyze_data_ref_dependence): Re-order checks to deal with
8026         NULL DR_STEP.
8027         (vect_record_base_alignments): Do not record base alignment
8028         for gathers or scatters.
8029         (vect_compute_data_ref_alignment): Drop return value that is always
8030         true.  Bail out early for gathers or scatters.
8031         (vect_enhance_data_refs_alignment): Bail out early for gathers
8032         or scatters.
8033         (vect_find_same_alignment_drs): Likewise.
8034         (vect_analyze_data_refs_alignment): Remove dead code.
8035         (vect_slp_analyze_and_verify_node_alignment): Likewise.
8036         (vect_analyze_data_refs): For possible gathers or scatters do
8037         not create an alternate DR, just check their possible validity
8038         and mark them.  Adjust DECL_NONALIASED handling to not rely
8039         on DR_BASE_ADDRESS.
8040         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
8041         update inits of gathers or scatters.
8042         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
8043         Also copy gather/scatter flag to pattern vinfo.
8045 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8047         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
8048         behavior of vec_packsu (vector unsigned long long, vector unsigned
8049         long long) to match behavior of vec_packs with same signature.
8051 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
8052             Thomas Schwinge <thomas@codesourcery.com>
8053             Cesar Philippidis  <cesar@codesourcery.com>
8055         * gimplify.c (gimplify_scan_omp_clauses): Add support for
8056         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8057         (gimplify_adjust_omp_clauses): Likewise.
8058         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
8059         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
8060         (gimplify_omp_target_update): Update handling of acc update and
8061         enter/exit data.
8062         * omp-low.c (install_var_field): Remove unused parameter
8063         base_pointers_restrict.
8064         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
8065         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
8066         FINALIZE}
8067         (omp_target_base_pointers_restrict_p): Delete.
8068         (scan_omp_target): Update call to scan_sharing_clauses.
8069         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
8070         FINALIZE}.
8071         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
8072         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8073         (convert_local_omp_clauses): Likewise.
8074         * tree-pretty-print.c (dump_omp_clause): Likewise.
8075         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
8076         FINALIZE}.
8077         (omp_clause_code_name): Likewise.
8079 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
8081         PR debug/86194
8082         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
8083         be narrowed.
8085         PR tree-optimization/86231
8086         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
8087         anti-range don't overwrite *vr0min before using it to compute *vr0max.
8089 2018-06-20  Tom de Vries  <tdevries@suse.de>
8091         PR tree-optimization/86097
8092         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
8093         iv type if signedness of iv type is not the same as that of *nit.
8095 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
8097         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
8098         EDGE_EH edges, verify they are all EDGE_EH.
8100 2018-06-20  Maya Rashish  <coypu@sdf.org>
8102         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
8104 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8106         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
8107         * config/aarch64/aarch64.c (xgene1_tunings): Add
8108         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
8109         (aarch64_mode_valid_for_sched_fusion_p):
8110         Allow 16-byte modes.
8111         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
8112         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
8113         128-bit modes.
8114         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
8115         New pattern.
8116         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
8117         * config/aarch64/iterators.md (VQ2): New mode iterator.
8119 2018-06-20  Martin Liska  <mliska@suse.cz>
8121         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
8122         Change default ratio from 10 to 8.
8124 2018-06-20  Martin Liska  <mliska@suse.cz>
8126         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8127         New.
8128         (bit_test_cluster::find_bit_tests): Likewise.
8129         (switch_decision_tree::analyze_switch_statement): Find clusters.
8130         * tree-switch-conversion.h (struct jump_table_cluster): Document
8131         hierarchy.
8133 2018-06-20  Martin Liska  <mliska@suse.cz>
8135         * tree-switch-conversion.c (switch_conversion::collect):
8136         Record m_uniq property.
8137         (switch_conversion::expand): Bail out for special conditions.
8138         (group_cluster::~group_cluster): New.
8139         (group_cluster::group_cluster): Likewise.
8140         (group_cluster::dump): Likewise.
8141         (jump_table_cluster::emit): New.
8142         (switch_decision_tree::fix_phi_operands_for_edges): New.
8143         (struct case_node): Remove struct.
8144         (jump_table_cluster::can_be_handled): New.
8145         (case_values_threshold): Moved to header.
8146         (reset_out_edges_aux): Likewise.
8147         (jump_table_cluster::is_beneficial): New.
8148         (bit_test_cluster::can_be_handled): Likewise.
8149         (add_case_node): Remove.
8150         (bit_test_cluster::is_beneficial): New.
8151         (case_bit_test::cmp): New.
8152         (bit_test_cluster::emit): New.
8153         (expand_switch_as_decision_tree_p): Remove.
8154         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
8155         (fix_phi_operands_for_edge): Likewise.
8156         (switch_decision_tree::analyze_switch_statement): New.
8157         (compute_cases_per_edge): Move ...
8158         (switch_decision_tree::compute_cases_per_edge): ... here.
8159         (try_switch_expansion): Likewise.
8160         (switch_decision_tree::try_switch_expansion): Likewise.
8161         (record_phi_operand_mapping): Likewise.
8162         (switch_decision_tree::record_phi_operand_mapping): Likewise.
8163         (emit_case_decision_tree): Likewise.
8164         (switch_decision_tree::emit): Likewise.
8165         (balance_case_nodes): Likewise.
8166         (switch_decision_tree::balance_case_nodes): Likewise.
8167         (dump_case_nodes): Likewise.
8168         (switch_decision_tree::dump_case_nodes): Likewise.
8169         (emit_jump): Likewise.
8170         (switch_decision_tree::emit_jump): Likewise.
8171         (emit_cmp_and_jump_insns): Likewise.
8172         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
8173         (emit_case_nodes): Likewise.
8174         (switch_decision_tree::emit_case_nodes): Likewise.
8175         (conditional_probability): Remove.
8176         * tree-switch-conversion.h (enum cluster_type): New.
8177         (PRINT_CASE): New.
8178         (struct cluster): Likewise.
8179         (cluster::cluster): Likewise.
8180         (struct simple_cluster): Likewise.
8181         (simple_cluster::simple_cluster): Likewise.
8182         (struct group_cluster): Likewise.
8183         (struct jump_table_cluster): Likewise.
8184         (struct bit_test_cluster): Likewise.
8185         (struct min_cluster_item): Likewise.
8186         (struct case_tree_node): Likewise.
8187         (case_tree_node::case_tree_node): Likewise.
8188         (jump_table_cluster::case_values_threshold): Likewise.
8189         (struct case_bit_test): Likewise.
8190         (struct switch_decision_tree): Likewise.
8191         (struct switch_conversion): Likewise.
8192         (switch_decision_tree::reset_out_edges_aux): Likewise.
8194 2018-06-20  Martin Liska  <mliska@suse.cz>
8196         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
8197         (hoist_edge_and_branch_if_true): Likewise.
8198         (expand_switch_using_bit_tests_p): Likewise.
8199         (struct case_bit_test): Likewise.
8200         (case_bit_test_cmp): Likewise.
8201         (emit_case_bit_tests): Likewise.
8202         (switch_conversion::switch_conversion): New class.
8203         (struct switch_conv_info): Remove old struct.
8204         (collect_switch_conv_info): More to ...
8205         (switch_conversion::collect): ... this.
8206         (check_range): Likewise.
8207         (switch_conversion::check_range): Likewise.
8208         (check_all_empty_except_final): Likewise.
8209         (switch_conversion::check_all_empty_except_final): Likewise.
8210         (check_final_bb): Likewise.
8211         (switch_conversion::check_final_bb): Likewise.
8212         (create_temp_arrays): Likewise.
8213         (switch_conversion::create_temp_arrays): Likewise.
8214         (free_temp_arrays): Likewise.
8215         (gather_default_values): Likewise.
8216         (switch_conversion::gather_default_values): Likewise.
8217         (build_constructors): Likewise.
8218         (switch_conversion::build_constructors): Likewise.
8219         (constructor_contains_same_values_p): Likewise.
8220         (switch_conversion::contains_same_values_p): Likewise.
8221         (array_value_type): Likewise.
8222         (switch_conversion::array_value_type): Likewise.
8223         (build_one_array): Likewise.
8224         (switch_conversion::build_one_array): Likewise.
8225         (build_arrays): Likewise.
8226         (switch_conversion::build_arrays): Likewise.
8227         (gen_def_assigns): Likewise.
8228         (switch_conversion::gen_def_assigns): Likewise.
8229         (prune_bbs): Likewise.
8230         (switch_conversion::prune_bbs): Likewise.
8231         (fix_phi_nodes): Likewise.
8232         (switch_conversion::fix_phi_nodes): Likewise.
8233         (gen_inbound_check): Likewise.
8234         (switch_conversion::gen_inbound_check): Likewise.
8235         (process_switch): Use the newly created class.
8236         (switch_conversion::expand): New.
8237         (switch_conversion::~switch_conversion): New.
8238         * tree-switch-conversion.h: New file.
8240 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8242         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
8243         tree-vect-patterns.c.
8244         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
8245         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
8246         (vect_recog_sad_pattern): Likewise.
8247         (vect_recog_widen_sum_pattern): Likewise.
8248         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
8249         (vect_recog_widen_shift_pattern): Remove the type_in argument.
8250         (vect_recog_rotate_pattern): Likewise.
8251         (vect_recog_mult_pattern): Likewise.
8252         (vect_recog_vector_vector_shift_pattern): Likewise.
8253         (vect_recog_divmod_pattern): Likewise.
8254         (vect_recog_mixed_size_cond_pattern): Likewise.
8255         (vect_recog_bool_pattern): Likewise.
8256         (vect_recog_mask_conversion_pattern): Likewise.
8257         (vect_try_gather_scatter_pattern): Likewise.
8258         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
8259         (vect_recog_over_widening_pattern): Likewise.
8260         (vect_recog_gather_scatter_pattern): Likewise.
8261         (vect_recog_func_ptr): Move from tree-vectorizer.h
8262         (vect_vect_recog_func_ptrs): Move further down the file.
8263         (vect_recog_func): Likewise.  Remove the third argument.
8264         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
8265         (vect_pattern_recog_1): Expect the pattern function to do any
8266         necessary target tests.  Also expect it to provide a vector type.
8267         Remove the type_in handling.
8269 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8271         * tree-vect-patterns.c (vect_pattern_detected): New function.
8272         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
8273         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
8274         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
8275         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
8276         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
8277         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
8278         (vect_recog_mask_conversion_pattern)
8279         (vect_try_gather_scatter_pattern): Likewise.
8281 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8283         * tree-vect-patterns.c (vect_get_internal_def): New function.
8284         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
8285         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
8286         (search_type_for_mask_1): Use it.
8288 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8290         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8291         redundant WIDEN_SUM_EXPR handling.
8292         (vect_recog_sad_pattern): Likewise.
8294 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8296         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8297         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
8298         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
8299         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
8300         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
8302 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8304         * tree-vect-stmts.c (vectorizable_call): Make sure that we
8305         use the stmt_vec_info of the original bb statement for the
8306         new zero assignment, even if the call is part of a pattern.
8308 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8310         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
8311         that the sequence is attached to the original statement rather
8312         than the pattern statement.
8313         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
8314         PATTERN_DEF_SEQ from the original statement rather than
8315         the main pattern statement.
8316         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
8317         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
8318         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
8320 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8322         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
8323         definition statements before the early exit for statements that aren't
8324         live or relevant.
8325         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
8326         split out from...
8327         (vect_transform_loop): ...here.  Process pattern definition
8328         statements without first checking whether the main pattern
8329         statement is live or relevant.
8331 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
8333         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
8334         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
8336 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
8338         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
8339         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
8340         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
8341         (expand_block_compare): Change select_block_compare_mode call.
8342         (expand_strncmp_align_check): Use new functions, fix comment.
8343         (emit_final_str_compare_gpr): New function.
8344         (expand_strn_compare): Refactor and clean up code.
8345         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
8347 2018-06-19  Tony Reix  <tony.reix@atos.com>
8348             Damien Bergamini  <damien.bergamini@atos.com>
8349             David Edelsohn  <dje.gcc@gmail.com>
8351         * collect2.c (static_obj): New variable.
8352         (static_libs): New variable.
8353         (is_in_list): Uncomment declaration.
8354         (main): Track AIX libraries linked statically.
8355         (is_in_list): Uncomment definition.
8356         (scan_prog_file): Don't add AIX shared libraries initializer
8357         to constructor list if linking statically.
8359 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
8361         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
8362         constant.
8363         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
8365 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
8367         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
8368         blocks.
8370 2018-06-19  Martin Liska  <mliska@suse.cz>
8372         * config/i386/i386.c (ix86_can_inline_p): Do not use
8373         ipa_fn_summaries::get_create.
8374         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
8375         get.
8376         (devirtualization_time_bonus): Likewise.
8377         (ipcp_propagate_stage): Likewise.
8378         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
8379         (edge_set_predicate): Likewise.
8380         (evaluate_conditions_for_known_args): Likewise.
8381         (evaluate_properties_for_edge): Likewise.
8382         (ipa_call_summary::reset): Tranform to ...
8383         (ipa_call_summary::~ipa_call_summary): ... this.
8384         (ipa_fn_summary::reset): Transform to ...
8385         (ipa_fn_summary::~ipa_fn_summary): ... this.
8386         (ipa_fn_summary_t::remove): Rename to ...
8387         (ipa_fn_summary_t::remove_callees): ... this.
8388         (ipa_fn_summary_t::duplicate): Use placement new
8389         instead of memory copy.
8390         (ipa_call_summary_t::duplicate): Likewise.
8391         (ipa_call_summary_t::remove): Remove.
8392         (dump_ipa_call_summary): Change get_create to get.
8393         (ipa_dump_fn_summary): Dump only when summary exists.
8394         (analyze_function_body): Use symbol_summary::get instead
8395         of get_create.
8396         (compute_fn_summary): Likewise.
8397         (estimate_edge_devirt_benefit): Likewise.
8398         (estimate_edge_size_and_time): Likewise.
8399         (inline_update_callee_summaries): Likewise.
8400         (remap_edge_change_prob): Likewise.
8401         (remap_edge_summaries): Likewise.
8402         (ipa_merge_fn_summary_after_inlining): Likewise.
8403         (write_ipa_call_summary): Likewise.
8404         (ipa_fn_summary_write): Likewise.
8405         (ipa_free_fn_summary): Likewise.
8406         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
8407         (struct ipa_call_summary): Likewise.
8408         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
8409         of get_create.
8410         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
8411         (estimate_size_after_inlining): Likewise.
8412         (estimate_growth): Likewise.
8413         (growth_likely_positive): Likewise.
8414         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
8415         (inline_call): Likewise.
8416         * ipa-inline.c (caller_growth_limits): Likewise.
8417         (can_inline_edge_p): Likewise.
8418         (can_inline_edge_by_limits_p): Likewise.
8419         (compute_uninlined_call_time): Likewise.
8420         (compute_inlined_call_time): Likewise.
8421         (want_inline_small_function_p): Likewise.
8422         (edge_badness): Likewise.
8423         (update_caller_keys): Likewise.
8424         (update_callee_keys): Likewise.
8425         (inline_small_functions): Likewise.
8426         (inline_to_all_callers_1): Likewise.
8427         (dump_overall_stats): Likewise.
8428         (early_inline_small_functions): Likewise.
8429         (early_inliner): Likewise.
8430         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
8431         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8432         * ipa-pure-const.c (malloc_candidate_p): Likewise.
8433         * ipa-split.c (execute_split_functions): Likewise.
8434         * symbol-summary.h: Likewise.
8435         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
8437 2018-06-19  Richard Biener  <rguenther@suse.de>
8439         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
8440         (vectorize_loops): ... here.  Fix dbgcnt handling.
8441         (try_vectorize_loop): Wrap try_vectorize_loop_1.
8443 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
8445         PR target/86197
8446         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
8447         ieee128 argument takes up only one (vector) register, not two (floating
8448         point) registers.
8450 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
8452         * gimplify.c (gimplify_init_constructor): Really never clear for an
8453         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
8455 2018-06-19  Richard Biener  <rguenther@suse.de>
8457         PR tree-optimization/86179
8458         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
8459         after failed recognition.
8461 2018-06-18  Martin Sebor  <msebor@redhat.com>
8463         PR middle-end/85602
8464         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
8465         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
8466         Handle integer subtraction.
8467         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
8468         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
8470 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
8472         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
8473         param from rtx to rtx_insn *.
8474         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
8475         param.
8476         (frv_ifcvt_modify_insn): Likwise.
8477         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
8478         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
8479         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
8480         as_a <rtx_insn *> cast to local "unprotected_region" once
8481         it's been established that it's not NULL or pc_rtx.
8482         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
8483         param "sethi" from rtx to rtx_insn *.
8484         (nds32_group_float_insns): Likewise for param "insn".
8485         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
8486         param.
8487         (vax_output_int_subtract): Likewise.
8488         * config/vax/vax.c (vax_output_int_add): Likewise for param
8489         "insn".
8490         (vax_output_int_subtract): Likewise.
8491         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
8492         (emit_pattern_after): Likewise for param "after".
8493         (emit_insn_after): Likewise.
8494         (emit_jump_insn_after): Likewise.
8495         (emit_call_insn_after): Likewise.
8496         (emit_debug_insn_after): Likewise.
8497         (emit_pattern_before): Likewise for param "before".
8498         (emit_insn_before): Likewise.
8499         (emit_jump_insn_before): Likewise.
8500         * final.c (get_insn_template): Likewise for param "insn", removing
8501         a cast.
8502         * output.h (get_insn_template): Likewise for 2nd param.
8503         * rtl.h (emit_insn_before): Likewise.
8504         (emit_jump_insn_before): Likewise.
8505         (emit_debug_insn_before_noloc): Likewise.
8506         (emit_insn_after): Likewise.
8507         (emit_jump_insn_after): Likewise.
8508         (emit_call_insn_after): Likewise.
8509         (emit_debug_insn_after): Likewise.
8510         (set_insn_deleted): Likewise for param.
8512 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
8514         PR target/85358
8515         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
8516         floating point modes, so that IFmode is numerically greater than
8517         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
8518         to declare the ordering.  This prevents IFmode from being
8519         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
8520         machine.  Include rs6000-modes.h to share the fractional values
8521         between genmodes* and the rest of the compiler.
8522         (IFmode): Likewise.
8523         (KFmode): Likewise.
8524         (TFmode): Likewise.
8525         * config/rs6000/rs6000-modes.h: New file.
8526         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
8527         meaning of rs6000_long_double_size so that 126..128 selects an
8528         appropriate 128-bit floating point type.
8529         (rs6000_option_override_internal): Likewise.
8530         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
8531         (TARGET_LONG_DOUBLE_128): Change the meaning of
8532         rs6000_long_double_size so that 126..128 selects an appropriate
8533         128-bit floating point type.
8534         (LONG_DOUBLE_TYPE_SIZE): Update comment.
8535         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
8536         source and destination to match the standard usage.
8537         (truncifkf2): Likewise.
8538         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
8539         ISA 2.07 to use an explicit clobber, instead of passing in a
8540         temporary.
8541         (copysign<mode>3_soft): Likewise.
8543 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
8545         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
8546         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
8547         (vect_slp_analyze_instance_dependence): Likewise.
8548         (vect_enhance_data_refs_alignment): Likewise.
8549         (vect_analyze_data_refs_alignment): Likewise.
8550         (vect_slp_analyze_and_verify_instance_alignment
8551         (vect_analyze_data_ref_accesses): Likewise.
8552         (vect_prune_runtime_alias_test_list): Likewise.
8553         (vect_analyze_data_refs): Likewise.
8554         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
8555         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
8556         (vect_analyze_scalar_cycles_1): Likewise.
8557         (vect_get_loop_niters): Likewise.
8558         (vect_analyze_loop_form_1): Likewise.
8559         (vect_update_vf_for_slp): Likewise.
8560         (vect_analyze_loop_operations): Likewise.
8561         (vect_analyze_loop): Likewise.
8562         (vectorizable_induction): Likewise.
8563         (vect_transform_loop): Likewise.
8564         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
8565         * tree-vect-slp.c (vect_analyze_slp): Likewise.
8566         (vect_make_slp_decision): Likewise.
8567         (vect_detect_hybrid_slp): Likewise.
8568         (vect_slp_analyze_operations): Likewise.
8569         (vect_slp_bb): Likewise.
8570         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
8571         (vectorizable_bswap): Likewise.
8572         (vectorizable_call): Likewise.
8573         (vectorizable_simd_clone_call): Likewise.
8574         (vectorizable_conversion): Likewise.
8575         (vectorizable_assignment): Likewise.
8576         (vectorizable_shift): Likewise.
8577         (vectorizable_operation): Likewise.
8578         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
8580 2018-06-18  Martin Sebor  <msebor@redhat.com>
8582         PR tree-optimization/81384
8583         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
8584         * builtins.c (expand_builtin_strnlen): New function.
8585         (expand_builtin): Call it.
8586         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
8587         * builtins.def (BUILT_IN_STRNLEN): New.
8588         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
8589         Warn for bounds in excess of maximum object size.
8590         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
8591         single-value ranges.  Handle strnlen.
8592         (handle_builtin_strlen): Handle strnlen.
8593         (strlen_check_and_optimize_stmt): Same.
8594         * doc/extend.texi (Other Builtins): Document strnlen.
8596 2018-06-18  Maya Rashish  <coypu@sdf.org>
8598         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
8599         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
8600         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
8602         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
8603         here to ...
8604         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
8606 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
8608         * tree.c (escaped_string::escape): Replace cast to char * by
8609         const_cast<char *> (unescaped).
8611 2018-06-18  Nick Clifton  <nickc@redhat.com>
8613         PR 84195
8614         * tree.c (escaped_string): New class.  Converts an unescaped
8615         string into its escaped equivalent.
8616         (warn_deprecated_use): Use the new class to convert the
8617         deprecation message, if present.
8618         (test_escaped_strings): New self test.
8619         (test_c_tests): Add test_escaped_strings.
8620         * doc/extend.texi (deprecated): Add a note that the
8621         deprecation message is affected by the -fmessage-length
8622         option, and that control characters will be escaped.
8623         (#pragma GCC error): Document this pragma.
8624         (#pragma GCC warning): Likewise.
8625         * doc/invoke.texi (-fmessage-length): Document this option's
8626         effect on the #warning and #error preprocessor directives and
8627         the deprecated attribute.
8629 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
8631         * tree.c (decl_value_expr_lookup): Revert latest change.
8632         (decl_value_expr_insert): Likewise.
8634 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
8636         * gimplify.c (nonlocal_vlas): Delete.
8637         (nonlocal_vla_vars): Likewise.
8638         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
8639         referenced VLAs.
8640         (gimplify_body): Do not create and destroy nonlocal_vlas.
8641         * tree-nested.c: Include diagnostic.h.
8642         (use_pointer_in_frame): Tweak.
8643         (lookup_field_for_decl): Add assertion and declare the transformation.
8644         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
8645         internal error when the reference is in a wrong context.  Do not
8646         create a debug decl by default.
8647         (note_nonlocal_block_vlas): Delete.
8648         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
8649         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
8650         create a debug decl by default.
8651         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
8652         call is in a wrong context.
8653         (fixup_vla_decls): New function.
8654         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
8655         debug variables were created.
8656         * tree.c (decl_value_expr_lookup): Add checking assertion.
8657         (decl_value_expr_insert): Likewise.
8659 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
8661         PR middle-end/82479
8662         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
8663         * tree-scalar-evolution.c (interpret_expr): Likewise.
8664         (expression_expensive_p): Likewise.
8665         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
8666         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
8667         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
8668         (ssa_defined_by_minus_one_stmt_p): New.
8670 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
8672         PR middle-end/64946
8673         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
8674         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
8675         * dojump.c (do_jump): Likewise.
8676         * expr.c (expand_expr_real_2): Check operand type's sign.
8677         * fold-const.c (const_unop): Handle ABSU_EXPR.
8678         (fold_abs_const): Likewise.
8679         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
8680         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
8681         (strip_sign_op_1): Likesise.
8682         * match.pd: Add new pattern to generate ABSU_EXPR.
8683         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
8684         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
8685         * tree-eh.c (operation_could_trap_helper_p): Likewise.
8686         * tree-inline.c (estimate_operator_cost): Likewise.
8687         * tree-pretty-print.c (dump_generic_node): Likewise.
8688         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
8689         * tree.def (ABSU_EXPR): New.
8691 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
8693         PR middle-end/86095
8694         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
8695         documented as preserved for backward compatibility only.
8696         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
8698         PR rtl-optimization/86108
8699         * bb-reorder.c (create_forwarder_block): Renamed to ...
8700         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
8701         jump from new landing pad to the second part.
8702         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
8703         Adjust callers.
8705 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
8707         PR middle-end/85878
8708         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
8709         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
8710         Only call store_expr for halves if the mode is the same.
8712         PR middle-end/86123
8713         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
8714         Fix up comment formatting.
8716 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8718         * typed-splay-tree.h (typed_splay_tree::remove): New function.
8719         (typed_splay_tree::closure,
8720         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
8721         (typed_splay_tree::typed_splay_tree,
8722         typed_splay_tree::operator =): Declared private.
8723         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
8724         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
8725         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
8726         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
8727         typed_splay_tree::splay_tree_splay,
8728         typed_splay_tree::splay_tree_foreach_helper,
8729         typed_splay_tree::splay_tree_insert,
8730         typed_splay_tree::splay_tree_remove,
8731         typed_splay_tree::splay_tree_lookup,
8732         typed_splay_tree::splay_tree_predecessor,
8733         typed_splay_tree::splay_tree_successor,
8734         typed_splay_tree::splay_tree_min,
8735         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
8736         (typed_splay_tree::root, typed_splay_tree::comp,
8737         typed_splay_tree::delete_key,
8738         typed_splay_tree::delete_value): New data members.
8739         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
8740         typed_splay_tree::remove.
8742 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
8744         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
8745         -mginv and -mno-ginv to the assembler.
8746         * config/mips/mips.opt (-mcrc): New option.
8747         (-mginv): Likewise.
8748         * doc/invoke.text (-mcrc): Document.
8749         (-mginv): Likewise.
8751 2018-06-15  Nick Clifton  <nickc@redhat.com>
8753         PR 84195
8754         * tree.c (escaped_string): New class.  Converts an unescaped
8755         string into its escaped equivalent.
8756         (warn_deprecated_use): Use the new class to convert the
8757         deprecation message, if present.
8758         (test_escaped_strings): New self test.
8759         (test_c_tests): Add test_escaped_strings.
8760         * doc/extend.texi (deprecated): Add a note that the
8761         deprecation message is affected by the -fmessage-length
8762         option, and that control characters will be escaped.
8763         (#pragma GCC error): Document this pragma.
8764         (#pragma GCC warning): Likewise.
8765         * doc/invoke.texi (-fmessage-length): Document this option's
8766         effect on the #warning and #error preprocessor directives and
8767         the deprecated attribute.
8769 2018-06-15  Richard Biener  <rguenther@suse.de>
8771         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
8772         here, also noting vector size used.
8773         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
8774         size used in MSG_OPTIMIZED_LOCATIONS dump.
8775         (pass_slp_vectorize::execute): Adjust.
8777 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
8779         PR target/85968
8780         * config/arc/arc.c (arc_return_address_register): Fix
8781         if-condition.
8783 2018-06-15  Richard Biener  <rguenther@suse.de>
8785         PR middle-end/86159
8786         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
8787         leave useless conversion stripping to force_gimple_operand_gsi.
8788         (gimplify_build2): Likewise.
8789         (gimplify_build1): Likewise.
8791 2018-06-15  Richard Biener  <rguenther@suse.de>
8793         PR middle-end/86076
8794         * tree-cfg.c (move_stmt_op): unshare invariant addresses
8795         before adjusting their block.
8797 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
8799         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
8800         multilibs for *-*-rtems*.
8801         * config/riscv/t-rtems: New file.
8803 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
8805         PR middle-end/86122
8806         * match.pd ((A +- CST1) +- CST2): Punt if last resort
8807         unsigned_type_for returns NULL.
8809         PR target/85945
8810         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
8811         subregs of multi-word pseudos unless the float mode has word size.
8813 2018-06-14  Richard Biener  <rguenther@suse.de>
8815         PR middle-end/86139
8816         * tree-vect-generic.c (build_word_mode_vector_type): Remove
8817         duplicate and harmful type_hash_canon.
8818         * tree.c (type_hash_canon): Assert we didn't find ourselves.
8820 2018-06-14  Richard Biener  <rguenther@suse.de>
8822         PR ipa/86124
8823         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
8824         NULL cgraph_node.
8826 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
8828         * config/rtems.h (STDINT_LONG32): Define.
8830 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
8831             Prachi Godbole  <prachi.godbole@imgtec.com>
8833         * config/mips/mips-cpus.def: Define P6600.
8834         * config/mips/mips-tables.opt: Regenerate.
8835         * config/mips/mips.c (mips_ucbranch_type): New enum.
8836         (mips_rtx_cost_data): Add support for P6600.
8837         (mips_issue_rate): Likewise.
8838         (mips_multipass_dfa_lookahead): Likewise.
8839         (mips_avoid_hazard): Likewise.
8840         (mips_reorg_process_insns): Likewise.
8841         (mips_classify_branch_p6600): New function.
8842         * config/mips/mips.h (TUNE_P6600): New define.
8843         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
8844         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
8845         * config/mips/mips.md: Include p6600.md.
8846         (processor): Add p6600.
8847         * config/mips/p6600.md: New file.
8848         * doc/invoke.texi: Add p6600 to supported architectures.
8850 2018-06-13  Martin Sebor  <msebor@redhat.com>
8852         PR tree-optimization/86114
8853         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
8854         of integer types.
8855         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
8857 2018-06-13  Richard Biener  <rguenther@suse.de>
8859         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
8860         Properly set vector type of the intermediate stmt.
8861         * tree-vect-stmts.c (vectorizable_operation): The destination
8862         var always has vectype_out type.
8864 2018-06-13  Jeff Law  <law@redhat.com>
8866         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
8867         integer 0 for argument to print_rtl_with_bb.
8868         (rl78_reorg): Likewise.
8870 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
8872         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
8873         from rtx to rtx_insn *.
8874         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
8875         "label".
8876         (add_sched_insns_for_speculation): Likewise for local "target",
8877         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8878         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
8879         from rtx_insn ** to rtx_code_label **.
8880         (reorg_emit_nops): Likewise.
8881         (c6x_reorg): Likewise for local "call_labels".
8882         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
8883         rtx to rtx_insn *.
8884         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
8885         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
8886         the loops over LABEL_REFS.
8887         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
8888         braf_label.
8889         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8890         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
8891         (split_branches): Strengthen local "olabel" from rtx to
8892         rtx_insn *, adding a safe_as_a cast.
8893         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
8894         to "rtx_insn *".
8895         (add_insn_after): Likewise for first two params.
8896         (add_insn_before): Likewise.
8897         (remove_insn): Likewise for param.
8898         (emit_pattern_before_noloc): Likewise for second and third params.
8899         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
8900         (emit_call_insn_before_noloc): Likewise.
8901         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
8902         to "rtx_insn *".
8903         (emit_barrier_before): Likewise.
8904         (emit_label_before): Strengthen "label" param from "rtx" to
8905         "rtx_code_label *".  Strengthen "before" param from "rtx" to
8906         "rtx_insn *".
8907         (emit_insn_after_1): Strengthen "after" param from "rtx" to
8908         "rtx_insn *".
8909         (emit_pattern_after_noloc): Likewise.
8910         (emit_insn_after_noloc): Likewise.
8911         (emit_jump_insn_after_noloc): Likewise.
8912         (emit_call_insn_after_noloc): Likewise.
8913         (emit_debug_insn_after_noloc): Likewise.
8914         (emit_barrier_after): Likewise.
8915         (emit_label_after): Likewise for both params.
8916         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
8917         "loc" param from "int" to "location_t".
8918         (emit_insn_after_setloc): Likewise.
8919         (emit_jump_insn_after_setloc): Likewise.
8920         (emit_call_insn_after_setloc): Likewise.
8921         (emit_debug_insn_after_setloc): Likewise.
8922         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
8923         "loc" param from "int" to "location_t".
8924         (emit_pattern_before): Convert NULL_RTX to NULL.
8925         (emit_insn_before_setloc): Convert "loc" param from "int" to
8926         "location_t".
8927         (emit_jump_insn_before_setloc): Likewise.
8928         (emit_call_insn_before_setloc): Likewise.
8929         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
8930         rtx_insn *.  Convert "loc" param from "int" to "location_t".
8931         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
8932         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
8933         Convert 3rd param from "int" to "location_t".
8934         (emit_barrier_before, emit_barrier_after, next_real_insn):
8935         Strengthen param from rtx to rtx_insn *.
8936         (emit_label_before): Strengthen 1st param from "rtx" to
8937         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
8938         "rtx_insn *".
8939         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
8940         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
8941         Strengthen 2nd param from "rtx" to "rtx_insn *".
8942         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
8943         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
8944         Likewise. Convert 3rd param from "int" to "location_t".
8945         (emit_label_after): Strengthen 1st param from "rtx" to
8946         "rtx_code_label *".
8947         (next_real_insn, remove_insn): Strengthen param from "rtx" to
8948         "rtx_insn *".
8949         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
8950         from "rtx" to "rtx_insn *".
8952 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
8954         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
8955         bodies streamed in with -Q.
8956         * dumpfile.c (dump_files): Add lto-stream-out dump file.
8957         * dumpfile.h (tree_dump_index): Add lto_stream_out.
8958         * gimple-streamer-out.c: Include gimple-pretty-print.h
8959         (output_bb): Dump stmts streamed.
8960         * lto-section-out.c: Include print-tree.h
8961         (lto_begin_section): Dump sections created.
8962         (lto_output_decl_index): Dump decl encoded.
8963         * lto-streamer-out.c: Include print-tree.h
8964         (create_output_block): Dump output block created.
8965         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
8966         (output_function): Dump function output.
8967         (output_constructor): Dump constructor streamed.
8968         (write_global_stream): Output indexes encoded.
8969         (produce_asm_for_decls): Dump streams encoded.
8970         * lto-streamer.c (streamer_dump_file): New global var.
8971         * lto-streamer.h (streamer_dump_file): Declare.
8972         * passes.c (ipa_write_summaries): Initialize streamer dump.
8973         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
8974         in.
8976 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
8978         PR target/86048
8979         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
8980         offsets for register save directives.  Emit a second batch of save
8981         directives, if need be, when the function accesses prior frames.
8983 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
8985         * config/arc/fpu.md (fmasf4): Force operand to register.
8986         (fnmasf4): Likewise.
8988 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
8990         * config/arc/arc-protos.h (arc_pad_return): Remove.
8991         * config/arc/arc.c (machine_function): Remove force_short_suffix
8992         and size_reason.
8993         (arc_print_operand): Adjust printing of '&'.
8994         (arc_verify_short): Remove conditional printing of short suffix.
8995         (arc_final_prescan_insn): Remove reference to size_reason.
8996         (pad_return): New function.
8997         (arc_reorg): Call pad_return.
8998         (arc_pad_return): Remove.
8999         (arc_init_machine_status): Remove reference to force_short_suffix.
9000         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
9001         (attr length): When attribute iscompact is true force to 2
9002         regardless; in the case of maybe check if we want to force the
9003         instruction to have 4 bytes length.
9004         (nopv): Change it to generate 4 byte long nop as well.
9005         (blockage): New pattern.
9006         (simple_return): Remove call to arc_pad_return.
9007         (p_return_i): Likewise.
9009 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9011         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
9013 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9015         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
9016         ARC cores.
9018 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9020         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
9021         for ARC700 and ARCv2.
9023 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
9025         PR target/86076
9026         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
9027         operands[2] instead of operands[1].
9030 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
9032         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
9033         case, check whether the outer register overlaps an unallocatable
9034         register, not just whether it fits the required class.
9036 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
9038         * poly-int.h (can_div_trunc_p): Add new overload in which all values
9039         are poly_ints.
9040         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
9041         (memrefs_conflict_p): Likewise.
9042         (init_alias_analysis): Likewise.
9043         * cfgexpand.c (expand_debug_expr): Likewise.
9044         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
9045         * cse.c (fold_rtx): Likewise.
9046         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
9047         * expr.c (emit_block_move_hints): Likewise.
9048         (clear_storage_hints, push_block, emit_push_insn): Likewise.
9049         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
9050         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
9051         (emit_group_store): Likewise.
9052         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
9053         to read the PRE/POST_MODIFY increment.
9054         * calls.c (store_one_arg): Use strip_offset.
9055         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
9056         poly_int_rtx_p.
9057         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
9058         by a VEC_SELECT.
9059         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
9060         (simplify_binary_operation_1): Extend CONST_INT handling to
9061         poly_int_rtx_p.
9062         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
9063         than a HOST_WIDE_INT.
9064         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
9065         poly_int64.
9066         (adjust_mems, add_stores): Update accodingly.
9067         (vt_canonicalize_addr): Track polynomial offsets.
9068         (emit_note_insn_var_location): Likewise.
9069         (vt_add_function_parameter): Likewise.
9070         (vt_initialize): Likewise.
9072 2018-06-12  Jeff Law  <law@redhat.com>
9074         * config.gcc (alpha*-*-freebsd*): Remove.
9075         * config/alpha/freebsd.h: Remove.
9077 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
9079         PR other/69968
9080         * spellcheck-tree.c (levenshtein_distance): Rename to...
9081         (get_edit_distance): ...this, and update for underlying renaming.
9082         * spellcheck-tree.h (levenshtein_distance): Rename to...
9083         (get_edit_distance): ...this.
9084         * spellcheck.c (levenshtein_distance): Rename to...
9085         (get_edit_distance): ...this.  Convert from Levenshtein distance
9086         to Damerau-Levenshtein distance by supporting transpositions of
9087         adjacent characters.  Rename "v1" to "v_next" and "v0" to
9088         "v_one_ago".
9089         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
9090         (selftest::test_edit_distance_unit_test_oneway): ...this, and
9091         update for underlying renaming.
9092         (selftest::levenshtein_distance_unit_test): Rename to...
9093         (selftest::test_get_edit_distance_unit): ...this, and update for
9094         underlying renaming.
9095         (selftest::test_find_closest_string): Add example from PR 69968
9096         where transposition helps
9097         (selftest::test_metric_conditions): Update for renaming.
9098         (selftest::test_metric_conditions): Likewise.
9099         (selftest::spellcheck_c_tests): Likewise.
9100         * spellcheck.h (levenshtein_distance): Rename both overloads to...
9101         (get_edit_distance): ...this.
9102         (best_match::consider): Update for renaming.
9104 2018-06-12  Martin Sebor  <msebor@redhat.com>
9106         PR tree-optimization/85259
9107         * builtins.c (compute_objsize): Handle constant offsets.
9108         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
9109         true iff a warning has been issued.
9110         * gimple.h (gimple_nonartificial_location): New function.
9111         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
9112         gimple_nonartificial_location and handle -Wno-system-headers.
9113         (handle_builtin_stxncpy): Same.
9115 2018-06-12  Martin Sebor  <msebor@redhat.com>
9117         PR c/85931
9118         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
9120 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
9122         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
9123         BUILTIN_VEC_XST entries for pointer to double and long long.
9125 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
9127         PR target/85990
9128         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9129         Update comments.
9130         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9131         Likewise.
9133 2018-06-12  Martin Liska  <mliska@suse.cz>
9135         * doc/options.texi: Document IntegerRange.
9137 2018-06-12  Martin Liska  <mliska@suse.cz>
9139         * config/i386/i386.opt: Make MPX-related options as Deprecated.
9140         * opt-functions.awk: Handle Deprecated flag.
9141         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
9142         and report error.
9143         (read_cmdline_option): Report warning for a deprecated option.
9144         * opts.h (struct cl_option): Add new field cl_deprecated.
9145         (CL_ERR_DEPRECATED): New.
9147 2018-06-12  Martin Liska  <mliska@suse.cz>
9149         * doc/options.texi: Document Deprecated option flag.
9151 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9153         * config/arc/arc-arch.h (arc_extras): New enum.
9154         (arc_cpu_t):Add field extra.
9155         (arc_cpu_types): Consider the extras.
9156         * config/arc/arc-cpus.def: Add extras info.
9157         * config/arc/arc-opts.h (processor_type): Consider extra field.
9158         * config/arc/arc.c (arc_override_options): Handle extra field.
9160 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9162         * config/arc/arc-arch.h: Update ARC_OPTX macro.
9163         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
9164         field.
9165         * config/arc/arc.c (arc_init): Update pic warning.
9166         (irq_range): Update irq range parsing warnings.
9167         (arc_override_options): Update various warning messages.
9168         (arc_handle_aux_attribute): Likewise.
9170 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
9172         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
9174 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
9176         * doc/sourcebuild.texi: Document usage of line number 0 in verify
9177         compiler messages directives.
9179 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
9181         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
9182         * config/mips/mips-tables.opt: Regenerate.
9183         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
9184         mips64r6.
9185         * doc/invoke.texi: Document -march=i6500.
9187 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
9189         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
9190         (i6400_gpmul): Add cpu_unit.
9191         (i6400_gpdiv): Likewise.
9192         (i6400_msa_add_d): Update reservations.
9193         (i6400_msa_int_add) Likewise.
9194         (i6400_msa_short_logic3) Likewise.
9195         (i6400_msa_short_logic2) Likewise.
9196         (i6400_msa_short_logic) Likewise.
9197         (i6400_msa_move) Likewise.
9198         (i6400_msa_cmp) Likewise.
9199         (i6400_msa_short_float2) Likewise.
9200         (i6400_msa_div_d) Likewise.
9201         (i6400_msa_long_logic1) Likewise.
9202         (i6400_msa_long_logic2) Likewise.
9203         (i6400_msa_mult) Likewise.
9204         (i6400_msa_long_float2) Likewise.
9205         (i6400_msa_long_float4) Likewise.
9206         (i6400_msa_long_float5) Likewise.
9207         (i6400_msa_long_float8) Likewise.
9208         (i6400_fpu_fadd): Include frint type.
9209         (i6400_fpu_store): New define_insn_reservation.
9210         (i6400_fpu_load): Likewise.
9211         (i6400_fpu_move): Likewise.
9212         (i6400_fpu_fcmp): Likewise.
9213         (i6400_fpu_fmadd): Likewise.
9214         (i6400_int_mult): Include imul3nc type and update reservation.
9215         (i6400_int_div): Include idiv3 type and update reservation.
9216         (i6400_int_load): Update to check type not move_type.
9217         (i6400_int_store): Likewise.
9218         (i6400_int_prefetch): Set zero latency.
9220 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
9222         * gcc.c: Document new %@{...} sequence.
9223         (LINK_COMMAND_SPEC): Use it for the -L switches.
9224         (cpp_unique_options): Use it for the -I switches.
9225         (at_file_argbuf): New global variable.
9226         (in_at_file): Likewise.
9227         (alloc_args): Create at_file_argbuf.
9228         (clear_args): Truncate at_file_argbuf.
9229         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
9230         (open_at_file): New function.
9231         (close_at_file): Likewise.
9232         (create_at_file): Delete.
9233         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
9234         <'o'>: Likewise.
9235         <'@'>: New case.
9236         (validate_switches_from_spec): Deal with %@{...} sequence.
9237         (validate_switches): Likewise.
9238         (driver::finalize): Call clear_args.
9240 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
9242         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
9244 2018-06-11  Martin Sebor  <msebor@redhat.com>
9246         * doc/invoke.texi (-Wall): List -Wc++17-compat.
9247         (Wno-class-memaccess): Add @opindex.
9248         (Wno-templates, Wno-multiple-inheritance): Same.
9249         (Wno-virtual-inheritance, Wno-namespaces): Same.
9250         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
9251         (Wno-format-overflow, Wno-format-truncation): Same.
9252         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
9253         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
9254         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
9255         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
9256         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
9257         (Wno-misspelled-isr): Same.
9259 2018-06-11  Martin Sebor  <msebor@redhat.com>
9261         * PR tree-optimization/86083
9262         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
9264 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
9266         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
9268 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
9270         PR target/85755
9271         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
9272         on the correct operand.
9273         (*movdi_internal64): Ditto.
9275 2018-06-11  Martin Liska  <mliska@suse.cz>
9277         PR tree-optimization/86089
9278         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
9280 2018-06-11  Julia Koval  <julia.koval@intel.com>
9282         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
9283         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
9284         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
9286 2018-06-11  Olivier Hainque  <hainque@adacore.com>
9288         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
9289         for Ada with strict dwarf2.
9291 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
9293         PR target/85755
9294         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
9295         addresses.
9297 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
9299         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
9301 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
9303         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
9304         TARGET_ELF.
9306 2018-06-08  Martin Liska  <mliska@suse.cz>
9308         * tree-cfg.h (debug_function): Fix argument type to match
9309         implementation.
9311 2018-06-08  Martin Liska  <mliska@suse.cz>
9313         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
9314         Remove usage of MPX-related (and removed) fields.
9315         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
9317 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
9319         * cfg.c (debug): Use TDF_NONE rather than 0.
9320         * cfghooks.c (debug): Likewise.
9321         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
9322         (struct dump_option_value_info): Convert to...
9323         (struct kv_pair): ...this template type.
9324         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
9325         rather than 0.
9326         (optinfo_verbosity_options): Likewise.
9327         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
9328         OPTGROUP_NONE.
9329         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
9330         than int for "optgroup_flags" param.
9331         (dump_generic_expr_loc): Use dump_flags_t rather than int for
9332         "dump_kind" param.
9333         (dump_dec): Likewise.
9334         (dump_finish): Use TDF_NONE rather than 0.
9335         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
9336         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
9337         than 0.  Update for change to option_ptr.
9338         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
9339         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
9340         0.  Update for changes to optinfo_verbosity_options and
9341         optgroup_options.
9342         (opt_info_switch_p): Convert optgroup_flags from int to
9343         optgroup_flags_t.
9344         (dump_basic_block): Use dump_flags_t rather than int
9345         for "dump_kind" param.
9346         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
9347         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
9348         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
9349         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
9350         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
9351         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
9352         TDF_NONE): Convert from macros to...
9353         (enum dump_flag): ...this new enum.
9354         (dump_flags_t): Update to use enum.
9355         (operator|, operator&, operator~, operator|=, operator&=):
9356         Implement for dump_flags_t.
9357         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
9358         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
9359         Convert from macros to...
9360         (enum optgroup_flag): ...this new enum.
9361         (optgroup_flags_t): New typedef.
9362         (operator|, operator|=): Implement for optgroup_flags_t.
9363         (struct dump_file_info): Convert field "alt_flags" to
9364         dump_flags_t.  Convert field "optgroup_flags" to
9365         optgroup_flags_t.
9366         (dump_basic_block): Use dump_flags_t rather than int for param.
9367         (dump_generic_expr_loc): Likewise.
9368         (dump_dec): Likewise.
9369         (dump_register): Convert param "optgroup_flags" to
9370         optgroup_flags_t.
9371         (opt_info_enable_passes): Likewise.
9372         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
9373         than 0.
9374         * gimple-pretty-print.c (debug): Likewise.
9375         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
9376         (merged_store_group::apply_stores): Likewise.
9377         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
9378         * gimple.c (verify_gimple_pp): Likewise.
9379         * graphite-poly.c (print_pbb_body): Likewise.
9380         * passes.c (pass_manager::register_one_dump_file): Convert
9381         local "optgroup_flags" to optgroup_flags_t.
9382         * print-tree.c (print_node): Use TDF_NONE rather than 0.
9383         (debug): Likewise.
9384         (debug_body): Likewise.
9385         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
9386         to optgroup_flags_t.
9387         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
9388         than 0.
9389         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
9390         (convert_mult_to_fma): Likewise.
9391         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
9392         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
9393         * tree-vect-data-refs.c (dump_lower_bound): Convert param
9394         "dump_kind" to dump_flags_t.
9396 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
9398         * config/rs6000/rs6000.c (min, max): Delete.
9400 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
9402         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
9403         -mabi=spe and -mabi=no-spe.
9405 2018-06-08  Martin Liska  <mliska@suse.cz>
9407         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
9408         where we expect an existing summary.
9410 2018-06-08  Martin Liska  <mliska@suse.cz>
9412         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
9413         * ipa-inline.h (estimate_edge_growth): Likewise.
9415 2018-06-08  Martin Liska  <mliska@suse.cz>
9417         * cgraph.c (function_version_hasher::hash): Use
9418         cgraph_node::get_uid ().
9419         (function_version_hasher::equal):
9420         * cgraph.h (cgraph_node::get_uid): New method.
9421         * ipa-inline.c (update_caller_keys): Use
9422         cgraph_node::get_uid ().
9423         (update_callee_keys): Likewise.
9424         * ipa-utils.c (searchc): Likewise.
9425         (ipa_reduced_postorder): Likewise.
9426         * lto-cgraph.c (input_node): Likewise.
9427         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
9428         * symbol-summary.h (symtab_insertion): Likewise.
9429         (symtab_removal): Likewise.
9430         (symtab_duplication): Likewise.
9431         * tree-pretty-print.c (dump_function_header): Likewise.
9432         * tree-sra.c (convert_callers_for_node): Likewise.
9434 2018-06-08  Martin Liska  <mliska@suse.cz>
9436         * cgraph.c (symbol_table::create_edge): Always assign a new
9437         unique number.
9438         (symbol_table::free_edge): Do not recycle numbers.
9439         * cgraph.h (cgraph_edge::get): New method.
9440         * symbol-summary.h (symtab_removal): Use it.
9441         (symtab_duplication): Likewise.
9442         (call_summary::hashable_uid): Remove.
9444 2018-06-08  Martin Liska  <mliska@suse.cz>
9446         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
9447         (initialize_growth_caches): Remove.
9448         (free_growth_caches): Likewise.
9449         (do_estimate_edge_time): Use edge_growth_cache.
9450         (do_estimate_edge_size): Likewise.
9451         (do_estimate_edge_hints): Likewise.
9452         * ipa-inline.c (reset_edge_caches): Likewise.
9453         (recursive_inlining): Likewise.
9454         (inline_small_functions): Likewise.
9455         * ipa-inline.h (initialize_growth_caches): Remove.
9456         (estimate_edge_size): Likewise.
9457         (estimate_edge_time): Likewise.
9458         (estimate_edge_hints): Likewise.
9459         (reset_edge_growth_cache): Likewise.
9460         * symbol-summary.h (call_summary::remove): New method.
9462 2018-06-08  Martin Liska  <mliska@suse.cz>
9464         * ipa-cp.c (class edge_clone_summary): New summary.
9465         (grow_edge_clone_vectors): Remove.
9466         (ipcp_edge_duplication_hook): Remove.
9467         (class edge_clone_summary_t): New call_summary class.
9468         (ipcp_edge_removal_hook): Remove.
9469         (edge_clone_summary_t::duplicate): New function.
9470         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
9471         (create_specialized_node): Likewise.
9472         (ipcp_driver): Initialize edge_clone_summaries and do not
9473         register hooks.
9475 2018-06-08  Martin Liska  <mliska@suse.cz>
9477         * symbol-summary.h (get): New function.
9478         (call_summary::m_initialize_when_cloning): New class member.
9480 2018-06-08  Martin Liska  <mliska@suse.cz>
9482         * cgraph.c (cgraph_node::remove): Do not recycle uid.
9483         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
9484         (symbol_table::allocate_cgraph_symbol): Do not set uid.
9485         * passes.c (uid_hash_t): Record removed_nodes by their uids.
9486         (remove_cgraph_node_from_order): Use the removed_nodes set.
9487         (do_per_function_toporder): Likwise.
9488         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
9489         instead of summary_uid.
9490         (symtab_removal): Likewise.
9491         (symtab_duplication): Likewise.
9493 2018-06-08  Martin Liska  <mliska@suse.cz>
9495         * ipa-cp.c (ipcp_store_bits_results): Use
9496         ipcp_transformation_sum.
9497         (ipcp_store_vr_results): Likewise.
9498         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
9499         to ...
9500         (ipcp_transformation_initialize): ... this.
9501         (ipa_set_node_agg_value_chain):
9502         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
9503         (write_ipcp_transformation_info): Likewise.
9504         (read_ipcp_transformation_info): Likewise.
9505         (ipcp_update_bits): Likewise.
9506         (ipcp_update_vr): Likewise.
9507         (ipcp_transform_function): Likewise.
9508         * ipa-prop.h: Rename ipcp_transformation_summary to
9509         ipcp_transformation.
9510         (class ipcp_transformation_t): New function summary.
9511         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
9512         (ipa_get_agg_replacements_for_node): Likewise.
9514 2018-06-08  Martin Liska  <mliska@suse.cz>
9516         * ipa-pure-const.c (struct funct_state_d): Do it class instead
9517         of struct.
9518         (class funct_state_summary_t): New function_summary class.
9519         (has_function_state): Remove.
9520         (get_function_state): Likewise.
9521         (set_function_state): Likewise.
9522         (add_new_function): Likewise.
9523         (funct_state_summary_t::insert): New function.
9524         (duplicate_node_data): Remove.
9525         (remove_node_data): Remove.
9526         (funct_state_summary_t::duplicate): New function.
9527         (register_hooks): Create new funct_state_summaries.
9528         (pure_const_generate_summary): Use it.
9529         (pure_const_write_summary): Likewise.
9530         (pure_const_read_summary): Likewise.
9531         (propagate_pure_const): Likewise.
9532         (propagate_nothrow): Likewise.
9533         (dump_malloc_lattice): Likewise.
9534         (propagate_malloc): Likewise.
9535         (execute): Do not register hooks, just remove summary
9536         instead.
9537         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
9538         constructor.
9540 2018-06-08  Martin Liska  <mliska@suse.cz>
9542         * ipa-reference.c (remove_node_data): Remove.
9543         (duplicate_node_data): Likewise.
9544         (class ipa_ref_var_info_summary_t): New class.
9545         (class ipa_ref_opt_summary_t): Likewise.
9546         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
9547         (get_reference_optimization_summary): Use
9548         ipa_ref_opt_sum_summaries.
9549         (set_reference_vars_info): Remove.
9550         (set_reference_optimization_summary): Likewise.
9551         (ipa_init): Create summaries.
9552         (init_function_info): Use function summary.
9553         (ipa_ref_opt_summary_t::duplicate): New function.
9554         (ipa_ref_opt_summary_t::remove): New function.
9555         (get_read_write_all_from_node): Fix GNU coding style.
9556         (propagate): Use function summary.
9557         (write_node_summary_p): Fix GNU coding style.
9558         (stream_out_bitmap): Likewise.
9559         (ipa_reference_read_optimization_summary): Use function summary.
9560         (ipa_reference_c_finalize): Do not release hooks.
9562 2018-06-08  Martin Liska  <mliska@suse.cz>
9564         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
9565         (analyze_function_body): Extract multiple calls of get_create.
9566         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9567         * ipa-inline.c (recursive_inlining): Use ::get method.
9568         * ipa-inline.h (estimate_edge_growth): Likewise.
9570 2018-06-08  Martin Liska  <mliska@suse.cz>
9572         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
9573         HSA_INVALID.
9574         (hsa_function_summary::hsa_function_summary): Use the new enum
9575         value.
9576         (hsa_gpu_implementation_p): Use hsa_summaries::get.
9577         * hsa-gen.c (hsa_get_host_function): Likewise.
9578         (get_brig_function_name): Likewise.
9579         * ipa-hsa.c (process_hsa_functions): Likewise.
9580         (ipa_hsa_write_summary): Likewise.
9581         * symbol-summary.h (symtab_duplication): Use ::get function/
9582         (get): New function.
9584 2018-06-08  Martin Liska  <mliska@suse.cz>
9586         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
9587         of get.
9588         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
9589         (hsa_register_kernel): Likewise.
9590         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
9591         * hsa-gen.c (hsa_get_host_function): Likewise.
9592         (get_brig_function_name): Likewise.
9593         (generate_hsa): Likewise.
9594         (pass_gen_hsail::execute): Likewise.
9595         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
9596         (devirtualization_time_bonus): Likewise.
9597         (ipcp_propagate_stage): Likewise.
9598         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
9599         (edge_set_predicate): Likewise.
9600         (evaluate_conditions_for_known_args): Likewise.
9601         (evaluate_properties_for_edge): Likewise.
9602         (ipa_fn_summary::reset): Likewise.
9603         (ipa_fn_summary_t::duplicate): Likewise.
9604         (dump_ipa_call_summary): Likewise.
9605         (ipa_dump_fn_summary): Likewise.
9606         (analyze_function_body): Likewise.
9607         (compute_fn_summary): Likewise.
9608         (estimate_edge_devirt_benefit): Likewise.
9609         (estimate_edge_size_and_time): Likewise.
9610         (estimate_calls_size_and_time): Likewise.
9611         (estimate_node_size_and_time): Likewise.
9612         (inline_update_callee_summaries): Likewise.
9613         (remap_edge_change_prob): Likewise.
9614         (remap_edge_summaries): Likewise.
9615         (ipa_merge_fn_summary_after_inlining): Likewise.
9616         (ipa_update_overall_fn_summary): Likewise.
9617         (read_ipa_call_summary): Likewise.
9618         (inline_read_section): Likewise.
9619         (write_ipa_call_summary): Likewise.
9620         (ipa_fn_summary_write): Likewise.
9621         (ipa_free_fn_summary): Likewise.
9622         * ipa-hsa.c (process_hsa_functions): Likewise.
9623         (ipa_hsa_write_summary): Likewise.
9624         (ipa_hsa_read_section): Likewise.
9625         * ipa-icf.c (sem_function::merge): Likewise.
9626         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9627         (do_estimate_edge_time): Likewise.
9628         (estimate_size_after_inlining): Likewise.
9629         (estimate_growth): Likewise.
9630         (growth_likely_positive): Likewise.
9631         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
9632         (inline_call): Likewise.
9633         * ipa-inline.c (caller_growth_limits): Likewise.
9634         (can_inline_edge_p): Likewise.
9635         (can_inline_edge_by_limits_p): Likewise.
9636         (compute_uninlined_call_time): Likewise.
9637         (compute_inlined_call_time): Likewise.
9638         (want_inline_small_function_p): Likewise.
9639         (edge_badness): Likewise.
9640         (update_caller_keys): Likewise.
9641         (update_callee_keys): Likewise.
9642         (recursive_inlining): Likewise.
9643         (inline_small_functions): Likewise.
9644         (inline_to_all_callers_1): Likewise.
9645         (dump_overall_stats): Likewise.
9646         (early_inline_small_functions): Likewise.
9647         (early_inliner): Likewise.
9648         * ipa-inline.h (estimate_edge_growth): Likewise.
9649         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
9650         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
9651         * ipa-prop.h (IPA_NODE_REF): Likewise.
9652         (IPA_EDGE_REF): Likewise.
9653         * ipa-pure-const.c (malloc_candidate_p): Likewise.
9654         (propagate_malloc): Likewise.
9655         * ipa-split.c (execute_split_functions): Likewise.
9656         * symbol-summary.h: Rename get to get_create.
9657         (get): Likewise.
9658         (get_create): Likewise.
9659         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
9661 2018-06-08  Martin Liska  <mliska@suse.cz>
9663         * symbol-summary.h (release): Move definition out of class
9664         declaration.
9665         (symtab_removal): Likewise.
9666         (symtab_duplication): Likewise.
9668 2018-06-08  Martin Liska  <mliska@suse.cz>
9670         * symbol-summary.h (function_summary): Move constructor
9671         implementation out of class declaration.
9672         (release): Likewise.
9673         (symtab_insertion): Likewise.
9674         (symtab_removal): Likewise.
9675         (symtab_duplication): Likewise.
9676         (get): Likewise.
9678 2018-06-08  Martin Liska  <mliska@suse.cz>
9680         * Makefile.in: Remove support for MPX (macros, related functions,
9681         fields in cgraph_node, ...).
9682         * builtin-types.def (BT_BND): Likewise.
9683         (BT_FN_BND_CONST_PTR): Likewise.
9684         (BT_FN_CONST_PTR_BND): Likewise.
9685         (BT_FN_VOID_PTR_BND): Likewise.
9686         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
9687         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
9688         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
9689         (expand_builtin_mempcpy_with_bounds): Likewise.
9690         (expand_builtin_memset_with_bounds): Likewise.
9691         (expand_builtin_memset_args): Likewise.
9692         (std_expand_builtin_va_start): Likewise.
9693         (expand_builtin): Likewise.
9694         (expand_builtin_with_bounds): Likewise.
9695         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
9696         (DEF_LIB_BUILTIN_CHKP): Likewise.
9697         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
9698         (DEF_CHKP_BUILTIN): Likewise.
9699         (BUILT_IN_MEMCPY): Likewise.
9700         (BUILT_IN_MEMMOVE): Likewise.
9701         (BUILT_IN_MEMPCPY): Likewise.
9702         (BUILT_IN_MEMSET): Likewise.
9703         (BUILT_IN_STPCPY): Likewise.
9704         (BUILT_IN_STRCAT): Likewise.
9705         (BUILT_IN_STRCHR): Likewise.
9706         (BUILT_IN_STRCPY): Likewise.
9707         (BUILT_IN_STRLEN): Likewise.
9708         (BUILT_IN_MEMCPY_CHK): Likewise.
9709         (BUILT_IN_MEMMOVE_CHK): Likewise.
9710         (BUILT_IN_MEMPCPY_CHK): Likewise.
9711         (BUILT_IN_MEMSET_CHK): Likewise.
9712         (BUILT_IN_STPCPY_CHK): Likewise.
9713         (BUILT_IN_STRCAT_CHK): Likewise.
9714         (BUILT_IN_STRCPY_CHK): Likewise.
9715         * calls.c (store_bounds): Likewise.
9716         (emit_call_1): Likewise.
9717         (special_function_p): Likewise.
9718         (maybe_warn_nonstring_arg): Likewise.
9719         (initialize_argument_information): Likewise.
9720         (finalize_must_preallocate): Likewise.
9721         (compute_argument_addresses): Likewise.
9722         (expand_call): Likewise.
9723         * cfgexpand.c (expand_call_stmt): Likewise.
9724         (expand_return): Likewise.
9725         (expand_gimple_stmt_1): Likewise.
9726         (pass_expand::execute): Likewise.
9727         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
9728         (cgraph_node::remove): Likewise.
9729         (cgraph_node::dump): Likewise.
9730         (cgraph_node::verify_node): Likewise.
9731         * cgraph.h (chkp_function_instrumented_p): Likewise.
9732         (symtab_node::get_alias_target): Likewise.
9733         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
9734         (cgraph_local_p): Likewise.
9735         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
9736         (cgraph_edge::rebuild_references): Likewise.
9737         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
9738         (walk_polymorphic_call_targets): Likewise.
9739         (cgraph_node::expand_thunk): Likewise.
9740         (symbol_table::output_weakrefs): Likewise.
9741         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
9742         (ix86_handle_option): Likewise.
9743         * config/i386/constraints.md: Likewise.
9744         * config/i386/i386-builtin-types.def (BND): Likewise.
9745         (VOID): Likewise.
9746         (PVOID): Likewise.
9747         (ULONG): Likewise.
9748         * config/i386/i386-builtin.def (BDESC_END): Likewise.
9749         (BDESC_FIRST): Likewise.
9750         (BDESC): Likewise.
9751         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
9752         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
9753         * config/i386/i386.c (enum reg_class): Likewise.
9754         (ix86_target_string): Likewise.
9755         (ix86_option_override_internal): Likewise.
9756         (ix86_conditional_register_usage): Likewise.
9757         (ix86_valid_target_attribute_inner_p): Likewise.
9758         (ix86_set_indirect_branch_type): Likewise.
9759         (ix86_set_current_function): Likewise.
9760         (ix86_function_arg_regno_p): Likewise.
9761         (init_cumulative_args): Likewise.
9762         (ix86_function_arg_advance): Likewise.
9763         (ix86_function_arg): Likewise.
9764         (ix86_pass_by_reference): Likewise.
9765         (ix86_function_value_regno_p): Likewise.
9766         (ix86_function_value_1): Likewise.
9767         (ix86_function_value_bounds): Likewise.
9768         (ix86_return_in_memory): Likewise.
9769         (ix86_setup_incoming_vararg_bounds): Likewise.
9770         (ix86_va_start): Likewise.
9771         (indirect_thunk_need_prefix): Likewise.
9772         (print_reg): Likewise.
9773         (ix86_print_operand): Likewise.
9774         (ix86_expand_call): Likewise.
9775         (ix86_output_function_return): Likewise.
9776         (reg_encoded_number): Likewise.
9777         (BDESC_VERIFYS): Likewise.
9778         (ix86_init_mpx_builtins): Likewise.
9779         (ix86_init_builtins): Likewise.
9780         (ix86_emit_cmove): Likewise.
9781         (ix86_emit_move_max): Likewise.
9782         (ix86_expand_builtin): Likewise.
9783         (ix86_builtin_mpx_function): Likewise.
9784         (ix86_get_arg_address_for_bt): Likewise.
9785         (ix86_load_bounds): Likewise.
9786         (ix86_store_bounds): Likewise.
9787         (ix86_load_returned_bounds): Likewise.
9788         (ix86_store_returned_bounds): Likewise.
9789         (ix86_class_likely_spilled_p): Likewise.
9790         (ix86_hard_regno_mode_ok): Likewise.
9791         (x86_order_regs_for_local_alloc): Likewise.
9792         (ix86_mitigate_rop): Likewise.
9793         (ix86_bnd_prefixed_insn_p): Likewise.
9794         (ix86_mpx_bound_mode): Likewise.
9795         (ix86_make_bounds_constant): Likewise.
9796         (ix86_initialize_bounds): Likewise.
9797         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
9798         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
9799         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
9800         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
9801         (TARGET_CHKP_BOUND_MODE): Likewise.
9802         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
9803         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
9804         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
9805         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
9806         * config/i386/i386.h (TARGET_MPX): Likewise.
9807         (TARGET_MPX_P): Likewise.
9808         (VALID_BND_REG_MODE): Likewise.
9809         (FIRST_BND_REG): Likewise.
9810         (LAST_BND_REG): Likewise.
9811         (enum reg_class): Likewise.
9812         (BND_REG_P): Likewise.
9813         (BND_REGNO_P): Likewise.
9814         (BNDmode): Likewise.
9815         (ADJUST_INSN_LENGTH): Likewise.
9816         * config/i386/i386.md: Likewise.
9817         * config/i386/i386.opt: Likewise.
9818         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
9819         (defined): Likewise.
9820         (LINK_MPX): Likewise.
9821         (MPX_SPEC): Likewise.
9822         (LIBMPX_SPEC): Likewise.
9823         (LIBMPXWRAPPERS_SPEC): Likewise.
9824         (CHKP_SPEC): Likewise.
9825         * config/i386/predicates.md: Likewise.
9826         * dbxout.c (dbxout_type): Likewise.
9827         * doc/extend.texi: Likewise.
9828         * doc/invoke.texi: Likewise.
9829         * doc/md.texi: Likewise.
9830         * doc/tm.texi: Likewise.
9831         * doc/tm.texi.in: Likewise.
9832         * dwarf2out.c (is_base_type): Likewise.
9833         (gen_formal_types_die): Likewise.
9834         (gen_subprogram_die): Likewise.
9835         (gen_type_die_with_usage): Likewise.
9836         (gen_decl_die): Likewise.
9837         (dwarf2out_late_global_decl): Likewise.
9838         * expr.c (expand_assignment): Likewise.
9839         (emit_storent_insn): Likewise.
9840         (store_expr_with_bounds): Likewise.
9841         (store_expr): Likewise.
9842         (expand_expr_real_1): Likewise.
9843         * expr.h (store_expr_with_bounds): Likewise.
9844         * function.c (use_register_for_decl): Likewise.
9845         (struct bounds_parm_data): Likewise.
9846         (assign_parms_augmented_arg_list): Likewise.
9847         (assign_parm_find_entry_rtl): Likewise.
9848         (assign_parm_is_stack_parm): Likewise.
9849         (assign_parm_load_bounds): Likewise.
9850         (assign_bounds): Likewise.
9851         (assign_parms): Likewise.
9852         (expand_function_start): Likewise.
9853         * gcc.c (CHKP_SPEC): Likewise.
9854         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
9855         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
9856         (wrestrict_dom_walker::check_call): Likewise.
9857         * gimple.c (gimple_build_call_from_tree): Likewise.
9858         * gimple.h (enum gf_mask): Likewise.
9859         (gimple_call_with_bounds_p): Likewise.
9860         (gimple_call_set_with_bounds): Likewise.
9861         * gimplify.c (gimplify_init_constructor): Likewise.
9862         * ipa-cp.c (initialize_node_lattices): Likewise.
9863         (propagate_constants_across_call): Likewise.
9864         (find_more_scalar_values_for_callers_subset): Likewise.
9865         * ipa-hsa.c (process_hsa_functions): Likewise.
9866         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
9867         * ipa-icf.c (sem_function::merge): Likewise.
9868         * ipa-inline.c (early_inliner): Likewise.
9869         * ipa-pure-const.c (warn_function_noreturn): Likewise.
9870         (warn_function_cold): Likewise.
9871         (propagate_pure_const): Likewise.
9872         * ipa-ref.h (enum GTY): Likewise.
9873         * ipa-split.c (find_retbnd): Likewise.
9874         (consider_split): Likewise.
9875         (split_function): Likewise.
9876         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
9877         * ipa.c (walk_polymorphic_call_targets): Likewise.
9878         (symbol_table::remove_unreachable_nodes): Likewise.
9879         (process_references): Likewise.
9880         (cgraph_build_static_cdtor_1): Likewise.
9881         * lto-cgraph.c (lto_output_node): Likewise.
9882         (output_refs): Likewise.
9883         (compute_ltrans_boundary): Likewise.
9884         (input_overwrite_node): Likewise.
9885         (input_node): Likewise.
9886         (input_cgraph_1): Likewise.
9887         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
9888         * passes.c (pass_manager::execute_early_local_passes): Likewise.
9889         (class pass_chkp_instrumentation_passes): Likewise.
9890         (make_pass_chkp_instrumentation_passes): Likewise.
9891         * passes.def: Likewise.
9892         * rtl.h (struct GTY): Likewise.
9893         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
9894         * stor-layout.c (layout_type): Likewise.
9895         * symtab.c: Likewise.
9896         * target.def: Likewise.
9897         * targhooks.c (default_chkp_bound_type): Likewise.
9898         (default_chkp_bound_mode): Likewise.
9899         (default_builtin_chkp_function): Likewise.
9900         (default_chkp_function_value_bounds): Likewise.
9901         (default_chkp_make_bounds_constant): Likewise.
9902         (default_chkp_initialize_bounds): Likewise.
9903         * targhooks.h (default_chkp_bound_type): Likewise.
9904         (default_chkp_bound_mode): Likewise.
9905         (default_builtin_chkp_function): Likewise.
9906         (default_chkp_function_value_bounds): Likewise.
9907         (default_chkp_make_bounds_constant): Likewise.
9908         (default_chkp_initialize_bounds): Likewise.
9909         * toplev.c (compile_file): Likewise.
9910         (process_options): Likewise.
9911         * tree-core.h (DEF_BUILTIN): Likewise.
9912         (DEF_BUILTIN_CHKP): Likewise.
9913         * tree-inline.c (declare_return_variable): Likewise.
9914         (remap_gimple_stmt): Likewise.
9915         (copy_bb): Likewise.
9916         (initialize_inlined_parameters): Likewise.
9917         (expand_call_inline): Likewise.
9918         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
9919         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
9920         (make_pass_ipa_chkp_produce_thunks): Likewise.
9921         (make_pass_chkp): Likewise.
9922         (make_pass_chkp_opt): Likewise.
9923         (make_pass_chkp_instrumentation_passes): Likewise.
9924         * tree-pretty-print.c (dump_generic_node): Likewise.
9925         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
9926         * tree-ssa-dce.c (propagate_necessity): Likewise.
9927         (eliminate_unnecessary_stmts): Likewise.
9928         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
9929         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
9930         * tree-ssa-sccvn.h: Likewise.
9931         * tree-ssa-strlen.c (get_string_length): Likewise.
9932         (valid_builtin_call): Likewise.
9933         (adjust_last_stmt): Likewise.
9934         (handle_builtin_strchr): Likewise.
9935         (handle_builtin_strcpy): Likewise.
9936         (handle_builtin_stxncpy): Likewise.
9937         (handle_builtin_memcpy): Likewise.
9938         (handle_builtin_strcat): Likewise.
9939         (strlen_check_and_optimize_stmt): Likewise.
9940         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
9941         * tree-streamer-in.c: Likewise.
9942         * tree-streamer.c (record_common_node): Likewise.
9943         * tree.c (tree_code_size): Likewise.
9944         (wide_int_to_tree_1): Likewise.
9945         (type_contains_placeholder_1): Likewise.
9946         (build_common_tree_nodes): Likewise.
9947         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
9948         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
9949         (POINTER_BOUNDS_P): Likewise.
9950         (BOUNDED_TYPE_P): Likewise.
9951         (BOUNDED_P): Likewise.
9952         (CALL_WITH_BOUNDS_P): Likewise.
9953         (pointer_bounds_type_node): Likewise.
9954         * value-prof.c (gimple_ic): Likewise.
9955         * var-tracking.c (vt_add_function_parameters): Likewise.
9956         * varasm.c (make_decl_rtl): Likewise.
9957         (assemble_start_function): Likewise.
9958         (output_constant): Likewise.
9959         (maybe_assemble_visibility): Likewise.
9960         * varpool.c (ctor_for_folding): Likewise.
9961         * chkp-builtins.def: Remove.
9962         * ipa-chkp.c: Remove.
9963         * ipa-chkp.h: Remove.
9964         * rtl-chkp.c: Remove.
9965         * rtl-chkp.h: Remove.
9966         * tree-chkp-opt.c: Remove.
9967         * tree-chkp.c: Remove.
9968         * tree-chkp.h: Remove.
9970 2018-06-07  Carl Love  <cel@us.ibm.com>
9972         * config/rs6000/vsx.md (vextract_fp_from_shorth,
9973         vextract_fp_from_shortl): Add BE support.
9975 2018-06-07  Paul Koning  <ni1d@arrl.net>
9977         * compare-elim.c (try_merge_compare): Don't merge compare if
9978         address contains a side effect.
9979         (try_eliminate_compare): Likewise.
9981 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
9983         * config.gcc: Support "tremont".
9984         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
9985         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
9986         PROCESSOR_TREMONT.
9987         * config/i386/i386.c (m_TREMONT): Define.
9988         (processor_target_table): Add "tremont".
9989         (PTA_TREMONT): Define.
9990         (ix86_lea_outperforms): Add TARGET_TREMONT.
9991         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
9992         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
9993         and M_INTEL_GOLDMONT_PLUS.
9994         (fold_builtin_cpu): Add "tremont".
9995         (ix86_add_stmt_cost): Add TARGET_TREMONT.
9996         (ix86_option_override_internal): Add "tremont".
9997         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
9998         (processor_type): Add PROCESSOR_TREMONT.
9999         * config/i386/x86-tune.def: Add m_TREMONT.
10000         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
10002 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
10004         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
10005         symbol defined for msp430i* devices to be lower case.
10007 2018-06-07  Richard Biener  <rguenther@suse.de>
10009         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
10010         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
10011         Properly wrap signed arithmetic if overflow wraps.
10013 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
10015         PR tree-optimization/69615
10016         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
10017         of a cast from a same precision integral SSA_NAME in a bb dominated
10018         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
10019         cast to utype if rhs2 has already a compatible type.
10021 2018-06-07  Richard Biener  <rguenther@suse.de>
10023         PR tree-optimization/85935
10024         * graphite-scop-detection.c (find_params_in_bb): Analyze
10025         condition operands with respect to the correct loop.  Assert
10026         the analysis doesn't fail.
10028 2018-06-04  Carl Love  <cel@us.ibm.com>
10030         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
10031         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
10032         as it is slightly cheaper.
10033         (first_match_or_eos_index_<mode>):
10034         Calculate index using natural element order.
10035         (first_match_index_<mode>):
10036         Calculate index using natural element order.
10037         (first_match_or_eos_index_<mode>):
10038         Calculate index using natural order.
10039         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
10040         for BE and LE modes.
10041         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
10042         P9V_BUILTIN_VCLZLSBB_V16QI.
10043         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
10044         specific.
10046 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10048         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
10049         indentation and line wrap for many prototypes.  Add missing
10050         @smallexample directives around block of prototypes for vec_xl and
10051         vec_xst.
10053 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
10055         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
10056         track if we pass or return IEEE 128-bit floating point.
10057         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
10058         C++ mangling that is compatible with GCC 8.1.
10059         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
10060         (init_cumulative_args): Note if we pass or return IEEE 128-bit
10061         floating point types.
10062         (rs6000_function_arg_advance_1): Likewise.
10063         (rs6000_mangle_type): Optionally generate mangled names that match
10064         what GCC 8.1 generated for IEEE 128-bit floating point types.
10065         (rs6000_globalize_decl_name): If we have an external function that
10066         passes or returns IEEE 128-bit types, generate a weak reference
10067         from the mangled name used in GCC 8.1 to the current mangled
10068         name.
10069         (rs6000_init_builtins): Make __ibm128 use the long double type if
10070         long double is IBM extended double.  Make __float128 use the long
10071         double type if long double is IEEE 128-bit.
10073         PR target/85657
10074         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
10075         macro for __ibm128 built-in functions.
10076         (PACK_IF): Add __ibm128 pack/unpack functions.
10077         (UNPACK_IF): Likewise.
10078         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
10079         enable long double built-in functions if long double is IEEE
10080         128-bit floating point.
10081         (rs6000_invalid_builtin): Update long double built-in function
10082         error message.
10083         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
10084         functions, adjust the built-in function to use the long double
10085         built-in function if __ibm128 and long double are the same type.
10086         * doc/extend.texi (PowerPC builtins): Update documention for
10087         __builtin_{,un}pack_longdouble.  Add documentation for
10088         __builtin_{,un}pack_ibm128.
10090 2018-06-06  Jim Wilson  <jimw@sifive.com>
10092         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
10093         (struct machine_function): New field interrupt_mode.
10094         (riscv_handle_type_attribute): New function.  Add forward declaration.
10095         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
10096         (riscv_expand_epilogue): Check interrupt_mode field.
10097         (riscv_set_current_function): Check interrupt attribute args and
10098         set interrupt_mode field.
10099         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
10100         (riscv_sret, riscv_uret): New.
10101         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
10102         new arguments to interrupt attribute.
10104 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
10106         PR target/63177
10107         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
10108         Don't handle -mcpu=power8 if -mpower9-vector is also used.
10110 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10112         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
10113         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
10114         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
10115         several redundant entries.
10117 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
10119         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
10120         type from "rtx" to "rtx_insn *".
10121         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
10122         for local "call_insn", removing cast.
10123         (ix86_expand_call): Likewise, introducing a "call_insn" local.
10125 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
10127         PR tree-optimization/86066
10128         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
10129         for BIT_INSERT_EXPR stores.
10131 2018-06-06  Richard Biener  <rguenther@suse.de>
10133         PR tree-optimization/86062
10134         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
10135         component refs ontop
10136         of to be offsetted base.
10138 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
10140         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
10141         to be static and remove check on interrupt attribute name.
10143 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10145         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10146         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
10148 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
10150         PR target/79924
10151         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
10152         second argument.
10153         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
10154         Remove second argument, change how error is called.
10155         (aarch64_layout_arg): Remove second argument from
10156         aarch64_err_no_fpadvsimd call.
10157         (aarch64_init_cumulative_args): Ditto.
10158         (aarch64_gimplify_va_arg_expr): Ditto.
10159         * config/aarch64/aarch64.md (mov<mode>): Ditto.
10161 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
10163         * config/i386/i386.md (simple_return_indirect_internal): New expander.
10164         (*simple_return_indirect_internal<mode>): Rename from
10165         simple_return_indirect_internal.  Use W mode iterator.
10166         (rstorssp): New expander.
10167         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
10168         (clrssbsy): New expander.
10169         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
10171 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
10173         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
10174         __typeof__.
10175         (cmse_check_pointed_object): Likewise.
10177 2018-06-05  Martin Liska  <mliska@suse.cz>
10179         PR gcov-profile/47618
10180         * doc/invoke.texi: Document how -fprofile-dir format
10181         is extended.
10183 2018-06-05  Richard Biener  <rguenther@suse.de>
10185         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
10186         removal pretend DOM info isn't available so we do not update
10187         it and only remove edges, not dominated blocks.  Actually free
10188         DOM info in case we removed something.  Remove unreachable blocks.
10189         (mfb_keep_latches): Work with either DOM info or marked backedges.
10190         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
10191         first.  Mark backedges if DOM info isn't available.
10192         (Re-)compute DOM info after cleanup_control_flow_pre.
10194 2018-06-05  Richard Biener  <rguenther@suse.de>
10196         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
10197         (locus_discrim_hasher::hash): Adjust.
10198         (locus_discrim_hasher::equal): Likewise.
10199         (next_discriminator_for_locus): Work on line directly.
10200         (same_line_p): Pass in expanded locus1 as well.
10201         (assign_discriminators): Avoid redundant location expansions.
10203 2018-06-05  Richard Biener  <rguenther@suse.de>
10205         PR tree-optimization/86046
10206         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
10207         if required after clearing TREE_ADDRESSABLE.
10209 2018-06-05  Richard Biener  <rguenther@suse.de>
10211         PR tree-optimization/86047
10212         * tree-ssa-loop.c (for_each_index): Glob handling of all
10213         decls and constants and really handle all of them.
10215 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10217         PR target/81497
10218         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
10219         qualifier_void_pointer and qualifier_const_void_pointer.
10220         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
10221         (arm_init_builtins): Handle the above.
10222         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
10223         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
10224         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
10225         void intrinsics.
10227 2018-06-05  Martin Liska  <mliska@suse.cz>
10229         * auto-profile.c (read_autofdo_file): Do not use
10230         gcov_ctr_summary struct.
10231         (afdo_callsite_hot_enough_for_early_inline): Likewise.
10232         * coverage.c (struct counts_entry): Likewise.
10233         (read_counts_file): Read just single summary entry.
10234         (get_coverage_counts): Use gcov_summary struct.
10235         * coverage.h (get_coverage_counts): Likewise.
10236         * gcov-dump.c (dump_working_sets): Likewise.
10237         (tag_summary): Dump just single summary.
10238         * gcov-io.c (gcov_write_summary): Write just histogram
10239         summary.
10240         (gcov_read_summary): Read just single summary.
10241         (compute_working_sets): Use gcov_summary struct.
10242         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
10243         of GCOV_COUNTERS_SUMMABLE.
10244         (GCOV_COUNTERS_SUMMABLE): Remove.
10245         (GCOV_FIRST_VALUE_COUNTER): Replace with
10246         GCOV_COUNTER_V_INTERVAL.
10247         (struct gcov_ctr_summary): Remove.
10248         (struct gcov_summary): Directly use fields of former
10249         gcov_ctr_summary.
10250         (compute_working_sets): Use gcov_summary struct.
10251         * gcov.c (read_count_file): Do not use ctrs fields.
10252         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
10253         struct.
10254         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
10255         struct.
10256         * profile.c: Likewise.
10257         * profile.h: Likewise.
10259 2018-06-05  Martin Liska  <mliska@suse.cz>
10261         PR gcov-profile/84846
10262         * gcov.c (output_lines): Print working directory only
10263         in intermediate format.
10265 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
10267         * config/s390/s390-builtin-types.def: Add void function type.
10268         * config/s390/s390-builtins.def: Use the function type for the
10269         tbeginc builtin.
10271 2018-06-04  Jim Wilson  <jimw@sifive.com>
10273         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
10274         to int.
10275         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
10276         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
10277         handle EH_RETURN_DATA_REGNO registers properly.
10278         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
10279         (riscv_expand_epilogue): Update comment.  Change argument name and
10280         type.  Update code to use new name and type.  Pass new args to
10281         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
10282         EXCEPTION_RETURN.
10283         * config/riscv/riscv.md (NORMAL_RETURN): New.
10284         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
10285         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
10286         (eh_return): Call gen_eh_return_internal and emit barrier.
10287         (eh_return_internal): Call riscv_expand_epilogue.
10289 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
10291         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
10292         bit_insertion field and declare can_be_merged_into method.
10293         (merged_store_group::can_be_merged_into): New method.
10294         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
10295         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
10296         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
10298 2018-06-04  Richard Biener  <rguenther@suse.de>
10300         PR tree-optimization/85955
10301         * builtins.c (fold_builtin_sincos): Convert pointers to
10302         destination to appropriate type before dereferencing.
10304 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
10306         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
10308 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
10310         * expr.c (expand_expr_real_1): Force the operand into memory if
10311         its TYPE_MODE is BLKmode and if there is no integer mode for
10312         the number of bits being extracted.
10314 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
10316         PR target/85832
10317         PR target/86036
10318         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
10319         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
10321 2018-06-04  Richard Biener  <rguenther@suse.de>
10323         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
10324         (cleanup_tree_cfg_noloop): ... single caller.  Do
10325         start_recording_case_labels later.
10327 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
10329         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
10330         to _IMMINTRIN_H_INCLUDED.
10331         * config/i386/pconfigintrin.h: Ditto.
10332         * config/i386/waitpkgintrin.h: Ditto.
10333         * config/i386/immintrin.h: Add includes for sgxintrin.h,
10334         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
10335         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
10336         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
10337         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
10338         waitpkgintrin.h and cldemoteintrin.h.
10340 2018-06-04  Richard Biener  <rguenther@suse.de>
10342         PR tree-optimization/86038
10343         * tracer.c (find_best_successor): Check probability for
10344         being initialized, bail out if not.
10346 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
10348         PR target/86003
10349         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
10350         of bits to ignore when comparing architectures.
10352 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
10354         PR tree-optimization/69615
10355         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
10356         maximum or minimum of the type, try to merge it also as if
10357         range1 is + [-, x - 1] or + [x + 1, -].
10359         PR c++/86025
10360         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
10362 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
10364         PR tree-optimization/86034
10365         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
10366         the unsigned bitfield type in a bit insertion sequence if it does not
10367         have a larger precision than the bitfield size.
10368         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
10370 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
10372         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
10374 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
10376         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
10377         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
10378         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
10379         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
10381 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
10383         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
10384         Disable -fdelete-null-pointer-checks for ELF toolchain.
10386 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
10387             Kito Cheng  <kito.cheng@gmail.com>
10389         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
10390         (nds32le-*-*, nds32be-*-*): Integrate checking process.
10391         (nds32*-*-*): Add glibc and uclibc conditions.
10392         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
10393         (TARGET_EXCEPT_UNWIND_INFO): Define.
10394         * config/nds32/elf.h: New file.
10395         * config/nds32/linux.h: New file.
10396         * config/nds32/nds32-elf.opt: New file.
10397         * config/nds32/nds32-linux.opt: New file.
10398         * config/nds32/nds32-fp-as-gp.c
10399         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
10400         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
10401         TARGET_LINUX_ABI.
10402         (nds32_asm_file_end): Ditto.
10403         (nds32_print_operand): Ditto.
10404         (nds32_insert_attributes): Ditto.
10405         (nds32_init_libfuncs): New function.
10406         (TARGET_HAVE_TLS): Define.
10407         (TARGET_INIT_LIBFUNCS): Define.
10408         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
10409         spec content.
10410         (TARGET_ELF): Apply different mcmodel setting.
10411         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
10412         been migrated into elf.h and linux.h files.
10413         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
10414         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
10415         (mcmodel): The content has been migrated into nds32-elf.opt and
10416         nds32-linux.opt files.
10417         * config/nds32/t-elf: New file.
10418         * config/nds32/t-linux: New file.
10420 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
10421             Shiva Chen  <shiva0217@gmail.com>
10423         * config/nds32/constants.md (unspec_volatile_element): Add
10424         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
10425         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
10426         optimization.
10427         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
10428         (make_pass_nds32_fp_as_gp): Declare.
10429         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
10430         optmization pass.
10431         (nds32_asm_function_end_prologue): Remove unused asm output.
10432         (nds32_asm_function_begin_epilogue): Remove unused asm output.
10433         (nds32_asm_file_start): Output necessary fp_as_gp information.
10434         (nds32_option_override): Adjust register usage.
10435         (nds32_expand_prologue): Consider fp_as_gp situation.
10436         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
10437         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
10438         (epilogue): Ditto.
10439         (return): Ditto.
10440         (simple_return): Ditto.
10441         (omit_fp_begin): Output special directive for fp_as_gp.
10442         (omit_fp_end): Output special directive for fp_as_gp.
10443         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
10444         mforbid-fp-as-gp): New options.
10446 2018-06-01  Mark Wielaard  <mark@klomp.org>
10448         * dwarf2out.c (dwarf2out_finish): Remove generation of
10449         DW_AT_loclists_base.
10451 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
10453         * gimple-ssa-store-merging.c: Include gimple-fold.h.
10454         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
10455         (struct merged_store_group): Add bit_insertion field.
10456         (dump_char_array): Use standard hexadecimal format.
10457         (merged_store_group::merged_store_group): Set bit_insertion to false.
10458         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
10459         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
10460         also print the mask in the dump file.
10461         (pass_store_merging::gate): Minor tweak.
10462         (imm_store_chain_info::coalesce_immediate): Fix wrong association
10463         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
10464         stores with INTEGER_CST stores.
10465         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
10466         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
10467         and use it throughout.  Generate bit insertion sequences if need be.
10468         (pass_store_merging::process_store): Remove redundant condition.
10469         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
10471 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
10473         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
10474         the 128-bit floating point types.  Fix function comment.
10476 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10478         * config/aarch64/aarch64-simd.md
10479         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
10480         mnemonics.
10481         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
10482         mnemonics.
10484 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
10486         PR tree-optimization/85989
10487         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
10488         variable.
10489         (backprop::intersect_uses): Check it when deciding whether this
10490         is a backedge reference.
10491         (backprop::process_block): Add each phi to m_visited_phis
10492         after visiting it, then clear it at the end.
10494 2018-06-01  Richard Biener  <rguenther@suse.de>
10496         * tree-vectorizer.h (vect_dr_stmt): New function.
10497         (vect_get_load_cost): Adjust.
10498         (vect_get_store_cost): Likewise.
10499         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
10500         Use vect_dr_stmt instead of DR_SMTT.
10501         (vect_record_base_alignments): Likewise.
10502         (vect_calculate_target_alignment): Likewise.
10503         (vect_compute_data_ref_alignment): Likewise and make static.
10504         (vect_update_misalignment_for_peel): Likewise.
10505         (vect_verify_datarefs_alignment): Likewise.
10506         (vector_alignment_reachable_p): Likewise.
10507         (vect_get_data_access_cost): Likewise.  Pass down
10508         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
10509         (vect_get_peeling_costs_all_drs): Likewise.
10510         (vect_peeling_hash_get_lowest_cost): Likewise.
10511         (vect_enhance_data_refs_alignment): Likewise.
10512         (vect_find_same_alignment_drs): Likewise.
10513         (vect_analyze_data_refs_alignment): Likewise.
10514         (vect_analyze_group_access_1): Likewise.
10515         (vect_analyze_group_access): Likewise.
10516         (vect_analyze_data_ref_access): Likewise.
10517         (vect_analyze_data_ref_accesses): Likewise.
10518         (vect_vfa_segment_size): Likewise.
10519         (vect_small_gap_p): Likewise.
10520         (vectorizable_with_step_bound_p): Likewise.
10521         (vect_prune_runtime_alias_test_list): Likewise.
10522         (vect_analyze_data_refs): Likewise.
10523         (vect_supportable_dr_alignment): Likewise.
10524         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10525         (vect_gen_prolog_loop_niters): Likewise.
10526         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10527         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
10528         modify DR_STMT.
10529         (vect_recog_mask_conversion_pattern): Likewise.
10530         (vect_try_gather_scatter_pattern): Likewise.
10531         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
10532         to vect_get_store_cost.
10533         (vect_get_store_cost): Get stmt_info instead of DR.
10534         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
10535         (vect_get_load_cost): Get stmt_info instead of DR.
10537 2018-06-01  Richard Biener  <rguenther@suse.de>
10539         PR middle-end/86017
10540         * gimple-fold.c (var_decl_component_p): Also allow offsetted
10541         vars wrapped in MEM_REFs.
10543 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
10545         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10546         Fix subreg tests so that we only return a choice between
10547         GENERAL_REGS and FP_REGS if the original classes included both.
10549 2018-06-01  Richard Biener  <rguenther@suse.de>
10551         PR ipa/85960
10552         * tree-ssa-structalias.c (get_function_part_constraint):
10553         Handle NULL fi->decl.
10554         (find_func_aliases_for_call): Properly handle indirect
10555         fi from direct call.
10556         (find_func_clobbers): Likewise.
10557         (ipa_pta_execute): Likewise.
10558         (create_variable_info_for): For functions that are ifunc_resolver
10559         resolve to a varinfo that contains the result of the resolver call.
10560         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
10561         aliases.
10563 2018-05-31  Michael Collison  <michael.collison@arm.com>
10565         * config/aarch64/aarch64.md:
10566         (*fix_to_zero_extenddfdi2): New pattern.
10567         * gcc.target/aarch64/fix_extend1.c: New testcase.
10569 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
10571         PR middle-end/78809
10572         PR middle-end/83026
10573         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
10574         and BUILT_IN_STRNCMP_EQ.
10575         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
10576         BUILT_IN_STRNCMP_EQ.
10577         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
10578         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10579         (gimple_fold_builtin): Likewise.
10580         * tree-ssa-strlen.c (compute_string_length): New function.
10581         (determine_min_obsize): New function.
10582         (handle_builtin_string_cmp): New function to handle calls to
10583         string compare functions.
10584         (strlen_optimize_stmt): Add handling to builtin string compare
10585         calls.
10586         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
10587         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10588         * tree.c (build_common_builtin_nodes): Add new defines of
10589         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
10591 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
10593         PR target/85984
10594         * bb-reorder.c (pass_partition_blocks::gate): Return false for
10595         functions with naked attribute.
10597 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
10599         * config/i386/sse.md (avx_vec_concat<mode>):
10600         Substitute concat_tg_mode mode attribute with xtg_mode.
10601         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
10602         (concat_tg_mode): Remove mode attribute.
10604 2018-05-31  Martin Sebor  <msebor@redhat.com>
10606         PR c/82063
10607         * calls.c (alloc_max_size): Correct a logic error/typo.
10608         Treat excessive arguments as infinite.  Warn for invalid arguments.
10609         * doc/invoke.texi (-Walloc-size-larger-than): Update.
10611 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
10613         PR target/85829
10614         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
10615         and movx for Haswell.
10617 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
10618             Cesar Philippidis  <cesar@codesourcery.com>
10620         PR middle-end/85879
10621         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
10622         when emitting error on private/firstprivate reductions.
10623         * omp-low.c (lower_omp_target): Avoid reference-type processing
10624         on pointers for firstprivate clause.
10626 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
10628         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
10629         (st1x2): Likewise.
10630         (st1x3): Likewise.
10631         * config/aarch64/aarch64-simd.md
10632         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
10633         (aarch64_ld1_x3_<mode>): Likewise
10634         (aarch64_st1x2<VALLDIF:mode>): Likewise
10635         (aarch64_st1_x2_<mode>): Likewise
10636         (aarch64_st1x3<VALLDIF:mode>): Likewise
10637         (aarch64_st1_x3_<mode>): Likewise
10638         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
10639         (vld1_s8_x3): Likewise.
10640         (vld1_u16_x3): Likewise.
10641         (vld1_s16_x3): Likewise.
10642         (vld1_u32_x3): Likewise.
10643         (vld1_s32_x3): Likewise.
10644         (vld1_u64_x3): Likewise.
10645         (vld1_s64_x3): Likewise.
10646         (vld1_f16_x3): Likewise.
10647         (vld1_f32_x3): Likewise.
10648         (vld1_f64_x3): Likewise.
10649         (vld1_p8_x3): Likewise.
10650         (vld1_p16_x3): Likewise.
10651         (vld1_p64_x3): Likewise.
10652         (vld1q_u8_x3): Likewise.
10653         (vld1q_s8_x3): Likewise.
10654         (vld1q_u16_x3): Likewise.
10655         (vld1q_s16_x3): Likewise.
10656         (vld1q_u32_x3): Likewise.
10657         (vld1q_s32_x3): Likewise.
10658         (vld1q_u64_x3): Likewise.
10659         (vld1q_s64_x3): Likewise.
10660         (vld1q_f16_x3): Likewise.
10661         (vld1q_f32_x3): Likewise.
10662         (vld1q_f64_x3): Likewise.
10663         (vld1q_p8_x3): Likewise.
10664         (vld1q_p16_x3): Likewise.
10665         (vld1q_p64_x3): Likewise.
10666         (vst1_s64_x2): Likewise.
10667         (vst1_u64_x2): Likewise.
10668         (vst1_f64_x2): Likewise.
10669         (vst1_s8_x2): Likewise.
10670         (vst1_p8_x2): Likewise.
10671         (vst1_s16_x2): Likewise.
10672         (vst1_p16_x2): Likewise.
10673         (vst1_s32_x2): Likewise.
10674         (vst1_u8_x2): Likewise.
10675         (vst1_u16_x2): Likewise.
10676         (vst1_u32_x2): Likewise.
10677         (vst1_f16_x2): Likewise.
10678         (vst1_f32_x2): Likewise.
10679         (vst1_p64_x2): Likewise.
10680         (vst1q_s8_x2): Likewise.
10681         (vst1q_p8_x2): Likewise.
10682         (vst1q_s16_x2): Likewise.
10683         (vst1q_p16_x2): Likewise.
10684         (vst1q_s32_x2): Likewise.
10685         (vst1q_s64_x2): Likewise.
10686         (vst1q_u8_x2): Likewise.
10687         (vst1q_u16_x2): Likewise.
10688         (vst1q_u32_x2): Likewise.
10689         (vst1q_u64_x2): Likewise.
10690         (vst1q_f16_x2): Likewise.
10691         (vst1q_f32_x2): Likewise.
10692         (vst1q_f64_x2): Likewise.
10693         (vst1q_p64_x2): Likewise.
10694         (vst1_s64_x3): Likewise.
10695         (vst1_u64_x3): Likewise.
10696         (vst1_f64_x3): Likewise.
10697         (vst1_s8_x3): Likewise.
10698         (vst1_p8_x3): Likewise.
10699         (vst1_s16_x3): Likewise.
10700         (vst1_p16_x3): Likewise.
10701         (vst1_s32_x3): Likewise.
10702         (vst1_u8_x3): Likewise.
10703         (vst1_u16_x3): Likewise.
10704         (vst1_u32_x3): Likewise.
10705         (vst1_f16_x3): Likewise.
10706         (vst1_f32_x3): Likewise.
10707         (vst1_p64_x3): Likewise.
10708         (vst1q_s8_x3): Likewise.
10709         (vst1q_p8_x3): Likewise.
10710         (vst1q_s16_x3): Likewise.
10711         (vst1q_p16_x3): Likewise.
10712         (vst1q_s32_x3): Likewise.
10713         (vst1q_s64_x3): Likewise.
10714         (vst1q_u8_x3): Likewise.
10715         (vst1q_u16_x3): Likewise.
10716         (vst1q_u32_x3): Likewise.
10717         (vst1q_u64_x3): Likewise.
10718         (vst1q_f16_x3): Likewise.
10719         (vst1q_f32_x3): Likewise.
10720         (vst1q_f64_x3): Likewise.
10721         (vst1q_p64_x3): Likewise.
10723 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
10725         * config/msp430/msp430.c (msp430_output_labelref): Prepend
10726         user_label_prefix to name.
10728         * tree-core.h: Update comment about the format of NAME string
10729         passed to handler in attribute_spec.
10731         * config/msp430/msp430.md: Remove erroneous subreg expression from
10732         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
10733         zero_extend{q,h}isi2.
10735 2018-05-30  Borislav Petkov  <bp@suse.de>
10737         * doc/extend.texi: Document some architecture specific
10738         constraints and sort entries.
10740 2018-05-30  Martin Sebor  <msebor@redhat.com>
10742         PR middle-end/85369
10743         * builtins.c (expand_builtin_stpcpy_1): New function.
10744         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
10745         only if the former succeeds.
10747 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
10749         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
10750         in saphira.
10752 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
10754         * doc/invoke.texi (-flinker-output): Document
10756 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
10758         * passes.c (ipa_write_summaries): Only modify statements if body
10759         is in memory.
10760         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
10761         incrementally linking.
10762         (ipa_passes): Likewise.
10763         * lto-cgraph.c (lto_output_node): When incrementally linking do not
10764         pass down resolution info.
10765         * common.opt (flag_incremental_link): Update info.
10766         * gcc.c (plugin specs): Turn flinker-output=* to
10767         -plugin-opt=-linker-output-known
10768         * toplev.c (compile_file): Also cut compilation when doing incremental
10769         link.
10770         * flag-types. (enum lto_partition_model): Add
10771         LTO_LINKER_OUTPUT_NOLTOREL.
10772         (invoke.texi): Add -flinker-output docs.
10773         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
10774         link same way as WPA; do not stream in dead initializers.
10776         * dwarf2out.c (dwarf2out_die_ref_for_decl,
10777         darf2out_register_external_decl): Support incremental link.
10779 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
10781         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
10783 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
10785         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
10786         it down to simple_object_copy_lto_debug_sections.
10787         (run_gcc): Determine incremental LTO link time and configure
10788         lto1 into non-wpa mode, disable renaming of debug sections.
10790 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10792         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10793         descriptions of various incorrectly documented functions.
10795 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
10797         Revert:
10798         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10799         address check not strict.
10801 2018-05-30  Richard Biener  <rguenther@suse.de>
10803         PR tree-optimization/85964
10804         * tracer.c (better_p): Drop initialized count check, we only
10805         call the function with initialized counts now.
10806         (find_best_successor): Do find a best edge if one
10807         has uninitialized count.
10808         (find_best_predecessor): Likewise.  Do BB frequency check only
10809         if count is initialized.
10811 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
10813         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
10814         (aarch64_ldrstr_offset_compare): New.
10815         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
10816         load/store orderings.
10817         (aarch64_gen_adjusted_ldpstp): Likewise.
10819 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
10821         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10822         Check for subset of GENERAL_REGS and FP_REGS.
10823         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
10824         r=w alternative.
10826 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
10828         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
10829         and wi::to_poly_offset.  Add the current offset and then check
10830         whether the sum fits, rather than using an unchecked addition of
10831         a checked term.  Check for a shwi rather than a uhwi.
10832         * expr.c (get_bit_range): Use tree_to_poly_uint64.
10833         (store_constructor): Use poly_int_tree_p.
10834         (expand_expr_real_1): Likewise.
10835         * function.c (assign_temp): Likewise.
10836         * fold-const.c (const_binop): Use poly_int_tree_p and
10837         wi::to_poly_offset.
10838         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
10839         division.
10840         * ipa-icf-gimple.c (func_checker::compare_operand): Use
10841         to_poly_offset for MEM offsets.
10842         * ipa-icf.c (sem_variable::equals): Likewise.
10843         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
10844         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
10845         wi::to_poly_offset for BIT_FIELD_REF offsets.
10846         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
10847         wi::to_poly_offset.
10848         * var-tracking.c (emit_note_insn_var_location): Use
10849         tree_to_poly_uint64.
10851 2018-05-29  Jim Wilson  <jimw@sifive.com>
10853         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
10855 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
10857         PR target/85950
10858         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
10859         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
10860         sequence.
10861         (sse4_1_round<mode>2): Use nonimmediate_operand
10862         for operand 1 predicate.
10864 2018-05-29  Martin Sebor  <msebor@redhat.com>
10865             Richard Biener  <rguenther@suse.de>
10867         PR testsuite/85888
10868         * calls.c (get_size_range): Call determine_value_range instead
10869         of get_value_range..
10870         * tree-vrp.h (determine_value_range): Declared new function.
10871         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
10873 2018-05-29  Richard Biener  <rguenther@suse.de>
10875         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
10876         sure to use non-pattern stmts for get_earlier_stmt arguments.
10877         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
10878         called on pattern stmts.
10879         (get_later_stmt): Likewise.
10881 2018-05-29  Martin Liska  <mliska@suse.cz>
10883         PR gcov-profile/85759
10884         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
10885         env variables.
10887 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
10889         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
10890         VEC_UNPACK_*_EXPR.
10891         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
10892         VEC_PACK_*_EXPR.
10894         PR target/85918
10895         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10896         VEC_PACK_FLOAT_EXPR): New tree codes.
10897         * tree-pretty-print.c (op_code_prio): Handle
10898         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10899         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10900         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10901         * tree-inline.c (estimate_operator_cost): Likewise.
10902         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
10903         * fold-const.c (const_binop): Likewise.
10904         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
10905         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10906         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
10907         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
10908         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10909         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10910         * expr.c (expand_expr_real_2): Likewise.
10911         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
10912         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
10913         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
10914         optabs.
10915         * optabs.c (expand_widen_pattern_expr): For
10916         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
10917         sign from result type rather than operand's type.
10918         (expand_binop_directly): For vec_packu_float_optab and
10919         vec_packs_float_optab allow result type to be different from operand's
10920         type.
10921         * optabs-tree.c (optab_for_tree_code): Handle
10922         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10923         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
10924         * tree-vect-generic.c (expand_vector_operations_1):  Handle
10925         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10926         VEC_PACK_FLOAT_EXPR.
10927         * tree-vect-stmts.c (supportable_widening_operation): Handle
10928         FIX_TRUNC_EXPR.
10929         (supportable_narrowing_operation): Handle FLOAT_EXPR.
10930         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
10931         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
10932         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
10933         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
10934         mode attributes.
10935         (vec_pack<floatprefix>_float_<mode>): New expander.
10936         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
10937         attributes.
10938         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
10939         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
10940         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
10941         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
10942         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
10943         Document.
10944         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
10945         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
10946         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10947         VEC_PACK_FLOAT_EXPR): Document.
10949 2018-05-29  Richard Biener  <rguenther@suse.de>
10951         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
10952         member.
10953         (stmt_vec_info_vec): Make pointer.
10954         (init_stmt_vec_info_vec): Remove.
10955         (free_stmt_vec_info_vec): Likewise.
10956         (set_stmt_vec_info_vec): New function.
10957         (free_stmt_vec_infos): Likewise.
10958         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
10959         (set_vinfo_for_stmt): Likewise.
10960         (get_earlier_stmt): Likewise.
10961         (get_later_stmt): Likewise.
10962         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
10963         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
10964         (vec_info::~vec_info): Free stmt_vec_infos.
10965         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
10966         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
10967         (pass_slp_vectorize::execute): Likewise.
10968         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
10969         (free_stmt_vec_info_vec): Likewise.
10970         (set_stmt_vec_info_vec): New function.
10971         (free_stmt_vec_infos): Likewise.
10972         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
10973         the global stmt_vec_info_vec.
10974         * tree-parloops.c (gather_scalar_reductions): Use
10975         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
10976         vector.
10978 2018-05-29  Richard Biener  <rguenther@suse.de>
10980         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
10982 2018-05-29  Martin Liska  <mliska@suse.cz>
10983             David Malcolm  <dmalcolm@redhat.com>
10985         * vec.c (test_reverse): New.
10986         (vec_c_tests): Add new test.
10987         * vec.h (vl_ptr>::reverse): New function.
10989 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
10991         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
10993         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
10994         and later.
10996 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10998         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
11000 2018-05-28  Richard Biener  <rguenther@suse.de>
11002         PR tree-optimization/85933
11003         * tree-vect-data-refs.c (vect_record_base_alignments): Only
11004         look at stmts marked as vectorizable.
11006 2018-05-28  Richard Biener  <rguenther@suse.de>
11008         PR tree-optimization/85934
11009         * tree-vect-generic.c (expand_vector_operations_1): Hoist
11010         vector boolean check before scalar optimization.
11012 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
11014         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
11015         for armv5te.
11017 2018-05-28  Mark Wielaard  <mark@klomp.org>
11019         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
11020         if it is an expression containing a minus sign.
11022 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
11024         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
11026 2018-05-27  Paul Koning  <ni1d@arrl.net>
11028         * config/pdp11/pdp11.md (truncsihi2): Remove.
11030 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
11031             Chung-Ju Wu  <jasonwucj@gmail.com>
11033         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
11034         implementation.
11035         (unaligned_store_dw): Ditto.
11036         * config/nds32/nds32-memory-manipulation.c
11037         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
11038         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
11039         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
11040         (emit_setmem_word_loop): Rename to ...
11041         (emit_setmem_doubleword_loop): ... this.
11042         (nds32_gen_dup_4_byte_to_word_value): New function.
11043         (nds32_gen_dup_8_byte_to_double_word_value): New function.
11044         (nds32_expand_setmem_loop): Refine implementation.
11045         (nds32_expand_setmem_loop_v3m): Ditto.
11046         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
11047         pattern.
11049 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
11051         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
11053 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
11055         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
11056         (nds32_init_machine_status): Initialize machine->attr_naked_p and
11057         machine->attr_no_prologue_p.
11058         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
11059         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
11060         (nds32_expand_epilogue): Consider attr_naked_p.
11061         (nds32_expand_epilogue_v3pop): Likewise.
11062         (nds32_can_use_return_insn): Likewise.
11063         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
11064         attr_no_prologue_p fields.
11065         * config/nds32/nds32.opt (mret-in-naked-func): New option.
11067 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
11069         PR target/85918
11070         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
11071         attributes.
11072         * config/i386/sse.md
11073         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
11074         Rename to ...
11075         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
11076         ... this.
11077         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
11078         Rename to ...
11079         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
11080         ... this.
11081         (*<floatsuffix>floatv2div2sf2): Rename to ...
11082         (*float<floatunssuffix>v2div2sf2): ... this.
11083         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
11084         (float<floatunssuffix>v2div2sf2_mask): ... this.
11085         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
11086         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
11087         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
11088         to ...
11089         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
11090         ... this.
11091         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11092         Rename to ...
11093         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11094         ... this.
11095         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11096         Rename to ...
11097         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11098         ... this.
11099         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
11100         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
11101         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
11102         gen_ufix_truncv8dfv8si2.
11103         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
11104         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
11105         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
11106         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
11107         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
11108         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
11109         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
11110         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
11112 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
11114         PR target/85900
11115         PR target/85345
11116         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
11118 2018-05-25  Jim Wilson  <jimw@sifive.com>
11120         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
11121         * config/riscv/riscv.c (struct machine_function): Add
11122         interrupt_handler_p and attribute_checked_p fields.
11123         (riscv_attribute_table): Add interrupt.
11124         (riscv_interrupt_type_p): New.
11125         (riscv_save_reg_p): Save extra regs for interrupt handler.
11126         (riscv_use_save_libcall): Return false  for interrupt handler.
11127         (riscv_first_stack_step): Add forward declaration.
11128         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
11129         for interrupt handler with large frame.  Use it for saved reg list.
11130         (riscv_expand_prologue): Move flag_stack_usage_info support to
11131         eliminate duplication.
11132         (riscv_expand_epilogue): Generate mret for interrupt handler.
11133         (riscv_epilogue_uses): New.
11134         (riscv_can_use_return_insn): Return false for interrupt handler.
11135         (riscv_function_ok_for_sibcall): Likewise.
11136         (riscv_set_current_function): Add interrupt handler support.
11137         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
11138         * config/riscv/riscv.md (UNSPECV_MRET): New.
11139         (GP_REGNUM): New.
11140         (riscv_frflags, riscv_fsflags): Use tab after opcode.
11141         (riscv_mret): New.
11142         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
11144 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
11146         PR tree-optimization/85712
11147         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
11148         this candidate has already been replaced in-situ by a copy.
11150 2018-05-25  Jason Merrill  <jason@redhat.com>
11152         PR c++/80485 - inline function non-zero address.
11153         * symtab.c (nonzero_address): Check DECL_COMDAT.
11155 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
11157         PR target/83628
11158         * config/alpha/alpha.md (ashlsi3): New insn pattern.
11159         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
11160         extension of SImode operation.  Use const123_operand predicate.
11161         (*saddsi_1): Remove.
11162         (*saddl_se_1): Ditto.
11163         (*ssubsi_1): Ditto.
11164         (*ssubl_se_1): Ditto.
11165         * config/alpha/predicates.md (const123_operand): New predicate.
11166         * config/alpha/constraints.md (P): Use IN_RANGE.
11168 2018-05-25  Richard Biener  <rguenther@suse.de>
11170         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
11171         defaulted to true.
11172         (ref_maybe_used_by_stmt_p): Likewise.
11173         (stmt_may_clobber_ref_p): Likewise.
11174         (stmt_may_clobber_ref_p_1): Likewise.
11175         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
11176         and pass it along.
11177         (ref_maybe_used_by_stmt_p): Likewise.
11178         (stmt_may_clobber_ref_p): Likewise.
11179         (stmt_may_clobber_ref_p_1): Likewise.
11180         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
11181         the alias oracle to disambiguate DRs with stmts DR analysis
11182         couldn't handle.
11183         (vect_analyze_data_refs): Do not give up on not analyzable
11184         DRs for BB vectorization.  Remove code truncating the dataref
11185         vector.
11187 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
11189         PR target/85832
11190         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
11191         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
11192         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
11194 2018-05-25  Richard Biener  <rguenther@suse.de>
11196         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
11197         function, combining stmt data ref gathering and fatal analysis
11198         parts.
11199         (vect_analyze_data_refs): Remove now redudnant code and simplify.
11200         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
11201         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
11202         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
11203         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
11205 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
11207         PR tree-optimization/85720
11208         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
11209         SCC if all partitions are builtins.
11210         (version_loop_by_alias_check): New parameter.  Generate cancelable
11211         runtime alias check if all partitions are builtins.
11212         (distribute_loop): Update call to above function.
11214 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
11216         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
11217         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
11218         (parm_default_def_partition_arg): Ditto.
11219         (set_parm_default_def_partition): Ditto.
11220         (get_parm_default_def_partitions): Ditto and make it static.
11221         (get_undefined_value_partitions): Ditto and make it static.
11222         (remove_ssa_form): Refactor call to init_var_map here.
11223         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
11224         computation for loop region.
11225         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
11226         (register_default_def): Delete.
11227         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
11228         (parm_default_def_partition_arg): Ditto.
11229         (set_parm_default_def_partition): Ditto.
11230         (get_parm_default_def_partitions): Ditto and make it static.
11231         (get_undefined_value_partitions): Ditto and make it static.
11232         (coalesce_with_default, coalesce_with_default): Update comment.
11233         (create_coalesce_list_for_region): New func factored out from
11234         create_outofssa_var_map.
11235         (populate_coalesce_list_for_outofssa): New func factored out from
11236         create_outofssa_var_map and coalesce_ssa_name.
11237         (create_outofssa_var_map): Delete.
11238         (coalesce_ssa_name): Refactor to support live range computation.
11239         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
11240         (get_parm_default_def_partitions): Delete.
11241         (get_undefined_value_partitions): Ditto.
11242         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
11243         computation for loop region.
11244         (new_tree_live_info, loe_visit_block): Ditto.
11245         (live_worklist, set_var_live_on_entry): Ditto.
11246         (calculate_live_on_exit, verify_live_on_entry): Ditto.
11247         * tree-ssa-live.h (struct _var_map): New fields.
11248         (init_var_map): Change decl.
11249         (region_contains_p): New.
11251 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
11253         * tree-ssa-live.h (live_merge_and_clear): Delete.
11255 2018-05-25  Richard Biener  <rguenther@suse.de>
11257         PR c++/85912
11258         * tree-dump.c (dequeue_and_dump): Remove access to removed
11259         operand 2 of a SWITCH_EXPR.
11261 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
11263         * doc/sourcebuild.texi (vect_double_cond_arith): Include
11264         multiplication and division.
11265         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
11266         (cond_udiv@var{m}, cond_umod@var{m}): Document.
11267         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
11268         (cond_udiv_optab, cond_umod_optab): New optabs.
11269         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
11270         (IFN_COND_RDIV): New internal functions.
11271         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
11272         TRUNC_MOD_EXPR and RDIV_EXPR.
11273         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
11274         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
11275         New unspecs.
11276         (SVE_INT_BINARY): Include mult.
11277         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
11278         (optab, sve_int_op): Handle mult.
11279         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
11280         UNSPEC_COND_DIV.
11281         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
11282         for SVE_INT_BINARY_SD.
11284 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
11286         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
11287         (optab, sve_int_op): Handle div and udiv.
11288         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
11289         for SVE_INT_BINARY_SD.
11290         (*<optab><mode>3): New insn for the same.
11292 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
11294         * tree-vect-patterns.c: Include predict.h.
11295         (vect_recog_divmod_pattern): Restrict check for division support
11296         to when optimizing for size.
11298 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
11300         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
11301         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
11302         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
11303         (gimple_match_op::set_op): Likewise.
11304         (gimple_resimplify4): Declare.
11305         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
11306         (expr::gen_transform): Likewise.
11307         (decision_tree::gen): Generate a simplification routine for 4 operands.
11308         * gimple-match-head.c (gimple_simplify): Add an overload for
11309         4 operands.  In the top-level function, handle up to 4 call
11310         arguments and call gimple_resimplify4.
11311         (gimple_resimplify4): New function.
11312         (build_call_internal): Pass a fourth operand.
11313         (maybe_push_to_seq): Likewise.
11314         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
11315         Fold VEC_COND_EXPRs of an operation and a default value into
11316         an IFN_COND_* function if possible.
11317         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
11318         New unspecs.
11319         (SVE_COND_FP_BINARY): Include them.
11320         (optab, sve_fp_op): Handle them.
11321         (SVE_INT_BINARY_REV): New code iterator.
11322         (SVE_COND_FP_BINARY_REV): New int iterator.
11323         (commutative): New int attribute.
11324         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
11325         Declare.
11326         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
11327         function.
11328         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
11329         (*cond_<optab><mode>): New patterns for reversed operands.
11331 2018-05-25  Richard Biener  <rguenther@suse.de>
11333         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
11334         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
11335         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
11336         (STMT_VINFO_GROUPED_ACCESS): Adjust.
11337         * tree-vect-data-refs.c (everywhere): Adjust users.
11338         * tree-vect-loop.c (everywhere): Likewise.
11339         * tree-vect-slp.c (everywhere): Likewise.
11340         * tree-vect-stmts.c (everywhere): Likewise.
11341         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
11343 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11345         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
11346         Rename to...
11347         (gcc_cv_as_section_exclude): ... this.
11348         Try Solaris as #exclude syntax.
11349         * configure: Regenerate.
11350         * config.in: Regenerate.
11351         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
11352         SECTION_EXCLUDE.
11353         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
11354         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
11356         * varasm.c (default_elf_asm_named_section): Don't check if
11357         HAVE_GAS_SECTION_EXCLUDE is defined.
11359 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
11361         * doc/md.texi: Update the documentation of the cond_* optabs
11362         to mention the new final operand.  Fix GET_MODE_NUNITS call.
11363         Describe the scalar case too.
11364         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
11365         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
11366         instead of 2.
11367         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
11368         (get_conditional_internal_fn): Update comment.
11369         * tree-vect-loop.c (vectorizable_reduction): Pass the original
11370         accumulator value as a final argument to conditional functions.
11371         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
11372         a define_expand and add an "else" operand.  Assert for now that
11373         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
11374         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
11375         (*cond_<optab><mode>): New patterns.
11376         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
11377         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
11378         (UNSPEC_COND_EOR): Delete.
11379         (optab): Remove associated mappings.
11380         (SVE_INT_BINARY): New code iterator.
11381         (sve_int_op): Remove int attribute and add "minus" to the code
11382         attribute.
11383         (SVE_COND_INT_OP): Delete.
11384         (SVE_COND_FP_OP): Rename to...
11385         (SVE_COND_FP_BINARY): ...this.
11387 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
11389         * optabs.c (can_reuse_operands_p): New function.
11390         (maybe_legitimize_operands): Try to reuse the results for
11391         earlier operands.
11393 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
11395         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
11396         Add {q} suffix to insn mnemonic.
11398 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
11400         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
11401         (msp430_warn_func_return): New.
11403 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
11405         * fold-const.c (tree_nonzero_bits): New function.
11406         * fold-const.h (tree_nonzero_bits): Likewise.
11407         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
11408         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
11410 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
11412         PR target/85900
11413         PR target/85345
11414         * varasm.c (assemble_alias): Check ifunc_resolver only on
11415         FUNCTION_DECL.
11417 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
11419         PR target/85903
11420         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
11421         when memory input operand is handled.
11423 2018-05-24  Luis Machado  <luis.machado@linaro.org>
11425         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
11426         global.
11427         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
11429 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
11431         * match.pd: Delay FMA folds until after vectorization.
11433 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
11435         PR target/83009
11436         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11437         address check not strict.
11439 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
11441         * gimple-match.h (gimple_match_op): New class.
11442         (mprts_hook): Replace parameters with a gimple_match_op *.
11443         (maybe_build_generic_op): Likewise.
11444         (gimple_simplified_result_is_gimple_val): Replace parameters with
11445         a const gimple_match_op *.
11446         (gimple_simplify): Replace code_helper * and tree * parameters with
11447         a gimple_match_op * parameter.
11448         (gimple_resimplify1): Replace code_helper *, tree and tree *
11449         parameters with a gimple_match_op * parameter.
11450         (gimple_resimplify2): Likewise.
11451         (gimple_resimplify3): Likewise.
11452         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
11453         parameters with a gimple_match_op * parameter.
11454         * gimple-match-head.c (gimple_simplify): Change prototypes of
11455         auto-generated functions to take a gimple_match_op * instead of
11456         separate code_helper * and tree * parameters.  Make the same
11457         change in the top-level overload and update calls to the
11458         gimple_resimplify routines.  Update calls to the auto-generated
11459         functions and to maybe_push_res_to_seq in the publicly-facing
11460         operation-specific gimple_simplify overloads.
11461         (gimple_match_op::MAX_NUM_OPS): Define.
11462         (gimple_resimplify1): Replace rcode and ops with a single res_op
11463         parameter.  Update call to gimple_simplify.
11464         (gimple_resimplify2): Likewise.
11465         (gimple_resimplify3): Likewise.
11466         (mprts_hook): Replace parameters with a gimple_match_op *.
11467         (maybe_build_generic_op): Likewise.
11468         (build_call_internal): Replace type, nargs and ops with
11469         a gimple_match_op *.
11470         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
11471         with a single gimple_match_op *.  Update calls to mprts_hook,
11472         build_call_internal and gimple_simplified_result_is_gimple_val.
11473         Factor out code that is common to the tree_code and combined_fn cases.
11474         * genmatch.c (expr::gen_transform): Replace tem_code and
11475         tem_ops with a gimple_match_op called tem_op.  Update calls
11476         to the gimple_resimplify functions and maybe_push_res_to_seq.
11477         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
11478         res_ops.  Update call to the gimple_resimplify functions.
11479         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
11480         (decision_tree::gen): Make the functions take a gimple_match_op *
11481         called res_op instead of separate res_code and res_ops parameters.
11482         Update call accordingly.
11483         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
11484         and ops with a single res_op parameter.  Update calls to
11485         maybe_build_generic_op and maybe_push_res_to_seq.
11486         (fold_stmt_1): Update calls to gimple_simplify and
11487         replace_stmt_with_simplification.
11488         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
11489         and gimple_simplified_result_is_gimple_val.
11490         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
11491         gimple_simplify.
11492         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
11493         with a gimple_match_op *.
11494         (vn_nary_build_or_lookup): Likewise.  Update call to
11495         vn_nary_build_or_lookup_1.
11496         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
11497         gimple_match_op *.  Update calls to the gimple_resimplify routines
11498         and to gimple_simplified_result_is_gimple_val.
11499         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
11500         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
11501         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
11502         (visit_nary_op): Likewise.
11503         (visit_reference_op_load): Likewise.
11505 2018-05-23  Luis Machado  <luis.machado@linaro.org>
11507         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
11508         modifier for printing the step amount.
11510 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
11512         PR target/78849
11513         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
11514         types.
11516 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
11518         * doc/sourcebuild.texi (Endianness): New subsubsection.
11520 2018-05-23  Luis Machado  <luis.machado@linaro.org>
11522         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11523         <prefetch_dynamic_strides>: New const bool field.
11524         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11525         prefetch_dynamic_strides.
11526         (exynosm1_prefetch_tune): Likewise.
11527         (thunderxt88_prefetch_tune): Likewise.
11528         (thunderx_prefetch_tune): Likewise.
11529         (thunderx2t99_prefetch_tune): Likewise.
11530         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
11531         false.
11532         (aarch64_override_options_internal): Update to set
11533         PARAM_PREFETCH_DYNAMIC_STRIDES.
11534         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11535         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11536         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11537         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11538         prefetch-dynamic-strides setting.
11540 2018-05-23  Luis Machado  <luis.machado@linaro.org>
11542         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11543         <minimum_stride>: New const int field.
11544         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11545         minimum_stride field defaulting to -1.
11546         (exynosm1_prefetch_tune): Likewise.
11547         (thunderxt88_prefetch_tune): Likewise.
11548         (thunderx_prefetch_tune): Likewise.
11549         (thunderx2t99_prefetch_tune): Likewise.
11550         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
11551         <default_opt_level>: Set to 3.
11552         (aarch64_override_options_internal): Update to set
11553         PARAM_PREFETCH_MINIMUM_STRIDE.
11554         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11555         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11556         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11557         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11558         stride is constant and is below the minimum stride threshold.
11560 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11562         * config/arm/arm-cpus.in (mode26): Delete.
11563         (armv4): Delete mode26 reference.
11564         * config/arm/arm.c (arm_configure_build_target): Delete use of
11565         isa_bit_mode26.
11567 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
11569         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
11570         New insn pattern.
11571         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
11572         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
11573         for non-SSE modes.
11574         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
11575         (floatunsdidf2): Ditto.
11577 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
11579         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
11580         (fixuns_trunc<mode>si2_avx512f): Ditto.
11581         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
11582         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
11583         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
11585 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
11587         PR rtl-optimization/79985
11588         * df-scan.c (df_insn_refs_collect): Remove special case for
11589         global registers and asm statements.
11591 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
11593         * extend.texi (Global Register Variables): Rewrite the bullet list.
11594         Note that the register is available for allocation. Note that access
11595         via inline asm must use constraints. Add note about async-signal
11596         handlers. Remove paragraph about automagic register selection.
11598 2018-05-23  Richard Biener  <rguenther@suse.de>
11600         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
11601         of fixed offset from memset VN.
11603 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
11605         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
11606         first_interp field.
11607         (alloc_cand_and_find_basis): Initialize first_interp field.
11608         (slsr_process_mul): Modify first_interp field.
11609         (slsr_process_add): Likewise.
11610         (slsr_process_cast): Modify first_interp field for each new
11611         interpretation.
11612         (slsr_process_copy): Likewise.
11613         (dump_candidate): Dump first_interp field.
11614         (replace_mult_candidate): Process all interpretations, not just
11615         subsequent ones.
11616         (replace_rhs_if_not_dup): Likewise.
11617         (replace_one_candidate): Likewise.
11619 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
11621         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
11622         Add new boolean.
11623         (aarch64_needs_frame_chain): New function.
11624         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
11626 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
11628         PR target/84882
11629         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
11630         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
11631         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
11632         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
11633         as true for strict-align.
11634         (aarch64_can_inline_p): Perform checks even when callee has no
11635         attributes to check for strict alignment.
11636         * doc/extend.texi (AArch64 Function Attributes): Document
11637         no-strict-align.
11638         * doc/invoke.texi: (AArch64 Options): Likewise.
11640 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
11642         PR tree-optimization/85853
11643         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
11644         the handling of the root of the node to...
11645         (vect_slp_analyze_node_operations_1): ...this new function,
11646         and run the whole thing with the child nodes' def types
11647         set according to their SLP node's def type.
11649 2018-05-23  Richard Biener  <rguenther@suse.de>
11651         PR middle-end/85874
11652         * tree-data-ref.c (create_runtime_alias_checks): Defer
11653         and ignore overflow warnings.
11655 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
11657         PR tree-optimization/85822
11658         * tree-vrp.c (is_masked_range_test): Fix handling of negative
11659         constants.
11661 2018-05-23  Richard Biener  <rguenther@suse.de>
11663         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
11664         memset constants via native_interpret_expr.
11666 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
11668         PR target/85345
11669         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
11670         attribute.
11671         (cgraph_node::create_alias): Likewise.
11672         (cgraph_node::get_availability): Check ifunc_resolver instead
11673         of looking up ifunc attribute.
11674         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
11675         * varasm.c (do_assemble_alias): Likewise.
11676         (assemble_alias): Likewise.
11677         (default_binds_local_p_3): Likewise.
11678         * cgraph.h (cgraph_node): Add ifunc_resolver.
11679         (cgraph_node::only_called_directly_or_aliased_p): Return false
11680         for IFUNC resolver.
11681         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
11682         attribute.
11683         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
11684         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
11685         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
11686         instead of looking up ifunc attribute.
11688 2018-05-22  Luis Machado  <luis.machado@linaro.org>
11690         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
11692 2018-05-22  Martin Sebor  <msebor@redhat.com>
11694         PR middle-end/85359
11695         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
11696         only when expasion succeeds.
11697         (expand_builtin_strcmp): Same.
11698         (expand_builtin_strncmp): Same.
11700 2018-05-22  Martin Sebor  <msebor@redhat.com>
11702         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
11704 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
11705             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11707         * config/aarch64/aarch64-ldpstp.md: Replace uses of
11708         aarch64_mem_pair_operand with memory_operand and delete operand swapping
11709         code.
11710         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11711         Add check for legitimate_address.
11712         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
11713         (aarch64_swap_ldrstr_operands): New.
11714         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
11715         Define prototype.
11717 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
11718             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11720         * config/aarch64/aarch64.md: New patterns to generate stp
11721         and ldp.
11722         (store_pair_sw, store_pair_dw): New patterns to generate stp for
11723         single words and double words.
11724         (load_pair_sw, load_pair_dw): Likewise.
11725         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
11726         Delete.
11727         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
11728         Delete.
11729         * config/aarch64/aarch64-ldpstp.md: Modify peephole
11730         for different mode ldpstp and add peephole for merged zero stores.
11731         Likewise for loads.
11732         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11733         Add size check.
11734         (aarch64_gen_store_pair): Rename calls to match new patterns.
11735         (aarch64_gen_load_pair): Rename calls to match new patterns.
11736         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
11737         (load_pair<DREG:mode><DREG2:mode>): ... This.
11738         (store_pair<mode>): Rename to...
11739         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
11740         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
11741         New mode iterators.
11742         (V_INT_EQUIV): Handle SImode.
11743         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
11744         New predicate.
11746 2018-05-22  Martin Sebor  <msebor@redhat.com>
11748         PR c/85623
11749         * calls.c (maybe_warn_nonstring_arg): Use string length to set
11750         or ajust the presumed bound on an operation to avoid unnecessary
11751         warnings.
11753 2018-05-22  Martin Sebor  <msebor@redhat.com>
11755         PR tree-optimization/85826
11756         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
11757         assuming that a DECL necesarily has a constant size.
11759 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
11761         PR middle-end/85862
11762         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
11764 2018-05-22  Richard Biener  <rguenther@suse.de>
11766         PR tree-optimization/85834
11767         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
11768         non-constant and non-zero memset arguments.
11770 2018-05-22  Martin Liska  <mliska@suse.cz>
11772         PR ipa/85607
11773         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
11775 2018-05-22  Richard Biener  <rguenther@suse.de>
11777         PR tree-optimization/85863
11778         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
11779         comparisons when vectype is specified.
11780         (vectorizable_condition): Do not specify vectype for
11781         vect_is_simple_cond when SLP vectorizing.
11783 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
11785         PR target/85657
11786         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
11787         define __ibm128 as long double.
11788         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
11789         as a distinct type when IEEE 128-bit support is enabled.
11790         (init_float128_ieee): Fix up conversions between IFmode and IEEE
11791         128-bit types to use the correct functions.
11792         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
11793         convert between 128-bit floating point types that have different
11794         modes but the same representation, instead of using gen_lowpart to
11795         makean alias.
11796         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
11797         KFmode.
11798         (IFKF_reg): New attributes to give the register constraints for
11799         IFmode and KFmode.
11800         (extend<mode>tf2_internal): New insns to mark an explicit
11801         conversion between 128-bit floating point types that have a
11802         different mode but share the same representation.
11804 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
11806         PR tree-optimization/85814
11807         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
11808         a null return from get_strinfo when unsharing the next
11809         strinfo in the chain.
11811 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
11813         PR gcc/84923
11814         * varasm.c (weak_finish): Clean up weak_decls.
11816 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11818         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
11819         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
11820         UNSPEC_UADALP values.
11821         * config/aarch64/iterators.md (ABAL): New int iterator.
11822         (ABDL2): Likewise.
11823         (ADALP): Likewise.
11824         (sur): Add mappings for the above.
11825         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
11826         New define_insn.
11827         (aarch64_<sur>abal<mode>_4): Likewise.
11828         (aarch64_<sur>adalp<mode>_3): Likewise.
11829         (<sur>sadv16qi): New define_expand.
11831 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
11833         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
11834         (*movdf_internal): Ditto.
11835         (*rcpsf2_sse): Ditto.
11836         (*rsqrtsf2_sse): Ditto.
11837         (*sqrt<mode>2_sse): Ditto.
11839 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
11841         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
11842         eor3q<mode>4.
11843         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
11844         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
11845         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
11846         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
11847         vbcaxq_s64): New.
11848         * config/aarch64/arm_neon.h: Likewise.
11849         * config/aarch64/iterators.md (VQ_I): New.
11851 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
11853         * config.gcc: Add arc/t-multilib-linux to tmake_file for
11854         arc*-*-linux*.
11855         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
11856         MULTILIB_DIRNAMES
11858 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
11860         * config/nds32/constraints.md (S): New constraint.
11861         * config/nds32/nds32.md (call_internal): Use constraint S.
11862         (call_value_internal): Likewise.
11863         (sibcall_internal): Likewise.
11864         (sibcall_value_internal): Likewise.
11866 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
11867             Chung-Ju Wu  <jasonwucj@gmail.com>
11869         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
11870         into consideration.
11872 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
11873             Chung-Ju Wu  <jasonwucj@gmail.com>
11875         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
11876         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
11877         (nds32_rtx_costs_impl): Simplify.
11878         (nds32_address_cost_impl): Simplify.
11879         (nds32_init_rtx_costs): New function.
11880         (nds32_rtx_costs_speed_prefer): Likewise.
11881         (nds32_rtx_costs_size_prefer): Likewise.
11882         (nds32_address_cost_speed_prefer): Likewise.
11883         (nds32_address_cost_speed_fwprop): Likewise.
11884         (nds32_address_cost_size_prefer): Likewise.
11885         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
11886         * config/nds32/nds32.c (nds32_option_override): Use
11887         nds32_init_rtx_costs function.
11889 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
11891         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
11892         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
11893         (TARGET_PIPELINE_N8): Likewise.
11894         (TARGET_PIPELINE_N10): Likewise.
11895         (TARGET_PIPELINE_N13): Likewise.
11896         (TARGET_PIPELINE_GRAYWOLF): Likewise.
11898 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
11900         * config/nds32/nds32-fpu.md: Update copyright year.
11902 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
11904         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
11906 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
11908         * config/nds32/nds32.c
11909         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
11910         * config/nds32/nds32.opt (minline-asm-r15): New option.
11912 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
11914         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
11915         MASK_HW_ABS.
11916         * config/nds32/nds32.md (abssi2): New pattern.
11918 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
11920         * config/i386/i386.md (rex64namesuffix): New mode attribute.
11921         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
11922         Merge insn pattern from sse_cvtsi2ss<round_name> and
11923         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
11924         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
11925         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
11926         using SWI48 mode iterator.
11927         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
11928         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
11929         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
11930         pattern from sse_cvttss2si<round_saeonly_name>
11931         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
11932         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
11933         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
11934         using SWI48 mode iterator.
11935         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
11936         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
11937         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
11938         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
11939         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
11940         using SWI48 mode iterator.
11941         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
11942         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
11943         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
11944         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
11945         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
11946         SWI48 mode iterator.
11947         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
11948         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
11949         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
11950         pattern from sse_cvttsd2si<round_saeonly_name>
11951         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
11953 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
11955         * config/nds32/nds32-md-auxiliary.c
11956         (nds32_valid_smw_lwm_base_p): Refine.
11957         (nds32_output_smw_single_word): Refine.
11958         (nds32_output_smw_double_word): New.
11959         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
11961 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
11963         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
11964         (nds32_output_stack_pop): Refine.
11965         (nds32_expand_unaligned_load): Refine.
11966         (nds32_expand_unaligned_store): Refine.
11968 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
11969             Chung-Ju Wu  <jasonwucj@gmail.com>
11971         * config/nds32/constants.md: Add TP_REGNUM constant.
11972         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
11973         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
11974         UNSPEC_ADD32.
11975         * config/nds32/nds32-doubleword.md: Consider flag_pic.
11976         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
11977         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
11978         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
11979         and PIC code generation.
11980         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
11981         code generation.
11982         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
11983         optimization.
11984         * config/nds32/nds32.md: Support TLS and PIC.
11985         * config/nds32/nds32.c: Support TLS and PIC.
11986         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
11987         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
11988         predicate.
11990 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
11992         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
11993         mode with E_ prefix.
11995 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
11996             Chung-Ju Wu  <jasonwucj@gmail.com>
11998         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
11999         * config/nds32/nds32-md-auxiliary.c
12000         (symbolic_reference_mentioned_p): New.
12001         (nds32_legitimize_ict_address): New.
12002         (nds32_expand_ict_move): New.
12003         (nds32_indirect_call_referenced_p): New.
12004         (nds32_symbol_binds_local_p): Delete.
12005         (nds32_long_call_p): Modify.
12006         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
12007         * config/nds32/nds32-protos.h
12008         (symbolic_reference_mentioned_p): Declare.
12009         (nds32_legitimize_ict_address): Declare.
12010         (nds32_expand_ict_move): Declare.
12011         (nds32_indirect_call_referenced_p): Declare.
12012         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
12013         (nds32_relax_group): Use nds32_ict_const_p as condition.
12014         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
12015         (nds32_asm_file_start): Output ict_model directive in asm code.
12016         (nds32_legitimate_address_p): Consider indirect call.
12017         (nds32_print_operand): Consider indirect call.
12018         (nds32_print_operand_address): Consider indirect call.
12019         (nds32_insert_attributes): Handle "indirect_call" attribute.
12020         (TARGET_LEGITIMATE_ADDRESS_P): Define.
12021         (TARGET_LEGITIMATE_CONSTANT_P): Define.
12022         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
12023         (TARGET_DELEGITIMIZE_ADDRESS): Define.
12024         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
12025         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
12026         (TARGET_ICT_MODEL_SMALL): Define.
12027         (TARGET_ICT_MODEL_LARGE): Define.
12028         * config/nds32/nds32.md (movsi): Consider ict model.
12029         (call, call_value): Consider ict model.
12030         (sibcall, sibcall_value): Consider ict model.
12031         * config/nds32/nds32.opt (mict-model): New option.
12032         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
12033         model.
12035 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
12036             Monk Chiang  <sh.chiang04@gmail.com>
12037             Jim Wilson <jimw@sifive.com>
12039         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
12040         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
12041         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
12042         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
12043         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
12044         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
12045         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
12046         compute save_libcall_adjustment properly.
12047         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
12048         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
12049         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
12050         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
12051         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
12052         (ABI_SPEC): Handle mabi=ilp32e.
12053         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
12054         (RVE): Add RVE mask.
12055         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
12056         <-march>: Add rv32e as an example.
12058 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
12060         PR c++/82899
12061         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
12062         (intra_create_variable_infos): Handle C++ constructors.
12064 2018-05-18  Martin Liska  <mliska@suse.cz>
12066         * passes.def: Remove a redundant pass.
12068 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
12070         PR bootstrap/85838
12071         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
12073 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12075         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
12076         (ARMv4): Update.
12077         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
12078         (ARMv6m): Update.
12079         (armv2, armv2a, armv3, armv3m): Delete architectures.
12080         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
12081         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
12082         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
12083         Delete cpus.
12084         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
12085         (*mulsidi3adddi): Likewise.
12086         (mulsidi3): Likewise.
12087         (*mulsidi3_nov6): Likewise.
12088         (umulsidi3): Likewise.
12089         (umulsidi3_nov6): Likewise.
12090         (umaddsidi4): Likewise.
12091         (*umulsidi3adddi): Likewise.
12092         (smulsi3_highpart): Likewise.
12093         (*smulsi3_highpart_nov6): Likewise.
12094         (umulsi3_highpart): Likewise.
12095         (*umulsi3_highpart_nov6): Likewise.
12096         * config/arm/arm.h (arm_arch3m): Delete.
12097         * config/arm/arm.c (arm_arch3m): Delete.
12098         (arm_option_override_internal): Update armv3-related comment.
12099         (arm_configure_build_target): Delete use of isa_bit_mode32.
12100         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
12101         (arm_rtx_costs_internal): Delete check of arm_arch3m.
12102         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
12103         (mulsa3): Likewise.
12104         (mulusa3): Likewise.
12105         * config/arm/arm-protos.h (arm_arch3m): Delete.
12106         * config/arm/arm-tables.opt: Regenerate.
12107         * config/arm/arm-tune.md: Likewise.
12108         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
12109         deleted architectures.
12111 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12113         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
12114         (armv5t, armv5te): New features.
12115         (ARMv5, ARMv5e): Delete fgroups.
12116         (ARMv5t, ARMv5te): Adjust for above changes.
12117         (ARMv6m): Likewise.
12118         (armv5, armv5e): Delete arches.
12119         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
12120         arm_arch5.
12121         (*call_reg_arm): Likewise.
12122         (*call_value_reg_armv5): Likewise.
12123         (*call_value_reg_arm): Likewise.
12124         (*call_symbol): Likewise.
12125         (*call_value_symbol): Likewise.
12126         (*sibcall_insn): Likewise.
12127         (*sibcall_value_insn): Likewise.
12128         (clzsi2): Likewise.
12129         (prefetch): Likewise.
12130         (define_split and define_peephole2 dependent on arm_arch5):
12131         Likewise.
12132         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
12133         arm_arch5e.
12134         (TARGET_ARM_QBIT): Likewise.
12135         (TARGET_DSP_MULTIPLY): Likewise.
12136         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
12137         (arm_arch5, arm_arch5e): Delete.
12138         (arm_arch5t, arm_arch5te): Declare.
12139         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
12140         (arm_arch5t): Declare.
12141         (arm_option_reconfigure_globals): Update for the above.
12142         (arm_options_perform_arch_sanity_checks): Update comment, replace
12143         use of arm_arch5 with arm_arch5t.
12144         (use_return_insn): Likewise.
12145         (arm_emit_call_insn): Likewise.
12146         (output_return_instruction): Likewise.
12147         (arm_final_prescan_insn): Likewise.
12148         (arm_coproc_builtin_available): Likewise.
12149         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
12150         arm_arch5e with arm_arch5t and arm_arch5te.
12151         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
12152         (arm_arch5t, arm_arch5te): Declare.
12153         * config/arm/arm-tables.opt: Regenerate.
12154         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
12155         * config/arm/t-multilib: Likewise.
12156         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
12157         instead of arm_arch5.
12158         (*call_reg_thumb1): Likewise.
12159         (*call_value_reg_thumb1_v5): Likewise.
12160         (*call_value_reg_thumb1): Likewise.
12161         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
12162         unreachable path.
12163         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
12165 2018-05-18  Martin Liska  <mliska@suse.cz>
12167         PR gcov-profile/84846
12168         * doc/gcov.texi: Document -t option of gcov tool.
12170 2018-05-18  Martin Liska  <mliska@suse.cz>
12172         PR gcov-profile/84846
12173         * gcov.c (print_usage): Add new -t option.
12174         (process_args): Handle the option.
12175         (generate_results): Use stdout as output when requested by
12176         the option.
12178 2018-05-18  Martin Liska  <mliska@suse.cz>
12180         PR gcov-profile/84846
12181         * coverage.c (coverage_init): Write PWD to .gcno file.
12182         * doc/gcov.texi: Document how working directory is printed.
12183         * gcov-dump.c (dump_gcov_file): Print PWD.
12184         * gcov.c (output_intermediate_file): Likewise.
12185         (read_graph_file): Read PWD string.
12186         (output_lines): Print PWD.
12188 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12190         PR middle-end/85817
12191         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
12192         for retval and return false if all args to phi are zero.
12194 2018-05-18  Richard Biener  <rguenther@suse.de>
12196         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
12197         method.
12198         (evrp_dom_walker::before_dom_children): Call it.
12200 2018-05-18  Richard Biener  <rguenther@suse.de>
12202         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
12203         results when processing array refs with variable index.
12205 2018-05-18  Toon Moene  <toon@moene.org>
12207         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
12208         directly after that of -floop-interchange. Indicate that both
12209         options are enabled by default when specifying -O3.
12211 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12213         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
12214         iterator.  Delete separate integer-mode vec_set<mode> expander.
12215         (aarch64_simd_vec_setv2di): Delete.
12216         (vec_setv2di): Delete.
12217         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
12218         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
12219         the "w, r" alternative.
12221 2018-05-18  Martin Liska  <mliska@suse.cz>
12223         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
12224         * tree-pass.h (make_pass_lower_switch_O0): New function.
12225         * tree-switch-conversion.c (node_has_low_bound): Remove.
12226         (node_has_high_bound): Likewise.
12227         (node_is_bounded): Likewise.
12228         (class pass_lower_switch): Make it a template type and create
12229         two instances.
12230         (pass_lower_switch::execute): Add template argument.
12231         (make_pass_lower_switch): New function.
12232         (make_pass_lower_switch_O0): New function.
12233         (do_jump_if_equal): Remove.
12234         (emit_case_nodes): Simplify to just handle all 3 cases and leave
12235         all the hard work to tree optimization passes.
12237 2018-05-18  Martin Liska  <mliska@suse.cz>
12239         * dbgcnt.c (limit_low): Renamed from limit.
12240         (limit_high): New variable.
12241         (dbg_cnt_is_enabled): Check for upper limit.
12242         (dbg_cnt): Adjust dumping.
12243         (dbg_cnt_set_limit_by_index): Add new argument for high
12244         value.
12245         (dbg_cnt_set_limit_by_name): Likewise.
12246         (dbg_cnt_process_single_pair): Parse new format.
12247         (dbg_cnt_process_opt): Use strtok.
12248         (dbg_cnt_list_all_counters): Remove 'value' and add
12249         'limit_high'.
12250         * doc/invoke.texi: Document changes.
12252 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
12254         * doc/sourcebuild.texi (scalar_all_fma): Document.
12255         * tree.def (FMA_EXPR): Delete.
12256         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
12257         * internal-fn.c (ternary_direct): New macro.
12258         (expand_ternary_optab_fn): Likewise.
12259         (direct_ternary_optab_supported_p): Likewise.
12260         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
12261         * builtins.c (fold_builtin_fma): Delete.
12262         (fold_builtin_3): Don't call it.
12263         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
12264         * expr.c (expand_expr_real_2): Likewise.
12265         * fold-const.c (operand_equal_p): Likewise.
12266         (fold_ternary_loc): Likewise.
12267         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
12268         * gimple.c (DEFTREECODE): Likewise.
12269         * gimplify.c (gimplify_expr): Likewise.
12270         * optabs-tree.c (optab_for_tree_code): Likewise.
12271         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
12272         * tree-eh.c (operation_could_trap_p): Likewise.
12273         (stmt_could_throw_1_p): Likewise.
12274         * tree-inline.c (estimate_operator_cost): Likewise.
12275         * tree-pretty-print.c (dump_generic_node): Likewise.
12276         (op_code_prio): Likewise.
12277         * tree-ssa-loop-im.c (stmt_cost): Likewise.
12278         * tree-ssa-operands.c (get_expr_operands): Likewise.
12279         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
12280         * fold-const-call.h (fold_fma): Delete.
12281         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
12282         CFN_FNMA and CFN_FNMS.
12283         (fold_fma): Delete.
12284         * genmatch.c (combined_fn): New enum.
12285         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
12286         (commutative_op): New function.
12287         (commutate): Use it.  Handle more than 2 operands.
12288         (dt_operand::gen_gimple_expr): Use commutative_op.
12289         (parser::parse_expr): Allow :c to be used with non-binary
12290         operators if the commutative operand is known.
12291         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
12292         CFN_FMS, CFN_FNMA and CFN_FNMS.
12293         (backprop::process_assign_use): Remove FMA_EXPR handling.
12294         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
12295         (gen_hsa_fma): New function.
12296         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
12297         IFN_FNMA and IFN_FNMS.
12298         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
12299         * gimple-fold.h (follow_all_ssa_edges): Declare.
12300         * gimple-fold.c (follow_all_ssa_edges): New function.
12301         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
12302         gimple_build interface and use follow_all_ssa_edges to fold the result.
12303         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
12304         instead of checking for optabs directly.
12305         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
12306         rather than FMA_EXPRs.
12307         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
12308         call to IFN_FMA instead of an FMA_EXPR.
12310 2018-05-17  Jim Wilson  <jimw@sifive.com>
12312         * expr.c (do_tablejump): When converting index to Pmode, if we have a
12313         sign extended promoted subreg, and the range does not have the sign bit
12314         set, then do a sign extend.
12316         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
12317         test, check for sign extended subreg and/or constant operands, and
12318         do a sign extend in that case.
12320 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
12322         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
12323         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
12324         Add untyped.
12325         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
12326         Change logics_shift_reg to logics_shift_imm.
12327         (thunderx2t99_fp_loadpair_basic): Delete.
12328         (thunderx2t99_fp_storepair_basic): Delete.
12329         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
12330         (thunderx2t99_asimd_polynomial): Delete.
12331         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
12332         and neon_fp_mul_d_scalar_q.
12333         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
12334         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
12335         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
12336         (thunderx2t99_asimd_lut): Add missing tbl types.
12337         (thunderx2t99_asimd_ext): Delete.
12338         (thunderx2t99_asimd_load1_1_mult): Delete.
12339         (thunderx2t99_asimd_load1_2_mult): Delete.
12340         (thunderx2t99_asimd_load1_ldp): New.
12341         (thunderx2t99_asimd_load1): New.
12342         (thunderx2t99_asimd_load2): Add missing *load2* types.
12343         (thunderx2t99_asimd_load3): New.
12344         (thunderx2t99_asimd_load4): New.
12345         (thunderx2t99_asimd_store1_1_mult): Delete.
12346         (thunderx2t99_asimd_store1_2_mult): Delete.
12347         (thunderx2t99_asimd_store2_mult): Delete.
12348         (thunderx2t99_asimd_store2_onelane): Delete.
12349         (thunderx2t99_asimd_store_stp): New.
12350         (thunderx2t99_asimd_store1): New.
12351         (thunderx2t99_asimd_store2): New.
12352         (thunderx2t99_asimd_store3): New.
12353         (thunderx2t99_asimd_store4): New.
12355 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
12357         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
12358         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
12360 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
12361             Segher Boessenkool  <segher@kernel.crashing.org>
12363         PR target/85698
12364         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
12365         operand.
12367 2018-05-17  Richard Biener  <rguenther@suse.de>
12369         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
12370         for pruning loop and prune defs feeding only already visited PHIs.
12372 2018-05-17  Richard Biener  <rguenther@suse.de>
12374         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
12376 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
12377             Richard Biener  <rguenther@suse.de>
12379         PR tree-optimization/85793
12380         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
12381         for VMAT_ELEMENTWISE.
12383 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
12385         * internal-fn.h (lookup_internal_fn): Declare
12386         * internal-fn.c (lookup_internal_fn): New function.
12387         * gimple.c (gimple_build_call_from_tree): Handle calls to
12388         internal functions.
12389         * gimple-pretty-print.c (dump_gimple_call): Print "." before
12390         internal function names.
12391         * tree-pretty-print.c (dump_generic_node): Likewise.
12392         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
12394 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
12396         * gimple-fold.h (gimple_build): Make the function forms take
12397         combined_fn rather than built_in_function.
12398         (gimple_simplify): Likewise.
12399         * gimple-match-head.c (gimple_simplify): Likewise.
12400         * gimple-fold.c (gimple_build): Likewise.
12401         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
12402         rather than gimple_build_call_internal.
12403         (get_initial_defs_for_reduction): Likewise.
12404         (vect_create_epilog_for_reduction): Likewise.
12405         (vectorizable_live_operation): Likewise.
12407 2018-05-17  Martin Liska  <mliska@suse.cz>
12409         * gimple-ssa-sprintf.c (format_directive): Do not use
12410         space in between 'G_' and '('.
12412 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
12414         PR target/85323
12415         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
12416         even if the mask is not all ones.
12418         PR target/85323
12419         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
12420         vector.
12421         (ix86_gimple_fold_builtin): Likewise.
12423         PR target/85323
12424         * config/i386/i386.c: Include tree-vector-builder.h.
12425         (ix86_vector_shift_count): New function.
12426         (ix86_fold_builtin): Fold shift builtins by scalar count.
12427         (ix86_gimple_fold_builtin): Likewise.
12429         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
12430         _mm512_setzero): New intrinsics.
12432 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
12433             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12435         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
12436         code generation for cases where splatting a value is not useful.
12437         * simplify-rtx.c (simplify_ternary_operation): Simplify
12438         vec_merge across a vec_duplicate and a paradoxical subreg forming
12439         a vector mode to a vec_concat.
12441 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
12443         * config.gcc: Support "goldmont-plus".
12444         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12445         "goldmont-plus".
12446         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12447         PROCESSOR_GOLDMONT_PLUS.
12448         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
12449         (processor_target_table): Add "goldmont-plus".
12450         (PTA_GOLDMONT_PLUS): Define.
12451         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
12452         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
12453         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
12454         (fold_builtin_cpu): Add "goldmont-plus".
12455         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
12456         (ix86_option_override_internal): Add "goldmont-plus".
12457         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
12458         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
12459         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
12460         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
12462 2018-05-17  Richard Biener  <rguenther@suse.de>
12464         PR tree-optimization/85757
12465         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
12466         remove defs that only feed that PHI from further processing.
12468 2018-05-16  Jim Wilson  <jimw@sifive.com>
12470         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
12471         asterisk to name.
12472         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
12474 2018-05-16  Mark Wielaard  <mark@klomp.org>
12476         * dwarf2out.c (count_index_strings): New function.
12477         (output_indirect_strings): Call count_index_strings and generate
12478         header for dwarf_version >= 5.
12480 2018-05-16  Mark Wielaard  <mark@klomp.org>
12482         * dwarf2out.c (dwarf_FORM): New function.
12483         (set_indirect_string): Use dwarf_FORM.
12484         (reset_indirect_string): Likewise.
12485         (size_of_die): Likewise.
12486         (value_format): Likewise.
12487         (output_die): Likewise.
12488         (add_skeleton_AT_string): Likewise.
12489         (output_macinfo_op): Likewise.
12490         (index_string): Likewise.
12491         (output_index_string_offset): Likewise.
12492         (output_index_string): Likewise.
12493         (count_index_strings): Likewise.
12495 2018-05-16  Carl Love  <cel@us.ibm.com>
12497         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12498         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
12500 2018-05-16  Martin Jambor  <mjambor@suse.cz>
12502         * ipa-prop.c (ipa_free_all_edge_args): Remove.
12503         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
12505 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
12507         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
12508         (fnma<mode>4): Likewise.
12509         (fms<mode>4): Likewise.
12510         (fnms<mode>4): Likewise.
12511         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
12512         (aarch64_fnma<mode>4): Likewise.
12513         (aarch64_fms<mode>4): Likewise.
12514         (aarch64_fnms<mode>4): Likewise.
12515         (aarch64_fnmadd<mode>4): Likewise.
12517 2018-05-16  Jason Merrill  <jason@redhat.com>
12519         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
12521 2018-05-16  Richard Biener  <rguenther@suse.de>
12523         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
12524         (dump_stmt_cost): Declare.
12525         (add_stmt_cost): Dump cost we add.
12526         (add_stmt_costs): New function.
12527         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
12528         No longer exported.
12529         (vect_analyze_stmt): Adjust prototype.
12530         (vectorizable_condition): Likewise.
12531         (vectorizable_live_operation): Likewise.
12532         (vectorizable_reduction): Likewise.
12533         (vectorizable_induction): Likewise.
12534         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
12535         cost vector to pass to vectorizable_ and record afterwards.
12536         (vect_model_reduction_cost): Take cost vector argument and adjust.
12537         (vect_model_induction_cost): Likewise.
12538         (vectorizable_reduction): Likewise.
12539         (vectorizable_induction): Likewise.
12540         (vectorizable_live_operation): Likewise.
12541         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
12542         SLP_TREE_NUMBER_OF_VEC_STMTS.
12543         (vect_analyze_slp_cost_1): Remove.
12544         (vect_analyze_slp_cost): Likewise.
12545         (vect_slp_analyze_node_operations): Take visited args and
12546         a target cost vector.  Avoid processing already visited stmt sets.
12547         (vect_slp_analyze_operations): Use a local cost vector to gather
12548         costs and register those of non-discarded instances.
12549         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
12550         (vect_schedule_slp_instance): Remove copying of
12551         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
12552         zero.
12553         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
12554         adding cost.  Record cost entry location.
12555         (vect_prologue_cost_for_slp_op): Function to compute cost of
12556         a constant or invariant generated for SLP vect in the prologue,
12557         split out from vect_analyze_slp_cost_1.
12558         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
12559         (vect_model_promotion_demotion_cost): Likewise.
12560         (vect_model_store_cost): Likewise, make static.
12561         (vect_model_load_cost): Likewise.
12562         (vectorizable_bswap): Add cost vector arg and adjust.
12563         (vectorizable_call): Likewise.
12564         (vectorizable_simd_clone_call): Likewise.
12565         (vectorizable_conversion): Likewise.
12566         (vectorizable_assignment): Likewise.
12567         (vectorizable_shift): Likewise.
12568         (vectorizable_operation): Likewise.
12569         (vectorizable_store): Likewise.
12570         (vectorizable_load): Likewise.
12571         (vectorizable_condition): Likewise.
12572         (vectorizable_comparison): Likewise.
12573         (can_vectorize_live_stmts): Likewise.
12574         (vect_analyze_stmt): Likewise.
12575         (vect_transform_stmt): Adjust calls to vectorizable_*.
12576         * tree-vectorizer.c: Include gimple-pretty-print.h.
12577         (dump_stmt_cost): New function.
12579 2018-05-16  Richard Biener  <rguenther@suse.de>
12581         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
12582         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
12583         * tree-ssa-dse.c: Include tree-ssa-loop.h.
12584         (check_name): New callback.
12585         (dse_classify_store): Track cycles via a visited bitmap of PHI
12586         defs and simplify handling of in-loop and across loop dead stores
12587         and properly fail for loop-variant refs.  Handle byte-tracking with
12588         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
12589         limiting the walk.
12591 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
12593         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
12594         (vect_get_mask_type_for_stmt): Likewise.
12595         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
12596         split out from...
12597         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
12598         to determine the statement's vector type and the vector type that
12599         should be used for calculating nunits.  Deal with cases in which
12600         the type has to be deferred.
12601         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
12602         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
12603         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
12604         (vect_determine_vf_for_stmt): New functions, split out from...
12605         (vect_determine_vectorization_factor): ...here.
12606         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
12607         (vect_get_mask_type_for_stmt): New functions, split out from
12608         vect_determine_vectorization_factor.
12610 2018-05-16  Richard Biener  <rguenther@suse.de>
12612         * tree-cfg.c (verify_gimple_assign_ternary): Properly
12613         verify the [VEC_]COND_EXPR embedded comparison.
12615 2018-05-15  Martin Sebor  <msebor@redhat.com>
12617         PR tree-optimization/85753
12618         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
12619         RECORD_TYPE in addition to ARRAY_TYPE.
12621 2018-05-15  Martin Sebor  <msebor@redhat.com>
12623         PR middle-end/85643
12624         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
12626 2018-05-15  Richard Biener  <rguenther@suse.de>
12628         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
12629         add by_clobber_p one.  Change algorithm to collect all defs
12630         representing uses we need to walk and try reducing them to
12631         a single one before failing.
12632         (dse_dom_walker::dse_optimize_stmt): Adjust.
12634 2018-05-13  Mark Wielaard  <mark@klomp.org>
12636         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
12637         (size_of_loc_descr): Likewise.
12638         (output_loc_operands): Likewise.
12639         (output_loc_operands_raw): Likewise.
12640         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
12641         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
12642         (hash_loc_operands): Likewise.
12643         (compare_loc_operands): Likewise.
12645 2018-05-14  Mark Wielaard  <mark@klomp.org>
12647         * dwarf2out.c (count_index_addrs): New function.
12648         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
12650 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12652         PR tree-optimization/83648
12653         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
12654         return value as malloc candidate.
12656 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12658         PR ipa/85734
12659         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
12660         param as true in call to suggest_attribute.
12662 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
12664         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
12665         -mreadonly-in-sdata.
12667 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12669         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
12670         New pattern.
12671         (aarch64_crypto_aesd_fused): Likewise.
12673 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
12675         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
12676         (movsi_aarch64): Likewise.
12677         (load_pairsi): Likewise.
12678         (load_pairdi): Likewise.
12679         (store_pairsi): Likewise.
12680         (store_pairdi): Likewise.
12681         (load_pairsf): Likewise.
12682         (load_pairdf): Likewise.
12683         (store_pairsf): Likewise.
12684         (store_pairdf): Likewise.
12685         (zero_extend): Likewise.
12686         (trunc): Swap alternatives.
12687         (fcvt_target): Add '?' to prefer w over r.
12689 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
12691         PR target/85756
12692         * config/i386/i386.md: Disallow non-commutative arithmetics in
12693         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
12694         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
12695         in the peephole2 before it.
12697 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
12699         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
12700         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
12701         (ix86_handle_option): Handle -mcldemote.
12702         * config.gcc: New header.
12703         * config/i386/cldemoteintrin.h: New file.
12704         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
12705         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12706         -mcldemote.
12707         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12708         OPTION_MASK_ISA_CLDEMOTE.
12709         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
12710         (ix86_valid_target_attribute_inner_p): Ditto.
12711         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
12712         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
12713         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
12714         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
12715         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
12716         (cldemote): New.
12717         * config/i386/i386.opt: Add -mcldemote.
12718         * config/i386/x86intrin.h: New header.
12719         * doc/invoke.texi: Add -mcldemote.
12721 2018-05-14  Richard Biener  <rguenther@suse.de>
12723         * doc/match-and-simplify.texi: Adjust :s documentation.
12725 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
12727         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
12728         intended memcpy size.
12729         (REORDER_45): Likewise.
12731 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
12733         * sort.cc: New file.
12734         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
12735         * vec.c (qsort_chk): Use gcc_qsort.
12736         * Makefile.in (OBJS-libcommon): Add sort.o.
12737         (build/sort.o): New target.  Use it...
12738         (BUILD_RTL): ... here, and...
12739         (build/gencfn-macros): ... here, and...
12740         (build/genmatch): ... here.
12742 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
12743             Chung-Ju Wu  <jasonwucj@gmail.com>
12745         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
12746         * config/nds32/nds32-graywolf.md: New file.
12747         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
12748         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
12749         pipeline.
12750         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
12751         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
12752         * config/nds32/nds32.md (pipeline_model): Add graywolf.
12753         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
12754         * config/nds32/pipelines.md: Include n15 settings.
12756 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
12757             Chung-Ju Wu  <jasonwucj@gmail.com>
12759         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
12760         * config/nds32/nds32-n13.md: New file.
12761         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
12762         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
12763         pipeline.
12764         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
12765         * config/nds32/nds32.md (pipeline_model): Add n13.
12766         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
12767         * config/nds32/pipelines.md: Include n13 settings.
12769 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
12770             Chung-Ju Wu  <jasonwucj@gmail.com>
12772         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
12773         * config/nds32/nds32-n10.md: New file.
12774         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
12775         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
12776         pipeline.
12777         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
12778         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
12779         * config/nds32/nds32.md (pipeline_model): Add n10.
12780         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
12781         * config/nds32/pipelines.md: Include n10 settings.
12783 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
12784             Kito Cheng  <kito.cheng@gmail.com>
12785             Chung-Ju Wu  <jasonwucj@gmail.com>
12787         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
12788         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12789         Add enum values for DSP extension instructions.
12790         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
12791         New constraints.
12792         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
12793         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
12794         New code iterators.
12795         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
12796         * config/nds32/nds32-dspext.md: New file for DSP implementation.
12797         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
12798         * config/nds32/nds32-intrinsic.md: Likewise.
12799         * config/nds32/nds32_intrinsic.h: Likewise.
12800         * config/nds32/nds32-md-auxiliary.c: Likewise.
12801         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
12802         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
12803         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
12804         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
12805         * config/nds32/nds32-protos.h: New declarations for DSP extension.
12806         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
12807         TYPE_DMAC in switch statement.
12808         * config/nds32/nds32.c: New checking and implementation for DSP
12809         extension instructions.
12810         * config/nds32/nds32.h: Likewise.
12811         * config/nds32/nds32.md: Likewise.
12812         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
12813         * config/nds32/predicates.md: Implement new predicates for DSP
12814         extension.
12816 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
12818         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
12819         Reformat alternatives and attributes so it is easier to identify
12820         which constraints/attributes go with which instruction.
12821         (mov<mode>_hardfloat32, FMOVE64): Likewise.
12822         (mov<mode>_softfloat32, FMOVE64): Likewise.
12823         (mov<mode>_hardfloat64, FMOVE64): Likewise.
12824         (mov<mode>_softfloat64, FMOVE64): Likewise.
12826 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12828         * doc/extend.texi (PowerPC Built-in Functions): Rename this
12829         subsection.
12830         (Basic PowerPC Built-in Functions): The new name of the
12831         subsection previously known as "PowerPC Built-in Functions".
12832         (Basic PowerPC Built-in Functions Available on all Configurations):
12833         New subsubsection.
12834         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
12835         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
12836         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
12837         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
12839 2018-05-11  Martin Jambor  <mjambor@suse.cz>
12841         PR ipa/85655
12842         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
12843         single const.
12845 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
12847         PR target/85733
12848         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
12850 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
12852         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
12853         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
12854         (ix86_handle_option): Handle -mwaitpkg.
12855         * config.gcc: New header.
12856         * config/i386/cpuid.h (bit_WAITPKG): New bit.
12857         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
12858         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
12859         function type.
12860         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12861         OPTION_MASK_ISA_WAITPKG.
12862         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
12863         (ix86_option_override_internal): Add PTA_WAITPKG.
12864         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
12865         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
12866         IX86_BUILTIN_TPAUSE.
12867         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
12868         __builtin_ia32_umwait and __builtin_ia32_tpause.
12869         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
12870         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
12871         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
12872         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
12873         UNSPECV_TPAUSE): New.
12874         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
12875         * config/i386/i386.opt: Add -mwaitpkg.
12876         * config/i386/waitpkgintrin.h: New file.
12877         * config/i386/x86intrin.h: New header.
12878         * doc/invoke.texi: Add -mwaitpkg.
12880 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
12882         PR target/85606
12883         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
12884         equivalent.
12885         (cortex-m0): Use armv6s-m isa.
12886         (cortex-m0plus): Likewise.
12887         (cortex-m1): Likewise.
12888         (cortex-m0.small-multiply): Likewise.
12889         (cortex-m0plus.small-multiply): Likewise.
12890         (cortex-m1.small-multiply): Likewise.
12892 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
12893             Jakub Jelinek  <jakub@redhat.com>
12895         PR tree-optimization/85692
12896         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
12897         source permute as well.
12899 2018-05-11  Martin Liska  <mliska@suse.cz>
12901         PR sanitizer/85556
12902         * doc/extend.texi: Document LLVM style format for no_sanitize
12903         attribute.
12905 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
12907         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
12908         mode_supports_vsx_dform_quad to mode_supports_dq_form.
12909         (mode_supports_vsx_dform_quad): Likewise.
12910         (mode_supports_vmx_dform): Move these functions to be next to the
12911         other mode_supports functions.
12912         (mode_supports_dq_form): Likewise.
12913         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
12914         mode_supports_dq_form.
12915         (reg_offset_addressing_ok_p): Likewise.
12916         (offsettable_ok_by_alignment): Likewise.
12917         (rs6000_legitimate_offset_address_p): Likewise.
12918         (legitimate_lo_sum_address_p): Likewise.
12919         (rs6000_legitimize_address): Likewise.
12920         (rs6000_legitimize_reload_address): Likewise.
12921         (rs6000_secondary_reload_inner): Likewise.
12922         (rs6000_preferred_reload_class): Likewise.
12923         (rs6000_output_move_128bit): Likewise.
12925 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
12927         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
12928         Generate SImode target register for null target.
12929         <case IX86_BUILTIN_XGETBV>: Ditto.
12930         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
12931         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
12933 2018-05-10  Carl Love  <cel@us.ibm.com>
12935         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12936         dcbtt and dcbtstt if operands[2] is 0.
12938 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
12940         PR target/85693
12941         * config/i386/sse.md (usadv64qi): New expander.
12943 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
12945         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
12946         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
12947         -maltivec=be support.
12948         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
12949         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
12950         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
12951         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
12952         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
12953         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
12954         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
12955         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
12956         altivec_vsumsws): Adjust.
12957         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
12958         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
12959         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
12960         support.
12961         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
12962         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
12963         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
12964         (altivec_lve<VI_char>x): Delete expand.
12965         (*altivec_lve<VI_char>x_internal): Rename to...
12966         (altivec_lve<VI_char>x): ... this.
12967         (altivec_lvxl_<mode>): Delete expand.
12968         (*altivec_lvxl_<mode>_internal): Rename to ...
12969         (altivec_lvxl_<mode>): ... this.
12970         (altivec_stvxl_<mode>): Delete expand.
12971         (*altivec_stvxl_<mode>_internal): Rename to ...
12972         (altivec_stvxl_<mode>): ... this.
12973         (altivec_stve<VI_char>x): Delete expand.
12974         (*altivec_stve<VI_char>x_internal): Rename to ...
12975         (altivec_stve<VI_char>x): ... this.
12976         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
12977         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
12978         reduc_plus_scal_<mode>): Adjust.
12979         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
12980         comment.
12981         (rs6000_cpu_cpp_builtins): Adjust.
12982         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
12983         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
12984         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
12985         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
12986         -maltivec=be support.
12987         (rs6000_split_vec_extract_var): Adjust.
12988         (rs6000_split_v4si_init): Adjust.
12989         (swap_selector_for_mode): Delete.
12990         (altivec_expand_lvx_be, altivec_expand_stvx_be,
12991         altivec_expand_stvex_be): Delete.
12992         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
12993         -maltivec=be support.
12994         (rs6000_gimple_fold_builtin): Ditto.
12995         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
12996         Adjust.
12997         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
12998         (TARGET_DIRECT_MOVE_64BIT): Adjust.
12999         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
13000         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
13001         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
13002         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
13003         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
13004         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
13005         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
13006         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
13007         anonymous split): Adjust.
13008         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
13009         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
13011 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
13013         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
13014         when --with-gxx-include-dir is also specified.
13015         * configure: Regenerate.
13017 2018-05-09  Jim Wilson  <jimw@sifive.com>
13019         PR target/84797
13020         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
13021         * config/riscv/t-withmultilib: New.
13022         * config/riscv/withmultilib.h: New.
13023         * doc/install.texi: Document RISC-V --with-multilib-list support.
13025 2018-05-09  Richard Biener  <rguenther@suse.de>
13027         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
13028         vector.
13029         (vect_bb_vectorization_profitable_p): Adjust.  Compute
13030         actual scalar cost using the cost vector and the add_stmt_cost
13031         machinery.
13033 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
13035         PR rtl-optimization/85645
13036         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
13037         in the REG_CFA_REGISTER note for LR, don't leave it empty.
13039 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
13041         PR rtl-optimization/85645
13042         * shrink-wrap.c (spread_components): Return a boolean saying if
13043         anything was changed.
13044         (try_shrink_wrapping_separate): Iterate spread_components until
13045         nothing changes anymore.
13047 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
13049         PR rtl-optimization/85645
13050         * regrename.c (build_def_use): Also kill the chains that include the
13051         destination of a REG_CFA_REGISTER note.
13053 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
13055         PR rtl-optimization/85645
13056         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
13057         insn that has a REG_CFA_REGISTER note.
13059 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
13061         * cfgexpand.c (expand_clobber): New function.
13062         (expand_gimple_stmt_1): Use it.
13063         * tree-vect-stmts.c (vect_clobber_variable): New function,
13064         split out from...
13065         (vectorizable_simd_clone_call): ...here.
13066         (vectorizable_store): Emit a clobber either side of an
13067         IFN_STORE_LANES sequence.
13068         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
13070 2018-05-09  Tom de Vries  <tom@codesourcery.com>
13072         PR target/85626
13073         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
13074         (define_insn "trap_if_false"): Add exit after trap.
13076 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
13078         PR rtl-optimization/85638
13079         * bb-reorder.c: Include common/common-target.h.
13080         (create_forwarder_block): New function extracted from...
13081         (fix_up_crossing_landing_pad): ...here.  Rename into...
13082         (dw2_fix_up_crossing_landing_pad): ...this.
13083         (sjlj_fix_up_crossing_landing_pad): New function.
13084         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
13085         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
13086         from both partitions and exit the loop after one iteration.
13088 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13090         Revert:
13091         * doc/extend.texi (PowerPC Built-in Functions): Rename this
13092         subsection.
13093         (Basic PowerPC Built-in Functions): The new name of the
13094         subsection previously known as "PowerPC Built-in Functions".
13095         (Basic PowerPC Built-in Functions Available on all Configurations):
13096         New subsubsection.
13097         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13098         subsubsection.
13099         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13100         subsubsection.
13101         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13102         subsubsection.
13103         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13104         subsubsection.
13106 2018-05-08  Jim Wilson  <jimw@sifive.com>
13108         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
13109         (LD_EMUL_SUFFIX): New.
13110         (LINK_SPEC): Use it.
13112 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13114         * doc/extend.texi (PowerPC Built-in Functions): Rename this
13115         subsection.
13116         (Basic PowerPC Built-in Functions): The new name of the
13117         subsection previously known as "PowerPC Built-in Functions".
13118         (Basic PowerPC Built-in Functions Available on all Configurations):
13119         New subsubsection.
13120         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13121         subsubsection.
13122         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13123         subsubsection.
13124         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13125         subsubsection.
13126         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13127         subsubsection.
13129 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
13131         PR target/85683
13132         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
13133         after cmpelim optimization.
13135 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
13137         * config.gcc: Support "goldmont".
13138         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
13139         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13140         PROCESSOR_GOLDMONT.
13141         * config/i386/i386.c (m_GOLDMONT): Define.
13142         (processor_target_table): Add "goldmont".
13143         (PTA_GOLDMONT): Define.
13144         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
13145         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
13146         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
13147         (fold_builtin_cpu): Add "goldmont".
13148         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
13149         (ix86_option_override_internal): Add "goldmont".
13150         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
13151         (processor_type): Add PROCESSOR_GOLDMONT.
13152         * config/i386/i386.md: Add CPU "glm".
13153         * config/i386/glm.md: New file.
13154         * config/i386/x86-tune.def: Add m_GOLDMONT.
13155         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
13157 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
13159         PR target/85572
13160         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
13161         E_V4DImode.
13162         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
13163         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
13164         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
13166         PR target/85317
13167         * config/i386/i386.c (ix86_fold_builtin): Handle
13168         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
13170         PR target/85480
13171         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
13172         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
13174 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
13176         PR target/85658
13177         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
13178         (check_arch): Likewise.
13179         (check_fpu): Return the result rather than printing it.
13180         (end arch): Fix operator precedence.
13181         (end cpu): Likewise.
13182         (END): Print the result from check_fpu.
13184 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
13185             Alan Hayward  <alan.hayward@arm.com>
13186             David Sherwood  <david.sherwood@arm.com>
13188         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
13189         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
13190         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
13191         (*fcmuo<mode>_and): New patterns.
13193 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
13195         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
13196         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
13197         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
13198         (cmp_op, sve_imm_con): New code attributes.
13199         (SVE_COND_INT_CMP, imm_con): Delete.
13200         (cmp_op): Remove above unspecs from int attribute.
13201         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
13202         to...
13203         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
13204         comparison-specific unspecs.
13205         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
13206         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
13207         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
13208         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
13209         (*vec_fcm<cmp_op><mode>): Rename to...
13210         (*fcm<cmp_op><mode>): ...this and adjust likewise.
13211         (*vec_fcmuo<mode>): Rename to...
13212         (*fcmuo<mode>): ...this and adjust likewise.
13213         (*pred_fcm<cmp_op><mode>): New pattern.
13214         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
13215         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
13216         functions.
13217         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
13218         and UNORDERED.
13219         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
13220         (aarch64_emit_sve_predicated_cond): New function.
13221         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
13222         (aarch64_emit_unspec_cond_or): Replace with...
13223         (aarch64_emit_sve_or_conds): ...this new function.  Use
13224         aarch64_emit_sve_ptrue_op for the individual comparisons and
13225         aarch64_emit_binop to OR them together.
13226         (aarch64_emit_inverted_unspec_cond): Replace with...
13227         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
13228         aarch64_emit_sve_ptrue_op for the comparison and
13229         aarch64_emit_unop to invert the result.
13230         (aarch64_expand_sve_vec_cmp_float): Update after the above
13231         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
13233 2018-05-07  Nathan Sidwell  <nathan@acm.org>
13235         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
13236         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
13237         (Backwards Compatibility): Likewise.
13239 2018-05-07  Luis Machado  <luis.machado@linaro.org>
13241         PR bootstrap/85681
13242         Revert:
13243         2018-05-07  Luis Machado  <luis.machado@linaro.org>
13245         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13246         <prefetch_dynamic_strides>: New const bool field.
13247         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13248         prefetch_dynamic_strides.
13249         (exynosm1_prefetch_tune): Likewise.
13250         (thunderxt88_prefetch_tune): Likewise.
13251         (thunderx_prefetch_tune): Likewise.
13252         (thunderx2t99_prefetch_tune): Likewise.
13253         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13254         to false.
13255         (aarch64_override_options_internal): Update to set
13256         PARAM_PREFETCH_DYNAMIC_STRIDES.
13257         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13258         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13259         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13260         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13261         prefetch-dynamic-strides setting.
13263         2018-05-07  Luis Machado  <luis.machado@linaro.org>
13265         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13266         <minimum_stride>: New const int field.
13267         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13268         minimum_stride field.
13269         (exynosm1_prefetch_tune): Likewise.
13270         (thunderxt88_prefetch_tune): Likewise.
13271         (thunderx_prefetch_tune): Likewise.
13272         (thunderx2t99_prefetch_tune): Likewise.
13273         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13274         (aarch64_override_options_internal): Update to set
13275         PARAM_PREFETCH_MINIMUM_STRIDE.
13276         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13277         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13278         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13279         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13280         stride is constant and is below the minimum stride threshold.
13282 2018-05-07  Luis Machado  <luis.machado@linaro.org>
13284         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
13285         to 512.
13287 2018-05-07  Luis Machado  <luis.machado@linaro.org>
13289         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13290         <prefetch_dynamic_strides>: New const bool field.
13291         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13292         prefetch_dynamic_strides.
13293         (exynosm1_prefetch_tune): Likewise.
13294         (thunderxt88_prefetch_tune): Likewise.
13295         (thunderx_prefetch_tune): Likewise.
13296         (thunderx2t99_prefetch_tune): Likewise.
13297         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13298         to false.
13299         (aarch64_override_options_internal): Update to set
13300         PARAM_PREFETCH_DYNAMIC_STRIDES.
13301         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13302         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13303         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13304         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13305         prefetch-dynamic-strides setting.
13307 2018-05-07  Luis Machado  <luis.machado@linaro.org>
13309         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13310         <minimum_stride>: New const int field.
13311         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13312         minimum_stride field.
13313         (exynosm1_prefetch_tune): Likewise.
13314         (thunderxt88_prefetch_tune): Likewise.
13315         (thunderx_prefetch_tune): Likewise.
13316         (thunderx2t99_prefetch_tune): Likewise.
13317         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13318         (aarch64_override_options_internal): Update to set
13319         PARAM_PREFETCH_MINIMUM_STRIDE.
13320         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13321         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13322         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13323         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13324         stride is constant and is below the minimum stride threshold.
13326 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
13328         PR c++/85659
13329         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
13330         the type is addressable.  Don't force op into register if it has
13331         BLKmode.
13333 2018-05-05  Roland McGrath  <mcgrathr@google.com>
13335         PR other/77609
13336         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
13337         any section for which we don't know a specific type it should have,
13338         regardless of name.  Previously this was done only for the exact
13339         names ".init_array", ".fini_array", and ".preinit_array".
13340         (default_elf_asm_named_section): Add comment about
13341         relationship with default_section_type_flags and SECTION_NOTYPE.
13342         (get_section): Don't consider it a type conflict if one side has
13343         SECTION_NOTYPE and the other doesn't, as long as neither has the
13344         SECTION_BSS et al used in the default_section_type_flags logic.
13346 2018-05-05  Tom de Vries  <tom@codesourcery.com>
13348         PR target/85653
13349         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
13350         (workaround_barsyncs): New function.
13351         (nvptx_reorg): Use workaround_barsyncs.
13352         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
13353         (define_expand "nvptx_membar_cta"): New define_expand.
13354         (define_insn "*nvptx_membar_cta"): New insn.
13356 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
13358         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
13359         To improve optimization opportunities.
13360         * builtin-types.def: The new needed builtin types for the above.
13362 2018-05-04  Richard Biener  <rguenther@suse.de>
13364         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
13365         * gimple-ssa-store-merging.c
13366         (imm_store_chain_info::output_merged_store): Remove redundant create,
13367         release split_store vector contents on failure.
13368         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
13369         scalar stmt vector on cache hit.
13371 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
13373         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
13374         Xilinx FP support.
13375         * config.gcc (powerpc-xilinx-eabi*): Remove.
13376         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
13377         support.
13378         (fusion_addis_mem_combo_load): Ditto.
13379         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
13380         FP support.
13381         (rs6000_cpu_cpp_builtins): Ditto.
13382         * config/rs6000/rs6000-linux.c
13383         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
13384         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
13385         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
13386         support.
13387         (rs6000_setup_reg_addr_masks): Ditto.
13388         (rs6000_init_hard_regno_mode_ok): Ditto.
13389         (rs6000_option_override_internal): Ditto.
13390         (legitimate_lo_sum_address_p): Ditto.
13391         (rs6000_legitimize_address): Ditto.
13392         (rs6000_legitimize_reload_address): Ditto.
13393         (rs6000_legitimate_address_p): Ditto.
13394         (abi_v4_pass_in_fpr): Ditto.
13395         (setup_incoming_varargs): Ditto.
13396         (rs6000_gimplify_va_arg): Ditto.
13397         (rs6000_split_multireg_move): Ditto.
13398         (rs6000_savres_strategy): Ditto.
13399         (rs6000_emit_prologue_components): Ditto.
13400         (rs6000_emit_epilogue_components): Ditto.
13401         (rs6000_emit_prologue): Ditto.
13402         (rs6000_emit_epilogue): Ditto.
13403         (rs6000_elf_file_end): Ditto.
13404         (rs6000_function_value): Ditto.
13405         (rs6000_libcall_value): Ditto.
13406         * config/rs6000/rs6000.h: Ditto.
13407         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
13408         (TARGET_MINMAX): ... this.  New.
13409         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
13410         * config/rs6000/rs6000.md: Remove Xilinx FP support.
13411         (*movsi_internal1_single): Delete.
13412         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
13413         mfpu=, mxilinx-fpu): Delete.
13414         * config/rs6000/singlefp.h: Delete.
13415         * config/rs6000/sysv4.h: Remove Xilinx FP support.
13416         * config/rs6000/t-rs6000: Ditto.
13417         * config/rs6000/t-xilinx: Delete.
13418         * config/rs6000/titan.md: Adjust for fp_type removal.
13419         * config/rs6000/vsx.md: Remove Xilinx FP support.
13420         (VStype_simple): Delete.
13421         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
13422         * config/rs6000/xfpu.h: Delete.
13423         * config/rs6000/xfpu.md: Delete.
13424         * config/rs6000/xilinx.h: Delete.
13425         * config/rs6000/xilinx.opt: Delete.
13426         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
13427         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
13429 2018-05-04  Tom de Vries  <tom@codesourcery.com>
13431         PR libgomp/85639
13432         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
13433         if ignore == 0.
13435 2018-05-04  Richard Biener  <rguenther@suse.de>
13437         PR middle-end/85627
13438         * tree-complex.c (update_complex_assignment): We are always in SSA form.
13439         (expand_complex_div_wide): Likewise.
13440         (expand_complex_operations_1): Likewise.
13441         (expand_complex_libcall): Preserve EH info of the original stmt.
13442         (tree_lower_complex): Handle removed blocks.
13443         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
13444         on complex multiplication and division libcall builtins.
13446 2018-05-04  Richard Biener  <rguenther@suse.de>
13448         PR middle-end/85574
13449         * fold-const.c (negate_expr_p): Restrict negation of operand
13450         zero of a division to when we know that can happen without
13451         overflow.
13452         (fold_negate_expr_1): Likewise.
13454 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
13456         PR libstdc++/85466
13457         * real.h (real_nextafter): Declare.
13458         * real.c (real_nextafter): New function.
13459         * fold-const-call.c (fold_const_nextafter): New function.
13460         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
13461         CASE_CFN_NEXTTOWARD.
13462         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
13463         even when arg1_mode is different from arg0_mode.
13465 2018-05-03  Nathan Sidwell  <nathan@acm.org>
13467         * doc/extend.texi (Deprecated Features): Remove
13468         -ffriend-injection.
13469         (Backwards Compatibility): Likewise.
13470         * doc/invoke.texi (C++ Language Options): Likewise.
13471         (C++ Dialect Options): Likewise.
13473 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
13475         PR target/85530
13476         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
13477         _mm512_mask_mullox_epi64): New intrinsics.
13479 2018-05-03  Tom de Vries  <tom@codesourcery.com>
13481         PR testsuite/85106
13482         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13483         dump files): Add offload-tree.
13485 2018-05-03  Richard Biener  <rguenther@suse.de>
13487         PR tree-optimization/85615
13488         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
13489         to loops not nested in BBs loop father to avoid creating multi-entry
13490         loops.
13492 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13494         PR tree-optimization/70291
13495         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
13496         arguments.  Change return type to tree.  Emit libcall as a new
13497         statement rather than replacing existing one when inplace_p is true.
13498         (expand_complex_multiplication_components): New function.
13499         (expand_complex_multiplication): Expand floating-point complex
13500         multiplication using the above.
13501         (expand_complex_division): Rename inner_type parameter to type.
13502         Update expand_complex_libcall call-site.
13503         (expand_complex_operations_1): Update expand_complex_multiplication
13504         and expand_complex_division call-sites.
13506 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
13508         PR target/85582
13509         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13510         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13511         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
13512         the highest significant bit of the shift count mask is clear.  In
13513         check whether and[sq]i3 is needed verify that all significant bits
13514         of the shift count other than the highest are set.
13516 2018-05-02  Tom de Vries  <tom@codesourcery.com>
13518         PR libgomp/82428
13519         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
13520         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
13521         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
13522         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
13523         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
13524         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
13525         __builtin_goacc_parlevel_size.
13527 2018-05-02  Richard Biener  <rguenther@suse.de>
13529         PR tree-optimization/85597
13530         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
13531         do not use split vect_get_vec_defs call but call vect_get_slp_defs
13532         directly.
13534 2018-05-02  Tom de Vries  <tom@codesourcery.com>
13536         PR testsuite/85106
13537         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13538         dump files): Add ltrans-tree.
13540 2018-05-02  Tom de Vries  <tom@codesourcery.com>
13542         PR testsuite/85106
13543         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13544         dump files): Add wpa-ipa.
13546 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
13548         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
13549         powerpc*-*-linux*paired* target.
13550         * config/rs6000/750cl.h: Delete.
13551         * config/rs6000/paired.h: Delete.
13552         * config/rs6000/paired.md: Delete.
13553         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
13554         float support.
13555         * config/rs6000/rs6000-builtin.def: Remove paired float support.
13556         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
13557         comment.  Remove paired float support.
13558         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
13559         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
13560         VECTOR_PAIRED.
13561         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
13562         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
13563         declarations.
13564         * config/rs6000/rs6000.c: Remove paired float support.
13565         (paired_expand_vector_init, paired_expand_vector_move,
13566         paired_emit_vector_compare, paired_emit_vector_cond_expr,
13567         (paired_expand_lv_builtin, paired_expand_stv_builtin,
13568         paired_expand_builtin, paired_expand_predicate_builtin,
13569         paired_init_builtins): Delete.
13570         * config/rs6000/rs6000.h: Remove paired float support.
13571         * config/rs6000/rs6000.md: Remove paired float support.
13572         (move_from_CR_ov_bit): Delete.
13573         * config/rs6000/rs6000.opt (mpaired): Delete.
13574         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
13575         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
13577 2018-05-02  Richard Biener  <rguenther@suse.de>
13579         PR middle-end/85567
13580         * gimplify.c (gimplify_save_expr): When in SSA form allow
13581         SAVE_EXPRs to compute to SSA vars.
13583 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
13585         PR target/85582
13586         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13587         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13588         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
13589         clobber operands[2], instead use a new pseudo.  Formatting fixes.
13591 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
13593         PR tree-optimization/85586
13594         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
13595         exit early for statements in the same group if the accesses are
13596         not strided.
13598 2018-05-02  Tom de Vries  <tom@codesourcery.com>
13600         PR lto/85451
13601         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
13602         error message.
13604 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
13606         PR tree-optimization/85143
13607         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
13609 2018-05-01  Tom de Vries  <tom@codesourcery.com>
13611         PR lto/85451
13612         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
13613         not found" error message.
13615 2018-05-01  Tom de Vries  <tom@codesourcery.com>
13617         PR other/83786
13618         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
13619         * vec.c (test_ordered_remove_if): New function.
13620         (vec_c_tests): Call test_ordered_remove_if.
13621         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
13622         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
13623         * tree-vect-patterns.c (vect_pattern_recog_1): Use
13624         VEC_ORDERED_REMOVE_IF.
13626 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
13628         PR tree-optimization/82665
13629         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
13630         pointer subtraction where arguments come from a memchr call.
13632 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
13634         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
13635         --push-state --as-needed and --pop-state instead of --as-needed and
13636         --no-as-needed if ld supports it.
13637         * configure: Regenerated.
13639         PR web/85578
13640         * doc/install.texi2html: Replace _002d with - and _002a with * in
13641         generated html files using sed.
13643 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
13645         PR c++/85523
13646         * gcc-rich-location.c (blank_line_before_p): New function.
13647         (use_new_line): New function.
13648         (gcc_rich_location::add_fixit_insert_formatted): New function.
13649         * gcc-rich-location.h
13650         (gcc_rich_location::add_fixit_insert_formatted): New function.
13652 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
13654         * selftest.c (assert_streq): Rename "expected" and "actual" to
13655         "val1" and "val2".  Extend NULL-handling to cover both inputs
13656         symmetrically, while still requiring both to be non-NULL for a pass.
13657         * selftest.h (assert_streq): Rename "expected" and "actual" to
13658         "val1" and "val2".
13659         (ASSERT_EQ): Likewise.
13660         (ASSERT_EQ_AT): Likewise.
13661         (ASSERT_KNOWN_EQ): Likewise.
13662         (ASSERT_KNOWN_EQ_AT): Likewise.
13663         (ASSERT_NE): Likewise.
13664         (ASSERT_MAYBE_NE): Likewise.
13665         (ASSERT_MAYBE_NE_AT): Likewise.
13666         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
13667         the assertion to pass.
13668         (ASSERT_STREQ_AT): Likewise.
13670 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
13672         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
13673         interaction with -pie.
13675 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
13677         * selftest.h: Fix alphabetization of per-source-file selftest
13678         declarations.
13680 2018-04-30  Jason Merrill  <jason@redhat.com>
13682         PR c++/61982 - dead stores to destroyed objects.
13683         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
13684         of clobber.
13686 2018-04-30  Jason Merrill  <jason@redhat.com>
13688         * tree.c (build_clobber): New.
13689         * tree.h: Declare it.
13690         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
13692 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
13694         * diagnostic-show-locus.c (layout::layout): Update for
13695         location_get_source_line returning a char_span.
13696         (struct char_span): Move to input.h.
13697         (struct correction): Update for fields in char_span becoming
13698         private.
13699         (struct source_line): Update for location_get_source_line
13700         returning a char_span.
13701         (layout::print_line): Likewise.
13702         * edit-context.c (edited_file::print_content): Likewise.
13703         (edited_file::print_diff_hunk): Likewise.
13704         (edited_file::print_run_of_changed_lines): Likewise.
13705         (edited_file::get_num_lines): Likewise.
13706         (edited_line::edited_line): Likewise.
13707         * final.c (asm_show_source): Likewise.
13708         * input.c (location_get_source_line): Convert return type
13709         from const char * to char_span, losing the final "line_len"
13710         param.
13711         (dump_location_info): Update for the above.
13712         (get_substring_ranges_for_loc): Likewise.  Use a char_span
13713         when handling the literal within the line.
13714         (test_reading_source_line): Update for location_get_source_line
13715         returning a char_span.
13716         * input.h (class char_span): Move here from
13717         diagnostic-show-locus.c, converting from a struct to a class.
13718         Make data members private.
13719         (char_span::operator bool): New.
13720         (char_span::length): New.
13721         (char_span::get_buffer): New.
13722         (char_span::operator[]): New.
13723         (char_span::subspan): Make const.
13724         (char_span::xstrdup): New.
13725         (location_get_source_line): Convert return type from const char *
13726         to char_span, losing the final "line_size" param.
13728 2018-04-30  Jan Hubicka  <jh@suse.cz>
13730         * lto-wrapper.c (ltrans_priorities): New static var.
13731         (cmp_priority): New.
13732         (run_gcc): Read priorities and if doing parallel build order
13733         the Makefile by them.
13735 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
13737         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
13739 2018-04-30  Richard Biener  <rguenther@suse.de>
13741         * tree-cfg.c (verify_address): Remove base argument, add
13742         flag whether to check TREE_ADDRESSABLE and do that.
13743         (verify_expr): Remove.
13744         (verify_types_in_gimple_reference): Add pieces from verify_expr.
13745         (verify_gimple_assign_single): Likewise.
13746         (verify_gimple_switch): Likewise.
13747         (verify_expr_location_1): Dereference tp once.  Add (disabled)
13748         piece from verify_expr.
13749         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
13751 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
13753         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
13755 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
13757         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
13758         (small_data_pattern): Likewise.
13759         (arc_rewrite_small_data): Likewise.
13760         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
13761         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
13762         (get_symbol_alignment): New function.
13763         (legitimate_small_data_address_p): Likewise.
13764         (legitimate_scaled_address): Update, call
13765         legitimate_small_data_address_p.
13766         (output_sdata): New static variable.
13767         (arc_print_operand): Update how we handle small data operands.
13768         (arc_print_operand_address): Likewise.
13769         (arc_legitimate_address_p): Update, use
13770         legitimate_small_data_address_p.
13771         (arc_rewrite_small_data_p): Remove.
13772         (arc_rewrite_small_data_1): Likewise.
13773         (arc_rewrite_small_data): Likewise.
13774         (small_data_pattern): Likewise.
13775         (compact_sda_memory_operand): Update to use
13776         legitimate_small_data_address_p and get_symbol_alignment.
13777         (prepare_move_operands): Don't rewite sdata pattern.
13778         (prepare_extend_operands): Remove.
13779         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
13780         pattern.
13781         (zero_extendqisi2): Likewise.
13782         (zero_extendhisi2): Likewise.
13783         (extendqihi2): Likewise.
13784         (extendqisi2): Likewise.
13785         (extendhisi2): Likewise.
13786         (addsi3): Likewise.
13787         (subsi3): Likewise.
13788         (andsi3): Likewise.
13789         * config/arc/constraints.md (Usd): Change it to memory constraint.
13791 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
13793         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
13794         as source of std instructions.
13795         * config/arc/arc.md (movsi_insn): Update pattern predicate to
13796         allow 6-bit constants as source for store instructions.
13797         (movdi_insn): Update instruction pattern to allow 6-bit constants
13798         as source for store instructions.
13800 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
13802         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
13804 2018-04-30  Nathan Sidwell  <nathan@acm.org>
13805             Sandra Loosemore <sandra@codesourcery.com>
13807         * dumpfile.c (dump_open): Allow '-' for stdout.
13808         * doc/invoke.texi (Developer Options): Document dump filename
13809         determination early.  Document stdin/stdout selection.
13811 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
13813         Microblaze Target: PIC data text relative
13815         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
13816         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
13817         Add declaration.
13818         * config/microblaze/microblaze.h (microblaze_constant_address_p):
13819         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
13820         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
13821         New addressing mode for data-text relative position indepenedent code.
13822         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
13823         'ADDRESS_SYMBOLIC_TXT_REL'.
13824         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
13825         (microblaze_legitimate_pic_operand): Exclude function calls from
13826         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
13827         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
13828         addresses cases.
13829         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13830         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13831         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
13832         for 'address + offset'.
13833         (microblaze_expand_prologue): Add new function prologue call for
13834         'r20' assignation.
13835         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
13836         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
13837         table in case of TARGET_PIC_DATA_TEXT_REL.
13838         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
13839         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
13840         Add new macros 'UNSPEC_TEXT',
13841         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
13842         + exclude function calls from 'UNSPEC_PLT' in case of data text
13843         relative mode.
13844         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13845         new target hook for generating address diff vector tables in case of
13846         flag_pic.
13847         * doc/tm.texi : Regenerate.
13848         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
13849         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
13850         of addr diff vector generation.
13851         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13852         target hook definition.
13853         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
13854         Add default function for generate_pic_addr_diff_vec -> flag_pic.
13855         * doc/invoke.texi (Add new pic option): Add new microblaze pic
13856         option for data text relative.
13858 2018-04-30  Richard Biener  <rguenther@suse.de>
13860         * tree-chrec.h (evolution_function_is_constant_p): Remove
13861         redundant check.
13862         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
13864 2018-04-30  Richard Biener  <rguenther@suse.de>
13866         PR bootstrap/85571
13867         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
13869 2018-04-30  Richard Biener  <rguenther@suse.de>
13871         PR tree-optimization/28364
13872         PR tree-optimization/85275
13873         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
13874         copying first exit test.
13876 2018-04-28  Mark Wielaard  <mark@klomp.org>
13878         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
13879         dwarf_version >= 5.
13880         (dwarf_AT): Handle DW_AT_addr_base.
13881         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
13883 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
13885         PR target/84431
13886         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
13887         (*ashl<dwi>3_doubleword_mask_1): Ditto.
13888         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
13889         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
13891 2018-04-28  Richard Biener  <rguenther@suse.de>
13893         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
13894         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
13895         to reflect use.  Only add interesting stmts.
13897 2018-04-27  Martin Jambor  <mjambor@suse.cz>
13899         PR ipa/85549
13900         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
13901         the jump function allows for passing through aggregate values.
13903 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
13905         * input.h (in_system_header_at): Convert from macro to inline
13906         function.
13907         (from_macro_expansion_at): Likewise.
13908         (from_macro_definition_at): Likewise.
13910 2018-04-27  Jeff Law  <law@redhat.com>
13912         * config.gcc: Mark tile* targets as deprecated/obsolete.
13914 2018-04-27  Richard Biener  <rguenther@suse.de>
13916         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
13917         fix for ILP32.
13919 2018-04-27  Richard Biener  <rguenther@suse.de>
13921         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
13923 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
13925         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
13926         with Yd constraint. Set "preferred_for_speed" attribute from
13927         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
13928         with Yd constraint.
13929         (*movdi_internal): Ditto.
13930         (movti_interunit splitters): Remove
13931         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
13932         (movdi_interunit splitters): Ditto.
13933         * config/i386/constraints.md (Ye): Remove.
13934         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
13936 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13938         PR target/85512
13939         * config/aarch64/constraints.md (Usg): Limit to 31.
13940         (Usj): Limit to 63.
13942 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
13944         PR tree-optimization/85529
13945         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
13946         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
13947         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
13948         zero extension or masking of the MSB bit.
13949         (optimize_range_tests): Add FIRST_BB argument, pass it through
13950         to optimize_range_tests_var_bound.
13951         (maybe_optimize_range_tests, reassociate_bb): Adjust
13952         optimize_range_tests callers.
13954 2018-04-26  Richard Biener  <rguenther@suse.de>
13955             Jakub Jelinek  <jakub@redhat.com>
13957         * cgraph.h (symbol_table): Just declare debug method here.
13958         * symtab.c (symbol_table::debug): Define.
13960 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
13962         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
13964 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
13966         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
13967         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
13968         (*movdi_internal): Substitute Yi and Yj constraint with x
13969         and Ym and Yn constraint with y constraint.  Update "isa"
13970         attribute and set "preferred_for_speed" attribute from
13971         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
13972         (*movsi_internal): Ditto.
13973         (*movdf_internal): Ditto.
13974         (*movsf_internal): Ditto.
13975         (*zero_extendsidi2): Ditto.
13976         * config/i386/sse.md (vec_set<mode>_0): Ditto.
13977         (sse2_loadld): Ditto.
13978         (*vec_extract<ssevecmodelower>_0): Ditto.
13979         (*vec_extractv4si_0_zext_sse4): Ditto.
13980         (vec_concatv2di): Ditto.
13981         (*vec_dup<mode>): Ditto.
13982         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
13983         * config/i386/constraints.md (Yi): Remove.
13984         (Yj): Remove.
13985         (Ym): Remove.
13986         (Yn): Remove.
13988 2018-04-26  Nathan Sidwell  <nathan@acm.org>
13990         * dumpfile.c (dump_open): New.
13991         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
13992         (dump_finish): Detect stdio/stderr by value not name.
13994 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
13996         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
13998 2018-04-26  Tom de Vries  <tom@codesourcery.com>
14000         PR target/84952
14001         * config/nvptx/nvptx.c (verify_neutering_jumps)
14002         (verify_neutering_labels): New function
14003         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
14005 2018-04-26  Tom de Vries  <tom@codesourcery.com>
14007         PR target/84025
14008         * config/nvptx/nvptx.c (needs_neutering_p): New function.
14009         (nvptx_single): Use needs_neutering_p to skip over insns that do not
14010         need neutering.
14012 2018-04-26  Richard Biener <rguenther@suse.de>
14013             Tom de Vries  <tom@codesourcery.com>
14015         PR lto/85422
14016         * lto-streamer-out.c (output_function): Fixup loops if required to match
14017         discovery done in the reader.
14019 2018-04-26  Richard Biener  <rguenther@suse.de>
14021         PR tree-optimization/85116
14022         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
14023         have a loop exit from the single latch predecessor.  Remove
14024         case of header with just condition.
14025         (ch_base::copy_headers): Exclude infinite loops from any
14026         processing.
14027         (pass_ch::execute): Record exits.
14029 2018-04-26  Richard Biener  <rguenther@suse.de>
14031         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
14032         prologue cost vector and pass it to vect_get_load_cost.
14033         (vect_get_peeling_costs_all_drs): Likewise.
14034         (vect_peeling_hash_get_lowest_cost): Likewise.
14035         (vect_enhance_data_refs_alignment): Likewise.
14037 2018-04-26  Richard Biener  <rguenther@suse.de>
14039         PR middle-end/85450
14040         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
14041         checking of integer<->pointer conversions.
14042         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
14043         sign-/zero-extending pointer types.
14044         (expand_omp_for_static_chunk): Likewise.
14046 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
14047             Jean Lee  <xiaoyur347@gmail.com>
14049         * config/mips/mips.c (mips_asan_shadow_offset): New function.
14050         (TARGET_ASAN_SHADOW_OFFSET): Define.
14051         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
14052         true for -fsanitize=address.
14054 2018-04-25  Mark Wielaard  <mark@klomp.org>
14056         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
14057         shorter ones.
14059 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
14061         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
14062         than "alu", remove explicit "memory" and "imm_disp" attributes.
14063         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
14065         PR middle-end/85414
14066         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
14067         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
14068         gen_lowpart_no_emit.
14070 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
14072         PR target/85473
14073         * config/i386/i386.c (ix86_expand_builtin): Change memory
14074         operand to XI, extend p0 to Pmode.
14075         * config/i386/i386.md: Change unspec volatile and operand
14076         1 mode to XI, change operand 0 mode to P.
14078 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
14080         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
14081         GET_MODE_MASK before any checking.
14082         (nds32_can_use_bset_p): Likewise.
14083         (nds32_can_use_btgl_p): Likewise.
14085 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
14087         * config/nds32/nds32-doubleword.md: New define_split pattern for
14088         illegal register number.
14090 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
14092         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
14094 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
14096         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
14098 2018-04-25  Richard Biener  <rguenther@suse.de>
14100         * lto-streamer.h (LTO_major_version): Bump to 8.
14102 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
14104         * BASE-VER: Set to 9.0.0.
14106 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
14108         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
14109         in __abskf2 and __powikf2.
14111 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14113         PR target/85512
14114         * config/aarch64/constraints.md (Usg, Usj): New constraints.
14115         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
14116         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
14117         Use the above on operand 2.  Reindent.
14118         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
14120 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
14122         PR target/85485
14123         * common/config/i386/i386-common.c (ix86_handle_option): Don't
14124         handle OPT_mcet.
14125         * config/i386/i386.opt (mcet): Removed.
14126         * doc/install.texi: Remove -mcet documentation.
14127         * doc/invoke.texi: Likewise.
14129 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
14131         PR target/85485
14132         * doc/install.texi: Remove -mcet from bootstrap-cet.
14134 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
14136         PR target/85511
14137         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
14138         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
14139         if TARGET_64BIT.
14141         PR target/85503
14142         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
14143         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
14144         containing a CONST_VECTOR.
14146 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
14148         * doc/install.texi: Update newlib dependency for nvptx.
14150 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
14152         PR target/85508
14153         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
14154         instead of INTVAL when shifting x left.
14156 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
14158         PR tree-optimization/85478
14159         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
14160         vect_grouped_store_supported for single element vectors.
14162 2018-04-24  Richard Biener  <rguenther@suse.de>
14164         PR target/85491
14165         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
14166         load cost increase to the case of non-constant step.
14168 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
14170         PR target/84828
14171         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
14172         destination if any_malformed_asm.
14174 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
14176         PR middle-end/85496
14177         * expr.c (store_field): In the bitfield case, if the value comes from
14178         a function call and is returned in registers by means of a PARALLEL,
14179         do not change the mode of the temporary unless BLKmode and VOIDmode.
14181 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
14183         PR rtl-optimization/85423
14184         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
14185         dependencies to debug insns when the previous insn is non-debug.
14187 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
14189         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
14190         enums into a single definition.
14191         (fls): Fix predicates and printing.
14192         (seti): Likewise.
14194 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
14196         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
14197         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
14198         and short u6 immediate.
14199         (check_if_valid_sleep_operand): Remove.
14200         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
14202 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
14204         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
14205         flag_always_save_lp condition.
14206         * config/nds32/nds32.opt (malways-save-lp): New option.
14208 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
14210         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
14211         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
14212         * config/nds32/nds32.h
14213         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
14214         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
14216 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
14218         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
14219         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
14221 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
14222             Chung-Ju Wu  <jasonwucj@gmail.com>
14224         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
14225         Declare.
14226         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
14227         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
14229 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
14231         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
14233 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
14235         * config/nds32/nds32-protos.h (nds32_data_alignment,
14236         nds32_local_alignment): Declare.
14237         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
14238         nds32_local_alignment): New functions.
14239         (TARGET_CONSTANT_ALIGNMENT): Define.
14240         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
14242 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
14244         * config/nds32/nds32.c
14245         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
14246         (TARGET_MODES_TIEABLE_P): Likewise.
14248 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
14250         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
14251         level Ofast and Og.
14253 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
14254             Chung-Ju Wu  <jasonwucj@gmail.com>
14256         * config/nds32/constants.md (unspec_volatile_element): Add enum values
14257         for unaligned access.
14258         * config/nds32/nds32-intrinsic.c: Implementation of expanding
14259         unaligned access.
14260         * config/nds32/nds32-intrinsic.md: Likewise.
14261         * config/nds32/nds32_intrinsic.h: Likewise.
14262         * config/nds32/nds32.h (nds32_builtins): Likewise.
14263         * config/nds32/nds32.opt (munaligned-access): New option.
14264         * config/nds32/nds32.c (nds32_asm_file_start): Display
14265         flag_unaligned_access status.
14267 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
14269         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
14270         -mno-relax is present.
14271         * config/riscv/linux.h (LINK_SPEC): Ditto.
14273 2018-04-20  Martin Sebor  <msebor@redhat.com>
14275         PR c/85365
14276         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
14277         for null pointers.
14278         (gimple_fold_builtin_stxcpy_chk): Same.
14279         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
14281 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
14283         PR target/85456
14284         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
14285         __powikf2 when long double is IEEE 128-bit.
14287 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
14289         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
14290         step to make sure stack always aligned.
14292 2018-04-20  Carl Love  <cel@us.ibm.com>
14294         PR target/83402
14295         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
14296         size check for arg0.
14298 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
14299             Tom de Vries  <tom@codesourcery.com>
14301         PR target/85445
14302         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
14303         Emit insns for calls too.
14304         (nvptx_find_par): Always look for worker-level predecessor insn.
14305         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
14306         calls.
14307         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
14308         (nvptx_process_pars): Propagate frames for calls.
14310 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
14312         PR target/85469
14313         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
14314         Removed.
14315         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
14316         (ix86_handle_option): Don't handle OPT_mibt.
14317         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
14318         __SHSTK__.
14319         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
14320         has_ibt and ibt.
14321         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
14322         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
14323         (ix86_target_macros): Define __CET__ with flag_cf_protection
14324         for -fcf-protection.
14325         * config/i386/i386.c (isa2_opts): Remove -mibt.
14326         * config/i386/i386.h (TARGET_IBT): Removed.
14327         (TARGET_IBT_P): Likewise.
14328         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
14329         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
14330         * config/i386/i386.opt (mcet): Update help message.
14331         (mshstk): Likewise.
14332         (mibt): Removed.
14333         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
14334         -mcet as an alias for -mshstk.
14336 2018-04-20  Richard Biener <rguenther@suse.de>
14338         PR middle-end/85475
14339         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
14340         complexity by forcing a single use of the multiply operand.
14342 2018-04-20  Martin Jambor  <mjambor@suse.cz>
14344         ipa/85449
14345         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
14346         recursion dependency to only apply to non-clones.
14348 2018-04-20  Martin Jambor  <mjambor@suse.cz>
14350         ipa/85447
14351         * ipa-cp.c (create_specialized_node): Check that clones of
14352         self-recursive edges exist during IPA-CP.
14354 2018-04-19  Toon Moene  <toon@moene.org>
14356         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
14357         by -O3.
14359 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
14361         PR tree-optimization/85467
14362         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
14363         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
14364         VECTOR_CST element to type.
14366 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
14368         PR target/85397
14369         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
14370         * config/i386/i386.md (builtin_setjmp_setup): Removed.
14371         (builtin_longjmp): Likewise.
14372         (save_stack_nonlocal): New pattern.
14373         (restore_stack_nonlocal): Likewise.
14375 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
14377         PR target/85404
14378         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14379         Replace ASM_OUTPUT_LABEL with fprintf.
14381 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
14383         PR target/85417
14384         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14385         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
14386         * config/i386/i386-c.c (ix86_target_macros_internal): Also
14387         define __IBT__ and __SHSTK__ for -fcf-protection.
14388         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
14389         TARGET_IBT.
14390         (ix86_trampoline_init): Likewise.
14391         (x86_output_mi_thunk): Likewise.
14392         (ix86_notrack_prefixed_insn_p): Likewise.
14393         (ix86_option_override_internal): Don't disallow -fcf-protection.
14394         * config/i386/i386.md (rdssp<mode>): Also enable for
14395         -fcf-protection.
14396         (incssp<mode>): Likewise.
14397         (nop_endbr): Likewise.
14398         * config/i386/i386.opt (mcet): Change help message to built-in
14399         functions only.
14400         (mibt): Likewise.
14401         (mshstk): Likewise.
14402         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
14403         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
14404         enable CET built-in functions.
14406 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
14408         * common/config/i386/i386-common.c
14409         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
14410         OPTION_MASK_ISA_MOVDIRI_UNSET,
14411         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
14412         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
14413         * config.gcc (movdirintrin.h): New header.
14414         * config/i386/cpuid.h (bit_MOVDIRI,
14415         bit_MOVDIR64B): New bits.
14416         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
14417         and -mmvodir64b.
14418         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
14419         (VOID, PVOID, PCVOID)): New function types.
14420         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
14421         __builtin_ia32_directstoreu_u64,
14422         __builtin_ia32_movdir64b): New builtins.
14423         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
14424         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
14425         and -mmovdiri.
14426         (ix86_valid_target_attribute_inner_p): Ditto.
14427         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
14428         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
14429         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
14430         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
14431         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
14432         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
14433         (movdiri<mode>, movdir64b_<mode>): New.
14434         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
14435         * config/i386/immintrin.h: Include movdirintrin.h.
14436         * config/i386/movdirintrin.h: New file.
14437         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
14439 2018-04-19  Richard Biener  <rguenther@suse.de>
14441         PR middle-end/85455
14442         * cfg.c (clear_bb_flags): When loop state says we have
14443         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
14445 2018-04-19  Richard Biener  <rguenther@suse.de>
14447         PR tree-optimization/84737
14448         * tree-vect-data-refs.c (vect_copy_ref_info): New function
14449         copying restrict info.
14450         (vect_setup_realignment): Use it.
14451         * tree-vectorizer.h (vect_copy_ref_info): Declare.
14452         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
14453         the first DR to all generated stores.
14454         (vectorizable_load): Likewise for loads.
14456 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
14458         PR tree-optimization/85446
14459         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
14460         the integral and pointer types to have the same precision.
14462         * doc/install.texi: Document --disable-cet being the default and
14463         --enable-cet=auto.
14465 2018-04-18  Martin Liska  <mliska@suse.cz>
14467         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
14468         style.
14470 2018-04-18  Martin Liska  <mliska@suse.cz>
14472         Revert
14473         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
14475         PR ipa/83983
14476         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
14477         arguments if they are comparable.
14479 2018-04-18  Martin Liska  <mliska@suse.cz>
14481         Revert
14482         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
14484         PR lto/84805
14485         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
14486         incomplete types.
14488 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
14490         PR target/85388
14491         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
14492         ENDBR after calling __morestack.
14494 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
14496         PR jit/85384
14497         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
14498         by using gcc_base_ver to generate a gcc_driver_version, and use
14499         it when generating GCC_DRIVER_NAME.
14500         * configure: Regenerate.
14502 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
14504         PR target/81084
14505         * config.gcc: Obsolete powerpc*-*-*spe*.
14507 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
14509         PR debug/84637
14510         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
14511         (stabstr_D): Change type of unum from unsigned int to
14512         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
14513         type.
14515 2018-04-17  Jim Wilson  <jimw@sifive.com>
14517         PR 84856
14518         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
14519         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
14520         Set arg_pointer_offset after using pretend_args_size.
14522 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
14524         PR rtl-optimization/85431
14525         * dse.c (record_store): Ignore zero width stores.
14527         PR sanitizer/85230
14528         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
14529         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
14530         __builtin_stack_restore rather than after it.
14531         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
14532         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
14533         argument instead of virtual_dynamic_stack_rtx.
14535 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14537         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
14538         New prototype.
14539         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
14540         Add note to error message to explain internal mapping of overloaded
14541         built-in function name to non-overloaded built-in function name.
14542         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
14543         function.
14545 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
14547         PR target/85424
14548         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
14549         where the inputs overlap with the output.
14551 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
14553         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
14554         (=v, v) alternative and explicit "memory" attribute.
14555         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
14556         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14557         attributes.
14558         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
14559         "sselog1" type instead of "sselog".
14560         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
14561         "sselog".  Remove explicit "memory" attribute.
14562         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
14563         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14564         attributes.
14565         (vec_extract_hi_v32hi): Merge all alternatives into one, use
14566         "sselog1" type instead of "sselog".  Remove explicit "memory"
14567         attribute.
14568         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
14569         use "sselog1" type instead of "sselog".  Remove explicit "memory"
14570         attribute.
14571         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
14572         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14573         attributes.
14574         (vec_extract_hi_v64qi): Merge all alternatives into one, use
14575         "sselog1" type instead of "sselog".  Remove explicit "memory"
14576         attribute.
14577         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
14578         use "sselog1" type instead of "sselog".  Remove explicit "memory"
14579         attribute.
14581         PR target/85430
14582         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
14584         PR middle-end/85414
14585         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
14586         on a SUBREG.
14588 2018-04-17  Martin Jambor  <mjambor@suse.cz>
14590         PR ipa/85421
14591         * ipa-cp.c (create_specialized_node): Call
14592         expand_all_artificial_thunks if necessary.
14594 2018-04-17  Martin Liska  <mliska@suse.cz>
14596         PR lto/85405
14597         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
14598         in message, remote space in between '_G' and '('.
14600 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
14602         PR target/85281
14603         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
14604         avx512f_vmcmp<mode>3<round_saeonly_name>,
14605         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
14606         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
14607         avx512f_rndscale<mode><round_saeonly_name>,
14608         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
14609         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
14610         Use %<iptr>2 instead of %2 for -masm=intel.
14611         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
14612         avx512f_vcvttss2usi<round_saeonly_name>,
14613         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
14614         -masm=intel.
14615         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
14616         avx512f_vcvttsd2usi<round_saeonly_name>,
14617         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
14618         Use %q1 instead of %1 for -masm=intel.
14619         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
14620         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
14621         of %3 for -masm=intel.
14622         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
14623         -masm=intel.
14624         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
14625         -masm=intel.
14626         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
14627         -masm=intel.
14628         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
14629         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
14630         %g1.
14631         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
14632         -masm=intel.
14633         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
14634         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
14635         %g1 and one with %0 and %1.
14636         (avx512er_vmrcp28<mode><round_saeonly_name>,
14637         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
14638         %1 for -masm=intel.
14639         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
14640         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
14641         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
14642         of %0 and %{%4%} for -masm=intel.
14643         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
14644         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
14645         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
14646         order of %0 and %{%5%}%{z%} for -masm=intel.
14648 2018-04-17  Jan Hubicka  <jh@suse.cz>
14650         PR lto/85405
14651         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
14653 2018-04-17  Martin Liska  <mliska@suse.cz>
14655         PR ipa/85329
14656         * multiple_target.c (create_dispatcher_calls): Set apostrophes
14657         for target_clone error message.  Make default implementation
14658         clone to be a local declaration.
14659         (separate_attrs): Add new argument and check for an empty
14660         string.
14661         (expand_target_clones): Handle it.
14662         (ipa_target_clone): Make redirection just for target_clones
14663         functions.
14665 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
14666             Tom de Vries  <tom@codesourcery.com>
14668         PR middle-end/84955
14669         * omp-expand.c (expand_oacc_for): Add dummy false branch for
14670         tiled basic blocks without omp continue statements.
14672 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
14674         PR target/83660
14675         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
14676         vec_extract expression as having side effects to make sure it gets
14677         a cleanup point.
14679 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
14681         PR target/85403
14682         * config/i386/i386.c (get_builtin_code_for_version): Check
14683         error_mark_node.
14685 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
14687         PR target/84331
14688         * config.gcc: Support "skylake".
14689         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14690         PROCESSOR_SKYLAKE.
14691         * config/i386/i386.c (m_SKYLAKE): Define.
14692         (processor_target_table): Add "skylake".
14693         (ix86_option_override_internal): Add "skylake".
14694         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
14695         PROCESSOR_CANNONLAKE.
14696         (get_builtin_code_for_version): Fix priority for
14697         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
14698         PROCESSOR_SKYLAKE-AVX512.
14699         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
14700         (processor_type): Add PROCESSOR_SKYLAKE.
14702 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
14703             Jason Merrill  <jason@redhat.com>
14705         PR c++/85112
14706         * convert.c (convert_to_integer_1): Use direct recursion for
14707         enumeral types and types with a precision less than the number
14708         of bits in their mode.
14710 2018-04-16  Julia Koval  <julia.koval@intel.com>
14712         PR target/84413
14713         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
14714         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
14716 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
14718         PR target/85293
14719         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
14720         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
14721         and -mno-direct-move.
14723 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
14725         PR target/83402
14726         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
14727         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
14728         Ensure negative shifts result in {0}.
14730 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
14732         PR rtl-optimization/79916
14733         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
14734         regs (if any) to define how to gnerate SD moves when LRA is in
14735         progress.
14737 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
14739         PR rtl-optimization/85393
14740         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
14741         * except.c (expand_dw2_landing_pad_for_region): Make static.
14742         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
14743         a label and unconditional jump to old_bb, rather than
14744         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
14745         basic block.
14747         PR rtl-optimization/85376
14748         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
14749         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
14750         instead of a specific value.
14752 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
14753             Bin Cheng  <bin.cheng@arm.com>
14755         PR tree-optimization/82965
14756         PR tree-optimization/83991
14757         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
14758         by_profile_only parameter.
14759         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
14760         information if the loop was predicted to iterate too many times.
14761         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
14763 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
14765         PR lto/71991
14766         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
14767         always inline.
14769 2018-04-13  Martin Liska  <mliska@suse.cz>
14770             Jakub Jelinek  <jakub@redhat.com>
14772         PR middle-end/81657
14773         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
14774         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
14775         * builtins.c (expand_builtin_memory_copy_args): Use
14776         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
14777         handle dest_addr == pc_rtx.
14779 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
14781         PR target/85291
14782         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
14783         asked to not generate direct moves.
14784         (fix_trunc<mode>si2_stfiwx): Similar.
14785         (fix_trunc<mode>si2_internal): Similar.
14787 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
14789         PR debug/83157
14790         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
14791         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
14792         lookup if dest in some wider mode is known to be const0_rtx and
14793         if so, record permanent equivalence for it to be ZERO_EXTEND of
14794         the narrower mode destination.
14796 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
14798         * lto-streamer-out.c (output_function): Revert 259346.
14799         * omp-expand.c (expand_oacc_for): Likewise.
14801 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
14803         PR rtl-optimization/85354
14804         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
14805         * sel-sched.c (sel_global_init): ... here.
14807 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
14809         PR target/85238
14810         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
14811         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
14812         mode for PE-COFF targets.
14813         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
14814         (i386_pe_asm_lto_end): Likewise.
14815         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
14816         (TARGET_ASM_LTO_END): Likewise.
14817         * config/i386/winnt.c (saved_debug_info_level): New static variable.
14818         (i386_pe_asm_lto_start): New function.
14819         (i386_pe_asm_lto_end): Likewise.
14821 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
14822             Richard Biener  <rguenther@suse.de>
14824         PR middle-end/84955
14825         * lto-streamer-out.c (output_function): Fix CFG loop state before
14826         streaming out.
14827         * omp-expand.c (expand_oacc_for): Handle calls to internal
14828         functions like regular functions.
14830 2018-04-12  Richard Biener  <rguenther@suse.de>
14832         PR lto/85371
14833         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
14834         for the early LTO debug to properly generate references to it
14835         during DIE emission.  Do not re-use that for the skeleton for
14836         split-dwarf.
14837         (dwarf2out_early_finish): Likewise.
14839 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
14841         PR target/85328
14842         * config/i386/sse.md
14843         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
14844         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
14845         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
14846         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
14847         and output is a reg, avoid creating invalid lowpart subreg, but
14848         instead split into a 512-bit move.  Don't split if not AVX512VL,
14849         input is xmm16+ reg and output is a mem.
14850         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
14851         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
14852         xmm16+ reg and output is a mem.
14854 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
14856         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
14857         also for flag_dwarf2_cfi_asm.
14859 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
14861         PR rtl-optimization/85342
14862         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
14863         a bool scalar var inside of the loop instead.  Don't try to update
14864         recog_data.operand after failed apply_change_group.
14866 2018-04-12  Tom de Vries  <tom@codesourcery.com>
14868         PR target/85296
14869         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
14870         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
14871         array with flexible array member as array without given dimension.
14872         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
14873         argument for undefined param to true.
14875 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
14877         PR target/85321
14878         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14879         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
14880         from PowerPC section.
14881         * config/rs6000/sysv4.opt (mcall-): Improve help text.
14882         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
14883         help text that is too long.
14884         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
14885         help text that is too long.
14886         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
14887         help text that is too long.
14889 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
14891         * config/alpha/alpha.md (stack_probe_internal): Rename
14892         from "probe_stack".  Update all callers.
14894 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
14896         PR rtl-optimization/84566
14897         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
14898         sched_macro_fuse_insns.
14900 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
14902         PR target/84301
14903         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
14904         (compute_block_dependences): ... from here.
14906 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
14908         PR tree-optimization/85331
14909         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
14910         from int to HOST_WIDE_INT.
14912 2018-04-11  Martin Jambor  <mjambor@suse.cz>
14914         PR ipa/84149
14915         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
14916         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
14917         not the same as the source val.
14918         (cgraph_edge_brings_value_p): New parameter.
14919         (gather_edges_for_value): Pass destination value to
14920         cgraph_edge_brings_value_p.
14921         (perhaps_add_new_callers): Likewise.
14922         (get_info_about_necessary_edges): Likewise and exclude values brought
14923         only by self-recursive edges.
14924         (create_specialized_node): Redirect only clones of self-calling edges.
14925         (+self_recursive_pass_through_p): New function.
14926         (find_more_scalar_values_for_callers_subset): Use it.
14927         (find_aggregate_values_for_callers_subset): Likewise.
14928         (known_aggs_to_agg_replacement_list): Removed.
14929         (decide_whether_version_node): Re-calculate known constants for all
14930         remaining context clones.
14932 2018-04-11  Richard Biener  <rguenther@suse.de>
14934         PR lto/85339
14935         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
14936         from early DWARF output.
14937         (dwarf2out_early_finish): Output line info unconditionally into
14938         early DWARF and add reference to it.
14940 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
14942         PR target/85281
14943         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
14944         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
14945         other than V2DFmode using iptr mode attribute.
14946         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
14948 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
14950         PR rtl-optimization/84659
14951         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
14953 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
14955         PR debug/85302
14956         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
14957         SIZEP is NULL.
14958         (output_loc_list): Pass address of a dummy size variable even in the
14959         locview handling loop.
14960         (index_location_lists): Add comment on why skip_loc_list_entry can't
14961         call size_of_locs.
14963 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
14965         PR target/85261
14966         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
14967         into register.
14969 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
14971         PR target/85321
14972         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14973         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
14974         and -mstring-compare-inline-limit.
14976 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
14978         PR target/85287
14979         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
14980         for stack clash protection in a register whenever we need it to be in
14981         a register.
14983 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
14985         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
14986         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
14988 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
14990         PR target/85321
14991         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
14992         the help text.
14993         (mlong-double-): Ditto.
14994         * config/rs6000/sysv4.opt (msdata=): Ditto.
14995         (mtls-size=): Ditto.
14997 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14999         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
15000         erroneous entries for
15001         "vector int vec_ldl (int, long int *)", and
15002         "vector unsigned int vec_ldl (int, unsigned long int *)".
15003         Add comments and entries for
15004         "vector bool char vec_ldl (int, bool char *)",
15005         "vector bool short vec_ldl (int, bool short *)",
15006         "vector bool int vec_ldl (int, bool int *)",
15007         "vector bool long long vec_ldl (int, bool long long *)",
15008         "vector pixel vec_ldl (int, pixel *)",
15009         "vector long long vec_ldl (int, long long *)",
15010         "vector unsigned long long vec_ldl (int, unsigned long long *)".
15011         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
15012         type tree bool_long_long_type_node and correct definition of
15013         bool_V2DI_type_node to make reference to this new type tree.
15014         (rs6000_mangle_type): Replace erroneous reference to
15015         bool_long_type_node with bool_long_long_type_node.
15016         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
15017         comments to emphasize sign distinctions for char and int types and
15018         replace RS6000_BTI_bool_long constant with
15019         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
15020         use of RS6000_BTI_pixel.
15021         (bool_long_type_node): Remove this macro definition.
15022         (bool_long_long_type_node): New macro definition
15024 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
15026         PR rtl-optimization/85300
15027         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
15028         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
15029         simplify_unary_operation fails.
15031 2018-04-10  Martin Liska  <mliska@suse.cz>
15033         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
15034         cgraph_edge and ipa_ref.
15036 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
15038         PR target/85177
15039         PR target/85255
15040         * config/i386/sse.md
15041         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
15042         computation of the VEC_MERGE selector from mask.
15043         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
15044         Fix decoding of the VEC_MERGE selector into mask.
15046 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
15048         PR tree-optimization/85286
15049         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
15051 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
15053         * final.c (final_1): Set insn_last_address as well as
15054         insn_current_address.
15056 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15058         PR target/85173
15059         * explow.c (emit_stack_probe): Call validize_mem on memory location
15060         before passing it to gen_probe_stack.  Create address operand and
15061         legitimize it for the probe_stack_address case.
15063 2018-04-09  Jan Hubicka  <jh@suse.cz>
15065         PR lto/85078
15066         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
15067         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
15068         * tree.c (free_lang_data_in_type): Fix handling of binfos;
15069         walk basetypes.
15070         (free_lang_data): Rebuild type inheritance graph.
15072 2018-04-09  Martin Sebor  <msebor@redhat.com>
15074         * invoke.texi (-finline-small-functions): Mention other optimization
15075         options.
15076         (-findirect-inlining, -fpartial-inlining): Same.
15077         (-finline-functions-called-once): Same.
15078         (-freorder-blocks-and-partition): Same.
15080 2018-04-09  Jan Hubicka  <jh@suse.cz>
15082         PR rtl/84058
15083         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
15084         jumps; choose last target that matches the criteria (i.e.
15085         no partition changes for non-crossing jumps).
15086         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
15087         support for redirecting crossing jumps to non-crossing.
15089 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
15091         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
15092         also for naked functions.
15094 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
15096         * config/arc/arc.md (add_shift): New pattern.
15097         (add_shift2): Likewise.
15098         (sub_shift): Likewise.
15099         (sub_shift_cmp0_noout): Likewise.
15100         (compare_si_ashiftsi): Likewise.
15101         (xbfu_cmp0_noout): New combine pattern.
15102         (xbfu_cmp0"): Likewise.
15103         (movsi_set_cc_insn): Place the predicable variant first.
15104         (commutative_binary_cmp0_noout): Remove clobber.
15105         (commutative_binary_cmp0): New pattern.
15106         (noncommutative_binary_cmp0): Likewise.
15107         (noncommutative_binary_cmp0_noout): Likewise.
15108         (noncommutative_binary_comparison_result_used): Removed.
15109         (rsub_cmp0): New pattern.
15110         (rsub_cmp0_noout): Likewise.
15111         (extzvsi): Changed, keep only meaningful variants.
15112         (SQH, SEZ): New iterators.
15113         (SQH_postfix): New mode attribute.
15114         (SEZ_prefix): New code attribute.
15115         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
15116         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
15117         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
15118         of numerical value.
15119         (noncommutative_operator): Check the availability of barrel
15120         shifter option.
15122 2018-04-09  Richard Biener  <rguenther@suse.de>
15124         PR tree-optimization/85284
15125         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
15126         Only use the niter constraining form of simple_iv when the exit
15127         is always executed.
15129 2018-04-09  Tom de Vries  <tom@codesourcery.com>
15131         PR target/84041
15132         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
15133         (define_expand "*memory_barrier"): New define_expand.
15134         (define_insn "memory_barrier"): New insn.
15136 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
15138         PR rtl-optimization/80463
15139         PR rtl-optimization/83972
15140         PR rtl-optimization/83480
15142         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
15143         correct producer for the insn.
15144         (tidy_control_flow): Fixup seqnos in case of debug insns.
15146 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
15148         PR rtl-optimization/83913
15150         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
15151         different sched-times when merging exprs.
15153 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
15155         PR rtl-optimization/83962
15157         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
15158         tidy_fallthru_edge and tidy_control_flow.
15160 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
15162         PR rtl-optimization/83530
15164         * sel-sched.c (force_next_insn): New global variable.
15165         (remove_insn_for_debug): When force_next_insn is true, also leave only
15166         next insn in the ready list.
15167         (sel_sched_region): When the region wasn't scheduled, make another pass
15168         over it with force_next_insn set to 1.
15170 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
15172         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
15173         into tm_file.
15174         * config/nds32/constants.md (unspec_volatile_element): Add enum values
15175         for interrupt control.
15176         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15177         functions for interrupt control.
15178         * config/nds32/nds32-intrinsic.md: Likewise.
15179         * config/nds32/nds32_intrinsic.h: Likewise.
15180         * config/nds32/nds32.h (nds32_builtins): Likewise.
15182 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
15184         * config/nds32/nds32.c (nds32_init_machine_status,
15185         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
15186         strict_aligned_p field.
15187         (nds32_expand_to_rtl_hook): New function.
15188         (TARGET_EXPAND_TO_RTL_HOOK): Define.
15189         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
15191 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
15192             Chung-Ju Wu  <jasonwucj@gmail.com>
15194         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
15195         * config/nds32/nds32-n7.md: New file.
15196         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
15197         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
15198         pipeline.
15199         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
15200         * config/nds32/nds32.md (pipeline_model): Add n7.
15201         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
15202         * config/nds32/pipelines.md: Include n7 settings.
15204 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
15205             Chung-Ju Wu  <jasonwucj@gmail.com>
15207         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
15208         * config/nds32/nds32-e8.md: New file.
15209         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
15210         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
15211         pipeline.
15212         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
15213         * config/nds32/nds32.md (pipeline_model): Add e8.
15214         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
15215         * config/nds32/pipelines.md: Include e8 settings.
15217 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
15218             Chung-Ju Wu  <jasonwucj@gmail.com>
15220         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
15221         * config/nds32/nds32-n8.md: New file.
15222         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
15223         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
15224         pipeline.
15225         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
15226         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
15227         * config/nds32/nds32.md (pipeline_model): Add n8.
15228         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
15229         * config/nds32/pipelines.md: Include n8 settings.
15231 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
15232             Chung-Ju Wu  <jasonwucj@gmail.com>
15234         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
15235         * config/nds32/nds32-n9-2r1w.md: New file.
15236         * config/nds32/nds32-n9-3r2w.md: New file.
15237         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
15238         nds32_register_ports): New or modify for cpu n9.
15239         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
15240         pipeline.
15241         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
15242         * config/nds32/nds32-utils.c: New file.
15243         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
15244         TARGET_MUL_SLOW): Define.
15245         * config/nds32/nds32.md (pipeline_model): New attribute.
15246         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
15247         New options that support cpu n9.
15248         * config/nds32/pipelines.md: Include n9 settings.
15249         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
15251 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
15253         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
15254         information if necessary.
15255         (output_cond_branch_compare_zero): Likewise.
15256         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
15257         (nds32_target_alignment): Refine for alignment.
15258         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
15259         (FUNCTION_BOUNDARY): Modify.
15260         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
15261         align case.
15262         * config/nds32/nds32.opt (malways-align, malign-functions): New.
15264 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
15266         * config/nds32/constants.md (unspec_volatile_element): Add values for
15267         TLB operation and data prefetch.
15268         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15269         functions for TLB operation and data prefetch.
15270         * config/nds32/nds32-intrinsic.md: Likewise.
15271         * config/nds32/nds32_intrinsic.h: Likewise.
15272         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
15273         (nds32_print_operand): Likewise.
15274         * config/nds32/nds32.h (nds32_builtins): Likewise.
15276 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
15277         Andrew Pinski <pinsika@gcc.gnu.org>
15279         PR middle-end/82976
15280         * match.pd: Use constant_boolean_node of correct type instead of
15281         boolean_true_node or boolean_false_node for simplifying
15282         pointer comparisons to zero.
15284 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
15286         PR tree-optimization/80021
15287         * tree.c (verify_type_variant): Make error call in verify_variant_match
15288         translatable and remove final full stop.
15290 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
15292         * config/nds32/constants.md (unspec_volatile_element): Add
15293         UNSPEC_VOLATILE_EH_RETURN.
15294         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
15295         nds32_output_stack_pop): Support dwarf exception handling process.
15296         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
15297         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
15298         exception handling process.
15299         (nds32_compute_stack_frame): Likewise.
15300         (nds32_return_addr_rtx): Likewise.
15301         (nds32_initial_elimination_offset): Likewise.
15302         (nds32_expand_prologue): Likewise.
15303         (nds32_expand_epilogue): Likewise.
15304         (nds32_dynamic_chain_address): New function.
15305         * config/nds32/nds32.h (machine_function): Add fields for dwarf
15306         exception handling.
15307         (DYNAMIC_CHAIN_ADDRESS): Define.
15308         (EH_RETURN_DATA_REGNO): Define.
15309         (EH_RETURN_STACKADJ_RTX): Define.
15310         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
15311         patterns for dwarf exception handling.
15313 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
15315         * config/nds32/nds32.h: Clean up obsolete macros.
15317 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
15319         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15320         Add enum values for particular instructions.
15321         * config/nds32/nds32-intrinsic.c: Implementation of expanding
15322         particular intrinsic functions.
15323         * config/nds32/nds32-intrinsic.md: Likewise.
15324         * config/nds32/nds32_intrinsic.h: Likewise.
15325         * config/nds32/nds32.h (nds32_builtins): Likewise.
15326         * config/nds32/nds32.md (type): Add pbsad and pbsada.
15327         (btst, ave): New patterns for particular instructions.
15329 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
15331         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15332         Add enum values for atomic load/store and memory sync.
15333         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
15334         and memory sync.
15335         * config/nds32/nds32-intrinsic.md: Likewise.
15336         * config/nds32/nds32_intrinsic.h: Likewise.
15337         * config/nds32/nds32.h (nds32_builtins): Likewise.
15339 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
15341         PR tree-optimization/85257
15342         * fold-const.c (native_encode_vector): If not all elts could fit
15343         and off is -1, return 0 rather than offset.
15344         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
15345         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
15346         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
15347         adjust buffer in native_interpret_expr call.
15349 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
15351         * config/nds32/constants.md (unspec_volatile_element): Add cache
15352         control enum values.
15353         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
15354         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
15355         * config/nds32/nds32.c (nds32_cctl_names): New.
15356         (nds32_print_operand): Handle cache control register names.
15357         * config/nds32/nds32.h (nds32_builtins): New enum values.
15358         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
15359         macros.
15360         * config/nds32/nds32.md (type): Add mmu.
15361         * config/nds32/pipelines.md (simple_insn): Add mmu.
15363 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
15365         * config/nds32/nds32.md (type): Remove call.
15366         * config/nds32/pipelines.md (simple_insn): Likewise.
15368 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
15370         * config/nds32/constants.md (unspec_volatile_element): Add
15371         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
15372         UNSPEC_VOLATILE_FMFCFG.
15373         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
15374         description for fmfcfg and fmfcsr.
15375         (bdesc_1arg): Add fmtcsr.
15376         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
15377         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
15378         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
15379         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
15380         unspec_fmfcfg): New patterns.
15381         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
15382         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
15383         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
15384         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
15385         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
15386         __nds32__fmfcfg): Define.
15388 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
15390         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
15391         intrinsic register names.
15392         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
15393         intrinsic register enum values and macros.
15395 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
15397         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
15398         for load/store addressing form.
15399         (nds32_print_operand_address): Likewise.
15401 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
15403         PR target/85196
15404         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
15405         based on LABEL_REF.  Remove useless assertion.
15406         (pic_address_needs_scratch): Fix formatting.
15407         (sparc_legitimize_pic_address): Minor tweaks.
15408         (sparc_delegitimize_address): Adjust assertion accordingly.
15409         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
15410         into symbolic_operand.
15411         (movsi_high_pic_label_ref): Likewise.
15412         (movsi_lo_sum_pic_label_ref): Likewise.
15413         (movdi_pic_label_ref): Likewise.
15414         (movdi_high_pic_label_ref): Likewise.
15415         (movdi_lo_sum_pic_label_ref): Likewise.
15417 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
15419         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
15420         custom LIB_SPEC setup.
15422 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
15423             Kito Cheng  <kito.cheng@gmail.com>
15425         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
15426         * config/riscv/freebsd.h: New.
15428 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
15430         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
15431         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
15432         file.
15434 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
15435             Kito Cheng  <kito.cheng@gmail.com>
15437         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
15438         nds32_output_call, nds32_symbol_binds_local_p): New functions.
15439         * config/nds32/nds32-protos.h (nds32_output_call,
15440         nds32_output_return): Declare.
15441         * config/nds32/nds32.md: Refine all the call and return patterns.
15443 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
15445         PR debug/85252
15446         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
15447         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
15449         PR rtl-optimization/84872
15450         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
15451         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
15452         EDGE_CROSSING edge.
15454 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
15456         * expr.c (copy_blkmode_to_reg): Revert 254862.
15457         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
15459 2018-04-06  Richard Biener  <rguenther@suse.de>
15461         PR middle-end/85244
15462         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
15463         after seeing a component reference with an adjacent field.  Treat
15464         refs to arrays at struct end of external decls similar to
15465         refs to unconstrained commons.
15467 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
15469         PR sanitizer/85213
15470         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
15471         look through SAVE_EXPRs with non-side-effects argument.  Adjust
15472         recursive calls.
15473         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
15474         save_p here.
15476 2018-04-06  Richard Biener  <rguenther@suse.de>
15478         PR middle-end/85180
15479         * alias.c (find_base_term): New wrapper around find_base_term
15480         unwinding CSELIB_VAL_PTR changes.
15481         (find_base_term): Do not restore CSELIB_VAL_PTR during the
15482         recursion.
15484 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
15486         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
15487         instructions.
15488         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
15489         constant definitions.
15490         ("nop"): lr 0,0 -> nopr r0
15491         ("nop_lr0", "nop_lr1"): New insn definitions.
15493 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
15495         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
15496         NDS32_V3PUSH_AVAILABLE_P macro.
15498 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
15499             Chung-Ju Wu  <jasonwucj@gmail.com>
15501         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
15502         (nds32*-*-*): Add float and fpu_config into supported_defaults.
15503         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
15504         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
15505         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
15506         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
15507         * config/nds32/constraints.md: New constraints and checking for hard
15508         float configuration.
15509         * config/nds32/iterators.md: New mode iterator and attribute for hard
15510         float configuration.
15511         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
15512         patterns.
15513         * config/nds32/nds32-fpu.md: New file.
15514         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
15515         deal with hard float code generation.
15516         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
15517         ARCH_V3S.
15518         (abi_type, float_reg_number): New enum type.
15519         * config/nds32/nds32-predicates.c: New predicates for hard float.
15520         * config/nds32/nds32-protos.h: Declare functions for hard float.
15521         * config/nds32/nds32.c: Implementation for hard float configuration.
15522         * config/nds32/nds32.h: Definitions for hard float configuration.
15523         * config/nds32/nds32.md: Include hard float machine description and
15524         modify patterns for hard float configuration.
15525         * config/nds32/nds32.opt: New options for hard float configuration.
15526         * config/nds32/predicates.md: New predicates for hard float
15527         configuration.
15529 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
15531         * common/config/nds32/nds32-common.c
15532         (nds32_option_optimization_table): Enable -mreleax-hint by default.
15534 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
15536         PR middle-end/85195
15537         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
15538         CONSTRUCTOR_ELT (ctor, ...)->value.
15540 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
15542         PR target/85193
15543         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
15545 2018-04-05  Tom de Vries  <tom@codesourcery.com>
15547         PR target/85204
15548         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
15549         cond jump.
15551 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
15552             Kito Cheng  <kito.cheng@gmail.com>
15554         * config/nds32/constraints.md (U33): Fine-tune checking condition.
15555         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
15556         * config/nds32/nds32.h (nds32_16bit_address_type): Add
15557         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
15559 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
15560             Kito Cheng  <kito.cheng@gmail.com>
15562         * config/nds32/constraints.md (Ufe): New memory constraint.
15563         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
15564         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
15565         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
15566         operands.
15567         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
15568         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
15570 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15572         * config/nds32/nds32.md: Use optimize_size in the condition for
15573         alu-shift instructions.
15575 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15577         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
15579 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15581         * config/nds32/nds32.md (negsi2): Refine pattern.
15583 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
15584             Chung-Ju Wu  <jasonwucj@gmail.com>
15586         * config/nds32/iterators.md (shift_rotate): New code iterator.
15587         (shift): New code attribute.
15588         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
15589         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
15590         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
15591         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
15592         bit-wise operations.
15593         (andsi3, *andsi3): Ditto.
15594         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
15595         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
15596         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
15597         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
15598         nds32_ior_operand, nds32_xor_operand): New predicates.
15600 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15602         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
15603         (addsi3, subsi3): ... this.
15605 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15607         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
15609 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15611         * config/nds32/nds32.md: Adjust indention.
15613 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
15615         * config/nds32/nds32.md (feature): New attribute.
15617 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15619         * config/nds32/nds32.md (subtype): New attribute.
15621 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
15623         PR target/85203
15624         * config/arm/arm-builtins.c (arm_expand_builtin): Change
15625         expansion to perform a bitwise AND of the argument followed by a
15626         boolean negation of the result.
15628 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
15630         PR rtl-optimization/84878
15631         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
15632         the basic block.  Assert the use reference is not artificial and that
15633         it has an associated insn.
15635 2018-04-04  Michael Matz  <matz@suse.de>
15637         * builtins.c (compute_objsize): Pass correct operand
15638         to array_at_struct_end_p.
15640 2018-04-04  Richard Biener  <rguenther@suse.de>
15642         PR lto/85176
15643         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
15644         from contexts for DINFO_LEVEL_TERSE and below.
15646 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
15648         * config/nds32/nds32-doubleword.md (move_<mode>): Require
15649         resiter_operand condition.
15650         * config/nds32/nds32.md (*move<mode>): Ditto.
15652 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
15653             Monk Chiang  <sh.chiang04@gmail.com>
15655         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
15657 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
15659         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
15661 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
15662             Kito Cheng  <kito.cheng@gmail.com>
15664         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
15665         nds32_cond_code_str, output_cond_branch,
15666         output_cond_branch_compare_zero, nds32_expand_cbranch,
15667         nds32_expand_cstore, nds32_expand_movcc,
15668         nds32_output_cbranchsi4_equality_zero,
15669         nds32_output_cbranchsi4_equality_reg,
15670         nds32_output_cbranchsi4_equality_reg_or_const_int,
15671         nds32_output_cbranchsi4_greater_less_zero: New functions.
15672         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
15673         nds32_expand_cstore, nds32_expand_movcc,
15674         nds32_output_cbranchsi4_equality_zero,
15675         nds32_output_cbranchsi4_equality_reg,
15676         nds32_output_cbranchsi4_equality_reg_or_const_int,
15677         nds32_output_cbranchsi4_greater_less_zero): Declare.
15678         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
15679         nds32_rimm11s_operand): New predicates.
15680         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
15681         * config/nds32/nds32.md: Rewrite all the branch and conditional move
15682         patterns.
15684 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
15686         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
15687         * config/nds32/nds32.md: Ditto.
15688         * config/nds32/pipelines.md: Ditto.
15690 2018-04-04  Richard Biener  <rguenther@suse.de>
15692         PR tree-optimization/85168
15693         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
15694         propagating abnormals.
15696 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
15698         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
15700 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
15701             Kito Cheng  <kito.cheng@gmail.com>
15703         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
15704         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
15705         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
15706         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
15707         * config/nds32/nds32.md (sibcall_internal): New.
15708         (sibcall_register): Remove.
15709         (sibcall_immediate): Remove.
15710         (sibcall_value_internal): New.
15711         (sibcall_value_register): Remove.
15712         (sibcall_value_immediate): Remove.
15713         * config/nds32/predicates.md (nds32_general_register_operand): New.
15714         (nds32_call_address_operand): New.
15716 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
15718         PR rtl-optimization/85167
15719         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
15720         bb_defs if *split_p, instead preinitialize it to NULL.
15722         PR tree-optimization/85156
15723         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
15724         evaluating the argument multiple times.
15726 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
15728         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
15729         than vector.
15730         (_mm_cvtpd_ps): Likewise.
15731         (_mm_cvttpd_epi32): Likewise.
15732         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
15733         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
15734         vector, pixel, and bool following altivec.h include.
15736 2018-04-03  Martin Sebor  <msebor@redhat.com>
15738         * doc/extend.texi (Common Function Attributes): Clarify.
15739         (const attribute): Likewise.
15740         (pure attribute): Likewise.
15742 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
15744         PR target/85169
15745         * config/i386/i386.c (ix86_expand_vector_set): Use
15746         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
15748 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
15750         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
15751         instructions when changing rounding bits to preserve precision bits
15752         in the x87 control word.
15754 2018-04-03  Martin Liska  <mliska@suse.cz>
15756         PR tree-optimization/82491
15757         * rtl.h (strip_offset_and_add): Replace += suboffset with
15758         poly_uint64 () + suboffset.
15760 2018-03-29  Martin Liska  <mliska@suse.cz>
15761             Martin Jambor  <mjambor@suse.cz>
15763         PR ipa/84947
15764         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
15765         param_type is not an integral or pointer type.
15767 2018-04-03  Richard Biener  <rguenther@suse.de>
15769         * sese.h (recompute_all_dominators): Remove.
15771 2018-04-02  Martin Sebor  <msebor@redhat.com>
15773         * doc/invoke.texi (-Wrestrict): Fix typos.
15775 2018-04-02  Jim Wilson  <jimw@sifive.com>
15777         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
15778         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
15779         (<optab>di3, <optab>si3_extend): Likewise.
15780         (<optab>si3_mask, <optab>si3_mask_1): New.
15781         (<optab>di3_mask, <optab>di3_mask_1): New.
15782         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
15783         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
15784         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
15786 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
15788         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
15789         example.
15791 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
15793         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
15794         (nds32_canonicalize_comparison): New function.
15796 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
15797             Kito Cheng  <kito.cheng@gmail.com>
15798             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
15800         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
15801         * config/nds32/constants.md (unspec_volatile_element): Add
15802         UNSPEC_VOLATILE_RELAX_GROUP.
15803         * config/nds32/nds32-relax-opt.c: New file.
15804         * config/nds32/nds32-predicates.c
15805         (nds32_symbol_load_store_p): New function.
15806         * config/nds32/nds32-protos.h
15807         (nds32_symbol_load_store_p): Declare function.
15808         (make_pass_nds32_relax_opt): Declare new rtl pass function.
15809         * config/nds32/nds32.c
15810         (nds32_register_pass): New function to register pass.
15811         (nds32_register_passes): New function to register passes.
15812         * config/nds32/nds32.md (relax_group): New pattern.
15813         * config/nds32/nds32.opt (mrelax-hint): New option.
15814         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
15816 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
15818         * config/nds32/t-nds32: Modify files dependency.
15820 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
15822         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
15823         (PROFILE_HOOK): Define its implementation.
15825 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
15827         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
15828         type and 32-bit size.
15830 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
15832         PR middle-end/85090
15833         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
15834         (V_128_256): New mode iterator.
15835         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
15836         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
15837         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
15838         of V.
15839         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
15840         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
15842 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
15844         PR target/83315
15845         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
15846         NaN inputs correctly.
15848 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
15850         PR target/80546
15851         * config/rs6000/vsx.md (??r): New mode attribute.
15852         (*vsx_mov<mode>_64bit): Use it.
15853         (*vsx_mov<mode>_32bit): Likewise.
15855 2018-03-30  Martin Sebor  <msebor@redhat.com>
15857         PR tree-optimization/84818
15858         * builtins.c (check_access): Use warning_n.
15860 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
15862         PR target/83822
15863         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
15864         condition.
15865         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
15866         condition.
15868 2018-03-30  Julia Koval  <julia.koval@intel.com>
15870         PR target/84413
15871         * x86-tune.def (movx, partial_reg_dependency): Enable for
15872         m_SKYLAKE_AVX512.
15874 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
15876         PR inline-asm/84985
15877         * lra-constraints.c (process_alt_operands): Move setting
15878         this_alternative_matches below.
15880 2018-03-29  Martin Liska  <mliska@suse.cz>
15882         PR lto/84995.
15883         * doc/invoke.texi: Document how LTO works with debug info.
15884         Describe auto-load support of binutils.  Mention 'x86-64'
15885         as valid option value of -march option.
15887 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
15889         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
15891         PR c/85094
15892         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
15893         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
15894         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
15895         checking.
15897 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
15899         PR target/84912
15900         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
15901         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
15902         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
15903         for RS6000_BTM_POWERPC64.
15904         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
15905         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
15906         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
15907         definition.
15908         (DIVDE): Use it.
15909         (DIVDEU): Likewise.
15911 2018-03-28  Carl Love  <cel@us.ibm.com>
15913         Revert
15914         2017-09-27  Carl Love  <cel@us.ibm.com>
15916         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
15917         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
15918         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
15919         fctiw instruction.
15921 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15923         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
15924         instead of __vector bool.
15925         (_mm_max_pu8): Likewise.
15926         (_mm_min_pi16): Likewise.
15928 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
15930         PR target/84912
15931         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
15932         (DIVWEUO): Likewise.
15933         (DIVDEO): Likewise.
15934         (DIVDEUO): Likewise.
15935         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
15936         DIVWEUO and DIVDEUO.
15937         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
15938         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
15939         (div_extend): Likewise.
15940         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
15941         builtin function.
15942         (__builtin_divweuo): Likewise.
15943         (__builtin_divdeo): Likewise.
15944         (__builtin_divdeuo): Likewise.
15946 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
15948         PR target/85095
15949         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
15950         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
15952         PR tree-optimization/82004
15953         * gimple-match-head.c (optimize_pow_to_exp): New function.
15954         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
15955         Don't fold to exp if optimize_pow_to_exp is false.
15957 2018-03-28  Martin Liska  <mliska@suse.cz>
15959         PR other/84819
15960         * calls.c (initialize_argument_information): Fix trailing space.
15961         * common.opt: Fix typo and provide better explanation for
15962         -fsanitize-coverage option.
15963         * config/i386/i386.opt: Fix typo.
15965 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
15966             Martin Liska  <mliska@suse.cz>
15968         PR sanitizer/85081
15969         * gimplify.c (asan_poison_variable): Don't do the check for
15970         gimplify_omp_ctxp here.
15971         (gimplify_decl_expr): Do it here.
15972         (gimplify_target_expr): Likewise.
15974 2018-03-28  Martin Liska  <mliska@suse.cz>
15976         PR target/84988
15977         * config/i386/i386.c (ix86_function_arg_advance): Do not call
15978         chkp_type_bounds_count if MPX is not enabled.
15980 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
15982         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
15984 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
15986         PR target/84914
15987         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
15988         function to create the function decl for complex long double
15989         multiply and divide for -mabi=ieeelongdouble.
15990         (init_float128_ieee): Call it.
15992 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
15994         PR target/85044
15995         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
15996         -fcf-protection=branch -mibt.
15997         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
15999 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
16001         PR target/81863
16002         * config/arm/arm.c (arm_valid_symbolic_address): Handle
16003         arm_word_relocations.
16005 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
16007         PR target/85056
16008         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
16009         extern array declarations.
16011 2018-03-27  Richard Biener  <rguenther@suse.de>
16013         PR middle-end/84067
16014         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
16015         explicit single_use checks.
16017 2018-03-27  Richard Biener  <rguenther@suse.de>
16019         PR tree-optimization/85082
16020         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
16021         Valueize the VUSE.
16023 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
16025         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
16026         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
16027         Turn on fasynchronous-unwind-tables and funwind-tables.
16029 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
16031         PR target/85073
16032         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
16033         (*bmi_blsr_<mode>_ccz): Ditto.
16035 2018-03-26  Tom de Vries  <tom@codesourcery.com>
16037         PR tree-optimization/85063
16038         * omp-general.c (offloading_function_p): New function.  Factor out
16039         of ...
16040         * omp-offload.c (pass_omp_target_link::gate): ... here.
16041         * omp-general.h (offloading_function_p): Declare.
16042         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
16043         with attribute omp declare target for offloading functions.
16045 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
16047         PR tree-optimization/84005
16048         * tree-data-ref.h (get_base_for_alignment): Declare.
16049         * tree-data-ref.c (get_base_for_alignment_1): New function.
16050         (get_base_for_alignment): Likewise.
16051         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
16052         get_base_for_alignment to find a suitable base object, instead
16053         of always using drb->base_address.
16055 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
16057         PR inline-asm/85022
16058         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
16059         known size by default.
16061 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
16063         PR inline-asm/85030
16064         * lra-constraints.c (process_alt_operands): Don't match BLKmode
16065         and non BLKmode operands.
16067 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16069         PR target/85026
16070         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
16071         Clean up attributes.
16073 2018-03-23  Richard Biener  <rguenther@suse.de>
16075         PR debug/85020
16076         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
16077         we are going to emit early debug for LTO.
16079 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
16081         PR inline-asm/85034
16082         * function.c (match_asm_constraints_1): Don't optimize if input
16083         doesn't satisfy general_operand predicate for output's mode.
16085         PR inline-asm/85022
16086         * alias.c (write_dependence_p): Don't require for x_canonicalized
16087         non-VOIDmode if x has VOIDmode.
16089         PR sanitizer/85029
16090         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
16091         just don't try to optimize it rather than assert it never happens.
16093 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16095         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
16096         macro expansions for definition of ST_INTERNAL_<mode> and
16097         LD_INTERNAL_<mode> builtins.
16098         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
16099         Remove prototype.
16100         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
16101         function.
16102         (altivec_expand_st_builtin): Likewise.
16103         (altivec_expand_builtin): Remove calls to deleted functions.
16104         (rs6000_address_for_altivec): Delete this function.
16105         * config/rs6000/vector.md: Remove expands for
16106         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
16108 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
16110         PR target/84826
16111         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
16112         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
16113         re-computing once computed.
16114         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
16115         (arm_init_machine_status): Initialize
16116         machine->static_chain_stack_bytes.
16118 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16120         PR target/84760
16121         * doc/extend.texi: Add four new prototypes for vec_ld.
16122         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
16123         definitions for more logical presentation.
16124         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
16125         entries for V1TI variants of __builtin_altivec_ld builtin.
16126         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
16127         handling of V1TI variant of LVX icode pattern.
16128         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
16129         (rs6000_gimple_fold_builtin): Likewise.
16130         (altivec_init_builtins): Add code to define
16131         __builtin_altivec_lvx_v1ti function.
16133 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
16135         PR inline-asm/84941
16136         * function.c (match_asm_constraints_1): Don't do the optimization
16137         if input isn't a REG, SUBREG, MEM or constant.
16139 2018-03-22  Tom de Vries  <tom@codesourcery.com>
16141         PR tree-optimization/84956
16142         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
16143         bb_has_abnormal_pred.
16145 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
16147         PR sanitizer/85018
16148         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
16149         DECL_INITIAL (decl) to decl at the end.
16150         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
16151         adjust the comment.
16153 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
16155         * doc/extend.texi (__builtin_tgmath): Document when complex
16156         integer types are treated as _Complex _Float64.
16158 2018-03-21  Tom de Vries  <tom@codesourcery.com>
16160         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
16162 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
16164         PR tree-optimization/84960
16165         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
16166         if it is ENTRY block, move them into single succ of ENTRY in that case.
16168 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
16170         PR tree-optimization/84811
16171         * poly-int.h (poly_span_traits): Remove the T3 parameter and
16172         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
16173         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
16174         (known_subrange_p): Update accordingly.  Cast each value involved
16175         in the size comparison, rather than casting the result of the
16176         subtraction.
16178 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
16180         PR tree-optimization/84982
16181         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
16182         by flipping the least significant bit rather than all bits from
16183         bitpos to bitpos + bitsize - 1.
16185 2018-03-21  Nathan Sidwell  <nathan@acm.org>
16187         * doc/extend.texi (Deprecated Features): Remove mention of
16188         long-deleted deprecations.
16190 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16192         PR jit/84288
16193         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
16194         * configure: Regenerate.
16196 2018-03-21  Tom de Vries  <tom@codesourcery.com>
16198         PR tree-optimization/83126
16199         * tree-parloops.c (num_phis): New function.
16200         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
16202 2018-03-21  Nathan Sidwell  <nathan@acm.org>
16204         * doc/extend.texi (Deprecated Features): Update deprecated flags,
16205         mention anon-struct/union members and trailing attributes.
16207 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
16209         PR tree-optimization/84969
16210         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
16211         builtin memset partitions if they set different rhs values.
16213 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
16215         PR rtl-optimization/84989
16216         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
16217         VEC_DUPLICATE with scalar result mode.
16219 2018-03-21  Martin Liska  <mliska@suse.cz>
16221         PR ipa/84963
16222         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
16223         not intended return statement.
16225 2018-03-21  Martin Liska  <mliska@suse.cz>
16227         PR target/84988
16228         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
16229         (chkp_find_bound_slots_1): Limit number of iterations.
16231 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
16233         PR target/84838
16234         * Minor grammar fixes for x86 options.
16236 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
16238         PR debug/84875
16239         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
16240         holding REG_CFA_RESTORE notes, instead turn them into a USE.
16242 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
16244         PR target/83789
16245         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
16246         (altivec_lvx_<mode>_1op): Likewise.
16247         (altivec_stvx_<mode>_2op): Likewise.
16248         (altivec_stvx_<mode>_1op): Likewise.
16249         (altivec_lvx_<VM2:mode>): New define_expand.
16250         (altivec_stvx_<VM2:mode>): Likewise.
16251         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
16252         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16253         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
16254         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16255         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
16256         (rs6000_gen_lvx): Likewise.
16257         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
16258         (altivec_expand_stv_builtin): Likewise.
16259         (altivec_expand_builtin): Likewise.
16260         * config/rs6000/vector.md: Likewise.
16262 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16264         PR target/82518
16265         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
16266         BYTES_BIG_ENDIAN.
16268 2018-03-20  Richard Biener  <rguenther@suse.de>
16270         PR target/84986
16271         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
16272         sign-conversions as zero, fall back to standard scalar_stmt
16273         cost for the rest.
16275 2018-03-20  Martin Liska  <mliska@suse.cz>
16277         PR ipa/84825
16278         * predict.c (rebuild_frequencies): Handle case when we have
16279         PROFILE_ABSENT, but flag_guess_branch_prob is false.
16281 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
16283         PR target/84990
16284         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
16285         flag_section_anchors.
16286         * varasm.c (use_blocks_for_decl_p): Remove hack for
16287         dw2_force_const_mem.
16289         PR target/84845
16290         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
16291         to ...
16292         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
16293         be created, use lowpart_subreg of operands[0] rather than operands[0]
16294         itself.
16295         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
16296         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
16297         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
16298         and n constraint instead of aarch64_shift_imm_di and Usd.
16299         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
16300         (*aarch64_<optab>_reg_minus<mode>3): ... this.
16302 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
16304         PR target/82989
16305         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
16306         to favor GPR over NEON registers.
16307         (<shift>di3_neon): Likewise.
16309 2018-03-20  Tom de Vries  <tom@codesourcery.com>
16311         PR target/84952
16312         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
16313         (nvptx_process_pars): Emit bar.sync asap and alap.
16315 2018-03-20  Tom de Vries  <tom@codesourcery.com>
16317         PR target/84954
16318         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
16319         seen_label if seen_label is already set.
16321 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
16323         PR target/84945
16324         * config/i386/i386.c (fold_builtin_cpu): For features above 31
16325         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
16326         Use 1U instead of 1.  Formatting fixes.
16328         PR c/84953
16329         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
16330         instead of TREE_TYPE (s1) for the return value.
16332 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
16334         PR tree-optimization/84946
16335         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
16336         bitsize + bitsize in poly_uint64 rather than poly_int64.
16338         PR sanitizer/78651
16339         * dwarf2asm.c: Include fold-const.c.
16340         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
16341         of decl rather than decl itself.
16343         PR rtl-optimization/84643
16344         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
16346 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
16348         PR sanitizer/78651
16349         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
16350         calling assemble_variable.
16352 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
16354         PR target/81647
16355         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
16356         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
16358 2018-03-19  Jim Wilson  <jimw@sifive.com>
16360         PR bootstrap/84856
16361         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
16362         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
16363         (riscv_first_stack_step): Likewise.
16364         (riscv_option_override): Use STACK_BOUNDARY instead of
16365         MIN_STACK_BOUNDARY.
16366         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
16367         MIN_STACK_BOUNDARY.
16368         (BIGGEST_ALIGNMENT): Set to 128.
16369         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
16370         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
16371         STACK_BOUNDARY.
16373 2018-03-19  Richard Biener  <rguenther@suse.de>
16375         PR tree-optimization/84933
16376         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
16377         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
16379 2018-03-19  Richard Biener  <rguenther@suse.de>
16381         PR tree-optimization/84859
16382         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
16383         (cond_if_else_store_replacement): Perform sinking operation on
16384         single-store BBs regardless of MAX_STORES_TO_SINK setting.
16385         Generalize what a BB with a single eligible store is.
16387 2018-03-19  Richard Biener  <rguenther@suse.de>
16389         PR tree-optimization/84929
16390         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
16391         chrec_is_positive against non-chrec arg.
16393 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
16395         PR target/84711
16396         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
16398 2018-03-18  Martin Liska  <mliska@suse.cz>
16400         PR rtl-optimization/84635
16401         * regrename.c (build_def_use): Use matches_mode only when
16402         matches >= 0.
16404 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
16406         PR tree-optimization/84913
16407         * tree-vect-loop.c (vectorizable_reduction): Don't try to
16408         vectorize chains of COND_EXPRs.
16410 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
16412         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
16414 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
16416         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
16418 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
16420         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
16422 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
16423             Kito Cheng  <kito.cheng@gmail.com>
16425         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
16426         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
16427         (nds32_adjust_reg_alloc_order): New function.
16428         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
16430 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
16432         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
16433         nds32_print_operand, nds32_print_operand_address): Use
16434         HOST_WIDE_INT_PRINT_DEC instead.
16436 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
16438         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
16440 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
16442         PR target/84902
16443         * config/i386/i386.c (initial_ix86_tune_features,
16444         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
16445         unsigned long long.
16446         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
16447         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
16448         rather than 1u << ix86_tune.  Formatting fix.
16449         (ix86_option_override_internal): Change ix86_arch_mask from
16450         unsigned int to unsigned HOST_WIDE_INT, initialize to
16451         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
16452         (ix86_function_specific_restore): Likewise.
16454 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
16456         PR target/84899
16457         * postreload.c (reload_combine_recognize_pattern): Perform
16458         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
16459         truncate_int_for_mode the result for the destination's mode.
16461         PR c/84909
16462         * hsa-gen.c (mem_type_for_type): Fix comment typo.
16463         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
16464         Likewise.
16465         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16466         Likewise.
16468 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
16470         PR target/84876
16471         * lra-assigns.c (lra_split_hard_reg_for): Don't use
16472         regno_allocno_class_array and sorted_pseudos.
16473         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
16474         insns where regno is used.
16476 2018-03-16  Martin Liska  <mliska@suse.cz>
16478         PR ipa/84833
16479         * multiple_target.c (create_dispatcher_calls): Redirect
16480         reference in the symbol table.
16482 2018-03-16  Martin Liska  <mliska@suse.cz>
16484         PR ipa/84722
16485         * multiple_target.c (create_dispatcher_calls): Redirect also
16486         an alias.
16488 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
16490         PR c++/79937
16491         PR c++/82410
16492         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
16493         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
16494         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
16496 2018-03-16  Julia Koval  <julia.koval@intel.com>
16498         * doc/invoke.texi (Skylake Server): Add CLWB.
16499         Cannonlake): Remove CLWB.
16501 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
16503         PR tree-optimization/84841
16504         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
16505         1 << 3.
16506         (FLOAT_ONE_CONST_TYPE): Define.
16507         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
16508         (sort_by_operand_rank): Put entries with higher constant_type last
16509         rather than first to match comments.
16511 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
16513         * config/nios2/nios2.md (movsi_internal): Fix thinko in
16514         split predicate.
16516 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
16518         PR c++/79085
16519         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
16520         check and use address of target always.
16522 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
16524         PR target/84574
16525         * config/i386/i386.c (indirect_thunk_needed): Update comments.
16526         (indirect_thunk_bnd_needed): Likewise.
16527         (indirect_thunks_used): Likewise.
16528         (indirect_thunks_bnd_used): Likewise.
16529         (indirect_return_needed): New.
16530         (indirect_return_bnd_needed): Likewise.
16531         (output_indirect_thunk_function): Add a bool argument for
16532         function return.
16533         (output_indirect_thunk_function): Don't generate alias for
16534         function return thunk.
16535         (ix86_code_end): Call output_indirect_thunk_function to generate
16536         function return thunks.
16537         (ix86_output_function_return): Set indirect_return_bnd_needed
16538         and indirect_return_needed instead of indirect_thunk_bnd_needed
16539         and indirect_thunk_needed.
16541 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
16543         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
16544         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
16545         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
16547 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
16548             Paul Hua <paul.hua.gm@gmail.com>
16550         PR c/84852
16551         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
16553 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
16555         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
16556         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
16557         resp. SFmode cases.
16559 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
16561         PR target/84711
16562         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
16563         instead of GET_MODE_SIZE when comparing Units.
16565 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
16567         PR target/68256
16568         * varasm.c (hash_section): Return an unchangeble hash value
16569         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
16570         Return !aarch64_can_use_per_function_literal_pools_p ().
16572 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
16574         PR target/84860
16575         * optabs.c (emit_conditional_move): Pass address of cmode's copy
16576         rather than address of cmode as last argument to prepare_cmp_insn.
16578 2018-03-15  Julia Koval  <julia.koval@intel.com>
16580         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
16581         F_AVX512VNNI, F_AVX512BITALG): New.
16583 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
16585         PR target/83451
16586         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
16587         insn for floating-point loads and stores.
16589 2018-03-14  Carl Love  <cel@us.ibm.com>
16591         * config/rs6000/rs6000-c.c: Add macro definitions for
16592         ALTIVEC_BUILTIN_VEC_PERMXOR.
16593         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
16594         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
16595         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
16596         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
16597         UNSPEC_VPERMXOR.
16598         * config/doc/extend.texi: Add prototypes for vec_permxor.
16600 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
16602         PR c/84852
16603         * diagnostic-show-locus.c (class layout_point): Convert m_line
16604         from int to linenum_type.
16605         (line_span::comparator): Use linenum "compare" function when
16606         comparing line numbers.
16607         (test_line_span): New function.
16608         (layout_range::contains_point): Convert param "row" from int to
16609         linenum_type.
16610         (layout_range::intersects_line_p): Likewise.
16611         (layout::will_show_line_p): Likewise.
16612         (layout::print_source_line): Likewise.
16613         (layout::should_print_annotation_line_p): Likewise.
16614         (layout::print_annotation_line): Likewise.
16615         (layout::print_leading_fixits): Likewise.
16616         (layout::annotation_line_showed_range_p): Likewise.
16617         (struct line_corrections): Likewise for field m_row.
16618         (line_corrections::line_corrections): Likewise for param "row".
16619         (layout::print_trailing_fixits): Likewise.
16620         (layout::get_state_at_point): Likewise.
16621         (layout::get_x_bound_for_row): Likewise.
16622         (layout::print_line): Likewise.
16623         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
16624         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
16625         * input.c (selftest::test_linenum_comparisons): New function.
16626         (selftest::input_c_tests): Call it.
16627         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
16628         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
16629         * selftest.h (ASSERT_GT): New macro.
16630         (ASSERT_GT_AT): New macro.
16631         (ASSERT_LT): New macro.
16632         (ASSERT_LT_AT): New macro.
16634 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
16636         PR rtl-optimization/84780
16637         * combine.c (distribute_links): Don't make a link based on pc_rtx.
16639 2018-03-14  Martin Liska  <mliska@suse.cz>
16641         * tree.c (record_node_allocation_statistics): Use
16642         get_stats_node_kind.
16643         (get_stats_node_kind): New function extracted from
16644         record_node_allocation_statistics.
16645         (free_node): Use get_stats_node_kind.
16647 2018-03-14  Richard Biener  <rguenther@suse.de>
16649         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
16650         that the value-set of ANTIC_IN doesn't grow.
16652         Revert
16653         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16654         member.
16655         (BB_VISITED_WITH_VISITED_SUCCS): New define.
16656         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16658 2018-03-14  Julia Koval  <julia.koval@intel.com>
16660         * config.gcc (icelake-client, icelake-server): New.
16661         (icelake): Remove.
16662         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
16663         (initial_ix86_arch_features): Ditto.
16664         (PTA_SKYLAKE): Add SGX.
16665         (PTA_ICELAKE): Remove.
16666         (PTA_ICELAKE_CLIENT): New.
16667         (PTA_ICELAKE_SERVER): New.
16668         (ix86_option_override_internal): Split up icelake on icelake client and
16669         icelake server.
16670         (get_builtin_code_for_version): Ditto.
16671         (fold_builtin_cpu): Ditto.
16672         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
16673         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
16674         * config/i386/i386.h (processor_type): Ditto.
16675         * doc/invoke.texi: Ditto.
16677 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
16679         PR sanitizer/83392
16680         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
16681         INTEGER_CST offset, add it together with bitpos / 8 and
16682         sign extend based on POINTER_SIZE.
16684         PR target/84844
16685         Revert
16686         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
16688         PR target/78090
16689         * config/i386/constraints.md (Yc): New register constraint.
16690         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
16691         Use Yc constraint for alternative 2 of operand 0.  Remove
16692         preferred_for_speed attribute.
16694 2018-03-14  Richard Biener  <rguenther@suse.de>
16696         PR tree-optimization/84830
16697         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
16698         with the old one to avoid oscillations.
16700 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
16702         PR target/83712
16703         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
16704         pseudos.
16705         (assign_by_spills): Return a flag of reload assignment failure.
16706         Do not process the reload assignment failures.  Do not spill other
16707         reload pseudos if they has the same reg class.  Update n if
16708         necessary.
16709         (lra_assign): Add a return arg.  Set up from the result of
16710         assign_by_spills call.
16711         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16712         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
16713         usage_insns if it is not NULL.
16714         (spill_hard_reg_in_range): New function.
16715         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16716         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16717         function prototypes.
16718         (lra_assign): Change prototype.
16719         * lra.c (lra): Add code to deal with fails by splitting hard reg
16720         live ranges.
16722 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
16724         * config/riscv/riscv.opt (mrelax): New option.
16725         * config/riscv/riscv.c (riscv_file_start): Emit ".option
16726         "norelax" when riscv_mrelax is disabled.
16727         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
16729 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
16731         PR target/84743
16732         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
16733         reassociation for int modes.
16735 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
16737         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
16738         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
16739         for big-endian.
16740         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
16741         * config/aarch64/aarch64-sve.md
16742         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
16743         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
16744         (*extend<mode><Vwide>2): Rename to...
16745         (aarch64_sve_extend<mode><Vwide>2): ...this.
16746         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
16747         renaming the old pattern to...
16748         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
16749         unsigned packs.
16750         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
16751         define_expand, renaming the old pattern to...
16752         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
16753         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
16754         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
16755         account when deciding which SVE instruction the optab should use.
16756         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
16758 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
16760         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
16761         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
16762         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
16763         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
16764         (tlsdesc_small_<mode>): Turn a define_expand and use
16765         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
16766         (tlsdesc_small_advsimd_<mode>): ...this.
16767         (tlsdesc_small_sve_<mode>): New pattern.
16769 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
16771         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
16772         (UNSPEC_UMUL_HIGHPART): New constants.
16773         (MUL_HIGHPART): New int iteraor.
16774         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
16775         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
16776         define_expand.
16777         (*<su>mul<mode>3_highpart): New define_insn.
16779 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
16781         PR lto/84805
16782         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
16783         incomplete types.
16785 2018-03-13  Martin Liska  <mliska@suse.cz>
16787         PR ipa/84658.
16788         * (sem_item_optimizer::sem_item_optimizer): Initialize new
16789         vector.
16790         (sem_item_optimizer::~sem_item_optimizer): Release it.
16791         (sem_item_optimizer::merge_classes): Register variable aliases.
16792         (sem_item_optimizer::fixup_pt_set): New function.
16793         (sem_item_optimizer::fixup_points_to_sets): Likewise.
16794         * ipa-icf.h: Declare new variables and functions.
16796 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
16798         PR middle-end/84834
16799         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
16800         integer_pow2p@2 and test integer_pow2p in condition.
16801         (A < 0 ? C : 0): Similarly for @1.
16803         PR middle-end/84831
16804         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
16805         characters starting at p contain '\0' character, don't look beyond
16806         that.
16808         PR target/84827
16809         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
16810         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
16812         PR target/84828
16813         * reg-stack.c (change_stack): Change update_end var from int to
16814         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
16815         also call set_block_for_insn on the newly added insns and rescan.
16817         PR target/84786
16818         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
16819         on the last operand.
16821         PR c++/84704
16822         * tree.c (stabilize_reference_1): Return save_expr (e) for
16823         STATEMENT_LIST even if it doesn't have side-effects.
16825 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
16827         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
16829 2018-03-12  Renlin Li  <renlin.li@arm.com>
16831         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
16832         aarch64_output_scalar_simd_mov_immediate.
16834 2018-03-12  Martin Sebor  <msebor@redhat.com>
16836         PR tree-optimization/83456
16837         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
16838         for perfectly overlapping calls to memcpy.
16839         (gimple_fold_builtin_memory_chk): Same.
16840         (gimple_fold_builtin_strcpy): Handle no-warning.
16841         (gimple_fold_builtin_stxcpy_chk): Same.
16842         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
16844 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
16846         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
16847         parameter.  Use it for SFmode.
16848         (rs6000_function_arg_advance_1): Adjust.
16849         (rs6000_function_arg): Adjust.
16850         (rs6000_gimplify_va_arg): Pass false for that new parameter.
16852 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
16854         PR rtl-optimization/84169
16855         PR rtl-optimization/84780
16856         * combine.c (can_combine_p): Check for a 2-insn combination whether
16857         the destination register is used between the two insns, too.
16859 2018-03-12  Richard Biener  <rguenther@suse.de>
16861         PR tree-optimization/84803
16862         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
16863         for refs DR analysis didn't process.
16865 2018-03-12  Richard Biener  <rguenther@suse.de>
16867         PR tree-optimization/84777
16868         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
16869         force-vectorize loops ignore whether we are optimizing for size.
16871 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
16873         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
16874         (TARGET_MD_ASM_ADJUST): Define.
16876 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
16877             Kito Cheng  <kito.cheng@gmail.com>
16878             Chung-Ju Wu  <jasonwucj@gmail.com>
16880         * config/nds32/nds32.c (nds32_compute_stack_frame,
16881         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
16882         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
16883         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
16884         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
16885         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
16886         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
16887         * config/nds32/nds32.md (prologue, epilogue): Use macro
16888         NDS32_V3PUSH_AVAILABLE_P to do checking.
16890 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
16892         PR debug/58150
16893         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
16894         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
16895         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
16896         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
16897         addition of most attributes on !orig_type_die or the attribute not
16898         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
16900 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
16901             Chung-Ju Wu  <jasonwucj@gmail.com>
16903         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
16904         __NDS32_VH__ macro.
16905         * config/nds32/nds32.opt (mvh): New option.
16907 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
16908             Chung-Ju Wu  <jasonwucj@gmail.com>
16910         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
16911         function.
16912         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
16913         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
16914         definition.
16916 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
16917             Chung-Ju Wu  <jasonwucj@gmail.com>
16919         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
16920         function.
16921         * config/nds32/nds32-multiple.md (strlensi): New pattern.
16922         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
16924 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
16925             Kito Cheng  <kito.cheng@gmail.com>
16926             Chung-Ju Wu  <jasonwucj@gmail.com>
16928         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
16929         UNSPEC_FFMISM and UNSPEC_FLMISM.
16930         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
16931         for ffb, ffmism and flmism.
16932         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
16933         (unspec_ffmism): Ditto.
16934         (unspec_flmism): Ditto.
16935         (nds32_expand_builtin_impl): Check if string extension is available.
16936         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
16937         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
16939 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
16941         Reverting patch:
16942         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
16944         PR target/83712
16945         * lra-assigns.c (assign_by_spills): Return a flag of reload
16946         assignment failure.  Do not process the reload assignment
16947         failures.  Do not spill other reload pseudos if they has the same
16948         reg class.
16949         (lra_assign): Add a return arg.  Set up from the result of
16950         assign_by_spills call.
16951         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16952         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
16953         usage_insns if it is not NULL.
16954         (spill_hard_reg_in_range): New function.
16955         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16956         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16957         function prototypes.
16958         (lra_assign): Change prototype.
16959         * lra.c (lra): Add code to deal with fails by splitting hard reg
16960         live ranges.
16962 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
16964         PR target/84807
16965         * config/i386/i386.opt: Replace Enforcment with Enforcement.
16967 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
16969         PR debug/84620
16970         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
16971         (dw_val_node): Add val_symbolic_view.
16972         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
16973         (symview_upper_bound): New.
16974         (new_line_info_table): Initialize symviews_since_reset.
16975         (dwarf2out_source_line): Count symviews_since_reset and set
16976         symview_upper_bound.
16977         (dw_val_equal_p): Handle symview.
16978         (add_AT_symview): New.
16979         (print_dw_val): Handle symview.
16980         (attr_checksum, attr_checksum_ordered): Likewise.
16981         (same_dw_val_p, size_of_die): Likewise.
16982         (value_format, output_die): Likewise.
16983         (add_high_low_attributes): Use add_AT_symview for entry_view.
16984         (dwarf2out_finish): Reset symview_upper_bound, clear
16985         zero_view_p.
16987 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
16989         PR target/83969
16990         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
16991         Add strict argument and use it.
16992         (rs6000_split_multireg_move): Update for new strict argument.
16993         (mem_operand_gpr): Disallow all non-offsettable addresses.
16994         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
16996 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
16998         PR target/84772
16999         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
17000         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
17001         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
17003         PR c++/84767
17004         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
17005         decl, use remap_type if we want to use the type.
17007 2018-03-09  Martin Sebor  <msebor@redhat.com>
17009         PR tree-optimization/84526
17010         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
17011         Remove dead code.
17012         (builtin_access::generic_overlap): Be prepared to handle non-array
17013         base objects.
17015 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
17017         PR rtl-optimization/84682
17018         * lra-constraints.c (process_address_1): Check is_address flag
17019         for address constraints.
17020         (process_alt_operands): Likewise.
17021         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
17022         preprocess_constraints.
17023         * recog.h (preprocess_constraints): Add oploc parameter.
17024         Adjust callers.
17025         * recog.c (preprocess_constraints): Test address_operand for
17026         CT_ADDRESS constraints.
17028 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
17030         PR target/83712
17031         * lra-assigns.c (assign_by_spills): Return a flag of reload
17032         assignment failure.  Do not process the reload assignment
17033         failures.  Do not spill other reload pseudos if they has the same
17034         reg class.
17035         (lra_assign): Add a return arg.  Set up from the result of
17036         assign_by_spills call.
17037         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17038         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
17039         usage_insns if it is not NULL.
17040         (spill_hard_reg_in_range): New function.
17041         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17042         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17043         function prototypes.
17044         (lra_assign): Change prototype.
17045         * lra.c (lra): Add code to deal with fails by splitting hard reg
17046         live ranges.
17048 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17050         PR target/83193
17051         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
17052         Accept complain bool parameter.  Only emit errors if it is true.
17053         (arm_parse_cpu_option_name): Likewise.
17054         (arm_target_thumb_only): Adjust callers of the above.
17055         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
17056         prototype to take a default true bool parameter.
17057         (arm_parse_arch_option_name): Likewise.
17059 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
17060             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
17062         PR jit/64089
17063         PR jit/84288
17064         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
17065         * configure: Regenerate.
17066         * configure.ac ("linker --version-script option"): New.
17067         ("linker soname option"): New.
17069 2018-03-09  Richard Biener  <rguenther@suse.de>
17071         PR tree-optimization/84775
17072         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
17073         immediate uses of predicate stmts and mark them modified.
17075         Revert
17076         PR tree-optimization/84178
17077         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17078         to caller.
17079         (version_loop_for_if_conversion): Delay update_ssa call.
17080         (tree_if_conversion): Delay update_ssa until after predicate
17081         insertion.
17083 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
17085         PR target/84763
17086         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
17087         when the function accesses prior frames.
17089 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
17091         PR debug/84456
17092         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
17093         gen_llsym, otherwise call maybe_gen_llsym.
17095         PR inline-asm/84742
17096         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
17097         has ',' character inside of it.
17099 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17101         PR target/84748
17102         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
17103         as clobbering CC_REGNUM.
17105 2018-03-08  Richard Biener  <rguenther@suse.de>
17107         PR middle-end/84552
17108         * tree-scalar-evolution.c: Include tree-into-ssa.h.
17109         (follow_copies_to_constant): Do not follow SSA names registered
17110         for update.
17112 2018-03-08  Richard Biener  <rguenther@suse.de>
17114         PR tree-optimization/84178
17115         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17116         to caller.
17117         (version_loop_for_if_conversion): Delay update_ssa call.
17118         (tree_if_conversion): Delay update_ssa until after predicate
17119         insertion.
17121 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
17123         PR tree-optimization/84178
17124         * tree-if-conv.c (release_bb_predicate): Remove the
17125         the assertion that the stmts have NULL use_ops.
17126         Discard the statements, asserting that they haven't
17127         yet been added to a BB.
17129 2018-03-08  Richard Biener  <rguenther@suse.de>
17131         PR tree-optimization/84746
17132         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
17133         (phi_translate): Pass in destination ANTIC_OUT set.
17134         (phi_translate_1): Likewise.  For a simplified result lookup
17135         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
17136         (phi_translate_set): Adjust.
17137         (do_pre_regular_insertion): Likewise.
17138         (do_pre_partial_partial_insertion): Likewise.
17140 2018-03-08  Martin Liska  <mliska@suse.cz>
17142         PR gcov-profile/84735
17143         * doc/gcov.texi: Document usage of profile files.
17144         * gcov-io.h: Document changes in the format.
17146 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
17148         PR debug/84404
17149         PR debug/84408
17150         * dwarf2out.c (struct dw_line_info_table): Update comments for
17151         view == -1.
17152         (FORCE_RESET_NEXT_VIEW): New.
17153         (FORCE_RESETTING_VIEW_P): New.
17154         (RESETTING_VIEW_P): Check for -1 too.
17155         (ZERO_VIEW_P): Likewise.
17156         (new_line_info_table): Force-reset next view.
17157         (dwarf2out_begin_function): Likewise.
17158         (dwarf2out_source_line): Simplify zero_view_p initialization.
17159         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
17160         view directly.  Omit view when omitting .loc at line 0.
17162 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
17164         PR tree-optimization/84740
17165         * tree-switch-conversion.c (process_switch): Call build_constructors
17166         only if info.phi_count is non-zero.
17168         PR tree-optimization/84739
17169         * tree-tailcall.c (find_tail_calls): Check call arguments against
17170         DECL_ARGUMENTS (current_function_decl) rather than
17171         DECL_ARGUMENTS (func) when checking for tail recursion.
17173 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
17175         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
17176         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
17177         Volker Reichelt's entry and add entries for people that perform
17178         GCC fuzzy testing and report numerous bugs.
17180 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
17182         PR target/82411
17183         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
17184         readonly data in sdata, if that is disabled.
17185         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
17186         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
17187         -mreadonly-in-sdata option.
17189 2018-03-07  Martin Sebor  <msebor@redhat.com>
17191         PR tree-optimization/84468
17192         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
17193         basic block when looking for nul assignment.
17195 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
17197         PR target/84277
17198         * except.h (output_function_exception_table): Adjust prototype.
17199         * except.c (output_function_exception_table): Remove FNNAME parameter
17200         and add SECTION parameter.  Ouput one part of the table at a time.
17201         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
17202         the first part of the exception table and emit unwind directives.
17203         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
17204         (i386_pe_seh_cold_init): Likewise.
17205         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
17206         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
17207         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
17208         (ix86_output_call_insn): Emit a nop in one more case for SEH.
17209         * config/i386/winnt.c: Include except.h.
17210         (struct seh_frame_state): Add reg_offset, after_prologue and
17211         in_cold_section fields.
17212         (i386_pe_seh_end_prologue): Set seh->after_prologue.
17213         (i386_pe_seh_cold_init): New function.
17214         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
17215         to seh->in_cold_section.
17216         (seh_emit_push): Record the offset of the push.
17217         (seh_emit_save): Record the offet of the save.
17218         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
17219         Test seh->after_prologue to disregard the epilogue.
17220         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
17221         (i386_pe_end_cold_function): New function.
17223 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
17225         PR fortran/84565
17226         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
17227         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
17229         PR c++/84704
17230         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
17231         on tmp_var.
17232         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
17233         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
17235         PR middle-end/84723
17236         * multiple_target.c: Include tree-inline.h and intl.h.
17237         (expand_target_clones): Diagnose and fail if node->definition and
17238         !tree_versionable_function_p (node->decl).
17240 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
17242         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
17243         sprint_ul.
17244         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
17245         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
17246         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
17248 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
17250         PR target/84710
17251         * combine.c (try_combine): Use reg_or_subregno instead of handling
17252         just paradoxical SUBREGs and REGs.
17254 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
17256         * config/arc/arc.c (arc_finalize_pic): Remove function.
17257         (arc_must_save_register): We use single base PIC register, remove
17258         checks to save/restore the PIC register.
17259         (arc_expand_prologue): Likewise.
17260         * config/arc/arc-protos.h (arc_set_default_type_attributes):
17261         Remove.
17262         (arc_verify_short): Likewise.
17263         (arc_attr_type): Likewise.
17264         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
17265         (walk_stores): Likewise.
17266         (arc_address_cost): Make it static.
17267         (arc_verify_short): Likewise.
17268         (branch_dest): Likewise.
17269         (arc_attr_type): Likewise.
17270         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
17271         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
17272         (arc_final_prescan_insn): Remove inserting the nops due to
17273         hardware hazards.  It is done in reorg step.
17274         (insn_length_variant_t): Remove.
17275         (insn_length_parameters_t): Likewise.
17276         (arc_insn_length_parameters): Likewise.
17277         (arc_get_insn_variants): Likewise.
17278         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
17280 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
17282         PR inline-asm/84683
17283         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
17284         assertion failure.
17286         PR tree-optimization/84687
17287         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
17288         on new_node->decl.
17289         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
17291 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17293         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
17294         Rename to ppc_speculation_barrier.
17295         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
17296         __builtin_ppc_speculation_barrier.
17298 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
17300         PR target/84700
17301         * combine.c (combine_simplify_rtx): Don't try to simplify if
17302         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
17303         are equal to x.
17305 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
17307         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
17308         to 32 bytes when compiling for POWER9.
17310 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
17312         PR target/84564
17313         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
17314         regparm >= 3 with no arg reg available also for calls with
17315         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
17317         PR target/84524
17318         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
17319         orig,vex.
17320         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
17322 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
17324         PR target/84264
17325         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
17327 2018-03-05  Richard Biener  <rguenther@suse.de>
17329         PR tree-optimization/84486
17330         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
17331         When inserting a __builtin_assume_aligned call set the LHS
17332         SSA name alignment info accordingly.
17334 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
17336         PR tree-optimization/84114
17337         * config/aarch64/aarch64.c (aarch64_reassociation_width)
17338         Avoid reassociation of FLOAT_MODE addition.
17340 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
17342         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
17343         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
17344         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
17345         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
17346         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
17347         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
17348         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
17349         and -mwbnoinvd.
17350         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
17351         __builtin_ia32_wbinvd): New builtins.
17352         (SPECIAL_ARGS2): New.
17353         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
17354         (SPECIAL_ARGS2): New.
17355         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
17356         (ix86_valid_target_attribute_inner_p): Ditto.
17357         (ix86_init_mmx_sse_builtins): Add special_args2.
17358         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
17359         TARGET_WBNOINVD_P): New.
17360         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
17361         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
17362         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
17363         * config/i386/immintrin.h (_wbinvd): New intrinsic.
17364         * config/i386/pconfigintrin.h: New file.
17365         * config/i386/wbnoinvdintrin.h: Ditto.
17366         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
17367         wbnoinvdintrin.h.
17368         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
17370 2018-03-05  Richard Biener  <rguenther@suse.de>
17372         PR tree-optimization/84670
17373         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
17374         member.
17375         (BB_VISITED_WITH_VISITED_SUCCS): New define.
17376         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
17377         (compute_antic_aux): Only assert the number of values in ANTIC_IN
17378         doesn't grow if all successors (recursively) were visited at least
17379         once.
17381 2018-03-05  Richard Biener  <rguenther@suse.de>
17383         PR tree-optimization/84650
17384         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
17385         if executed in the loop pipeline.
17387 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
17389         * doc/configfiles.texi (Configuration Files): Move info about
17390         conditionalizing $target-protos.h to...
17391         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
17392         differs from $target-protos.h.
17394 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
17395             Chung-Ju Wu  <jasonwucj@gmail.com>
17397         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
17398         * config/nds32/nds32-multiple.md (setmemsi): Define.
17399         * config/nds32/nds32-memory-manipulation.c
17400         (nds32_gen_dup_4_byte_to_word_value): New.
17401         (emit_setmem_word_loop): New.
17402         (emit_setmem_byte_loop): New.
17403         (nds32_expand_setmem_loop): New.
17404         (nds32_expand_setmem_loop_v3m): New.
17405         (nds32_expand_setmem_unroll): New.
17406         (nds32_expand_setmem): New.
17408 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
17409             Chung-Ju Wu  <jasonwucj@gmail.com>
17411         * config/nds32/nds32-memory-manipulation.c
17412         (nds32_emit_load_store): New.
17413         (nds32_emit_post_inc_load_store): New.
17414         (nds32_emit_mem_move): New.
17415         (nds32_emit_mem_move_block): New.
17416         (nds32_expand_movmemsi_loop_unknown_size): New.
17417         (nds32_expand_movmemsi_loop_known_size): New.
17418         (nds32_expand_movmemsi_loop): New.
17419         (nds32_expand_movmemsi_unroll): New.
17420         (nds32_expand_movmemqi): Rename ...
17421         (nds32_expand_movmemsi): ... to this.
17422         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
17423         (movmemsi): ... to this.
17424         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
17425         (nds32_expand_movmemsi): ... to this.
17427 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
17428             Monk Chiang  <sh.chiang04@gmail.com>
17429             Chung-Ju Wu  <jasonwucj@gmail.com>
17431         * config/nds32/nds32-protos.h
17432         (nds32_expand_load_multiple): New arguments.
17433         (nds32_expand_store_multiple): Ditto.
17434         (nds32_valid_multiple_load_store): Rename ...
17435         (nds32_valid_multiple_load_store_p): ... to this.
17436         * config/nds32/nds32-memory-manipulation.c
17437         (nds32_expand_load_multiple): Refine implementation.
17438         (nds32_expand_store_multiple): Ditto.
17439         * config/nds32/nds32-multiple.md
17440         (load_multiple): Update nds32_expand_load_multiple interface.
17441         (store_multiple): Update nds32_expand_store_multiple interface.
17442         * config/nds32/nds32-predicates.c
17443         (nds32_valid_multiple_load_store): Rename ...
17444         (nds32_valid_multiple_load_store_p): ... to this and refine
17445         implementation.
17446         * config/nds32/predicates.md
17447         (nds32_load_multiple_and_update_address_operation): New predicate.
17448         (nds32_store_multiple_and_update_address_operation): New predicate.
17450 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
17451             Chung-Ju Wu  <jasonwucj@gmail.com>
17453         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
17454         (combo): New attribute.
17455         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
17457 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
17459         * config/nds32/nds32.opt: Change -mcmodel= default value.
17461 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
17462             Monk Chiang  <sh.chiang04@gmail.com>
17463             Chung-Ju Wu  <jasonwucj@gmail.com>
17465         * config/nds32/constants.md (unspec_element): New enum.
17466         * config/nds32/constraints.md (Umw): New constraint.
17467         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
17468         * config/nds32/nds32-intrinsic.md: Likewise.
17469         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
17470         (nds32_valid_smw_lwm_base_p): New.
17471         (nds32_output_smw_single_word): New.
17472         (nds32_output_lmw_single_word): New.
17473         (nds32_expand_unaligned_load): New.
17474         (nds32_expand_unaligned_store): New.
17475         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
17476         (nds32_output_smw_single_word): Declare.
17477         (nds32_output_lmw_single_word): Declare.
17478         (nds32_expand_unaligned_load): Declare.
17479         (nds32_expand_unaligned_store): Declare.
17480         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
17481         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
17482         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
17483         NDS32_BUILTIN_UASTORE_DW.
17484         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
17485         predicate.
17487 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
17488             Kito Cheng  <kito.cheng@gmail.com>
17489             Chung-Ju Wu  <jasonwucj@gmail.com>
17491         * config/nds32/nds32-intrinsic.c
17492         (nds32_expand_builtin_null_ftype_reg): Delete.
17493         (nds32_expand_builtin_reg_ftype_imm): Ditto.
17494         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
17495         (nds32_read_argument): New.
17496         (nds32_legitimize_target): Ditto.
17497         (nds32_legitimize_argument): Ditto.
17498         (nds32_check_constant_argument): Ditto.
17499         (nds32_expand_unop_builtin): Ditto.
17500         (nds32_expand_unopimm_builtin): Ditto.
17501         (nds32_expand_binop_builtin): Ditto.
17502         (nds32_builtin_decl_impl): Ditto.
17503         (builtin_description): Ditto.
17504         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
17505         (nds32_init_builtins_impl): Ditto.
17506         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
17507         (nds32_builtin_decl): New.
17508         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
17509         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
17511 2018-03-02  Jeff Law  <law@redhat.com>
17513         * reorg.c (stop_search_p): Handle DEBUG_INSN.
17514         (redundant_insn, fill_simple_delay_slots): Likewise.
17515         (fill_slots_from_thread): Likewise.
17516         * resource.c (mark_referenced_resources): Likewise.
17517         (mark_set_resources, find_dead_or_set_registers): Likewise.
17519 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
17521         * substring-locations.h (format_warning_va): Formatting fix for
17522         ATTRIBUTE_GCC_DIAG.
17523         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
17524         argument.
17525         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
17526         * substring-locations.c: Include intl.h.
17527         (format_warning_va): Turned into small wrapper around
17528         format_warning_n_va, renamed to ...
17529         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
17530         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
17531         use ngettext.
17532         (format_warning_at_substring_n): New function.
17533         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
17534         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
17535         format_warning_at_substring with just a shorter name instead of
17536         const function pointer.
17537         (fmtwarn_n): New function.
17538         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
17539         appropriate, get rid of all the fmtstr temporaries, move conditionals
17540         with G_() wrapped string literals directly into fmtwarn arguments,
17541         cast dir.len to (int), formatting fixes.
17543 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
17545         * doc/invoke.texi: Remove "Cilk Plus" references.
17547 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
17548             Richard Biener  <rguenther@suse.de>
17550         PR ipa/84628
17551         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
17552         for error or warning attributes if CALL_FROM_THUNK_P is set.
17553         Formatting fixes.
17555 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
17557         PR target/56540
17558         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
17559         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
17561         PR target/56540
17562         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
17563         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
17565         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
17566         instead of -1U in last predictors element's probability member.
17568 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
17570         PR ipa/83983
17571         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
17572         arguments if they are comparable.
17574 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
17576         PR tree-optimization/84634
17577         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
17578         masks and masked_loop_p with a single loop_masks, making sure it's
17579         null for bb vectorization.
17581 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
17583         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
17584         (vect_analyze_data_ref_access): Use loop->safe_len rather than
17585         loop->force_vectorize to check whether there is no alias.
17587 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
17589         PR target/84614
17590         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
17591         prototypes.
17592         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
17593         comments.
17594         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
17595         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
17596         instead of a loop around prev_real_insn.
17597         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
17598         prev_real_insn.
17600         PR inline-asm/84625
17601         * config/i386/i386.c (ix86_print_operand): Use conditional
17602         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
17603         zero vector.
17605 2018-03-02  Richard Biener  <rguenther@suse.de>
17607         PR tree-optimization/84427
17608         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
17609         (bitmap_set_subtract_values): Rewrite to handle multiple
17610         exprs per value.
17611         (clean): Likewise.
17612         (prune_clobbered_mems): Likewise.
17613         (phi_translate): Take edge instead of pred/phiblock.
17614         (phi_translate_1): Likewise.
17615         (phi_translate_set): Likewise.  Insert all translated
17616         exprs for a value into the set, keeping possibly multiple
17617         expressions per value.
17618         (compute_antic_aux): Adjust for phi_translate changes.
17619         When intersecting union the expressions and prune those
17620         not in the final value set, keeping possibly multiple
17621         expressions per value.  Do not use value-insertion
17622         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
17623         all expressions.  Add verification that the value-sets
17624         only shrink during iteration.
17625         (compute_partial_antic_aux): Adjust for the phi_translate changes.
17626         (do_pre_regular_insertion): Likewise.
17627         (do_pre_partial_partial_insertion): Likewise.
17629 2018-03-02  Richard Biener  <rguenther@suse.de>
17631         PR target/82005
17632         * config/darwin.c (saved_debug_info_level): New static global.
17633         (darwin_asm_lto_start): Disable debug info generation for LTO out.
17634         (darwin_asm_lto_end): Restore debug info generation settings.
17636 2018-03-01  Martin Liska  <mliska@suse.cz>
17638         PR sanitizer/82484
17639         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
17640         volatile arguments.
17642 2018-03-01  Richard Biener  <rguenther@suse.de>
17644         PR debug/84645
17645         * dwarf2out.c (gen_variable_die): Properly handle late VLA
17646         type annotation with LTO when debug was disabled at compile-time.
17648 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
17650         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
17651         XINT with INTVAL.
17652         (mips_final_postscan_insn): Likewise.
17654 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
17656         PR rtl-optimization/84528
17657         * alias.c (init_alias_target): Add commentary.
17658         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
17659         a unique base value if the frame pointer is not eliminated
17660         to the stack pointer.
17662 2018-03-01  Tom de Vries  <tom@codesourcery.com>
17664         PR rtl-optimization/83327
17665         * lra-int.h (hard_regs_spilled_into): Declare.
17666         * lra.c (hard_regs_spilled_into): Define.
17667         (init_reg_info): Init hard_regs_spilled_into.
17668         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
17669         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
17670         (process_bb_lives): Handle hard_regs_spilled_into.
17671         (lra_create_live_ranges_1): Before doing liveness propagation, clear
17672         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
17674 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
17676         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
17677         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
17678         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
17679         * config/rs6000/aix72.h: New file.
17681 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
17683         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
17684         instead of warning_at with conditional singular and plural messages
17685         where possible.
17687         PR target/52991
17688         * stor-layout.c (update_alignment_for_field): For
17689         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
17690         && !DECL_PACKED (field), do the alignment update, just use
17691         only desired_align instead of MAX (type_align, desired_align)
17692         as the alignment.
17693         (place_field): Don't do known_align < desired_align handling
17694         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
17695         is non-NULL, instead do it after rli->prev_field handling and
17696         only if not within a bitfield word.  For DECL_PACKED (field)
17697         use type_align of BITS_PER_UNIT.
17699 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
17701         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
17702         superfluous parentheses and trailing spaces.
17704 2018-02-28  Richard Biener  <rguenther@suse.de>
17706         PR tree-optimization/84584
17707         * graphite-scop-detection.c (scop_detection::add_scop): Discard
17708         SCoPs with fake exit edge.
17710 2018-02-28  Martin Liska  <mliska@suse.cz>
17712         PR testsuite/84597
17713         * timevar.c (timer::print): Fix format to properly print 100%
17714         values.
17716 2018-02-28  Richard Biener  <rguenther@suse.de>
17718         PR middle-end/84607
17719         * genmatch.c (capture_info::walk_match): Do not mark
17720         captured expressions without operands as expr_p given
17721         they act more like predicates and should be subject to
17722         "lost tail" side-effect preserving.
17724 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
17726         PR rtl-optimization/81611
17727         * auto-inc-dec.c (attempt_change): Move dead note from
17728         mem_insn if it's the next use of regno
17729         (find_address): Take address use of reg holding
17730         non-incremented value.  Add parm to limit search to the named
17731         reg only.
17732         (merge_in_block): Attempt to use a mem insn that is the next
17733         use of the original regno.
17735 2018-02-27  Martin Sebor  <msebor@redhat.com>
17737         PR c++/83871
17738         * doc/invoke.texi (-Wmissing-attributes): New option.
17739         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
17741 2018-02-27  Martin Sebor  <msebor@redhat.com>
17743         PR translation/84207
17744         * diagnostic-core.h (warning_n, error_n, inform_n): Change
17745         n argument to unsigned HOST_WIDE_INT.
17746         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
17747         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
17748         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
17749         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
17751 2018-02-27  Richard Biener  <rguenther@suse.de>
17753         PR tree-optimization/84512
17754         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
17755         Do not use the estimate returned from record_stmt_cost for
17756         the scalar iteration cost but sum properly using add_stmt_cost.
17758 2018-02-27  Richard Biener  <rguenther@suse.de>
17760         PR tree-optimization/84466
17761         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
17762         Adjust last change to less strictly validate use operands.
17764 2018-02-27  Martin Liska  <mliska@suse.cz>
17766         PR gcov-profile/84548
17767         * gcov.c (process_file): Allow partial overlap and consider it
17768         also as group functions.
17769         (output_lines): Properly calculate range of lines for a group.
17771 2018-02-27  Martin Liska  <mliska@suse.cz>
17773         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
17774         'ggc' suffixes.  Change first column width.
17775         (timer::print): Fix formatting of the column.
17777 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
17779         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
17780         preserve inline entry blocks for the sake of debug inline
17781         entry point markers alone.
17782         (remove_unused_locals): Suggest in comments a better place to
17783         force the preservation of inline entry blocks that are
17784         otherwise unused, but do not preserve them.
17786 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
17788         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
17790 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
17792         PR target/84039
17793         * config/i386/constraints.md (Bs): Replace
17794         ix86_indirect_branch_register with
17795         TARGET_INDIRECT_BRANCH_REGISTER.
17796         (Bw): Likewise.
17797         * config/i386/i386.md (indirect_jump): Likewise.
17798         (tablejump): Likewise.
17799         (*sibcall_memory): Likewise.
17800         (*sibcall_value_memory): Likewise.
17801         Peepholes of indirect call and jump via memory: Likewise.
17802         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
17803         (*sibcall_value_GOT_32): Likewise.
17804         * config/i386/predicates.md (indirect_branch_operand): Likewise.
17805         (GOT_memory_operand): Likewise.
17806         (call_insn_operand): Likewise.
17807         (sibcall_insn_operand): Likewise.
17808         (GOT32_symbol_operand): Likewise.
17809         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
17811 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
17813         PR rtl-optimization/83496
17814         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
17815         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
17816         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
17817         redundant insn, if any.
17818         (relax_delay_slots): Likewise.
17819         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
17821 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
17823         PR tree-optimization/83965
17824         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
17825         that grouped statements are part of a reduction chain.  Return
17826         true if the statement is not marked as a reduction itself but
17827         is part of a group.
17828         (vect_recog_dot_prod_pattern): Don't check whether the statement
17829         is part of a group here.
17830         (vect_recog_sad_pattern): Likewise.
17831         (vect_recog_widen_sum_pattern): Likewise.
17833 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
17835         PR debug/84545
17836         * final.c (rest_of_clean_state): Also look for calls inside sequences.
17838 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
17840         PR target/84530
17841         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
17842         the bool argument.
17843         (ix86_output_indirect_function_return): New prototype.
17844         (ix86_split_simple_return_pop_internal): Likewise.
17845         * config/i386/i386.c (indirect_return_via_cx): New.
17846         (indirect_return_via_cx_bnd): Likewise.
17847         (indirect_thunk_name): Handle return va CX_REG.
17848         (output_indirect_thunk_function): Create alias for
17849         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
17850         (ix86_output_indirect_jmp): Remove the bool argument.
17851         (ix86_output_indirect_function_return): New function.
17852         (ix86_split_simple_return_pop_internal): Likewise.
17853         * config/i386/i386.md (*indirect_jump): Don't pass false
17854         to ix86_output_indirect_jmp.
17855         (*tablejump_1): Likewise.
17856         (simple_return_pop_internal): Change it to define_insn_and_split.
17857         Call ix86_split_simple_return_pop_internal to split it for
17858         -mfunction-return=.
17859         (simple_return_indirect_internal): Call
17860         ix86_output_indirect_function_return instead of
17861         ix86_output_indirect_jmp.
17863 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
17865         PR bootstrap/84405
17866         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
17867         memset and value initialization afterwards.
17869 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
17871         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
17873 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
17875         PR target/84521
17876         * common/config/aarch64/aarch64-common.c
17877         (aarch_option_optimization_table[]): Switch
17878         off fomit-frame-pointer
17880 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
17881             Chung-Ju Wu  <jasonwucj@gmail.com>
17883         * config/nds32/nds32-multiple.md (load_multiple): Disallow
17884         volatile memory.
17885         (store_multiple): Ditto.
17887 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
17889         * config.gcc: Add --with-cpu support for nds32 target.
17890         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
17891         * config/nds32/nds32.opt: Add -mcpu= option.
17893 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
17895         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
17896         isel=yes): Warn for these deprecated options.
17898 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
17900         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
17901         ISA_2_5_MASKS_EMBEDDED.
17903 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
17905         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
17906         p->max as pointers rather than using iterative_hash_expr.
17908 2018-02-23  Carl Love  <cel@us.ibm.com>
17910         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
17911         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
17912         BU_P8V_OVERLOAD_2.
17913         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
17914         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
17915         P8V_BUILTIN_VEC_VUNSIGNED2.
17917 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
17919         PR target/81572
17920         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
17921         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
17922         LRA_UNKNOWN_ALT.
17923         * lra-constraints.c (curr_insn_transform): Set up
17924         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
17925         LRA_UNKNOWN_ALT.
17926         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
17927         * lra-eliminations.c (spill_pseudos): Ditto.
17928         (process_insn_for_elimination): Ditto.
17929         * lra-lives.c (reg_early_clobber_p): Use the new macros.
17930         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
17931         LRA_NON_CLOBBERED_ALT.
17933 2018-02-22  Martin Sebor  <msebor@redhat.com>
17935         PR tree-optimization/84480
17936         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
17937         to maybe_diag_stxncpy_trunc.  Call it.
17938         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
17939         from gimple_fold_builtin_strcpy.  Print inlining stack.
17940         (handle_builtin_stxncpy): Print inlining stack.
17941         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
17943 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
17945         PR target/84176
17946         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
17947         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
17948         and -fcheck-pointer-bounds are used together.
17949         (indirect_thunk_prefix): New enum.
17950         (indirect_thunk_need_prefix): New function.
17951         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
17952         "_nt" instead of "_bnd" for NOTRACK prefix.
17953         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
17954         (output_indirect_thunk_function): Likewise.
17955         (): Likewise.
17956         (ix86_code_end): Update output_indirect_thunk_function calls.
17957         (ix86_output_indirect_branch_via_reg): Replace
17958         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
17959         (ix86_output_indirect_branch_via_push): Likewise.
17960         (ix86_output_function_return): Likewise.
17961         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
17962         incompatible with -fcf-protection=branch and
17963         -fcheck-pointer-bounds.
17965 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
17967         PR target/83335
17968         * config/aarch64/aarch64.c (aarch64_print_address_internal):
17969         Change gcc_assert call to output_operand_lossage.
17971 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
17973         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
17975 2018-02-22  DJ Delorie  <dj@redhat.com>
17976             Sebastian Perta  <sebastian.perta@renesas.com>
17977             Oleg Endo  <olegendo@gcc.gnu.org>
17979         * config/rx/rx.c (rx_rtx_costs): New function.
17980         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
17982 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
17984         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
17986 2018-02-22  Martin Liska  <mliska@suse.cz>
17988         PR driver/83193
17989         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
17990         Add "native" as a possible value.
17992 2018-02-22  Martin Liska  <mliska@suse.cz>
17994         PR driver/83193
17995         * config/i386/i386.c (ix86_option_override_internal):
17996         Add "native" as a possible value for -march and -mtune.
17998 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
18000         PR target/84502
18001         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
18002         to all type variants.
18004         PR tree-optimization/84503
18005         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
18006         width as info->bitpos + info->bitsize - start.
18007         (merged_store_group::merge_overlapping): Simplify width computation.
18008         (check_no_overlap): New function.
18009         (imm_store_chain_info::try_coalesce_bswap): Compute expected
18010         start + width and last_order of the group, fail if check_no_overlap
18011         fails.
18012         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
18013         to group if check_no_overlap fails.
18015 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
18017         * config/rs6000/altivec.md: Delete contraint arguments to
18018         define_expand, define_split, and define_peephole2, and in
18019         define_insn_and_split if always unused.
18020         * config/rs6000/darwin.md: Ditto.
18021         * config/rs6000/dfp.md: Ditto.
18022         * config/rs6000/rs6000.md: Ditto.
18023         * config/rs6000/sync.md: Ditto.
18024         * config/rs6000/vector.md: Ditto.
18025         * config/rs6000/vsx.md: Ditto.
18027 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
18029         * config/rs6000/altivec.md: Write output control strings as braced
18030         blocks instead of double-quoted strings.
18031         * config/rs6000/darwin.md: Ditto.
18032         * config/rs6000/rs6000.md: Ditto.
18033         * config/rs6000/vector.md: Ditto.
18034         * config/rs6000/vsx.md: Ditto.
18036 2018-02-21  Jason Merrill  <jason@redhat.com>
18038         PR c++/84314 - ICE with templates and fastcall attribute.
18039         * attribs.c (build_type_attribute_qual_variant): Remove assert.
18041 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
18043         * ipa-cp.c (determine_versionability): Fix comment typos.
18045 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
18047         PR c/84229
18048         * ipa-cp.c (determine_versionability): Do not version functions caling
18049         va_arg_pack.
18051 2018-02-21  Martin Liska  <mliska@suse.cz>
18053         PR driver/83193
18054         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
18055         Add "native" as a possible value.
18056         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
18057         the macro when native cpu detection is available.
18059 2018-02-21  Martin Liska  <mliska@suse.cz>
18061         PR driver/83193
18062         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
18063         Add "native" as a possible value.
18064         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
18065         when native cpu detection is available.
18067 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
18068             Martin Sebor  <msebor@redhat.com>
18070         PR tree-optimization/84478
18071         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
18072         false.
18073         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
18074         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
18075         support which is conservatively correct, for 2 only stay conservative
18076         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
18077         argument to the 2 argument get_range_strlen, adjust 6 arg
18078         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
18079         false.
18080         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
18081         (gimple_fold_builtin_strlen): Pass true as last argument to
18082         get_range_strlen.
18084 2018-02-20  Martin Sebor  <msebor@redhat.com>
18086         PR middle-end/84095
18087         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
18088         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
18089         (builtin_memref::builtin_memref): Factor out parts into
18090         set_base_and_offset and call it.
18092 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
18094         PR middle-end/84406
18095         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
18096         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
18097         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
18098         search at the associated MODE_INT.
18100 2018-02-20  Jeff Law  <law@redhat.com>
18102         PR middle-end/82123
18103         PR tree-optimization/81592
18104         PR middle-end/79257
18105         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
18106         for range data rather than using global data.
18107         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
18108         range data rather than using global data.
18109         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
18110         pass it to children as needed.
18111         (struct directive::fmtresult): Similarly.
18112         (struct directive::set_width): Similarly.
18113         (struct directive::set_precision): Similarly.
18114         (format_integer, format_directive, parse_directive): Similarly.
18115         (format_none): Accept unnamed vr_values parameter.
18116         (format_percent, format_floating, format_character): Similarly.
18117         (format_string, format_plain): Similarly.
18118         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
18119         the EVRP range analyzer for range data rather than using global data.
18120         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
18121         gimple-ssa-evrp-analyze.h
18122         (class sprintf_dom_walker): Add after_dom_children member function.
18123         Add evrp_range_analyzer member.
18124         (sprintf_dom_walker::before_dom_children): Call into the EVRP
18125         range analyzer as needed.
18126         (sprintf_dom_walker::after_dom_children): New member function.
18127         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
18128         if not optimizing.
18129         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
18130         (evrp_range_analyzer::pop_to_marker): Likewise.
18132 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
18134         PR tree-optimization/84419
18135         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
18136         with the required type if its current type is compatible but
18137         different.
18139 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
18141         PR middle-end/82004
18142         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
18143         after vectorization.
18145 2018-02-20  Martin Liska  <mliska@suse.cz>
18147         PR driver/83193
18148         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
18149         possible values if we don't have a hint.
18151 2018-02-20  Martin Liska  <mliska@suse.cz>
18153         PR c/84310
18154         PR target/79747
18155         * final.c (shorten_branches): Build align_tab array with one
18156         more element.
18157         * opts.c (finish_options): Add alignment option limit check.
18158         (MAX_CODE_ALIGN): Likewise.
18159         (MAX_CODE_ALIGN_VALUE): Likewise.
18160         * doc/invoke.texi: Document maximum allowed option value for
18161         all -falign-* options.
18163 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
18165         PR target/84146
18166         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
18167         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
18168         * var-tracking.c (emit_note_insn_var_location): Remove all references
18169         to NOTE_INSN_CALL_ARG_LOCATION.
18170         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
18171         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
18172         Use copy_rtx_if_shared.
18173         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
18174         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
18175         (dwarf2out_var_location): Remove handling of
18176         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
18177         on call_insn.
18178         * final.c (final_scan_insn): Remove all references to
18179         NOTE_INSN_CALL_ARG_LOCATION.
18180         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
18181         before dumping final insns.
18182         * except.c (emit_note_eh_region_end): Remove all references to
18183         NOTE_INSN_CALL_ARG_LOCATION.
18184         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
18185         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
18186         * config/arc/arc.c (hwloop_optimize): Likewise.
18187         * config/arm/arm.c (create_fix_barrier): Likewise.
18188         * config/s390/s390.c (s390_chunkify_start): Likewise.
18189         * config/sh/sh.c (find_barrier): Likewise.
18190         * config/i386/i386.c (rest_of_insert_endbranch,
18191         ix86_seh_fixup_eh_fallthru): Likewise.
18192         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
18193         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
18194         * config/frv/frv.c (frv_function_prologue): Likewise.
18195         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
18196         reg note.
18197         (note_outside_basic_block_p): Remove all references to
18198         NOTE_INSN_CALL_ARG_LOCATION.
18199         * gengtype.c (adjust_field_rtx_def): Likewise.
18200         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
18201         Likewise.
18202         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
18203         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
18205         PR c++/84444
18206         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
18207         is ADDR_EXPR.
18209         PR tree-optimization/84452
18210         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
18211         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
18212         is NULL.
18214 2018-02-19  Martin Liska  <mliska@suse.cz>
18216         PR sanitizer/82183
18217         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
18219 2018-02-19  Martin Liska  <mliska@suse.cz>
18220             Richard Sandiford  <richard.sandiford@linaro.org>
18222         PR tree-optimization/82491
18223         * gimple-fold.c (get_base_constructor): Make earlier bail out
18224         to prevent ubsan.
18226 2018-02-19  Carl Love  <cel@us.ibm.com>
18228         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
18229         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
18230         BU_P8V_OVERLOAD_1.
18231         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
18232         P8V_BUILTIN_VEC_NEG.
18234 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
18236         * config/rl78/rl78.md (movdf): New define expand.
18238 2018-02-19  Martin Liska  <mliska@suse.cz>
18240         PR other/80589
18241         * doc/invoke.texi: Fix typo.
18242         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
18244 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
18246         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
18247         handle rs6000_single_float and rs6000_double_float specially for
18248         e500 family CPUs.
18250 2018-02-16  Jeff Law  <law@redhat.com>
18252         * config/rx/rx.c (add_pop_cfi_notes): New function.;
18253         (pop_regs): Use it.
18255 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
18257         PR ipa/84425
18258         * ipa-inline.c (inline_small_functions): Fix a typo.
18260 2018-02-16  Nathan Sidwell  <nathan@acm.org>
18262         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
18264 2018-02-16  Carl Love  <cel@us.ibm.com>
18266         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
18267         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
18268         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
18269         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
18270         expansion to P8V_BUILTIN_VEC_FLOAT2.
18272 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
18274         PR rtl-optimization/70023
18275         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
18276         src_regno into account.
18278 2018-02-16  Carl Love  <cel@us.ibm.com>
18280         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
18281         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
18282         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
18283         * config/rs6000/rs6000.c: Remove case statements for
18284         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
18285         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
18286         and P9V_BUILTIN_VEC_VINSERT4B.
18287         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
18288         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
18289         * config/rs6000/vsx.md:
18290         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
18291         vec_insert4b.
18293 2018-02-16  Carl Love  <cel@us.ibm.com>
18295         * config/rs6000/altivec.h: Add builtin names vec_extract4b
18296         vec_insert4b.
18297         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
18298         definitions.
18299         * config/rs6000/rs6000-c.c: Add the definitions for
18300         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
18301         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
18302         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
18303         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
18304         definition for insert4b and define insn *insert3b_internal.
18305         * doc/extend.texi: Add documentation for vec_extract4b.
18307 2018-02-16  Nathan Sidwell  <nathan@acm.org>
18309         * doc/extend.texi (Backwards Compatibility): Mention friend
18310         injection.  Note for-scope is deprecated.
18311         * doc/invoke.texi (-ffriend-injection): Deprecate.
18313 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
18315         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
18316         that moved to I2, also allow destinations that are a paradoxical
18317         subreg (instead of a normal reg).
18319 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
18321         PR target/83831
18322         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
18323         to QImode.
18325 2018-02-16  Richard Biener  <rguenther@suse.de>
18327         PR tree-optimization/84037
18328         PR tree-optimization/84016
18329         PR target/82862
18330         * config/i386/i386.c (ix86_builtin_vectorization_cost):
18331         Adjust vec_construct for the fact we need additional higher latency
18332         128bit inserts for AVX256 and AVX512 vector builds.
18333         (ix86_add_stmt_cost): Scale vector construction cost for
18334         elementwise loads.
18336 2018-02-16  Richard Biener  <rguenther@suse.de>
18338         PR tree-optimization/84417
18339         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
18340         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
18341         (non_rewritable_lvalue_p): Likewise, use poly-ints.
18343 2018-02-16  Martin Liska  <mliska@suse.cz>
18345         PR sanitizer/84307
18346         * internal-fn.def (ASAN_CHECK): Set proper flags.
18347         (ASAN_MARK): Likewise.
18349 2018-02-16  Julia Koval  <julia.koval@intel.com>
18351         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
18352         from PTA_CANNONLAKE.
18354 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
18356         PR target/84272
18357         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
18358         Use ++iter rather than iter++ for std::list iterators.
18359         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
18360         defer deleting them until all nodes in the forest are processed.  Do
18361         free even leaf nodes.  Change to_process into auto_vec.
18363         PR bootstrap/84405
18364         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
18365         * vec.h (vec_default_construct): Use memset instead of placement new
18366         if BROKEN_VALUE_INITIALIZATION is defined.
18367         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
18368         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
18369         is defined.
18371         PR rtl-optimization/83723
18372         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
18373         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
18374         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
18375         recursive calls.
18376         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
18377         callers.
18378         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
18380 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
18382         PR rtl-optimization/81443
18383         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
18384         from inner REGs to paradoxical SUBREGs.
18386 2018-02-16  Richard Biener  <rguenther@suse.de>
18388         PR tree-optimization/84399
18389         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
18390         For operands we can analyze at their definition make sure we can
18391         analyze them at each use as well.
18393 2018-02-16  Richard Biener  <rguenther@suse.de>
18395         PR tree-optimization/84190
18396         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
18397         volatile accesses if the decl isn't volatile.
18399 2018-02-15  Jason Merrill  <jason@redhat.com>
18401         PR c++/84314 - ICE with templates and fastcall attribute.
18402         * attribs.c (build_type_attribute_qual_variant): Don't clobber
18403         TYPE_CANONICAL on an existing type.
18405 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
18407         PR tree-optimization/84383
18408         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
18409         dstoff nor call operand_equal_p if dstbase is NULL.
18411         PR tree-optimization/84334
18412         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
18413         also a CONSTANT_CLASS_P, punt.
18415 2018-02-14  Jim Wilson  <jimw@sifive.com>
18417         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
18418         first SMALL_OPERAND check.  New local min_second_step.  Move assert
18419         to where locals are set.  Add TARGET_RVC support.
18420         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
18422 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
18424         * doc/invoke.texi: Correct -Wformat-overflow code sample.
18426 2018-02-14  Martin Sebor  <msebor@redhat.com>
18428         PR tree-optimization/83698
18429         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
18430         arrays constrain the offset range to their bounds.
18431         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
18432         (builtin_access::overlap): Avoid setting the size of overlap if it's
18433         already been set.
18434         (maybe_diag_overlap): Also consider arrays when deciding what values
18435         of offsets to include in diagnostics.
18437 2018-02-14  Martin Sebor  <msebor@redhat.com>
18439         PR c/84108
18440         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
18441         that correspond to the kind of a declaration.
18443 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
18445         PR target/83984
18446         * config/pa/pa.md: Load address of PIC label using the linkage table
18447         if the label is nonlocal.
18449 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18451         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
18452         warning message if user requests -maltivec=be.
18453         * doc/invoke.texi: Document deprecation of -maltivec=be.
18455 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
18457         PR target/84220
18458         * config/rs6000/rs6000-c.c: Update definitions for
18459         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
18460         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
18462 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
18464         PR target/84239
18465         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
18466         add _get_ssp intrinsics. Remove argument from
18467         __builtin_ia32_rdssp[d|q].
18468         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
18469         * config/i386/i386-builtin.def: Remove argument from
18470         __builtin_ia32_rdssp[d|q].
18471         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
18472         ix86_expand_special_args_builtin for _rdssp[d|q].
18473         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
18474         Clear register before usage.
18475         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
18476         Add documentation for new _get_ssp and _inc_ssp intrinsics.
18478 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
18480         PR tree-optimization/84357
18481         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
18482         operand 1 of an ARRAY_REF too.
18484 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
18486         PR target/83831
18487         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
18488         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18489         declarations.
18490         (set_of_reg): New struct.
18491         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
18492         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
18493         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18494         functions.
18495         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
18496         Split into bitclr, bitset, bitinvert patterns if appropriate.
18497         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
18498         use rx_fuse_in_memory_bitop.
18499         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
18500         to named insn, correct maximum insn length.
18502 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
18504         PR target/79242
18505         * machmode.def: Define a complex mode for PARTIAL_INT.
18506         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
18507         MODE_PARTIAL_INT.
18508         * doc/rtl.texi: Document CSPImode.
18509         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
18510         handling.
18511         (msp430_hard_regno_nregs_with_padding): Likewise.
18513 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
18515         PR target/84279
18516         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
18518 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
18520         PR rtl-optimization/84169
18521         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
18522         we generated a parallel as new i3 and we split that to new i2 and i3
18523         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
18524         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
18525         those to i2, not i1.  Partially rewrite this scan code.
18527 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
18529         PR c/82210
18530         * stor-layout.c (place_field): For variable length fields, adjust
18531         offset_align afterwards not just based on the field's alignment,
18532         but also on the size.
18534         PR middle-end/84309
18535         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
18536         of exps and logs in the use_exp2 case.
18538 2018-02-13  Jeff Law  <law@redhat.com>
18540         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
18541         entry for "vector".
18543         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
18544         ARGS as unused.
18546 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
18548         PR debug/84342
18549         PR debug/84319
18550         * common.opt (gas-loc-support, gas-locview-support): New.
18551         (ginline-points, ginternal-reset-location-views): New.
18552         * doc/invoke.texi: Document them.  Use @itemx where intended.
18553         (gvariable-location-views): Adjust.
18554         * target.def (reset_location_view): New.
18555         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
18556         (TARGET_RESET_LOCATION_VIEW): New.
18557         * doc/tm.texi: Rebuilt.
18558         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
18559         (dwarf2out_default_as_locview_support): New.
18560         (output_asm_line_debug_info): Use option variables.
18561         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
18562         (output_loc_list): Likewise.
18563         (add_high_low_attributes): Check option variables.
18564         Don't output entry view attribute in strict mode.
18565         (gen_inlined_subroutine_die): Check option variables.
18566         (dwarf2out_inline_entry): Likewise.
18567         (init_sections_and_labels): Likewise.
18568         (dwarf2out_early_finish): Likewise.
18569         (maybe_reset_location_view): New, from...
18570         (dwarf2out_var_location): ... here.  Call it.
18571         * debug.h (dwarf2out_default_as_loc_support): Declare.
18572         (dwarf2out_default_as_locview_support): Declare.
18573         * hooks.c (hook_int_rtx_insn_0): New.
18574         * hooks.h (hook_int_rtx_insn_0): Declare.
18575         * toplev.c (process_options): Take -gas-loc-support and
18576         -gas-locview-support from dwarf2out.  Enable
18577         -gvariable-location-views by default only with locview
18578         assembler support.  Enable -ginternal-reset-location-views by
18579         default only if the target defines the corresponding hook.
18580         Enable -ginline-points by default if location views are
18581         enabled; force it disabled if statement frontiers are
18582         disabled.
18583         * tree-inline.c (expand_call_inline): Check option variables.
18584         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
18586 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
18588         PR tree-optimization/84321
18589         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
18590         handling.  Also check whether the anti-range contains any values
18591         that satisfy the mask; switch to a VR_RANGE if not.
18593 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
18595         PR sanitizer/84340
18596         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
18598 2018-02-13  Martin Jambor  <mjambor@suse.cz>
18600         PR c++/83990
18601         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
18602         of call statements, also set location of a load to a temporary.
18604 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
18606         * config/rl78/rl78.c (add_vector_labels): New function.
18607         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
18608         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
18609         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
18610         which checks that no arguments are passed.
18611         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
18612         * doc/extend.texi: Documentation for the new attribute.
18614 2018-02-13  Andreas Schwab  <schwab@suse.de>
18616         * config/riscv/linux.h (CPP_SPEC): Define.
18618 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
18620         PR target/84335
18621         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
18622         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
18623         OPTION_MASK_ISA_AES as first argument to def_builtin_const
18624         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
18625         instead of OPTION_MASK_ISA_PCLMUL as first argument to
18626         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
18627         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
18628         temporarily for AES and PCLMUL builtins.
18630         PR tree-optimization/84339
18631         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
18632         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
18633         Formatting fixes.
18635         PR middle-end/84309
18636         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
18637         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
18638         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
18639         inline function.
18640         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
18641         inline function.
18642         * omp-simd-clone.h: New file.
18643         * omp-simd-clone.c: Include omp-simd-clone.h.
18644         (expand_simd_clones): No longer static.
18645         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
18646         cgraph.h and omp-simd-clone.h.
18647         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
18648         (vect_recog_widen_shift_pattern): Formatting fix.
18649         (vect_pattern_recog_1): Don't check optab for calls.
18651         PR target/84336
18652         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
18653         operands[2] into a REG before using gen_lowpart on it.
18655 2018-02-12  Jeff Law  <law@redhat.com>
18657         PR target/83760
18658         * config/sh/sh.c (find_barrier): Consider a sibling call
18659         a barrier as well.
18661         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
18662         successfully back substituting a reg.
18664 2018-02-12  Richard Biener  <rguenther@suse.de>
18666         PR tree-optimization/84037
18667         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
18668         parameter, move visited init to caller.
18669         (vect_slp_analyze_operations): Separate cost from validity
18670         check, initialize visited once for all instances.
18671         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
18672         for all instances.
18673         * tree-vect-stmts.c (vect_model_simple_cost): Make early
18674         out an assert.
18675         (vect_model_promotion_demotion_cost): Likewise.
18676         (vectorizable_bswap): Guard cost modeling with !slp_node
18677         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
18678         SLP stmts.
18679         (vectorizable_call): Likewise.
18680         (vectorizable_conversion): Likewise.
18681         (vectorizable_assignment): Likewise.
18682         (vectorizable_shift): Likewise.
18683         (vectorizable_operation): Likewise.
18684         (vectorizable_store): Likewise.
18685         (vectorizable_load): Likewise.
18686         (vectorizable_condition): Likewise.
18687         (vectorizable_comparison): Likewise.
18689 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
18691         PR sanitizer/84307
18692         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
18693         (ASAN_MARK): Fix fnspec to account for return value, change pointer
18694         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
18696 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
18698         PR middle-end/83665
18699         * params.def (inline-min-speedup): Increase from 8 to 15.
18700         (max-inline-insns-auto): Decrease from 40 to 30.
18701         * ipa-split.c (consider_split): Add some buffer for function to
18702         be considered inlining candidate.
18703         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
18704         default values.
18706 2018-02-12  Richard Biener  <rguenther@suse.de>
18708         PR tree-optimization/84037
18709         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
18710         matched stmts if we cannot swap the non-matched ones.
18712 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
18714         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
18715         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
18716         _mm_maskz_scalef_round_ss): New intrinsics.
18717         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
18718         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
18719         __builtin_ia32_scalefss_round): Remove.
18720         (__builtin_ia32_scalefsd_mask_round,
18721         __builtin_ia32_scalefss_mask_round): New intrinsics.
18722         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
18723         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
18724         ((match_operand:VF_128 2 "<round_nimm_predicate>"
18725         "<round_constraint>")): Changed to ...
18726         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
18727         "<round_scalar_constraint>")): ... this.
18728         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
18729         %0, %1, %2<round_op3>}"): Changed to ...
18730         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
18731         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
18732         %2<round_scalar_mask_op3>}"): ... this.
18733         * config/i386/subst.md (round_scalar_nimm_predicate): New.
18735 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
18737         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
18738         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
18739         (_mm_maskz_sqrt_round_ss): New intrinsics.
18740         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
18741         (__builtin_ia32_sqrtsd_mask_round)
18742         (__builtin_ia32_sqrtss_mask_round): New builtins.
18743         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
18744         (__builtin_ia32_sqrtss_round): Remove.
18745         (__builtin_ia32_sqrtsd_mask_round)
18746         (__builtin_ia32_sqrtss_mask_round): New builtins.
18747         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
18748         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
18749         ((match_operand:VF_128 1 "vector_operand"
18750         "xBm,<round_constraint>")): Changed to ...
18751         ((match_operand:VF_128 1 "vector_operand"
18752         "xBm,<round_scalar_constraint>")): ... this.
18753         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
18754         %0, %2, %<iptr>1<round_op3>}): Changed to ...
18755         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
18756         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
18757         %<iptr>1<round_scalar_mask_op3>}): ... this.
18758         ((set_attr "prefix" "<round_prefix>")): Changed to ...
18759         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
18761 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
18763         PR target/84266
18764         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
18765         Cast vec_cmpeq result to correct type.
18766         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
18767         Cast vec_cmpgt result to correct type.
18769 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
18771         * final.c (final_scan_insn_1): Renamed from...
18772         (final_scan_insn): ... this.  New wrapper, to recover
18773         seen from the outermost call in recursive ones.
18774         * config/sparc/sparc.c (output_return): Drop seen from call.
18775         (output_sibcall): Likewise.
18776         * config/visium/visium.c (output_branch): Likewise.
18778 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
18780         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
18781         function label.
18783 2018-02-10  Alan Modra  <amodra@gmail.com>
18785         PR target/84300
18786         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
18787         Specify LR as an input.
18789 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
18791         PR sanitizer/83987
18792         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
18793         remove_member_access_dummy_vars): New functions.
18794         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
18795         lower_omp_1, execute_lower_omp): Use them.
18797         PR rtl-optimization/84308
18798         * shrink-wrap.c (spread_components): Release todo vector.
18800 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
18802         PR rtl-optimization/57193
18803         * ira-color.c (struct allocno_color_data): Add member
18804         conflict_allocno_hard_prefs.
18805         (update_conflict_allocno_hard_prefs): New.
18806         (bucket_allocno_compare_func): Add a preference based on
18807         conflict_allocno_hard_prefs.
18808         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
18809         (color_allocnos): Remove a dead code.  Initiate
18810         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
18812 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
18814         PR target/84226
18815         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
18816         constraint from =wa to wa.  Avoid a subreg on the output operand,
18817         instead use a pseudo and subreg it in a move.
18818         (p9_xxbrd_<mode>): Changed to ...
18819         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
18820         (p9_xxbrd_v2df): New expander.
18821         (p9_xxbrw_<mode>): Changed to ...
18822         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
18823         (p9_xxbrw_v4sf): New expander.
18825 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
18827         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
18829 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
18831         PR target/83926
18832         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
18833         multiply in 32-bit mode.
18834         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
18835         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
18836         mode.
18838 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
18840         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
18841         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
18842         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
18843         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
18845 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
18847         PR lto/84213
18848         * dwarf2out.c (is_trivial_indirect_ref): New function.
18849         (dwarf2out_late_global_decl): Do not generate a location
18850         attribute for variables that have a non-trivial DECL_VALUE_EXPR
18851         and that are not defined in the current unit.
18853 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
18855         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
18856         instead of a libcall for UNORDERED.
18858 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
18860         PR target/82641
18861         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
18862         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
18864 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18866         PR target/PR84295
18867         * config/s390/s390.c (s390_set_current_function): Invoke
18868         s390_indirect_branch_settings also if fndecl didn't change.
18870 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
18872         * config/rs6000/rs6000.md (blockage): Set length to zero.
18874 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
18876         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
18878 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
18880         PR sanitizer/84285
18881         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
18882         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
18883         -static-lib*san.
18885         PR debug/84252
18886         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
18887         PARALLEL incoming that failed vt_get_decl_and_offset check.
18889         PR middle-end/84237
18890         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
18891         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
18892         TREE_READONLY bit.
18893         (get_variable_section): For decls in named .bss* sections pass true as
18894         second argument to bss_initializer_p.
18896 2018-02-09  Marek Polacek  <polacek@redhat.com>
18897             Jakub Jelinek  <jakub@redhat.com>
18899         PR c++/83659
18900         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
18901         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
18902         Sync some changes from cxx_fold_indirect_ref.
18904 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
18906         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
18907         markers.
18908         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
18909         (BLOCK_INLINE_ENTRY_LABEL): New.
18910         (dwarf2out_var_location): Disregard inline entry markers.
18911         (inline_entry_data): New struct.
18912         (inline_entry_data_hasher): New hashtable type.
18913         (inline_entry_data_hasher::hash): New.
18914         (inline_entry_data_hasher::equal): New.
18915         (inline_entry_data_table): New variable.
18916         (add_high_low_attributes): Add DW_AT_entry_pc and
18917         DW_AT_GNU_entry_view attributes if a pending entry is found
18918         in inline_entry_data_table.  Add old entry_pc attribute only
18919         if debug nonbinding markers are disabled.
18920         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
18921         markers are enabled.
18922         (block_within_block_p, dwarf2out_inline_entry): New.
18923         (dwarf2out_finish): Check that no entries remained in
18924         inline_entry_data_table.
18925         * final.c (reemit_insn_block_notes): Handle inline entry notes.
18926         (final_scan_insn, notice_source_line): Likewise.
18927         (rest_of_clean_state): Skip inline entry markers.
18928         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
18929         markers.
18930         * gimple.c (gimple_build_debug_inline_entry): New.
18931         * gimple.h (enum gimple_debug_subcode): Add
18932         GIMPLE_DEBUG_INLINE_ENTRY.
18933         (gimple_build_debug_inline_entry): Declare.
18934         (gimple_debug_inline_entry_p): New.
18935         (gimple_debug_nonbind_marker_p): Adjust.
18936         * insn-notes.def (INLINE_ENTRY): New.
18937         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
18938         inline entry marker notes.
18939         (print_insn): Likewise.
18940         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
18941         (INSN_DEBUG_MARKER_KIND): Likewise.
18942         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
18943         * tree-inline.c (expand_call_inline): Build and insert
18944         debug_inline_entry stmt.
18945         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
18946         inline entry blocks early, if nonbind markers are enabled.
18947         (dump_scope_block): Dump fragment info.
18948         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
18949         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
18950         (gimple_build_debug_inline_entry): New.
18951         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
18952         Enable/disable inline entry points too.
18953         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
18954         (DEBUG_INSN): Describe inline entry markers.
18956         * common.opt (gvariable-location-views): New.
18957         (gvariable-location-views=incompat5): New.
18958         * config.in: Rebuilt.
18959         * configure: Rebuilt.
18960         * configure.ac: Test assembler for view support.
18961         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
18962         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
18963         * dwarf2out.c (var_loc_view): New typedef.
18964         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
18965         (dwarf2out_locviews_in_attribute): New.
18966         (dwarf2out_locviews_in_loclist): New.
18967         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
18968         (enum dw_line_info_opcode): Add LI_adv_address.
18969         (struct dw_line_info_table): Add view.
18970         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
18971         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
18972         (zero_view_p): New variable.
18973         (ZERO_VIEW_P): New macro.
18974         (output_asm_line_debug_info): New.
18975         (struct var_loc_node): Add view.
18976         (add_AT_view_list, AT_loc_list): New.
18977         (add_var_loc_to_decl): Add view param.  Test it against last.
18978         (new_loc_list): Add view params.  Record them.
18979         (AT_loc_list_ptr): Handle loc and view lists.
18980         (view_list_to_loc_list_val_node): New.
18981         (print_dw_val): Handle dw_val_class_view_list.
18982         (size_of_die): Likewise.
18983         (value_format): Likewise.
18984         (loc_list_has_views): New.
18985         (gen_llsym): Set vl_symbol too.
18986         (maybe_gen_llsym, skip_loc_list_entry): New.
18987         (dwarf2out_maybe_output_loclist_view_pair): New.
18988         (output_loc_list): Output view list or entries too.
18989         (output_view_list_offset): New.
18990         (output_die): Handle dw_val_class_view_list.
18991         (output_dwarf_version): New.
18992         (output_compilation_unit_header): Use it.
18993         (output_skeleton_debug_sections): Likewise.
18994         (output_rnglists, output_line_info): Likewise.
18995         (output_pubnames, output_aranges): Update version comments.
18996         (output_one_line_info_table): Output view numbers in asm comments.
18997         (dw_loc_list): Determine current endview, pass it to new_loc_list.
18998         Call maybe_gen_llsym.
18999         (loc_list_from_tree_1): Adjust.
19000         (add_AT_location_description): Create view list attribute if
19001         needed, check it's absent otherwise.
19002         (convert_cfa_to_fb_loc_list): Adjust.
19003         (maybe_emit_file): Call output_asm_line_debug_info for test.
19004         (dwarf2out_var_location): Reset views as needed.  Precompute
19005         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
19006         attribute.  Set view.
19007         (new_line_info_table): Reset next view.
19008         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
19009         (dwarf2out_source_line): Likewise.  Output view resets and labels to
19010         the assembler, or select appropriate line info opcodes.
19011         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
19012         (optimize_string_length): Catch it.  Adjust.
19013         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
19014         dw_val_class_view_list, and remove it if no longer needed.
19015         (hash_loc_list): Hash view numbers.
19016         (loc_list_hasher::equal): Compare them.
19017         (optimize_location_lists): Check whether a view list symbol is
19018         needed, and whether the locview attribute is present, and
19019         whether they match.  Remove the locview attribute if no longer
19020         needed.
19021         (index_location_lists): Call skip_loc_list_entry for test.
19022         (dwarf2out_finish): Call output_asm_line_debug_info for test.
19023         Use output_dwarf_version.
19024         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
19025         (struct dw_val_node): Add val_view_list.
19026         * final.c (SEEN_NEXT_VIEW): New.
19027         (set_next_view_needed): New.
19028         (clear_next_view_needed): New.
19029         (maybe_output_next_view): New.
19030         (final_start_function): Rename to...
19031         (final_start_function_1): ... this.  Take pointer to FIRST,
19032         add SEEN parameter.  Emit param bindings in the initial view.
19033         (final_start_function): Reintroduce SEEN-less interface.
19034         (final): Rename to...
19035         (final_1): ... this.  Take SEEN parameter.  Output final pending
19036         next view at the end.
19037         (final): Reintroduce seen-less interface.
19038         (final_scan_insn): Output pending next view before switching
19039         sections or ending a block.  Mark the next view as needed when
19040         outputting variable locations.  Notify debug backend of section
19041         changes, and of location view changes.
19042         (rest_of_handle_final): Adjust.
19043         * toplev.c (process_options): Autodetect value for debug variable
19044         location views option.  Warn on incompat5 without -gdwarf-5.
19045         * doc/invoke.texi (gvariable-location-views): New.
19046         (gvariable-location-views=incompat5): New.
19047         (gno-variable-location-views): New.
19049 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
19051         PR tree-optimization/84136
19052         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
19053         that the result of find_edge is non-NULL.
19055 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
19057         PR target/83008
19058         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
19059         storing integer register in SImode.  Fix cost of 256 and 512
19060         byte aligned SSE register store.
19062 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
19064         * config/i386/i386.c (ix86_multiplication_cost): Fix
19065         multiplication cost for TARGET_AVX512DQ.
19067 2018-02-08  Marek Polacek  <polacek@redhat.com>
19069         PR tree-optimization/84238
19070         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
19071         get_range_strlen.
19073 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
19075         PR tree-optimization/84265
19076         * tree-vect-stmts.c (vectorizable_store): Don't treat
19077         VMAT_CONTIGUOUS accesses as grouped.
19078         (vectorizable_load): Likewise.
19080 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
19082         PR tree-optimization/81635
19083         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
19084         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
19085         (test_round_for_mask): New functions.
19086         (wide_int_cc_tests): Call test_round_for_mask.
19087         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
19088         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
19089         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
19090         range returned by get_range_info.
19092 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
19094         PR ipa/81360
19095         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
19096         * symtab.c: Include builtins.h
19097         (symtab_node::output_to_lto_symbol_table_p): Move here
19098         from lto-streamer-out.c:output_symbol_p.
19099         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
19100         (output_symbol_p): Move all logic to symtab.c
19101         (produce_symtab): Update.
19103 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
19105         * config/s390/s390-opts.h (enum indirect_branch): Define.
19106         * config/s390/s390-protos.h (s390_return_addr_from_memory)
19107         (s390_indirect_branch_via_thunk)
19108         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
19109         (enum s390_indirect_branch_type): Define.
19110         * config/s390/s390.c (struct s390_frame_layout, struct
19111         machine_function): Remove.
19112         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
19113         (indirect_branch_table_label_no, indirect_branch_table_name):
19114         Define variables.
19115         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
19116         (enum s390_indirect_branch_option): Define.
19117         (s390_return_addr_from_memory): New function.
19118         (s390_handle_string_attribute): New function.
19119         (s390_attribute_table): Add new attribute handler.
19120         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
19121         (s390_indirect_branch_via_thunk): New function.
19122         (s390_indirect_branch_via_inline_thunk): New function.
19123         (s390_function_ok_for_sibcall): When jumping via thunk disallow
19124         sibling call optimization for non z10 compiles.
19125         (s390_emit_call): Force indirect branch target to be a single
19126         register.  Add r1 clobber for non-z10 compiles.
19127         (s390_emit_epilogue): Emit return jump via return_use expander.
19128         (s390_reorg): Handle JUMP_INSNs as execute targets.
19129         (s390_option_override_internal): Perform validity checks for the
19130         new command line options.
19131         (s390_indirect_branch_attrvalue): New function.
19132         (s390_indirect_branch_settings): New function.
19133         (s390_set_current_function): Invoke s390_indirect_branch_settings.
19134         (s390_output_indirect_thunk_function):  New function.
19135         (s390_code_end): Implement target hook.
19136         (s390_case_values_threshold): Implement target hook.
19137         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
19138         macros.
19139         * config/s390/s390.h (struct s390_frame_layout)
19140         (struct machine_function): Move here from s390.c.
19141         (TARGET_INDIRECT_BRANCH_NOBP_RET)
19142         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
19143         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
19144         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
19145         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
19146         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
19147         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
19148         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
19149         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
19150         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
19151         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
19152         (mnemonic attribute): Add values which aren't recognized
19153         automatically.
19154         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
19155         pattern for branch conversion.  Fix mnemonic attribute.
19156         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
19157         indirect branch via thunk if requested.
19158         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
19159         ("*indirect_jump"): Disable for branch conversion using out of
19160         line thunks.
19161         ("indirect_jump_via_thunk<mode>_z10")
19162         ("indirect_jump_via_thunk<mode>")
19163         ("indirect_jump_via_inlinethunk<mode>_z10")
19164         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
19165         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
19166         ("casesi_jump_via_inlinethunk<mode>_z10")
19167         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
19168         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
19169         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
19170         ("*indirect2_jump"): Disable for branch conversion.
19171         ("casesi_jump"): Turn into expander and expand patterns for branch
19172         conversion.
19173         ("return_use"): New expander.
19174         ("*return"): Emit return via thunk and rename it to ...
19175         ("*return<mode>"): ... this one.
19176         * config/s390/s390.opt: Add new options and and enum for the
19177         option values.
19179 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
19181         * lra-constraints.c (match_reload): Unconditionally use
19182         gen_lowpart_SUBREG, rather than selecting between that
19183         and equivalent gen_rtx_SUBREG code.
19185 2018-02-08  Richard Biener  <rguenther@suse.de>
19187         PR tree-optimization/84233
19188         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
19189         changed flag instead of boguously re-using phi_inserted.
19191 2018-02-08  Martin Jambor  <mjambor@suse.cz>
19193         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
19194         static local variables.
19196 2018-02-08  Richard Biener  <rguenther@suse.de>
19198         PR tree-optimization/84278
19199         * tree-vect-stmts.c (vectorizable_store): When looking for
19200         smaller vector types to perform grouped strided loads/stores
19201         make sure the mode is supported by the target.
19202         (vectorizable_load): Likewise.
19204 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
19206         * config/aarch64/aarch64.c (aarch64_components_for_bb):
19207         Increase LDP/STP opportunities by adding adjacent callee-saves.
19209 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
19211         PR rtl-optimization/84068
19212         PR rtl-optimization/83459
19213         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
19215 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
19217         PR tree-optimization/84224
19218         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
19219         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
19220         non-zero arguments.
19222 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
19224         PR target/84113
19225         * config/rs6000/altivec.md (*restore_world): Remove LR use.
19226         * config/rs6000/predicates.md (restore_world_operation): Adjust op
19227         count, remove one USE.
19229 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
19231         * doc/install.texi (Configuration): Document the
19232         --with-long-double-format={ibm,ieee} PowerPC configuration
19233         options.
19235         PR target/84154
19236         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
19237         Convert from define_expand to be define_insn_and_split.  Rework
19238         float/double/_Float128 conversions to QI/HI/SImode to work with
19239         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
19240         conversions to QI/HImode types did a store and then a load to
19241         truncate the value.  For conversions to VSX registers, don't split
19242         the insn, instead emit the code directly.  Use the code iterator
19243         any_fix to combine signed and unsigned conversions.
19244         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
19245         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
19246         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19247         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
19248         (fix_<mode>di2_hw): Likewise.
19249         (fixuns_<mode>di2_hw): Likewise.
19250         (fix_<mode>si2_hw): Likewise.
19251         (fixuns_<mode>si2_hw): Likewise.
19252         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
19253         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19254         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
19255         fix<uns>_trunc<SFDF:mode>si2_p8.
19256         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
19257         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
19258         (fix<uns>_<mode>_mem): Likewise.
19259         (fctiw<u>z_<mode>_mem): Likewise.
19260         (fix<uns>_<mode>_mem): Likewise.
19261         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
19262         the register allocator from doing a direct move to the GPRs to do
19263         a store, and instead use the ISA 3.0 store byte/half-word from
19264         vector register instruction.  For IEEE 128-bit floating point,
19265         also optimize stores of 32-bit ints.
19266         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
19268 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
19270         * genextract.c (push_pathstr_operand): New function to support
19271         [a-zA-Z].
19272         (walk_rtx): Call push_pathstr_operand.
19273         (print_path): Support [a-zA-Z].
19275 2018-02-07  Richard Biener  <rguenther@suse.de>
19277         PR tree-optimization/84037
19278         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
19279         (cse_and_gimplify_to_preheader): Declare.
19280         (vect_get_place_in_interleaving_chain): Likewise.
19281         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19282         ivexpr_map.
19283         (_loop_vec_info::~_loop_vec_info): Delete it.
19284         (cse_and_gimplify_to_preheader): New function.
19285         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
19286         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
19287         (vectorizable_load): Likewise.  For grouped stores always base
19288         the IV on the first element.
19289         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
19290         condition before gimplifying.
19292 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
19294         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
19295         *DIV_EXPR and *MOD_EXPR.
19297 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
19299         PR target/84248
19300         * config/i386/i386.c (ix86_option_override_internal): Mask out
19301         the CF_SET bit when checking -fcf-protection.
19303 2018-02-07  Tom de Vries  <tom@codesourcery.com>
19305         PR libgomp/84217
19306         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
19307         enough.
19309 2018-02-07  Richard Biener  <rguenther@suse.de>
19311         PR tree-optimization/84204
19312         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
19313         this place.
19315         PR tree-optimization/84205
19316         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
19317         special-case isl_ast_op_zdiv_r.
19319         PR tree-optimization/84223
19320         * graphite-scop-detection.c (gather_bbs::before_dom_children):
19321         Only add conditions from within the region.
19322         (gather_bbs::after_dom_children): Adjust.
19324 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
19326         PR target/84209
19327         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
19328         * config/avr/avr.md: Only post-reload split REG-REG moves if
19329         either register is GENERAL_REG_P.
19331 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
19333         PR tree-optimization/84235
19334         * tree-ssa-scopedtables.c
19335         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
19336         if the subtraction is performed in floating point type where NaNs are
19337         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
19338         build 1.  Formatting fix.
19340 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
19342         PR target/84146
19343         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
19344         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
19345         and skip it regardless of bb boundaries.  Use CALL_P macro,
19346         don't test INSN_P (insn) together with CALL_P or JUMP_P check
19347         unnecessarily, formatting fix.
19349 2018-02-06  Michael Collison  <michael.collison@arm.com>
19351         * config/arm/thumb2.md:
19352         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
19353         (*thumb_mov_notscc): Ditto.
19355 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
19357         PR target/84154
19358         * config/rs6000/rs6000.md (su code attribute): Use "u" for
19359         unsigned_fix, not "s".
19361 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19363         * configure.ac (gcc_fn_eh_frame_ro): New function.
19364         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
19365         correct .eh_frame permissions.
19366         * configure: Regenerate.
19368 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
19370         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
19371         irrelevant options.
19373 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19375         * config/rs6000/rs6000.c (rs6000_option_override_internal):
19376         Display warning message for -mno-speculate-indirect-jumps.
19378 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
19380         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
19381         Undocumented.
19382         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
19384 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
19386         PR tree-optimization/84225
19387         * tree-eh.c (find_trapping_overflow): Only call
19388         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
19390 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
19392         PR target/84145
19393         * config/i386/i386.c: Reimplement the check of possible options
19394         -mibt/-mshstk conbination. Change error messages.
19395         * doc/invoke.texi: Fix a typo: remove extra '='.
19397 2018-02-06  Marek Polacek  <polacek@redhat.com>
19399         PR tree-optimization/84228
19400         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
19402 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
19404         PR target/82641
19405         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
19406         emitted arch directives.
19407         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
19408         __ARM_FEATURE_COPROC before changing architectures.
19410 2018-02-06  Richard Biener  <rguenther@suse.de>
19412         * config/i386/i386.c (print_reg): Fix typo.
19413         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
19415 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
19417         * configure: Regenerate.
19419 2018-02-05  Martin Sebor  <msebor@redhat.com>
19421         PR tree-optimization/83369
19422         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
19423         inlining context.
19425 2018-02-05  Martin Liska  <mliska@suse.cz>
19427         * doc/invoke.texi: Cherry-pick upstream r323995.
19429 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
19431         * ira.c (ira_init_register_move_cost): Adjust comment.
19433 2018-02-05  Martin Liska  <mliska@suse.cz>
19435         PR gcov-profile/84137
19436         * doc/gcov.texi: Fix typo in documentation.
19438 2018-02-05  Martin Liska  <mliska@suse.cz>
19440         PR gcov-profile/83879
19441         * doc/gcov.texi: Document necessity of --dynamic-list-data when
19442         using dlopen functionality.
19444 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
19446         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
19447         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
19448         _mm_maskz_range_ss, _mm_mask_range_round_ss,
19449         _mm_maskz_range_round_ss): New intrinsics.
19450         (__builtin_ia32_rangesd128_round)
19451         (__builtin_ia32_rangess128_round): Remove.
19452         (__builtin_ia32_rangesd128_mask_round,
19453         __builtin_ia32_rangess128_mask_round): New builtins.
19454         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
19455         __builtin_ia32_rangess128_round): Remove.
19456         (__builtin_ia32_rangesd128_mask_round,
19457         __builtin_ia32_rangess128_mask_round): New builtins.
19458         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
19459         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
19460         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
19461         "<round_saeonly_constraint>")): Changed to ...
19462         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
19463         "<round_saeonly_scalar_constraint>")): ... this.
19464         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
19465         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
19466         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
19467         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
19468         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
19470 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
19472         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
19473         options.
19474         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
19475         Remove all values except native, 8540 and 8548.
19477 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
19479         * config/i386/i386.c (ix86_output_function_return): Pass
19480         INVALID_REGNUM, instead of -1, as invalid register number to
19481         indirect_thunk_name and output_indirect_thunk.
19483 2018-02-02  Julia Koval  <julia.koval@intel.com>
19485         * config.gcc: Add -march=icelake.
19486         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
19487         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
19488         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
19489         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
19490         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
19491         (processor_target_table): Add icelake.
19492         (ix86_option_override_internal): Handle new PTAs.
19493         (get_builtin_code_for_version): Handle icelake.
19494         (M_INTEL_COREI7_ICELAKE): New.
19495         (fold_builtin_cpu): Handle icelake.
19496         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
19497         * doc/invoke.texi: Add -march=icelake.
19499 2018-02-02  Julia Koval  <julia.koval@intel.com>
19501         * config/i386/i386.c (ix86_option_override_internal): Change flags type
19502         to wide_int_bitmask.
19503         * wide-int-bitmask.h: New.
19505 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
19507         PR target/84066
19508         * config/i386/i386.md: Replace Pmode with word_mode in
19509         builtin_setjmp_setup and builtin_longjmp to support x32.
19511 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
19513         PR target/56010
19514         PR target/83743
19515         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
19516         #include "opts.h".
19517         (rs6000_supported_cpu_names): New static variable.
19518         (linux_cpu_translation_table): Likewise.
19519         (elf_platform) <cpu>: Define new static variable and use it.
19520         Translate kernel AT_PLATFORM name to canonical name if needed.
19521         Error if platform name is unknown.
19523 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
19525         PR target/84089
19526         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
19528 2018-02-01  Jeff Law  <law@redhat.com>
19530         PR target/84128
19531         * config/i386/i386.c (release_scratch_register_on_entry): Add new
19532         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
19533         the scratch if RELEASE_VIA_POP is false.
19534         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
19535         If we have to save a temporary register, decrement SIZE appropriately.
19536         Pass new arguments to release_scratch_register_on_entry.
19537         (ix86_adjust_stack_and_probe): Likewise.
19538         (ix86_emit_probe_stack_range): Pass new arguments to
19539         release_scratch_register_on_entry.
19541 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
19543         PR rtl-optimization/84157
19544         * combine.c (change_zero_ext): Use REG_P predicate in
19545         front of HARD_REGISTER_P predicate.
19547 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
19549         * config/avr/avr.c (avr_option_override): Move disabling of
19550         -fdelete-null-pointer-checks to...
19551         * common/config/avr/avr-common.c (avr_option_optimization_table):
19552         ...here.
19554 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19556         PR tree-optimization/81635
19557         * tree-data-ref.c (split_constant_offset_1): For types that
19558         wrap on overflow, try to use range info to prove that wrapping
19559         cannot occur.
19561 2018-02-01  Renlin Li  <renlin.li@arm.com>
19563         PR target/83370
19564         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
19565         TAILCALL_ADDR_REGS.
19566         (aarch64_register_move_cost): Likewise.
19567         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
19568         TAILCALL_ADDR_REGS.
19569         (REG_CLASS_NAMES): Likewise.
19570         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
19571         TAILCALL_ADDR_REGS. Remove IP registers.
19572         * config/aarch64/aarch64.md (Ucs): Update register constraint.
19574 2018-02-01  Richard Biener  <rguenther@suse.de>
19576         * domwalk.h (dom_walker::dom_walker): Add additional constructor
19577         for specifying RPO order and allow NULL for that.
19578         * domwalk.c (dom_walker::dom_walker): Likewise.
19579         (dom_walker::walk): Handle NULL RPO order.
19580         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
19581         in RPO order.
19582         (rewrite_update_dom_walker): Likewise.
19583         (mark_def_dom_walker): Likewise.
19585 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19587         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
19588         (aarch64_maybe_expand_sve_subreg_move): Declare.
19589         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
19590         * config/aarch64/predicates.md (aarch64_any_register_operand): New
19591         predicate.
19592         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
19593         that are semantically a reverse operation.
19594         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
19595         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
19596         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
19597         functions.
19598         (aarch64_can_change_mode_class): For big-endian, forbid changes
19599         between two SVE modes if they have different element sizes.
19601 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19603         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
19604         the TImode handling for big-endian targets.
19606 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19608         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
19609         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
19610         not just bytes.
19611         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
19612         Remove BSWAP handing for big-endian targets and use the form of
19613         LD1RQ appropariate for the mode.
19615 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19617         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
19618         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
19619         duplicated element.
19621 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19623         PR tearget/83845
19624         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
19625         check for operands that need to go through aarch64_sve_reload_be.
19627 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
19629         PR tree-optimization/81661
19630         PR tree-optimization/84117
19631         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
19632         * tree-eh.c: Include gimplify.h.
19633         (find_trapping_overflow, replace_trapping_overflow,
19634         rewrite_to_non_trapping_overflow): New functions.
19635         * tree-vect-loop.c: Include tree-eh.h.
19636         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
19637         * tree-data-ref.c: Include tree-eh.h.
19638         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
19640 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
19642         PR rtl-optimization/84123
19643         * combine.c (change_zero_ext): Check if hard register satisfies
19644         can_change_dest_mode before calling gen_lowpart_SUBREG.
19646 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
19648         PR target/82444
19649         * ira.c (ira_init_register_move_cost): Remove assert.
19651 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
19653         PR rtl-optimization/84071
19654         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
19655         * doc/tm.texi: Regenerate.
19657 2018-01-31  Richard Biener  <rguenther@suse.de>
19659         PR tree-optimization/84132
19660         * tree-data-ref.c (analyze_miv_subscript): Properly
19661         check whether evolution_function_is_affine_multivariate_p
19662         before calling gcd_of_steps_may_divide_p.
19664 2018-01-31  Julia Koval  <julia.koval@intel.com>
19666         PR target/83618
19667         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
19668         * config/i386/i386.md (rdpid_rex64) New.
19669         (rdpid): Make 32bit only.
19671 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
19673         PR lto/84105
19674         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
19675         an IDENTIFIER_NODE for FUNCTION_TYPE's.
19677 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
19679         Revert
19680         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
19682         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19684 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
19686         PR rtl-optimization/84071
19687         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
19688         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
19690 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
19692         * config/arc/arc.c (arc_handle_aux_attribute): New function.
19693         (arc_attribute_table): Add 'aux' attribute.
19694         (arc_in_small_data_p): Consider aux like variables.
19695         (arc_is_aux_reg_p): New function.
19696         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
19697         (arc_get_aux_arg): New function.
19698         (prepare_move_operands): Handle aux-register access.
19699         (arc_handle_aux_attribute): New function.
19700         * doc/extend.texi (ARC Variable attributes): Add subsection.
19702 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
19704         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
19705         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
19706         (arc_attribute_table): Add 'uncached' attribute.
19707         (arc_print_operand): Print '.di' flag for uncached memory
19708         accesses.
19709         (arc_in_small_data_p): Do not consider for small data the uncached
19710         types.
19711         (arc_is_uncached_mem_p): New function.
19712         * config/arc/predicates.md (compact_store_memory_operand): Check
19713         for uncached memory accesses.
19714         (nonvol_nonimm_operand): Likewise.
19715         * doc/extend.texi (ARC Type Attribute): New subsection.
19717 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
19719         PR c/84100
19720         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
19721         falign-loops=): Add Optimization flag.
19723 2018-01-30  Jeff Law  <law@redhat.com>
19725         PR target/84064
19726         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
19727         INT_REGISTERS_SAVED.  Check it prior to calling
19728         get_scratch_register_on_entry.
19729         (ix86_adjust_stack_and_probe): Similarly.
19730         (ix86_emit_probe_stack_range): Similarly.
19731         (ix86_expand_prologue): Corresponding changes.
19733 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19735         PR target/40411
19736         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
19737         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
19739 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
19741         PR target/84112
19742         * lra-constraints.c (curr_insn_transform): Process AND in the
19743         address.
19745 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
19747         PR rtl-optimization/83986
19748         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
19749         dependence against last_pending_memory_flush in addition to
19750         pending_jump_insns.
19752 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
19754         PR tree-optimization/81611
19755         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
19756         copies.
19758 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
19760         PR target/83758
19761         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
19762         a reg rtx.
19764 2018-01-30  Richard Biener  <rguenther@suse.de>
19765             Jakub Jelinek  <jakub@redhat.com>
19767         PR tree-optimization/84111
19768         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
19769         inner loops added during recursion, as they don't have up-to-date
19770         SSA form.
19772 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
19774         PR ipa/81360
19775         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
19776         (can_inline_edge_by_limits_p): ... here.
19777         (can_early_inline_edge_p, check_callers,
19778         update_caller_keys, update_callee_keys, recursive_inlining,
19779         add_new_edges_to_heap, speculation_useful_p,
19780         inline_small_functions,
19781         inline_small_functions, flatten_function,
19782         inline_to_all_callers_1): Update.
19784 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
19786         * profile-count.c (profile_count::combine_with_ipa_count): Handle
19787         zeros correctly.
19789 2018-01-30  Richard Biener  <rguenther@suse.de>
19791         PR tree-optimization/83008
19792         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
19793         invariant and constant vector uses in stmts when they need
19794         more than one stmt.
19796 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19798         PR bootstrap/84017
19799         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
19800         * configure: Regenerate.
19802 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
19804         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
19805         pattern.
19806         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
19807         Use gen_rtx_REG rather than gen_lowpart.
19809 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
19811         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
19812         rather than 0 when creating partial subregs.
19814 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
19816         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
19817         of usage.
19819 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
19821         PR target/81550
19822         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
19823         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
19824         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
19825         flags.  This restores the settings used before the 2017-07-24.
19826         Turning off pre increment/decrement/modify allows IVOPTS to
19827         optimize DF/SF loops where the index is an int.
19829 2018-01-29  Richard Biener  <rguenther@suse.de>
19830             Kelvin Nilsen  <kelvin@gcc.gnu.org>
19832         PR bootstrap/80867
19833         * tree-vect-stmts.c (vectorizable_call): Don't call
19834         targetm.vectorize_builtin_md_vectorized_function if callee is
19835         NULL.
19837 2018-01-22  Carl Love  <cel@us.ibm.com>
19839         * doc/extend.tex: Fix typo in second arg in
19840         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
19842 2018-01-29  Richard Biener  <rguenther@suse.de>
19844         PR tree-optimization/84086
19845         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
19846         (flush_ssaname_freelist): When SSA names were released reset
19847         the SCEV hash table.
19849 2018-01-29  Richard Biener  <rguenther@suse.de>
19851         PR tree-optimization/84057
19852         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
19853         removed paths when removing edges.
19855 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
19857         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
19858         -mfunction-return=@var{choice}.
19860 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
19862         PR diagnostic/84034
19863         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
19864         Handle CR like TAB.
19865         (layout::print_source_line): Likewise.
19866         (test_get_line_width_without_trailing_whitespace): Add test cases.
19868 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
19870         PR middle-end/84040
19871         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
19872         debug insns.
19874 2018-01-26  Jim Wilson  <jimw@sifive.com>
19876         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
19878         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
19879         specified.
19881 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19883         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
19884         and CMP + SUB-immediate -> SUBS.
19886 2018-01-26  Martin Sebor  <msebor@redhat.com>
19888         PR tree-optimization/83896
19889         * tree-ssa-strlen.c (get_string_len): Rename...
19890         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
19891         Avoid assuming length is constant.
19892         (handle_char_store): Use HOST_WIDE_INT for string length.
19894 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
19896         PR target/81763
19897         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
19898         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
19900 2018-01-26  Richard Biener  <rguenther@suse.de>
19902         PR rtl-optimization/84003
19903         * dse.c (record_store): Only record redundant stores when
19904         the earlier store aliases at least all accesses the later one does.
19906 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
19908         PR rtl-optimization/83985
19909         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
19910         REG_CFA_RESTORE insns.
19911         (delete_unmarked_insns): Don't ignore separate shrink wrapping
19912         REG_CFA_RESTORE insns here.
19914         PR c/83989
19915         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
19916         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
19918 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
19920         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
19921         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
19922         (arc_init): Likewise.
19923         (arc_override_options): Likewise.
19924         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
19925         value.
19926         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
19927         support.
19928         * config/arc/arc.h (TARGET_DBNZ): Define.
19929         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
19930         properly set the tune attribute.
19931         (dbnz): Use TARGET_DBNZ guard.
19932         * config/arc/arc.opt (mtune): Add core3 option.
19934 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
19936         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
19937         recognize new pic like addresses.
19938         (arc_delegitimize_address): Clean up.
19940 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
19942         * config/arc/arc-arches.def: Option mrf16 valid for all
19943         architectures.
19944         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
19945         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
19946         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
19947         * config/arc/arc-tables.opt: Regenerate.
19948         * config/arc/arc.c (arc_conditional_register_usage): Handle
19949         reduced register file case.
19950         (arc_file_start): Set must have build attributes.
19951         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
19952         mrf16 option value.
19953         * config/arc/arc.opt (mrf16): Add new option.
19954         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
19955         * config/arc/genmultilib.awk: Handle new mrf16 option.
19956         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
19957         * config/arc/t-multilib: Regenerate.
19958         * doc/invoke.texi (ARC Options): Document mrf16 option.
19960 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
19962         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
19963         * config/arc/arc.c (arc_handle_secure_attribute): New function.
19964         (arc_attribute_table): Add 'secure_call' attribute.
19965         (arc_print_operand): Print secure call operand.
19966         (arc_function_ok_for_sibcall): Don't optimize tail calls when
19967         secure.
19968         (arc_is_secure_call_p): New function.  * config/arc/arc.md
19969         (call_i): Add support for sjli instruction.
19970         (call_value_i): Likewise.
19971         * config/arc/constraints.md (Csc): New constraint.
19973 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
19974             John Eric Martin  <John.Martin@emmicro-us.com>
19976         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
19977         * config/arc/arc.c (_arc_jli_section): New struct.
19978         (arc_jli_section): New type.
19979         (rc_jli_sections): New static variable.
19980         (arc_handle_jli_attribute): New function.
19981         (arc_attribute_table): Add jli_always and jli_fixed attribute.
19982         (arc_file_end): New function.
19983         (TARGET_ASM_FILE_END): Define.
19984         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
19985         (arc_add_jli_section): New function.
19986         (jli_call_scan): Likewise.
19987         (arc_reorg): Call jli_call_scan.
19988         (arc_output_addsi): Remove 'S' from printing asm operand.
19989         (arc_is_jli_call_p): New function.
19990         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
19991         operand.
19992         (movhi_insn): Likewise.
19993         (movsi_insn): Likewise.
19994         (movsi_set_cc_insn): Likewise.
19995         (loadqi_update): Likewise.
19996         (load_zeroextendqisi_update): Likewise.
19997         (load_signextendqisi_update): Likewise.
19998         (loadhi_update): Likewise.
19999         (load_zeroextendhisi_update): Likewise.
20000         (load_signextendhisi_update): Likewise.
20001         (loadsi_update): Likewise.
20002         (loadsf_update): Likewise.
20003         (movsicc_insn): Likewise.
20004         (bset_insn): Likewise.
20005         (bxor_insn): Likewise.
20006         (bclr_insn): Likewise.
20007         (bmsk_insn): Likewise.
20008         (bicsi3_insn): Likewise.
20009         (cmpsi_cc_c_insn): Likewise.
20010         (movsi_ne): Likewise.
20011         (movsi_cond_exec): Likewise.
20012         (clrsbsi2): Likewise.
20013         (norm_f): Likewise.
20014         (normw): Likewise.
20015         (swap): Likewise.
20016         (divaw): Likewise.
20017         (flag): Likewise.
20018         (sr): Likewise.
20019         (kflag): Likewise.
20020         (ffs): Likewise.
20021         (ffs_f): Likewise.
20022         (fls): Likewise.
20023         (call_i): Remove 'S' asm letter, add jli instruction.
20024         (call_value_i): Likewise.
20025         * config/arc/arc.op (mjli-always): New option.
20026         * config/arc/constraints.md (Cji): New constraint.
20027         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
20028         operand.
20029         (subsf3_fpx): Likewise.
20030         (mulsf3_fpx): Likewise.
20031         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
20032         asm operand.
20033         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
20034         function attrbutes.
20035         * doc/invoke.texi (ARC): Document mjli-always option.
20037 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
20039         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
20040         avoid addition with 0 and use incw and decw where possible.
20042 2018-01-26  Richard Biener  <rguenther@suse.de>
20044         PR tree-optimization/81082
20045         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
20046         association if it requires casting to unsigned.
20047         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
20048         from fold_plusminus_mult_expr to catch important cases late when
20049         range info is available.
20051 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20053         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
20054         * configure.ac (hidden_linkonce): New test.
20055         * configure: Regenerate.
20056         * config.in: Regenerate.
20058 2018-01-26  Julia Koval  <julia.koval@intel.com>
20060         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
20061         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
20062         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
20063         _mm_mask_bitshuffle_epi64_mask): Fix type.
20064         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
20065         USI_FTYPE_V4DI_V4DI_USI): Remove.
20066         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
20067         __builtin_ia32_vpshufbitqmb256_mask,
20068         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
20069         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
20070         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
20072 2018-01-26  Alan Modra  <amodra@gmail.com>
20074         PR target/84033
20075         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
20076         UNSPEC_VBPERMQ.  Sort other unspecs.
20078 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
20080         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
20082 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
20084         PR middle-end/83055
20085         * predict.c (drop_profile): Do not push/pop cfun; update also
20086         node->count.
20087         (handle_missing_profiles): Fix logic looking for zero profiles.
20089 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
20091         PR middle-end/83977
20092         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
20093         on functions with #pragma omp declare simd or functions with simd
20094         attribute.
20095         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
20096         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
20097         Remove trailing \n from warning_at calls.
20099 2018-01-25  Tom de Vries  <tom@codesourcery.com>
20101         PR target/84028
20102         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20103         for neutered workers.
20105 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
20107         PR target/68467
20108         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
20109         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
20111 2018-01-24  Jeff Law  <law@redhat.com>
20113         PR target/83994
20114         * i386.c (get_probe_interval): Move to earlier point.
20115         (ix86_compute_frame_layout): If -fstack-clash-protection and
20116         the frame is larger than the probe interval, then use pushes
20117         to save registers rather than reg->mem moves.
20118         (ix86_expand_prologue): Remove conditional for int_registers_saved
20119         assertion.
20121 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
20123         PR target/84014
20124         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
20125         min/max for never referenced object.
20127 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
20129         PR middle-end/83977
20130         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
20131         here.
20132         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
20133         attributes from DECL_ATTRIBUTES (decl) without affecting
20134         DECL_ATTRIBUTES (current_function_decl).
20135         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
20136         functions with non-NULL DECL_ABSTRACT_ORIGIN.
20138 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
20140         PR tree-optimization/83979
20141         * fold-const.c (fold_comparison): Use constant_boolean_node
20142         instead of boolean_{true,false}_node.
20144 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
20146         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
20147         with zero counts.
20149 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20151         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20152         Simplify the clause that sets the length attribute.
20153         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20154         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
20155         clause that sets the length attribute.
20156         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20158 2018-01-24  Tom de Vries  <tom@codesourcery.com>
20160         PR target/83589
20161         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
20162         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
20163         Add strict parameter.
20164         (prevent_branch_around_nothing): Insert dummy insn between branch to
20165         label and label with no ptx insn inbetween.
20166         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
20168 2018-01-24  Tom de Vries  <tom@codesourcery.com>
20170         PR target/81352
20171         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20172         for neutered threads in warp.
20173         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
20175 2018-01-24  Richard Biener  <rguenther@suse.de>
20177         PR tree-optimization/83176
20178         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
20179         operands.
20181 2018-01-24  Richard Biener  <rguenther@suse.de>
20183         PR tree-optimization/82819
20184         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
20185         code generating pluses that are no-ops in the target precision.
20187 2018-01-24  Richard Biener  <rguenther@suse.de>
20189         PR middle-end/84000
20190         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
20192 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
20194         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
20195         to merge probabilities.
20196         * predict.c (probably_never_executed): Also mark as cold functions
20197         with global 0 profile and guessed local profile.
20198         * profile-count.c (profile_probability::combine_with_count): New
20199         member function.
20200         * profile-count.h (profile_probability::operator*,
20201         profile_probability::operator*=, profile_probability::operator/,
20202         profile_probability::operator/=): Reduce precision to adjusted
20203         and set value to guessed on contradictory divisions.
20204         (profile_probability::combine_with_freq): Remove.
20205         (profile_probability::combine_wiht_count): Declare.
20206         (profile_count::force_nonzero):: Set to adjusted.
20207         (profile_count::probability_in):: Set quality to adjusted.
20208         * tree-ssa-tail-merge.c (replace_block_by): Use
20209         combine_with_count.
20211 2018-01-23  Andrew Waterman  <andrew@sifive.com>
20212             Jim Wilson  <jimw@sifive.com>
20214         * config/riscv/riscv.c (riscv_stack_boundary): New.
20215         (riscv_option_override): Set riscv_stack_boundary.  Handle
20216         riscv_preferred_stack_boundary_arg.
20217         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
20218         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
20219         (STACK_BOUNDARY): Set to riscv_stack_boundary.
20220         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
20221         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
20222         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
20224 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
20226         PR target/83905
20227         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
20228         of struct ix86_frame.
20229         (ix86_expand_epilogue): Likewise.  Add a local variable for
20230         the reg_save_offset field in struct ix86_frame.
20232 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
20234         PR tree-optimization/82604
20235         * tree-loop-distribution.c (enum partition_kind): New enum item
20236         PKIND_PARTIAL_MEMSET.
20237         (partition_builtin_p): Support above new enum item.
20238         (generate_code_for_partition): Ditto.
20239         (compute_access_range): Differentiate cases that equality can be
20240         proven at all loops, the innermost loops or no loops.
20241         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
20242         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
20243         (finalize_partitions, distribute_loop): Don't fuse partition of
20244         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
20245         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
20246         parloop is enabled.
20248 2018-01-23  Martin Liska  <mliska@suse.cz>
20250         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
20251         order to ignore the predictor.
20252         (PRED_POLYMORPHIC_CALL): Likewise.
20253         (PRED_RECURSIVE_CALL): Likewise.
20255 2018-01-23  Martin Liska  <mliska@suse.cz>
20257         * tree-profile.c (tree_profiling): Print function header to
20258         aware reader which function we are working on.
20259         * value-prof.c (gimple_find_values_to_profile): Do not print
20260         not interesting value histograms.
20262 2018-01-23  Martin Liska  <mliska@suse.cz>
20264         * profile-count.h (enum profile_quality): Add
20265         profile_uninitialized as the first value. Do not number values
20266         as they are zero based.
20267         (profile_count::verify): Update sanity check.
20268         (profile_probability::verify): Likewise.
20270 2018-01-23  Nathan Sidwell  <nathan@acm.org>
20272         * doc/invoke.texi (ffor-scope): Deprecate.
20274 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
20276         PR tree-optimization/83510
20277         * domwalk.c (set_all_edges_as_executable): New function.
20278         (dom_walker::dom_walker): Convert bool param
20279         "skip_unreachable_blocks" to enum reachability.  Move setup of
20280         edge flags to set_all_edges_as_executable and only do it when
20281         reachability is REACHABLE_BLOCKS.
20282         * domwalk.h (enum dom_walker::reachability): New enum.
20283         (dom_walker::dom_walker): Convert bool param
20284         "skip_unreachable_blocks" to enum reachability.
20285         (set_all_edges_as_executable): New decl.
20286         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
20287         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
20288         "reachability".
20289         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
20290         but converting true to REACHABLE_BLOCKS.
20291         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
20292         * tree-vrp.c
20293         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
20294         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
20295         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
20296         REACHABLE_BLOCKS.
20297         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
20298         if check_all_array_refs will be called.
20300 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
20302         * tree.c (selftest::test_location_wrappers): Add more test
20303         coverage.
20305 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
20307         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
20308         (selftest::test_bit_in_range): Likewise.
20310 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
20312         PR testsuite/83888
20313         * doc/sourcebuild.texi (vect_float): Say that the selector
20314         only describes the situation when -funsafe-math-optimizations is on.
20315         (vect_float_strict): Document.
20317 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
20319         PR tree-optimization/83965
20320         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
20321         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
20322         instead of checking only for a reduction.
20323         (vect_recog_widen_sum_pattern): Likewise.
20325 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
20327         * predict.c (probably_never_executed): Only use precise profile info.
20328         (compute_function_frequency): Skip after inlining hack since we now
20329         have quality checking.
20331 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
20333         * profile-count.h (profile_probability::very_unlikely,
20334         profile_probability::unlikely, profile_probability::even): Set
20335         precision to guessed.
20337 2018-01-23  Richard Biener  <rguenther@suse.de>
20339         PR tree-optimization/83963
20340         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
20341         Properly terminate dominator walk when crossing the exit edge not
20342         when visiting its source block.
20344 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
20346         PR c++/83918
20347         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
20348         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
20350 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
20352         PR tree-optimization/83957
20353         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
20354         semicolon after for body surrounded by braces.
20356         PR tree-optimization/83081
20357         * profile-count.h (profile_probability::split): New method.
20358         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
20359         Use profile_probability::split.
20360         (do_compare_rtx_and_jump): Fix adjustment of probabilities
20361         when splitting a single conditional jump into 2.
20363 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
20365         PR tree-optimization/69452
20366         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
20367         decl.
20369 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20371         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
20372         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
20373         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
20375 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20377         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
20378         declaration.
20379         * config/rl78/rl78.md (movdi): New define_expand.
20380         * config/rl78/rl78.c (rl78_split_movdi): New function.
20382 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
20384         PR target/83862
20385         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
20386         no longer used.
20387         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
20388         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
20389         128-bit to produce an UNSPEC move to get the double word with the
20390         signbit and then a shift directly to do signbit.
20391         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
20392         implementation with a new version that just does either a direct
20393         move or a regular move.  Move memory interface to separate insns.
20394         Move insns so they are next to the expander.
20395         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
20396         with signbit move.  Split big and little endian case.
20397         (signbit<mode>2_dm_mem_le): Likewise.
20398         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
20399         (signbit<mode>2_dm2): Likewise.
20401 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20403         * config/rl78/rl78.md (anddi3): New define_expand.
20405 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20407         * config/rl78/rl78.md (umindi3): New define_expand.
20409 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20411         * config/rl78/rl78.md (smindi3): New define_expand.
20413 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20415         * config/rl78/rl78.md (smaxdi3): New define_expand.
20417 2018-01-22  Carl Love  <cel@us.ibm.com>
20419         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
20420         LVX_V1TI): Add macro expansion.
20421         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
20422         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
20423         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
20424         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
20425         Change check to determine if the instruction is a byte reversing
20426         entry.  Fix typo in comment.
20427         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
20428         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
20429         Add def_builtin calls for new builtins.
20430         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
20431         Add define_insn expansion.
20433 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20435         * config/rl78/rl78.md (umaxdi3): New define_expand.
20437 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20439         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
20440         for non-QImode registers.
20442 2018-01-22  Richard Biener  <rguenther@suse.de>
20444         PR tree-optimization/83963
20445         * graphite-scop-detection.c (scop_detection::get_sese): Delay
20446         including the loop exit block.
20447         (scop_detection::merge_sese): Likewise.
20448         (scop_detection::add_scop): Do it here instead.
20450 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20452         * doc/sourcebuild.texi (arm_softfloat): Document.
20454 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
20456         PR gcc/77734
20457         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
20458         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
20459         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
20461 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20462             David Edelsohn  <dje.gcc@gmail.com>
20464         PR target/83946
20465         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20466         Change "crset eq" to "crset 2".
20467         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20468         (*call_indirect_aix<mode>_nospec): Likewise.
20469         (*call_value_indirect_aix<mode>_nospec): Likewise.
20470         (*call_indirect_elfv2<mode>_nospec): Likewise.
20471         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
20472         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
20473         change assembly output from . to $.
20474         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20475         (indirect_jump<mode>_nospec): Change assembly output from . to $.
20476         (*tablejump<mode>_internal1_nospec): Likewise.
20478 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
20480         PR target/80870
20481         * config/sh/sh_optimize_sett_clrt.cc:
20482         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
20484 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
20486         PR tree-optimization/83940
20487         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
20488         offset_dt to vect_constant_def rather than vect_unknown_def_type.
20489         (vect_check_load_store_mask): Add a mask_dt_out parameter and
20490         use it to pass back the definition type.
20491         (vect_check_store_rhs): Likewise rhs_dt_out.
20492         (vect_build_gather_load_calls): Add a mask_dt argument and use
20493         it instead of a call to vect_is_simple_use.
20494         (vectorizable_store): Update calls to vect_check_load_store_mask
20495         and vect_check_store_rhs.  Use the dt returned by the latter instead
20496         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
20497         instead of calls to vect_is_simple_use.  Pass the scalar rather
20498         than the vector operand to vect_is_simple_use when handling
20499         second and subsequent copies of an rhs value.
20500         (vectorizable_load): Update calls to vect_check_load_store_mask
20501         and vect_build_gather_load_calls.  Use the cached mask_dt and
20502         gs_info.offset_dt instead of calls to vect_is_simple_use.
20504 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
20506         PR middle-end/83945
20507         * tree-emutls.c: Include gimplify.h.
20508         (lower_emutls_2): New function.
20509         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
20510         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
20511         it before further processing.
20513         PR target/83930
20514         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
20515         UINTVAL (trueop1) instead of INTVAL (op1).
20517 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
20519         PR debug/81570
20520         PR debug/83728
20521         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
20522         INCOMING_FRAME_SP_OFFSET if not defined.
20523         (scan_trace): Add ENTRY argument.  If true and
20524         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
20525         emit a note to adjust the CFA offset.
20526         (create_cfi_notes): Adjust scan_trace callers.
20527         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
20528         INCOMING_FRAME_SP_OFFSET in the CIE.
20529         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
20530         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
20531         Likewise.
20532         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
20533         * doc/tm.texi: Regenerated.
20535 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
20537         PR rtl-optimization/83147
20538         * lra-constraints.c (remove_inheritance_pseudos): Use
20539         lra_substitute_pseudo_within_insn.
20541 2018-01-19  Tom de Vries  <tom@codesourcery.com>
20542             Cesar Philippidis  <cesar@codesourcery.com>
20544         PR target/83920
20545         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
20547 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
20549         PR target/83790
20550         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
20551         spaces for function labels.
20553 2018-01-19  Martin Liska  <mliska@suse.cz>
20555         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
20556         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
20557         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
20558         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
20559         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
20560         (PRED_CONST_RETURN): Change from 69 to 65.
20561         (PRED_NULL_RETURN): Change from 91 to 71.
20562         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
20563         (PRED_LOOP_GUARD): Change from 66 to 73.
20565 2018-01-19  Martin Liska  <mliska@suse.cz>
20567         * predict.c (predict_insn_def): Add new assert.
20568         (struct branch_predictor): Change type to signed integer.
20569         (test_prediction_value_range): Amend test to cover
20570         PROB_UNINITIALIZED.
20571         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
20572         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
20573         (PRED_LOOP_ITERATIONS_MAX): Likewise.
20574         (PRED_LOOP_IV_COMPARE): Likewise.
20575         * predict.h (PROB_UNINITIALIZED): Define new constant.
20577 2018-01-19  Martin Liska  <mliska@suse.cz>
20579         * predict.c (dump_prediction): Add new format for
20580         analyze_brprob.py script which is enabled with -details
20581         suboption.
20582         * profile-count.h (precise_p): New function.
20584 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
20586         PR tree-optimization/83922
20587         * tree-vect-loop.c (vect_verify_full_masking): Return false if
20588         there are no statements that need masking.
20589         (vect_active_double_reduction_p): New function.
20590         (vect_analyze_loop_operations): Use it when handling phis that
20591         are not in the loop header.
20593 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
20595         PR tree-optimization/83914
20596         * tree-vect-loop.c (vectorizable_induction): Don't convert
20597         init_expr or apply the peeling adjustment for inductions
20598         that are nested within the vectorized loop.
20600 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20602         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
20603         instead of NEG.
20605 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
20607         PR sanitizer/81715
20608         PR testsuite/83882
20609         * function.h (gimplify_parameters): Add gimple_seq * argument.
20610         * function.c: Include gimple.h and options.h.
20611         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
20612         for the added local temporaries if needed.
20613         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
20614         if there are any parameter cleanups, wrap whole body into a
20615         try/finally with the cleanups.
20617 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
20619         PR target/82964
20620         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
20621         Use GET_MODE_CLASS for scalar floating point.
20623 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
20625         PR ipa/82256
20626         patch by PaX Team
20627         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
20628         Fix call of call_cgraph_insertion_hooks.
20630 2018-01-18  Martin Sebor  <msebor@redhat.com>
20632         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
20634 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
20636         PR ipa/83619
20637         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
20638         frequencies.
20640 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
20642         PR other/70268
20643         * common.opt: (-ffile-prefix-map): New option.
20644         * opts.c (common_handle_option): Defer it.
20645         * opts-global.c (handle_common_deferred_options): Handle it.
20646         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
20647         * file-prefix-map.h: New file.
20648         (remap_debug_filename, add_debug_prefix_map): ...here.
20649         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
20650         * final.c (debug_prefix_map, add_debug_prefix_map
20651         remap_debug_filename): Move to...
20652         * file-prefix-map.c: New file.
20653         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
20654         generalize, get rid of alloca(), use strrchr() instead of strchr().
20655         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
20656         Implement in terms of add_prefix_map().
20657         (remap_macro_filename, remap_debug_filename): Implement in term of
20658         remap_filename().
20659         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
20660         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
20661         * dbxout.c: Include file-prefix-map.h.
20662         * varasm.c: Likewise.
20663         * vmsdbgout.c: Likewise.
20664         * xcoffout.c: Likewise.
20665         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
20666         * doc/cppopts.texi (-fmacro-prefix-map): Document.
20667         * doc/invoke.texi (-ffile-prefix-map): Document.
20668         (-fdebug-prefix-map): Update description.
20670 2018-01-18  Martin Liska  <mliska@suse.cz>
20672         * config/i386/i386.c (indirect_thunk_name): Document that also
20673         lfence is emitted.
20674         (output_indirect_thunk): Document why both instructions
20675         (pause and lfence) are generated.
20677 2018-01-18  Richard Biener  <rguenther@suse.de>
20679         PR tree-optimization/83887
20680         * graphite-scop-detection.c
20681         (scop_detection::get_nearest_dom_with_single_entry): Remove.
20682         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
20683         (scop_detection::merge_sese): Re-implement with a flood-fill
20684         algorithm that properly finds a SESE region if it exists.
20686 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
20688         PR c/61240
20689         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
20690         pointer_diff optimizations use view_convert instead of convert.
20692 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20694         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20695         Generate different code for -mno-speculate-indirect-jumps.
20696         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20697         (*call_indirect_aix<mode>): Disable for
20698         -mno-speculate-indirect-jumps.
20699         (*call_indirect_aix<mode>_nospec): New define_insn.
20700         (*call_value_indirect_aix<mode>): Disable for
20701         -mno-speculate-indirect-jumps.
20702         (*call_value_indirect_aix<mode>_nospec): New define_insn.
20703         (*sibcall_nonlocal_sysv<mode>): Generate different code for
20704         -mno-speculate-indirect-jumps.
20705         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20707 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
20709         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
20710         long double type, set the flags for noting the default long double
20711         type, even if we don't pass or return a long double type.
20713 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
20715         PR ipa/83051
20716         * ipa-inline.c (flatten_function): Do not overwrite final inlining
20717         failure.
20719 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
20721         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
20722         support for merge[hl].
20723         (fold_mergehl_helper): New helper function.
20724         (tree-vector-builder.h): New #include for tree_vector_builder usage.
20725         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
20726         (altivec_vmrglw_direct): Add xxmrglw insn.
20728 2018-01-17  Andrew Waterman  <andrew@sifive.com>
20730         * config/riscv/riscv.c (riscv_conditional_register_usage): If
20731         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
20733 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
20735         PR lto/83121
20736         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
20737         call the lto_location_cache before reading the
20738         DECL_SOURCE_LOCATION of the types.
20740 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
20741             Richard Sandiford  <richard.sandiford@linaro.org>
20743         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
20744         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
20745         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
20746         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
20747         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
20748         Add declaration.
20749         * config/aarch64/constraints.md (aarch64_movti_operand):
20750         Limit immediates.
20751         * config/aarch64/predicates.md (Uti): Add new constraint.
20753 2018-01-17  Carl Love  <cel@us.ibm.com>
20755         * config/rs6000/vsx.md (define_expand xl_len_r,
20756         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
20757         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
20758         lxvll.
20759         (define_expand, define_insn): Move the shift left from  the
20760         define_insn to the define_expand for lxvl and stxvl instructions.
20761         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
20762         and XL_LEN_R definitions to PURE.
20764 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
20766         * config/i386/i386.c (indirect_thunk_name): Declare regno
20767         as unsigned int.  Compare regno with INVALID_REGNUM.
20768         (output_indirect_thunk): Ditto.
20769         (output_indirect_thunk_function): Ditto.
20770         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
20771         in the call to output_indirect_thunk_function.
20773 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
20775         PR middle-end/83884
20776         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
20777         rather than the size of inner_type to determine the stack slot size
20778         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
20780 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
20782         PR target/83546
20783         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
20784         to PTA_SILVERMONT.
20786 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
20788         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
20789         endian Linux systems to optionally enable multilibs for selecting
20790         the long double type if the user configured an explicit type.
20791         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
20792         have no long double multilibs if not defined.
20793         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
20794         warn if the user used -mabi={ieee,ibm}longdouble and we built
20795         multilibs for long double.
20796         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
20797         appropriate multilib option.
20798         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
20799         multilib options.
20800         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
20801         for building long double multilibs.
20802         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
20804 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
20806         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
20807         copies.
20809         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
20810         64 bits.
20811         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
20812         128 bits.
20814         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
20815         variables.
20817         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
20818         return value.
20820 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
20822         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
20823         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
20825 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20827         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
20828         different rtl trees depending on TARGET_64BIT.
20829         (rs6000_gen_lvx): Likewise.
20831 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
20833         * config/visium/visium.md (nop): Tweak comment.
20834         (hazard_nop): Likewise.
20836 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20838         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
20839         -mspeculate-indirect-jumps.
20840         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
20841         for -mno-speculate-indirect-jumps.
20842         (*call_indirect_elfv2<mode>_nospec): New define_insn.
20843         (*call_value_indirect_elfv2<mode>): Disable for
20844         -mno-speculate-indirect-jumps.
20845         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
20846         (indirect_jump): Emit different RTL for
20847         -mno-speculate-indirect-jumps.
20848         (*indirect_jump<mode>): Disable for
20849         -mno-speculate-indirect-jumps.
20850         (*indirect_jump<mode>_nospec): New define_insn.
20851         (tablejump): Emit different RTL for
20852         -mno-speculate-indirect-jumps.
20853         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
20854         (tablejumpsi_nospec): New define_expand.
20855         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
20856         (tablejumpdi_nospec): New define_expand.
20857         (*tablejump<mode>_internal1): Disable for
20858         -mno-speculate-indirect-jumps.
20859         (*tablejump<mode>_internal1_nospec): New define_insn.
20860         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
20861         option.
20863 2018-01-16  Artyom Skrobov tyomitch@gmail.com
20865         * caller-save.c (insert_save): Drop unnecessary parameter.  All
20866         callers updated.
20868 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
20869             Richard Biener  <rguenth@suse.de>
20871         PR libgomp/83590
20872         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
20873         return early, inline manually is_gimple_sizepos.  Make sure if we
20874         call gimplify_expr we don't end up with a gimple constant.
20875         * tree.c (variably_modified_type_p): Don't return true for
20876         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
20877         * gimplify.h (is_gimple_sizepos): Remove.
20879 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
20881         PR tree-optimization/83857
20882         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
20883         vectorizable_live_operation for pure SLP statements.
20884         (vectorizable_live_operation): Handle PHIs.
20886 2018-01-16  Richard Biener  <rguenther@suse.de>
20888         PR tree-optimization/83867
20889         * tree-vect-stmts.c (vect_transform_stmt): Precompute
20890         nested_in_vect_loop_p since the scalar stmt may get invalidated.
20892 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
20894         PR c/83844
20895         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
20896         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
20897         If off is not INTEGER_CST, issue a may not be aligned warning
20898         rather than isn't aligned.  Use isn%'t rather than isn't.
20899         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
20900         into MULT_EXPR.
20901         <case MULT_EXPR>: Improve the case when bottom and one of the
20902         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
20903         operand, in that case check if the other operand is multiple of
20904         bottom divided by the INTEGER_CST operand.
20906 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
20908         PR target/83858
20909         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
20910         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
20911         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
20912         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
20913         * config/pa/pa.c (pa_function_arg_advance): Likewise.
20914         (pa_function_arg, pa_arg_partial_bytes): Likewise.
20915         (pa_function_arg_size): New function.
20917 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
20919         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
20920         in a separate statement.
20922 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
20924         PR tree-optimization/83847
20925         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
20926         group gathers and scatters.
20928 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
20930         PR rtl-optimization/86620
20931         * params.def (max-sched-ready-insns): Bump minimum value to 1.
20933         PR rtl-optimization/83213
20934         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
20935         to last if both are JUMP_INSNs.
20937         PR tree-optimization/83843
20938         * gimple-ssa-store-merging.c
20939         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
20940         store_immediate_info for bswap/nop orig_stores.
20942 2018-01-15  Andrew Waterman  <andrew@sifive.com>
20944         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
20945         !TARGET_MUL.
20946         <UDIV>: Increase cost if !TARGET_DIV.
20948 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
20950         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
20951         (define_attr "cr_logical_3op"): New.
20952         (cceq_ior_compare): Adjust.
20953         (cceq_ior_compare_complement): Adjust.
20954         (*cceq_rev_compare): Adjust.
20955         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
20956         (is_cracked_insn): Adjust.
20957         (insn_must_be_first_in_group): Adjust.
20958         * config/rs6000/40x.md: Adjust.
20959         * config/rs6000/440.md: Adjust.
20960         * config/rs6000/476.md: Adjust.
20961         * config/rs6000/601.md: Adjust.
20962         * config/rs6000/603.md: Adjust.
20963         * config/rs6000/6xx.md: Adjust.
20964         * config/rs6000/7450.md: Adjust.
20965         * config/rs6000/7xx.md: Adjust.
20966         * config/rs6000/8540.md: Adjust.
20967         * config/rs6000/cell.md: Adjust.
20968         * config/rs6000/e300c2c3.md: Adjust.
20969         * config/rs6000/e500mc.md: Adjust.
20970         * config/rs6000/e500mc64.md: Adjust.
20971         * config/rs6000/e5500.md: Adjust.
20972         * config/rs6000/e6500.md: Adjust.
20973         * config/rs6000/mpc.md: Adjust.
20974         * config/rs6000/power4.md: Adjust.
20975         * config/rs6000/power5.md: Adjust.
20976         * config/rs6000/power6.md: Adjust.
20977         * config/rs6000/power7.md: Adjust.
20978         * config/rs6000/power8.md: Adjust.
20979         * config/rs6000/power9.md: Adjust.
20980         * config/rs6000/rs64.md: Adjust.
20981         * config/rs6000/titan.md: Adjust.
20983 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
20985         * config/i386/predicates.md (indirect_branch_operand): Rewrite
20986         ix86_indirect_branch_register logic.
20988 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
20990         * config/i386/constraints.md (Bs): Update
20991         ix86_indirect_branch_register check.  Don't check
20992         ix86_indirect_branch_register with GOT_memory_operand.
20993         (Bw): Likewise.
20994         * config/i386/predicates.md (GOT_memory_operand): Don't check
20995         ix86_indirect_branch_register here.
20996         (GOT32_symbol_operand): Likewise.
20998 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
21000         * config/i386/predicates.md (constant_call_address_operand):
21001         Rewrite ix86_indirect_branch_register logic.
21002         (sibcall_insn_operand): Likewise.
21004 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
21006         * config/i386/constraints.md (Bs): Replace
21007         ix86_indirect_branch_thunk_register with
21008         ix86_indirect_branch_register.
21009         (Bw): Likewise.
21010         * config/i386/i386.md (indirect_jump): Likewise.
21011         (tablejump): Likewise.
21012         (*sibcall_memory): Likewise.
21013         (*sibcall_value_memory): Likewise.
21014         Peepholes of indirect call and jump via memory: Likewise.
21015         * config/i386/i386.opt: Likewise.
21016         * config/i386/predicates.md (indirect_branch_operand): Likewise.
21017         (GOT_memory_operand): Likewise.
21018         (call_insn_operand): Likewise.
21019         (sibcall_insn_operand): Likewise.
21020         (GOT32_symbol_operand): Likewise.
21022 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
21024         PR middle-end/83837
21025         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
21026         type rather than type addr's type points to.
21027         (expand_omp_atomic_mutex): Likewise.
21028         (expand_omp_atomic): Likewise.
21030 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
21032         PR target/83839
21033         * config/i386/i386.c (output_indirect_thunk_function): Use
21034         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
21035         for  __x86_return_thunk.
21037 2018-01-15  Richard Biener  <rguenther@suse.de>
21039         PR middle-end/83850
21040         * expmed.c (extract_bit_field_1): Fix typo.
21042 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21044         PR target/83687
21045         * config/arm/iterators.md (VF): New mode iterator.
21046         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
21047         Remove integer-related logic from pattern.
21048         (neon_vabd<mode>_3): Likewise.
21050 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
21052         PR middle-end/82694
21053         * common.opt (fstrict-overflow): No longer an alias.
21054         (fwrapv-pointer): New option.
21055         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
21056         also for pointer types based on flag_wrapv_pointer.
21057         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
21058         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
21059         opts->x_flag_wrapv got set.
21060         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
21061         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
21062         POINTER_TYPE_OVERFLOW_UNDEFINED.
21063         * match.pd: Likewise in address comparison pattern.
21064         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
21066 2018-01-15  Richard Biener  <rguenther@suse.de>
21068         PR lto/83804
21069         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
21070         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
21071         Reset type names to their identifier if their TYPE_DECL doesn't
21072         have linkage (and thus is used for ODR and devirt).
21073         (save_debug_info_for_decl): Remove.
21074         (save_debug_info_for_type): Likewise.
21075         (add_tree_to_fld_list): Adjust.
21076         * tree-pretty-print.c (dump_generic_node): Make dumping of
21077         type names more robust.
21079 2018-01-15  Richard Biener  <rguenther@suse.de>
21081         * BASE-VER: Bump to 8.0.1.
21083 2018-01-14  Martin Sebor  <msebor@redhat.com>
21085         PR other/83508
21086         * builtins.c (check_access): Avoid warning when the no-warning bit
21087         is set.
21089 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
21091         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
21092         * ira-color (allocno_hard_regs_compare): Likewise.
21094 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
21096         PR target/83013
21097         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
21098         Use .pushsection/.popsection.
21100 2018-01-14  Martin Sebor  <msebor@redhat.com>
21102         PR c++/81327
21103         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
21105 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
21107         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
21108         entry from extra_headers.
21109         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
21110         extra_headers, make the list bitwise identical to the i?86-*-* one.
21112 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
21114         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
21115         -mcmodel=large with -mindirect-branch=thunk,
21116         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
21117         -mfunction-return=thunk-extern.
21118         * doc/invoke.texi: Document -mcmodel=large is incompatible with
21119         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
21120         -mfunction-return=thunk and -mfunction-return=thunk-extern.
21122 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
21124         * config/i386/i386.c (print_reg): Print the name of the full
21125         integer register without '%'.
21126         (ix86_print_operand): Handle 'V'.
21127         * doc/extend.texi: Document 'V' modifier.
21129 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
21131         * config/i386/constraints.md (Bs): Disallow memory operand for
21132         -mindirect-branch-register.
21133         (Bw): Likewise.
21134         * config/i386/predicates.md (indirect_branch_operand): Likewise.
21135         (GOT_memory_operand): Likewise.
21136         (call_insn_operand): Likewise.
21137         (sibcall_insn_operand): Likewise.
21138         (GOT32_symbol_operand): Likewise.
21139         * config/i386/i386.md (indirect_jump): Call convert_memory_address
21140         for -mindirect-branch-register.
21141         (tablejump): Likewise.
21142         (*sibcall_memory): Likewise.
21143         (*sibcall_value_memory): Likewise.
21144         Disallow peepholes of indirect call and jump via memory for
21145         -mindirect-branch-register.
21146         (*call_pop): Replace m with Bw.
21147         (*call_value_pop): Likewise.
21148         (*sibcall_pop_memory): Replace m with Bs.
21149         * config/i386/i386.opt (mindirect-branch-register): New option.
21150         * doc/invoke.texi: Document -mindirect-branch-register option.
21152 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
21154         * config/i386/i386-protos.h (ix86_output_function_return): New.
21155         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
21156         set function_return_type.
21157         (indirect_thunk_name): Add ret_p to indicate thunk for function
21158         return.
21159         (output_indirect_thunk_function): Pass false to
21160         indirect_thunk_name.
21161         (ix86_output_indirect_branch_via_reg): Likewise.
21162         (ix86_output_indirect_branch_via_push): Likewise.
21163         (output_indirect_thunk_function): Create alias for function
21164         return thunk if regno < 0.
21165         (ix86_output_function_return): New function.
21166         (ix86_handle_fndecl_attribute): Handle function_return.
21167         (ix86_attribute_table): Add function_return.
21168         * config/i386/i386.h (machine_function): Add
21169         function_return_type.
21170         * config/i386/i386.md (simple_return_internal): Use
21171         ix86_output_function_return.
21172         (simple_return_internal_long): Likewise.
21173         * config/i386/i386.opt (mfunction-return=): New option.
21174         (indirect_branch): Mention -mfunction-return=.
21175         * doc/extend.texi: Document function_return function attribute.
21176         * doc/invoke.texi: Document -mfunction-return= option.
21178 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
21180         * config/i386/i386-opts.h (indirect_branch): New.
21181         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
21182         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
21183         with local indirect jump when converting indirect call and jump.
21184         (ix86_set_indirect_branch_type): New.
21185         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
21186         (indirectlabelno): New.
21187         (indirect_thunk_needed): Likewise.
21188         (indirect_thunk_bnd_needed): Likewise.
21189         (indirect_thunks_used): Likewise.
21190         (indirect_thunks_bnd_used): Likewise.
21191         (INDIRECT_LABEL): Likewise.
21192         (indirect_thunk_name): Likewise.
21193         (output_indirect_thunk): Likewise.
21194         (output_indirect_thunk_function): Likewise.
21195         (ix86_output_indirect_branch_via_reg): Likewise.
21196         (ix86_output_indirect_branch_via_push): Likewise.
21197         (ix86_output_indirect_branch): Likewise.
21198         (ix86_output_indirect_jmp): Likewise.
21199         (ix86_code_end): Call output_indirect_thunk_function if needed.
21200         (ix86_output_call_insn): Call ix86_output_indirect_branch if
21201         needed.
21202         (ix86_handle_fndecl_attribute): Handle indirect_branch.
21203         (ix86_attribute_table): Add indirect_branch.
21204         * config/i386/i386.h (machine_function): Add indirect_branch_type
21205         and has_local_indirect_jump.
21206         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
21207         to true.
21208         (tablejump): Likewise.
21209         (*indirect_jump): Use ix86_output_indirect_jmp.
21210         (*tablejump_1): Likewise.
21211         (simple_return_indirect_internal): Likewise.
21212         * config/i386/i386.opt (mindirect-branch=): New option.
21213         (indirect_branch): New.
21214         (keep): Likewise.
21215         (thunk): Likewise.
21216         (thunk-inline): Likewise.
21217         (thunk-extern): Likewise.
21218         * doc/extend.texi: Document indirect_branch function attribute.
21219         * doc/invoke.texi: Document -mindirect-branch= option.
21221 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
21223         PR ipa/83051
21224         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
21226 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
21228         * ipa-inline.c (want_inline_small_function_p): Return false if
21229         inlining has already failed with CIF_FINAL_ERROR.
21230         (update_caller_keys): Call want_inline_small_function_p before
21231         can_inline_edge_p.
21232         (update_callee_keys): Likewise.
21234 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
21236         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
21237         New function.
21238         (rs6000_quadword_masked_address_p): Likewise.
21239         (quad_aligned_load_p): Likewise.
21240         (quad_aligned_store_p): Likewise.
21241         (const_load_sequence_p): Add comment to describe the outer-most loop.
21242         (mimic_memory_attributes_and_flags): New function.
21243         (rs6000_gen_stvx): Likewise.
21244         (replace_swapped_aligned_store): Likewise.
21245         (rs6000_gen_lvx): Likewise.
21246         (replace_swapped_aligned_load): Likewise.
21247         (replace_swapped_load_constant): Capitalize argument name in
21248         comment describing this function.
21249         (rs6000_analyze_swaps): Add a third pass to search for vector loads
21250         and stores that access quad-word aligned addresses and replace
21251         with stvx or lvx instructions when appropriate.
21252         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
21253         New function prototype.
21254         (rs6000_quadword_masked_address_p): Likewise.
21255         (rs6000_gen_lvx): Likewise.
21256         (rs6000_gen_stvx): Likewise.
21257         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
21258         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
21259         when memory address is aligned.
21260         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
21261         this split to select lvx instruction when memory address is aligned.
21262         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
21263         instruction when memory address is aligned.
21264         (*vsx_le_perm_load_v16qi): Likewise.
21265         (four unnamed splitters): Modify to select the stvx instruction
21266         when memory is aligned.
21268 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
21270         * predict.c (determine_unlikely_bbs): Handle correctly BBs
21271         which appears in the queue multiple times.
21273 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21274             Alan Hayward  <alan.hayward@arm.com>
21275             David Sherwood  <david.sherwood@arm.com>
21277         * tree-vectorizer.h (vec_lower_bound): New structure.
21278         (_loop_vec_info): Add check_nonzero and lower_bounds.
21279         (LOOP_VINFO_CHECK_NONZERO): New macro.
21280         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
21281         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
21282         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
21283         fields.  Make seg_len the distance travelled, not including the
21284         access size.
21285         (dr_direction_indicator): Declare.
21286         (dr_zero_step_indicator): Likewise.
21287         (dr_known_forward_stride_p): Likewise.
21288         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
21289         tree-ssanames.h.
21290         (runtime_alias_check_p): Allow runtime alias checks with
21291         variable strides.
21292         (operator ==): Compare access_size and align.
21293         (prune_runtime_alias_test_list): Rework for new distinction between
21294         the access_size and seg_len.
21295         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
21296         segment lengths.
21297         (get_segment_min_max): New function.
21298         (create_intersect_range_checks): Use it.
21299         (dr_step_indicator): New function.
21300         (dr_direction_indicator): Likewise.
21301         (dr_zero_step_indicator): Likewise.
21302         (dr_known_forward_stride_p): Likewise.
21303         * tree-loop-distribution.c (data_ref_segment_size): Return
21304         DR_STEP * (niters - 1).
21305         (compute_alias_check_pairs): Update call to the dr_with_seg_len
21306         constructor.
21307         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
21308         (vect_preserves_scalar_order_p): New function, split out from...
21309         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
21310         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
21311         (vect_vfa_access_size): New function.
21312         (vect_vfa_align): Likewise.
21313         (vect_compile_time_alias): Take access_size_a and access_b arguments.
21314         (dump_lower_bound): New function.
21315         (vect_check_lower_bound): Likewise.
21316         (vect_small_gap_p): Likewise.
21317         (vectorizable_with_step_bound_p): Likewise.
21318         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
21319         depencies if the vectorization factor is 1.  Convert the checks
21320         for nonzero steps into checks on the bounds of DR_STEP.  Try using
21321         a bunds check for variable steps if the minimum required step is
21322         relatively small. Update calls to the dr_with_seg_len
21323         constructor and to vect_compile_time_alias.
21324         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
21325         function.
21326         (vect_loop_versioning): Call it.
21327         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
21328         when retrying.
21329         (vect_estimate_min_profitable_iters): Account for any bounds checks.
21331 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21332             Alan Hayward  <alan.hayward@arm.com>
21333             David Sherwood  <david.sherwood@arm.com>
21335         * doc/sourcebuild.texi (vect_scatter_store): Document.
21336         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
21337         optabs.
21338         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
21339         Document.
21340         * genopinit.c (main): Add supports_vec_scatter_store and
21341         supports_vec_scatter_store_cached to target_optabs.
21342         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
21343         IFN_MASK_SCATTER_STORE.
21344         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
21345         functions.
21346         * internal-fn.h (internal_store_fn_p): Declare.
21347         (internal_fn_stored_value_index): Likewise.
21348         * internal-fn.c (scatter_store_direct): New macro.
21349         (expand_scatter_store_optab_fn): New function.
21350         (direct_scatter_store_optab_supported_p): New macro.
21351         (internal_store_fn_p): New function.
21352         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
21353         IFN_MASK_SCATTER_STORE.
21354         (internal_fn_mask_index): Likewise.
21355         (internal_fn_stored_value_index): New function.
21356         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
21357         for scatter stores.
21358         * optabs-query.h (supports_vec_scatter_store_p): Declare.
21359         * optabs-query.c (supports_vec_scatter_store_p): New function.
21360         * tree-vectorizer.h (vect_get_store_rhs): Declare.
21361         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
21362         true for scatter stores.
21363         (vect_gather_scatter_fn_p): Handle scatter stores too.
21364         (vect_check_gather_scatter): Consider using scatter stores if
21365         supports_vec_scatter_store_p.
21366         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
21367         scatter stores too.
21368         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21369         internal_fn_stored_value_index.
21370         (check_load_store_masking): Handle scatter stores too.
21371         (vect_get_store_rhs): Make public.
21372         (vectorizable_call): Use internal_store_fn_p.
21373         (vectorizable_store): Handle scatter store internal functions.
21374         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
21375         when deciding whether the end of the group has been reached.
21376         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
21377         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
21378         (mask_scatter_store<mode>): New insns.
21380 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21381             Alan Hayward  <alan.hayward@arm.com>
21382             David Sherwood  <david.sherwood@arm.com>
21384         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
21385         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
21386         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
21387         function.
21388         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
21389         Use vect_truncate_gather_scatter_offset if we can't treat the
21390         operation as a normal gather load or scatter store.
21391         (get_group_load_store_type): Take the gather_scatter_info
21392         as argument.  Try using a gather load or scatter store for
21393         single-element groups.
21394         (get_load_store_type): Update calls to get_group_load_store_type
21395         and vect_use_strided_gather_scatters_p.
21397 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21398             Alan Hayward  <alan.hayward@arm.com>
21399             David Sherwood  <david.sherwood@arm.com>
21401         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
21402         optional tree argument.
21403         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
21404         null target hooks.
21405         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
21406         but continue to use the current value as a fallback.
21407         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
21408         to compare the updates.
21409         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
21410         (get_load_store_type): Use it when handling a strided access.
21411         (vect_get_strided_load_store_ops): New function.
21412         (vect_get_data_ptr_increment): Likewise.
21413         (vectorizable_load): Handle strided gather loads.  Always pass
21414         a step to vect_create_data_ref_ptr and bump_vector_ptr.
21416 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21417             Alan Hayward  <alan.hayward@arm.com>
21418             David Sherwood  <david.sherwood@arm.com>
21420         * doc/md.texi (gather_load@var{m}): Document.
21421         (mask_gather_load@var{m}): Likewise.
21422         * genopinit.c (main): Add supports_vec_gather_load and
21423         supports_vec_gather_load_cached to target_optabs.
21424         * optabs-tree.c (init_tree_optimization_optabs): Use
21425         ggc_cleared_alloc to allocate target_optabs.
21426         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
21427         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
21428         functions.
21429         * internal-fn.h (internal_load_fn_p): Declare.
21430         (internal_gather_scatter_fn_p): Likewise.
21431         (internal_fn_mask_index): Likewise.
21432         (internal_gather_scatter_fn_supported_p): Likewise.
21433         * internal-fn.c (gather_load_direct): New macro.
21434         (expand_gather_load_optab_fn): New function.
21435         (direct_gather_load_optab_supported_p): New macro.
21436         (direct_internal_fn_optab): New function.
21437         (internal_load_fn_p): Likewise.
21438         (internal_gather_scatter_fn_p): Likewise.
21439         (internal_fn_mask_index): Likewise.
21440         (internal_gather_scatter_fn_supported_p): Likewise.
21441         * optabs-query.c (supports_at_least_one_mode_p): New function.
21442         (supports_vec_gather_load_p): Likewise.
21443         * optabs-query.h (supports_vec_gather_load_p): Declare.
21444         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
21445         and memory_type field.
21446         (NUM_PATTERNS): Bump to 15.
21447         * tree-vect-data-refs.c: Include internal-fn.h.
21448         (vect_gather_scatter_fn_p): New function.
21449         (vect_describe_gather_scatter_call): Likewise.
21450         (vect_check_gather_scatter): Try using internal functions for
21451         gather loads.  Recognize existing calls to a gather load function.
21452         (vect_analyze_data_refs): Consider using gather loads if
21453         supports_vec_gather_load_p.
21454         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
21455         (vect_get_gather_scatter_offset_type): Likewise.
21456         (vect_convert_mask_for_vectype): Likewise.
21457         (vect_add_conversion_to_patterm): Likewise.
21458         (vect_try_gather_scatter_pattern): Likewise.
21459         (vect_recog_gather_scatter_pattern): New pattern recognizer.
21460         (vect_vect_recog_func_ptrs): Add it.
21461         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21462         internal_fn_mask_index and internal_gather_scatter_fn_p.
21463         (check_load_store_masking): Take the gather_scatter_info as an
21464         argument and handle gather loads.
21465         (vect_get_gather_scatter_ops): New function.
21466         (vectorizable_call): Check internal_load_fn_p.
21467         (vectorizable_load): Likewise.  Handle gather load internal
21468         functions.
21469         (vectorizable_store): Update call to check_load_store_masking.
21470         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
21471         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
21472         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
21473         (aarch64_gather_scale_operand_d): New predicates.
21474         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
21475         (mask_gather_load<mode>): New insns.
21477 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21478             Alan Hayward  <alan.hayward@arm.com>
21479             David Sherwood  <david.sherwood@arm.com>
21481         * optabs.def (fold_left_plus_optab): New optab.
21482         * doc/md.texi (fold_left_plus_@var{m}): Document.
21483         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
21484         * internal-fn.c (fold_left_direct): Define.
21485         (expand_fold_left_optab_fn): Likewise.
21486         (direct_fold_left_optab_supported_p): Likewise.
21487         * fold-const-call.c (fold_const_fold_left): New function.
21488         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
21489         * tree-parloops.c (valid_reduction_p): New function.
21490         (gather_scalar_reductions): Use it.
21491         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
21492         (vect_finish_replace_stmt): Declare.
21493         * tree-vect-loop.c (fold_left_reduction_fn): New function.
21494         (needs_fold_left_reduction_p): New function, split out from...
21495         (vect_is_simple_reduction): ...here.  Accept reductions that
21496         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
21497         (vect_force_simple_reduction): Also store the reduction type in
21498         the assignment's STMT_VINFO_REDUC_TYPE.
21499         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
21500         (merge_with_identity): New function.
21501         (vect_expand_fold_left): Likewise.
21502         (vectorize_fold_left_reduction): Likewise.
21503         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
21504         scalar phi in place for it.  Check for target support and reject
21505         cases that would reassociate the operation.  Defer the transform
21506         phase to vectorize_fold_left_reduction.
21507         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
21508         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
21509         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
21511 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21513         * tree-if-conv.c (predicate_mem_writes): Remove redundant
21514         call to ifc_temp_var.
21516 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21517             Alan Hayward  <alan.hayward@arm.com>
21518             David Sherwood  <david.sherwood@arm.com>
21520         * target.def (legitimize_address_displacement): Take the original
21521         offset as a poly_int.
21522         * targhooks.h (default_legitimize_address_displacement): Update
21523         accordingly.
21524         * targhooks.c (default_legitimize_address_displacement): Likewise.
21525         * doc/tm.texi: Regenerate.
21526         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
21527         as an argument, moving assert of ad->disp == ad->disp_term to...
21528         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
21529         Try calling targetm.legitimize_address_displacement before expanding
21530         the address rather than afterwards, and adjust for the new interface.
21531         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
21532         Match the new hook interface.  Handle SVE addresses.
21533         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
21534         new hook interface.
21536 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21538         * Makefile.in (OBJS): Add early-remat.o.
21539         * target.def (select_early_remat_modes): New hook.
21540         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
21541         * doc/tm.texi: Regenerate.
21542         * targhooks.h (default_select_early_remat_modes): Declare.
21543         * targhooks.c (default_select_early_remat_modes): New function.
21544         * timevar.def (TV_EARLY_REMAT): New timevar.
21545         * passes.def (pass_early_remat): New pass.
21546         * tree-pass.h (make_pass_early_remat): Declare.
21547         * early-remat.c: New file.
21548         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
21549         function.
21550         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
21552 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21553             Alan Hayward  <alan.hayward@arm.com>
21554             David Sherwood  <david.sherwood@arm.com>
21556         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
21557         vfm1 with a bound_epilog parameter.
21558         (vect_do_peeling): Update calls accordingly, and move the prologue
21559         call earlier in the function.  Treat the base bound_epilog as 0 for
21560         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
21561         this base when peeling for gaps.
21562         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
21563         with fully-masked loops.
21564         (vect_estimate_min_profitable_iters): Handle the single peeled
21565         iteration in that case.
21567 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21568             Alan Hayward  <alan.hayward@arm.com>
21569             David Sherwood  <david.sherwood@arm.com>
21571         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
21572         single-element interleaving even if the size is not a power of 2.
21573         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
21574         accesses for single-element interleaving if the group size is
21575         not a power of 2.
21577 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21578             Alan Hayward  <alan.hayward@arm.com>
21579             David Sherwood  <david.sherwood@arm.com>
21581         * doc/md.texi (fold_extract_last_@var{m}): Document.
21582         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
21583         * optabs.def (fold_extract_last_optab): New optab.
21584         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
21585         * internal-fn.c (fold_extract_direct): New macro.
21586         (expand_fold_extract_optab_fn): Likewise.
21587         (direct_fold_extract_optab_supported_p): Likewise.
21588         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
21589         * tree-vect-loop.c (vect_model_reduction_cost): Handle
21590         EXTRACT_LAST_REDUCTION.
21591         (get_initial_def_for_reduction): Do not create an initial vector
21592         for EXTRACT_LAST_REDUCTION reductions.
21593         (vectorizable_reduction): Leave the scalar phi in place for
21594         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
21595         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
21596         epilogue code for EXTRACT_LAST_REDUCTION and defer the
21597         transform phase to vectorizable_condition.
21598         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
21599         split out from...
21600         (vect_finish_stmt_generation): ...here.
21601         (vect_finish_replace_stmt): New function.
21602         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
21603         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
21604         pattern.
21605         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
21607 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21608             Alan Hayward  <alan.hayward@arm.com>
21609             David Sherwood  <david.sherwood@arm.com>
21611         * doc/md.texi (extract_last_@var{m}): Document.
21612         * optabs.def (extract_last_optab): New optab.
21613         * internal-fn.def (EXTRACT_LAST): New internal function.
21614         * internal-fn.c (cond_unary_direct): New macro.
21615         (expand_cond_unary_optab_fn): Likewise.
21616         (direct_cond_unary_optab_supported_p): Likewise.
21617         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
21618         loops using EXTRACT_LAST.
21619         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
21620         (extract_last_<mode>): ...this optab.
21621         (vec_extract<mode><Vel>): Update accordingly.
21623 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21624             Alan Hayward  <alan.hayward@arm.com>
21625             David Sherwood  <david.sherwood@arm.com>
21627         * target.def (empty_mask_is_expensive): New hook.
21628         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
21629         * doc/tm.texi: Regenerate.
21630         * targhooks.h (default_empty_mask_is_expensive): Declare.
21631         * targhooks.c (default_empty_mask_is_expensive): New function.
21632         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
21633         if the target says that empty masks are expensive.
21634         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
21635         New function.
21636         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
21638 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21639             Alan Hayward  <alan.hayward@arm.com>
21640             David Sherwood  <david.sherwood@arm.com>
21642         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
21643         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
21644         (vect_use_loop_mask_for_alignment_p): New function.
21645         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
21646         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
21647         niters_skip argument.  Make sure that the first niters_skip elements
21648         of the first iteration are inactive.
21649         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
21650         Update call to vect_set_loop_masks_directly.
21651         (get_misalign_in_elems): New function, split out from...
21652         (vect_gen_prolog_loop_niters): ...here.
21653         (vect_update_init_of_dr): Take a code argument that specifies whether
21654         the adjustment should be added or subtracted.
21655         (vect_update_init_of_drs): Likewise.
21656         (vect_prepare_for_masked_peels): New function.
21657         (vect_do_peeling): Skip prologue peeling if we're using a mask
21658         instead.  Update call to vect_update_inits_of_drs.
21659         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21660         mask_skip_niters.
21661         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
21662         alignment.  Do not include the number of peeled iterations in
21663         the minimum threshold in that case.
21664         (vectorizable_induction): Adjust the start value down by
21665         LOOP_VINFO_MASK_SKIP_NITERS iterations.
21666         (vect_transform_loop): Call vect_prepare_for_masked_peels.
21667         Take the number of skipped iterations into account when calculating
21668         the loop bounds.
21669         * tree-vect-stmts.c (vect_gen_while_not): New function.
21671 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21672             Alan Hayward  <alan.hayward@arm.com>
21673             David Sherwood  <david.sherwood@arm.com>
21675         * doc/sourcebuild.texi (vect_fully_masked): Document.
21676         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
21677         default value to 0.
21678         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
21679         split out from...
21680         (vect_analyze_loop_2): ...here. Don't check the vectorization
21681         factor against the number of loop iterations if the loop is
21682         fully-masked.
21684 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21685             Alan Hayward  <alan.hayward@arm.com>
21686             David Sherwood  <david.sherwood@arm.com>
21688         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
21689         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
21690         (dump_groups): Update accordingly.
21691         (iv_use::mem_type): New member variable.
21692         (address_p): New function.
21693         (record_use): Add a mem_type argument and initialize the new
21694         mem_type field.
21695         (record_group_use): Add a mem_type argument.  Use address_p.
21696         Remove obsolete null checks of base_object.  Update call to record_use.
21697         (find_interesting_uses_op): Update call to record_group_use.
21698         (find_interesting_uses_cond): Likewise.
21699         (find_interesting_uses_address): Likewise.
21700         (get_mem_type_for_internal_fn): New function.
21701         (find_address_like_use): Likewise.
21702         (find_interesting_uses_stmt): Try find_address_like_use before
21703         calling find_interesting_uses_op.
21704         (addr_offset_valid_p): Use the iv mem_type field as the type
21705         of the addressed memory.
21706         (add_autoinc_candidates): Likewise.
21707         (get_address_cost): Likewise.
21708         (split_small_address_groups_p): Use address_p.
21709         (split_address_groups): Likewise.
21710         (add_iv_candidate_for_use): Likewise.
21711         (autoinc_possible_for_pair): Likewise.
21712         (rewrite_groups): Likewise.
21713         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
21714         (determine_group_iv_cost): Update after split of USE_ADDRESS.
21715         (get_alias_ptr_type_for_ptr_address): New function.
21716         (rewrite_use_address): Rewrite address uses in calls that were
21717         identified by find_address_like_use.
21719 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21720             Alan Hayward  <alan.hayward@arm.com>
21721             David Sherwood  <david.sherwood@arm.com>
21723         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
21724         TARGET_MEM_REFs.
21725         * gimple-expr.h (is_gimple_addressable: Likewise.
21726         * gimple-expr.c (is_gimple_address): Likewise.
21727         * internal-fn.c (expand_call_mem_ref): New function.
21728         (expand_mask_load_optab_fn): Use it.
21729         (expand_mask_store_optab_fn): Likewise.
21731 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21732             Alan Hayward  <alan.hayward@arm.com>
21733             David Sherwood  <david.sherwood@arm.com>
21735         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
21736         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
21737         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
21738         (cond_umax@var{mode}): Document.
21739         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
21740         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
21741         (cond_umin_optab, cond_umax_optab): New optabs.
21742         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
21743         (COND_IOR, COND_XOR): New internal functions.
21744         * internal-fn.h (get_conditional_internal_fn): Declare.
21745         * internal-fn.c (cond_binary_direct): New macro.
21746         (expand_cond_binary_optab_fn): Likewise.
21747         (direct_cond_binary_optab_supported_p): Likewise.
21748         (get_conditional_internal_fn): New function.
21749         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
21750         Cope with reduction statements that are vectorized as calls rather
21751         than assignments.
21752         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
21753         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
21754         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
21755         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
21756         (UNSPEC_COND_EOR): New unspecs.
21757         (optab): Add mappings for them.
21758         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
21759         (sve_int_op, sve_fp_op): New int attributes.
21761 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21762             Alan Hayward  <alan.hayward@arm.com>
21763             David Sherwood  <david.sherwood@arm.com>
21765         * optabs.def (while_ult_optab): New optab.
21766         * doc/md.texi (while_ult@var{m}@var{n}): Document.
21767         * internal-fn.def (WHILE_ULT): New internal function.
21768         * internal-fn.h (direct_internal_fn_supported_p): New override
21769         that takes two types as argument.
21770         * internal-fn.c (while_direct): New macro.
21771         (expand_while_optab_fn): New function.
21772         (convert_optab_supported_p): Likewise.
21773         (direct_while_optab_supported_p): New macro.
21774         * wide-int.h (wi::udiv_ceil): New function.
21775         * tree-vectorizer.h (rgroup_masks): New structure.
21776         (vec_loop_masks): New typedef.
21777         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
21778         and fully_masked_p.
21779         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
21780         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
21781         (vect_max_vf): New function.
21782         (slpeel_make_loop_iterate_ntimes): Delete.
21783         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
21784         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
21785         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
21786         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
21787         internal-fn.h, stor-layout.h and optabs-query.h.
21788         (vect_set_loop_mask): New function.
21789         (add_preheader_seq): Likewise.
21790         (add_header_seq): Likewise.
21791         (interleave_supported_p): Likewise.
21792         (vect_maybe_permute_loop_masks): Likewise.
21793         (vect_set_loop_masks_directly): Likewise.
21794         (vect_set_loop_condition_masked): Likewise.
21795         (vect_set_loop_condition_unmasked): New function, split out from
21796         slpeel_make_loop_iterate_ntimes.
21797         (slpeel_make_loop_iterate_ntimes): Rename to..
21798         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
21799         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
21800         (vect_do_peeling): Update call accordingly.
21801         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
21802         loops.
21803         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21804         mask_compare_type, can_fully_mask_p and fully_masked_p.
21805         (release_vec_loop_masks): New function.
21806         (_loop_vec_info): Use it to free the loop masks.
21807         (can_produce_all_loop_masks_p): New function.
21808         (vect_get_max_nscalars_per_iter): Likewise.
21809         (vect_verify_full_masking): Likewise.
21810         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
21811         retries, and free the mask rgroups before retrying.  Check loop-wide
21812         reasons for disallowing fully-masked loops.  Make the final decision
21813         about whether use a fully-masked loop or not.
21814         (vect_estimate_min_profitable_iters): Do not assume that peeling
21815         for the number of iterations will be needed for fully-masked loops.
21816         (vectorizable_reduction): Disable fully-masked loops.
21817         (vectorizable_live_operation): Likewise.
21818         (vect_halve_mask_nunits): New function.
21819         (vect_double_mask_nunits): Likewise.
21820         (vect_record_loop_mask): Likewise.
21821         (vect_get_loop_mask): Likewise.
21822         (vect_transform_loop): Handle the case in which the final loop
21823         iteration might handle a partial vector.  Call vect_set_loop_condition
21824         instead of slpeel_make_loop_iterate_ntimes.
21825         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
21826         (check_load_store_masking): New function.
21827         (prepare_load_store_mask): Likewise.
21828         (vectorizable_store): Handle fully-masked loops.
21829         (vectorizable_load): Likewise.
21830         (supportable_widening_operation): Use vect_halve_mask_nunits for
21831         booleans.
21832         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
21833         (vect_gen_while): New function.
21834         * config/aarch64/aarch64.md (umax<mode>3): New expander.
21835         (aarch64_uqdec<mode>): New insn.
21837 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21838             Alan Hayward  <alan.hayward@arm.com>
21839             David Sherwood  <david.sherwood@arm.com>
21841         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
21842         (reduc_xor_scal_optab): New optabs.
21843         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
21844         (reduc_xor_scal_@var{m}): Document.
21845         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
21846         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
21847         internal functions.
21848         * fold-const-call.c (fold_const_call): Handle them.
21849         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
21850         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
21851         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
21852         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
21853         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
21854         (UNSPEC_XORV): New unspecs.
21855         (optab): Add entries for them.
21856         (BITWISEV): New int iterator.
21857         (bit_reduc_op): New int attributes.
21859 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21860             Alan Hayward  <alan.hayward@arm.com>
21861             David Sherwood  <david.sherwood@arm.com>
21863         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
21864         * internal-fn.def (VEC_SHL_INSERT): New internal function.
21865         * optabs.def (vec_shl_insert_optab): New optab.
21866         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
21867         (duplicate_and_interleave): Likewise.
21868         * tree-vect-loop.c: Include internal-fn.h.
21869         (neutral_op_for_slp_reduction): New function, split out from
21870         get_initial_defs_for_reduction.
21871         (get_initial_def_for_reduction): Handle option 2 for variable-length
21872         vectors by loading the neutral value into a vector and then shifting
21873         the initial value into element 0.
21874         (get_initial_defs_for_reduction): Replace the code argument with
21875         the neutral value calculated by neutral_op_for_slp_reduction.
21876         Use gimple_build_vector for constant-length vectors.
21877         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
21878         but the first group_size elements have a neutral value.
21879         Use duplicate_and_interleave otherwise.
21880         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
21881         Update call to get_initial_defs_for_reduction.  Handle SLP
21882         reductions for variable-length vectors by creating one vector
21883         result for each scalar result, with the elements associated
21884         with other scalar results stubbed out with the neutral value.
21885         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
21886         Require IFN_VEC_SHL_INSERT for double reductions on
21887         variable-length vectors, or SLP reductions that have
21888         a neutral value.  Require can_duplicate_and_interleave_p
21889         support for variable-length unchained SLP reductions if there
21890         is no neutral value, such as for MIN/MAX reductions.  Also require
21891         the number of vector elements to be a multiple of the number of
21892         SLP statements when doing variable-length unchained SLP reductions.
21893         Update call to vect_create_epilog_for_reduction.
21894         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
21895         and remove initial values.
21896         (duplicate_and_interleave): Make public.
21897         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
21898         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
21900 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21901             Alan Hayward  <alan.hayward@arm.com>
21902             David Sherwood  <david.sherwood@arm.com>
21904         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
21905         (can_duplicate_and_interleave_p): New function.
21906         (vect_get_and_check_slp_defs): Take the vector of statements
21907         rather than just the current one.  Remove excess parentheses.
21908         Restriction rejectinon of vect_constant_def and vect_external_def
21909         for variable-length vectors to boolean types, or types for which
21910         can_duplicate_and_interleave_p is false.
21911         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
21912         (duplicate_and_interleave): New function.
21913         (vect_get_constant_vectors): Use gimple_build_vector for
21914         constant-length vectors and suitable variable-length constant
21915         vectors.  Use duplicate_and_interleave for other variable-length
21916         vectors.  Don't defer the update when inserting new statements.
21918 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21919             Alan Hayward  <alan.hayward@arm.com>
21920             David Sherwood  <david.sherwood@arm.com>
21922         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
21923         min_profitable_iters doesn't go negative.
21925 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21926             Alan Hayward  <alan.hayward@arm.com>
21927             David Sherwood  <david.sherwood@arm.com>
21929         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
21930         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
21931         * optabs.def (vec_mask_load_lanes_optab): New optab.
21932         (vec_mask_store_lanes_optab): Likewise.
21933         * internal-fn.def (MASK_LOAD_LANES): New internal function.
21934         (MASK_STORE_LANES): Likewise.
21935         * internal-fn.c (mask_load_lanes_direct): New macro.
21936         (mask_store_lanes_direct): Likewise.
21937         (expand_mask_load_optab_fn): Handle masked operations.
21938         (expand_mask_load_lanes_optab_fn): New macro.
21939         (expand_mask_store_optab_fn): Handle masked operations.
21940         (expand_mask_store_lanes_optab_fn): New macro.
21941         (direct_mask_load_lanes_optab_supported_p): Likewise.
21942         (direct_mask_store_lanes_optab_supported_p): Likewise.
21943         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
21944         parameter.
21945         (vect_load_lanes_supported): Likewise.
21946         * tree-vect-data-refs.c (strip_conversion): New function.
21947         (can_group_stmts_p): Likewise.
21948         (vect_analyze_data_ref_accesses): Use it instead of checking
21949         for a pair of assignments.
21950         (vect_store_lanes_supported): Take a masked_p parameter.
21951         (vect_load_lanes_supported): Likewise.
21952         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
21953         vect_store_lanes_supported and vect_load_lanes_supported.
21954         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
21955         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
21956         parameter.  Don't allow gaps for masked accesses.
21957         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
21958         and vect_load_lanes_supported.
21959         (get_load_store_type): Take a masked_p parameter and update
21960         call to get_group_load_store_type.
21961         (vectorizable_store): Update call to get_load_store_type.
21962         Handle IFN_MASK_STORE_LANES.
21963         (vectorizable_load): Update call to get_load_store_type.
21964         Handle IFN_MASK_LOAD_LANES.
21966 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21967             Alan Hayward  <alan.hayward@arm.com>
21968             David Sherwood  <david.sherwood@arm.com>
21970         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
21971         modes for SVE.
21972         * config/aarch64/aarch64-protos.h
21973         (aarch64_sve_struct_memory_operand_p): Declare.
21974         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
21975         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
21976         (VPRED, vpred): Handle SVE structure modes.
21977         * config/aarch64/constraints.md (Utx): New constraint.
21978         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
21979         (aarch64_sve_struct_nonimmediate_operand): New predicates.
21980         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
21981         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
21982         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
21983         structure modes.  Split into pieces after RA.
21984         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
21985         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
21986         New patterns.
21987         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
21988         SVE structure modes.
21989         (aarch64_classify_address): Likewise.
21990         (sizetochar): Move earlier in file.
21991         (aarch64_print_operand): Handle SVE register lists.
21992         (aarch64_array_mode): New function.
21993         (aarch64_sve_struct_memory_operand_p): Likewise.
21994         (TARGET_ARRAY_MODE): Redefine.
21996 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21997             Alan Hayward  <alan.hayward@arm.com>
21998             David Sherwood  <david.sherwood@arm.com>
22000         * target.def (array_mode): New target hook.
22001         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
22002         * doc/tm.texi: Regenerate.
22003         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
22004         * hooks.c (hook_optmode_mode_uhwi_none): New function.
22005         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
22006         targetm.array_mode.
22007         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
22008         type sizes.
22010 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22011             Alan Hayward  <alan.hayward@arm.com>
22012             David Sherwood  <david.sherwood@arm.com>
22014         * fold-const.c (fold_binary_loc): Check the argument types
22015         rather than the result type when testing for a vector operation.
22017 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22019         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
22020         * doc/tm.texi: Regenerate.
22022 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22023             Alan Hayward  <alan.hayward@arm.com>
22024             David Sherwood  <david.sherwood@arm.com>
22026         * doc/invoke.texi (-msve-vector-bits=): Document new option.
22027         (sve): Document new AArch64 extension.
22028         * doc/md.texi (w): Extend the description of the AArch64
22029         constraint to include SVE vectors.
22030         (Upl, Upa): Document new AArch64 predicate constraints.
22031         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
22032         enum.
22033         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
22034         (msve-vector-bits=): New option.
22035         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
22036         SVE when these are disabled.
22037         (sve): New extension.
22038         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
22039         modes.  Adjust their number of units based on aarch64_sve_vg.
22040         (MAX_BITSIZE_MODE_ANY_MODE): Define.
22041         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
22042         aarch64_addr_query_type.
22043         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
22044         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
22045         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
22046         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
22047         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
22048         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
22049         (aarch64_simd_imm_zero_p): Delete.
22050         (aarch64_check_zero_based_sve_index_immediate): Declare.
22051         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22052         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22053         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22054         (aarch64_sve_float_mul_immediate_p): Likewise.
22055         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22056         rather than an rtx.
22057         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
22058         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
22059         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
22060         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
22061         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
22062         (aarch64_regmode_natural_size): Likewise.
22063         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
22064         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
22065         left one place.
22066         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
22067         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
22068         for VG and the SVE predicate registers.
22069         (V_ALIASES): Add a "z"-prefixed alias.
22070         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
22071         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
22072         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
22073         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
22074         (REG_CLASS_NAMES): Add entries for them.
22075         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
22076         and the predicate registers.
22077         (aarch64_sve_vg): Declare.
22078         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
22079         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
22080         (REGMODE_NATURAL_SIZE): Define.
22081         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
22082         SVE macros.
22083         * config/aarch64/aarch64.c: Include cfgrtl.h.
22084         (simd_immediate_info): Add a constructor for series vectors,
22085         and an associated step field.
22086         (aarch64_sve_vg): New variable.
22087         (aarch64_dbx_register_number): Handle VG and the predicate registers.
22088         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
22089         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
22090         (VEC_ANY_DATA, VEC_STRUCT): New constants.
22091         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
22092         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
22093         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
22094         (aarch64_get_mask_mode): New functions.
22095         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
22096         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
22097         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
22098         predicate modes and predicate registers.  Explicitly restrict
22099         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
22100         to store a vector mode if it is recognized by
22101         aarch64_classify_vector_mode.
22102         (aarch64_regmode_natural_size): New function.
22103         (aarch64_hard_regno_caller_save_mode): Return the original mode
22104         for predicates.
22105         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
22106         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
22107         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
22108         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
22109         functions.
22110         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
22111         does not overlap dest if the function is frame-related.  Handle
22112         SVE constants.
22113         (aarch64_split_add_offset): New function.
22114         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
22115         them aarch64_add_offset.
22116         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
22117         and update call to aarch64_sub_sp.
22118         (aarch64_add_cfa_expression): New function.
22119         (aarch64_expand_prologue): Pass extra temporary registers to the
22120         functions above.  Handle the case in which we need to emit new
22121         DW_CFA_expressions for registers that were originally saved
22122         relative to the stack pointer, but now have to be expressed
22123         relative to the frame pointer.
22124         (aarch64_output_mi_thunk): Pass extra temporary registers to the
22125         functions above.
22126         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
22127         IP0 and IP1 values for SVE frames.
22128         (aarch64_expand_vec_series): New function.
22129         (aarch64_expand_sve_widened_duplicate): Likewise.
22130         (aarch64_expand_sve_const_vector): Likewise.
22131         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
22132         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
22133         into the register, rather than emitting a SET directly.
22134         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
22135         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
22136         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
22137         (offset_9bit_signed_scaled_p): New functions.
22138         (aarch64_replicate_bitmask_imm): New function.
22139         (aarch64_bitmask_imm): Use it.
22140         (aarch64_cannot_force_const_mem): Reject expressions involving
22141         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
22142         (aarch64_classify_index): Handle SVE indices, by requiring
22143         a plain register index with a scale that matches the element size.
22144         (aarch64_classify_address): Handle SVE addresses.  Assert that
22145         the mode of the address is VOIDmode or an integer mode.
22146         Update call to aarch64_classify_symbol.
22147         (aarch64_classify_symbolic_expression): Update call to
22148         aarch64_classify_symbol.
22149         (aarch64_const_vec_all_in_range_p): New function.
22150         (aarch64_print_vector_float_operand): Likewise.
22151         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
22152         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
22153         and the FP immediates 1.0 and 0.5.
22154         (aarch64_print_address_internal): Handle SVE addresses.
22155         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
22156         (aarch64_regno_regclass): Handle predicate registers.
22157         (aarch64_secondary_reload): Handle big-endian reloads of SVE
22158         data modes.
22159         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
22160         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
22161         (aarch64_convert_sve_vector_bits): New function.
22162         (aarch64_override_options): Use it to handle -msve-vector-bits=.
22163         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22164         rather than an rtx.
22165         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
22166         Handle SVE vector and predicate modes.  Accept VL-based constants
22167         that need only one temporary register, and VL offsets that require
22168         no temporary registers.
22169         (aarch64_conditional_register_usage): Mark the predicate registers
22170         as fixed if SVE isn't available.
22171         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
22172         Return true for SVE vector and predicate modes.
22173         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
22174         rather than an unsigned int.  Handle SVE modes.
22175         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
22176         SVE modes.
22177         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
22178         if SVE is enabled.
22179         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22180         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22181         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22182         (aarch64_sve_float_mul_immediate_p): New functions.
22183         (aarch64_sve_valid_immediate): New function.
22184         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
22185         Explicitly reject structure modes.  Check for INDEX constants.
22186         Handle PTRUE and PFALSE constants.
22187         (aarch64_check_zero_based_sve_index_immediate): New function.
22188         (aarch64_simd_imm_zero_p): Delete.
22189         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
22190         vector modes.  Accept constants in the range of CNT[BHWD].
22191         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
22192         ask for an Advanced SIMD mode.
22193         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
22194         (aarch64_simd_vector_alignment): Handle SVE predicates.
22195         (aarch64_vectorize_preferred_vector_alignment): New function.
22196         (aarch64_simd_vector_alignment_reachable): Use it instead of
22197         the vector size.
22198         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
22199         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
22200         functions.
22201         (MAX_VECT_LEN): Delete.
22202         (expand_vec_perm_d): Add a vec_flags field.
22203         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
22204         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
22205         (aarch64_evpc_ext): Don't apply a big-endian lane correction
22206         for SVE modes.
22207         (aarch64_evpc_rev): Rename to...
22208         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
22209         (aarch64_evpc_rev_global): New function.
22210         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
22211         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
22212         MAX_VECT_LEN.
22213         (aarch64_evpc_sve_tbl): New function.
22214         (aarch64_expand_vec_perm_const_1): Update after rename of
22215         aarch64_evpc_rev.  Handle SVE permutes too, trying
22216         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
22217         than aarch64_evpc_tbl.
22218         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
22219         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
22220         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
22221         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
22222         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
22223         (aarch64_expand_sve_vcond): New functions.
22224         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
22225         of aarch64_vector_mode_p.
22226         (aarch64_dwarf_poly_indeterminate_value): New function.
22227         (aarch64_compute_pressure_classes): Likewise.
22228         (aarch64_can_change_mode_class): Likewise.
22229         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
22230         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
22231         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
22232         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
22233         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
22234         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
22235         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
22236         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
22237         constraints.
22238         (Dn, Dl, Dr): Accept const as well as const_vector.
22239         (Dz): Likewise.  Compare against CONST0_RTX.
22240         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
22241         of "vector" where appropriate.
22242         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
22243         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
22244         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
22245         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
22246         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
22247         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
22248         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
22249         (v_int_equiv): Extend to SVE modes.
22250         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
22251         mode attributes.
22252         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
22253         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
22254         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
22255         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
22256         (SVE_COND_FP_CMP): New int iterators.
22257         (perm_hilo): Handle the new unpack unspecs.
22258         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
22259         attributes.
22260         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
22261         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
22262         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
22263         (aarch64_equality_operator, aarch64_constant_vector_operand)
22264         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
22265         (aarch64_sve_nonimmediate_operand): Likewise.
22266         (aarch64_sve_general_operand): Likewise.
22267         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
22268         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
22269         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
22270         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
22271         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
22272         (aarch64_sve_float_arith_immediate): Likewise.
22273         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
22274         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
22275         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
22276         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
22277         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
22278         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
22279         (aarch64_sve_float_arith_operand): Likewise.
22280         (aarch64_sve_float_arith_with_sub_operand): Likewise.
22281         (aarch64_sve_float_mul_operand): Likewise.
22282         (aarch64_sve_vec_perm_operand): Likewise.
22283         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
22284         (aarch64_mov_operand): Accept const_poly_int and const_vector.
22285         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
22286         as well as const_vector.
22287         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
22288         in file.  Use CONST0_RTX and CONSTM1_RTX.
22289         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
22290         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
22291         Use aarch64_simd_imm_zero.
22292         * config/aarch64/aarch64-sve.md: New file.
22293         * config/aarch64/aarch64.md: Include it.
22294         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
22295         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
22296         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
22297         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
22298         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
22299         (sve): New attribute.
22300         (enabled): Disable instructions with the sve attribute unless
22301         TARGET_SVE.
22302         (movqi, movhi): Pass CONST_POLY_INT operaneds through
22303         aarch64_expand_mov_immediate.
22304         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
22305         CNT[BHSD] immediates.
22306         (movti): Split CONST_POLY_INT moves into two halves.
22307         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
22308         Split additions that need a temporary here if the destination
22309         is the stack pointer.
22310         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
22311         (*add<mode>3_poly_1): New instruction.
22312         (set_clobber_cc): New expander.
22314 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22316         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
22317         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
22318         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
22319         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
22320         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
22321         Change innermode from fixed_mode_size to machine_mode.
22322         (simplify_subreg): Update call accordingly.  Handle a constant-sized
22323         subreg of a variable-length CONST_VECTOR.
22325 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22326             Alan Hayward  <alan.hayward@arm.com>
22327             David Sherwood  <david.sherwood@arm.com>
22329         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
22330         (add_offset_to_base): New function, split out from...
22331         (create_mem_ref): ...here.  When handling a scale other than 1,
22332         check first whether the address is valid without the offset.
22333         Add it into the base if so, leaving the index and scale as-is.
22335 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
22337         PR c++/83778
22338         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
22339         fold_for_warn before checking if arg2 is INTEGER_CST.
22341 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
22343         * config/rs6000/predicates.md (load_multiple_operation): Delete.
22344         (store_multiple_operation): Delete.
22345         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
22346         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
22347         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
22348         guarded by TARGET_STRING.
22349         (rs6000_output_load_multiple): Delete.
22350         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
22351         OPTION_MASK_STRING / TARGET_STRING handling.
22352         (print_operand) <'N', 'O'>: Add comment that these are unused now.
22353         (const rs6000_opt_masks) <"string">: Change mask to 0.
22354         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
22355         (MASK_STRING): Delete.
22356         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
22357         parts.  Simplify.
22358         (load_multiple): Delete.
22359         (*ldmsi8): Delete.
22360         (*ldmsi7): Delete.
22361         (*ldmsi6): Delete.
22362         (*ldmsi5): Delete.
22363         (*ldmsi4): Delete.
22364         (*ldmsi3): Delete.
22365         (store_multiple): Delete.
22366         (*stmsi8): Delete.
22367         (*stmsi7): Delete.
22368         (*stmsi6): Delete.
22369         (*stmsi5): Delete.
22370         (*stmsi4): Delete.
22371         (*stmsi3): Delete.
22372         (movmemsi_8reg): Delete.
22373         (corresponding unnamed define_insn): Delete.
22374         (movmemsi_6reg): Delete.
22375         (corresponding unnamed define_insn): Delete.
22376         (movmemsi_4reg): Delete.
22377         (corresponding unnamed define_insn): Delete.
22378         (movmemsi_2reg): Delete.
22379         (corresponding unnamed define_insn): Delete.
22380         (movmemsi_1reg): Delete.
22381         (corresponding unnamed define_insn): Delete.
22382         * config/rs6000/rs6000.opt (mno-string): New.
22383         (mstring): Replace by deprecation warning stub.
22384         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
22386 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
22388         * regrename.c (regrename_do_replace): If replacing the same
22389         reg multiple times, try to reuse last created gen_raw_REG.
22391         PR debug/81155
22392         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
22393         main to workaround a bug in GDB.
22395 2018-01-12  Tom de Vries  <tom@codesourcery.com>
22397         PR target/83737
22398         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
22400 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
22402         PR rtl-optimization/80481
22403         * ira-color.c (get_cap_member): New function.
22404         (allocnos_conflict_by_live_ranges_p): Use it.
22405         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
22406         (setup_slot_coalesced_allocno_live_ranges): Ditto.
22408 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
22410         PR target/83628
22411         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
22412         (*saddl_se_1): Ditto.
22413         (*ssubsi_1): Ditto.
22414         (*ssubl_se_1): Ditto.
22416 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
22418         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
22419         rather than wi::to_widest for DR_INITs.
22420         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
22421         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
22422         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
22423         INTEGER_CSTs.
22424         (vect_analyze_group_access_1): Note that here.
22426 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
22428         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
22429         polynomial type sizes.
22431 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
22433         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
22434         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
22435         (gimple_add_tmp_var): Likewise.
22437 2018-01-12  Martin Liska  <mliska@suse.cz>
22439         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
22440         (gimple_alloc_sizes): Likewise.
22441         (dump_gimple_statistics): Use PRIu64 in printf format.
22442         * gimple.h: Change uint64_t to int.
22444 2018-01-12  Martin Liska  <mliska@suse.cz>
22446         * tree-core.h: Use uint64_t instead of int.
22447         * tree.c (tree_node_counts): Likewise.
22448         (tree_node_sizes): Likewise.
22449         (dump_tree_statistics): Use PRIu64 in printf format.
22451 2018-01-12  Martin Liska  <mliska@suse.cz>
22453         * Makefile.in: As qsort_chk is implemented in vec.c, add
22454         vec.o to linkage of gencfn-macros.
22455         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
22456         passing the info to record_node_allocation_statistics.
22457         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
22458         and pass the info.
22459         * ggc-common.c (struct ggc_usage): Add operator== and use
22460         it in operator< and compare function.
22461         * mem-stats.h (struct mem_usage): Likewise.
22462         * vec.c (struct vec_usage): Remove operator< and compare
22463         function. Can be simply inherited.
22465 2018-01-12  Martin Jambor  <mjambor@suse.cz>
22467         PR target/81616
22468         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
22469         * tree-ssa-math-opts.c: Include domwalk.h.
22470         (convert_mult_to_fma_1): New function.
22471         (fma_transformation_info): New type.
22472         (fma_deferring_state): Likewise.
22473         (cancel_fma_deferring): New function.
22474         (result_of_phi): Likewise.
22475         (last_fma_candidate_feeds_initial_phi): Likewise.
22476         (convert_mult_to_fma): Added deferring logic, split actual
22477         transformation to convert_mult_to_fma_1.
22478         (math_opts_dom_walker): New type.
22479         (math_opts_dom_walker::after_dom_children): New method, body moved
22480         here from pass_optimize_widening_mul::execute, added deferring logic
22481         bits.
22482         (pass_optimize_widening_mul::execute): Moved most of code to
22483         math_opts_dom_walker::after_dom_children.
22484         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
22485         * config/i386/i386.c (ix86_option_override_internal): Added
22486         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
22488 2018-01-12  Richard Biener  <rguenther@suse.de>
22490         PR debug/83157
22491         * dwarf2out.c (gen_variable_die): Do not reset old_die for
22492         inline instance vars.
22494 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
22496         PR target/81819
22497         * config/rx/rx.c (rx_is_restricted_memory_address):
22498         Handle SUBREG case.
22500 2018-01-12  Richard Biener  <rguenther@suse.de>
22502         PR tree-optimization/80846
22503         * target.def (split_reduction): New target hook.
22504         * targhooks.c (default_split_reduction): New function.
22505         * targhooks.h (default_split_reduction): Declare.
22506         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
22507         target requests first reduce vectors by combining low and high
22508         parts.
22509         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
22510         (get_vectype_for_scalar_type_and_size): Export.
22511         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
22512         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
22513         * doc/tm.texi: Regenerate.
22514         * config/i386/i386.c (ix86_split_reduction): Implement
22515         TARGET_VECTORIZE_SPLIT_REDUCTION.
22517 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
22519         PR target/83368
22520         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
22521         in PIC mode except for TARGET_VXWORKS_RTP.
22522         * config/sparc/sparc.c: Include cfgrtl.h.
22523         (TARGET_INIT_PIC_REG): Define.
22524         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
22525         (sparc_pic_register_p): New predicate.
22526         (sparc_legitimate_address_p): Use it.
22527         (sparc_legitimize_pic_address): Likewise.
22528         (sparc_delegitimize_address): Likewise.
22529         (sparc_mode_dependent_address_p): Likewise.
22530         (gen_load_pcrel_sym): Remove 4th parameter.
22531         (load_got_register): Adjust call to above.  Remove obsolete stuff.
22532         (sparc_expand_prologue): Do not call load_got_register here.
22533         (sparc_flat_expand_prologue): Likewise.
22534         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
22535         (sparc_use_pseudo_pic_reg): New function.
22536         (sparc_init_pic_reg): Likewise.
22537         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
22538         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
22540 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
22542         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
22543         Add item for branch_cost.
22545 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
22547         PR rtl-optimization/83565
22548         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
22549         not extend the result to a larger mode for rotate operations.
22550         (num_sign_bit_copies1): Likewise.
22552 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22554         PR target/40411
22555         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
22556         -symbolic.
22557         Use values-Xc.o for -pedantic.
22558         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
22560 2018-01-12  Martin Liska  <mliska@suse.cz>
22562         PR ipa/83054
22563         * ipa-devirt.c (final_warning_record::grow_type_warnings):
22564         New function.
22565         (possible_polymorphic_call_targets): Use it.
22566         (ipa_devirt): Likewise.
22568 2018-01-12  Martin Liska  <mliska@suse.cz>
22570         * profile-count.h (enum profile_quality): Use 0 as invalid
22571         enum value of profile_quality.
22573 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
22575         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
22576         -mext-string options.
22578 2018-01-12  Richard Biener  <rguenther@suse.de>
22580         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
22581         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
22582         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
22583         Likewise.
22584         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
22586 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
22588         * configure.ac (--with-long-double-format): Add support for the
22589         configuration option to change the default long double format on
22590         PowerPC systems.
22591         * config.gcc (powerpc*-linux*-*): Likewise.
22592         * configure: Regenerate.
22593         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
22594         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
22595         used without modification.
22597 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22599         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
22600         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
22601         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
22602         MISC_BUILTIN_SPEC_BARRIER.
22603         (rs6000_init_builtins): Likewise.
22604         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
22605         enum value.
22606         (speculation_barrier): New define_insn.
22607         * doc/extend.texi: Document __builtin_speculation_barrier.
22609 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
22611         PR target/83203
22612         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
22613         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
22614         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
22615         iterators.
22616         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
22617         integral modes instead of "ss" and "sd".
22618         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
22619         vectors with 32-bit and 64-bit elements.
22620         (vecdupssescalarmodesuffix): New mode attribute.
22621         (vec_dup<mode>): Use it.
22623 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
22625         PR target/83330
22626         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
22627         frame if argument is passed on stack.
22629 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
22631         PR target/82682
22632         * ree.c (combine_reaching_defs): Optimize also
22633         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
22634         reg2=any_extend(exp); reg1=reg2;, formatting fix.
22636 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
22638         PR middle-end/83189
22639         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
22641 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
22643         PR middle-end/83718
22644         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
22645         after they are computed.
22647 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
22649         PR tree-optimization/83695
22650         * gimple-loop-linterchange.cc
22651         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
22652         reset cached scev information after interchange.
22653         (pass_linterchange::execute): Remove call to scev_reset_htab.
22655 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22657         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
22658         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
22659         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
22660         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
22661         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
22662         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
22663         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
22664         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
22665         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
22666         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
22667         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
22668         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
22669         (V_lane_reg): Likewise.
22670         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
22671         New define_expand.
22672         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
22673         (vfmal_lane_low<mode>_intrinsic,
22674         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
22675         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
22676         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
22677         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
22678         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
22679         vfmsl_lane_high<mode>_intrinsic): New define_insns.
22681 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22683         * config/arm/arm-cpus.in (fp16fml): New feature.
22684         (ALL_SIMD): Add fp16fml.
22685         (armv8.2-a): Add fp16fml as an option.
22686         (armv8.3-a): Likewise.
22687         (armv8.4-a): Add fp16fml as part of fp16.
22688         * config/arm/arm.h (TARGET_FP16FML): Define.
22689         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
22690         when appropriate.
22691         * config/arm/arm-modes.def (V2HF): Define.
22692         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
22693         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
22694         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
22695         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
22696         vfmsl_low, vfmsl_high): New set of builtins.
22697         * config/arm/iterators.md (PLUSMINUS): New code iterator.
22698         (vfml_op): New code attribute.
22699         (VFMLHALVES): New int iterator.
22700         (VFML, VFMLSEL): New mode attributes.
22701         (V_reg): Define mapping for V2HF.
22702         (V_hi, V_lo): New mode attributes.
22703         (VF_constraint): Likewise.
22704         (vfml_half, vfml_half_selector): New int attributes.
22705         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
22706         define_expand.
22707         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
22708         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
22709         New define_insn.
22710         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
22711         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
22712         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
22713         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
22714         documentation.
22715         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
22716         Document new effective target and option set.
22718 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22720         * config/arm/arm-cpus.in (armv8_4): New feature.
22721         (ARMv8_4a): New fgroup.
22722         (armv8.4-a): New arch.
22723         * config/arm/arm-tables.opt: Regenerate.
22724         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
22725         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
22726         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
22727         Add matching rules for -march=armv8.4-a and extensions.
22728         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
22730 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
22732         PR target/81821
22733         * config/rx/rx.md (BW): New mode attribute.
22734         (sync_lock_test_and_setsi): Add mode suffix to insn output.
22736 2018-01-11  Richard Biener  <rguenther@suse.de>
22738         PR tree-optimization/83435
22739         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
22740         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
22741         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
22743 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22744             Alan Hayward  <alan.hayward@arm.com>
22745             David Sherwood  <david.sherwood@arm.com>
22747         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
22748         field.
22749         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
22750         (aarch64_print_address_internal): Use it to check for a zero offset.
22752 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22753             Alan Hayward  <alan.hayward@arm.com>
22754             David Sherwood  <david.sherwood@arm.com>
22756         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
22757         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
22758         Return a poly_int64 rather than a HOST_WIDE_INT.
22759         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
22760         rather than a HOST_WIDE_INT.
22761         * config/aarch64/aarch64.h (aarch64_frame): Protect with
22762         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
22763         hard_fp_offset, frame_size, initial_adjust, callee_offset and
22764         final_offset from HOST_WIDE_INT to poly_int64.
22765         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
22766         to_constant when getting the number of units in an Advanced SIMD
22767         mode.
22768         (aarch64_builtin_vectorized_function): Check for a constant number
22769         of units.
22770         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
22771         GET_MODE_SIZE.
22772         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
22773         attribute instead of GET_MODE_NUNITS.
22774         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
22775         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
22776         GET_MODE_SIZE for fixed-size registers.
22777         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
22778         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
22779         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
22780         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
22781         (aarch64_print_operand, aarch64_print_address_internal)
22782         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
22783         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
22784         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
22785         Handle polynomial GET_MODE_SIZE.
22786         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
22787         wider than SImode without modification.
22788         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
22789         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
22790         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
22791         passing and returning SVE modes.
22792         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
22793         rather than GEN_INT.
22794         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
22795         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
22796         (aarch64_allocate_and_probe_stack_space): Likewise.
22797         (aarch64_layout_frame): Cope with polynomial offsets.
22798         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
22799         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
22800         polynomial offsets.
22801         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
22802         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
22803         poly_int64 rather than a HOST_WIDE_INT.
22804         (aarch64_get_separate_components, aarch64_process_components)
22805         (aarch64_expand_prologue, aarch64_expand_epilogue)
22806         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
22807         (aarch64_anchor_offset): New function, split out from...
22808         (aarch64_legitimize_address): ...here.
22809         (aarch64_builtin_vectorization_cost): Handle polynomial
22810         TYPE_VECTOR_SUBPARTS.
22811         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
22812         GET_MODE_NUNITS.
22813         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
22814         number of elements from the PARALLEL rather than the mode.
22815         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
22816         rather than GET_MODE_BITSIZE.
22817         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
22818         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
22819         (aarch64_expand_vec_perm_const_1): Handle polynomial
22820         d->perm.length () and d->perm elements.
22821         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
22822         Apply to_constant to d->perm elements.
22823         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
22824         polynomial CONST_VECTOR_NUNITS.
22825         (aarch64_move_pointer): Take amount as a poly_int64 rather
22826         than an int.
22827         (aarch64_progress_pointer): Avoid temporary variable.
22828         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
22829         the mode attribute instead of GET_MODE.
22831 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22832             Alan Hayward  <alan.hayward@arm.com>
22833             David Sherwood  <david.sherwood@arm.com>
22835         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
22836         x exists before using it.
22837         (aarch64_add_constant_internal): Rename to...
22838         (aarch64_add_offset_1): ...this.  Replace regnum with separate
22839         src and dest rtxes.  Handle the case in which they're different,
22840         including when the offset is zero.  Replace scratchreg with an rtx.
22841         Use 2 additions if there is no spare register into which we can
22842         move a 16-bit constant.
22843         (aarch64_add_constant): Delete.
22844         (aarch64_add_offset): Replace reg with separate src and dest
22845         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
22846         Use aarch64_add_offset_1.
22847         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
22848         an rtx rather than an int.  Take the delta as a poly_int64
22849         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
22850         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
22851         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
22852         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
22853         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
22854         and aarch64_add_sp.
22855         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
22856         aarch64_add_constant.
22858 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22860         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
22861         Use scalar_float_mode.
22863 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22865         * config/aarch64/aarch64-simd.md
22866         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
22867         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
22868         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
22869         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
22870         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
22871         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
22872         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
22873         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
22874         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
22875         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
22877 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
22879         PR target/83514
22880         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
22881         targ_options->x_arm_arch_string is non NULL.
22883 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
22885         * config/aarch64/aarch64.h
22886         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
22888 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
22890         PR target/82096
22891         * expmed.c (emit_store_flag_force): Swap if const op0
22892         and change VOIDmode to mode of op0.
22894 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22896         PR rtl-optimization/83761
22897         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
22898         than bytes to mode_for_size.
22900 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
22902         PR middle-end/83189
22903         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
22904         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
22905         profile.
22907 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
22909         PR middle-end/83575
22910         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
22911         when in layout mode.
22912         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
22913         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
22914         partition fixup.
22916 2018-01-10  Michael Collison  <michael.collison@arm.com>
22918         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
22919         * config/aarch64/aarch64-option-extension.def: Add
22920         AARCH64_OPT_EXTENSION of 'fp16fml'.
22921         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22922         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
22923         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
22924         * config/aarch64/constraints.md (Ui7): New constraint.
22925         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
22926         (VFMLA_SEL_W): Ditto.
22927         (f16quad): Ditto.
22928         (f16mac1): Ditto.
22929         (VFMLA16_LOW): New int iterator.
22930         (VFMLA16_HIGH): Ditto.
22931         (UNSPEC_FMLAL): New unspec.
22932         (UNSPEC_FMLSL): Ditto.
22933         (UNSPEC_FMLAL2): Ditto.
22934         (UNSPEC_FMLSL2): Ditto.
22935         (f16mac): New code attribute.
22936         * config/aarch64/aarch64-simd-builtins.def
22937         (aarch64_fmlal_lowv2sf): Ditto.
22938         (aarch64_fmlsl_lowv2sf): Ditto.
22939         (aarch64_fmlalq_lowv4sf): Ditto.
22940         (aarch64_fmlslq_lowv4sf): Ditto.
22941         (aarch64_fmlal_highv2sf): Ditto.
22942         (aarch64_fmlsl_highv2sf): Ditto.
22943         (aarch64_fmlalq_highv4sf): Ditto.
22944         (aarch64_fmlslq_highv4sf): Ditto.
22945         (aarch64_fmlal_lane_lowv2sf): Ditto.
22946         (aarch64_fmlsl_lane_lowv2sf): Ditto.
22947         (aarch64_fmlal_laneq_lowv2sf): Ditto.
22948         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
22949         (aarch64_fmlalq_lane_lowv4sf): Ditto.
22950         (aarch64_fmlsl_lane_lowv4sf): Ditto.
22951         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
22952         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
22953         (aarch64_fmlal_lane_highv2sf): Ditto.
22954         (aarch64_fmlsl_lane_highv2sf): Ditto.
22955         (aarch64_fmlal_laneq_highv2sf): Ditto.
22956         (aarch64_fmlsl_laneq_highv2sf): Ditto.
22957         (aarch64_fmlalq_lane_highv4sf): Ditto.
22958         (aarch64_fmlsl_lane_highv4sf): Ditto.
22959         (aarch64_fmlalq_laneq_highv4sf): Ditto.
22960         (aarch64_fmlsl_laneq_highv4sf): Ditto.
22961         * config/aarch64/aarch64-simd.md:
22962         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
22963         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22964         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
22965         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
22966         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
22967         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
22968         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
22969         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
22970         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
22971         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
22972         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
22973         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
22974         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
22975         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
22976         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
22977         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
22978         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
22979         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
22980         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
22981         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
22982         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
22983         (vfmlsl_low_u32): Ditto.
22984         (vfmlalq_low_u32): Ditto.
22985         (vfmlslq_low_u32): Ditto.
22986         (vfmlal_high_u32): Ditto.
22987         (vfmlsl_high_u32): Ditto.
22988         (vfmlalq_high_u32): Ditto.
22989         (vfmlslq_high_u32): Ditto.
22990         (vfmlal_lane_low_u32): Ditto.
22991         (vfmlsl_lane_low_u32): Ditto.
22992         (vfmlal_laneq_low_u32): Ditto.
22993         (vfmlsl_laneq_low_u32): Ditto.
22994         (vfmlalq_lane_low_u32): Ditto.
22995         (vfmlslq_lane_low_u32): Ditto.
22996         (vfmlalq_laneq_low_u32): Ditto.
22997         (vfmlslq_laneq_low_u32): Ditto.
22998         (vfmlal_lane_high_u32): Ditto.
22999         (vfmlsl_lane_high_u32): Ditto.
23000         (vfmlal_laneq_high_u32): Ditto.
23001         (vfmlsl_laneq_high_u32): Ditto.
23002         (vfmlalq_lane_high_u32): Ditto.
23003         (vfmlslq_lane_high_u32): Ditto.
23004         (vfmlalq_laneq_high_u32): Ditto.
23005         (vfmlslq_laneq_high_u32): Ditto.
23006         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
23007         (AARCH64_FL_FOR_ARCH8_4): New.
23008         (AARCH64_ISA_F16FML): New ISA flag.
23009         (TARGET_F16FML): New feature flag for fp16fml.
23010         (doc/invoke.texi): Document new fp16fml option.
23012 2018-01-10  Michael Collison  <michael.collison@arm.com>
23014         * config/aarch64/aarch64-builtins.c:
23015         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
23016         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23017         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
23018         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
23019         (AARCH64_ISA_SHA3): New ISA flag.
23020         (TARGET_SHA3): New feature flag for sha3.
23021         * config/aarch64/iterators.md (sha512_op): New int attribute.
23022         (CRYPTO_SHA512): New int iterator.
23023         (UNSPEC_SHA512H): New unspec.
23024         (UNSPEC_SHA512H2): Ditto.
23025         (UNSPEC_SHA512SU0): Ditto.
23026         (UNSPEC_SHA512SU1): Ditto.
23027         * config/aarch64/aarch64-simd-builtins.def
23028         (aarch64_crypto_sha512hqv2di): New builtin.
23029         (aarch64_crypto_sha512h2qv2di): Ditto.
23030         (aarch64_crypto_sha512su0qv2di): Ditto.
23031         (aarch64_crypto_sha512su1qv2di): Ditto.
23032         (aarch64_eor3qv8hi): Ditto.
23033         (aarch64_rax1qv2di): Ditto.
23034         (aarch64_xarqv2di): Ditto.
23035         (aarch64_bcaxqv8hi): Ditto.
23036         * config/aarch64/aarch64-simd.md:
23037         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
23038         (aarch64_crypto_sha512su0qv2di): Ditto.
23039         (aarch64_crypto_sha512su1qv2di): Ditto.
23040         (aarch64_eor3qv8hi): Ditto.
23041         (aarch64_rax1qv2di): Ditto.
23042         (aarch64_xarqv2di): Ditto.
23043         (aarch64_bcaxqv8hi): Ditto.
23044         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
23045         (vsha512h2q_u64): Ditto.
23046         (vsha512su0q_u64): Ditto.
23047         (vsha512su1q_u64): Ditto.
23048         (veor3q_u16): Ditto.
23049         (vrax1q_u64): Ditto.
23050         (vxarq_u64): Ditto.
23051         (vbcaxq_u16): Ditto.
23052         * config/arm/types.md (crypto_sha512): New type attribute.
23053         (crypto_sha3): Ditto.
23054         (doc/invoke.texi): Document new sha3 option.
23056 2018-01-10  Michael Collison  <michael.collison@arm.com>
23058         * config/aarch64/aarch64-builtins.c:
23059         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
23060         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23061         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
23062         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
23063         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
23064         (AARCH64_ISA_SM4): New ISA flag.
23065         (TARGET_SM4): New feature flag for sm4.
23066         * config/aarch64/aarch64-simd-builtins.def
23067         (aarch64_sm3ss1qv4si): Ditto.
23068         (aarch64_sm3tt1aq4si): Ditto.
23069         (aarch64_sm3tt1bq4si): Ditto.
23070         (aarch64_sm3tt2aq4si): Ditto.
23071         (aarch64_sm3tt2bq4si): Ditto.
23072         (aarch64_sm3partw1qv4si): Ditto.
23073         (aarch64_sm3partw2qv4si): Ditto.
23074         (aarch64_sm4eqv4si): Ditto.
23075         (aarch64_sm4ekeyqv4si): Ditto.
23076         * config/aarch64/aarch64-simd.md:
23077         (aarch64_sm3ss1qv4si): Ditto.
23078         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
23079         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
23080         (aarch64_sm4eqv4si): Ditto.
23081         (aarch64_sm4ekeyqv4si): Ditto.
23082         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
23083         (sm3part_op): Ditto.
23084         (CRYPTO_SM3TT): Ditto.
23085         (CRYPTO_SM3PART): Ditto.
23086         (UNSPEC_SM3SS1): New unspec.
23087         (UNSPEC_SM3TT1A): Ditto.
23088         (UNSPEC_SM3TT1B): Ditto.
23089         (UNSPEC_SM3TT2A): Ditto.
23090         (UNSPEC_SM3TT2B): Ditto.
23091         (UNSPEC_SM3PARTW1): Ditto.
23092         (UNSPEC_SM3PARTW2): Ditto.
23093         (UNSPEC_SM4E): Ditto.
23094         (UNSPEC_SM4EKEY): Ditto.
23095         * config/aarch64/constraints.md (Ui2): New constraint.
23096         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
23097         * config/arm/types.md (crypto_sm3): New type attribute.
23098         (crypto_sm4): Ditto.
23099         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
23100         (vsm3tt1aq_u32): Ditto.
23101         (vsm3tt1bq_u32): Ditto.
23102         (vsm3tt2aq_u32): Ditto.
23103         (vsm3tt2bq_u32): Ditto.
23104         (vsm3partw1q_u32): Ditto.
23105         (vsm3partw2q_u32): Ditto.
23106         (vsm4eq_u32): Ditto.
23107         (vsm4ekeyq_u32): Ditto.
23108         (doc/invoke.texi): Document new sm4 option.
23110 2018-01-10  Michael Collison  <michael.collison@arm.com>
23112         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
23113         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
23114         (AARCH64_FL_FOR_ARCH8_4): New.
23115         (AARCH64_FL_V8_4): New flag.
23116         (doc/invoke.texi): Document new armv8.4-a option.
23118 2018-01-10  Michael Collison  <michael.collison@arm.com>
23120         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23121         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
23122         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
23123         * config/aarch64/aarch64-option-extension.def: Add
23124         AARCH64_OPT_EXTENSION of 'sha2'.
23125         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
23126         (crypto): Disable sha2 and aes if crypto disabled.
23127         (crypto): Enable aes and sha2 if enabled.
23128         (simd): Disable sha2 and aes if simd disabled.
23129         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
23130         New flags.
23131         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
23132         (TARGET_SHA2): New feature flag for sha2.
23133         (TARGET_AES): New feature flag for aes.
23134         * config/aarch64/aarch64-simd.md:
23135         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
23136         conditional on TARGET_AES.
23137         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
23138         (aarch64_crypto_sha1hsi): Make pattern conditional
23139         on TARGET_SHA2.
23140         (aarch64_crypto_sha1hv4si): Ditto.
23141         (aarch64_be_crypto_sha1hv4si): Ditto.
23142         (aarch64_crypto_sha1su1v4si): Ditto.
23143         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
23144         (aarch64_crypto_sha1su0v4si): Ditto.
23145         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
23146         (aarch64_crypto_sha256su0v4si): Ditto.
23147         (aarch64_crypto_sha256su1v4si): Ditto.
23148         (doc/invoke.texi): Document new aes and sha2 options.
23150 2018-01-10  Martin Sebor  <msebor@redhat.com>
23152         PR tree-optimization/83781
23153         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
23154         as string arrays.
23156 2018-01-11  Martin Sebor  <msebor@gmail.com>
23157             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
23159         PR tree-optimization/83501
23160         PR tree-optimization/81703
23162         * tree-ssa-strlen.c (get_string_cst): Rename...
23163         (get_string_len): ...to this.  Handle global constants.
23164         (handle_char_store): Adjust.
23166 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
23167             Jim Wilson  <jimw@sifive.com>
23169         * config/riscv/riscv-protos.h (riscv_output_return): New.
23170         * config/riscv/riscv.c (struct machine_function): New naked_p field.
23171         (riscv_attribute_table, riscv_output_return),
23172         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
23173         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
23174         (riscv_compute_frame_info): Only compute frame->mask if not a naked
23175         function.
23176         (riscv_expand_prologue): Add early return for naked function.
23177         (riscv_expand_epilogue): Likewise.
23178         (riscv_function_ok_for_sibcall): Return false for naked function.
23179         (riscv_set_current_function): New.
23180         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
23181         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
23182         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
23183         * doc/extend.texi (RISC-V Function Attributes): New.
23185 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
23187         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
23188         check for 128-bit long double before checking TCmode.
23189         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
23190         128-bit long doubles before checking TFmode or TCmode.
23191         (FLOAT128_IBM_P): Likewise.
23193 2018-01-10  Martin Sebor  <msebor@redhat.com>
23195         PR tree-optimization/83671
23196         * builtins.c (c_strlen): Unconditionally return zero for the empty
23197         string.
23198         Use -Warray-bounds for warnings.
23199         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
23200         for non-constant array indices with COMPONENT_REF, arrays of
23201         arrays, and pointers to arrays.
23202         (gimple_fold_builtin_strlen): Determine and set length range for
23203         non-constant character arrays.
23205 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
23207         PR middle-end/81897
23208         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
23209         empty blocks.
23211 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
23213         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
23215 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
23217         PR target/83399
23218         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
23219         VECTOR_MEM_ALTIVEC_OR_VSX_P.
23220         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
23221         indexed_or_indirect_operand predicate.
23222         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
23223         (*vsx_le_perm_load_v8hi): Likewise.
23224         (*vsx_le_perm_load_v16qi): Likewise.
23225         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
23226         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
23227         (*vsx_le_perm_store_v8hi): Likewise.
23228         (*vsx_le_perm_store_v16qi): Likewise.
23229         (eight unnamed splitters): Likewise.
23231 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
23233         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
23234         * config/rs6000/emmintrin.h: Likewise.
23235         * config/rs6000/mmintrin.h: Likewise.
23236         * config/rs6000/xmmintrin.h: Likewise.
23238 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
23240         PR c++/43486
23241         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
23242         "public_flag".
23243         * tree.c (tree_nop_conversion): Return true for location wrapper
23244         nodes.
23245         (maybe_wrap_with_location): New function.
23246         (selftest::check_strip_nops): New function.
23247         (selftest::test_location_wrappers): New function.
23248         (selftest::tree_c_tests): Call it.
23249         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
23250         (maybe_wrap_with_location): New decl.
23251         (EXPR_LOCATION_WRAPPER_P): New macro.
23252         (location_wrapper_p): New inline function.
23253         (tree_strip_any_location_wrapper): New inline function.
23255 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
23257         PR target/83735
23258         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
23259         stack_realign_offset for the largest alignment of stack slot
23260         actually used.
23261         (ix86_find_max_used_stack_alignment): New function.
23262         (ix86_finalize_stack_frame_flags): Use it.  Set
23263         max_used_stack_alignment if we don't realign stack.
23264         * config/i386/i386.h (machine_function): Add
23265         max_used_stack_alignment.
23267 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
23269         * config/arm/arm.opt (-mbranch-cost): New option.
23270         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
23271         account.
23273 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
23275         PR target/83629
23276         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
23277         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
23279 2018-01-10  Richard Biener  <rguenther@suse.de>
23281         PR debug/83765
23282         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
23283         early out so it also covers the case where we have a non-NULL
23284         origin.
23286 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
23288         PR tree-optimization/83753
23289         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
23290         for non-strided grouped accesses if the number of elements is 1.
23292 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
23294         PR target/81616
23295         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
23296         * i386.h (TARGET_USE_GATHER): Define.
23297         * x86-tune.def (X86_TUNE_USE_GATHER): New.
23299 2018-01-10  Martin Liska  <mliska@suse.cz>
23301         PR bootstrap/82831
23302         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
23303         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
23304         partitioning.
23305         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
23306         CLEANUP_NO_PARTITIONING is not set.
23308 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
23310         * doc/rtl.texi: Remove documentation of (const ...) wrappers
23311         for vectors, as a partial revert of r254296.
23312         * rtl.h (const_vec_p): Delete.
23313         (const_vec_duplicate_p): Don't test for vector CONSTs.
23314         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
23315         * expmed.c (make_tree): Likewise.
23317         Revert:
23318         * common.md (E, F): Use CONSTANT_P instead of checking for
23319         CONST_VECTOR.
23320         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
23321         checking for CONST_VECTOR.
23323 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
23325         PR middle-end/83575
23326         * predict.c (force_edge_cold): Handle in more sane way edges
23327         with no prediction.
23329 2018-01-09  Carl Love  <cel@us.ibm.com>
23331         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
23332         V4SI, V4SF types.
23333         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
23334         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
23335         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
23336         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
23337         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
23338         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
23339         * config/rs6000/rs6000-protos.h: Add extern defition for
23340         rs6000_generate_float2_double_code.
23341         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
23342         function.
23343         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
23344         (float2_v2df): Add define_expand.
23346 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
23348         PR target/83628
23349         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
23350         op_mode in the force_to_mode call.
23352 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
23354         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
23355         instead of checking each element individually.
23356         (aarch64_evpc_uzp): Likewise.
23357         (aarch64_evpc_zip): Likewise.
23358         (aarch64_evpc_ext): Likewise.
23359         (aarch64_evpc_rev): Likewise.
23360         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
23361         instead of checking each element individually.  Return true without
23362         generating rtl if
23363         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
23364         whether all selected elements come from the same input, instead of
23365         checking each element individually.  Remove calls to gen_rtx_REG,
23366         start_sequence and end_sequence and instead assert that no rtl is
23367         generated.
23369 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
23371         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
23372         order of HIGH and CONST checks.
23374 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
23376         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
23377         if the destination isn't an SSA_NAME.
23379 2018-01-09  Richard Biener  <rguenther@suse.de>
23381         PR tree-optimization/83668
23382         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
23383         move prologue...
23384         (canonicalize_loop_form): ... here, renamed from ...
23385         (canonicalize_loop_closed_ssa_form): ... this and amended to
23386         swap successor edges for loop exit blocks to make us use
23387         the RPO order we need for initial schedule generation.
23389 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
23391         PR tree-optimization/64811
23392         * match.pd: When optimizing comparisons with Inf, avoid
23393         introducing or losing exceptions from comparisons with NaN.
23395 2018-01-09  Martin Liska  <mliska@suse.cz>
23397         PR sanitizer/82517
23398         * asan.c (shadow_mem_size): Add gcc_assert.
23400 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
23402         Don't save registers in main().
23404         PR target/83738
23405         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
23406         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
23407         * config/avr/avr.c (avr_set_current_function): Don't error if
23408         naked, OS_task or OS_main are specified at the same time.
23409         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
23410         OS_main.
23411         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
23412         attribute.
23413         * common/config/avr/avr-common.c (avr_option_optimization_table):
23414         Switch on -mmain-is-OS_task for optimizing compilations.
23416 2018-01-09  Richard Biener  <rguenther@suse.de>
23418         PR tree-optimization/83572
23419         * graphite.c: Include cfganal.h.
23420         (graphite_transform_loops): Connect infinite loops to exit
23421         and remove fake edges at the end.
23423 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
23425         * ipa-inline.c (edge_badness): Revert accidental checkin.
23427 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
23429         PR ipa/80763
23430         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
23431         symbols; not inline clones.
23433 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
23435         PR target/83507
23436         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
23437         hard registers.  Formatting fixes.
23439         PR preprocessor/83722
23440         * gcc.c (try_generate_repro): Pass
23441         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
23442         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
23443         do_report_bug.
23445 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
23446             Kito Cheng  <kito.cheng@gmail.com>
23448         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
23449         (riscv_leaf_function_p): Delete.
23450         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
23452 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23454         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
23455         function.
23456         (do_ifelse): New function.
23457         (do_isel): New function.
23458         (do_sub3): New function.
23459         (do_add3): New function.
23460         (do_load_mask_compare): New function.
23461         (do_overlap_load_compare): New function.
23462         (expand_compare_loop): New function.
23463         (expand_block_compare): Call expand_compare_loop() when appropriate.
23464         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
23465         option description.
23466         (-mblock-compare-inline-loop-limit): New option.
23468 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23470         PR target/83677
23471         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
23472         Reverse order of second and third operands in first alternative.
23473         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
23474         of first and second elements in UNSPEC_VPERMR vector.
23475         (altivec_expand_vec_perm_le): Likewise.
23477 2018-01-08  Jeff Law  <law@redhat.com>
23479         PR rtl-optimizatin/81308
23480         * tree-switch-conversion.c (cfg_altered): New file scoped static.
23481         (process_switch): If group_case_labels makes a change, then set
23482         cfg_altered.
23483         (pass_convert_switch::execute): If a switch is converted, then
23484         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
23486         PR rtl-optimization/81308
23487         * recog.c (split_all_insns): Conditionally cleanup the CFG after
23488         splitting insns.
23490 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
23492         PR target/83663 - Revert r255946
23493         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
23494         generation for cases where splatting a value is not useful.
23495         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
23496         across a vec_duplicate and a paradoxical subreg forming a vector
23497         mode to a vec_concat.
23499 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23501         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
23502         -march=armv8.3-a variants.
23503         * config/arm/t-multilib: Likewise.
23504         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
23506 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23508         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
23509         to generate rtl.
23510         (cceq_ior_compare_complement): Give it a name so I can use it, and
23511         change boolean_or_operator predicate to boolean_operator so it can
23512         be used to generate a crand.
23513         (eqne): New code iterator.
23514         (bd/bd_neg): New code_attrs.
23515         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
23516         a single define_insn.
23517         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
23518         decrement (bdnzt/bdnzf/bdzt/bdzf).
23519         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
23520         with the new names of the branch decrement patterns, and added the
23521         names of the branch decrement conditional patterns.
23523 2018-01-08  Richard Biener  <rguenther@suse.de>
23525         PR tree-optimization/83563
23526         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
23527         cache.
23529 2018-01-08  Richard Biener  <rguenther@suse.de>
23531         PR middle-end/83713
23532         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
23534 2018-01-08  Richard Biener  <rguenther@suse.de>
23536         PR tree-optimization/83685
23537         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
23538         references to abnormals.
23540 2018-01-08  Richard Biener  <rguenther@suse.de>
23542         PR lto/83719
23543         * dwarf2out.c (output_indirect_strings): Handle empty
23544         skeleton_debug_str_hash.
23545         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
23547 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
23549         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
23550         (emit_store_direct): Likewise.
23551         (arc_trampoline_adjust_address): Likewise.
23552         (arc_asm_trampoline_template): New function.
23553         (arc_initialize_trampoline): Use asm_trampoline_template.
23554         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
23555         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
23556         * config/arc/arc.md (flush_icache): Delete pattern.
23558 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
23560         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
23561         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
23562         munaligned-access.
23564 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
23566         PR target/83681
23567         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
23568         by not USED_FOR_TARGET.
23569         (make_pass_resolve_sw_modes): Likewise.
23571 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
23573         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
23574         USED_FOR_TARGET.
23576 2018-01-08  Richard Biener  <rguenther@suse.de>
23578         PR middle-end/83580
23579         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
23581 2018-01-08  Richard Biener  <rguenther@suse.de>
23583         PR middle-end/83517
23584         * match.pd ((t * 2) / 2) -> t): Add missing :c.
23586 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
23588         PR middle-end/81897
23589         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
23590         basic blocks with a small number of successors.
23591         (convert_control_dep_chain_into_preds): Improve handling of
23592         forwarder blocks.
23593         (dump_predicates): Split apart into...
23594         (dump_pred_chain): ...here...
23595         (dump_pred_info): ...and here.
23596         (can_one_predicate_be_invalidated_p): Add debugging printfs.
23597         (can_chain_union_be_invalidated_p): Improve check for invalidation
23598         of paths.
23599         (uninit_uses_cannot_happen): Avoid unnecessary if
23600         convert_control_dep_chain_into_preds yielded nothing.
23602 2018-01-06  Martin Sebor  <msebor@redhat.com>
23604         PR tree-optimization/83640
23605         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
23606         subtracting negative offset from size.
23607         (builtin_access::overlap): Adjust offset bounds of the access to fall
23608         within the size of the object if possible.
23610 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
23612         PR rtl-optimization/83699
23613         * expmed.c (extract_bit_field_1): Restrict the vector usage of
23614         extract_bit_field_as_subreg to cases in which the extracted
23615         value is also a vector.
23617         * lra-constraints.c (process_alt_operands): Test for the equivalence
23618         substitutions when detecting a possible reload cycle.
23620 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
23622         PR debug/83480
23623         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
23624         by default if flag_selective_schedling{,2}.  Formatting fixes.
23626         PR rtl-optimization/83682
23627         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
23628         if it has non-VECTOR_MODE element mode.
23629         (vec_duplicate_p): Likewise.
23631         PR middle-end/83694
23632         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
23633         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
23635 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
23637         PR target/83604
23638         * config/i386/i386-builtin.def
23639         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
23640         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
23641         Require also OPTION_MASK_ISA_AVX512F in addition to
23642         OPTION_MASK_ISA_GFNI.
23643         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
23644         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
23645         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
23646         to OPTION_MASK_ISA_GFNI.
23647         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
23648         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
23649         OPTION_MASK_ISA_AVX512BW.
23650         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
23651         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
23652         addition to OPTION_MASK_ISA_GFNI.
23653         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
23654         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
23655         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
23656         to OPTION_MASK_ISA_GFNI.
23657         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
23658         a requirement for all ISAs rather than any of them with a few
23659         exceptions.
23660         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
23661         processing.
23662         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
23663         bitmasks to be enabled with 3 exceptions, instead of requiring any
23664         enabled ISA with lots of exceptions.
23665         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
23666         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
23667         Change avx512bw in isa attribute to avx512f.
23668         * config/i386/sgxintrin.h: Add license boilerplate.
23669         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
23670         to __AVX512F__ and __AVX512VL to __AVX512VL__.
23671         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
23672         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
23673         defined.
23674         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
23675         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
23676         temporarily sse2 rather than sse if not enabled already.
23678         PR target/83604
23679         * config/i386/sse.md (VI248_VLBW): Rename to ...
23680         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
23681         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
23682         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
23683         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
23684         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
23685         mode iterator instead of VI248_VLBW.
23687 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
23689         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
23690         (record_modified): Skip clobbers; add debug output.
23691         (param_change_prob): Use sreal frequencies.
23693 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
23695         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
23696         punt for user-aligned variables.
23698 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
23700         * tree-chrec.c (chrec_contains_symbols): Return true for
23701         POLY_INT_CST.
23703 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
23705         PR target/82439
23706         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
23707         of (x|y) == x for BICS pattern.
23709 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
23711         PR tree-optimization/83605
23712         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
23713         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
23714         can throw.
23716 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
23718         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
23719         * config/epiphany/rtems.h: New file.
23721 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
23722             Uros Bizjak  <ubizjak@gmail.com>
23724         PR target/83554
23725         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
23726         QIreg_operand instead of register_operand predicate.
23727         * config/i386/i386.c (ix86_rop_should_change_byte_p,
23728         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
23729         comments instead of -fmitigate[-_]rop.
23731 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
23733         PR bootstrap/81926
23734         * cgraphunit.c (symbol_table::compile): Switch to text_section
23735         before calling assembly_start debug hook.
23736         * run-rtl-passes.c (run_rtl_passes): Likewise.
23737         Include output.h.
23739 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23741         * tree-vrp.c (extract_range_from_binary_expr_1): Check
23742         range_int_cst_p rather than !symbolic_range_p before calling
23743         extract_range_from_multiplicative_op_1.
23745 2018-01-04  Jeff Law  <law@redhat.com>
23747         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
23748         redundant test in assertion.
23750 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23752         * doc/rtl.texi: Document machine_mode wrapper classes.
23754 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23756         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
23757         using tree_to_uhwi.
23759 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23761         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
23762         the VEC_PERM_EXPR fold to fail.
23764 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
23766         PR debug/83585
23767         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
23768         to switched_sections.
23770 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23772         PR target/83680
23773         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
23774         test for d.testing.
23776 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
23778         PR target/83387
23779         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
23780         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
23782 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
23784         PR debug/83666
23785         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
23786         is BLKmode and bitpos not zero or mode change is needed.
23788 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23790         PR target/83675
23791         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
23792         TARGET_VIS2.
23794 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
23796         PR target/83628
23797         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
23798         instead of MULT rtx.  Update all corresponding splitters.
23799         (*saddl_se): Ditto.
23800         (*ssub<modesuffix>): Ditto.
23801         (*ssubl_se): Ditto.
23802         (*cmp_sadd_di): Update split patterns.
23803         (*cmp_sadd_si): Ditto.
23804         (*cmp_sadd_sidi): Ditto.
23805         (*cmp_ssub_di): Ditto.
23806         (*cmp_ssub_si): Ditto.
23807         (*cmp_ssub_sidi): Ditto.
23808         * config/alpha/predicates.md (const23_operand): New predicate.
23809         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
23810         Look for ASHIFT, not MULT inner operand.
23811         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
23813 2018-01-04  Martin Liska  <mliska@suse.cz>
23815         PR gcov-profile/83669
23816         * gcov.c (output_intermediate_file): Add version to intermediate
23817         gcov file.
23818         * doc/gcov.texi: Document new field 'version' in intermediate
23819         file format. Fix location of '-k' option of gcov command.
23821 2018-01-04  Martin Liska  <mliska@suse.cz>
23823         PR ipa/82352
23824         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
23826 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
23828         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
23830 2018-01-03  Martin Sebor  <msebor@redhat.com>
23832         PR tree-optimization/83655
23833         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
23834         checking calls with invalid arguments.
23836 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23838         * tree-vect-stmts.c (vect_get_store_rhs): New function.
23839         (vectorizable_mask_load_store): Delete.
23840         (vectorizable_call): Return false for masked loads and stores.
23841         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
23842         instead of gimple_assign_rhs1.
23843         (vectorizable_load): Handle IFN_MASK_LOAD.
23844         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
23846 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23848         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
23849         split out from..,
23850         (vectorizable_mask_load_store): ...here.
23851         (vectorizable_load): ...and here.
23853 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23855         * tree-vect-stmts.c (vect_build_all_ones_mask)
23856         (vect_build_zero_merge_argument): New functions, split out from...
23857         (vectorizable_load): ...here.
23859 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23861         * tree-vect-stmts.c (vect_check_store_rhs): New function,
23862         split out from...
23863         (vectorizable_mask_load_store): ...here.
23864         (vectorizable_store): ...and here.
23866 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23868         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
23869         split out from...
23870         (vectorizable_mask_load_store): ...here.
23872 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23874         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
23875         (vect_model_store_cost): Take a vec_load_store_type instead of a
23876         vect_def_type.
23877         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
23878         (vect_model_store_cost): Take a vec_load_store_type instead of a
23879         vect_def_type.
23880         (vectorizable_mask_load_store): Update accordingly.
23881         (vectorizable_store): Likewise.
23882         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
23884 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23886         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
23887         IFN_MASK_LOAD calls here rather than...
23888         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
23890 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23891             Alan Hayward  <alan.hayward@arm.com>
23892             David Sherwood  <david.sherwood@arm.com>
23894         * expmed.c (extract_bit_field_1): For vector extracts,
23895         fall back to extract_bit_field_as_subreg if vec_extract
23896         isn't available.
23898 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23899             Alan Hayward  <alan.hayward@arm.com>
23900             David Sherwood  <david.sherwood@arm.com>
23902         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
23903         they are variable or constant sized.
23904         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
23905         slots for constant-sized data.
23907 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23908             Alan Hayward  <alan.hayward@arm.com>
23909             David Sherwood  <david.sherwood@arm.com>
23911         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
23912         handling COND_EXPRs with boolean comparisons, try to find a better
23913         basis for the mask type than the boolean itself.
23915 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23917         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
23918         is calculated and how it can be overridden.
23919         * genmodes.c (max_bitsize_mode_any_mode): New variable.
23920         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
23921         if defined.
23922         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
23923         if nonzero.
23925 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23926             Alan Hayward  <alan.hayward@arm.com>
23927             David Sherwood  <david.sherwood@arm.com>
23929         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
23930         Remove the mode argument.
23931         (aarch64_simd_valid_immediate): Remove the mode and inverse
23932         arguments.
23933         * config/aarch64/iterators.md (bitsize): New iterator.
23934         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
23935         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
23936         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
23937         aarch64_simd_valid_immediate.
23938         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
23939         (aarch64_reg_or_bic_imm): Likewise.
23940         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
23941         with an insn_type enum and msl with a modifier_type enum.
23942         Replace element_width with a scalar_mode.  Change the shift
23943         to unsigned int.  Add constructors for scalar_float_mode and
23944         scalar_int_mode elements.
23945         (aarch64_vect_float_const_representable_p): Delete.
23946         (aarch64_can_const_movi_rtx_p)
23947         (aarch64_simd_scalar_immediate_valid_for_move)
23948         (aarch64_simd_make_constant): Update call to
23949         aarch64_simd_valid_immediate.
23950         (aarch64_advsimd_valid_immediate_hs): New function.
23951         (aarch64_advsimd_valid_immediate): Likewise.
23952         (aarch64_simd_valid_immediate): Remove mode and inverse
23953         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
23954         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
23955         and aarch64_float_const_representable_p on the result.
23956         (aarch64_output_simd_mov_immediate): Remove mode argument.
23957         Update call to aarch64_simd_valid_immediate and use of
23958         simd_immediate_info.
23959         (aarch64_output_scalar_simd_mov_immediate): Update call
23960         accordingly.
23962 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23963             Alan Hayward  <alan.hayward@arm.com>
23964             David Sherwood  <david.sherwood@arm.com>
23966         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
23967         (mode_nunits): Likewise CONST_MODE_NUNITS.
23968         * machmode.def (ADJUST_NUNITS): Document.
23969         * genmodes.c (mode_data::need_nunits_adj): New field.
23970         (blank_mode): Update accordingly.
23971         (adj_nunits): New variable.
23972         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
23973         parameter.
23974         (emit_mode_size_inline): Set need_bytesize_adj for all modes
23975         listed in adj_nunits.
23976         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
23977         listed in adj_nunits.  Don't emit case statements for such modes.
23978         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
23979         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
23980         nothing if adj_nunits is nonnull.
23981         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
23982         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
23983         (emit_mode_fbit): Update use of print_maybe_const_decl.
23984         (emit_move_size): Likewise.  Treat the array as non-const
23985         if adj_nunits.
23986         (emit_mode_adjustments): Handle adj_nunits.
23988 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23990         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
23991         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
23992         (VECTOR_MODES): Use it.
23993         (make_vector_modes): Take the prefix as an argument.
23995 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23996             Alan Hayward  <alan.hayward@arm.com>
23997             David Sherwood  <david.sherwood@arm.com>
23999         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
24000         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
24001         for MODE_VECTOR_BOOL.
24002         * machmode.def (VECTOR_BOOL_MODE): Document.
24003         * genmodes.c (VECTOR_BOOL_MODE): New macro.
24004         (make_vector_bool_mode): New function.
24005         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
24006         MODE_VECTOR_BOOL.
24007         * lto-streamer-in.c (lto_input_mode_table): Likewise.
24008         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
24009         Likewise.
24010         * stor-layout.c (int_mode_for_mode): Likewise.
24011         * tree.c (build_vector_type_for_mode): Likewise.
24012         * varasm.c (output_constant_pool_2): Likewise.
24013         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
24014         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
24015         for MODE_VECTOR_BOOL.
24016         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
24017         of mode class checks.
24018         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
24019         instead of a list of mode class checks.
24020         (expand_vector_scalar_condition): Likewise.
24021         (type_for_widest_vector_mode): Handle BImode as an inner mode.
24023 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24024             Alan Hayward  <alan.hayward@arm.com>
24025             David Sherwood  <david.sherwood@arm.com>
24027         * machmode.h (mode_size): Change from unsigned short to
24028         poly_uint16_pod.
24029         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
24030         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24031         or if measurement_type is not polynomial.
24032         (fixed_size_mode::includes_p): Check for constant-sized modes.
24033         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
24034         return a poly_uint16 rather than an unsigned short.
24035         (emit_mode_size): Change the type of mode_size from unsigned short
24036         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
24037         (emit_mode_adjustments): Cope with polynomial vector sizes.
24038         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24039         for GET_MODE_SIZE.
24040         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24041         for GET_MODE_SIZE.
24042         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
24043         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
24044         * caller-save.c (setup_save_areas): Likewise.
24045         (replace_reg_with_saved_mem): Likewise.
24046         * calls.c (emit_library_call_value_1): Likewise.
24047         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
24048         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
24049         (gen_lowpart_for_combine): Likewise.
24050         * convert.c (convert_to_integer_1): Likewise.
24051         * cse.c (equiv_constant, cse_insn): Likewise.
24052         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
24053         (cselib_subst_to_values): Likewise.
24054         * dce.c (word_dce_process_block): Likewise.
24055         * df-problems.c (df_word_lr_mark_ref): Likewise.
24056         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
24057         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
24058         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
24059         (rtl_for_decl_location): Likewise.
24060         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
24061         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
24062         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
24063         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
24064         (expand_expr_real_1): Likewise.
24065         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
24066         (pad_below): Likewise.
24067         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24068         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
24069         * ira.c (get_subreg_tracking_sizes): Likewise.
24070         * ira-build.c (ira_create_allocno_objects): Likewise.
24071         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
24072         (ira_sort_regnos_for_alter_reg): Likewise.
24073         * ira-costs.c (record_operand_costs): Likewise.
24074         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
24075         (resolve_simple_move): Likewise.
24076         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
24077         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
24078         (lra_constraints): Likewise.
24079         (CONST_POOL_OK_P): Reject variable-sized modes.
24080         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
24081         (add_pseudo_to_slot, lra_spill): Likewise.
24082         * omp-low.c (omp_clause_aligned_alignment): Likewise.
24083         * optabs-query.c (get_best_extraction_insn): Likewise.
24084         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24085         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
24086         (expand_mult_highpart, valid_multiword_target_p): Likewise.
24087         * recog.c (offsettable_address_addr_space_p): Likewise.
24088         * regcprop.c (maybe_mode_change): Likewise.
24089         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
24090         * regrename.c (build_def_use): Likewise.
24091         * regstat.c (dump_reg_info): Likewise.
24092         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
24093         (find_reloads, find_reloads_subreg_address): Likewise.
24094         * reload1.c (eliminate_regs_1): Likewise.
24095         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
24096         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
24097         (simplify_binary_operation_1, simplify_subreg): Likewise.
24098         * targhooks.c (default_function_arg_padding): Likewise.
24099         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
24100         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
24101         (verify_gimple_assign_ternary): Likewise.
24102         * tree-inline.c (estimate_move_cost): Likewise.
24103         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24104         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
24105         (get_address_cost_ainc): Likewise.
24106         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
24107         (vect_supportable_dr_alignment): Likewise.
24108         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24109         (vectorizable_reduction): Likewise.
24110         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
24111         (vectorizable_operation, vectorizable_load): Likewise.
24112         * tree.c (build_same_sized_truth_vector_type): Likewise.
24113         * valtrack.c (cleanup_auto_inc_dec): Likewise.
24114         * var-tracking.c (emit_note_insn_var_location): Likewise.
24115         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
24116         (ADDR_VEC_ALIGN): Likewise.
24118 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24119             Alan Hayward  <alan.hayward@arm.com>
24120             David Sherwood  <david.sherwood@arm.com>
24122         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
24123         unsigned short.
24124         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24125         or if measurement_type is polynomial.
24126         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
24127         * combine.c (make_extraction): Likewise.
24128         * dse.c (find_shift_sequence): Likewise.
24129         * dwarf2out.c (mem_loc_descriptor): Likewise.
24130         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
24131         (extract_bit_field, extract_low_bits): Likewise.
24132         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
24133         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
24134         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
24135         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
24136         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24137         * reload.c (find_reloads): Likewise.
24138         * reload1.c (alter_reg): Likewise.
24139         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
24140         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
24141         * tree-if-conv.c (predicate_mem_writes): Likewise.
24142         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
24143         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
24144         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
24145         * valtrack.c (dead_debug_insert_temp): Likewise.
24146         * varasm.c (mergeable_constant_section): Likewise.
24147         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
24149 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24150             Alan Hayward  <alan.hayward@arm.com>
24151             David Sherwood  <david.sherwood@arm.com>
24153         * expr.c (expand_assignment): Cope with polynomial mode sizes
24154         when assigning to a CONCAT.
24156 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24157             Alan Hayward  <alan.hayward@arm.com>
24158             David Sherwood  <david.sherwood@arm.com>
24160         * machmode.h (mode_precision): Change from unsigned short to
24161         poly_uint16_pod.
24162         (mode_to_precision): Return a poly_uint16 rather than an unsigned
24163         short.
24164         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
24165         or if measurement_type is not polynomial.
24166         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
24167         in which the mode is already known to be a scalar_int_mode.
24168         * genmodes.c (emit_mode_precision): Change the type of mode_precision
24169         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
24170         initializer.
24171         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24172         for GET_MODE_PRECISION.
24173         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24174         for GET_MODE_PRECISION.
24175         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
24176         as polynomial.
24177         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
24178         (expand_field_assignment, make_extraction): Likewise.
24179         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
24180         (get_last_value): Likewise.
24181         * convert.c (convert_to_integer_1): Likewise.
24182         * cse.c (cse_insn): Likewise.
24183         * expr.c (expand_expr_real_1): Likewise.
24184         * lra-constraints.c (simplify_operand_subreg): Likewise.
24185         * optabs-query.c (can_atomic_load_p): Likewise.
24186         * optabs.c (expand_atomic_load): Likewise.
24187         (expand_atomic_store): Likewise.
24188         * ree.c (combine_reaching_defs): Likewise.
24189         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
24190         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
24191         * tree.h (type_has_mode_precision_p): Likewise.
24192         * ubsan.c (instrument_si_overflow): Likewise.
24194 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24195             Alan Hayward  <alan.hayward@arm.com>
24196             David Sherwood  <david.sherwood@arm.com>
24198         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
24199         polynomial numbers of units.
24200         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
24201         (valid_vector_subparts_p): New function.
24202         (build_vector_type): Remove temporary shim and take the number
24203         of units as a poly_uint64 rather than an int.
24204         (build_opaque_vector_type): Take the number of units as a
24205         poly_uint64 rather than an int.
24206         * tree.c (build_vector_from_ctor): Handle polynomial
24207         TYPE_VECTOR_SUBPARTS.
24208         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
24209         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
24210         (build_vector_from_val): If the number of units is variable,
24211         use build_vec_duplicate_cst for constant operands and
24212         VEC_DUPLICATE_EXPR otherwise.
24213         (make_vector_type): Remove temporary is_constant ().
24214         (build_vector_type, build_opaque_vector_type): Take the number of
24215         units as a poly_uint64 rather than an int.
24216         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
24217         VECTOR_CST_NELTS.
24218         * cfgexpand.c (expand_debug_expr): Likewise.
24219         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
24220         (store_constructor, expand_expr_real_1): Likewise.
24221         (const_scalar_mask_from_tree): Likewise.
24222         * fold-const-call.c (fold_const_reduction): Likewise.
24223         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
24224         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
24225         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
24226         (fold_relational_const): Likewise.
24227         (native_interpret_vector): Likewise.  Change the size from an
24228         int to an unsigned int.
24229         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
24230         TYPE_VECTOR_SUBPARTS.
24231         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
24232         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
24233         duplicating a non-constant operand into a variable-length vector.
24234         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
24235         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
24236         * ipa-icf.c (sem_variable::equals): Likewise.
24237         * match.pd: Likewise.
24238         * omp-simd-clone.c (simd_clone_subparts): Likewise.
24239         * print-tree.c (print_node): Likewise.
24240         * stor-layout.c (layout_type): Likewise.
24241         * targhooks.c (default_builtin_vectorization_cost): Likewise.
24242         * tree-cfg.c (verify_gimple_comparison): Likewise.
24243         (verify_gimple_assign_binary): Likewise.
24244         (verify_gimple_assign_ternary): Likewise.
24245         (verify_gimple_assign_single): Likewise.
24246         * tree-pretty-print.c (dump_generic_node): Likewise.
24247         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24248         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
24249         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
24250         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
24251         (vect_shift_permute_load_chain): Likewise.
24252         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
24253         (expand_vector_condition, optimize_vector_constructor): Likewise.
24254         (lower_vec_perm, get_compute_type): Likewise.
24255         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24256         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
24257         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
24258         (vect_recog_mask_conversion_pattern): Likewise.
24259         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
24260         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
24261         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24262         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
24263         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
24264         (vectorizable_shift, vectorizable_operation, vectorizable_store)
24265         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
24266         (supportable_widening_operation): Likewise.
24267         (supportable_narrowing_operation): Likewise.
24268         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
24269         Likewise.
24270         * varasm.c (output_constant): Likewise.
24272 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24273             Alan Hayward  <alan.hayward@arm.com>
24274             David Sherwood  <david.sherwood@arm.com>
24276         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
24277         so that both the length == 3 and length != 3 cases set up their
24278         own permute vectors.  Add comments explaining why we know the
24279         number of elements is constant.
24280         (vect_permute_load_chain): Likewise.
24282 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24283             Alan Hayward  <alan.hayward@arm.com>
24284             David Sherwood  <david.sherwood@arm.com>
24286         * machmode.h (mode_nunits): Change from unsigned char to
24287         poly_uint16_pod.
24288         (ONLY_FIXED_SIZE_MODES): New macro.
24289         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
24290         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
24291         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
24292         New typedefs.
24293         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
24294         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
24295         or if measurement_type is not polynomial.
24296         * genmodes.c (ZERO_COEFFS): New macro.
24297         (emit_mode_nunits_inline): Make mode_nunits_inline return a
24298         poly_uint16.
24299         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
24300         Use ZERO_COEFFS when emitting initializers.
24301         * data-streamer.h (bp_pack_poly_value): New function.
24302         (bp_unpack_poly_value): Likewise.
24303         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24304         for GET_MODE_NUNITS.
24305         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24306         for GET_MODE_NUNITS.
24307         * tree.c (make_vector_type): Remove temporary shim and make
24308         the real function take the number of units as a poly_uint64
24309         rather than an int.
24310         (build_vector_type_for_mode): Handle polynomial nunits.
24311         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
24312         * emit-rtl.c (const_vec_series_p_1): Likewise.
24313         (gen_rtx_CONST_VECTOR): Likewise.
24314         * fold-const.c (test_vec_duplicate_folding): Likewise.
24315         * genrecog.c (validate_pattern): Likewise.
24316         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
24317         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24318         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
24319         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
24320         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
24321         * rtlanal.c (subreg_get_info): Likewise.
24322         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24323         (vect_grouped_load_supported): Likewise.
24324         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
24325         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
24326         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
24327         (simplify_const_unary_operation, simplify_binary_operation_1)
24328         (simplify_const_binary_operation, simplify_ternary_operation)
24329         (test_vector_ops_duplicate, test_vector_ops): Likewise.
24330         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
24331         instead of CONST_VECTOR_NUNITS.
24332         * varasm.c (output_constant_pool_2): Likewise.
24333         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
24334         explicit-encoded elements in the XVEC for variable-length vectors.
24336 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24338         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
24340 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24341             Alan Hayward  <alan.hayward@arm.com>
24342             David Sherwood  <david.sherwood@arm.com>
24344         * coretypes.h (fixed_size_mode): Declare.
24345         (fixed_size_mode_pod): New typedef.
24346         * builtins.h (target_builtins::x_apply_args_mode)
24347         (target_builtins::x_apply_result_mode): Change type to
24348         fixed_size_mode_pod.
24349         * builtins.c (apply_args_size, apply_result_size, result_vector)
24350         (expand_builtin_apply_args_1, expand_builtin_apply)
24351         (expand_builtin_return): Update accordingly.
24353 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24355         * cse.c (hash_rtx_cb): Hash only the encoded elements.
24356         * cselib.c (cselib_hash_rtx): Likewise.
24357         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
24358         CONST_VECTOR encoding.
24360 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
24361             Jeff Law  <law@redhat.com>
24363         PR target/83641
24364         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
24365         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
24366         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
24367         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
24369         PR target/83641
24370         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
24371         explicitly probe *sp in a noreturn function if there were any callee
24372         register saves or frame pointer is needed.
24374 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
24376         PR debug/83621
24377         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
24378         BLKmode for ternary, binary or unary expressions.
24380         PR debug/83645
24381         * var-tracking.c (delete_vta_debug_insn): New inline function.
24382         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
24383         insns from get_insns () to NULL instead of each bb separately.
24384         Use delete_vta_debug_insn.  No longer static.
24385         (vt_debug_insns_local, variable_tracking_main_1): Adjust
24386         delete_vta_debug_insns callers.
24387         * rtl.h (delete_vta_debug_insns): Declare.
24388         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
24389         instead of variable_tracking_main.
24391 2018-01-03  Martin Sebor  <msebor@redhat.com>
24393         PR tree-optimization/83603
24394         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
24395         arguments past the endof the argument list in functions declared
24396         without a prototype.
24397         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
24398         Avoid checking when arguments are null.
24400 2018-01-03  Martin Sebor  <msebor@redhat.com>
24402         PR c/83559
24403         * doc/extend.texi (attribute const): Fix a typo.
24404         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
24405         issuing -Wsuggest-attribute for void functions.
24407 2018-01-03  Martin Sebor  <msebor@redhat.com>
24409         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
24410         offset_int::from instead of wide_int::to_shwi.
24411         (maybe_diag_overlap): Remove assertion.
24412         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
24413         * gimple-ssa-sprintf.c (format_directive): Same.
24414         (parse_directive): Same.
24415         (sprintf_dom_walker::compute_format_length): Same.
24416         (try_substitute_return_value): Same.
24418 2018-01-03  Jeff Law  <law@redhat.com>
24420         PR middle-end/83654
24421         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
24422         non-constant residual for zero at runtime and avoid probing in
24423         that case.  Reorganize code for trailing problem to mirror handling
24424         of the residual.
24426 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
24428         PR tree-optimization/83501
24429         * tree-ssa-strlen.c (get_string_cst): New.
24430         (handle_char_store): Call get_string_cst.
24432 2018-01-03  Martin Liska  <mliska@suse.cz>
24434         PR tree-optimization/83593
24435         * tree-ssa-strlen.c: Include tree-cfg.h.
24436         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
24437         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
24438         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
24439         to false.
24440         (strlen_dom_walker::before_dom_children): Call
24441         gimple_purge_dead_eh_edges. Dump tranformation with details
24442         dump flags.
24443         (strlen_dom_walker::before_dom_children): Update call by adding
24444         new argument cleanup_eh.
24445         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
24447 2018-01-03  Martin Liska  <mliska@suse.cz>
24449         PR ipa/83549
24450         * cif-code.def (VARIADIC_THUNK): New enum value.
24451         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
24452         thunks.
24454 2018-01-03  Jan Beulich  <jbeulich@suse.com>
24456         * sse.md (mov<mode>_internal): Tighten condition for when to use
24457         vmovdqu<ssescalarsize> for TI and OI modes.
24459 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
24461         Update copyright years.
24463 2018-01-03  Martin Liska  <mliska@suse.cz>
24465         PR ipa/83594
24466         * ipa-visibility.c (function_and_variable_visibility): Skip
24467         functions with noipa attribure.
24469 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
24471         * gcc.c (process_command): Update copyright notice dates.
24472         * gcov-dump.c (print_version): Ditto.
24473         * gcov.c (print_version): Ditto.
24474         * gcov-tool.c (print_version): Ditto.
24475         * gengtype.c (create_file): Ditto.
24476         * doc/cpp.texi: Bump @copying's copyright year.
24477         * doc/cppinternals.texi: Ditto.
24478         * doc/gcc.texi: Ditto.
24479         * doc/gccint.texi: Ditto.
24480         * doc/gcov.texi: Ditto.
24481         * doc/install.texi: Ditto.
24482         * doc/invoke.texi: Ditto.
24484 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24486         * vector-builder.h (vector_builder::m_full_nelts): Change from
24487         unsigned int to poly_uint64.
24488         (vector_builder::full_nelts): Update prototype accordingly.
24489         (vector_builder::new_vector): Likewise.
24490         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
24491         (vector_builder::operator ==): Likewise.
24492         (vector_builder::finalize): Likewise.
24493         * int-vector-builder.h (int_vector_builder::int_vector_builder):
24494         Take the number of elements as a poly_uint64 rather than an
24495         unsigned int.
24496         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
24497         from unsigned int to poly_uint64.
24498         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
24499         (vec_perm_indices::new_vector): Likewise.
24500         (vec_perm_indices::length): Likewise.
24501         (vec_perm_indices::nelts_per_input): Likewise.
24502         (vec_perm_indices::input_nelts): Likewise.
24503         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
24504         number of elements per input as a poly_uint64 rather than an
24505         unsigned int.  Use the original encoding for variable-length
24506         vectors, rather than clamping each individual element.
24507         For the second and subsequent elements in each pattern,
24508         clamp the step and base before clamping their sum.
24509         (vec_perm_indices::series_p): Handle polynomial element counts.
24510         (vec_perm_indices::all_in_range_p): Likewise.
24511         (vec_perm_indices_to_tree): Likewise.
24512         (vec_perm_indices_to_rtx): Likewise.
24513         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
24514         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
24515         (tree_vector_builder::new_binary_operation): Handle polynomial
24516         element counts.  Return false if we need to know the number
24517         of elements at compile time.
24518         * fold-const.c (fold_vec_perm): Punt if the number of elements
24519         isn't known at compile time.
24521 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24523         * vec-perm-indices.h (vec_perm_builder): Change element type
24524         from HOST_WIDE_INT to poly_int64.
24525         (vec_perm_indices::element_type): Update accordingly.
24526         (vec_perm_indices::clamp): Handle polynomial element_types.
24527         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24528         (vec_perm_indices::all_in_range_p): Likewise.
24529         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
24530         than shwi trees.
24531         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
24532         polynomial vec_perm_indices element types.
24533         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
24534         * fold-const.c (fold_vec_perm): Likewise.
24535         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
24536         * tree-vect-generic.c (lower_vec_perm): Likewise.
24537         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24538         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
24539         element type to HOST_WIDE_INT.
24541 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24542             Alan Hayward  <alan.hayward@arm.com>
24543             David Sherwood  <david.sherwood@arm.com>
24545         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
24546         rather than an int.  Use plus_constant.
24547         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
24548         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
24550 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24551             Alan Hayward  <alan.hayward@arm.com>
24552             David Sherwood  <david.sherwood@arm.com>
24554         * calls.c (emit_call_1, expand_call): Change struct_value_size from
24555         a HOST_WIDE_INT to a poly_int64.
24557 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24558             Alan Hayward  <alan.hayward@arm.com>
24559             David Sherwood  <david.sherwood@arm.com>
24561         * calls.c (load_register_parameters): Cope with polynomial
24562         mode sizes.  Require a constant size for BLKmode parameters
24563         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
24564         forces a parameter to be padded at the lsb end in order to
24565         fill a complete number of words, require the parameter size
24566         to be ordered wrt UNITS_PER_WORD.
24568 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24569             Alan Hayward  <alan.hayward@arm.com>
24570             David Sherwood  <david.sherwood@arm.com>
24572         * reload1.c (spill_stack_slot_width): Change element type
24573         from unsigned int to poly_uint64_pod.
24574         (alter_reg): Treat mode sizes as polynomial.
24576 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24577             Alan Hayward  <alan.hayward@arm.com>
24578             David Sherwood  <david.sherwood@arm.com>
24580         * reload.c (complex_word_subreg_p): New function.
24581         (reload_inner_reg_of_subreg, push_reload): Use it.
24583 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24584             Alan Hayward  <alan.hayward@arm.com>
24585             David Sherwood  <david.sherwood@arm.com>
24587         * lra-constraints.c (process_alt_operands): Reject matched
24588         operands whose sizes aren't ordered.
24589         (match_reload): Refer to this check here.
24591 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24592             Alan Hayward  <alan.hayward@arm.com>
24593             David Sherwood  <david.sherwood@arm.com>
24595         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
24596         that the mode size is in the set {1, 2, 4, 8, 16}.
24598 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24599             Alan Hayward  <alan.hayward@arm.com>
24600             David Sherwood  <david.sherwood@arm.com>
24602         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
24603         Use plus_constant instead of gen_rtx_PLUS.
24605 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24606             Alan Hayward  <alan.hayward@arm.com>
24607             David Sherwood  <david.sherwood@arm.com>
24609         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
24610         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
24611         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
24612         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
24613         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
24614         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
24615         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
24616         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
24617         * config/i386/i386.c (ix86_push_rounding): ...this new function.
24618         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
24619         a poly_int64.
24620         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
24621         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
24622         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
24623         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
24624         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
24625         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
24626         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
24627         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
24628         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
24629         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
24630         function.
24631         * expr.c (emit_move_resolve_push): Treat the input and result
24632         of PUSH_ROUNDING as a poly_int64.
24633         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
24634         (emit_push_insn): Likewise.
24635         * lra-eliminations.c (mark_not_eliminable): Likewise.
24636         * recog.c (push_operand): Likewise.
24637         * reload1.c (elimination_effects): Likewise.
24638         * rtlanal.c (nonzero_bits1): Likewise.
24639         * calls.c (store_one_arg): Likewise.  Require the padding to be
24640         known at compile time.
24642 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24643             Alan Hayward  <alan.hayward@arm.com>
24644             David Sherwood  <david.sherwood@arm.com>
24646         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
24647         Use plus_constant instead of gen_rtx_PLUS.
24649 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24650             Alan Hayward  <alan.hayward@arm.com>
24651             David Sherwood  <david.sherwood@arm.com>
24653         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
24654         rather than an int.
24656 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24657             Alan Hayward  <alan.hayward@arm.com>
24658             David Sherwood  <david.sherwood@arm.com>
24660         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
24661         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
24662         via stack temporaries.  Treat the mode size as polynomial too.
24664 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24665             Alan Hayward  <alan.hayward@arm.com>
24666             David Sherwood  <david.sherwood@arm.com>
24668         * expr.c (expand_expr_real_2): When handling conversions involving
24669         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
24670         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
24671         as a poly_uint64 too.
24673 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24674             Alan Hayward  <alan.hayward@arm.com>
24675             David Sherwood  <david.sherwood@arm.com>
24677         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
24679 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24680             Alan Hayward  <alan.hayward@arm.com>
24681             David Sherwood  <david.sherwood@arm.com>
24683         * combine.c (can_change_dest_mode): Handle polynomial
24684         REGMODE_NATURAL_SIZE.
24685         * expmed.c (store_bit_field_1): Likewise.
24686         * expr.c (store_constructor): Likewise.
24687         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
24688         and polynomial REGMODE_NATURAL_SIZE.
24689         (gen_lowpart_common): Likewise.
24690         * reginfo.c (record_subregs_of_mode): Likewise.
24691         * rtlanal.c (read_modify_subreg_p): Likewise.
24693 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24694             Alan Hayward  <alan.hayward@arm.com>
24695             David Sherwood  <david.sherwood@arm.com>
24697         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
24698         numbers of elements.
24700 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24701             Alan Hayward  <alan.hayward@arm.com>
24702             David Sherwood  <david.sherwood@arm.com>
24704         * match.pd: Cope with polynomial numbers of vector elements.
24706 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24707             Alan Hayward  <alan.hayward@arm.com>
24708             David Sherwood  <david.sherwood@arm.com>
24710         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
24711         in a POINTER_PLUS_EXPR.
24713 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24714             Alan Hayward  <alan.hayward@arm.com>
24715             David Sherwood  <david.sherwood@arm.com>
24717         * omp-simd-clone.c (simd_clone_subparts): New function.
24718         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
24719         (ipa_simd_modify_function_body): Likewise.
24721 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24722             Alan Hayward  <alan.hayward@arm.com>
24723             David Sherwood  <david.sherwood@arm.com>
24725         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
24726         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
24727         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
24728         (expand_vector_condition, vector_element): Likewise.
24729         (subparts_gt): New function.
24730         (get_compute_type): Use subparts_gt.
24731         (count_type_subparts): Delete.
24732         (expand_vector_operations_1): Use subparts_gt instead of
24733         count_type_subparts.
24735 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24736             Alan Hayward  <alan.hayward@arm.com>
24737             David Sherwood  <david.sherwood@arm.com>
24739         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
24740         (vect_compile_time_alias): ...this new function.  Do the calculation
24741         on poly_ints rather than trees.
24742         (vect_prune_runtime_alias_test_list): Update call accordingly.
24744 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24745             Alan Hayward  <alan.hayward@arm.com>
24746             David Sherwood  <david.sherwood@arm.com>
24748         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
24749         numbers of units.
24750         (vect_schedule_slp_instance): Likewise.
24752 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24753             Alan Hayward  <alan.hayward@arm.com>
24754             David Sherwood  <david.sherwood@arm.com>
24756         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
24757         constant and extern definitions for variable-length vectors.
24758         (vect_get_constant_vectors): Note that the number of units
24759         is known to be constant.
24761 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24762             Alan Hayward  <alan.hayward@arm.com>
24763             David Sherwood  <david.sherwood@arm.com>
24765         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
24766         of units as polynomial.  Choose between WIDE and NARROW based
24767         on multiple_p.
24769 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24770             Alan Hayward  <alan.hayward@arm.com>
24771             David Sherwood  <david.sherwood@arm.com>
24773         * tree-vect-stmts.c (simd_clone_subparts): New function.
24774         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
24776 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24777             Alan Hayward  <alan.hayward@arm.com>
24778             David Sherwood  <david.sherwood@arm.com>
24780         * tree-vect-stmts.c (vectorizable_call): Treat the number of
24781         vectors as polynomial.  Use build_index_vector for
24782         IFN_GOMP_SIMD_LANE.
24784 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24785             Alan Hayward  <alan.hayward@arm.com>
24786             David Sherwood  <david.sherwood@arm.com>
24788         * tree-vect-stmts.c (get_load_store_type): Treat the number of
24789         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
24790         for variable-length vectors.
24791         (vectorizable_mask_load_store): Treat the number of units as
24792         polynomial, asserting that it is constant if the condition has
24793         already been enforced.
24794         (vectorizable_store, vectorizable_load): Likewise.
24796 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24797             Alan Hayward  <alan.hayward@arm.com>
24798             David Sherwood  <david.sherwood@arm.com>
24800         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
24801         of units as polynomial.  Punt if we can't tell at compile time
24802         which vector contains the final result.
24804 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24805             Alan Hayward  <alan.hayward@arm.com>
24806             David Sherwood  <david.sherwood@arm.com>
24808         * tree-vect-loop.c (vectorizable_induction): Treat the number
24809         of units as polynomial.  Punt on SLP inductions.  Use an integer
24810         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
24811         cast of such a series for variable-length floating-point
24812         reductions.
24814 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24815             Alan Hayward  <alan.hayward@arm.com>
24816             David Sherwood  <david.sherwood@arm.com>
24818         * tree.h (build_index_vector): Declare.
24819         * tree.c (build_index_vector): New function.
24820         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
24821         of units as polynomial, forcibly converting it to a constant if
24822         vectorizable_reduction has already enforced the condition.
24823         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
24824         to create a {1,2,3,...} vector.
24825         (vectorizable_reduction): Treat the number of units as polynomial.
24826         Choose vectype_in based on the largest scalar element size rather
24827         than the smallest number of units.  Enforce the restrictions
24828         relied on above.
24830 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24831             Alan Hayward  <alan.hayward@arm.com>
24832             David Sherwood  <david.sherwood@arm.com>
24834         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
24835         number of units as polynomial.
24837 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24838             Alan Hayward  <alan.hayward@arm.com>
24839             David Sherwood  <david.sherwood@arm.com>
24841         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
24842         * target.def (autovectorize_vector_sizes): Return the vector sizes
24843         by pointer, using vector_sizes rather than a bitmask.
24844         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
24845         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
24846         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
24847         Likewise.
24848         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
24849         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
24850         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
24851         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
24852         * omp-general.c (omp_max_vf): Likewise.
24853         * omp-low.c (omp_clause_aligned_alignment): Likewise.
24854         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
24855         * tree-vect-loop.c (vect_analyze_loop): Likewise.
24856         * tree-vect-slp.c (vect_slp_bb): Likewise.
24857         * doc/tm.texi: Regenerate.
24858         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
24859         to a poly_uint64.
24860         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
24861         the vector size as a poly_uint64 rather than an unsigned int.
24862         (current_vector_size): Change from an unsigned int to a poly_uint64.
24863         (get_vectype_for_scalar_type): Update accordingly.
24864         * tree.h (build_truth_vector_type): Take the size and number of
24865         units as a poly_uint64 rather than an unsigned int.
24866         (build_vector_type): Add a temporary overload that takes
24867         the number of units as a poly_uint64 rather than an unsigned int.
24868         * tree.c (make_vector_type): Likewise.
24869         (build_truth_vector_type): Take the number of units as a poly_uint64
24870         rather than an unsigned int.
24872 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24873             Alan Hayward  <alan.hayward@arm.com>
24874             David Sherwood  <david.sherwood@arm.com>
24876         * target.def (get_mask_mode): Take the number of units and length
24877         as poly_uint64s rather than unsigned ints.
24878         * targhooks.h (default_get_mask_mode): Update accordingly.
24879         * targhooks.c (default_get_mask_mode): Likewise.
24880         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
24881         * doc/tm.texi: Regenerate.
24883 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24884             Alan Hayward  <alan.hayward@arm.com>
24885             David Sherwood  <david.sherwood@arm.com>
24887         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
24888         * omp-general.c (omp_max_vf): Likewise.
24889         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
24890         (expand_omp_simd): Handle polynomial safelen.
24891         * omp-low.c (omplow_simd_context): Add a default constructor.
24892         (omplow_simd_context::max_vf): Change from int to poly_uint64.
24893         (lower_rec_simd_input_clauses): Update accordingly.
24894         (lower_rec_input_clauses): Likewise.
24896 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24897             Alan Hayward  <alan.hayward@arm.com>
24898             David Sherwood  <david.sherwood@arm.com>
24900         * tree-vectorizer.h (vect_nunits_for_cost): New function.
24901         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
24902         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
24903         (vect_analyze_slp_cost): Likewise.
24904         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
24905         (vect_model_load_cost): Likewise.
24907 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24908             Alan Hayward  <alan.hayward@arm.com>
24909             David Sherwood  <david.sherwood@arm.com>
24911         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
24912         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
24913         from an unsigned int * to a poly_uint64_pod *.
24914         (calculate_unrolling_factor): New function.
24915         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
24917 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24918             Alan Hayward  <alan.hayward@arm.com>
24919             David Sherwood  <david.sherwood@arm.com>
24921         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
24922         from an unsigned int to a poly_uint64.
24923         (_loop_vec_info::slp_unrolling_factor): Likewise.
24924         (_loop_vec_info::vectorization_factor): Change from an int
24925         to a poly_uint64.
24926         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
24927         (vect_get_num_vectors): New function.
24928         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
24929         (vect_get_num_copies): Use vect_get_num_vectors.
24930         (vect_analyze_data_ref_dependences): Change max_vf from an int *
24931         to an unsigned int *.
24932         (vect_analyze_data_refs): Change min_vf from an int * to a
24933         poly_uint64 *.
24934         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24935         than an unsigned HOST_WIDE_INT.
24936         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
24937         (vect_analyze_data_ref_dependence): Change max_vf from an int *
24938         to an unsigned int *.
24939         (vect_analyze_data_ref_dependences): Likewise.
24940         (vect_compute_data_ref_alignment): Handle polynomial vf.
24941         (vect_enhance_data_refs_alignment): Likewise.
24942         (vect_prune_runtime_alias_test_list): Likewise.
24943         (vect_shift_permute_load_chain): Likewise.
24944         (vect_supportable_dr_alignment): Likewise.
24945         (dependence_distance_ge_vf): Take the vectorization factor as a
24946         poly_uint64 rather than an unsigned HOST_WIDE_INT.
24947         (vect_analyze_data_refs): Change min_vf from an int * to a
24948         poly_uint64 *.
24949         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
24950         vfm1 as a poly_uint64 rather than an int.  Make the same change
24951         for the returned bound_scalar.
24952         (vect_gen_vector_loop_niters): Handle polynomial vf.
24953         (vect_do_peeling): Likewise.  Update call to
24954         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
24955         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
24956         be constant.
24957         * tree-vect-loop.c (vect_determine_vectorization_factor)
24958         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
24959         (vect_get_known_peeling_cost): Likewise.
24960         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
24961         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
24962         (vect_transform_loop): Likewise.  Use the lowest possible VF when
24963         updating the upper bounds of the loop.
24964         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
24965         rather than an int.
24966         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
24967         polynomial unroll factors.
24968         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
24969         (vect_make_slp_decision): Likewise.
24970         (vect_supported_load_permutation_p): Likewise, and polynomial
24971         vf too.
24972         (vect_analyze_slp_cost): Handle polynomial vf.
24973         (vect_slp_analyze_node_operations): Likewise.
24974         (vect_slp_analyze_bb_1): Likewise.
24975         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24976         than an unsigned HOST_WIDE_INT.
24977         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
24978         (vectorizable_load): Handle polynomial vf.
24979         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
24980         a poly_uint64.
24981         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
24983 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24984             Alan Hayward  <alan.hayward@arm.com>
24985             David Sherwood  <david.sherwood@arm.com>
24987         * match.pd: Handle bit operations involving three constants
24988         and try to fold one pair.
24990 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24992         * tree-vect-loop-manip.c: Include gimple-fold.h.
24993         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
24994         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
24995         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
24996         Add a path that uses a step of VF instead of 1, but disable it
24997         for now.
24998         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
24999         and niters_no_overflow parameters.  Update calls to
25000         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
25001         Create a new SSA name if the latter choses to use a ste other
25002         than zero, and return it via niters_vector_mult_vf_var.
25003         * tree-vect-loop.c (vect_transform_loop): Update calls to
25004         vect_do_peeling, vect_gen_vector_loop_niters and
25005         slpeel_make_loop_iterate_ntimes.
25006         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
25007         (vect_gen_vector_loop_niters): Update declarations after above changes.
25009 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
25011         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
25012         128-bit round to integer instructions.
25013         (ceil<mode>2): Likewise.
25014         (btrunc<mode>2): Likewise.
25015         (round<mode>2): Likewise.
25017 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
25019         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
25020         unaligned VSX load/store on P8/P9.
25021         (expand_block_clear): Allow the use of unaligned VSX
25022         load/store on P8/P9.
25024 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25026         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
25027         New function.
25028         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
25029         swap associated with both a load and a store.
25031 2018-01-02  Andrew Waterman  <andrew@sifive.com>
25033         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
25034         * config/riscv/riscv.md (clear_cache): Use it.
25036 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
25038         * web.c: Remove out-of-date comment.
25040 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25042         * expr.c (fixup_args_size_notes): Check that any existing
25043         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
25044         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
25045         (emit_single_push_insn): ...here.
25047 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25049         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
25050         (const_vector_encoded_nelts): New function.
25051         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
25052         (const_vector_int_elt, const_vector_elt): Declare.
25053         * emit-rtl.c (const_vector_int_elt_1): New function.
25054         (const_vector_elt): Likewise.
25055         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
25056         of CONST_VECTOR_ELT.
25058 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25060         * expr.c: Include rtx-vector-builder.h.
25061         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
25062         directly on the tree encoding.
25063         (const_vector_from_tree): Likewise.
25064         * optabs.c: Include rtx-vector-builder.h.
25065         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
25066         sequence of "u" values.
25067         * vec-perm-indices.c: Include rtx-vector-builder.h.
25068         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
25069         directly on the vec_perm_indices encoding.
25071 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25073         * doc/rtl.texi (const_vector): Describe new encoding scheme.
25074         * Makefile.in (OBJS): Add rtx-vector-builder.o.
25075         * rtx-vector-builder.h: New file.
25076         * rtx-vector-builder.c: Likewise.
25077         * rtl.h (rtx_def::u2): Add a const_vector field.
25078         (CONST_VECTOR_NPATTERNS): New macro.
25079         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
25080         (CONST_VECTOR_DUPLICATE_P): Likewise.
25081         (CONST_VECTOR_STEPPED_P): Likewise.
25082         (CONST_VECTOR_ENCODED_ELT): Likewise.
25083         (const_vec_duplicate_p): Check for a duplicated vector encoding.
25084         (unwrap_const_vec_duplicate): Likewise.
25085         (const_vec_series_p): Check for a non-duplicated vector encoding.
25086         Say that the function only returns true for integer vectors.
25087         * emit-rtl.c: Include rtx-vector-builder.h.
25088         (gen_const_vec_duplicate_1): Delete.
25089         (gen_const_vector): Call gen_const_vec_duplicate instead of
25090         gen_const_vec_duplicate_1.
25091         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
25092         (gen_const_vec_duplicate): Use rtx_vector_builder.
25093         (gen_const_vec_series): Likewise.
25094         (gen_rtx_CONST_VECTOR): Likewise.
25095         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
25096         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25097         Build a new vector rather than modifying a CONST_VECTOR in-place.
25098         (handle_special_swappables): Update call accordingly.
25099         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
25100         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25101         Build a new vector rather than modifying a CONST_VECTOR in-place.
25102         (handle_special_swappables): Update call accordingly.
25104 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25106         * simplify-rtx.c (simplify_const_binary_operation): Use
25107         CONST_VECTOR_ELT instead of XVECEXP.
25109 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25111         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
25112         the selector elements to be different from the data elements
25113         if the selector is a VECTOR_CST.
25114         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
25115         ssizetype for the selector.
25117 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25119         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
25120         before testing each element individually.
25121         * tree-vect-generic.c (lower_vec_perm): Likewise.
25123 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25125         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
25126         * selftest-run-tests.c (selftest::run_tests): Call it.
25127         * vector-builder.h (vector_builder::operator ==): New function.
25128         (vector_builder::operator !=): Likewise.
25129         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
25130         (vec_perm_indices::all_from_input_p): New function.
25131         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
25132         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
25133         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
25134         instead of reading the VECTOR_CST directly.  Detect whether both
25135         vector inputs are the same before constructing the vec_perm_indices,
25136         and update the number of inputs argument accordingly.  Use the
25137         utility functions added above.  Only construct sel2 if we need to.
25139 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25141         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
25142         the broadcast of the low byte.
25143         (expand_mult_highpart): Use an explicit encoding for the permutes.
25144         * optabs-query.c (can_mult_highpart_p): Likewise.
25145         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
25146         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25147         (vectorizable_bswap): Likewise.
25148         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
25149         explicit encoding for the power-of-2 permutes.
25150         (vect_permute_store_chain): Likewise.
25151         (vect_grouped_load_supported): Likewise.
25152         (vect_permute_load_chain): Likewise.
25154 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25156         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
25157         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
25158         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
25159         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
25160         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
25161         (vect_gen_perm_mask_any): Likewise.
25163 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25165         * int-vector-builder.h: New file.
25166         * vec-perm-indices.h: Include int-vector-builder.h.
25167         (vec_perm_indices): Redefine as an int_vector_builder.
25168         (auto_vec_perm_indices): Delete.
25169         (vec_perm_builder): Redefine as a stand-alone class.
25170         (vec_perm_indices::vec_perm_indices): New function.
25171         (vec_perm_indices::clamp): Likewise.
25172         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
25173         (vec_perm_indices::new_vector): New function.
25174         (vec_perm_indices::new_expanded_vector): Update for new
25175         vec_perm_indices class.
25176         (vec_perm_indices::rotate_inputs): New function.
25177         (vec_perm_indices::all_in_range_p): Operate directly on the
25178         encoded form, without computing elided elements.
25179         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
25180         encoding.  Update for new vec_perm_indices class.
25181         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
25182         the given vec_perm_builder.
25183         (expand_vec_perm_var): Update vec_perm_builder constructor.
25184         (expand_mult_highpart): Use vec_perm_builder instead of
25185         auto_vec_perm_indices.
25186         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
25187         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
25188         or double series encoding as appropriate.
25189         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
25190         vec_perm_indices instead of auto_vec_perm_indices.
25191         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25192         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25193         (vect_permute_store_chain): Likewise.
25194         (vect_grouped_load_supported): Likewise.
25195         (vect_permute_load_chain): Likewise.
25196         (vect_shift_permute_load_chain): Likewise.
25197         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25198         (vect_transform_slp_perm_load): Likewise.
25199         (vect_schedule_slp_instance): Likewise.
25200         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25201         (vectorizable_mask_load_store): Likewise.
25202         (vectorizable_bswap): Likewise.
25203         (vectorizable_store): Likewise.
25204         (vectorizable_load): Likewise.
25205         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
25206         vec_perm_indices instead of auto_vec_perm_indices.  Use
25207         tree_to_vec_perm_builder to read the vector from a tree.
25208         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
25209         vec_perm_builder instead of a vec_perm_indices.
25210         (have_whole_vector_shift): Use vec_perm_builder and
25211         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
25212         truncation to calc_vec_perm_mask_for_shift.
25213         (vect_create_epilog_for_reduction): Likewise.
25214         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
25215         from auto_vec_perm_indices to vec_perm_indices.
25216         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25217         instead of changing individual elements.
25218         (aarch64_vectorize_vec_perm_const): Use new_vector to install
25219         the vector in d.perm.
25220         * config/arm/arm.c (expand_vec_perm_d::perm): Change
25221         from auto_vec_perm_indices to vec_perm_indices.
25222         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25223         instead of changing individual elements.
25224         (arm_vectorize_vec_perm_const): Use new_vector to install
25225         the vector in d.perm.
25226         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
25227         Update vec_perm_builder constructor.
25228         (rs6000_expand_interleave): Likewise.
25229         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
25230         (rs6000_expand_interleave): Likewise.
25232 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25234         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
25235         to qimode could truncate the indices.
25236         * optabs.c (expand_vec_perm_var): Likewise.
25238 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25240         * Makefile.in (OBJS): Add vec-perm-indices.o.
25241         * vec-perm-indices.h: New file.
25242         * vec-perm-indices.c: Likewise.
25243         * target.h (vec_perm_indices): Replace with a forward class
25244         declaration.
25245         (auto_vec_perm_indices): Move to vec-perm-indices.h.
25246         * optabs.h: Include vec-perm-indices.h.
25247         (expand_vec_perm): Delete.
25248         (selector_fits_mode_p, expand_vec_perm_var): Declare.
25249         (expand_vec_perm_const): Declare.
25250         * target.def (vec_perm_const_ok): Replace with...
25251         (vec_perm_const): ...this new hook.
25252         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
25253         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
25254         * doc/tm.texi: Regenerate.
25255         * optabs.def (vec_perm_const): Delete.
25256         * doc/md.texi (vec_perm_const): Likewise.
25257         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
25258         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
25259         expand_vec_perm for constant permutation vectors.  Assert that
25260         the mode of variable permutation vectors is the integer equivalent
25261         of the mode that is being permuted.
25262         * optabs-query.h (selector_fits_mode_p): Declare.
25263         * optabs-query.c: Include vec-perm-indices.h.
25264         (selector_fits_mode_p): New function.
25265         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
25266         is defined, instead of checking whether the vec_perm_const_optab
25267         exists.  Use targetm.vectorize.vec_perm_const instead of
25268         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
25269         fit in the vector mode before using a variable permute.
25270         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
25271         vec_perm_indices instead of an rtx.
25272         (expand_vec_perm): Replace with...
25273         (expand_vec_perm_const): ...this new function.  Take the selector
25274         as a vec_perm_indices rather than an rtx.  Also take the mode of
25275         the selector.  Update call to shift_amt_for_vec_perm_mask.
25276         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
25277         Use vec_perm_indices::new_expanded_vector to expand the original
25278         selector into bytes.  Check whether the indices fit in the vector
25279         mode before using a variable permute.
25280         (expand_vec_perm_var): Make global.
25281         (expand_mult_highpart): Use expand_vec_perm_const.
25282         * fold-const.c: Includes vec-perm-indices.h.
25283         * tree-ssa-forwprop.c: Likewise.
25284         * tree-vect-data-refs.c: Likewise.
25285         * tree-vect-generic.c: Likewise.
25286         * tree-vect-loop.c: Likewise.
25287         * tree-vect-slp.c: Likewise.
25288         * tree-vect-stmts.c: Likewise.
25289         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
25290         Delete.
25291         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
25292         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
25293         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
25294         (aarch64_vectorize_vec_perm_const): ...this new function.
25295         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25296         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25297         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
25298         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
25299         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25300         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25301         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
25302         into...
25303         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
25304         check for NEON modes.
25305         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
25306         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
25307         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
25308         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
25309         into...
25310         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
25311         the old VEC_PERM_CONST conditions.
25312         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
25313         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
25314         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
25315         (ia64_vectorize_vec_perm_const_ok): Merge into...
25316         (ia64_vectorize_vec_perm_const): ...this new function.
25317         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
25318         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
25319         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
25320         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
25321         * config/mips/mips.c (mips_expand_vec_perm_const)
25322         (mips_vectorize_vec_perm_const_ok): Merge into...
25323         (mips_vectorize_vec_perm_const): ...this new function.
25324         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
25325         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
25326         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
25327         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
25328         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
25329         (rs6000_expand_vec_perm_const): Delete.
25330         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
25331         Delete.
25332         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25333         (altivec_expand_vec_perm_const_le): Take each operand individually.
25334         Operate on constant selectors rather than rtxes.
25335         (altivec_expand_vec_perm_const): Likewise.  Update call to
25336         altivec_expand_vec_perm_const_le.
25337         (rs6000_expand_vec_perm_const): Delete.
25338         (rs6000_vectorize_vec_perm_const_ok): Delete.
25339         (rs6000_vectorize_vec_perm_const): New function.
25340         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25341         an element count and rtx array.
25342         (rs6000_expand_extract_even): Update call accordingly.
25343         (rs6000_expand_interleave): Likewise.
25344         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
25345         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
25346         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
25347         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
25348         (rs6000_expand_vec_perm_const): Delete.
25349         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25350         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25351         (altivec_expand_vec_perm_const_le): Take each operand individually.
25352         Operate on constant selectors rather than rtxes.
25353         (altivec_expand_vec_perm_const): Likewise.  Update call to
25354         altivec_expand_vec_perm_const_le.
25355         (rs6000_expand_vec_perm_const): Delete.
25356         (rs6000_vectorize_vec_perm_const_ok): Delete.
25357         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
25358         reference to the SPE evmerge intructions.
25359         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25360         an element count and rtx array.
25361         (rs6000_expand_extract_even): Update call accordingly.
25362         (rs6000_expand_interleave): Likewise.
25363         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
25364         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
25365         new function.
25366         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25368 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25370         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
25371         vector mode and that that mode matches the mode of the data
25372         being permuted.
25373         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
25374         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
25375         directly using expand_vec_perm_1 when forcing selectors into
25376         registers.
25377         (expand_vec_perm_var): New function, split out from expand_vec_perm.
25379 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25381         * optabs-query.h (can_vec_perm_p): Delete.
25382         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
25383         * optabs-query.c (can_vec_perm_p): Split into...
25384         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
25385         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
25386         particular selector is valid.
25387         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25388         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25389         (vect_grouped_load_supported): Likewise.
25390         (vect_shift_permute_load_chain): Likewise.
25391         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25392         (vect_transform_slp_perm_load): Likewise.
25393         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25394         (vectorizable_bswap): Likewise.
25395         (vect_gen_perm_mask_checked): Likewise.
25396         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
25397         implementations of variable permutation vectors into account
25398         when deciding which selector to use.
25399         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
25400         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
25401         with a false third argument.
25402         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
25403         to test whether the constant selector is valid and can_vec_perm_var_p
25404         to test whether a variable selector is valid.
25406 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25408         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
25409         * optabs-query.c (can_vec_perm_p): Likewise.
25410         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
25411         instead of vec_perm_indices.
25412         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
25413         (vect_gen_perm_mask_checked): Likewise,
25414         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
25415         (vect_gen_perm_mask_checked): Likewise,
25417 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25419         * optabs-query.h (qimode_for_vec_perm): Declare.
25420         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
25421         (qimode_for_vec_perm): ...this new function.
25422         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
25424 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
25426         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
25427         does not have a conditional at the top.
25429 2018-01-02  Richard Biener  <rguenther@suse.de>
25431         * ipa-inline.c (big_speedup_p): Fix expression.
25433 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
25435         PR target/81616
25436         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
25437         for generic 4->6.
25439 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
25441         PR target/81616
25442         Generic tuning.
25443         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
25444         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
25445         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
25446         cond_taken_branch_cost 3->4.
25448 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
25450         PR tree-optimization/83581
25451         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
25452         TODO_cleanup_cfg if any changes have been made.
25454         PR middle-end/83608
25455         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
25456         convert_modes if target mode has the right side, but different mode
25457         class.
25459         PR middle-end/83609
25460         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
25461         last argument when extracting from CONCAT.  If either from_real or
25462         from_imag is NULL, use expansion through memory.  If result is not
25463         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
25464         the parts directly to inner mode, if even that fails, use expansion
25465         through memory.
25467         PR middle-end/83623
25468         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
25469         check for bswap in mode rather than HImode and use that in expand_unop
25470         too.
25472 Copyright (C) 2018 Free Software Foundation, Inc.
25474 Copying and distribution of this file, with or without modification,
25475 are permitted in any medium without royalty provided the copyright
25476 notice and this notice are preserved.