[tree-ssa-mathopts] PR tree-optimization/87259: Call execute_cse_reciprocals_1 before...
[official-gcc.git] / gcc / ChangeLog
bloba9d008dea01ac9bba5fcfa823cc681ebcf5d06ab
1 2018-09-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3         PR tree-optimization/87259
4         PR lto/87283
5         (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
6         execute_cse_reciprocals_1 has tried transforming.
8 2018-09-14  Aldy Hernandez  <aldyh@redhat.com>
10         * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
11         VR_VARYING for PLUS/MINUS_EXPR.
13 2018-09-14  Ilya Leoshkevich  <iii@linux.ibm.com>
15         * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
16         formatting.
18 2018-09-14  Richard Biener  <rguenther@suse.de>
20         PR middle-end/63155
21         * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
22         bits for the merged partition.
24 2018-09-13  Martin Sebor  <msebor@redhat.com>
25             Bernd Edlinger  <bernd.edlinger@hotmail.de>
27         * builtins.h (c_srlen): Add argument.
28         * builtins.c (warn_string_no_nul): New function.
29         (c_strlen): Add argument and use it.  Update recursive calls.
30         Pass DECL argument to string_constant to get info on non
31         terminated strings.  Update *NONSTR as needed.
32         (fold_builtin_strlen): Add argument to calls to c_strlen.
33         Warn for unterminated arrays.
34         (warn_string_no_null): Add prototype.
35         * expr.c (string_constant): Update arguments.  Update recursive
36         calls appropriately.  Detect missing NUL terminator and outermost
37         declaration its missing in.
38         Improve checks for arrays with nonzero lower bound or elements
39         that are not a single byte.  Simplify offset computation.
40         Simplify checks for non-NUL terminated strings.
41         * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
42         * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
44 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
46         * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
47         correctly.
48         * fold-const.c (c_getstr): Fix function comment.  Remove unused third
49         argument.  Fix range checks.
50         * fold-const.h (c_getstr): Adjust protoype.
51         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
52         string is constant but contains no NUL byte.
54         * expr.c (string_constant): Adjust function comment.
55         Remove bogus check for zero termination.
57         * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
59         * varasm.c (compare_constant): Compare type size of STRING_CSTs.
60         (get_constant_size): Don't make STRING_CSTs larger than they are.
61         (check_string_literal): New check function for STRING_CSTs.
62         (output_constant): Use it.
64 2018-09-13  Eric Botcazou  <ebotcazou@adacore.com>
66         PR target/86812
67         * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
69 2018-09-13  Richard Biener  <rguenther@suse.de>
71         PR tree-optimization/87263
72         * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
73         (struct unwind_state): Add max_rpo field.
74         (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
75         Compute max_rpo, the max RPO number a block can be backwards reached
76         from.  Re-write non-iterating mode to a RPO ordered worklist approach,
77         separating it from the iterating mode.
79 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
81         * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
82         (rfs_decision): New scheduling decision.
84 2018-09-13  Richard Biener  <rguenther@suse.de>
86         PR bootstrap/87134
87         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
88         (vn_nary_op_insert_pieces_predicated): Do not write useless
89         valid_dominated_by_p entry outside of the allocated storage.
91 2018-09-13  Omar Sandoval  <osandov@osandov.com>
92             Tom de Vries  <tdevries@suse.de>
94         PR debug/86985
95         * dwarf2out.c (is_c): New function.
96         (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
98 2018-09-13  Sam Tebbs  <sam.tebbs@arm.com>
100         PR target/85628
101         * config/aarch64/aarch64.md (*aarch64_bfxil):
102         Define.
103         * config/aarch64/constraints.md (Ulc): Define.
104         * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
105         Define.
106         * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
107         New function.
109 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
111         * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
112         * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
113         aarch64_layout_frame call. 
114         (aarch64_expand_epilogue): Likewise.
115         (aarch64_initial_elimination_offset): Likewise.
116         (aarch64_get_separate_components): Likewise.
117         (aarch64_use_return_insn_p): Likewise.
118         (aarch64_layout_frame): Remove unneeded check.
120 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
122         * configure.ac: Only append
123         " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
124         gcc_config_arguments if it was never reconfigured or last reconfigure
125         was with different arguments.
126         * configure: Regenerated.
128 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
129             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
131         PR middle-end/87290
132         * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
133         (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
135 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
137         PR tree-optimization/87287
138         * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
139         X % C == 0 to X % (unsigned) C == 0 optimization to ...
140         * match.pd (X % C == 0): ... here.  New optimization.
142 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
144         PR middle-end/82853
145         * expr.h (maybe_optimize_mod_cmp): Declare.
146         * expr.c (mod_inv): New function.
147         (maybe_optimize_mod_cmp): New function.
148         (do_store_flag): Use it.
149         * cfgexpand.c (expand_gimple_cond): Likewise.
151 2018-09-09  Cesar Philippidis  <cesar@codesourcery.com>
152             Julian Brown  <julian@codesourcery.com>
154         PR middle-end/86336
155         * gimplify.c (gimplify_scan_omp_clauses): Set
156         target_firstprivatize_array_bases in OpenACC parallel and kernels
157         region contexts.  Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
158         OpenACC data regions.
160 2018-09-12  Uros Bizjak  <ubizjak@gmail.com>
162         * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
163         (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
165 2018-09-12  Richard Biener  <rguenther@suse.de>
167         PR tree-optimization/87280
168         * tree-ssa-sccvn.c (process_bb): Handle the case of executable
169         edge but unreachable target.
170         (do_rpo_vn): For conservatively handling a PHI only mark
171         the backedge executable but not the block reachable.
173 2018-09-12  Richard Biener  <rguenther@suse.de>
175         PR tree-optimization/87266
176         * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
177         visited blocks.
179 2018-09-12  Andreas Krebbel  <krebbel@linux.ibm.com>
181         * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
182         constants.
183         ("trunc<BFP:mode><DFP_ALL:mode>2")
184         ("trunc<DFP_ALL:mode><BFP:mode>2")
185         ("extend<BFP:mode><DFP_ALL:mode>2")
186         ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
187         according to the target operand type.
189 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
190             Andreas Krebbel  <krebbel@linux.ibm.com>
192         PR tree-optimization/86844
193         * gimple-ssa-store-merging.c
194         (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
195         there are any overlapping stores in between them, make sure they are
196         also coalesced or we give up completely.
198 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
200         PR middle-end/87248
201         * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
202         BIT_AND_EXPR's second operand is a power of two.  Formatting fix.
204 2018-09-12  Tom de Vries  <tdevries@suse.de>
206         * common.opt (gdescribe-dies): Add option.
207         * dwarf2out.c (add_name_and_src_coords_attributes): Add description
208         attribute for artifical and nameless decls.
209         (dwarf2out_register_external_die): Add description attribute to
210         external reference die.
211         (add_desc_attribute): New functions.
212         (gen_subprogram_die): Add description attribute to
213         DW_TAG_call_site_parameter.
214         * tree-pretty-print.c (print_generic_expr_to_str): New function.
215         * tree-pretty-print.h (print_generic_expr_to_str): Declare.
216         * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
217         -gno-describe-dies.
218         (@item -gdescribe-dies): Add.
220 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
222         * tree-vrp.c (vrp_shift_undefined_p): Remove.
223         (extract_range_from_binary_expr_1: Call
224         wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
225         * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
226         depend on sign.
228 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
230         * gimple-ssa-warn-alloca.c
231         (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
232         field for ALLOCA_BOUND_*_LARGE.
234 2018-09-11  Nathan Sidwell  <nathan@acm.org>
236         * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
238 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
240         * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
241         for clobbers.  Remove obsolete comment.
243 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
245         * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
246         mpxchk, mpxld and mpxst types.
247         (define_attr length_immediate): Remove all processing of mpx types.
248         (define_attr prefix_0f): Ditto.
249         (define_attr memory): Ditto.
251 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
253         * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
254         (log<mode>2): Change operand 1 predicate to general_operand.
255         Extend operand 1 to XFmode and generate logxf3 insn.
256         (log10<mode>2): Change operand 1 predicate to general_operand.
257         Extend operand 1 to XFmode and generate log10xf3 insn.
258         (log2<mode>2): Change operand 1 predicate to general_operand.
259         Extend operand 1 to XFmode and generate log2xf3 insn.
260         (fyl2xp1_extend<mode>xf3_i387): Remove.
261         (log1p<mode>2): Change operand 1 predicate to general_operand.
262         Extend operand 1 to XFmode and generate log1pxf3 insn.
263         (fxtract_extend<mode>xf3_i387): Remove.
264         (logb<mode>2): Change operand 1 predicate to general_operand.
265         Extend operand 1 to XFmode and generate logbxf3 insn.
266         (ilogb<mode>2): Change operand 1 predicate to general_operand.
267         Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
268         (significand<mode>2): Change operand 1 predicate to general_operand.
269         Extend operand 1 to XFmode and generate significandxf3 insn.
271 2018-09-11  Nathan Sidwell  <nathan@acm.org>
273         * gcc.c (perror_with_name, pfatal_with_name): Delete.
274         (load_specs): Use fatal_error.
275         (DELETE_IF_ORDINARY, process_command): Use error.
276         (execute, run_attempt): Use fatal_error.
278 2018-09-11  Andrew Stubbs  <ams@codesourcery.com>
280         * diagnostic-core.h (sorry_at): New prototype.
281         * diagnostic.c (sorry_at): New function.
283 2018-09-11  Aldy Hernandez  <aldyh@redhat.com>
285         * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
286         by zero as VR_UNDEFINED.
288 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
290         * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
291         (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
292         (<sincos>mode2): New expander.
293         (sincos_extend<mode>xf3_i387): Remove insn pattern.
294         (sincos -> sin, cos splitters): Remove splitter patterns.
295         (sincos<mode>3): Change operand 2 predicate to general_operand.
296         Extend operand 2 to XFmode and generate sincosxf3 insn.
297         (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
298         Change operand 3 predicate to const1_operand.
299         (fptan_extend<mode>xf4_i387): Remove insn pattern.
300         (tanxf2): Update operands in the call to fptanxf4_i387.
301         (tan<mode>2): Change operand 1 predicate to general_operand.
302         Extend operand 1 to XFmode and generate tanxf3 insn.
303         (atan2xf3): Rename from *fpatanxf3_i387.
304         (fpatan_extend<mode>xf3_i387): Remove insn pattern.
305         (atan2xf3): Remove expander.
306         (atan2<mode<3):  Change operand 1 and 2 predicates to general_operand.
307         Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
308         (atan<mode>2): Change operand 1 predicate to general_operand.
309         Extend operand 1 to XFmode and generate atanxf3 insn.
311 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
313         * config/i386/i386.md (x87/SSE constant load splitter): Use
314         memory_operand instead of nonimmediate_operand for input operand
315         predicate.
317 2018-09-09  Uros Bizjak  <ubizjak@gmail.com>
319         * config/i386/i386.md (float partial SSE register stall splitter): Move
320         splitter near its instruction pattern.
321         (float_extend partial SSE register stall splitter): Ditto.
322         (float_truncate partial SSE register stall splitter): Ditto.
324 2018-09-09  Hans-Peter Nilsson  <hp@bitrange.com>
326         PR target/86794
327         * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
328         to speculation_safe_value_not_needed.
330         PR target/85666
331         * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
332         non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
333         (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
334         leaf_function_p, instead use has_hard_reg_initial_val.
336 2018-09-09  Nathan Sidwell  <nathan@acm.org>
338         * gcc.h (pfatal_with_name): Don't declare here.
339         * gcc.c (pfatal_with_name): Make static.
341 2018-09-09  Xianmiao Qu  <xianmiao_qu@c-sky.com>
343         * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
344         earlyclobber.
346 2018-09-08  John David Anglin  <danglin@gcc.gnu.org>
348         PR rtl-optimization/85458
349         * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
350         priority hook to reduce the priority of EXPR.
352 2018-09-07  Uros Bizjak  <ubizjak@gmail.com>
354         * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
355         DImode for x87 on 32bit targets.  Conditionally disable x87 modes
356         with X87_ENABLE_FLOAT.  Remove preparation code.
357         (*float<SWI48:mode><MODEF:mode>2): Rename from
358         *float<SWI48:mode><MODEF:mode>2_mixed.  Handle x87, SSE and mixed
359         math using "enabled" attribute.
360         (*floatdi<MODEF:mode>2_i387): Rename from
361         *float<SWI48x:mode><MODEF:mode>2_i387.  Handle only DImode and
362         enable for 32bit targets only.
363         (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
364         splitter.
365         (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
366         as operand 1 predicate.  Rewrite as define_insn_and_split.
367         (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
369 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
371         * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
372         to fallthru to FLOAT case.
374 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
376         PR target/86731
377         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
378         around folding of vec_sl to handle out of range shift values.
380 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
382         * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
383         Update callers to gen_fix_trunc<mode>_i387_fisttp
384         (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
385         nonimmediate_operand.
386         (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
387         and corresponding splitters.
388         (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
389         (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
390         (fix_truncdi_i387_with_temp): Remove insn pattern
391         and corresponding splitters.
392         (fix_trunc<mode>_i387): Change operand 0 predicate to
393         nonimmediate_operand.
394         (fix_trunc<mode>_i387_with_temp): Remove insn pattern
395         and corresponding splitters.
396         (*fistdi2_1): Remove.
397         (fistdi2): Ditto.
398         (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
399         (lrintxfdi2): Remove expander.  Reimplement as define_insn.
400         (*fist<mode>2_1): Remove.
401         (fist<mode>2): Ditto.
402         (fist<mode>2_with_temp): Remove insn pattern and corresponding
403         splitters.
404         (lrintxf<mode>2): Remove expander.  Reimplement as define_insn.
405         (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
406         (fistdi2_<rounding>): Change operand 0 predicate to
407         nonimmediate_operand.
408         (fistdi2_<rounding>_with_temp): Remove insn pattern
409         and corresponding splitters.
410         (fist<mode>2_<rounding>): Change operand 0 predicate to
411         nonimmediate_operand.
412         (fist<mode>2_<rounding>_with_temp): Remove insn pattern
413         and corresponding splitters.
415         (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
417 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
419         * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
420         the init value.
422 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
424         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
425         early gimple folding of vec_splat().
426         * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
427         * gimple-fold.h: Add an extern define for tree_vec_extract().
429 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
431         * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
432         wrappers around TREE_TYPE comparisons.
434 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
436         PR target/80080
437         * config/s390/predicates.md: Add nonsym_memory_operand.
438         * config/s390/s390.c (s390_legitimize_cs_operand): If operand
439         contains a SYMBOL_REF, load it into an intermediate pseudo.
440         (s390_emit_compare_and_swap): Legitimize operand.
441         * config/s390/s390.md: Use the new nonsym_memory_operand
442         with UNSPECV_CAS patterns.
444 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
446         PR target/80080
447         * config/s390/s390-passes.def: New file.
448         * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
449         declaration.
450         (make_pass_s390_early_mach): Add declaration.
451         * config/s390/s390.c (make_pass_s390_early_mach):
452         (s390_option_override): Remove dynamic registration.
453         * config/s390/t-s390: Add s390-passes.def.
455 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
457         * config/s390/s390.c (s390_decompose_constant_pool_ref):
458         Remove UNSPEC_LTREL_BASE check.
459         (annotate_constant_pool_refs): Likewise.
460         (find_constant_pool_ref): Likewise.
461         (find_ltrel_base): Removed.
462         (replace_ltrel_base): Removed.
463         (s390_mainpool_finish): Remove replace_ltrel_base call.
464         (s390_chunkify_start): Remove pending LTREL_BASE logic.
465         (s390_chunkify_finish): Remove replace_ltrel_base call.
466         * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
468 2018-09-06  Hans-Peter Nilsson  <hp@axis.com>
470         PR target/86779
471         * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
472         to speculation_safe_value_not_needed.
474 2018-09-05  Cesar Philippidis  <cesar@codesourcery.com>
475             Bernd Schmidt  <bernds_cb1@t-online.de>
477         * config/nvptx/nvptx-opts.h: New file.
478         * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
479         * config/nvptx/nvptx.h: Include "nvptx-opts.h".
480         (ASM_SPEC): Define.
481         (TARGET_SM35): New macro.
482         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
483         correct predicate.
484         * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
485         values.
486         (misa=): New option.
487         * doc/invoke.texi (Nvidia PTX Options): Document -misa.
489 2018-09-05  Uros Bizjak  <ubizjak@gmail.com>
491         * config/i386/i386.md (truncdfsf2): Remove expander.
492         (truncdfsf2_with_temp): Ditto.
493         (truncxf<mode>2): Ditto.
494         (*truncdfsf_fast_mixed): Remove insn pattern.
495         (*truncdfsf_fast_i387): Ditto.
496         (*truncdfsf_mixed): Ditto.
497         (*truncdfsf_i387): Ditto.
498         (*truncdfsf2_i387_1): Ditto.
499         (*truncxfsf2_mixed): Ditto.
500         (*truncxfdf2_mixed): Ditto.
501         (*truncxf<mode>2_i387_noop): Ditto. Update callers
502         to call gen_truncxf<mode>2 instead.
503         (*truncxf<mode>2_i387): Remove.
504         (reg->reg splitters): Remove splitter pattern.
505         (reg->mem splitters): Ditto.
507         (truncdfsf2): New insn pattern.
508         (truncxf<mode>2): Ditto.
510 2018-09-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
512         * tree-ssa-math-opts.c (is_mult_by): New function.
513         (is_square_of): Use the above.
514         (optimize_recip_sqrt): New function.
515         (pass_cse_reciprocals::execute): Use the above.
517 2018-09-05  Richard Biener  <rguenther@suse.de>
519         PR bootstrap/87134
520         * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
521         to zero-init the emplaced vec.
523 2018-09-05  Martin Liska  <mliska@suse.cz>
525         PR tree-optimization/87205
526         * tree-switch-conversion.c (pass_lower_switch::execute):
527         Group cases for switch statements.
529 2018-09-05  Richard Biener  <rguenther@suse.de>
531         PR tree-optimization/87217
532         * tree-ssa-sccvn.c (vuse_valueize): New.
533         (vn_reference_lookup_pieces): Use it.
534         (vn_reference_lookup): Likewise.
536 2018-09-05  Nathan Sidwell  <nathan@acm.org>
538         PR c++/87137
539         * stor-layout.c (place_field): Scan forwards to check last
540         bitfield when ms_bitfield_placement is in effect.
542 2018-09-05  Richard Biener  <rguenther@suse.de>
544         PR bootstrap/87225
545         * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
546         return.
548 2018-09-05  Siddhesh Poyarekar  <siddhesh@sourceware.org>
549             Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
551         * config/aarch64/falkor-tag-collision-avoidance.c: New file.
552         * config.gcc (extra_objs): Build it.
553         * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
554         Likewise.
555         * config/aarch64/aarch64-passes.def
556         (pass_tag_collision_avoidance): New pass.
557         * config/aarch64/aarch64.c (qdf24xx_tunings): Add
558         AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
559         (aarch64_classify_address): Remove static qualifier.
560         (aarch64_address_info, aarch64_address_type): Move to...
561         * config/aarch64/aarch64-protos.h: ... here.
562         (make_pass_tag_collision_avoidance): New function.
563         * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
564         New tuning flag.
566 2018-09-05  Martin Liska  <mliska@suse.cz>
568         * doc/gcov.texi: Update documentation of humar
569         readable mode.
570         * gcov.c (format_count): Print one decimal place, it provides
571         more fine number of situations like '1G' vs. '1.4G'.
573 2018-09-05  Martin Liska  <mliska@suse.cz>
575         PR target/87164
576         * config/rs6000/rs6000.opt: Mark the option as Deprecated.
577         * optc-gen.awk: Allow 'Var' for Deprecated options in order
578         to generate a MASK value.
580 2018-09-04  H.J. Lu  <hongjiu.lu@intel.com>
582         PR debug/86593
583         * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
584         if frame pointer isn't used.
585         (compute_frame_pointer_to_fb_displacement): Likewise.
587 2018-09-04  Jakub Jelinek  <jakub@redhat.com>
589         PR target/87198
590         * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
591         OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
592         OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
593         (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
594         and OPTION_MASK_ISA_XSAVEC_UNSET.
596 2018-09-04  Max Filippov  <jcmvbkbc@gmail.com>
598         * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
599         XOR operations in NAND case.
601 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
603         * wide-int-range.cc (wide_int_range_convert): New.
604         * wide-int-range.h (wide_int_range_convert): New.
605         * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
606         code into wide_int_range_convert.
607         (extract_range_into_wide_ints): Do not munge anti range constants
608         into the entire domain.  Just return the range back.
610 2018-09-04  Martin Liska  <mliska@suse.cz>
612         * genmatch.c (output_line_directive): Add new argument
613         fnargs.
614         (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
616 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
618         * doc/invoke.texi (Option Summary): Add whitespace.
620         * doc/invoke.texi (Option Summary): Add -Waligned-new.
622 2018-09-04  Richard Biener  <rguenther@suse.de>
624         PR tree-optimization/87211
625         * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
626         backedge value we're supposed to treat as VARYING also number
627         the PHI to VARYING in case it got a different value-number already.
629 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
631         * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
632         (extract_range_from_binary_expr_1): Do not call
633         vrp_can_optimize_bit_op.
634         * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
635         static.
636         (wide_int_range_get_mask_and_bounds): New.
637         (wide_int_range_optimize_bit_op): New.
638         (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
639         (wide_int_range_bit_and): Same.
640         * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
641         (wide_int_range_optimize_bit_op): New.
642         (wide_int_range_get_mask_and_bounds): New.
644 2018-09-04  Richard Biener  <rguenther@suse.de>
646         PR tree-optimization/87176
647         * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
648         variable.  When value-numbering a virtual PHI node make sure
649         to not value-number to the backedge value.
651 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
653         * doc/extend.texi (Long Long, Hex Floats): Document support for
654         long long and hex floats in more recent versions of ISO C++.
656 2018-09-03  Richard Biener  <rguenther@suse.de>
658         PR tree-optimization/87177
659         * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
660         cleanup.
662 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
664         * bb-reorder.c (edge_order): Convert to C-qsort-style
665         tri-state comparator.
666         (reorder_basic_blocks_simple): Change std::stable_sort to gcc_stablesort.
668 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
670         * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
671         tri-state comparator.
672         (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
674 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
676         * sort.cc (struct sort_ctx): New field 'nlim'.  Use it...
677         (mergesort): ... here as maximum count for using netsort.
678         (gcc_qsort): Set nlim to 3 if stable sort is requested.
679         (gcc_stablesort): New.
680         * system.h (gcc_stablesort): Declare.
682 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
684         * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
685         * system.h (qsort): Always redirect to gcc_qsort.  Update comment.
686         * vec.c (qsort_chk): Do not call gcc_qsort.  Update comment.
688 2018-09-03  Segher Boessenkool  <segher@kernel.crashing.org>
690         * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
691         lxsdx and stxsdx alternatives.
692         (*mov<mode>_hardfloat64): Ditto.
693         * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
695 2018-09-03  Richard Biener  <rguenther@suse.de>
697         PR tree-optimization/87200
698         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
699         simplify result.
701 2018-09-03  Martin Liska  <mliska@suse.cz>
703         PR tree-optimization/87201
704         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
705         Fix parenthesis in an expression.
707 2018-09-03  Richard Biener  <rguenther@suse.de>
709         PR tree-optimization/87197
710         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
711         visited.  CSE the VN_INFO hashtable lookup.
713         PR tree-optimization/87169
714         * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
715         iterating make sure there's no extra backedges from irreducible
716         regions feeding the header.  Mark the destination block
717         executable.
719 2018-09-03  Martin Liska  <mliska@suse.cz>
721         PR driver/83193
722         * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
723         * common/common-targhooks.c (default_get_valid_option_values):
724         New function.
725         * common/common-targhooks.h (default_get_valid_option_values):
726         Likewise.
727         * common/config/i386/i386-common.c: Move processor_target_table
728         from i386.c.
729         (ix86_get_valid_option_values): New function.
730         (TARGET_GET_VALID_OPTION_VALUES): New macro.
731         * config/i386/i386.c (struct ptt): Move to i386-common.c.
732         (PTA_*): Move all defined masks into i386-common.c.
733         (ix86_function_specific_restore): Use new processor_cost_table.
734         * config/i386/i386.h (struct ptt): Moved from i386.c.
735         (struct pta): Likewise.
736         * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
737         * doc/tm.texi.in: Likewise.
738         * opt-suggestions.c (option_proposer::suggest_option):
739         Pass prefix to build_option_suggestions.
740         (option_proposer::get_completions): Likewise.
741         (option_proposer::build_option_suggestions): Use the new target
742         hook.
743         * opts.c (struct option_help_tuple): New struct.
744         (print_filtered_help): Use the new target hook.
746 2018-09-03  Martin Liska  <mliska@suse.cz>
748         PR middle-end/59521
749         * predict.c (set_even_probabilities): Add likely_edges
750         argument and handle cases where we have precisely one
751         likely edge.
752         (combine_predictions_for_bb): Catch also likely_edges.
753         (tree_predict_by_opcode): Handle gswitch statements.
754         * tree-cfg.h (find_case_label_for_value): New declaration.
755         (find_taken_edge_switch_expr): Likewise.
756         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
757         Find pivot in decision tree based on probabily, not by number of
758         nodes.
760 2018-09-02  Gerald Pfeifer  <gerald@pfeifer.com>
762         * doc/standards.texi (Standards): Update Objective-C reference.
764 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
766         * doc/install.texi (Prerequisites): Update link for MPC.
768 2018-09-01  Michael Matz  <matz@suse.de>
770         PR tree-optimization/87074
771         * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
772         PHIs for outer-loop uses.
774 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
776         * doc/generic.texi (OpenMP): Adjust link to openmp.org.
777         * doc/invoke.texi (C Dialect Options): Ditto.
779 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
781         * doc/install.texi (Prerequisites): Adjust link mpfr.org.
783 2018-08-31  Richard Biener  <rguenther@suse.de>
785         PR tree-optimization/87168
786         * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
787         (rpo_elim::eliminate_avail): When OP was not visited it must
788         be available.
790 2018-08-31  David Malcolm  <dmalcolm@redhat.com>
792         * tree-vrp.c (copy_value_range): Convert param "from" from
793         "value_range *" to "const value_range *".
794         (range_is_null): Likewise for param "vr".
795         (range_int_cst_p): Likewise.
796         (range_int_cst_singleton_p): Likewise.
797         (symbolic_range_p): Likewise.
798         (value_ranges_intersect_p): Likewise for both params.
799         (value_range_nonnegative_p): Likewise for param "vr".
800         (value_range_constant_singleton): Likewise.
801         (vrp_set_zero_nonzero_bits): Likewise for param "ar".
802         (extract_range_into_wide_ints): Likewise for param "vr".
803         (extract_range_from_multiplicative_op): Likewise for params "vr0"
804         and "vr1".
805         (vrp_can_optimize_bit_op): Likewise.
806         (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
807         "vr1_".
808         (extract_range_from_unary_expr): Likewise.
809         (debug_value_range): Likewise for param "vr".
810         (value_range::dump): Add "const" qualifier.
811         (vrp_prop::check_array_ref): Convert local "vr" from
812         "value_range *" to "const value_range *".
813         (vrp_prop::check_mem_ref): Likewise.
814         (vrp_prop::visit_stmt): Likewise for local "old_vr".
815         (vrp_intersect_ranges_1): Likewise for param "vr_1".
816         (vrp_intersect_ranges): Likewise.
817         (simplify_stmt_for_jump_threading): Likewise for local "vr".
818         (vrp_prop::vrp_finalize): Likewise.
819         * tree-vrp.h (value_range::dump): Add "const" qualifier.
820         (vrp_intersect_ranges): Add "const" qualifier to params as above.
821         (extract_range_from_unary_expr): Likewise.
822         (value_range_constant_singleton): Likewise.
823         (symbolic_range_p): Likewise.
824         (copy_value_range): Likewise.
825         (extract_range_from_binary_expr_1): Likewise.
826         (range_int_cst_p): Likewise.
827         (vrp_set_zero_nonzero_bits): Likewise.
828         (range_int_cst_singleton_p): Likewise.
830 2018-08-31  Vlad Lazar  <vlad.lazar@arm.com>
832         * config/aarch64/arm_neon.h (vabsd_s64): New.
833         (vnegd_s64): Likewise.
835 2018-08-31  Martin Jambor  <mjambor@suse.cz>
837         * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
839 2018-08-31  Martin Liska  <mliska@suse.cz>
841         * ipa-icf.c (sem_item::add_type): Use
842         sem_item::m_type_hash_cache.
843         * ipa-icf.h: Move the cache from sem_item_optimizer
844         to sem_item.
846 2018-08-31  Nathan Sidwell  <nathan@acm.org>
848         * doc/extend.texi (Backwards Compatibility): Remove implicit
849         extern C leeway of () being (...).
851 2018-08-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
853         * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
855 2018-08-31  Segher Boessenkool  <segher@kernel.crashing.org>
857         PR target/86684
858         PR target/87149
859         * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
861 2018-08-31  Jakub Jelinek  <jakub@redhat.com>
863         PR middle-end/87138
864         * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
865         gen_int_mode.  Formatting fixes.
867 2018-08-30  Sandra Loosemore  <sandra@codesourcery.com>
869         * target.def (custom_function_descriptors): Improve documentation.
870         * doc/tm.texi.in (Trampolines): Expand discussion of function
871         descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
872         beginning of the section.
873         * doc/tm.texi: Regenerated.
875 2018-08-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
877         * cfg.h (class auto_edge_flag): Spell out the template-id of the
878         base class in the initializer list.  This is a workaround for
879         building with older GCC.
880         (class auto_bb_flag): Likewise.
882 2018-08-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
884         * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
885         (altivec_vcmpequ<VI_char>_p): Remove star.
886         * config/rs6000/rs6000-string.c (do_load_for_compare): Support
887         vector load modes.
888         (expand_strncmp_vec_sequence): New function.
889         (emit_final_str_compare_vec): New function.
890         (expand_strn_compare): Add support for vector strncmp.
891         * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
892         length specification to bytes.
893         * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
894         (vcmpnezb_p): New pattern.
895         * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
896         for option -mstring-compare-inline-limit.
898 2018-08-30  Thiago Macieira  <thiago.macieira@intel.com>
900         * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
901         (PTA_SKYLAKE): Add PTA_AES.
902         (PTA_GOLDMONT): Likewise.
904 2018-08-29  Jan Hubicka  <jh@suse.cz>
906         PR lto/86517
907         * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
908         * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
910 2018-08-29  Jan Hubicka  <jh@suse.cz>
912         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
913         TYPE_STUB_DECL.
914         (hash_tree): Do not visit TYPE_STUB_DECL.
915         * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
916         stream TYPE_STUB_DECL.
917         * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
918         * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
919         after free_lang_data.
920         (type_in_anonymous_namespace_p): Likewise.
922 2018-08-29  Jan Hubicka  <jh@suse.cz>
924         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
925         comment that it has to be even number.
926         (class sreal): Change m_sig type to int32_t.
927         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
928         int64_t for temporary calculations.
929         (sreal_verify_basics): Drop one bit from minimum and maximum.
931 2018-08-30  Richard Biener  <rguenther@suse.de>
933         PR tree-optimization/87147
934         * tree-ssa-sccvn.c (SSA_VISITED): New function.
935         (visit_phi): When the degenerate result is from the backedge and
936         we didn't visit its definition yet drop to VARYING.
937         (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
939 2018-08-29  Jan Hubicka  <jh@suse.cz>
941         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
942         DECL_VINDEX.
943         (hash_tree): Likewise.
945 2018-08-29  Jan Hubicka  <jh@suse.cz>
947         * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
948         and TYPE_NEXT_REF_TO.
950 2018-08-29  Jan Hubicka  <jh@suse.cz>
952         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
953         comment that it has to be even number.
954         (class sreal): Change m_sig type to int32_t.
955         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
956         int64_t for temporary calculations.
957         (sreal_verify_basics): Drop one bit from minimum and maximum.
959 2018-08-30  Tamar Christina  <tamar.christina@arm.com>
961         * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
963 2018-08-30  Vlad Lazar  <vlad.lazar@arm.com>
965         PR middle-end/86995
966         * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
967         if to_add is negative.
969 2018-08-29  Bernd Edlinger  <bernd.edlinger@hotmail.de>
971         PR middle-end/87053
972         * builtins.c (c_strlen): Improve range checks.
974 2018-08-29  Martin Sebor  <msebor@redhat.com>
975             Jeff Law  <law@redhat.com>
977         PR tree-optimization/86714
978         PR tree-optimization/86711
979         * builtins.c (c_strlen): Add arguments to call to string_constant.
980         * expr.c (string_constant): Add argument.  Detect missing nul
981         terminator and outermost declaration it's missing in.
982         * expr.h (string_constant): Add argument.
983         * fold-const.c (read_from_constant_string): Add arguments to call to
984         string_constant.
985         (c_getstr): Likewise.
986         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
987         to string_constant.
988         * tree-ssa-strlen.c (get_stridx): Likewise.
990 2018-08-29  Jan Hubicka  <jh@suse.cz>
992         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
993         Do not stream DECL_VINDEX.
994         * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
995         * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
996         (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
998 2018-08-29  Richard Biener  <rguenther@suse.de>
1000         * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
1001         virtual operands that are not default defs to honor region
1002         boundaries.
1003         (rpo_vn_valueize): Remove ineffective code here.
1005 2018-08-29  Richard Biener  <rguenther@suse.de>
1007         PR tree-optimization/87132
1008         * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
1009         when skipping defs reachable over backedges.
1011 2018-08-29  Richard Biener  <rguenther@suse.de>
1013         * tree-core.h: Document use of deprecated_flag in SSA_NAME.
1014         * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
1015         * tree-into-ssa.c (pass_build_ssa::execute): Initialize
1016         function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
1017         * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
1018         (vn_reference_lookup_3): Remove use of const_parms.
1019         (free_rpo_vn): Do not free const_parms.
1020         (do_rpo_vn): Do not call init_const_parms.
1021         * tree-ssa-alias.c (refs_may_alias_p_1): Honor
1022         SSA_NAME_POINTS_TO_READONLY_MEMORY.
1023         (call_may_clobber_ref_p_1): Likewise.
1025 2018-08-29  Alexander Monakov  <amonakov@ispras.ru>
1027         PR other/86726
1028         * invoke.texi (Optimization Options): List -ftree-scev-cprop.
1029         (-O): Ditto.
1030         (-ftree-scev-cprop): Document.
1032 2018-08-29  Jan Hubicka  <jh@suse.cz>
1034         * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
1035         parameters.
1036         (sreal constructor): Update.
1037         * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
1038         sreal:operator/): Update.
1040 2018-08-29  Martin Liska  <mliska@suse.cz>
1042         * tree-switch-conversion.c (switch_conversion::expand):
1043         Strenghten assumption about gswitch statements.
1045 2018-08-29  Richard Biener  <rguenther@suse.de>
1047         PR tree-optimization/87117
1048         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
1049         re-value-number released SSA VDEFs.
1051 2018-08-29  Richard Biener  <rguenther@suse.de>
1053         PR tree-optimization/87126
1054         * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
1056 2018-08-28  Jim Wilson  <jimw@sifive.com>
1058         * config/riscv/pic.md: Rewrite.
1059         * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
1060         invalid address.
1061         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
1062         (SOFTF, default_load, softload, softstore): New.
1064 2018-08-28  Jeff Law  <law@redhat.com>
1066         * fold-const.c (fold_binary_loc): Remove recently added assert.
1068 2018-08-28  Joern Rennecke  <joern.rennecke@riscy-ip.com>
1070         * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
1071         to OP parmeter of generated function.
1073 2018-08-28  MCC CS  <deswurstes@users.noreply.github.com>
1075         PR tree-optimization/87009
1076         * match.pd: Add boolean optimizations.
1078 2018-08-28  Martin Sebor  <msebor@redhat.com>
1080         PR middle-end/86631
1081         * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
1082         * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
1083         (pass_walloca::gate): Use it.
1084         (alloca_call_type): Same.
1085         (pass_walloca::execute): Same.
1086         * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
1088 2018-08-28  David Malcolm  <dmalcolm@redhat.com>
1090         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
1091         GCC_VERSION for usage of "__gcc_dump_printf__" format from
1092         >= 3005 to >= 9000.
1094 2018-08-28  Richard Biener  <rguenther@suse.de>
1096         PR tree-optimization/87124
1097         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
1098         constants before looking up avail.
1100 2018-08-28  Jakub Jelinek  <jakub@redhat.com>
1102         PR middle-end/87099
1103         * calls.c (maybe_warn_nonstring_arg): Punt early if
1104         warn_stringop_overflow is zero.  Don't call get_range_strlen
1105         on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
1106         Swap comparison operands to have constants on rhs.  Only use
1107         lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
1108         increment lenrng[0].
1110 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
1112         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
1113         use of tree_to_shwi.  Remove duplicated test for the size being
1114         a whole number of bytes.
1116 2018-08-28  Richard Biener  <rguenther@suse.de>
1118         PR tree-optimization/87117
1119         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
1120         Handle removed stmt without LHS (GIMPLE_NOP).
1122 2018-08-28  Richard Biener  <rguenther@suse.de>
1124         PR tree-optimization/87117
1125         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
1126         void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
1128 2018-08-28  Richard Biener  <rguenther@suse.de>
1130         PR tree-optimization/87117
1131         * tree-ssa-pre.c (compute_avail): Do not make expressions
1132         with predicated values available.
1133         (get_expr_value_id): Assert we do not run into predicated value
1134         expressions.
1136 2018-08-28  Richard Biener  <rguenther@suse.de>
1138         PR tree-optimization/87117
1139         * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
1140         get virtual operands.
1141         (get_expr_operands): Handle STRING_CST like other decls.
1143 2018-08-28  Martin Liska  <mliska@suse.cz>
1145         * tree.h: Update documentation of fndecl_built_in_p
1146         functions.
1149 2018-08-27  Jeff Law  <law@redhat.com>
1150         PR tree-optimization/87110
1151         * tree-ssa-dse.c (compute_trims): Handle non-constant
1152         TYPE_SIZE_UNIT.
1154 2018-08-27  Martin Sebor  <msebor@redhat.com>
1156         PR tree-optimization/86914
1157         * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
1159 2018-08-27  Martin Sebor  <msebor@redhat.com>
1161         PR tree-optimization/87112
1162         * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
1163         the type of the bound argument.
1165 2018-08-27  Jeff Law  <law@redhat.com>
1167         * tree-ssa-dse.c (compute_trims): Handle case where the reference's
1168         type does not have a TYPE_SIZE_UNIT.
1170 2018-08-27  Steve Ellcey  <sellcey@cavium.com>
1172         * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
1173         with include of backend.h.
1175 2018-08-27  Richard Biener  <rguenther@suse.de>
1177         PR tree-optimization/86927
1178         * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
1179         use const cond reduction code.
1181 2018-08-27  Alexander Monakov  <amonakov@ispras.ru>
1183         PR tree-optimization/85758
1184         * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
1186 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
1188         PR c++/87091
1189         * diagnostic-show-locus.c (class layout_range): Update for
1190         conversion of show_caret_p to a tri-state.
1191         (layout_range::layout_range): Likewise.
1192         (make_range): Likewise.
1193         (layout::maybe_add_location_range): Likewise.
1194         (layout::should_print_annotation_line_p): Don't show annotation
1195         lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
1196         (layout::get_state_at_point): Update for conversion of
1197         show_caret_p to a tri-state.  Bail out early for
1198         SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
1199         underlining or source colorization.
1200         (gcc_rich_location::add_location_if_nearby): Update for conversion
1201         of show_caret_p to a tri-state.
1202         (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
1203         (selftest::test_one_liner_fixit_replace_equal_secondary_range):
1204         Likewise.
1205         (selftest::test_one_liner_labels): Likewise.
1206         * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
1207         conversion of show_caret_p to a tri-state.
1208         * pretty-print.c (text_info::set_location): Likewise.
1209         * pretty-print.h (text_info::set_location): Likewise.
1210         * substring-locations.c (format_warning_n_va): Likewise.
1211         * tree-diagnostic.c (default_tree_printer): Likewise.
1212         * tree-pretty-print.c (newline_and_indent): Likewise.
1214 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
1216         PR c++/87091
1217         * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
1218         line above for line-insertion fix-it hints.
1219         (selftest::test_fixit_insert_containing_newline): Update the
1220         expected results, and add a test with line-numbering enabled.
1222 2018-08-27  Martin Liska  <mliska@suse.cz>
1224         PR sanitizer/86962
1225         * sanopt.c (sanitize_rewrite_addressable_params): Ignore
1226         params with DECL_HAS_VALUE_EXPR_P.
1228 2018-08-27  Martin Liska  <mliska@suse.cz>
1230         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
1231         selected expansion strategy.
1233 2018-08-27  Martin Liska  <mliska@suse.cz>
1235         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
1236         * builtins.c (is_builtin_fn): Likewise.
1237         * attribs.c (diag_attr_exclusions): Use new function
1238         fndecl_built_in_p and remove check for FUNCTION_DECL if
1239         possible.
1240         (builtin_mathfn_code): Likewise.
1241         (fold_builtin_expect): Likewise.
1242         (fold_call_expr): Likewise.
1243         (fold_builtin_call_array): Likewise.
1244         (fold_call_stmt): Likewise.
1245         (set_builtin_user_assembler_name): Likewise.
1246         (is_simple_builtin): Likewise.
1247         * calls.c (gimple_alloca_call_p): Likewise.
1248         (maybe_warn_nonstring_arg): Likewise.
1249         * cfgexpand.c (expand_call_stmt): Likewise.
1250         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
1251         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
1252         (cgraph_node::verify_node): Likewise.
1253         * cgraphclones.c (build_function_decl_skip_args): Likewise.
1254         (cgraph_node::create_clone): Likewise.
1255         * config/arm/arm.c (arm_insert_attributes): Likewise.
1256         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
1257         * dse.c (scan_insn): Likewise.
1258         * expr.c (expand_expr_real_1): Likewise.
1259         * fold-const.c (operand_equal_p): Likewise.
1260         (fold_binary_loc): Likewise.
1261         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
1262         * gimple-low.c (lower_stmt): Likewise.
1263         * gimple-pretty-print.c (dump_gimple_call): Likewise.
1264         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
1265         * gimple.c (gimple_build_call_from_tree): Likewise.
1266         (gimple_call_builtin_p): Likewise.
1267         (gimple_call_combined_fn): Likewise.
1268         * gimplify.c (gimplify_call_expr): Likewise.
1269         (gimple_boolify): Likewise.
1270         (gimplify_modify_expr): Likewise.
1271         (gimplify_addr_expr): Likewise.
1272         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
1273         * ipa-cp.c (determine_versionability): Likewise.
1274         * ipa-fnsummary.c (compute_fn_summary): Likewise.
1275         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
1276         * ipa-split.c (visit_bb): Likewise.
1277         (split_function): Likewise.
1278         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
1279         * lto-cgraph.c (input_node): Likewise.
1280         * lto-streamer-out.c (write_symbol): Likewise.
1281         * omp-low.c (setjmp_or_longjmp_p): Likewise.
1282         (lower_omp_1): Likewise.
1283         * predict.c (strip_predict_hints): Likewise.
1284         * print-tree.c (print_node): Likewise.
1285         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
1286         * trans-mem.c (is_tm_irrevocable): Likewise.
1287         (is_tm_load): Likewise.
1288         (is_tm_simple_load): Likewise.
1289         (is_tm_store): Likewise.
1290         (is_tm_simple_store): Likewise.
1291         (is_tm_abort): Likewise.
1292         (tm_region_init_1): Likewise.
1293         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
1294         * tree-cfg.c (verify_gimple_call): Likewise.
1295         (move_stmt_r): Likewise.
1296         (stmt_can_terminate_bb_p): Likewise.
1297         * tree-eh.c (lower_eh_constructs_2): Likewise.
1298         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
1299         * tree-inline.c (remap_gimple_stmt): Likewise.
1300         (copy_bb): Likewise.
1301         (estimate_num_insns): Likewise.
1302         (fold_marked_statements): Likewise.
1303         * tree-sra.c (scan_function): Likewise.
1304         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
1305         (optimize_stack_restore): Likewise.
1306         (pass_fold_builtins::execute): Likewise.
1307         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
1308         (mark_all_reaching_defs_necessary_1): Likewise.
1309         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
1310         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
1311         (pass_forwprop::execute): Likewise.
1312         * tree-ssa-loop-im.c (stmt_cost): Likewise.
1313         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
1314         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
1315         * tree-ssa-strlen.c (get_string_length): Likewise.
1316         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
1317         (find_func_aliases_for_call): Likewise.
1318         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
1319         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
1320         * tree-tailcall.c (find_tail_calls): Likewise.
1321         * tree.c (need_assembler_name_p): Likewise.
1322         (free_lang_data_in_decl): Likewise.
1323         (get_call_combined_fn): Likewise.
1324         * ubsan.c (is_ubsan_builtin_p): Likewise.
1325         * varasm.c (incorporeal_function_p): Likewise.
1326         * tree.h (DECL_BUILT_IN): Remove and replace with
1327         fndecl_built_in_p.
1328         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
1329         (fndecl_built_in_p): New.
1331 2018-08-27  Martin Liska  <mliska@suse.cz>
1333         PR tree-optimization/86847
1334         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
1335         Dump also subtree probability.
1336         (switch_decision_tree::do_jump_if_equal): New function.
1337         (switch_decision_tree::emit_case_nodes): Handle special
1338         situations in balanced tree that can be emitted much simpler.
1339         Fix calculation of probabilities that happen in tree expansion.
1340         * tree-switch-conversion.h (struct cluster): Add
1341         is_single_value_p.
1342         (struct simple_cluster): Likewise.
1343         (struct case_tree_node): Add new function has_child.
1344         (do_jump_if_equal): New.
1346 2018-08-27  Martin Liska  <mliska@suse.cz>
1348         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
1349         Add new argument to bit_test_cluster constructor.
1350         (bit_test_cluster::emit): Set bits really number of values
1351         handlel by a test.
1352         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
1353         probability argument.
1354         * tree-switch-conversion.h (struct bit_test_cluster):
1355         Add m_handles_entire_switch.
1357 2018-08-27  Martin Liska  <mliska@suse.cz>
1359         PR tree-optimization/86702
1360         * tree-switch-conversion.c (jump_table_cluster::emit):
1361         Make probabilities even for values in jump table
1362         according to number of cases handled.
1363         (switch_decision_tree::compute_cases_per_edge): Pass
1364         argument to reset_out_edges_aux function.
1365         (switch_decision_tree::analyze_switch_statement): Likewise.
1366         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
1367         Make it static.
1369 2018-08-27  Martin Liska  <mliska@suse.cz>
1371         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
1372         cfun argument explicitly.
1373         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
1374         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
1375         function gimple_switch_default_bb.
1376         (convert_switch_statements):
1377         (expand_builtins):
1378         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
1379         * stmt.c (label_to_block_fn): Use label_to_block and pass
1380         cfun argument explicitly and use gimple_switch_label_bb.
1381         (expand_case): Likewise.
1382         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
1383         cfun argument explicitly. Likewise.
1384         (make_edges_bb): Likewise.
1385         (make_cond_expr_edges): Likewise.
1386         (get_cases_for_edge): Likewise.
1387         (make_gimple_switch_edges): Likewise.
1388         (label_to_block_fn): Likewise.
1389         (label_to_block): Likewise.
1390         (make_goto_expr_edges): Likewise.
1391         (make_gimple_asm_edges): Likewise.
1392         (main_block_label): Likewise.
1393         (group_case_labels_stmt): Likewise.
1394         (find_taken_edge_computed_goto): Likewise.
1395         (find_taken_edge_switch_expr): Likewise.
1396         (gimple_verify_flow_info): Likewise.
1397         (gimple_redirect_edge_and_branch): Likewise.
1398         (gimple_switch_label_bb): New function.
1399         (gimple_switch_default_bb): Likewise.
1400         (gimple_switch_edge): Likewise.
1401         (gimple_switch_default_edge): Likewise.
1402         * tree-cfg.h (label_to_block_fn): Remove and replace ...
1403         (label_to_block): ... with this.
1404         (gimple_switch_label_bb): New.
1405         (gimple_switch_default_bb): Likewise.
1406         (gimple_switch_edge): Likewise.
1407         (gimple_switch_default_edge): Likewise.
1408         * tree-cfgcleanup.c (convert_single_case_switch): Use
1409         new gimple functions and pass new argument to label_to_block.
1410         (cleanup_control_flow_bb):
1411         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
1412         cfun argument explicitly.
1413         (make_eh_edges): Likewise.
1414         (redirect_eh_dispatch_edge): Likewise.
1415         (lower_resx): Likewise.
1416         (lower_eh_dispatch): Likewise.
1417         (maybe_remove_unreachable_handlers): Likewise.
1418         (unsplit_eh): Likewise.
1419         (cleanup_empty_eh): Likewise.
1420         (verify_eh_edges): Likewise.
1421         (verify_eh_dispatch_edge): Likewise.
1422         * tree-ssa-dom.c (record_edge_info): Likewise.
1423         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
1424         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
1425         (thread_through_normal_block): Likewise.
1426         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
1427         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
1428         * tree-switch-conversion.c (switch_conversion::collect): Use new
1429         gimple functions.
1430         (switch_conversion::check_final_bb): Likewise.
1431         (switch_conversion::gather_default_values): Pass new argument
1432         to label_to_block.
1433         (switch_conversion::build_constructors): Likewise.
1434         (switch_decision_tree::compute_cases_per_edge): Use new
1435         gimple_switch_edge function.
1436         (switch_decision_tree::analyze_switch_statement): Pass new argument
1437         to label_to_block.
1438         (switch_decision_tree::try_switch_expansion): Use
1439         gimple_switch_default_edge.
1440         * tree-vrp.c (find_switch_asserts): Pass new argument
1441         to label_to_block.
1442         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
1443         (vr_values::simplify_switch_using_ranges): Likewise.
1445 2018-08-27  Richard Biener  <rguenther@suse.de>
1447         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
1448         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
1450         * tree-ssa-sccvn.h (struct vn_pval): New structure.
1451         (struct vn_nary_op_s): Add unwind_to member.  Add
1452         predicated_values flag and put result into a union together
1453         with a linked list of vn_pval.
1454         (struct vn_ssa_aux): Add name member to make maintaining
1455         a map of SSA name to vn_ssa_aux possible.  Remove no longer
1456         needed info, dfsnum, low, visited, on_sccstack, use_processed
1457         and range_info_anti_range_p members.
1458         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
1459         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
1460         New functions.
1461         (vn_valueize): New global.
1462         (vn_context_bb): Likewise.
1463         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
1464         VN_INFO_PTR_INFO): Remove.
1465         * tree-ssa-sccvn.c: ... (rewrite)
1466         (pass_fre::execute): For -O2+ initialize loops and run
1467         RPO VN in optimistic mode (iterating).  For -O1 and -Og
1468         run RPO VN in non-optimistic mode.
1469         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
1470         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
1471         * doc/invoke.texi (sccvn-max-scc-size): Remove.
1472         (rpo-vn-max-loop-depth): Document.
1473         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
1474         when valuezing the VUSE signals we walked out of the region.
1475         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
1476         (phi_translate): Set VN context block to use for availability
1477         lookup.
1478         (compute_avail): Likewise.
1479         (pre_valueize): New function.
1480         (pass_pre::execute): Adjust to the RPO VN API.
1482         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
1483         (propagate_constants_for_unrolling): Remove.
1484         (tree_unroll_loops_completely): Perform value-numbering
1485         on the unrolled bodies loop parent.
1487 2018-08-27  Richard Biener  <rguenther@suse.de>
1489         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
1490         for partial antic compute.
1492 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
1494         PR rtl-optimization/87065
1495         * combine.c (simplify_if_then_else): Formatting fix.
1496         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
1497         check.
1498         (known_cond): Don't return const_true_rtx for vector modes.  Use
1499         CONST0_RTX instead of const0_rtx.  Formatting fixes.
1501 2018-08-27  Martin Liska  <mliska@suse.cz>
1503         PR gcov-profile/87069
1504         * gcov.c (process_file): Record files already processed
1505         and warn about a file being processed multiple times.
1507 2018-08-27  Martin Liska  <mliska@suse.cz>
1509         PR driver/83193
1510         * config/aarch64/aarch64.c (aarch64_override_options_internal):
1511         Set default values for x_aarch64_*_string strings.
1512         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
1513         prefix.  For -mabi do not print '=ABI' in help and use
1514         <option_value> format for -msve-vector-bits and -moverride
1515         options.
1517 2018-08-26  Jeff Law  <law@redhat.com>
1519         * config/mips/frame-header-opt.c: Include "backend.h" rather than
1520         "cfg.h"
1522 2018-08-26  Marek Polacek  <polacek@redhat.com>
1524         PR c++/87029, Implement -Wredundant-move.
1525         * doc/invoke.texi: Document -Wredundant-move.
1527 2018-08-25  Martin Sebor  <msebor@redhat.com>
1529         PR tree-optimization/87059
1530         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
1531         to the same type as the other.
1532         * fold-const.c (fold_binary_loc): Assert expectation.
1534 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
1536         * config/darwin.c (machopic_legitimize_pic_address): Clean up
1537         extraneous parentheses, dead code section and formatting.
1539 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
1541         PR c++/87091
1542         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
1543         wide enough for jumps in the line-numbering to be visible.
1544         (layout::print_gap_in_line_numbering): New member function.
1545         (layout::calculate_line_spans): When using line numbering, merge
1546         line spans that are only 1 line apart.
1547         (diagnostic_show_locus): When printing line numbers, show gaps in
1548         line numbering directly, rather than printing headers.
1549         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
1550         line-numbering with multiple line spans.
1551         (selftest::test_fixit_insert_containing_newline_2): Add test of
1552         line-numbering, in which the spans are close enough to be merged.
1554 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
1556         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
1557         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
1558         * tree-vrp.c (range_is_nonnull): Remove.
1559         (range_includes_zero_p): Accept value_range instead of min/max.
1560         (extract_range_from_binary_expr_1): Do not early bail on
1561         POINTER_PLUS_EXPR.
1562         Use range_includes_zero_p instead of range_is_nonnull.
1563         (extract_range_from_unary_expr): Use range_includes_zero_p instead
1564         of range_is_nonnull.
1565         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
1566         special case VR_ANTI_RANGE.
1567         (vrp_finalize): Same.
1568         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
1569         instead of min/max.
1570         (range_is_nonnull): Remove.
1571         * vr-values.c (vrp_stmt_computes_nonzero): Use
1572         range_includes_zero_p instead of range_is_nonnull.
1573         (extract_range_basic): Pass value_range to range_includes_zero_p
1574         instead of range_is_nonnull.
1576 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
1578         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
1579         * emit-rtl.h (rtl_data): Remove return_bnd.
1580         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
1581         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
1582         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
1583         (POINTER_BOUNDS_MODE): Remove definition.
1584         (make_pointer_bounds_mode): Remove.
1585         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
1586         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
1587         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
1588         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
1589         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
1590         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
1591         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
1593         * config/i386/i386-modes.def (BND32, BND64): Remove.
1594         * config/i386/i386.c (dbx_register_map): Remove bound registers.
1595         (dbx64_register_map): Ditto.
1596         (svr4_dbx_register_map): Ditto.
1597         (indirect_thunk_bnd_needed): Remove.
1598         (indirect_thunks_bnd_used): Ditto.
1599         (indirect_return_bnd_needed): Ditto.
1600         (indirect_return_via_cx_bnd): Ditto.
1601         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
1602         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
1603         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
1604         (output_indirect_thunk_function): Remove handling of
1605         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
1606         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
1607         (ix86_save_reg): Remove handling of crtl->return_bnd.
1608         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
1609         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
1610         and UNSPEC_BNDLX_ADDR.
1611         (ix86_output_indirect_branch_via_reg): Remove handling of
1612         indirect_thunk_prefix_bnd.
1613         (ix86_output_indirect_branch_via_push): Ditto.
1614         (ix86_output_function_return): Ditto.
1615         (ix86_output_indirect_function_return): Ditto.
1616         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
1617         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
1618         (CALL_USED_REGISTERS): Ditto.
1619         (REG_ALLOC_ORDER): Update for removal of bound registers.
1620         (HI_REGISTER_NAMES): Ditto.
1621         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
1622         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
1623         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
1624         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
1625         (FIRST_PSEUDO_REG): Update.
1626         (BND): Remove mode iterator.
1627         * config/i386/predicates.md (bnd_mem_operator): Remove.
1629 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
1631         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
1632         vectors.
1634 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
1636         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
1637         the case in which the permute needs only a single element and
1638         repeats for every vector of the result.  Extend that case to
1639         handle variable-length vectors.
1640         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1642 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
1644         PR debug/79342
1645         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
1646         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
1648 2018-08-24  Richard Biener  <rguenther@suse.de>
1650         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
1651         bb_flags_allocated members.
1652         (auto_flag): New RAII class for allocating flags.
1653         (auto_edge_flag): New RAII class for allocating edge flags.
1654         (auto_bb_flag): New RAII class for allocating bb flags.
1655         * cfgloop.c (verify_loop_structure): Allocate temporary edge
1656         flag dynamically.
1657         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
1658         in favor of temporarily allocated BB flag.
1659         * hsa-brig.c: Re-order includes.
1660         * hsa-dump.c: Likewise.
1661         * hsa-regalloc.c: Likewise.
1662         * print-rtl.c: Likewise.
1663         * profile-count.c: Likewise.
1665 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
1667         PR target/86989
1668         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
1669         the TOC register.
1671 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
1673         PR 87073/bootstrap
1674         * wide-int-range.cc (wide_int_range_div): Do not ignore result
1675         from wide_int_range_multiplicative_op.
1677 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1679         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
1680         "permutaion".
1682 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
1684         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
1685         to 'expanded'.
1687 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
1689         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
1690         full GENERIC expression used for replacement.
1692 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
1694         * tree-vrp.c (abs_extent_range): Remove.
1695         (extract_range_into_wide_ints): Pass wide ints by reference.
1696         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
1697         Pass wide ints by reference in all calls to
1698         extract_range_into_wide_ints.
1699         * wide-int-range.cc (wide_int_range_div): New.
1700         * wide-int-range.h (wide_int_range_div): New.
1701         (wide_int_range_includes_zero_p): New.
1702         (wide_int_range_zero_p): New.
1704 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
1706         * config/aarch64/aarch64.md (arches): New enum.
1707         (arch): New enum attr.
1708         (arch_enabled): New attr.
1709         (enabled): Now uses arch_enabled only.
1710         (simd, sve, fp16): Removed attribute.
1711         (fp): Attr now defined in terms of 'arch'.
1712         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
1713         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
1714         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
1715         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
1716         attributes into 'arch'.
1717         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
1718         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
1719         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
1720         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
1721         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
1722         'simd' attribute into 'arch'.
1723         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
1724         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
1725         Convert use of 'fp' attribute to 'arch'.
1726         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
1727         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
1728         into 'arch'.
1729         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
1730         (different modes) Merge 'fp' and 'simd' into 'arch'.
1731         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
1732         'simd' into 'arch'.
1734 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
1736         PR rtl-optimization/87026
1737         * expmed.c (canonicalize_comparison): If we can no longer create
1738         pseudoregisters, don't.
1740 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
1742         PR target/86951
1743         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
1744         prototype.
1745         * config/arm/arm.c (speculation_barrier_libfunc): New static
1746         variable.
1747         (arm_init_libfuncs): Initialize it.
1748         (arm_emit_speculation_barrier): New function.
1749         * config/arm/arm.md (speculation_barrier): Call
1750         arm_emit_speculation_barrier for architectures that do not have
1751         DSB or ISB.
1752         (speculation_barrier_insn): Only match on Armv7 or later.
1754 2018-08-23  Richard Biener  <rguenther@suse.de>
1756         PR middle-end/87024
1757         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
1758         calls.
1760 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
1762         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
1763         of single-vector TBLs.
1764         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
1765         one input is given.
1767 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
1769         PR target/85910
1770         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
1771         aarch64_evpc_tbl guard.
1773 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1775         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
1776         behaviour.
1778 2018-08-22  Martin Sebor  <msebor@redhat.com>
1780         PR middle-end/87052
1781         * tree-pretty-print.c (pretty_print_string): Add argument.
1782         (dump_generic_node): Call to pretty_print_string with string size.
1784 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
1786         PR rtl-optimization/86771
1787         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
1788         of two SETs into those two SETs, one to be placed at i2, if that SETs
1789         destination is modified between i2 and i3.
1791 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
1793         PR tree-optimization/86725
1794         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
1795         function.
1796         (vect_analyze_scalar_cycles_1): Check it.
1798 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
1800         PR tree-optimization/86725
1801         * tree-vect-loop.c (vect_is_simple_reduction): When treating
1802         an outer loop phi as a double reduction, make sure that the
1803         single user of the phi result is an inner loop phi.
1805 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
1807         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
1808         grouped stores with gaps to a strided group.
1810 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
1812         * tree-vect-stmts.c (get_group_load_store_type)
1813         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
1814         first statement in a group.
1816 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
1818         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
1819         the sequence used in gcc/gcc.c.
1821 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
1823         PR other/704
1824         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
1825         building it.
1827 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
1829         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
1830         Darwin10-specific unwinder-shim.
1831         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
1832         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC): 
1833         New to cater for Darwin10 Rosetta.
1835 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
1837         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
1838         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
1840 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
1842         PR bootstrap/81033
1843         PR target/81733
1844         PR target/52795
1845         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
1846         (dwarf2out_switch_text_section): Generate a local label for the
1847         second function sub-section and apply it as the second FDE start
1848         label.
1849         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
1850         second sub-section start.
1852 2018-08-22  Richard Biener  <rguenther@suse.de>
1854         PR tree-optimization/86988
1855         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
1857 2018-08-22  Richard Biener  <rguenther@suse.de>
1859         PR tree-optimization/86945
1860         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
1862 2018-08-22  Alexandre Oliva <oliva@adacore.com>
1864         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
1865         a comment about how uses of r2 for .sdata2 come about.
1867 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
1869         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
1871 2018-08-21  Marek Polacek  <polacek@redhat.com>
1873         PR c++/86981, Implement -Wpessimizing-move.
1874         * doc/invoke.texi: Document -Wpessimizing-move.
1876 2018-08-21  Jan Hubicka  <jh@suse.cz>
1878         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
1879         * tree.h (is_redundant_typedef): Remove.
1880         * dwarf2out.c (is_redundant_typedef): Turn into static function.
1882 2018-08-21  Jan Hubicka  <jh@suse.cz>
1884         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
1885         when possible.
1887 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
1889         * expmed.c (extract_low_bits): Reject invalid subregs early.
1891 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1893         PR middle-end/86121
1894         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
1895         behaviour.
1897 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
1899         * config/vxworks.h: Guard vxworks_asm_out_constructor and
1900         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
1901         * config/vxworks.c: Likewise.
1903 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
1905         * config/vxworks.c: Set targetm.have_ctors_dtors
1906         if HAVE_INITFINI_ARRAY_SUPPORT.
1907         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
1908         if HAVE_INITFINI_ARRAY_SUPPORT.
1910 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
1912         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
1913         default search path for VxWorks < 7.
1915 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1917         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
1918         (get_format_string): Refer to c_getstr.
1920 2018-08-21  Tom de Vries  <tdevries@suse.de>
1922         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1923         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1924         (debuginfo_early_stop): Declare.
1925         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1926         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1927         (debuginfo_early_stop): New function.
1928         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
1929         and debuginfo_early_stop.
1930         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
1931         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
1932         (general_init): Call debuginfo_early_init.
1933         (finalize): Call debuginfo_fini.
1934         (do_compile): Call debuginfo_init.
1935         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
1936         -fdump-early-debug.
1937         (@item -fdump-debug, @item -fdump-earlydebug): Add.
1939 2018-08-21  Tom de Vries  <tdevries@suse.de>
1941         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
1942         flag_dump_noaddr and flag_dump_unnumbered.
1944 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
1946         * wide-int-range.cc (wide_int_range_abs): New.
1947         (wide_int_range_order_set): Rename from wide_int_range_min_max.
1948         * wide-int-range.h (wide_int_range_abs): New.
1949         (wide_int_range_min_max): New.
1950         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
1951         case to call wide_int_range_abs.
1952         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
1953         (extract_range_from_abs_expr): Delete.
1955 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
1957         PR target/87033
1958         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
1959         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
1960         for indexed loads.
1962 2018-08-20  Nathan Sidwell  <nathan@acm.org>
1963             Jeff Law <law@redhat.com>
1965         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
1966         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
1968 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
1970         PR other/84889
1971         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
1972         (decl_attributes): Likewise.
1973         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
1974         instance.
1975         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
1976         * diagnostic-core.h (class auto_diagnostic_group): New class.
1977         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
1978         (diagnostic_report_diagnostic): Handle the first diagnostics within
1979         a group.
1980         (emit_diagnostic): Add auto_diagnostic_group instance.
1981         (inform): Likewise.
1982         (inform_n): Likewise.
1983         (warning): Likewise.
1984         (warning_at): Likewise.
1985         (warning_n): Likewise.
1986         (pedwarn): Likewise.
1987         (permerror): Likewise.
1988         (error): Likewise.
1989         (error_n): Likewise.
1990         (error_at): Likewise.
1991         (sorry): Likewise.
1992         (fatal_error): Likewise.
1993         (internal_error): Likewise.
1994         (internal_error_no_backtrace): Likewise.
1995         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
1996         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
1997         * diagnostic.h (struct diagnostic_context): Add fields
1998         "diagnostic_group_nesting_depth",
1999         "diagnostic_group_emission_count", "begin_group_cb",
2000         "end_group_cb".
2001         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
2002         Add auto_diagnostic_group instance(s).
2003         (find_explicit_erroneous_behavior): Likewise.
2004         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
2005         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
2006         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
2007         (gimplify_va_arg_expr): Likewise.
2008         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
2009         (HSA_SORRY_AT): Likewise.
2010         * ipa-devirt.c (compare_virtual_tables): Likewise.
2011         (warn_odr): Likewise.
2012         * multiple_target.c (expand_target_clones): Likewise.
2013         * opts-common.c (cmdline_handle_error): Likewise.
2014         * reginfo.c (globalize_reg): Likewise.
2015         * substring-locations.c (format_warning_n_va): Likewise.
2016         * tree-inline.c (expand_call_inline): Likewise.
2017         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
2018         * tree-ssa-loop-niter.c
2019         (do_warn_aggressive_loop_optimizations): Likewise.
2020         * tree-ssa-uninit.c (warn_uninit): Likewise.
2021         * tree.c (warn_deprecated_use): Likewise.
2023 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
2025         PR target/87014
2026         * config/i386/i386.md (eh_return): Always update EH return
2027         address in word_mode.
2029 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
2031         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
2032         TARGET_SPLIT_COMPLEX_ARG is defined.
2034 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2036         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
2038 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2040         PR target/86984
2041         * expr.c (expand_assignment): Assert that bitpos is positive.
2042         (store_field): Likewise
2043         (expand_expr_real_1): Make sure that bitpos is positive.
2044         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
2045         integer overflow.
2047 2018-08-20  Nathan Sidwell  <nathan@acm.org>
2049         * Makefile.in (CPP_ID_DATA_H): Delete.
2050         (CPP_INTERNAL_H): Don't add it.
2051         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
2052         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
2054 2018-08-20  Richard Biener  <rguenther@suse.de>
2056         PR tree-optimization/78655
2057         * tree-vrp.c (extract_range_from_binary_expr_1): Make
2058         pointer + offset nonnull if either operand is nonnull work.
2060 2018-08-20  Tom de Vries  <tdevries@suse.de>
2062         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
2063         unless the referenced die describes the added property using
2064         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
2065         Otherwise, add a DW_AT_location to the referenced die.
2067 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
2069         PR target/86994
2070         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
2071         register_operand when calling ix86_set_reg_reg_cost.
2072         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
2073         Set *total to 0 for operands that satisfy x86_64_immediate_operand
2074         predicate and to 1 otherwise.
2076 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
2078         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
2079         emit a diagnostic that it is not supported and reset the option.
2080         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
2081         supported and consume the option.  (ASM_FINAL_SPEC): New.
2083 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
2085         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
2086         a sentence.
2088 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
2090         C-SKY port: Documentation
2092         * doc/extend.texi (C-SKY Function Attributes): New section.
2093         * doc/invoke.texi (Option Summary): Add C-SKY options.
2094         (C-SKY Options): New section.
2095         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
2097 2018-08-17  Jojo  <jijie_rong@c-sky.com>
2098             Huibin Wang  <huibin_wang@c-sky.com>
2099             Sandra Loosemore  <sandra@codesourcery.com>
2100             Chung-Lin Tang  <cltang@codesourcery.com>
2102         C-SKY port: Backend implementation
2104         * config/csky/*: New.
2105         * common/config/csky/*: New.
2107 2018-08-17  Jojo  <jijie_rong@c-sky.com>
2108             Huibin Wang  <huibin_wang@c-sky.com>
2109             Sandra Loosemore  <sandra@codesourcery.com>
2110             Chung-Lin Tang  <cltang@codesourcery.com>
2111             Andrew Jenner  <andrew@codesourcery.com>
2113         C-SKY port: Configury
2115         * config.gcc (csky-*-*): New.
2116         * configure.ac: Add csky to targets for dwarf2 debug_line support.
2117         * configure: Regenerated.
2119 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
2121         * dump-context.h: Include "dumpfile.h".
2122         (dump_context::dump_printf_va): Convert final param from va_list
2123         to va_list *.  Convert from ATTRIBUTE_PRINTF to
2124         ATTRIBUTE_GCC_DUMP_PRINTF.
2125         (dump_context::dump_printf_loc_va): Likewise.
2126         * dumpfile.c: Include "stringpool.h".
2127         (make_item_for_dump_printf_va): Delete.
2128         (make_item_for_dump_printf): Delete.
2129         (class dump_pretty_printer): New class.
2130         (dump_pretty_printer::dump_pretty_printer): New ctor.
2131         (dump_pretty_printer::emit_items): New member function.
2132         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
2133         function.
2134         (dump_pretty_printer::emit_item): New member function.
2135         (dump_pretty_printer::stash_item): New member function.
2136         (dump_pretty_printer::format_decoder_cb): New member function.
2137         (dump_pretty_printer::decode_format): New member function.
2138         (dump_context::dump_printf_va): Reimplement in terms of
2139         dump_pretty_printer.
2140         (dump_context::dump_printf_loc_va): Convert final param from va_list
2141         to va_list *.
2142         (dump_context::begin_scope): Reimplement call to
2143         make_item_for_dump_printf.
2144         (dump_printf): Update for change to dump_printf_va.
2145         (dump_printf_loc): Likewise.
2146         (selftest::test_capture_of_dump_calls): Convert "stmt" from
2147         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
2148         with %T, %E, and %G.
2149         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
2150         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
2151         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
2152         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
2153         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
2154         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
2155         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
2156         within a dump_printf_loc call to "%wu".
2157         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
2158         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
2159         missing space after "=".
2160         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
2161         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
2162         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
2163         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
2164         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
2165         duplicate "vectorized" from message.
2167 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
2169         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
2170         polyNxK_t element's TYPE_STRING_FLAG.
2172 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
2174         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
2175         (they were unnamed before).  Fix comments.
2177 2018-08-17  Nathan Sidwell  <nathan@acm.org>
2179         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
2181 2018-08-17  Richard Biener  <rguenther@suse.de>
2183         PR tree-optimization/86841
2184         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
2186 2018-08-17  Martin Liska  <mliska@suse.cz>
2188         * common.opt: Remove Warn, Init and Report for options with
2189         Ignore/Deprecated flag. Warning is done automatically for
2190         Deprecated flags.
2191         * config/i386/i386.opt: Likewise.
2192         * config/ia64/ia64.opt: Likewise.
2193         * config/rs6000/rs6000.opt: Likewise.
2194         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
2195         Remove usage of flag_check_pointer_bounds.
2196         * lto-wrapper.c (merge_and_complain): Do not handle
2197         OPT_fcheck_pointer_bounds.
2198         (append_compiler_options): Likewise.
2199         * opt-functions.awk: Do not handle Deprecated.
2200         * optc-gen.awk: Check that Var, Report and Init are not
2201         used for an option with Ignore/Deprecated flag.
2202         * opts-common.c (decode_cmdline_option): Do not report
2203         CL_ERR_DEPRECATED.
2204         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
2205         options.
2206         * opts.h (struct cl_option): Remove cl_deprecated flag.
2207         (CL_ERR_DEPRECATED): Remove error enum value.
2209 2018-08-17  Richard Biener  <rguenther@suse.de>
2211         PR middle-end/86505
2212         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
2213         across a va-arg-pack using call adjust its return value accordingly.
2215 2018-08-16  Martin Sebor  <msebor@redhat.com>
2217         PR tree-optimization/86853
2218         * gimple-ssa-sprintf.c (struct format_result): Rename member.
2219         (struct fmtresult): Add member and initialize it in ctors.
2220         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
2221         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
2222         (format_directive): Set POSUNDER4K when MAYFAIL is set.
2223         (parse_directive): Handle %C same as %c.
2224         (sprintf_dom_walker::compute_format_length): Adjust.
2225         (is_call_safe): Adjust.
2227 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2229         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
2230         for determining how to count the elements.
2231         * builtins.h (c_strlen): Adjust prototype.
2232         * expr.c (string_constant): Add new parameter mem_size.
2233         Set *mem_size appropriately.
2234         * expr.h (string_constant): Adjust protoype.
2235         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
2236         * gimple-fold.h (get_range_strlen): Adjust prototype.
2237         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
2238         (format_string): Call get_string_length with eltsize.
2240 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
2242         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
2243         to emit the span, rather than setting it as the prefix.
2245 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
2247         * diagnostic-show-locus.c (layout::start_annotation_line): Add
2248         "margin_char" parameter, defaulting to space.  Use it in place
2249         of pp_space for the initial part of the margin.
2250         (layout::print_leading_fixits): Use '+' when filling the margin
2251         of line-insertion fix-it hints.
2253 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
2255         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
2256         Delete.
2258 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
2260         * config/rs6000/altivec.md: Don't set length attribute to the default
2261         value.
2262         * config/rs6000/darwin.md: Ditto.
2263         * config/rs6000/dfp.md: Ditto.
2264         * config/rs6000/htm.md: Ditto.
2265         * config/rs6000/rs6000.md: Ditto.
2266         * config/rs6000/sync.md: Ditto.
2267         * config/rs6000/vsx.md: Ditto.
2269 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
2271         * config/rs6000/altivec.md: Don't set length attribute to the default
2272         value, for branch instructions.
2273         * config/rs6000/darwin.md: Ditto.
2274         * config/rs6000/rs6000.md: Ditto.
2276 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
2278         * config/rs6000/rs6000.md (length): Always define as const_int 4.
2279         (unnamed conditional branch define_insn): Set length to 4 or 8
2280         depending on offset.
2281         (<bd>_<mode>): Similar, for alternative 0.
2282         (<bd>tf_<mode>): Ditto.
2284 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
2286         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
2288 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
2290         * doc/rtl.texi: Replace old RTX class names with new names.
2293 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
2295         * expmed.h (canonicalize_comparison): New declaration.
2296         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
2297         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
2298         * optabs.c (prepare_cmp_insn): Likewise.
2299         * rtl.h (unsigned_condition_p): New function which checks if a
2300         comparison operator is unsigned.
2302 2018-08-16  Nathan Sidwell  <nathan@acm.org>
2304         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
2305         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
2307 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
2309         PR target/84711
2310         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
2311         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
2312         (mov<mov>): ..this and enable unconditionally.
2314 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
2316         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
2318 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
2320         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
2321         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
2322         "Common" with "Target".
2324 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
2326         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
2327         * doc/invoke.texi (mmitigate-rop): Remove.
2328         * config/i386/i386.c: Do not include "regrename.h".
2329         (ix86_rop_should_change_byte_p, reg_encoded_number)
2330         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
2331         Remove.
2332         (ix86_reorg): Remove call to ix86_mitigate_rop.
2333         * config/i386/i386.md (attr "modrm_class"): Remove.
2334         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
2335         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
2336         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
2338 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
2340         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
2341         allow folding of mergeh() and mergel() for the float and double types.
2342         (fold_mergehl_helper): Rework to handle building a permute tree
2343         for float vectors.
2345 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
2347         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
2348         for TARGET_SSE.
2350 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
2352         * common.opt (fdiagnostics-show-labels): New option.
2353         * diagnostic-show-locus.c (class layout_range): Add field
2354         "m_label".
2355         (class layout): Add field "m_show_labels_p".
2356         (layout_range::layout_range): Add param "label" and use it to
2357         initialize m_label.
2358         (make_range): Pass in NULL for new "label" param of layout_range's
2359         ctor.
2360         (layout::layout): Initialize m_show_labels_p.
2361         (layout::maybe_add_location_range): Pass in loc_range->m_label
2362         when constructing layout_range instances.
2363         (struct line_label): New struct.
2364         (layout::print_any_labels): New member function.
2365         (layout::print_line): Call it if label-printing is enabled.
2366         (selftest::test_one_liner_labels): New test.
2367         (selftest::test_diagnostic_show_locus_one_liner): Call it.
2368         * diagnostic.c (diagnostic_initialize): Initialize
2369         context->show_labels_p.
2370         * diagnostic.h (struct diagnostic_context): Add field
2371         "show_labels_p".
2372         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2373         -fno-diagnostics-show-labels.
2374         * dwarf2out.c (gen_producer_string): Add
2375         OPT_fdiagnostics_show_labels to the ignored options.
2376         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
2377         param.
2378         (gcc_rich_location::maybe_add_expr): Likewise.
2379         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
2380         label" param, defaulting to NULL.
2381         (gcc_rich_location::add_expr): Add "label" param.
2382         (gcc_rich_location::maybe_add_expr): Likewise.
2383         (class text_range_label): New class.
2384         (class range_label_for_type_mismatch): New class.
2385         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
2386         of format_warning_va.
2387         (fmtwarn_n): Likewise for new params of format_warning_n_va.
2388         * lto-wrapper.c (merge_and_complain): Add
2389         OPT_fdiagnostics_show_labels to the "pick one setting" options.
2390         (append_compiler_options): Likewise to the dropped options.
2391         (append_diag_options): Likewise to the passed-on options.
2392         * opts.c (common_handle_option): Handle the new option.
2393         * selftest-diagnostic.c
2394         (test_diagnostic_context::test_diagnostic_context): Enable
2395         show_labels_p.
2396         * substring-locations.c: Include "gcc-rich-location.h".
2397         (format_warning_n_va): Add "fmt_label" and "param_label" params
2398         and use them as appropriate.
2399         (format_warning_va): Add "fmt_label" and "param_label" params,
2400         passing them on to format_warning_n_va.
2401         (format_warning_at_substring): Likewise.
2402         (format_warning_at_substring_n): Likewise.
2403         * substring-locations.h (format_warning_va): Add "fmt_label" and
2404         "param_label" params.
2405         (format_warning_n_va): Likewise.
2406         (format_warning_at_substring): Likewise.
2407         (format_warning_at_substring_n): Likewise.
2408         * toplev.c (general_init): Initialize global_dc->show_labels_p.
2410 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
2412         PR testsuite/86519
2413         * builtins.c (expand_builtin_memcmp): Do not expand the call
2414         when overflow is detected.
2416 2018-08-15  Martin Sebor  <msebor@redhat.com>
2418         PR tree-optimization/71625
2419         * config/aarch64/aarch64-builtins.c
2420         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
2422 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
2424         * config/s390/s390.c (s390_reorg): Remove loop.
2426 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
2428         * config/darwin.c
2429          (darwin_function_switched_text_sections): Delete.
2430         * gcc/config/darwin.h
2431          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
2433 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
2435         PR target/81685
2436         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
2437         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
2438         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
2440 2018-08-15  Martin Liska  <mliska@suse.cz>
2442         PR tree-optimization/86925
2443         * predict.c (expr_expected_value_1): When taking
2444         later predictor, assign also probability.
2445         Use fold_build2_initializer_loc in order to fold
2446         the expression in -frounding-math.
2448 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
2450         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
2451         patterns.
2452         (expand_vec_perm_1): Try the new method.
2454 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
2456         PR target/86547
2457         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
2458         Check whether lra_live_max_point is 0 before dividing.
2460 2018-08-14  Martin Sebor  <msebor@redhat.com>
2462         PR tree-optimization/86650
2463         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
2464         (vrp_prop::check_mem_ref): Same.
2466 2018-08-13  Liu Hao <lh_mouse@126.com>
2468         * pretty-print.c (eat_esc_sequence): Swap the foreground and
2469         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
2470         and clear it thereafter, as it only works for DBCS.
2472 2018-08-13  Liu Hao <lh_mouse@126.com>
2474         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
2475         handle returned by _get_osf_handle().
2477 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
2479         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
2480         for folding vec_perm.
2482 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
2484         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
2485         Add support for gimple-folding of vec_pack() and vec_unpack()
2486         intrinsics.
2488 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
2490         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
2491         vec_xst variants to the list.
2492         (rs6000_gimple_fold_builtin): Add support for folding unaligned
2493         vector loads and stores.
2495 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
2497         * config.gcc (rs6000-ibm-aix4.x): Delete.
2498         (rs6000-ibm-aix5.1): Delete.
2499         (rs6000-ibm-aix5.2): Delete.
2500         (rs6000-ibm-aix5.3): Delete.
2501         * config/rs6000/aix43.h: Delete.
2502         * config/rs6000/aix51.h: Delete.
2503         * config/rs6000/aix52.h: Delete.
2504         * config/rs6000/t-aix43: Delete.
2506 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
2508         * config/s390/s390.c (s390_decompose_constant_pool_ref):
2509         New function.
2510         (s390_decompose_address): Factor out constant pool ref
2511         decomposition.
2513 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
2515         * config/nds32/nds32-predicates.c
2516         (nds32_can_use_bclr_p): Change return type as bool.
2517         (nds32_can_use_bset_p): Ditto.
2518         (nds32_can_use_btgl_p): Ditto.
2519         (nds32_can_use_bitci_p): Ditto.
2520         * config/nds32/nds32-protos.h
2521         (nds32_can_use_bclr_p): Change declaration.
2522         (nds32_can_use_bset_p): Ditto.
2523         (nds32_can_use_btgl_p): Ditto.
2524         (nds32_can_use_bitci_p): Ditto.
2526 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
2528         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
2529         Support -msched-prolog-epilog option.
2530         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
2532 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
2534         * common/config/nds32/nds32-common.c
2535         (nds32_option_optimization_table): Enalbe -malways-align.
2537 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
2539         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
2540         extra_headers.
2541         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
2542         OPT_misr_secure_ case.
2543         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
2544         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
2545         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
2546         secure attribute.
2547         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
2548         (nds32_isr_info): New field security_level.
2549         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
2550         * config/nds32/nds32.md (return_internal): Consider critical attribute.
2551         * config/nds32/nds32.opt (misr-secure): New option.
2552         * config/nds32/nds32_init.inc: New file.
2553         * config/nds32/nds32_isr.h: New file.
2555 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
2557         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
2558         Update comment for atomic instructions.
2559         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
2560         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
2561         Remove.
2562         (atomic_loaddi): Revise fence expansion to only emit fence prior to
2563         load for __ATOMIC_SEQ_CST model.
2564         (atomic_loaddi_1): Remove float register target.
2565         (atomic_storedi): Handle CONST_INT values.
2566         (atomic_storedi_1): Remove float register source.  Add special case
2567         for zero value.
2568         (memory_barrier): New expander and insn.
2570 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
2572         PR tree-optimization/86835
2573         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
2574         new_stmt after def_gsi, make sure to insert new_square_stmt after
2575         that stmt, not 2 stmts before it.
2577 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
2579         PR target/82418
2580         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
2581         instead of SWI48.
2583 2018-08-10  Martin Liska  <mliska@suse.cz>
2585         PR target/83610
2586         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
2587         function type.
2588         * builtins.c (expand_builtin_expect_with_probability):
2589         New function.
2590         (expand_builtin_expect_with_probability): New function.
2591         (build_builtin_expect_predicate): Add new argumnet probability
2592         for BUILT_IN_EXPECT_WITH_PROBABILITY.
2593         (fold_builtin_expect):
2594         (fold_builtin_2):
2595         (fold_builtin_3):
2596         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
2597         * builtins.h (fold_builtin_expect): Set new argument.
2598         * doc/extend.texi: Document __builtin_expect_with_probability.
2599         * doc/invoke.texi: Likewise.
2600         * gimple-fold.c (gimple_fold_call): Pass new argument.
2601         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
2602         also BUILT_IN_EXPECT_WITH_PROBABILITY.
2603         * predict.c (get_predictor_value): New function.
2604         (expr_expected_value): Add new argument probability. Assume
2605         that predictor and probability are always non-null.
2606         (expr_expected_value_1): Likewise.  For __builtin_expect and
2607         __builtin_expect_with_probability set probability.  Handle
2608         combination in binary expressions.
2609         (tree_predict_by_opcode): Simplify code by simply calling
2610         get_predictor_value.
2611         (pass_strip_predict_hints::execute): Add handling of
2612         BUILT_IN_EXPECT_WITH_PROBABILITY.
2613         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
2614         new predictor.
2615         * tree.h (DECL_BUILT_IN_P): New function.
2617 2018-08-10  Martin Liska  <mliska@suse.cz>
2619         PR tree-optimization/85799
2620         * passes.def: Add argument for pass_strip_predict_hints.
2621         * predict.c (class pass_strip_predict_hints): Add new argument
2622         early_p.
2623         (strip_predictor_early): New function.
2624         (pass_strip_predict_hints::execute): Call the function to
2625         strip predictors.
2626         (strip_predict_hints): New function.
2627         * predict.def: Fix comment.
2629 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
2631         * Makefile.in: Clarify which tm.texi to copy over to assert the
2632         right to grant a GFDL license for all.
2634 2018-08-09  Jeff Law  <law@redhat.com>
2636         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
2637         unused variable.
2639 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
2641         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
2642         prototype.
2644 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
2646         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
2647         reductions for variable-length vectors.
2649 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
2651         PR other/84889
2652         * common.opt (fdiagnostics-show-line-numbers): New option.
2653         * diagnostic-show-locus.c (class layout): Add fields
2654         "m_show_line_numbers_p" and "m_linenum_width";
2655         (num_digits): New function.
2656         (test_num_digits): New function.
2657         (layout::layout): Initialize new fields.  Update m_x_offset
2658         logic to handle any left margin.
2659         (layout::print_source_line): Print line number when requested.
2660         (layout::start_annotation_line): New member function.
2661         (layout::print_annotation_line): Call it.
2662         (layout::print_leading_fixits): Likewise.
2663         (layout::print_trailing_fixits): Likewise.  Update calls to
2664         move_to_column for new parameter.
2665         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
2666         it to potentially call start_annotation_line.
2667         (layout::show_ruler): Call start_annotation_line.
2668         (selftest::test_line_numbers_multiline_range): New selftest.
2669         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
2670         and selftest::test_line_numbers_multiline_range.
2671         * diagnostic.c (diagnostic_initialize): Initialize
2672         show_line_numbers_p.
2673         * diagnostic.h (struct diagnostic_context): Add field
2674         "show_line_numbers_p".
2675         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2676         -fno-diagnostics-show-line-numbers.
2677         * dwarf2out.c (gen_producer_string): Add
2678         OPT_fdiagnostics_show_line_numbers to the ignored options.
2679         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
2680         one setting" options.
2681         (append_compiler_options): Likewise to the dropped options.
2682         (append_diag_options): Likewise to the passed-on options.
2683         * opts.c (common_handle_option): Handle the new option.
2684         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
2686 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2688         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
2689         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
2690         third argument of type "const signed char" to descriptions of
2691         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
2692         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
2693         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
2694         __builtin_bcdsub_ov functions.
2696 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
2698         PR tree-optimization/86858
2699         * tree-vect-loop.c (vect_is_simple_reduction): Restore
2700         flow_bb_inside_loop_p calls.
2702 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
2704         PR tree-optimization/86871
2705         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
2706         instead of gimple_assign_lhs.
2708 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
2710         PR target/86887
2711         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
2712         register constraint to operand 0.
2713         (add<mode>3_carryinC): Likewise.
2714         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
2716 2018-08-09  Martin Liska  <mliska@suse.cz>
2718         PR c/86895
2719         * common.opt: Remove extra line.
2721 2018-08-09  Martin Liska  <mliska@suse.cz>
2723         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
2724         at the end of a line, make first letter capital and end up
2725         a sentence with a dot.
2726         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
2727         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
2728         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
2729         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
2730         (PARAM_MAX_ISL_OPERATIONS): Likewise.
2731         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
2732         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
2733         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
2734         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
2735         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
2736         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
2737         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
2738         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
2739         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
2740         (PARAM_TREE_REASSOC_WIDTH): Likewise.
2741         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
2742         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
2743         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
2745 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
2747         PR target/84332
2748         * config/s390/s390.c (s390_option_override_internal): Reduce the
2749         stack-clash-protection-probe-interval param if it would be too big
2750         for z900.
2752 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
2754         PR target/46179
2755         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
2756         * config/m68k/m68k.c (handle_move_double): Don't call
2757         m68k_final_prescan_insn.
2758         (m68k_adjust_decorated_operand): Renamed from
2759         m68k_final_prescan_insn, remove first and third operand and
2760         simplify.
2761         (print_operand): Call it.
2762         (print_operand_address): Call it.
2764 2018-08-08  Nathan Sidwell  <nathan@acm.org>
2766         * diagnostic.c (diagnostic_report_current_module): Use
2767         linemap_included_from & linemap_included_from_linemap.
2769 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
2771         * config/aarch64/aarch64-cores.def: Add phecda core.
2772         * config/aarch64/aarch64-tune.md: Regenerate.
2773         * doc/invoke.texi: Add phecda core.
2775 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
2777         PR target/85295
2778         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
2779         definitions.
2780         * config/s390/s390.md ("movti"): Add more alternatives for
2781         constant to GPR copies.
2783 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
2785         * config/s390/s390.c: Fix whitespace damage throughout the file.
2786         * config/s390/s390.h: Likewise.
2787         * config/s390/tpf.h: Likewise.
2789 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
2791         * config/s390/s390.c (s390_loadrelative_operand_p):
2792         Remove TARGET_CPU_ZARCH usages.
2793         (s390_rtx_costs): Likewise.
2794         (s390_legitimate_constant_p): Likewise.
2795         (s390_cannot_force_const_mem): Likewise.
2796         (legitimate_reload_constant_p): Likewise.
2797         (s390_preferred_reload_class): Likewise.
2798         (legitimize_pic_address): Likewise.
2799         (legitimize_tls_address): Likewise.
2800         (s390_split_branches): Removed.
2801         (s390_add_execute): Removed.
2802         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
2803         (s390_mainpool_start): Likewise.
2804         (s390_mainpool_finish): Likewise.
2805         (s390_mainpool_cancel): Removed.
2806         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
2807         (s390_chunkify_cancel): Likewise.
2808         (s390_return_addr_rtx): Likewise.
2809         (s390_register_info): Remove split_branches_pending_p uages.
2810         (s390_optimize_register_info): Likewise.
2811         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
2812         split_branches_pending_p usages.
2813         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
2814         (s390_load_got): Likewise.
2815         (s390_expand_split_stack_prologue): Likewise.
2816         (output_asm_nops): Likewise.
2817         (s390_function_profiler): Likewise.
2818         (s390_emit_call): Likewise.
2819         (s390_conditional_register_usage): Likewise.
2820         (s390_optimize_prologue): Likewise.
2821         (s390_reorg): Remove TARGET_CPU_ZARCH and
2822         split_branches_pending_p usages.
2823         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
2824         usages.
2825         (s390_output_indirect_thunk_function): Likewise.
2826         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
2827         (TARGET_CPU_ZARCH_P): Removed.
2828         (struct machine_function): Remove split_branches_pending_p.
2829         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
2831 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
2833         * common/config/s390/s390-common.c (processor_flags_table):
2834         Remove flags.
2835         * config.gcc: Remove with_arch/with_tune support.
2836         * config/s390/2064.md: Remove cpu attribute comparisons.
2837         * config/s390/driver-native.c (s390_host_detect_local_cpu):
2838         Remove MTN.
2839         * config/s390/linux.h (ASM_SPEC):
2840         Remove -march support.
2841         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
2842         Use a table to get an arch level.
2843         * config/s390/s390-opts.h (enum processor_type):
2844         Remove enum values.
2845         * config/s390/s390.c
2846         (processor_table): Remove entries, add arch_level values.
2847         (s390_issue_rate): Remove cases.
2848         (s390_option_override): Adjust
2849         s390_option_override_internal() call.
2850         (s390_option_override_internal): Remove deprecation warning.
2851         (s390_valid_target_attribute_tree): Adjust
2852         s390_option_override_internal() call.
2853         * config/s390/s390.h (struct s390_processor):
2854         Share with s390-c.c, add arch_level field.
2855         * config/s390/s390.md:
2856         Remove occurrences in cpu attribute.
2857         * config/s390/s390.opt: Remove -march/-mtune support.
2858         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
2859         * doc/invoke.texi: Remove deprecation warning.
2861 2018-08-08  Luis Machado  <luis.machado@linaro.org>
2863         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
2864         global.
2865         (qdf24xx_tunings): Set vector cost structure to
2866         qdf24xx_vector_cost.
2868         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
2869         <register_sextend>: Set to 3.
2871 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
2873         PR target/86838
2874         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
2875         * config/aarch64/aarch64-simd.md
2876         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
2877         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
2878         (aarch64_frecpx<mode>): ...this new pattern.
2879         * config/aarch64/aarch64-simd-builtins.def: Remove comment
2880         about aarch64_frecp<FRECP:frecp_suffix><mode>.
2882 2018-08-07  Martin Liska  <mliska@suse.cz>
2884         PR middle-end/83023
2885         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
2886         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
2887         * predict.def (PRED_MALLOC_NONNULL): New predictor.
2888         * doc/extend.texi: Document that malloc attribute adds
2889         hit to compiler.
2891 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
2893         PR target/86785
2894         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2895         Define to speculation_safe_value_not_needed.
2897 2018-08-06  Jeff Law  <law@redhat.com>
2899         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
2900         the vr_values instance to cprop_into_stmt.
2901         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
2902         (cprop_operand): Also query EVRP to determine if OP is a constant.
2904 2018-08-06  Nathan Sidwell  <nathan@acm.org>
2906         * diagnostic.c (diagnostic_report_current_module): Reroll
2907         included-at loop.  Translate text.
2909 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
2911         * function-tests.c (selftest::test_expansion_to_rtl): Call
2912         free_after_compilation.
2914 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2916         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
2918 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
2920         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
2921         loops with memory block operations from getting unrolled.
2923 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
2925         PR target/86807
2926         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2927         Define to speculation_safe_value_not_needed.
2929 2018-08-06  Jeff Law  <law@redhat.com>
2931         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
2932         assert.
2934 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2936         PR target/86662
2937         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
2938         with all enabled __intN types.
2940         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
2942 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2944         * alias.c (record_set): Check for clobber high.
2945         * cfgexpand.c (expand_gimple_stmt): Likewise.
2946         * combine-stack-adj.c (single_set_for_csa): Likewise.
2947         * combine.c (find_single_use_1): Likewise.
2948         (set_nonzero_bits_and_sign_copies): Likewise.
2949         (get_combine_src_dest): Likewise.
2950         (is_parallel_of_n_reg_sets): Likewise.
2951         (try_combine): Likewise.
2952         (record_dead_and_set_regs_1): Likewise.
2953         (reg_dead_at_p_1): Likewise.
2954         (reg_dead_at_p): Likewise.
2955         * dce.c (deletable_insn_p): Likewise.
2956         (mark_nonreg_stores_1): Likewise.
2957         (mark_nonreg_stores_2): Likewise.
2958         * df-scan.c (df_find_hard_reg_defs): Likewise.
2959         (df_uses_record): Likewise.
2960         (df_get_call_refs): Likewise.
2961         * dwarf2out.c (mem_loc_descriptor): Likewise.
2962         * haifa-sched.c (haifa_classify_rtx): Likewise.
2963         * ira-build.c (create_insn_allocnos): Likewise.
2964         * ira-costs.c (scan_one_insn): Likewise.
2965         * ira.c (equiv_init_movable_p): Likewise.
2966         (rtx_moveable_p): Likewise.
2967         (interesting_dest_for_shprep): Likewise.
2968         * jump.c (mark_jump_label_1): Likewise.
2969         * postreload-gcse.c (record_opr_changes): Likewise.
2970         * postreload.c (reload_cse_simplify): Likewise.
2971         (struct reg_use): Add source expr.
2972         (reload_combine): Check for clobber high.
2973         (reload_combine_note_use): Likewise.
2974         (reload_cse_move2add): Likewise.
2975         (move2add_note_store): Likewise.
2976         * print-rtl.c (print_pattern): Likewise.
2977         * recog.c (decode_asm_operands): Likewise.
2978         (store_data_bypass_p): Likewise.
2979         (if_test_bypass_p): Likewise.
2980         * regcprop.c (kill_clobbered_value): Likewise.
2981         (kill_set_value): Likewise.
2982         * reginfo.c (reg_scan_mark_refs): Likewise.
2983         * reload1.c (maybe_fix_stack_asms): Likewise.
2984         (eliminate_regs_1): Likewise.
2985         (elimination_effects): Likewise.
2986         (mark_not_eliminable): Likewise.
2987         (scan_paradoxical_subregs): Likewise.
2988         (forget_old_reloads_1): Likewise.
2989         * reorg.c (find_end_label): Likewise.
2990         (try_merge_delay_insns): Likewise.
2991         (redundant_insn): Likewise.
2992         (own_thread_p): Likewise.
2993         (fill_simple_delay_slots): Likewise.
2994         (fill_slots_from_thread): Likewise.
2995         (dbr_schedule): Likewise.
2996         * resource.c (update_live_status): Likewise.
2997         (mark_referenced_resources): Likewise.
2998         (mark_set_resources): Likewise.
2999         * rtl.c (copy_rtx): Likewise.
3000         * rtlanal.c (reg_referenced_p): Likewise.
3001         (single_set_2): Likewise.
3002         (noop_move_p): Likewise.
3003         (note_stores): Likewise.
3004         * sched-deps.c (sched_analyze_reg): Likewise.
3005         (sched_analyze_insn): Likewise.
3007 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
3009         * cse.c (invalidate_reg): New function extracted from...
3010         (invalidate): ...here.
3011         (canonicalize_insn): Check for clobber high.
3012         (invalidate_from_clobbers): invalidate clobber highs.
3013         (invalidate_from_sets_and_clobbers): Likewise.
3014         (count_reg_usage): Check for clobber high.
3015         (insn_live_p): Likewise.
3016         * cselib.c (cselib_expand_value_rtx_1):Likewise.
3017         (cselib_invalidate_regno): Check for clobber in setter.
3018         (cselib_invalidate_rtx): Pass through setter.
3019         (cselib_invalidate_rtx_note_stores):
3020         (cselib_process_insn): Check for clobber high.
3021         * cselib.h (cselib_invalidate_rtx): Add operand.
3023 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
3025         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
3026         (mark_not_eliminable): Likewise.
3027         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
3028         * lra-lives.c (process_bb_lives): Check for clobber high.
3029         * lra.c (new_insn_reg): Remember clobber highs.
3030         (collect_non_operand_hard_regs): Check for clobber high.
3031         (lra_set_insn_recog_data): Likewise.
3032         (add_regs_to_insn_regno_info): Likewise.
3033         (lra_update_insn_regno_info): Likewise.
3035 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
3037         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
3038         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
3040 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
3042         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
3043         (copy_insn_1): Likewise.
3044         (gen_hard_reg_clobber_high): New gen function.
3045         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
3046         * genemit.c (gen_exp): Likewise.
3047         (gen_emit_seq): Pass through info.
3048         (gen_insn): Check for CLOBBER_HIGH.
3049         (gen_expand): Pass through info.
3050         (gen_split): Likewise.
3051         (output_add_clobbers): Likewise.
3052         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
3053         (remove_clobbers): Likewise.
3054         * rtl.h (gen_hard_reg_clobber_high): New declaration.
3056 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
3058         * doc/rtl.texi (clobber_high): Add.
3059         (parallel): Add in clobber high
3060         * rtl.c (rtl_check_failed_code3): Add function.
3061         * rtl.def (CLOBBER_HIGH): Add expression.
3062         * rtl.h (RTL_CHECKC3): Add macro.
3063         (rtl_check_failed_code3): Add declaration.
3064         (XC3EXP): Add macro.
3066 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
3068         PR target/86386
3069         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
3070         cfun->machine->max_used_stack_alignment if needed.
3072 2018-08-04  Martin Sebor  <msebor@redhat.com>
3074         PR tree-optimization/86571
3075         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
3076         NaN output to 4.
3078 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
3080         PR target/86799
3081         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3082         Define.
3084 2018-08-03  Jeff Law  <law@redhat.com>
3086         PR target/86795
3087         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3088         Define to speculation_safe_value_not_needed.
3090 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
3092         * doc/gcov.texi (-x): Remove duplicate "to".
3093         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
3094         (-Wif-not-aligned): Remove duplicate "is".
3095         (-flto): Remove duplicate "the".
3096         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
3097         duplicate "v5.00.b".
3098         (MSP430 Options): Remove duplicate "and" from the description
3099         of "-mgprel-sec=regexp".
3100         (x86 Options): Remove duplicate copies of "vmldLog102" and
3101         vmlsLog104 from description of "-mveclibabi=type".
3103 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
3105         * internal-fn.h (first_commutative_argument): Declare.
3106         * internal-fn.c (first_commutative_argument): New function.
3107         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
3108         restrictions for pattern statements.  Use first_commutative_argument
3109         to look for commutative operands in calls to internal functions.
3111 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
3113         * Makefile.in (wide-int-range.o): New.
3114         * tree-vrp.c: Move all the wide_int_* functions to...
3115         * wide-int-range.cc: ...here.
3116         * tree-vrp.h: Move all the wide_int_* prototypes to...
3117         * wide-int-range.h: ...here.
3119 2018-08-03  Tom de Vries  <tdevries@suse.de>
3121         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
3122         UI_NONE.
3123         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
3124         * except.c (output_function_exception_table): Do early exit if
3125         targetm_common.except_unwind_info (&global_options) == UI_NONE.
3127 2018-08-03  Martin Liska  <mliska@suse.cz>
3129         * predict.c (dump_prediction): Change to 2 digits
3130         in fraction part.
3132 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
3134         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
3135         neon_dup_q to...
3136         (falkor_am_1_gtov_gtov): ... a new insn reservation.
3138 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
3140         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
3141         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
3142         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
3143         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
3144         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
3146 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
3148         * diagnostic-show-locus.c (diagnostic_show_locus): Use
3149         pp_take_prefix when saving the existing prefix.
3150         * diagnostic.c (diagnostic_append_note): Likewise.
3151         * langhooks.c (lhd_print_error_function): Likewise.
3152         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
3153         param's type.  Free the existing prefix.
3154         (pp_take_prefix): New function.
3155         (pretty_printer::pretty_printer): Drop the prefix parameter.
3156         Rename the length parameter to match the comment.
3157         (pretty_printer::~pretty_printer): Free the prefix.
3158         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
3159         parameter.
3160         (struct pretty_printer): Drop the "const" from "prefix" field's
3161         type and clarify memory management.
3162         (pp_set_prefix): Drop the "const" from the 2nd param.
3163         (pp_take_prefix): New decl.
3165 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
3167         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
3168         for word_mode_ok here instead of passing as argument.
3169         (expand_block_compare): Change select_block_compare_mode() call.
3170         (expand_strncmp_gpr_sequence): New function.
3171         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
3173 2018-08-02  Jeff Law  <law@redhat.com>
3175         PR target/86790
3176         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3177         Define to speculation_safe_value_not_needed.
3179         PR target/86784
3180         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3181         Define to speculation_safe_value_not_needed.
3183 2018-08-02  Tom de Vries  <tdevries@suse.de>
3185         PR target/86660
3186         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
3187         function.  Return UI_TARGET unconditionally.
3188         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
3189         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
3191 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
3193         * genemit.c (print_overload_test): Fix typo.
3195 2018-08-02  Richard Biener  <rguenther@suse.de>
3197         PR tree-optimization/86816
3198         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
3199         which checks for value availability before querying it.
3200         (gvn_uses_equal): Use it.
3201         (same_succ_hash): Likewise.
3202         (gimple_equal_p): Likewise.
3204 2018-08-02  Nick Clifton  <nickc@redhat.com>
3206         PR target/86813
3207         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3208         Define to speculation_safe_value_not_needed.
3210         PR target/86810
3211         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3212         Define to speculation_safe_value_not_needed.
3214         PR target/86810
3215         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3216         Define to speculation_safe_value_not_needed.
3218         PR target/86803
3219         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3220         Define to speculation_safe_value_not_needed.
3222         PR target/86797
3223         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3224         Define to speculation_safe_value_not_needed.
3226         PR target/86791
3227         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3228         Define to speculation_safe_value_not_needed.
3230         PR target/86789
3231         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3232         Define to speculation_safe_value_not_needed.
3234         PR target/86787
3235         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3236         Define to speculation_safe_value_not_needed.
3238         PR target/86782
3239         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3240         speculation_safe_value_not_needed.
3242         PR target/86781
3243         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
3244         to speculation_safe_value_not_needed.
3246 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
3248         * doc/md.texi: Expand the documentation of instruction names
3249         to mention port-local uses.  Document '@' in pattern names.
3250         * read-md.h (overloaded_instance, overloaded_name): New structs.
3251         (mapping): Declare.
3252         (md_reader::handle_overloaded_name): New member function.
3253         (md_reader::get_overloads): Likewise.
3254         (md_reader::m_first_overload): New member variable.
3255         (md_reader::m_next_overload_ptr): Likewise.
3256         (md_reader::m_overloads_htab): Likewise.
3257         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
3258         m_next_overload_ptr and m_overloads_htab.
3259         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
3260         (get_mode_token, get_code_token, get_int_token): New functions.
3261         (map_attr_string): Add an optional argument that passes back
3262         the associated iterator.
3263         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
3264         (md_reader::handle_overloaded_name, add_overload_instance): New
3265         functions.
3266         (apply_iterators): Handle '@' names.  Report an error if '@'
3267         is used without iterators.
3268         (initialize_iterators): Initialize the new iterator_group fields.
3269         * genopinit.c (handle_overloaded_code_for)
3270         (handle_overloaded_gen): New functions.
3271         (main): Use them to print declarations of maybe_code_for_* and
3272         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
3273         * genemit.c (print_overload_arguments, print_overload_test)
3274         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
3275         (main): Use it to print definitions of maybe_code_for_* and
3276         maybe_gen_* functions.
3277         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
3278         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
3279         instead of explicit mode checks.
3280         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
3281         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
3282         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
3283         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
3284         (aarch64_expand_compare_and_swap): Likewise
3285         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
3286         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
3287         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
3288         (aarch64_constant_pool_reload_icode): Delete.
3289         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
3290         instead of aarch64_constant_pool_reload_icode.  Use
3291         code_for_aarch64_reload_mov instead of explicit mode checks.
3292         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
3293         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
3294         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
3295         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
3296         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
3297         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
3298         (aarch64_atomic_load_op_code): Delete.
3299         (aarch64_emit_atomic_load_op): Likewise.
3300         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
3301         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
3302         instead of aarch64_emit_atomic_load_op.
3303         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
3304         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
3305         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
3306         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
3307         character before the pattern name.
3308         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
3309         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
3310         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
3311         (aarch64_frecps<mode>): Likewise.
3312         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
3313         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
3314         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
3315         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
3316         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
3318 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
3320         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
3321         Allow HFmode constants if TARGET_FP_F16INST.
3323 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
3325         PR target/86014
3326         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
3327         No longer check last store for clobber of address register.
3329 2018-08-02  Martin Liska  <mliska@suse.cz>
3331         PR gcov-profile/86817
3332         * gcov.c (process_all_functions): New function.
3333         (main): Call it.
3334         (process_file): Move functions processing to
3335         process_all_functions.
3337 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
3339         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
3340         "const" to the "gimple *" and "rtx_insn *" parameters.
3341         * dumpfile.h (dump_user_location_t::dump_user_location_t):
3342         Likewise.
3343         (dump_location_t::dump_location_t): Likewise.
3345 2018-08-01  Martin Sebor  <msebor@redhat.com>
3347         PR tree-optimization/86650
3348         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
3349         rather than a "gcall *".  Directly pass the data of interest
3350         to percent_K_format, rather than building a temporary CALL_EXPR
3351         to hold it.
3352         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
3353         (gimple_fold_builtin_strncat): Adjust.
3354         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
3355         gcall* argument with gimple*.
3356         * gimple-ssa-warn-restrict.c (check_call): Same.
3357         (wrestrict_dom_walker::before_dom_children): Same.
3358         (builtin_access::builtin_access): Same.
3359         (check_bounds_or_overlap): Same
3360         (maybe_diag_overlap): Same.
3361         (maybe_diag_offset_bounds): Same.
3362         * tree-diagnostic.c (default_tree_printer): Move usage of
3363         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
3364         to this callsite.
3365         * tree-pretty-print.c (percent_K_format): Add argument.
3366         * tree-pretty-print.h: Add argument.
3367         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
3368         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
3369         (maybe_diag_stxncpy_trunc): Same.
3370         (handle_builtin_stxncpy): Same.
3371         (handle_builtin_strcat): Same.
3373 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3375         * match.pd: Optimise pointer range checks.
3377 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3379         PR tree-optimization/86758
3380         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
3381         to remove pattern statements.
3383 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3385         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
3386         result of dfs_enumerate_from when constructing stmt_vec_infos,
3387         instead of additionally calling get_loop_body.
3389 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3391         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
3392         parameter.
3393         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
3394         When creating an iv, assert that the step is not known to be zero.
3395         (vect_setup_realignment): Update call accordingly.
3396         * tree-vect-stmts.c (vectorizable_store): Likewise.
3397         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
3399 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3401         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
3402         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
3403         (vectorizable_reduction): Likewise.
3404         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3405         (vect_detect_hybrid_slp_stmts): Likewise.
3406         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3408 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
3410         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
3411         (wide_int_set_zero_nonzero_bits): ...this.
3412         (zero_nonzero_bits_from_vr): Rename to...
3413         (vrp_set_zero_nonzero_bits): ...this.
3414         (extract_range_from_multiplicative_op_1): Abstract wide int
3415         code...
3416         (wide_int_range_multiplicative_op): ...here.
3417         (extract_range_from_binary_expr_1): Extract wide int binary
3418         operations into their own functions.
3419         (wide_int_range_lshift): New.
3420         (wide_int_range_can_optimize_bit_op): New.
3421         (wide_int_range_shift_undefined_p): New.
3422         (wide_int_range_bit_xor): New.
3423         (wide_int_range_bit_ior): New.
3424         (wide_int_range_bit_and): New.
3425         (wide_int_range_trunc_mod): New.
3426         (extract_range_into_wide_ints): New.
3427         (vrp_shift_undefined_p): New.
3428         (extract_range_from_multiplicative_op): New.
3429         (vrp_can_optimize_bit_op): New.
3430         * tree-vrp.h (value_range::dump): New.
3431         (wide_int_range_multiplicative_op): New.
3432         (wide_int_range_lshift):New.
3433         (wide_int_range_shift_undefined_p): New.
3434         (wide_int_range_bit_xor): New.
3435         (wide_int_range_bit_ior): New.
3436         (wide_int_range_bit_and): New.
3437         (wide_int_range_trunc_mod): New.
3438         (zero_nonzero_bits_from_bounds): Rename to...
3439         (wide_int_set_zero_nonzero_bits): ...this.
3440         (zero_nonzero_bits_from_vr): Rename to...
3441         (vrp_set_zero_nonzero_bits): ...this.
3442         (range_easy_mask_min_max): Rename to...
3443         (wide_int_range_can_optimize_bit_op): this.
3444         * vr-values.c (simplify_bit_ops_using_ranges): Rename
3445         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
3447 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3449         * tree-vectorizer.h (vect_orig_stmt): New function.
3450         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
3451         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
3452         (vect_create_epilog_for_reduction): Likewise.
3453         (vectorizable_live_operation): Likewise.
3454         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
3455         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
3456         * tree-vect-stmts.c (vectorizable_call): Likewise.
3457         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
3459 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3461         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
3462         argument.
3463         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
3464         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
3465         (vect_transform_loop): Likewise.
3466         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3468 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3470         * tree-vectorizer.h (vect_schedule_slp): Return void.
3471         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3472         (vect_schedule_slp): Likewise.
3474 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3476         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
3477         argument.
3478         (vect_transform_loop): Update calls accordingly.  Schedule SLP
3479         instances before the main loop, if any exist.
3481 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3483         PR tree-optimization/86749
3484         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
3485         If the lhs is used in a COND_EXPR, check that it is being used
3486         as the "then" or "else" value.
3488 2018-08-01  Tom de Vries  <tdevries@suse.de>
3490         PR target/86800
3491         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3492         speculation_safe_value_not_needed.
3494 2018-08-01  Richard Biener  <rguenther@suse.de>
3496         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
3497         as base and offset.
3499 2018-08-01  Martin Liska  <mliska@suse.cz>
3501         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
3502         format how successful transformation is dumped.
3503         (gimple_mod_pow2_value_transform): Likewise.
3504         (gimple_mod_subtract_transform): Likewise.
3505         (gimple_stringops_transform): Likewise.
3507 2018-08-01  Martin Liska  <mliska@suse.cz>
3509         PR value-prof/35543
3510         * value-prof.c (interesting_stringop_to_profile_p):
3511         Simplify the code and add BUILT_IN_MEMMOVE.
3512         (gimple_stringops_transform): Likewise.
3514 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
3516         * config/aarch64/aarch64-simd.md
3517         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
3518         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
3519         use GPI iterator instead of SI mode.
3521 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
3523         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
3524         rs6000_speculation_barrier.
3525         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
3526         new barrier pattern name.
3528 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
3530         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
3531         (speculation_barrier): New insn.
3533 2018-08-01  Richard Biener  <rguenther@suse.de>
3535         PR bootstrap/86724
3536         * graphite.h: Include isl/id.h and isl/space.h to allow build
3537         with ISL 0.20.
3539 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
3541         PR target/86651
3542         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
3543         mode for COFF targets.
3544         * defaults.h (TARGET_COFF): Define.
3545         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
3546         TARGET_COFF): Define.
3547         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
3548         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
3549         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
3551 2018-07-31  Alexandre Oliva <oliva@adacore.com>
3553         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
3554         * gimple-streamer-out.c (output_bb): Save it.
3555         * lto-streamer-in.c (input_struct_function_base): Restore
3556         instance discriminator if available.  Create map on demand.
3557         * lto-streamer-out.c (output_struct_function_base): Save it if
3558         available.
3559         * final.c (decl_to_instance_map): Document LTO strategy.
3561 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
3562             Olivier Hainque  <hainque@adacore.com>
3564         * debug.h (decl_to_instance_map_t): New type.
3565         (decl_to_instance_map): Declare.
3566         (maybe_create_decl_to_instance_map): New inline function.
3567         * final.c (bb_discriminator, last_bb_discriminator): New statics,
3568         to track basic block discriminators.
3569         (final_start_function_1): Initialize them.
3570         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
3571         bb_discriminator.
3572         (decl_to_instance_map): New variable.
3573         (map_decl_to_instance, maybe_set_discriminator): New functions.
3574         (notice_source_line): Set discriminator.
3576 2018-07-31  Ian Lance Taylor  <iant@golang.org>
3578         * targhooks.c (default_have_speculation_safe_value): Add
3579         ATTRIBUTE_UNUSED.
3581 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
3583         * dump-context.h: Include "pretty-print.h".
3584         (dump_context::refresh_dumps_are_enabled): New decl.
3585         (dump_context::emit_item): New decl.
3586         (class dump_context): Add fields "m_test_pp" and
3587         "m_test_pp_flags".
3588         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3589         (temp_dump_context::get_dumped_text): New decl.
3590         (class temp_dump_context): Add field "m_pp".
3591         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
3592         (dump_context::refresh_dumps_are_enabled): ...and add a test for
3593         m_test_pp.
3594         (set_dump_file): Update for above change.
3595         (set_alt_dump_file): Likewise.
3596         (dump_loc): New overload, taking a pretty_printer *.
3597         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
3598         to any test pretty-printer.
3599         (make_item_for_dump_gimple_stmt): New function, adapted from
3600         optinfo::add_gimple_stmt.
3601         (dump_context::dump_gimple_stmt): Call it, and use the result,
3602         eliminating the direct usage of dump_file and alt_dump_file in
3603         favor of indirectly using them via emit_item.
3604         (make_item_for_dump_gimple_expr): New function, adapted from
3605         optinfo::add_gimple_expr.
3606         (dump_context::dump_gimple_expr): Call it, and use the result,
3607         eliminating the direct usage of dump_file and alt_dump_file in
3608         favor of indirectly using them via emit_item.
3609         (make_item_for_dump_generic_expr): New function, adapted from
3610         optinfo::add_tree.
3611         (dump_context::dump_generic_expr): Call it, and use the result,
3612         eliminating the direct usage of dump_file and alt_dump_file in
3613         favor of indirectly using them via emit_item.
3614         (make_item_for_dump_printf_va): New function, adapted from
3615         optinfo::add_printf_va.
3616         (make_item_for_dump_printf): New function.
3617         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
3618         and use the result, eliminating the direct usage of dump_file and
3619         alt_dump_file in favor of indirectly using them via emit_item.
3620         (make_item_for_dump_dec): New function.
3621         (dump_context::dump_dec): Call it, and use the result,
3622         eliminating the direct usage of dump_file and alt_dump_file in
3623         favor of indirectly using them via emit_item.
3624         (make_item_for_dump_symtab_node): New function, adapted from
3625         optinfo::add_symtab_node.
3626         (dump_context::dump_symtab_node): Call it, and use the result,
3627         eliminating the direct usage of dump_file and alt_dump_file in
3628         favor of indirectly using them via emit_item.
3629         (dump_context::begin_scope): Reimplement, avoiding direct usage
3630         of dump_file and alt_dump_file in favor of indirectly using them
3631         via emit_item.
3632         (dump_context::emit_item): New member function.
3633         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3634         Set up test pretty-printer on the underlying context.  Call
3635         refresh_dumps_are_enabled.
3636         (temp_dump_context::~temp_dump_context): Call
3637         refresh_dumps_are_enabled.
3638         (temp_dump_context::get_dumped_text): New member function.
3639         (selftest::verify_dumped_text): New function.
3640         (ASSERT_DUMPED_TEXT_EQ): New macro.
3641         (selftest::test_capture_of_dump_calls): Run all tests twice, with
3642         and then without optinfo enabled.  Add uses of
3643         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
3644         * dumpfile.h: Update comment for the dump_* API.
3645         * optinfo-emit-json.cc
3646         (selftest::test_building_json_from_dump_calls): Update for new
3647         param for temp_dump_context ctor.
3648         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
3649         and "m_owned" field.
3650         (optinfo_item::~optinfo_item): Likewise.
3651         (optinfo::add_item): New member function.
3652         (optinfo::emit): Update comment.
3653         (optinfo::add_string): Delete.
3654         (optinfo::add_printf): Delete.
3655         (optinfo::add_printf_va): Delete.
3656         (optinfo::add_gimple_stmt): Delete.
3657         (optinfo::add_gimple_expr): Delete.
3658         (optinfo::add_tree): Delete.
3659         (optinfo::add_symtab_node): Delete.
3660         (optinfo::add_dec): Delete.
3661         * optinfo.h (class dump_context): New forward decl.
3662         (optinfo::add_item): New decl.
3663         (optinfo::add_string): Delete.
3664         (optinfo::add_printf): Delete.
3665         (optinfo::add_printf_va): Delete.
3666         (optinfo::add_gimple_stmt): Delete.
3667         (optinfo::add_gimple_expr): Delete.
3668         (optinfo::add_tree): Delete.
3669         (optinfo::add_symtab_node): Delete.
3670         (optinfo::add_dec): Delete.
3671         (optinfo::add_poly_int): Delete.
3672         (optinfo_item::optinfo_item): Remove "owned" param.
3673         (class optinfo_item): Remove field "m_owned".
3675 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
3677         PR middle-end/86705
3678         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
3679         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
3680         requested variable alignment.
3681         (expand_one_ssa_partition): Likewise.
3682         (expand_one_var): Likewise.
3684 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3686         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3687         to speculation_safe_value_not_needed.
3689 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3691         * targhooks.h (speculation_safe_value_not_needed): New prototype.
3692         * targhooks.c (speculation_safe_value_not_needed): New function.
3693         * target.def (have_speculation_safe_value): Update documentation.
3694         * doc/tm.texi: Regenerated.
3696 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3698         * config/aarch64/iterators.md (ALLI_TI): New iterator.
3699         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
3700         expand.
3701         (despeculate_copy<ALLI:mode>_insn): New insn.
3702         (despeculate_copyti_insn): New insn.
3703         (despeculate_simple<ALLI:mode>): New insn
3704         (despeculate_simpleti): New insn.
3705         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
3706         function.
3707         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
3708         aarch64_speculation_safe_value.
3709         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
3711 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3713         * config/aarch64/aarch64-speculation.cc: New file.
3714         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
3715         before pass_reorder_blocks.
3716         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
3717         prototype.
3718         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
3719         X14 and X15 when tracking speculation.
3720         * config/aarch64/aarch64.md (register name constants): Add
3721         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
3722         (unspec): Add UNSPEC_SPECULATION_TRACKER.
3723         (speculation_barrier): New insn attribute.
3724         (cmp<mode>): Allow SP in comparisons.
3725         (speculation_tracker): New insn.
3726         (speculation_barrier): Add speculation_barrier attribute.
3727         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
3728         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
3729         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
3731 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3733         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
3734         aarch64_track_speculation is true.
3735         (tb<optab><mode>1): Likewise.
3736         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
3737         generate CB[N]Z when tracking speculation.
3738         (aarch64_split_compare_and_swap): Likewise.
3739         (aarch64_split_atomic_op): Likewise.
3741 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3743         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
3745 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3747         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
3748         (speculation_barrier): New insn.
3750 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3752         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
3753         * config/arm/arm.md (speculation_barrier): New expand.
3754         (speculation_barrier_insn): New pattern.
3756 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3758         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
3759         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
3760         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
3761         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
3762         list.
3763         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
3764         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
3765         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
3766         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
3767         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
3768         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
3769         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
3770         * builtins.c (expand_speculation_safe_value): New function.
3771         (expand_builtin): Call it.
3772         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
3773         * doc/extend.texi: Document __builtin_speculation_safe_value.
3774         * doc/md.texi: Document "speculation_barrier" pattern.
3775         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
3776         TARGET_HAVE_SPECULATION_SAFE_VALUE.
3777         * doc/tm.texi: Regenerated.
3778         * target.def (have_speculation_safe_value, speculation_safe_value): New
3779         hooks.
3780         * targhooks.c (default_have_speculation_safe_value): New function.
3781         (default_speculation_safe_value): New function.
3782         * targhooks.h (default_have_speculation_safe_value): Add prototype.
3783         (default_speculation_safe_value): Add prototype.
3785 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
3787         * dump-context.h (dump_context::dump_loc): New decl.
3788         * dumpfile.c (dump_context::dump_loc): New member function.
3789         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
3790         and dump_gimple_stmt.
3791         (dump_context::dump_gimple_expr_loc): Likewise, using
3792         dump_gimple_expr.
3793         (dump_context::dump_generic_expr_loc): Likewise, using
3794         dump_generic_expr.
3795         (dump_context::dump_printf_loc_va): Likewise, using
3796         dump_printf_va.
3797         (dump_context::begin_scope): Explicitly using the global function
3798         "dump_loc", rather than the member function.
3800 2018-07-31  Martin Sebor  <msebor@redhat.com>
3802         PR tree-optimization/86741
3803         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
3805 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
3807         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
3808         depend on whether prefetch instructions will be emitted or not.
3809         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
3810         will be emitted or not.
3811         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
3812         (TARGET_SETMEM_PFD): New macros.
3814 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3816         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
3817         (NULL_STMT_VEC_INFO): Delete.
3818         (stmt_vec_info::operator*): Likewise.
3819         (stmt_vec_info::operator gimple *): Likewise.
3820         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
3821         of NULL_STMT_VEC_INFO.
3822         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3823         (vect_reassociating_reduction_p): Likewise.
3824         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
3825         (vectorizable_store): Likewise.
3826         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
3827         (vec_info::free_stmt_vec_infos): Likewise.
3829 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3831         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
3832         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
3834 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3836         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
3837         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3838         (vec_info::free_stmt_vec_info): New private member functions.
3839         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
3840         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
3841         * tree-parloops.c (gather_scalar_reductions): Remove calls to
3842         set_stmt_vec_info_vec and free_stmt_vec_infos.
3843         * tree-vect-loop.c (_loop_vec_info): Remove call to
3844         set_stmt_vec_info_vec.
3845         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
3846         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
3847         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
3848         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3849         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
3850         assignments in {vec_info::,}new_stmt_vec_info that are redundant
3851         with the clearing in the xcalloc.
3852         (stmt_vec_info_vec): Delete.
3853         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
3854         (vectorize_loops): Likewise.
3855         (vec_info::~vec_info): Remove argument from call to
3856         free_stmt_vec_infos.
3857         (vec_info::add_stmt): Remove vinfo argument from call to
3858         new_stmt_vec_info.
3860 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3862         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
3863         rather than a gimple stmt.
3864         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
3865         information for pattern statements when passed the original
3866         statement; instead wait to be passed the pattern statement itself.
3867         Don't call set_vinfo_for_stmt here.
3868         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
3869         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
3870         stmt_vec_infos here.
3871         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
3872         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
3873         stmt_vec_infos entry.
3875 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3877         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
3878         * tree-vectorizer.c (vec_info::replace_stmt): New function.
3879         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
3880         * tree-vect-stmts.c (vectorizable_call): Likewise.
3881         (vectorizable_simd_clone_call): Likewise.
3883 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3885         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
3886         * tree-vectorizer.c (vec_info::remove_stmt): New function.
3887         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
3888         * tree-vect-loop.c (vect_transform_loop): Likewise.
3889         * tree-vect-slp.c (vect_schedule_slp): Likewise.
3890         * tree-vect-stmts.c (vect_remove_stores): Likewise.
3892 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3894         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
3895         (vect_dr_stmt): Delete.
3896         * tree-vectorizer.c (vec_info::lookup_dr): New function.
3897         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
3898         of DR_VECT_AUX.
3899         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
3900         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
3901         (vect_verify_datarefs_alignment, vect_peeling_supportable)
3902         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3903         (vect_analyze_data_refs): Likewise.
3904         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
3905         argument.
3906         (vect_find_same_alignment_drs): Likewise.
3907         (vect_slp_analyze_node_dependences): Update calls accordingly.
3908         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
3909         instead of DR_VECT_AUX.
3910         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
3911         of a vector data references.  Use vec_info::lookup_dr instead of
3912         DR_VECT_AUX.
3913         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
3914         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
3915         instead of DR_VECT_AUX.
3917 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3919         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
3920         dr_vec_info.
3921         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
3922         accordingly.
3923         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3924         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3925         (vect_gen_prolog_loop_niters): Likewise.
3927 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3929         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
3930         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
3931         (vect_known_alignment_in_bytes, vect_dr_behavior)
3932         (vect_get_scalar_dr_size): Take references as dr_vec_infos
3933         instead of data_references.  Update calls to other routines for
3934         which the same change has been made.
3935         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
3936         dr_vec_infos instead of stmt_vec_infos.
3937         (vect_analyze_data_ref_dependence): Update call accordingly.
3938         (vect_slp_analyze_data_ref_dependence)
3939         (vect_record_base_alignments): Use DR_VECT_AUX.
3940         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
3941         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
3942         (vector_alignment_reachable_p, vect_get_data_access_cost)
3943         (vect_peeling_supportable, vect_analyze_group_access_1)
3944         (vect_analyze_group_access, vect_analyze_data_ref_access)
3945         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
3946         (vect_compile_time_alias, vect_small_gap_p)
3947         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
3948         (vect_supportable_dr_alignment): Take references as dr_vec_infos
3949         instead of data_references.  Update calls to other routines for
3950         which the same change has been made.
3951         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
3952         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
3953         (vect_slp_analyze_and_verify_node_alignment)
3954         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3955         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3956         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
3957         above changes.
3958         (_vect_peel_info::dr): Replace with...
3959         (_vect_peel_info::dr_info): ...this new field.
3960         (vect_peeling_hash_get_most_frequent)
3961         (vect_peeling_hash_choose_best_peeling): Update accordingly.
3962         (vect_peeling_hash_get_lowest_cost):
3963         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
3964         routines for which the same change has been made.
3965         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
3966         data_reference.
3967         * tree-vect-loop-manip.c (get_misalign_in_elems)
3968         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
3969         above changes.
3970         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3971         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
3972         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
3973         (get_group_load_store_type, get_negative_load_store_type)
3974         (vect_get_data_ptr_increment, vectorizable_store)
3975         (vectorizable_load): Likewise.
3976         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
3977         Update calls to other routines for which the same change has been made.
3979 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3981         * tree-vectorizer.h (vec_info::move_dr): New member function.
3982         (dataref_aux): Rename to...
3983         (dr_vec_info): ...this and add "dr" and "stmt" fields.
3984         (_stmt_vec_info::dr_aux): Update accordingly.
3985         (_stmt_vec_info::data_ref_info): Delete.
3986         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
3987         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
3988         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
3989         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
3990         of data_ref.
3991         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
3992         (STMT_VINFO_DR_INFO): New macro.
3993         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
3994         (set_dr_misalignment): Update after rename of dataref_aux.
3995         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
3996         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
3997         initialization of STMT_VINFO_DATA_REF.
3998         * tree-vectorizer.c (vec_info::move_dr): New function.
3999         * tree-vect-patterns.c (vect_recog_bool_pattern)
4000         (vect_recog_mask_conversion_pattern)
4001         (vect_recog_gather_scatter_pattern): Use it.
4002         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
4003         the "dr" and "stmt" fields of dr_vec_info instead of
4004         STMT_VINFO_DATA_REF.
4006 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4008         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
4009         (is_pattern_stmt_p): Use it.
4010         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
4011         on pattern statements.
4013 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4015         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
4016         original stmt as a stmt_vec_info rather than a gimple stmt.
4017         (vect_pattern_recog_1): Take the statement directly as a
4018         stmt_vec_info, rather than via a gimple_stmt_iterator.
4019         Update call to vect_mark_pattern_stmts.
4020         (vect_pattern_recog): Update calls accordingly.
4022 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4024         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
4025         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
4026         a vect_def_type for the first argument.
4027         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
4028         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
4029         operand if it isn't defined by a vectorized statement.
4030         (vect_build_gather_load_calls): Remove the mask_dt argument and
4031         update calls to vect_get_vec_def_for_stmt_copy.
4032         (vectorizable_bswap): Likewise the dt argument.
4033         (vectorizable_call): Update calls to vectorizable_bswap and
4034         vect_get_vec_def_for_stmt_copy.
4035         (vectorizable_simd_clone_call, vectorizable_assignment)
4036         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
4037         (vectorizable_comparison): Update calls to
4038         vect_get_vec_def_for_stmt_copy.
4039         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
4040         vect_is_simple_use.
4041         (vect_get_loop_based_defs): Remove dt argument and update call
4042         to vect_get_vec_def_for_stmt_copy.
4043         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
4044         and vect_get_vec_def_for_stmt_copy.
4045         (vectorizable_load): Update calls to vect_build_gather_load_calls
4046         and vect_get_vec_def_for_stmt_copy.
4047         * tree-vect-loop.c (vect_create_epilog_for_reduction)
4048         (vectorizable_reduction, vectorizable_live_operation): Update calls
4049         to vect_get_vec_def_for_stmt_copy.
4051 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4053         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
4054         and gimple stmt arguments with a stmt_vec_info.
4055         (vect_record_base_alignments): Update calls accordingly.
4056         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
4057         and gimple stmt arguments with a stmt_vec_info.
4058         (vect_build_slp_tree_1): Remove vinfo argument and update call
4059         to vect_record_max_nunits.
4060         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
4061         and vect_record_max_nunits.
4063 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4065         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
4066         file and take a stmt_vec_info instead of a gimple stmt.
4067         (supportable_widening_operation, vect_finish_replace_stmt)
4068         (vect_finish_stmt_generation, vect_get_store_rhs)
4069         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
4070         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
4071         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
4072         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
4073         (vect_create_data_ref_ptr, bump_vector_ptr)
4074         (vect_permute_store_chain, vect_setup_realignment)
4075         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
4076         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
4077         (vectorizable_reduction, vectorizable_induction)
4078         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
4079         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
4080         than gimple stmts as arguments.
4081         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
4082         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
4083         (can_group_stmts_p, vect_check_gather_scatter)
4084         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
4085         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
4086         (vect_permute_load_chain, vect_shift_permute_load_chain)
4087         (vect_transform_grouped_load)
4088         (vect_record_grouped_load_vectors): Likewise.
4089         * tree-vect-loop.c (vect_fixup_reduc_chain)
4090         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
4091         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
4092         (vectorizable_reduction, vectorizable_induction)
4093         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
4094         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
4095         (vect_get_load_store_mask): Likewise.
4096         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
4097         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
4098         * tree-vect-stmts.c (vect_mark_relevant)
4099         (is_simple_and_all_uses_invariant)
4100         (exist_non_indexing_operands_for_use_p, process_use)
4101         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
4102         (vect_get_vec_def_for_operand, vect_get_vec_defs)
4103         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
4104         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
4105         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
4106         (get_negative_load_store_type, get_load_store_type)
4107         (vect_check_load_store_mask, vect_check_store_rhs)
4108         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
4109         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4110         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4111         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4112         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
4113         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
4114         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
4115         (supportable_widening_operation): Likewise.
4117 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4119         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
4120         a stmt_vec_info instead of a gcall.
4121         (vect_check_gather_scatter): Update call accordingly.
4122         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
4123         of a gphi.
4124         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
4125         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
4126         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
4127         instead of a gimple stmt.
4128         (vect_transform_loop): Update calls accordingly.
4129         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
4130         stmt_vec_infos instead of gimple stmts.
4131         (vect_analyze_slp_instance): Update use accordingly.
4132         * tree-vect-stmts.c (read_vector_array, write_vector_array)
4133         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
4134         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
4135         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
4136         (vect_gen_widened_results_half, vect_get_loop_based_defs)
4137         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
4138         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
4139         down to subroutines.
4141 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4143         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
4144         of the worklist from a vector of gimple stmts to a vector of
4145         stmt_vec_infos.
4146         * tree-vect-stmts.c (vect_mark_relevant, process_use)
4147         (vect_mark_stmts_to_be_vectorized): Likewise
4149 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4151         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
4152         statement before passing it to vect_analyze_stmt.
4153         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
4154         the chain of phi vector definitions.  Track the exit phi via its
4155         stmt_vec_info.
4156         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
4157         STMT_VINFO_REDUC_DEF.
4158         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
4159         stmt_vec_infos to handle the statement chains.
4160         (vect_get_slp_defs): Record the first statement in the node
4161         using a stmt_vec_info.
4162         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
4163         statements here and pass their stmt_vec_info down to subroutines.
4164         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
4165         down to vect_finish_stmt_generation.
4166         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
4167         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
4168         stmt_vec_infos to subroutines.
4169         (vect_remove_stores): Use stmt_vec_infos to handle the statement
4170         chains.
4172 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4174         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
4175         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
4176         (vect_permute_store_chain, vect_setup_realignment)
4177         (vect_permute_load_chain, vect_shift_permute_load_chain)
4178         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
4179         stmts internally, and when passing values to other vectorizer routines.
4180         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4181         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
4182         (vect_analyze_loop_operations, get_initial_def_for_reduction)
4183         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
4184         (vectorizable_reduction, vectorizable_induction)
4185         (vectorizable_live_operation, vect_transform_loop_stmt)
4186         (vect_transform_loop): Likewise.
4187         * tree-vect-patterns.c (vect_reassociating_reduction_p)
4188         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
4189         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
4190         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4191         (vect_slp_analyze_node_operations_1): Likewise.
4192         * tree-vect-stmts.c (vect_mark_relevant, process_use)
4193         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
4194         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
4195         (vect_finish_stmt_generation_1, get_group_load_store_type)
4196         (get_load_store_type, vect_build_gather_load_calls)
4197         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4198         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4199         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4200         (vectorizable_store, vectorizable_load, vectorizable_condition)
4201         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
4202         (supportable_widening_operation): Likewise.
4203         (vect_get_vector_types_for_stmt): Likewise.
4204         * tree-vectorizer.h (vect_dr_behavior): Likewise.
4206 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4208         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4209         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
4210         (vect_permute_store_chain, vect_permute_load_chain)
4211         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
4212         repeated stmt_vec_info lookups.
4213         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4214         (vect_update_ivs_after_vectorizer): Likewise.
4215         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
4216         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4217         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
4218         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4219         (vect_bb_slp_scalar_cost): Likewise.
4220         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
4222 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4224         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
4225         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
4226         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
4227         to get gassigns and gcalls, rather than operating on generc gimple
4228         stmts.
4229         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
4230         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
4231         (vectorizable_load, vect_analyze_stmt): Likewise.
4232         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
4234 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4236         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
4237         return stmt_vec_infos rather than gimple stmts.  Do not accept
4238         null arguments.
4239         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
4240         of a gimple stmt.
4241         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
4242         Update use of get_later_stmt.
4243         (vect_get_constant_vectors): Update call accordingly.
4244         (vect_schedule_slp_instance): Likewise
4245         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
4246         (vect_slp_analyze_instance_dependence): Likewise.
4247         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
4249 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4251         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
4252         (stmt_info_for_cost::stmt_info): ...this new field.
4253         (add_stmt_costs): Update accordingly.
4254         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4255         (vect_get_known_peeling_cost): Likewise.
4256         (vect_estimate_min_profitable_iters): Likewise.
4257         * tree-vect-stmts.c (record_stmt_cost): Likewise.
4259 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4261         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
4262         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4263         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
4264         accordingly.
4265         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
4267 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4269         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
4270         a gimple stmt to a stmt_vec_info.
4271         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
4273 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4275         * tree-vectorizer.h (vec_info::grouped_stores): Change from
4276         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4277         (_loop_vec_info::reduction_chains): Likewise.
4278         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
4279         accordingly.
4280         * tree-vect-slp.c (vect_analyze_slp): Likewise.
4282 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4284         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
4285         a gimple stmt to a stmt_vec_info.
4286         (_stmt_vec_info::next_element): Likewise.
4287         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
4288         (vect_slp_analyze_and_verify_node_alignment)
4289         (vect_analyze_group_access_1, vect_analyze_group_access)
4290         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
4291         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
4292         (vect_supportable_dr_alignment): Update accordingly.
4293         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
4294         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
4295         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
4296         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
4297         * tree-vect-slp.c (vect_build_slp_tree_1)
4298         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
4299         (vect_split_slp_store_group, vect_analyze_slp_instance)
4300         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
4301         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
4302         (get_group_load_store_type, get_load_store_type)
4303         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
4304         (vect_transform_stmt, vect_remove_stores): Likewise.
4306 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4308         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
4309         than a gimple stmt.
4310         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4311         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
4312         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
4313         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
4314         (vector_alignment_reachable_p, vect_get_data_access_cost)
4315         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
4316         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
4317         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
4318         (vect_analyze_group_access_1, vect_analyze_group_access)
4319         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
4320         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
4321         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
4322         result of vect_dr_stmt and use the stmt_vec_info instead of
4323         the associated gimple stmt.
4324         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4325         (vect_gen_prolog_loop_niters): Likewise.
4326         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4328 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4330         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
4331         to a vec<stmt_vec_info>.
4332         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
4333         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
4334         vec<stmt_vec_info>.
4335         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
4336         to a vec<stmt_vec_info>.
4337         (bst_traits::value_type, bst_traits::value_type): Likewise.
4338         (bst_traits::hash): Update accordingly.
4339         (vect_get_and_check_slp_defs): Change the stmts parameter from
4340         a vec<gimple *> to a vec<stmt_vec_info>.
4341         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
4342         (vect_build_slp_tree): Likewise.
4343         (vect_build_slp_tree_2): Likewise.  Update uses of
4344         SLP_TREE_SCALAR_STMTS.
4345         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
4346         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
4347         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
4348         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
4349         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
4350         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
4351         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
4352         (vect_get_constant_vectors, vect_get_slp_defs)
4353         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
4354         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
4355         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
4356         instead of gimple stmts.
4357         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
4358         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
4359         (vect_slp_analyze_instance_dependence): Update uses of
4360         SLP_TREE_SCALAR_STMTS.
4361         (vect_slp_analyze_and_verify_node_alignment): Likewise.
4362         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
4363         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
4364         (get_initial_defs_for_reduction): Likewise.
4365         (vect_create_epilog_for_reduction): Likewise.
4366         (vectorize_fold_left_reduction): Likewise.
4367         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
4368         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
4369         (can_vectorize_live_stmts): Likewise.
4371 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4373         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
4374         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4375         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
4376         than gimple stmts.
4377         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
4378         of a gimple stmt.
4379         (gather_scalar_reductions): Update after above interface changes.
4380         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
4381         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
4382         than gimple stmts.
4383         (vect_force_simple_reduction): Likewise.
4384         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
4385         LOOP_VINFO_REDUCTIONS.
4386         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4388 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4390         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
4391         a gimple stmt to a stmt_vec_info.
4392         * tree-vect-loop.c (vect_active_double_reduction_p)
4393         (vect_force_simple_reduction, vectorizable_reduction): Update
4394         accordingly.
4396 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4398         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
4399         vec<gimple *> to a vec<stmt_vec_info>.
4400         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
4401         the reduction_phis argument from a vec<gimple *> to a
4402         vec<stmt_vec_info>.
4403         (vectorizable_reduction): Likewise the phis local variable that
4404         is passed to vect_create_epilog_for_reduction.  Update for new type
4405         of SLP_TREE_VEC_STMTS.
4406         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
4407         (vectorizable_live_operation): Likewise.
4408         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
4409         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
4411 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4413         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
4414         a gimple stmt to a stmt_vec_info.
4415         (vectorizable_condition, vectorizable_live_operation)
4416         (vectorizable_reduction, vectorizable_induction): Pass back the
4417         vectorized statement as a stmt_vec_info.
4418         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
4419         use of STMT_VINFO_VEC_STMT.
4420         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
4421         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
4422         as stmt_vec_infos rather than gimple stmts.
4423         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
4424         to a stmt_vec_info.
4425         (vectorizable_live_operation): Likewise.
4426         (vectorizable_reduction, vectorizable_induction): Likewise,
4427         updating use of STMT_VINFO_VEC_STMT.
4428         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
4429         of STMT_VINFO_VEC_STMT.
4430         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
4431         (vectorizable_simd_clone_call, vectorizable_conversion)
4432         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4433         (vectorizable_store, vectorizable_load, vectorizable_condition)
4434         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
4435         from a gimple stmt to a stmt_vec_info.
4436         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
4437         pointer to a stmt_vec_info to the vectorizable_* routines.
4439 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4441         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
4442         a gimple stmt to a stmt_vec_info.
4443         (is_pattern_stmt_p): Update accordingly.
4444         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
4445         (vect_record_grouped_load_vectors): Likewise.
4446         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
4447         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
4448         (vect_model_reduction_cost): Likewise.
4449         (vect_create_epilog_for_reduction): Likewise.
4450         (vectorizable_reduction, vectorizable_induction): Likewise.
4451         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4452         Return the stmt_vec_info for the pattern statement.
4453         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
4454         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
4455         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4456         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
4457         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
4458         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
4459         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
4460         (free_stmt_vec_info, vect_is_simple_use): Likewise.
4462 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4464         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
4465         (vect_finish_stmt_generation): Likewise.
4466         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4467         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
4468         (vect_build_gather_load_calls): Use the return value of the above
4469         functions instead of a separate call to vinfo_for_stmt.  Use narrow
4470         scopes for the input gimple stmt and wider scopes for the associated
4471         stmt_vec_info.  Use vec_info::lookup_def when setting these
4472         stmt_vec_infos from an SSA_NAME definition.
4473         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4474         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4475         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4476         (vectorizable_store, vectorizable_load, vectorizable_condition)
4477         (vectorizable_comparison): Likewise.
4478         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
4479         (vectorizable_reduction): Likewise.
4481 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4483         * tree-vectorizer.h (vect_is_simple_use): Add an optional
4484         stmt_vec_info * parameter before the optional gimple **.
4485         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4486         (process_use, vect_get_vec_def_for_operand_1): Update callers.
4487         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
4488         * tree-vect-loop.c (vectorizable_reduction): Likewise.
4489         (vectorizable_live_operation): Likewise.
4490         * tree-vect-patterns.c (type_conversion_p): Likewise.
4491         (vect_look_through_possible_promotion): Likewise.
4492         (vect_recog_rotate_pattern): Likewise.
4493         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4495 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4497         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
4498         a typedef to a wrapper class.
4499         (NULL_STMT_VEC_INFO): New macro.
4500         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
4501         (stmt_vec_info::operator*): New function.
4502         (stmt_vec_info::operator gimple *): Likewise.
4503         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
4504         (add_stmt_costs): Likewise.
4505         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
4506         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4507         (vect_get_known_peeling_cost): Likewise.
4508         (vect_estimate_min_profitable_iters): Likewise.
4509         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4510         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
4511         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
4512         (vectorizable_store, free_stmt_vec_infos): Likewise.
4513         (new_stmt_vec_info): Change return type of xcalloc to
4514         _stmt_vec_info *.
4516 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4518         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
4519         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
4520         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
4521         a single_imm_use-based sequence.
4522         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
4524 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4526         * tree-vectorizer.h (vec_info::lookup_def): Declare.
4527         * tree-vectorizer.c (vec_info::lookup_def): New function.
4528         * tree-vect-patterns.c (vect_get_internal_def): Use it.
4529         (vect_widened_op_tree): Likewise.
4530         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4531         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
4532         (vectorizable_reduction): Likewise.
4533         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
4534         of a gimple *.
4535         (vect_is_slp_reduction): Update calls accordingly.  Use
4536         vec_info::lookup_def.
4537         (vect_is_simple_reduction): Likewise
4538         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
4540 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4542         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
4543         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
4544         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
4545         of vinfo_for_stmt.
4546         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
4547         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
4548         (vect_update_vf_for_slp, vect_analyze_loop_operations)
4549         (vect_is_slp_reduction, vectorizable_induction)
4550         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
4551         * tree-vect-patterns.c (vect_init_pattern_stmt):
4552         (vect_determine_min_output_precision_1, vect_determine_precisions)
4553         (vect_pattern_recog): Likewise.
4554         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
4555         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
4556         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
4557         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4558         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
4559         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
4560         info field from a loop to a loop_vec_info.
4562 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4564         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
4565         (vec_info::add_stmt): Declare.
4566         * tree-vectorizer.c (vec_info::add_stmt): New function.
4567         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
4568         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
4569         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4570         (vectorizable_induction): Likewise.
4571         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
4572         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4573         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
4574         (vectorizable_load): Likewise.
4575         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4576         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
4577         (vect_recog_gather_scatter_pattern): Likewise.
4578         (append_pattern_def_seq): Likewise.  Remove a check that is
4579         performed by add_stmt itself.
4581 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4583         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
4584         which make_ssa_name was called with new_stmt before new_stmt
4585         had been created.
4587 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4589         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
4590         split out from...
4591         (vect_is_slp_reduction): ...here...
4592         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
4593         that are already known to be false.
4595 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4597         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
4598         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
4599         STMT_VINFO_NUM_SLP_USES when it's true.
4600         (vect_free_slp_instance): Add a final_p parameter and pass it to
4601         vect_free_slp_tree.
4602         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
4603         (vect_analyze_slp_instance): Likewise.
4604         (vect_slp_analyze_operations): Likewise.
4605         (vect_slp_analyze_bb_1): Likewise.
4606         * tree-vectorizer.c (vec_info): Likewise.
4607         * tree-vect-loop.c (vect_transform_loop): Likewise.
4609 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4611         * tree-vect-loop.c (vectorizable_reduction): Assert that the
4612         function is not called for second and subsequent members of
4613         a reduction group.
4615 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4617         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
4618         cases for nested loops from here to ...
4619         (vect_create_epilog_for_reduction): ...here.  Only call
4620         vect_is_simple_use for inner-loop reductions.
4622 2018-07-31  Martin Liska  <mliska@suse.cz>
4624         PR gcov-profile/85338
4625         PR gcov-profile/85350
4626         PR gcov-profile/85372
4627         * profile.c (struct location_triplet): New.
4628         (struct location_triplet_hash): Likewise.
4629         (output_location): Do not output a BB that
4630         is already recorded for a line.
4631         (branch_prob): Use streamed_locations.
4633 2018-07-31  Martin Liska  <mliska@suse.cz>
4635         PR gcov-profile/85370
4636         * coverage.c (coverage_begin_function): Do not mark target
4637         clones as artificial functions.
4639 2018-07-31  Martin Liska  <mliska@suse.cz>
4641         PR gcov-profile/83813
4642         PR gcov-profile/84758
4643         PR gcov-profile/85217
4644         PR gcov-profile/85332
4645         * profile.c (branch_prob): Do not record GOTO expressions
4646         for GIMPLE statements which locations are already streamed.
4648 2018-07-31  Olivier Hainque  <hainque@adacore.com>
4650         * gcc.c (handle_spec_function): Accept a soft_matched_part
4651         argument, as do_spec_1.  Pass it down to ...
4652         (eval_spec_function): Accept a soft_matched_part argument,
4653         and pass it down to ...
4654         (do_spec_2): Accept a soft_matched_part argument, and pass
4655         it down to do_spec_1.
4656         (do_spec_1): Pass soft_matched_part to handle_spec_function.
4657         (handle_braces): Update call to handle_spec_function.
4658         (driver::set_up_specs): Update calls to do_spec_2.
4659         (compare_debug_dump_opt_spec_function): Likewise.
4660         (compare_debug_self_opt_spec_function): Likewise.
4662 2018-07-31  Olivier Hainque  <hainque@adacore.com>
4664         * common.opt (nolibc): New option.
4665         * doc/invoke.texi (Link Options): Document it.
4666         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
4667         * config/alpha/linux.h: Likewise.
4668         * config/arc/elf.h: Likewise.
4669         * config/arm/uclinux-elf.h: Likewise.
4670         * config/arm/unknown-elf.h: Likewise.
4671         * config/avr/avrlibc.h: Likewise.
4672         * config/bfin/bfin.h: Likewise.
4673         * config/bfin/linux.h: Likewise.
4674         * config/bfin/uclinux.h: Likewise.
4675         * config/darwin.h: Likewise.
4676         * config/darwin10.h: Likewise.
4677         * config/darwin12.h: Likewise.
4678         * config/gnu-user.h: Likewise.
4679         * config/lm32/uclinux-elf.h: Likewise.
4680         * config/pa/pa-hpux11.h: Likewise.
4681         * config/pa/pa64-hpux.h: Likewise.
4682         * config/sparc/sparc.h: Likewise.
4684 2018-07-31  Olivier Hainque  <hainque@adacore.com>
4686         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
4687         undefined variables.
4689 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
4691         PR target/86640
4692         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
4693         instead of GEN_INT.
4695 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4697         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4698         terminated string literal.
4700 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
4702         PR rtl-optimization/85160
4703         * combine.c (is_just_move): New function.
4704         (try_combine): Allow combining two instructions into two if neither of
4705         the original instructions was a move.
4707 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
4709         PR target/86673
4710         * doc/extend.texi (Global Register Variables): Discourage use of type
4711         qualifiers.
4712         (Local Register Variables): Likewise.
4714 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
4716         PR tree-optimization/86506
4717         * hwint.h (ceil_log2): Resync with hwint.c implementation.
4719 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
4721         PR target/86547
4722         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
4723         hard_regno, make sure no insn between `from` and `to` clobbers it.
4725 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
4726             Tom de Vries  <tdevries@suse.de>
4728         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
4729         (PTX_DEFAULT_RUNTIME_DIM): ... this.
4730         (nvptx_goacc_validate_dims): Set default worker and gang dims to
4731         PTX_DEFAULT_RUNTIME_DIM.
4732         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
4734 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
4736         * config/pa/pa.c (pa_output_addr_vec): Align address table.
4737         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
4738         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
4740 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
4742         * config/rs6000/constraints.md (wG constraint): Delete, no longer
4743         used.
4744         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
4745         predicate to reflect toc fusion has been deleted.
4746         (toc_fusion_mem_raw): Delete, no longer used.
4747         (toc_fusion_mem_wrapped): Likewise.
4748         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
4749         fusion mask bit.
4750         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
4751         Delete, no longer used.
4752         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
4753         meant to be used for toc fusion.
4754         (rs6000_debug_print_mode): Delete toc fusion debugging.
4755         (rs6000_debug_reg_global): Likewise.
4756         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
4757         fusion and secondary reload support that were never used.
4758         (rs6000_option_override_internal): Delete TOC fusion, that was only
4759         partially defined, and it did not work unless you also used the
4760         -mcmodel= switch.
4761         (rs6000_legitimate_address_p): Delete TOC fusion support.
4762         (rs6000_opt_masks): Likewise.
4763         (fusion_wrap_memory_address): Delete function, no longer used.
4764         (fusion_split_address); Delete TOC fusion support.
4765         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
4766         longer used with toc fusion being deleted.
4767         (TARGET_TOC_FUSION_FP): Likewise.
4768         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
4769         UNSPEC.
4770         (toc fusion spliter): Delete TOC fusion support.
4771         (toc_fusionload_<mode>): Likewise.
4772         (toc_fusionload_di): Likewise.
4773         (fusion_gpr_load_<mode>): Delete generator function, this insn no
4774         longer needs to be named.  Rename predicate to delete TOC fusion.
4775         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4776         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4777         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4778         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4779         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
4781 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4783         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
4784         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
4785         __int128 in built-in function prototypes.
4786         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
4787         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
4789 2018-07-27  Martin Sebor  <msebor@redhat.com>
4791         PR tree-optimization/86696
4792         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
4793         types, including enums.
4794         (handle_char_store): Be prepared for the above function to fail.
4796 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
4798         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
4799         when optimization level is lower than 2 or optimize for size.
4801 2018-07-26  Martin Sebor  <msebor@redhat.com>
4803         PR tree-optimization/86043
4804         PR tree-optimization/86042
4805         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
4806         (get_string_cst_length): Rename...
4807         (get_min_string_length): ...to this.  Add argument.
4808         (handle_char_store): Extend to handle multi-character stores by
4809         MEM_REF.
4810         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
4811         * tree.h (initializer_zerop): Add argument.
4813 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
4815         PR middle-end/86660
4816         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
4817         declare target to variables if they have always,{to,from,tofrom} map
4818         kinds.
4820 2018-07-26  Martin Liska  <mliska@suse.cz>
4822         PR lto/86548
4823         * lto-wrapper.c: Add linker_output as prefix
4824         for ltrans_output_file.
4826 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
4828         PR rtl-optimization/85805
4829         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
4830         value for hard registers if that was written in the same mode.
4832 2018-07-26  Martin Liska  <mliska@suse.cz>
4834         PR gcov-profile/86536
4835         * gcov.c (format_gcov): Use printf format %.*f directly
4836         and do not handle special values.
4838 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
4840         * common/config/arc/arc-common.c (arc_option_optimization_table):
4841         Update default optimizations for size.
4843 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
4845         * config/arc/arc.md (movsf_insn): Add short instruction selection.
4846         * config/arc/constraints.md (CfZ): New constraint.
4847         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
4848         (subsf3_fpu): Likewise.
4849         (cmpsf_fpu): Likewise.
4850         (cmpsf_fpu_uneq): Likewise.
4852 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
4854         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
4855         accesses as well.
4856         (arc_is_uncached_mem_p): uncached applies to both the variable and
4857         the pointer.
4859 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
4861         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
4862         register names.
4864 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
4866         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
4867         field "m_scopes" from vec to auto_vec.
4869 2018-07-25  Martin Liska  <mliska@suse.cz>
4871         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
4872         return type.
4874 2018-07-25  Richard Biener  <rguenther@suse.de>
4876         PR debug/86654
4877         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
4878         special wrt context_die late.
4879         (gen_subprogram_die): Re-use DIEs in local scope.
4881 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
4883         PR tree-optimization/86644
4884         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
4886 2018-07-25  Martin Liska  <mliska@suse.cz>
4888         PR middle-end/86645
4889         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
4890         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
4892 2018-07-25  Martin Liska  <mliska@suse.cz>
4894         PR sanitizer/79635
4895         * params.def: Explain ASan abbreviation and provide
4896         a documentation link.
4898 2018-07-24  Martin Sebor  <msebor@redhat.com>
4900         PR tree-optimization/86622
4901         PR tree-optimization/86532
4902         * builtins.h (string_length): Declare.
4903         * builtins.c (c_strlen): Correct handling of non-constant offsets.
4904         (check_access): Be prepared for non-constant length ranges.
4905         (string_length): Make extern.
4906         * expr.c (string_constant): Only handle the minor non-constant
4907         array index.  Use string_constant to compute the length of
4908         a generic string constant.
4910 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
4912         PR tree-optimization/86618
4913         * tree-vect-stmts.c (vectorizable_call): Don't take the address
4914         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
4916 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
4918         PR tree-optimization/86636
4919         * json.cc (json::object::set): Fix comment.  Add assertions.
4920         (json::array::append): Move here from json.h.  Add comment and an
4921         assertion.
4922         (json::string::string): Likewise.
4923         * json.h (json::array::append): Move to json.cc.
4924         (json::string::string): Likewise.
4925         * optinfo-emit-json.cc
4926         (optrecord_json_writer::impl_location_to_json): Assert that we
4927         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
4928         wrapper around it.  Expand the location once, rather than three
4929         times.
4930         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
4931         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
4932         wrappers.
4933         (optrecord_json_writer::optinfo_to_json): Likewise, in four
4934         places.  Fix some overlong lines.
4936 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
4938         * config/aarch64/aarch64-simd.md
4939         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
4940         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
4941         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
4942         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
4943         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
4944         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
4945         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
4946         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
4947         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
4949 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
4951         PR middle-end/86627
4952         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
4953         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
4954         and abs_d == d, do the power of two handling if profitable.
4956 2018-07-24  Richard Biener  <rguenther@suse.de>
4958         * match.pd: Add BIT_FIELD_REF canonicalizations.
4960 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4962         PR c/86617
4963         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
4965 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4967         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
4968         terminated STRING_CST object.
4970 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4972         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
4974 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
4976         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
4977         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
4978         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
4979         the elements into a register.
4980         (rs6000_split_v4si_init_di_reg): Delete.
4981         (rs6000_split_v4si_init): Delete.
4982         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
4983         (vsx_init_v4si): Rewrite as a define_expand.
4985 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
4987         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
4988         zero_extend argument from memory): New.
4990 2018-07-22  Martin Sebor  <msebor@redhat.com>
4992         PR bootstrap/86621
4993         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
4994         diagnosing calls with unknown arguments unless -Walloca-larger-than
4995         is restricted to less than PTRDIFF_MAX bytes.
4997 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
4999         * doc/gcov.texi (Invoking Gcov): Editorial changes.
5001 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
5003         * pretty-print.c (text_info::set_location): Remove redundant
5004         "line_table" parameter from call to rich_location::set_range.
5006 2018-07-20  Martin Sebor  <msebor@redhat.com>
5008         PR middle-end/82063
5009         * builtins.c (expand_builtin_alloca): Adjust.
5010         * calls.c (alloc_max_size): Simplify.
5011         * cgraphunit.c (cgraph_node::expand): Adjust.
5012         * common.opt (larger_than_size, warn_frame_larger_than): Remove
5013         variables.
5014         (frame_larger_than_size): Same.
5015         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
5016         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
5017         Initialize.
5018         * doc/invoke.texi (GCC Command Options): Document option arguments.
5019         Explain byte-size arguments and suffixes.
5020         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
5021         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
5022         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
5023         * doc/options.texi (UInteger): Expand.
5024         (Host_Wide_Int, ByteSize): Document new properties.
5025         * final.c (final_start_function_1): Include sizes in an error message.
5026         * function.c (frame_offset_overflow): Same.
5027         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
5028         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
5029         Diagnose unbounded alloca calls only for limits of less than
5030         PTRDIFF_MAX.
5031         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
5032         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
5033         for alloca(0).
5034         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
5035         only for limits of less than PTRDIFF_MAX.
5036         * langhooks-def.h (lhd_handle_option): Change function argument
5037         to HOST_WIDE_INT.
5038         * langhooks.c (lhd_handle_option): Same.
5039         * langhooks.h (handle_option): Same.
5040         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
5041         ByteSize flags.
5042         (var_type, var_type_struct): Same.
5043         (var_set): Handle ByteSize flag.
5044         * optc-gen.awk: Add comments to output to ease debugging.  Make
5045         use of HOST_WIDE_INT where appropriate.
5046         * opts-gen-save.awk:  Use %lx to format unsigned long.
5047         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
5048         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
5049         arguments.  Parse bytes-size suffixes.
5050         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
5051         (enum_value_to_arg): Same.
5052         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
5053         (handle_option): Adjust.
5054         (generate_option): Change function argument to HOST_WIDE_INT.
5055         (cmdline_handle_error): Adjust.
5056         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
5057         (set_option): Change function argument to HOST_WIDE_INT.
5058         (option_enabled): Handle cl_host_wide_int.
5059         (get_option_state): Handle CLVC_SIZE.
5060         (control_warning_option): Same.
5061         * opts.c (common_handle_option): Change function argument to
5062         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
5063         OPT_Wvla_larger_than_.
5064         * opts.h (enum cl_var_type): Add an enumerator.
5065         * stor-layout.c (layout_decl): Print a more meaningful warning.
5066         * toplev.c (output_stack_usage): Adjust.
5068 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
5070         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
5071         call to inline_expand_builtin_string_cmp.
5072         (expand_builtin_strcmp): Likewise.
5073         (expand_builtin_strncmp): Likewise.
5074         (inline_string_cmp): Delete the last parameter, change char_type_node
5075         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
5076         two operands.
5077         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
5078         the inlining expansion on target where the type of the call has same or
5079         narrower precision than unsigned char.
5081 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
5083         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
5084         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
5085         * common.opt (fsave-optimization-record): New option.
5086         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
5087         * doc/invoke.texi (-fsave-optimization-record): New option.
5088         * dumpfile.c: Include "optinfo-emit-json.h".
5089         (struct kv_pair): Move to coretypes.h.
5090         (optgroup_options): Make non-static.
5091         (dump_context::end_scope): Call
5092         optimization_records_maybe_pop_dump_scope.
5093         * dumpfile.h (optgroup_options): New decl.
5094         * json.cc: New file.
5095         * json.h: New file.
5096         * optinfo-emit-json.cc: New file.
5097         * optinfo-emit-json.h: New file.
5098         * optinfo.cc: Include "optinfo-emit-json.h".
5099         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
5100         (optinfo_enabled_p): Check optimization_records_enabled_p.
5101         (optinfo_wants_inlining_info_p): Likewise.
5102         * optinfo.h: Update comment.
5103         * profile-count.c (profile_quality_as_string): New function.
5104         * profile-count.h (profile_quality_as_string): New decl.
5105         (profile_count::quality): New accessor.
5106         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
5107         and optinfo_emit_json_cc_tests.
5108         * selftest.h (selftest::json_cc_tests): New decl.
5109         (selftest::optinfo_emit_json_cc_tests): New decl.
5110         * toplev.c: Include "optinfo-emit-json.h".
5111         (compile_file): Call optimization_records_finish.
5112         (do_compile): Call optimization_records_start.
5113         * tree-ssa-live.c: Include optinfo.h.
5114         (remove_unused_scope_block_p): Retain inlining information if
5115         optinfo_wants_inlining_info_p returns true.
5117 2018-07-20  Richard Biener  <rguenther@suse.de>
5119         PR debug/86585
5120         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
5121         to cover -flto-partition=none.
5123 2018-07-20  Martin Liska  <mliska@suse.cz>
5125         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
5126         (get_decl_source_range): Remove unused function.
5128 2018-07-20  Richard Biener  <rguenther@suse.de>
5130         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
5131         (struct vn_phi_s): Likewise.
5132         (struct vn_reference_s): Likewise.
5133         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
5134         for searching the slot of an entry known to be in the hash itself.
5135         (vn_phi_hasher::equal): Likewise.
5136         (vn_reference_hasher::equal): Likewise.
5137         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
5138         globals.
5139         (optimistic_info, current_info): Remove, keeping only valid_info.
5140         (vn_reference_lookup_1): Remove fallback lookup.
5141         (vn_reference_lookup_2): Likewise.
5142         (vn_nary_op_lookup_1): Likewise.
5143         (vn_phi_lookup): Likewise.
5144         (vn_nary_build_or_lookup_1): Make sure to not chain the built
5145         hash element.
5146         (vn_reference_insert): Adjust, chain the inserted hash element
5147         at last_inserted_ref.
5148         (vn_reference_insert_pieces): Likewise.
5149         (visit_reference_op_call): Likewise.
5150         (vn_nary_op_insert_into): Chain the inserted hash element at
5151         last_inserted_nary.
5152         (vn_nary_op_insert_pieces): Adjust.
5153         (vn_nary_op_insert): Likewise.
5154         (vn_nary_op_insert_stmt): Likewise.
5155         (vn_phi_insert): Adjust, chain the inserted hash element at
5156         last_inserted_phi.
5157         (process_scc): Remove clearing and copying the optimistic
5158         table.  Instead remove elements inserted during an optimistic
5159         iteration from the single table we maintain.
5160         (init_scc_vn): Adjust.
5161         (free_scc_vn): Likewise.
5162         (sccvn_dom_walker::record_cond): Likewise.
5163         (sccvn_dom_walker::after_dom_children): Likewise.
5165 2018-07-19  Martin Sebor  <msebor@redhat.com>
5167         PR tree-optimization/84047
5168         PR tree-optimization/83776
5169         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
5170         (check_array_bounds): Call it.
5172 2018-07-19  Martin Sebor  <msebor@redhat.com>
5174         * align.h (align_flags): Use member initialization.
5176 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
5178         * Makefile.in (OBJS): Add optinfo.o.
5179         * coretypes.h (class symtab_node): New forward decl.
5180         (struct cgraph_node): New forward decl.
5181         (class varpool_node): New forward decl.
5182         * dump-context.h: New file.
5183         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
5184         "tree-pass.h".
5185         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
5186         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
5187         (set_alt_dump_file): Likewise.
5188         (dump_context::~dump_context): New dtor.
5189         (dump_gimple_stmt): Move implementation to...
5190         (dump_context::dump_gimple_stmt): ...this new member function.
5191         Add the stmt to any pending optinfo, creating one if need be.
5192         (dump_gimple_stmt_loc): Move implementation to...
5193         (dump_context::dump_gimple_stmt_loc): ...this new member function.
5194         Start a new optinfo and add the stmt to it.
5195         (dump_gimple_expr): Move implementation to...
5196         (dump_context::dump_gimple_expr): ...this new member function.
5197         Add the stmt to any pending optinfo, creating one if need be.
5198         (dump_gimple_expr_loc): Move implementation to...
5199         (dump_context::dump_gimple_expr_loc): ...this new member function.
5200         Start a new optinfo and add the stmt to it.
5201         (dump_generic_expr): Move implementation to...
5202         (dump_context::dump_generic_expr): ...this new member function.
5203         Add the tree to any pending optinfo, creating one if need be.
5204         (dump_generic_expr_loc): Move implementation to...
5205         (dump_context::dump_generic_expr_loc): ...this new member
5206         function.  Add the tree to any pending optinfo, creating one if
5207         need be.
5208         (dump_printf): Move implementation to...
5209         (dump_context::dump_printf_va): ...this new member function.  Add
5210         the text to any pending optinfo, creating one if need be.
5211         (dump_printf_loc): Move implementation to...
5212         (dump_context::dump_printf_loc_va): ...this new member function.
5213         Start a new optinfo and add the stmt to it.
5214         (dump_dec): Move implementation to...
5215         (dump_context::dump_dec): ...this new member function.  Add the
5216         value to any pending optinfo, creating one if need be.
5217         (dump_context::dump_symtab_node): New member function.
5218         (dump_context::get_scope_depth): New member function.
5219         (dump_context::begin_scope): New member function.
5220         (dump_context::end_scope): New member function.
5221         (dump_context::ensure_pending_optinfo): New member function.
5222         (dump_context::begin_next_optinfo): New member function.
5223         (dump_context::end_any_optinfo): New member function.
5224         (dump_context::s_current): New global.
5225         (dump_context::s_default): New global.
5226         (dump_scope_depth): Delete global.
5227         (dumpfile_ensure_any_optinfo_are_flushed): New function.
5228         (dump_symtab_node): New function.
5229         (get_dump_scope_depth): Reimplement in terms of dump_context.
5230         (dump_begin_scope): Likewise.
5231         (dump_end_scope): Likewise.
5232         (selftest::temp_dump_context::temp_dump_context): New ctor.
5233         (selftest::temp_dump_context::~temp_dump_context): New dtor.
5234         (selftest::verify_item): New function.
5235         (ASSERT_IS_TEXT): New macro.
5236         (ASSERT_IS_TREE): New macro.
5237         (ASSERT_IS_GIMPLE): New macro.
5238         (selftest::test_capture_of_dump_calls): New test.
5239         (selftest::dumpfile_c_tests): Call it.
5240         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
5241         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
5242         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
5243         descriptive comment.
5244         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
5245         (dump_node, dump_bb): Move these unrelated decls.
5246         (class dump_manager): Add leading comment.
5247         * optinfo.cc: New file.
5248         * optinfo.h: New file.
5250 2018-07-19  Michael Collison  <michael.collison@arm.com>
5251             Richard Henderson <rth@redhat.com>
5253         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
5254         (subti): Handle op1 zero.
5255         (subvti4, usub4ti4): New.
5256         (*sub<GPI>3_compare1_imm): New.
5257         (sub<GPI>3_carryinCV): New.
5258         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
5259         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
5261 2018-07-19  Michael Collison  <michael.collison@arm.com>
5262             Richard Henderson <rth@redhat.com>
5264         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
5265         (addti3): Create simpler code if low part is already known to be 0.
5266         (addvti4, uaddvti4): New.
5267         (*add<GPI>3_compareC_cconly_imm): New.
5268         (*add<GPI>3_compareC_cconly): New.
5269         (*add<GPI>3_compareC_imm): New.
5270         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
5271         handle constants within this pattern..
5272         (*add<GPI>3_compareV_cconly_imm): New.
5273         (*add<GPI>3_compareV_cconly): New.
5274         (*add<GPI>3_compareV_imm): New.
5275         (add<GPI>3_compareV): New.
5276         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
5277         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
5278         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
5279         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
5280         with 'comparison' operator.
5281         (*add<GPI>3_compareV_cconly_imm): Ditto.
5282         (*add<GPI>3_compareV_cconly): Ditto.
5283         (*add<GPI>3_compareV_imm): Ditto.
5284         (add<GPI>3_compareV): Ditto.
5285         (add<mode>3_carryinC): Ditto.
5286         (*add<mode>3_carryinC_zero): Ditto.
5287         (*add<mode>3_carryinC): Ditto.
5288         (add<mode>3_carryinV): Ditto.
5289         (*add<mode>3_carryinV_zero): Ditto.
5290         (*add<mode>3_carryinV): Ditto.
5292 2018-07-19  Michael Collison  <michael.collison@arm.com>
5293             Richard Henderson <rth@redhat.com>
5295         * config/aarch64/aarch64-modes.def (CC_V): New.
5296         * config/aarch64/aarch64-protos.h
5297         (aarch64_addti_scratch_regs): Declare
5298         (aarch64_subvti_scratch_regs): Declare.
5299         (aarch64_expand_subvti): Declare.
5300         (aarch64_gen_unlikely_cbranch): Declare
5301         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
5302         for signed overflow using CC_Vmode.
5303         (aarch64_get_condition_code_1): Handle CC_Vmode.
5304         (aarch64_gen_unlikely_cbranch): New function.
5305         (aarch64_addti_scratch_regs): New function.
5306         (aarch64_subvti_scratch_regs): New function.
5307         (aarch64_expand_subvti): New function.
5309 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5311         * config/aarch64/aarch64-option-extensions.def: New entry for profile
5312         extension.
5313         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
5314         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
5315         extension.
5317 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5319         PR target/83009
5320         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5321         address check not strict.
5323 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5325         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
5326         Umq with Umn.
5327         (store_pair_lanes<mode>): Likewise.
5328         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
5329         enum value 'ADDR_QUERY_LDP_STP_N'.
5330         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
5331         (aarch64_print_address_internal): Add declaration.
5332         (aarch64_print_ldpstp_address): Remove.
5333         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
5334         (aarch64_print_operand): Change printing of 'y'.
5335         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
5336         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
5337         'true' rather than '1'.
5338         * config/aarch64/constraints.md (Uml): Likewise.
5339         (Uml): Rename to Umn.
5340         (Umq): Remove.
5342 2018-07-19  Richard Biener  <rguenther@suse.de>
5344         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
5345         a trailing array.
5346         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
5347         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
5348         (vn_reference_hasher): Likewise.
5349         (struct vn_tables_s): Remove obstack and alloc-pool members.
5350         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
5351         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
5352         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
5353         (vn_reference_insert_pieces): Likewise.
5354         (alloc_vn_nary_op_noinit): Adjust.
5355         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
5356         (vn_phi_eq): Adjust.
5357         (shared_lookup_phiargs): Remove.
5358         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
5359         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
5360         (visit_reference_op_call): Likewise.
5361         (copy_nary, copy_phi, copy_reference): Remove.
5362         (process_scc): Rewind the obstack when iterating.  Do not
5363         copy the elements to valid_info but just move them from one
5364         hashtable to the other.
5365         (allocate_vn_table): Adjust.
5366         (free_vn_table): Likewise.
5367         (init_scc_vn): Likewise.
5368         (free_scc_vn): Likewise.
5370 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
5372         PR target/86560
5373         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
5374         indirect_return as function type attribute.
5375         (ix86_attribute_table): Change indirect_return to function
5376         type attribute.
5377         * doc/extend.texi: Update indirect_return attribute.
5379 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
5381         * wide-int.h (widest2_int): New.
5382         * gimple-fold.c (arith_overflowed_p): Use it.
5383         * tree.h (widest2_int_cst): New.
5384         * tree-vrp.c (wide_int_binop_overflow): Rename from
5385         vrp_int_const_binop.
5386         Rewrite to work on trees.
5387         (extract_range_from_multiplicative_op_1): Abstract code to...
5388         (wide_int_range_min_max): ...here.
5389         (wide_int_range_cross_product): ...and here.
5390         (extract_range_from_binary_expr_1): Abstract overflow code to...
5391         (wide_int_range_mult_wrapping): ...here.
5392         * tree-vrp.h (wide_int_range_cross_product): New.
5393         (wide_int_range_mult_wrapping): New.
5395 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
5396             Julia Koval  <julia.koval@intel.com>
5398         * config/i386/x86-tune-costs.h (skylake_memcpy,
5399         skylake_memset): Replace rep_prefix with unrolling for size 512.
5401 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
5403         PR middle-end/86544
5404         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
5405         comparision with EQ_EXPR in last stmt.
5407 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5409         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
5410         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
5411         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
5412         previously known as "PowerPC AltiVec Built-in Functions".  Move
5413         some material to new subsubsections "PowerPC AltiVec Built-in
5414         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
5415         ISA 2.07".
5416         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
5417         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
5418         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
5419         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
5421 2018-07-18  Richard Biener  <rguenther@suse.de>
5423         PR tree-optimization/86557
5424         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
5425         EXACT_DIV_EXPR.
5427 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
5429         * config/s390/s390.c (s390_function_profiler): Generate CFI.
5431 2018-07-17  Jeff Law  <law@redhat.com>
5433         * config/arm/arm.c (get_label_padding): Update for recent
5434         changes to label_to_alignment.
5436         PR tree-optimization/86010
5437         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
5439         * config/mips/mips.c (vr4130_align_insns): Update for recent
5440         changes to label_to_alignment.
5442         * config/frv/frv.c (frv_label_align): Update for recent changes
5443         to label_to_alignment.
5445         * config/nios2/nios2.c (nios2_label_align): Update for recent
5446         changes which dropped ALIGN_LABELS_LOG.
5448 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
5450         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
5451         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
5453 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
5455         * config/arc/arc.c (arc_label_align): Use align_labels instead of
5456         deprecated align_labels_log.
5458 2018-07-17  Richard Biener  <rguenther@suse.de>
5460         PR lto/86456
5461         * dwarf2out.c (init_sections_and_labels): Always generate
5462         a debug_line_str_section for early LTO debug.
5463         (dwarf2out_finish): Reset debug_line_str_hash output early.
5464         Bump counter for extra dwarf5 .debug_loc labels to not conflict
5465         with fat LTO part.
5466         (dwarf2out_early_finish): Output debug_line_str.
5468 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
5470         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
5471         index register on z196 or later.
5473 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
5475         * config/s390/s390.c (s390_default_align): Set default function
5476         alignment to 16.
5477         (s390_override_options_after_change): Call s390_default align.
5478         (s390_option_override_internal): Call s390_default_align.
5479         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
5481 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
5483         PR middle-end/86542
5484         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
5485         to _looptemp_ clauses, other than the first two.
5487 2018-07-17  Martin Liska  <mliska@suse.cz>
5489         * opts.c: Do not enable OPT_falign_* for -Os.
5491 2018-07-17  Martin Liska  <mliska@suse.cz>
5493         * align.h (MAX_CODE_ALIGN): New.
5494         (MAX_CODE_ALIGN_VALUE): New.
5495         * common/config/i386/i386-common.c (ix86_handle_option):
5496         (MAX_CODE_ALIGN): Moved to align.h.
5497         * final.c (MAX_CODE_ALIGN): Likewise.
5498         * opts.c (parse_and_check_align_values):
5499         (MAX_CODE_ALIGN): Likewise.
5500         (MAX_CODE_ALIGN_VALUE): Likewise.
5502 2018-07-17  Martin Liska  <mliska@suse.cz>
5504         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
5505         in order to fulfil coding style.
5506         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
5507         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5508         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5509         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
5510         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
5511         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
5512         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
5513         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
5514         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5516 2018-07-17  Martin Liska  <mliska@suse.cz>
5518         * align.h: New file.
5519         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
5520         directly.
5521         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
5522         align_flags of label_to_alignment.
5523         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
5524         align_flags class.
5525         * config/m68k/m68k.c: Do not use removed align_labels_value and
5526         align_loops_value.
5527         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
5528         (LOOP_ALIGN): Likewise.
5529         (LABEL_ALIGN): Likewise.
5530         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5531         Remove not used macro.
5532         (rs6000_loop_align): Change return type to align_flags.
5533         (rs6000_loop_align_max_skip): Remove.
5534         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
5535         Change return type to align_flags.
5536         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5537         Remove not used macro.
5538         (rs6000_loop_align):  Change return type to align_flags.
5539         (rs6000_loop_align_max_skip): Remove.
5540         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
5541         * config/rx/rx-protos.h (rx_align_for_label): Make it
5542         static function.
5543         * config/rx/rx.c (rx_align_for_label): Change return type
5544         to align_flags.
5545         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
5546         macro definitions.
5547         into align_flags class.
5548         (LABEL_ALIGN): Likewise.
5549         (LOOP_ALIGN): Likewise.
5550         * config/s390/s390.c (s390_label_align): Use align_flags
5551         class member.
5552         (s390_asm_output_function_label): Likewise.
5553         * config/sh/sh.c (sh_override_options_after_change):
5554         Use align_flags class directly without macros.
5555         (find_barrier): Likewise.
5556         (barrier_align): Likewise.
5557         (sh_loop_align): Likewise.
5558         * config/spu/spu.c (spu_option_override):
5559         Use align_flags_tuple::get_value instead of removed macros.
5560         (spu_sched_init): Likewise.
5561         * config/spu/spu.h (GTY): Likewise.
5562         * config/visium/visium.c (visium_option_override):
5563         Set "8" as default secondary alignment.
5564         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
5565         in order to guarantee secondary alignment of 8.
5566         * coretypes.h: Include align.h header file.
5567         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
5568         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
5569         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
5570         * doc/tm.texi.in: Likewise.
5571         * final.c (struct label_alignment): Remove not used structure.
5572         (LABEL_ALIGN): Change type to align_flags.
5573         (LOOP_ALIGN): Likewise.
5574         (JUMP_ALIGN): Likewise.
5575         (default_loop_align_max_skip): Remove.
5576         (default_label_align_max_skip): Likewise.
5577         (default_jump_align_max_skip): Likewise.
5578         (default_label_align_after_barrier_max_skip):
5579         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
5580         (LABEL_TO_MAX_SKIP): Remove.
5581         (label_to_alignment): Return align_flags type instead of integer.
5582         (label_to_max_skip): Remove.
5583         (align_fuzz): Use align_flags type.
5584         (compute_alignments): Use align_flags type and use align_flags::max
5585         to combine multiple alignments.
5586         (grow_label_align): Grow vec instead of C array.
5587         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
5588         (shorten_branches):  Use align_flags type and use align_flags::max
5589         to combine multiple alignments.
5590         (final_scan_insn_1): Remove usage of secondary alignment that comes
5591         from label alignment, but instead use proper secondary alignment
5592         which is computed in grow_label_align.
5593         * flags.h (struct align_flags_tuple): Move to align.h.
5594         (struct align_flags): Likewise.
5595         (state_align_loops): Rename to align_loops.
5596         (state_align_jumps): Rename to align_jumps.
5597         (state_align_labels): Rename to align_labels.
5598         (state_align_functions): Rename to align_functions.
5599         (align_loops_log): Remove.
5600         (align_jumps_log): Remove.
5601         (align_labels_log): Remove.
5602         (align_functions_log): Remove.
5603         (align_loops_max_skip): Remove.
5604         (align_jumps_max_skip): Remove.
5605         (align_labels_max_skip): Remove.
5606         (align_functions_max_skip): Remove.
5607         (align_loops_value): Remove.
5608         (align_jumps_value): Remove.
5609         (align_labels_value): Remove.
5610         (align_functions_value): Remove.
5611         * output.h (label_to_alignment): Change return type to align_flags.
5612         (label_to_max_skip): Remove.
5613         * target.def: Remove loop_align_max_skip, label_align_max_skip,
5614         jump_align_max_skip macros.
5615         * targhooks.h (default_loop_align_max_skip): Remove.
5616         (default_label_align_max_skip): Likewise.
5617         (default_jump_align_max_skip): Likewise.
5618         (default_label_align_after_barrier_max_skip): Remove.
5619         * toplev.c (read_log_maxskip): Use ::normalize function.
5620         (parse_N_M): Remove not used argument and also call ::normalize.
5621         (parse_alignment_opts): Do not pass unused arguments.
5622         * varasm.c (assemble_start_function): Use directly align_functions
5623         instead of removed macros.
5624         * system.h: Do not poison removed macros.
5626 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
5628         PR middle-end/86539
5629         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
5630         and cond temporaries don't have reference type if iterator has
5631         pointer type.  For init use &for_pre_body instead of pre_p if
5632         for_pre_body is non-empty.
5634 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
5636         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
5637         double-double modes to SFmode directly directly.
5638         (trunc<mode>sf2_fprs): Delete.
5640 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
5642         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
5643         for conversions between IFmode and the decimal floating point modes.
5644         (init_float128_ieee): Use the correct names for conversions between
5645         KFmode and the decimal floating point modes.
5647 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
5649         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
5650         for the conversions between TDmode and IFmode.
5651         (init_float128_ieee): Use more correct names for the conversions
5652         between TDmode and KFmode.
5654 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
5656         PR tree-optimization/86526
5657         * builtins.c (expand_builtin_memcmp): Formatting fixes.
5658         (inline_expand_builtin_string_cmp): Likewise.
5659         (inline_string_cmp): Likewise.  Use c_readstr instead of
5660         builtin_memcpy_read_str.  Add unit_mode temporary.
5662 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5664         PR middle-end/86528
5665         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
5666         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
5668 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5670         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
5671         Alphabetize prototypes of built-in functions, separating out
5672         built-in functions that are listed in this section but should be
5673         described elsewhere.
5675 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
5677         PR target/86511
5678         * expmed.c (emit_store_flag): Do not emit setcc followed by a
5679         conditional move when trapping comparison was split to a
5680         non-trapping one (and vice versa).
5682 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
5684         * config/s390/s390.c (s390_function_profiler): Generate nops
5685         instead of profiler call sequences.
5686         * config/s390/s390.opt: Add the new option.
5688 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
5690         * config/s390/s390.c (s390_function_profiler): Generate
5691         __mcount_loc section.
5692         * config/s390/s390.opt: Add the new option.
5694 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
5696         * common.opt: Add the new warning.
5697         * config/s390/s390.c (s390_function_profiler): Emit "brasl
5698         %r0,__fentry__" when -mfentry is specified.
5699         (s390_option_override_internal): Disallow -mfentry for 31-bit
5700         CPUs.
5701         * config/s390/s390.opt: Add the new option.
5703 2018-07-16  Richard Biener  <rguenther@suse.de>
5705         PR lto/86523
5706         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
5707         for function-local FUNCTION_DECL and RESULT_DECL immediately.
5709 2018-07-16  Martin Liska  <mliska@suse.cz>
5711         PR ipa/86529
5712         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
5713         to ::get_create.
5715 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
5717         * config/arc/arcHS.md: Update ARCHS scheduling rules.
5719 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
5721         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
5722         for ARCHS4x.
5723         * config/arc/arc-cpus.def (hs4x): New cpu.
5724         (hs4xd): Likewise.
5725         * config/arc/arc-tables.opt: Regenerate.
5726         * config/arc/arc.c (arc_sched_issue_rate): New function.
5727         (TARGET_SCHED_ISSUE_RATE): Define.
5728         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
5729         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
5730         fpu_cvt.
5731         (attr tune): Add ARCHS4x tune values.
5732         (attr tune_dspmpy): Define.
5733         (*tst): Correct instruction type.
5734         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
5735         * config/arc/arcHS4x.md: New file.
5736         * config/arc/fpu.md: Update instruction type attributes.
5737         * config/arc/t-multilib: Regenerate.
5739 2018-07-16  Tom de Vries  <tdevries@suse.de>
5741         PR debug/86455
5742         * var-tracking.c (vt_initialize): Fix pre_dec handling.
5744 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
5746         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
5747         early clobber.
5749 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
5751         PR tree-optimization/86514
5752         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
5753         conversion to a boolean type from a type with greater precision.
5755 2018-07-16  Tom de Vries  <tdevries@suse.de>
5757         * var-tracking.c (vt_initialize): Print adjusted insn slim if
5758         dump_flags request TDF_SLIM.
5760 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
5762         * fold-const.c (int_const_binop_1): Abstract...
5763         (wide_int_binop): ...wide int code here.
5764         (poly_int_binop): ...poly int code here.
5765         Abstract the rest of int_const_binop_1 into int_const_binop.
5766         * fold-const.h (wide_int_binop): New.
5767         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
5768         Remove useless PLUS/MINUS_EXPR case.
5769         (zero_nonzero_bits_from_vr): Move wide int code...
5770         (zero_nonzero_bits_from_bounds): ...here.
5771         (extract_range_from_binary_expr_1): Move mask optimization code...
5772         (range_easy_mask_min_max): ...here.
5773         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
5774         (range_easy_mask_min_max): New.
5776 2018-07-15  Jeff Law  <law@redhat.com>
5778         PR target/85993
5779         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
5780         block.
5782 2018-07-14  Jim Wilson  <jimw@sifive.com>
5784         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
5786 2018-07-14  Paul Koning  <ni1d@arrl.net>
5788         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
5790 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
5792         * lto-streamer-out.c (copy_function_or_variable): Dump info about
5793         copying section.
5795 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
5796             Steve Munroe  <munroesj52@gmail.com>
5798         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
5799         (_mm_andnot_si128): Likewise.
5800         (_mm_or_si128): Likewise.
5801         (_mm_xor_si128): Likewise.
5803 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
5805         PR middle-end/78809
5806         * builtins.c (expand_builtin_memcmp): Inline the calls first
5807         when result_eq is false.
5808         (expand_builtin_strcmp): Inline the calls first.
5809         (expand_builtin_strncmp): Likewise.
5810         (inline_string_cmp): New routine. Expand a string compare
5811         call by using a sequence of char comparison.
5812         (inline_expand_builtin_string_cmp): New routine. Inline expansion
5813         a call to str(n)cmp/memcmp.
5814         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
5815         New option.
5816         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
5818 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
5820         * config/arm/driver-arm.c: Include arm-native.h.
5821         (host_detect_local_cpu): Use auto-generated data tables.
5822         (vendors, arm_cpu_table): Delete.  Move part information to ...
5823         * config/arm/arm-cpus.in: ... here.
5824         * config/arm/parsecpu.awk (gen_native): New function.
5825         (vendor, part): New CPU fields.
5826         (END): Add support for building the native CPU detection tables.
5827         * config/arm/t-arm (arm-native.h): Add build rule.
5828         (driver-arm.o): Add dependency on arm-native.h.
5830 2018-07-13  Richard Biener  <rguenther@suse.de>
5832         PR middle-end/85974
5833         * match.pd (addr1 - addr2): Allow either of the operand to
5834         have a conversion.
5836 2018-07-13  Tom de Vries  <tdevries@suse.de>
5838         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
5839         in remap_ssa_name.
5841 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
5843         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
5844         arrays instead of numbered variables.
5846 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
5848         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
5849         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
5851 2018-07-13  Richard Biener  <rguenther@suse.de>
5853         PR debug/86452
5854         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
5855         instead of get_context_die.
5857 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
5858             Richard Biener  <rguenther@suse.de>
5860         PR middle-end/86489
5861         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
5862         that the loop latch destination where phi is defined.
5864 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
5866         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
5867         (riscv_expand_epilogue): Add assertion to check interrupt mode.
5868         (riscv_set_current_function): Extract getting interrupt type to new
5869         function.
5870         (riscv_get_interrupt_type): New function.
5871         (riscv_merge_decl_attributes): New function, checking interrupt type is
5872         same.
5873         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
5875 2018-07-12  Paul Koning  <ni1d@arrl.net>
5877         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
5878         directive.
5880 2018-07-12  Paul Koning  <ni1d@arrl.net>
5882         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
5883         zero reference, add doloop_end instead.
5884         * doc/md.texi (decrement_and_branch_until_zero): Remove.
5885         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
5886         detail for doloop_end.
5888 2018-07-12  Martin Sebor  <msebor@redhat.com>
5890         PR c/86453
5891         * attribs.c (decl_attributes): Reject conflicting attributes before
5892         calling attribute handlers.
5894 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
5896         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
5897          parameter.
5898         (gcc::dump_manager::get_dump_file_name): likewise.
5899         (dump_begin): Likewise.
5900         * dumpfile.h (dump_begin): Update prototype.
5901         (gcc::dump_manager::get_dump_file_name,
5902         gcc::dump_manager::get_dump_file_name): Update prototype.
5904 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
5906         * internal-fn.h (vectorizable_internal_fn_p): New function.
5907         * tree-vect-slp.c (compatible_calls_p): Likewise.
5908         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
5909         to internal functions.
5910         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
5912 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
5914         * fold-const.h (inverse_conditions_p): Declare.
5915         * fold-const.c (inverse_conditions_p): New function.
5916         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
5917         that test the inverse condition of a conditional internal function.
5918         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
5919         * internal-fn.c (internal_fn_mask_index): Handle conditional
5920         internal functions.
5921         (vectorized_internal_fn_supported_p): New function.
5922         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
5923         (any_pred_load_store): Replace with...
5924         (need_to_predicate): ...this new variable.
5925         (redundant_ssa_names): New variable.
5926         (ifcvt_can_use_mask_load_store): Move initial checks to...
5927         (ifcvt_can_predicate): ...this new function.  Handle tree codes
5928         for which a conditional internal function exists.
5929         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
5930         instead of ifcvt_can_use_mask_load_store.  Update after variable
5931         name change.
5932         (predicate_load_or_store): New function, split out from
5933         predicate_mem_writes.
5934         (check_redundant_cond_expr): New function.
5935         (value_available_p): Likewise.
5936         (predicate_rhs_code): Likewise.
5937         (predicate_mem_writes): Rename to...
5938         (predicate_statements): ...this.  Use predicate_load_or_store
5939         and predicate_rhs_code.
5940         (combine_blocks, tree_if_conversion): Update after above name changes.
5941         (ifcvt_local_dce): Handle redundant_ssa_names.
5942         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
5943         general conditional functions.
5944         * tree-vect-stmts.c (vectorizable_call): Likewise.
5946 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
5947             Alan Hayward  <alan.hayward@arm.com>
5948             David Sherwood  <david.sherwood@arm.com>
5950         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
5951         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
5952         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
5953         plus and minus and convert them into IFN_COND_FMA-based sequences.
5954         (convert_mult_to_fma): Handle conditional plus and minus.
5956 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
5958         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
5959         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
5960         (cond_fnms_optab): New optabs.
5961         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
5962         internal functions.
5963         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
5964         * internal-fn.h (get_conditional_internal_fn): Declare.
5965         (get_unconditional_internal_fn): Likewise.
5966         * internal-fn.c (cond_ternary_direct): New macro.
5967         (expand_cond_ternary_optab_fn): Likewise.
5968         (direct_cond_ternary_optab_supported_p): Likewise.
5969         (FOR_EACH_COND_FN_PAIR): Likewise.
5970         (get_conditional_internal_fn): New function.
5971         (get_unconditional_internal_fn): Likewise.
5972         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
5973         (gimple_match_op::gimple_match_op): Add a new overload for 5
5974         operands.
5975         (gimple_match_op::set_op): Likewise.
5976         (gimple_resimplify5): Declare.
5977         * genmatch.c (decision_tree::gen): Generate simplifications for
5978         5 operands.
5979         * gimple-match-head.c (gimple_simplify): Define an overload for
5980         5 operands.  Handle calls with 5 arguments in the top-level overload.
5981         (convert_conditional_op): Handle conversions from unconditional
5982         internal functions to conditional ones.
5983         (gimple_resimplify5): New function.
5984         (build_call_internal): Pass a fifth operand.
5985         (maybe_push_res_to_seq): Likewise.
5986         (try_conditional_simplification): Try converting conditional
5987         internal functions to unconditional internal functions.
5988         Handle 3-operand unconditional forms.
5989         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
5990         Define ternary equivalents of the current rules for binary conditional
5991         internal functions.
5992         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
5993         ternary operations.
5994         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
5995         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
5996         (optab): Handle them.
5997         (SVE_COND_FP_TERNARY): New int iterator.
5998         (sve_fmla_op, sve_fmad_op): New int attributes.
5999         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
6000         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
6001         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
6003 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
6005         * target.def (preferred_else_value): New target hook.
6006         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
6007         * doc/tm.texi: Regenerate.
6008         * targhooks.h (default_preferred_else_value): Declare.
6009         * targhooks.c (default_preferred_else_value): New function.
6010         * internal-fn.h (conditional_internal_fn_code): Declare.
6011         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
6012         (get_conditional_internal_fn): Use it.
6013         (conditional_internal_fn_code): New function.
6014         * gimple-match.h (gimple_match_cond): New struct.
6015         (gimple_match_op): Add a cond member function.
6016         (gimple_match_op::gimple_match_op): Update all forms to take a
6017         gimple_match_cond.
6018         * genmatch.c (expr::gen_transform): Use the same condition as res_op
6019         for the suboperation, but don't specify a particular else_value.
6020         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
6021         (visit_nary_op, visit_reference_op_load): Pass
6022         gimple_match_cond::UNCOND to the gimple_match_op constructor.
6023         * gimple-match-head.c: Include tree-eh.h
6024         (convert_conditional_op): New function.
6025         (maybe_resimplify_conditional_op): Likewise.
6026         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
6027         (gimple_resimplify2): Likewise.
6028         (gimple_resimplify3): Likewise.
6029         (gimple_resimplify4): Likewise.
6030         (maybe_push_res_to_seq): Return null for conditional operations.
6031         (try_conditional_simplification): New function.
6032         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
6033         constructor.
6034         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
6035         IFN_COND_* call.
6036         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
6037         function.
6038         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
6040 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
6042         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
6043         DECL_FCONTEXT
6044         (hash_tree): Do not hash DECL_FCONTEXT
6045         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
6046         Do not stream DECL_FCONTEXT.
6047         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
6048         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
6050 2018-07-12  Richard Biener  <rguenther@suse.de>
6052         PR debug/86462
6053         * dwarf2out.c (gen_block_die): Only output blocks when they have
6054         at least one !DECL_IGNORED_P variable.
6056 2018-07-12  Richard Biener  <rguenther@suse.de>
6058         PR target/84829
6059         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
6060         Remove -mieee-fp handling.
6062 2018-07-12  Richard Biener  <rguenther@suse.de>
6064         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
6065         left-over from last patch.
6067 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
6069         PR tree-optimization/86492
6070         * gimple-ssa-store-merging.c
6071         (imm_store_chain_info::coalesce_immediate_stores): Call
6072         check_no_overlap even for the merge_overlapping case.  Formatting fix.
6074 2018-07-12  Richard Biener  <rguenther@suse.de>
6076         PR middle-end/86479
6077         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
6078         move possibly trapping operations into the conditional.
6080 2018-07-12  Richard Biener  <rguenther@suse.de>
6082         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
6083         (vn_lookup_simplify_result): Remove recursion limit applied
6084         here.
6085         (vn_nary_build_or_lookup_1): Adjust.
6086         (try_to_simplify): Likewise.
6087         * gimple-match-head.c (gimple_resimplify1): Instead apply one
6088         here.
6089         (gimple_resimplify2): Likewise.
6090         (gimple_resimplify3): Likewise.
6091         (gimple_resimplify4): Likewise.
6093 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
6095         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
6096         Use __mmask64 type instead of __mmask8 for __M argument.
6097         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
6098         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
6099         __U argument.
6100         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
6101         __mmask16 for __M argument.
6102         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
6103         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
6104         to __mmask16 instead of __mmask8.
6105         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
6106         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
6107         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
6108         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
6109         instead of __mmask16 for __U argument.
6110         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
6111         __mmask16 instead of __mmask8 for __U argument.
6112         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
6113         __U argument.
6114         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
6115         __mmask16.
6116         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
6117         argument.
6118         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
6119         __U argument.
6120         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
6121         __mmask16.
6122         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
6123         of __mmask16.
6124         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
6125         __U argument.
6126         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
6127         __U argument.
6128         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
6129         __U argument.
6130         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
6131         __U argument.
6132         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
6133         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
6134         return type as well as __M argument type and all casts from __mmask8
6135         to __mmask32.
6136         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
6137         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
6138         return type as well as __M argument type and all casts from __mmask8
6139         to __mmask16.
6140         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
6141         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
6142         return type as well as __M argument type and all casts from __mmask8
6143         to __mmask32.
6144         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
6145         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
6146         return type as well as __M argument type and all casts from __mmask8
6147         to __mmask16.
6148         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
6149         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
6150         __mmask16.
6152 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
6154         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
6155         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
6156         for __U argument.
6158 2018-07-11  Paul Koning  <ni1d@arrl.net>
6160         * doc/md.texi (define_subst): Document how multiple occurrences of
6161         the same argument in the replacement pattern are handled.
6163 2018-07-11  Paul Koning  <ni1d@arrl.net>
6165         * doc/extend.texi (Common Variable Attributes): Move "mode" into
6166         alphabetical order.
6167         (Common Type Attributes): Add "mode" attribute.
6169 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
6171         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
6172         stream DECL_ORIGINAL_TYPE.
6173         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
6174         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
6175         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
6176         Do not walk original type.
6177         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
6178         external decls.
6179         (write_ts_decl_non_common_tree_pointers): Do not stream
6180         DECL_ORIGINAL_TYPE
6181         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
6182         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
6184 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
6186         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
6187         thread twice from the same starting edge.
6189 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
6191         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
6192         * gimple.c (gimple_call_nonnull_result_p): ...here...
6193         (gimple_call_nonnull_arg): ...and here.
6194         * gimple.h (gimple_call_nonnull_result_p): New.
6195         (gimple_call_nonnull_arg): New.
6197 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
6199         * config/arm/arm-cpus.in: Move information from fpu field of each
6200         cpu definition to the isa field.
6201         * config/arm/parsecpu.awk (fpu): Delete match rule.
6202         (gen_comm_data): Don't add bits from the CPU's FPU entry.
6204 2018-07-11  Richard Biener  <rguenther@suse.de>
6206         PR debug/86457
6207         * dwarf2out.c (init_sections_and_labels): Use
6208         output_asm_line_debug_info consistently.
6209         (dwarf2out_early_finish): Likewise.
6210         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
6211         type units.
6213 2018-07-11  Richard Biener  <rguenther@suse.de>
6215         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
6216         Rework father_bb setting in a way to avoid propagating constants
6217         multiple times on a loop body.
6219 2018-07-10  Mark Wielaard  <mark@klomp.org>
6221         PR debug/86459
6222         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
6224 2018-07-10  Richard Biener  <rguenther@suse.de>
6226         * hash-map.h (hash_map::iterator::operator*): Return
6227         references to key and value.
6229 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
6231         PR c++/86443
6232         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
6233         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
6234         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
6235         (gimplify_omp_for): For composite loops, move outer
6236         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
6237         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
6238         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
6239         TREE_LIST for both the original class iterator and the "last" helper
6240         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
6241         loop, remember has_decl_expr from outer composite loops for the
6242         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
6244 2018-07-09  Martin Sebor  <msebor@redhat.com>
6246         PR middle-end/77357
6247         PR middle-end/86428
6248         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
6249         accessing implicitly initialized array elements.
6250         * expr.c (string_constant): Handle string initializers of
6251         character arrays within aggregates.
6252         * gimple-fold.c (fold_array_ctor_reference): Add argument.
6253         Store element offset.  As a special case, handle zero size.
6254         (fold_nonarray_ctor_reference): Same.
6255         (fold_ctor_reference): Add argument.  Store subobject offset.
6256         * gimple-fold.h (fold_ctor_reference): Add argument.
6258 2018-07-09  Paul Koning  <ni1d@arrl.net>
6260         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
6261         (pdp11_insn_cost): New function.
6262         (pdp11_md_asm_adjust): New function.
6263         (TARGET_INVALID_WITHIN_DOLOOP): Define.
6264         (pdp11_rtx_costs): Update to match machine better.
6265         (output_addr_const_pdp11): Correct format mismatch warnings.
6266         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
6267         * config/pdp11/pdp11.md: General change to add base_cost and/or
6268         length attributes for use by new pdp11_insn_cost function.
6269         (MIN_BRANCH): Correct definition.
6270         (MIN_SOB): Ditto.
6271         (doloop_end): Use standard pattern name for looping pattern.
6272         (doloop_end_nocc): New.
6273         (movsf): Add another constraint alternative.
6274         (zero_extendqihi2): Add constraint alternatives for not in place
6275         extend.
6276         (zero_extendhisi2): Remove.
6277         (shift patterns): Add CC handling variants.
6278         (bswaphi2): New.
6279         (bswapsi2): New.
6280         (rothi3): New.
6281         (define_peephole2): New peephole to recognize mov that sets CC for
6282         subsequent test.
6284 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6286         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
6287         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
6288         wi::add.
6290 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
6292         PR c/86420
6293         * real.c (real_nextafter): Return true if result is denormal.
6295 2018-07-09  Martin Liska  <mliska@suse.cz>
6297         * common.opt: Add back wrongly removed attribute.
6299 2018-07-09  Richard Biener  <rguenther@suse.de>
6301         PR debug/86413
6302         * dwarf2out.c (gen_block_die): For an early generated DIE
6303         always output high/low PC attributes.
6305 2018-07-09  Tom de Vries  <tdevries@suse.de>
6307         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
6308         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
6309         onto VAR_DECL with abstract origin.
6311 2018-07-07  Jim Wilson  <jimw@sifive.com>
6313         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
6315 2018-07-07  Tom de Vries  <tdevries@suse.de>
6317         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
6319 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
6321         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
6322         overflow_type.
6323         (combine_bound): Use wide-int overflow calculation instead of
6324         rolling our own.
6325         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
6326         overflow_type.
6327         * fold-const.c (int_const_binop_2): Same.
6328         (extract_muldiv_1): Same.
6329         (fold_div_compare): Same.
6330         (fold_abs_const): Same.
6331         * match.pd: Same.
6332         * poly-int.h (add): Same.
6333         (sub): Same.
6334         (neg): Same.
6335         (mul): Same.
6336         * predict.c (predict_iv_comparison): Same.
6337         * profile-count.c (slow_safe_scale_64bit): Same.
6338         * simplify-rtx.c (simplify_const_binary_operation): Same.
6339         * tree-chrec.c (tree_fold_binomial): Same.
6340         * tree-data-ref.c (split_constant_offset_1): Same.
6341         * tree-if-conv.c (idx_within_array_bound): Same.
6342         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
6343         * tree-ssa-phiopt.c (minmax_replacement): Same.
6344         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
6345         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
6346         * vr-values.c (vr_values::adjust_range_with_scev): Same.
6347         * wide-int.cc (wi::add_large): Same.
6348         (wi::mul_internal): Same.
6349         (wi::sub_large): Same.
6350         (wi::divmod_internal): Same.
6351         * wide-int.h: Change overflow type to overflow_type for neg, add,
6352         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
6353         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
6354         mul_internal, divmod_internal.
6355         (overflow_type): New enum.
6356         (accumulate_overflow): New.
6358 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
6360         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
6361         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
6363 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
6365         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
6366         argument is checked for zero before entering loop, avoid checking again.
6368 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
6370         * gimplify.h (generic_expr_could_trap_p): Set as global function.
6371         * gimplify.h (generic_expr_could_trap_p): Likwise.
6372         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
6374 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
6376         PR tree-optimization/86401
6377         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
6378         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
6379         (fold_bit_and_mask): ... here.  New helper function for match.pd.
6380         * fold-const.h (fold_bit_and_mask): Declare.
6381         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
6383 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
6385         PR target/86324
6386         * target.def (translate_mode_attribute): New hook.
6387         * targhooks.h (default_translate_mode_attribute): Declare.
6388         * targhooks.c (default_translate_mode_attribute): New function.
6389         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
6390         * doc/tm.texi: Regenerate.
6391         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
6392         (rs6000_translate_mode_attribute): New function.
6394 2018-07-06  Paul Koning  <ni1d@arrl.net>
6396         * doc/md.texi (define_split): Document DONE and FAIL.
6397         (define_peephole2): Ditto.
6399 2018-07-05  Jeff Law  <law@redhat.com>
6401         PR tree-optimization/86010
6402         * tree-ssa-dse.c (compute_trims): More aggressively trim at
6403         both the head and tail of mem* and str* calls.
6405 2018-07-05  Jim Wilson  <jimw@sifive.com>
6407         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
6409 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
6411         * config/aarch64/aarch64-simd.md: correct flags text for
6412         MIN_EXPR replacement.
6414 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
6416         * configure: Regenerated.
6418 2018-07-05  Carl Love  <cel@us.ibm.com>
6420         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
6421         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
6422         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
6423         VSX_BUILTIN_DOUBLEL_V4SF.
6425 2018-07-05  Martin Sebor  <msebor@redhat.com>
6427         PR c++/86400
6428         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
6429         than its domain to compute its the upper bound of a char array.
6431 2018-07-05  Nathan Sidwell  <nathan@acm.org>
6433         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
6434         * doc/cpp.texi: Update comment.
6435         * doc/tm.texi: Rebuilt.
6436         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
6437         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
6438         * doc/extend.texi (Backwards Compatibility): Clarify it is system
6439         headers affected by extern "C".
6440         * system.h: Poison NO_IMPLICIT_EXTERN_C.
6441         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
6442         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
6443         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
6444         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
6445         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
6446         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
6447         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
6448         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
6449         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
6450         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
6451         config/sparc/sp64-elf.h, config/spu/spu.h,
6452         config/stormy16/stormy16.h, config/v850/v850.h,
6453         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
6454         define NO_IMPLICIT_EXTERN_C.
6455         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
6457 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
6459         PR target/84711
6460         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
6461         instead of GET_MODE_SIZE when comparing Units.
6463 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
6465         PR target/84711
6466         * rtlanal.c (set_noop_p): Constrain on mode change,
6467         include hard-reg-set.h
6469 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
6471         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
6473 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
6475         Revert
6476         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
6478         PR sanitizer/84250
6479         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6480         libasan.
6481         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6483 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
6485         PR sanitizer/84250
6486         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6487         libasan.
6488         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6490 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
6492         PR middle-end/86380
6493         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
6495 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
6497         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
6498         neg_*_op* variables.
6500 2018-07-04  Martin Liska  <mliska@suse.cz>
6502         * tree-switch-conversion.c: Define
6503         max_ratio_for_speed and max_ratio_for_size constants.
6505 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
6506             Martin Liska  <mliska@suse.cz>
6508         PR middle-end/66240
6509         PR target/45996
6510         PR c/84100
6511         * common.opt: Rename align options with 'str_' prefix.
6512         * common/config/i386/i386-common.c (set_malign_value): New
6513         function.
6514         (ix86_handle_option): Use it to set -falign-* options/
6515         * config/aarch64/aarch64-protos.h (struct tune_params): Change
6516         type from int to string.
6517         * config/aarch64/aarch64.c: Update default values from int
6518         to string.
6519         * config/alpha/alpha.c (alpha_override_options_after_change):
6520         Likewise.
6521         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
6522         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6523         max skip conditionally.
6524         * config/i386/freebsd.h (SUBALIGN_LOG): New.
6525         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6526         max skip conditionally.
6527         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6528         max skip conditionally.
6529         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
6530         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6531         max skip conditionally.
6532         * config/i386/i386.c (struct ptt): Change type from int to
6533         string.
6534         (ix86_default_align): Set default values.
6535         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
6536         max skip conditionally.
6537         * config/i386/iamcu.h (SUBALIGN_LOG): New.
6538         (ASM_OUTPUT_MAX_SKIP_ALIGN):
6539         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
6540         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6541         max skip conditionally.
6542         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
6543         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
6544         * config/i386/x86-64.h (SUBALIGN_LOG): New.
6545         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6546         max skip conditionally.
6547         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6548         * config/ia64/ia64.c (ia64_option_override): Set default values
6549         for alignment options.
6550         * config/m68k/m68k.c: Handle new str_align_* options.
6551         * config/mips/mips.c (mips_set_compression_mode): Change
6552         type of constants.
6553         (mips_option_override): Set default values for options.
6554         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
6555         Likewise.
6556         * config/rs6000/rs6000.c (rs6000_option_override_internal):
6557         Likewise.
6558         * config/rx/rx.c (rx_option_override): Likewise.
6559         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
6560         (LABEL_ALIGN): Use align_labels_log.
6561         (LOOP_ALIGN): Use align_loops_align.
6562         * config/s390/s390.c (s390_asm_output_function_label): Use new
6563         macros.
6564         * config/sh/sh.c (sh_override_options_after_change):
6565         Change type of constants.
6566         * config/spu/spu.c (spu_sched_init): Likewise.
6567         * config/sparc/sparc.c (sparc_option_override): Set default
6568         values for options.
6569         * config/visium/visium.c (visium_option_override): Likewise.
6570         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
6571         emit p2align format with last argument if it's not needed.
6572         * doc/invoke.texi: Document extended format of -falign-*.
6573         * final.c: Use align_labels alignment.
6574         * flags.h (struct target_flag_state): Change type to use
6575         align_flags.
6576         (struct align_flags_tuple): New.
6577         (struct align_flags): Likewise.
6578         (align_loops_log): Redefine macro to use new types.
6579         (align_loops_max_skip): Redefine macro to use new types.
6580         (align_jumps_log): Redefine macro to use new types.
6581         (align_jumps_max_skip): Redefine macro to use new types.
6582         (align_labels_log): Redefine macro to use new types.
6583         (align_labels_max_skip): Redefine macro to use new types.
6584         (align_functions_log): Redefine macro to use new types.
6585         (align_loops): Redefine macro to use new types.
6586         (align_jumps): Redefine macro to use new types.
6587         (align_labels): Redefine macro to use new types.
6588         (align_functions): Redefine macro to use new types.
6589         (align_functions_max_skip): Redefine macro to use new types.
6590         (align_loops_value): New macro.
6591         (align_jumps_value): New macro.
6592         (align_labels_value): New macro.
6593         (align_functions_value): New macro.
6594         * function.c (invoke_set_current_function_hook): Propagate
6595         alignment values from flags to global variables default in
6596         topleev.h.
6597         * ipa-icf.c (sem_function::equals_wpa): Use
6598         cl_optimization_option_eq instead of memcmp.
6599         * lto-streamer.h (cl_optimization_stream_out): Support streaming
6600         of string types.
6601         (cl_optimization_stream_in): Likewise.
6602         * optc-save-gen.awk: Support strings in cl_optimization.
6603         * opth-gen.awk: Likewise.
6604         * opts.c (finish_options): Remove error checking of invalid
6605         value ranges.
6606         (MAX_CODE_ALIGN): Remove.
6607         (MAX_CODE_ALIGN_VALUE): Likewise.
6608         (parse_and_check_align_values): New function.
6609         (check_alignment_argument): Likewise.
6610         (common_handle_option): Use check_alignment_argument.
6611         * opts.h (parse_and_check_align_values): Declare.
6612         * toplev.c (init_alignments): Remove.
6613         (read_log_maxskip): New.
6614         (parse_N_M): Likewise.
6615         (parse_alignment_opts): Likewise.
6616         (backend_init_target): Remove usage of init_alignments.
6617         * toplev.h (parse_alignment_opts): Declare.
6618         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
6619         argument.
6620         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
6621         * tree.c (cl_option_hasher::equal): New.
6622         * varasm.c: Use new global macros.
6624 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
6626         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
6627         Use a simpler align directive also if MAXSKIP = ALIGN-1.
6628         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6629         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6630         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6631         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6632         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
6633         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
6634         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
6635         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6636         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6637         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6638         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6640 2018-07-04  Martin Liska  <mliska@suse.cz>
6641             Jonathan Wakely  <jwakely@redhat.com>
6643         * coverage.c: Use correct type.
6644         * doc/invoke.texi: Language correction.
6646 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
6648         PR target/85620
6649         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
6650         ENDBRANCH for non-tail call which may return via indirect branch.
6651         * doc/extend.texi: Document indirect_return attribute.
6653 2018-07-03  Martin Sebor  <msebor@redhat.com>
6655         PR tree-optimization/86274
6656         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
6657         precondition.
6658         (format_floating): Correct handling of infinities and NaNs.
6660 2018-07-03  Martin Sebor  <msebor@redhat.com>
6662         * print-tree.c (print_real_cst): New function.
6663         (print_node_brief): Call it.
6664         (print_node): Ditto.
6666 2018-07-03  Jeff Law  <law@redhat.com>
6668         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
6669         into a single pattern.
6671         * config/h8300/h8300.md (ors code_iterator): New.
6672         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
6673         a single pattern and single splitter.
6674         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
6675         (iorqi3_1, xorqi3_1): Likewise.
6676         (iorqi3, xorqi3 expanders): Similarly.
6678         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
6679         (movmd_internal) into a single pattern using the P mode iterator.
6680         (movmd splitters): Similarly.
6681         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
6682         (movsd splitters): Similarly.
6684         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
6685         ADDB, ADDW and ADDL into a single ADD attribute which selects the
6686         right table based on the size of the operand.
6687         * config/h8300/h8300.md (length_table): Corresponding changes. All
6688         references to "addb", "addw" and "addl" changed to "add".
6689         (btst patterns): Merge two variants into a single pattern.
6690         (tstqi, tsthi): Likewise.
6691         (addhi3_incdec, addsi3_incdec): Likewise.
6692         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
6693         (mulhi3, mulsi3): Likewise.
6694         (udivhi3, udivsi3): Likewise.
6695         (divhi3, divsi3): Likewise.
6696         (andorqi3, andorhi3, andorsi3): Likewise.
6698 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
6700         PR target/85694
6701         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
6702         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
6704 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6706         PR tree-optimization/85694
6707         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
6708         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
6709         UNSPEC_URHADD.
6710         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
6711         (<u>avg<mode>3_ceil): New patterns.
6713 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
6715         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
6716         scan-tree-dump directive.
6717         * gcc.dg/vect/slp-perm-2.c: Likewise.
6718         * gcc.dg/vect/slp-perm-3.c: Likewise.
6719         * gcc.dg/vect/slp-perm-5.c: Likewise.
6720         * gcc.dg/vect/slp-perm-6.c: Likewise.
6721         * gcc.dg/vect/slp-perm-7.c: Likewise.
6722         * gcc.dg/vect/slp-perm-8.c: Likewise.
6724 2018-07-03  Marek Polacek  <polacek@redhat.com>
6726         PR middle-end/86202
6727         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
6729 2018-07-03  Richard Biener  <rguenther@suse.de>
6731         PR ipa/86389
6732         * tree-ssa-structalias.c (find_func_clobbers): Properly
6733         handle indirect calls.
6735 2018-07-03  Jeff Law  <law@redhat.com>
6737         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
6738         (shifts): New code iterator.
6739         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
6740         expander.  Fix HImode handling on H8/SX.
6741         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
6742         (subqi3, subhi3, subsi3 expanders): Likewise.
6743         (andqi3, andhi3, andsi3 expanders): Likewise.
6744         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
6745         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
6746         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
6747         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
6748         (zero_extendqihi2, zero_extendqisi2): Likewise.
6749         (extendqihi2, extendqisi2): Likewise.
6750         (rotlqi3, rotlhi3, rotlsi3): Likewise.
6751         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
6752         (rotlqi3_1, rotlhi3_1): Likewise.
6753         (logicalhi3_sn, logicalsi3_sn): Likewise.
6754         (logicalhi3, logicalsi3): Likewise.
6756 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6758         * tree-vect-patterns.c (vect_recog_rotate_pattern)
6759         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6760         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
6761         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
6762         type to append_pattern_def_seq instead of creating a stmt_vec_info
6763         directly.
6764         (build_mask_conversion): Likewise.  Remove vinfo argument.
6765         (vect_add_conversion_to_patterm): Likewise, renaming to...
6766         (vect_add_conversion_to_pattern): ...this.
6767         (vect_recog_mask_conversion_pattern): Update call to
6768         build_mask_conversion.  Pass the vector type to
6769         append_pattern_def_seq here too.
6770         (vect_recog_gather_scatter_pattern): Update call to
6771         vect_add_conversion_to_pattern.
6773 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6775         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
6776         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6777         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
6778         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
6779         STMT_VINFO_PATTERN_DEF_SEQ to null here.
6780         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
6781         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
6782         append_pattern_def_seq instead of new_pattern_def_seq.
6783         (vect_recog_divmod_pattern): Do both of the above.
6784         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
6785         is null.
6787 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6789         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
6790         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
6791         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
6792         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
6793         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
6794         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6795         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
6796         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6797         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6798         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
6799         parameter with a single stmt_vec_info.
6800         (vect_recog_func_ptr): Likewise.
6801         (vect_recog_gather_scatter_pattern): Likewise, folding in...
6802         (vect_try_gather_scatter_pattern): ...this.
6803         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
6804         the stmt_vec_info of the statement to be matched.  Don't clear
6805         STMT_VINFO_RELATED_STMT.
6806         (vect_pattern_recog): Update call accordingly.
6808 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6810         PR tree-optimization/85694
6811         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
6812         (uavgM3_ceil): Document new optabs.
6813         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
6814         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
6815         functions.
6816         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
6817         (savg_ceil_optab): New optabs.
6818         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
6819         (vect_vect_recog_func_ptrs): Add it.
6820         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
6821         constant directly from the associated lhs.
6823 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6825         * tree-vect-patterns.c (vect_split_statement): New function.
6826         (vect_convert_input): Use it to try to split an existing cast.
6828 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6830         * poly-int.h (print_hex): New function.
6831         * dumpfile.h (dump_dec, dump_hex): Declare.
6832         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
6833         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
6834         min_input_precision, operation_precision and operation_sign.
6835         * tree-vect-patterns.c (vect_get_range_info): New function.
6836         (vect_same_loop_or_bb_p, vect_single_imm_use)
6837         (vect_operation_fits_smaller_type): Delete.
6838         (vect_look_through_possible_promotion): Add an optional
6839         single_use_p parameter.
6840         (vect_recog_over_widening_pattern): Rewrite to use new
6841         stmt_vec_info infomration.  Handle one operation at a time.
6842         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
6843         (vect_truncatable_operation_p, vect_set_operation_type)
6844         (vect_set_min_input_precision): New functions.
6845         (vect_determine_min_output_precision_1): Likewise.
6846         (vect_determine_min_output_precision): Likewise.
6847         (vect_determine_precisions_from_range): Likewise.
6848         (vect_determine_precisions_from_users): Likewise.
6849         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
6850         (vect_vect_recog_func_ptrs): Put over_widening first.
6851         Add cast_forwprop.
6852         (vect_pattern_recog): Call vect_determine_precisions.
6854 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6856         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
6857         statements that have been replaced by further pattern statements.
6858         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
6860 2018-07-03  Richard Biener  <rguenther@suse.de>
6862         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
6863         always set *dt.  Dump vectype in vectype overload.
6864         * dumpfile.h (dump_gimple_expr): New function.
6865         (dump_gimple_expr_loc): Likewise.
6866         * dumpfile.c (dump_gimple_expr): New function.
6867         (dump_gimple_expr_loc): Likewise.
6869 2018-07-02  Jeff Law  <law@redhat.com>
6871         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
6872         the H8/300, H8/300H and H8/S variants into a single pattern.
6873         (movhi_h8300, movqi_h8300hs): Similarly.
6874         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
6875         (QHI mode iterator): New.
6877         * config/h8300/h8300.md: Remove trailing whitespace.
6879 2018-07-02  Jim Wilson  <jimw@sifive.com>
6881         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
6882         instead of emit_insn for interrupt returns.
6883         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
6884         (riscv_sret, riscv_uret): Likewise.
6886 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
6888         * pretty-print.c (selftest::test_pp_format): Move save and restore
6889         of quotes to class auto_fix_quotes, and add an instance.
6890         * selftest.c: Include "intl.h".
6891         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
6892         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
6893         * selftest.h (selftest::auto_fix_quotes): New class.
6895 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
6897         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
6898         (aarch64_sve_prepare_conditional_op): Remove.
6899         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
6900         Allow aarch64_simd_reg_or_zero as select operand; remove
6901         the aarch64_sve_prepare_conditional_op call.
6902         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
6903         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6904         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
6905         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
6906         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
6907         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
6908         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
6909         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
6910         and a splitters to match all of the *_any patterns.
6911         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
6913         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
6914         (SVE_COND_FP_BINARY_REV): Remove.
6915         (sve_int_op_rev, sve_fp_op_rev): New.
6916         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
6917         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
6918         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
6919         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
6920         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
6921         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
6922         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
6923         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
6924         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
6926         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
6927         Remove match_dup 1 from the inner unspec.
6928         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6930         * config/aarch64/aarch64.md (movprfx): New attr.
6931         (length): Default movprfx to 8.
6932         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
6933         (*madd<SVE_I>, *msub<SVE_I): Likewise.
6934         (*<su>mul<SVE_I>3_highpart): Likewise.
6935         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
6936         (*v<ASHIFT><SVE_I>3): Likewise.
6937         (*<su><MAXMIN><SVE_I>3): Likewise.
6938         (*<su><MAXMIN><SVE_F>3): Likewise.
6939         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
6940         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
6941         (*div<SVE_F>4): Likewise.
6943 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
6945         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
6946         in dump string.
6948 2018-07-02  Richard Biener  <rguenther@suse.de>
6950         PR tree-optimization/86363
6951         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
6952         memset argument refers to a non-variable address.
6954 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
6956         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
6957         {PLUS,MINUS}_EXPR code to...
6958         (adjust_symbolic_bound): ...here,
6959         (combine_bound): ...here,
6960         (set_value_range_with_overflow): ...and here.
6962 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
6964         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
6965         code...
6966         (extract_range_from_abs_expr): ...here.
6968 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
6970         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
6971         -fno-omit-frame-pointer when not optimizing.
6973 2018-07-02  Martin Liska  <mliska@suse.cz>
6975         PR ipa/86279
6976         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
6977         (propagate_nothrow): Likewise.
6979 2018-07-02  Martin Liska  <mliska@suse.cz>
6981         PR ipa/86323
6982         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
6984 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
6986         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
6987         function in r262149, changing "loc" param from source_location to
6988         const dump_location_t &.
6989         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
6990         declaration, as above.
6992 2018-07-01  Paul Koning  <ni1d@arrl.net>
6994         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
6995         -munit-asm, -mgnu-asm, -mdec-asm.
6996         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
6997         (pdp11_output_labelref): New.
6998         (pdp11_output_def): New.
6999         (pdp11_output_addr_vec_elt): New.
7000         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
7001         %# and %@ format codes.
7002         (pdp11_option_override): New.
7003         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
7004         (pdp11_output_ident): New.
7005         (pdp11_asm_named_section): New.
7006         (pdp11_asm_init_sections): New.
7007         (pdp11_file_start): New.
7008         (pdp11_file_end): New.
7009         (output_ascii): Use .ascii/.asciz for -mdec-asm.
7010         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
7011         %o, like %c but octal.
7012         (pdp11_option_override): New.
7013         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
7014         -mdec-asm.
7015         (DATA_SECTION_ASM_OP): Ditto.
7016         (READONLY_DATA_SECTION_ASM_OP): New.
7017         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
7018         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
7019         (ASM_OUTPUT_LABELREF): Ditto.
7020         (ASM_OUTPUT_DEF): Ditto.
7021         (ASM_OUTPUT_EXTERNAL): New.
7022         (ASM_OUTPUT_SOURCE_FILENAME): New.
7023         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
7024         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
7025         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
7026         %# and %@ format codes.
7027         * config/pdp11/pdp11.opt (mgnu-asm): New.
7028         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
7029         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
7030         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
7032 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
7034         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
7035         dereferencing path[] beyond its length.
7036         (debug_path): New.
7037         (debug_all_paths): New.
7038         (rewire_first_differing_edge): New.
7039         (adjust_paths_after_duplication): New.
7040         (duplicate_thread_path): Call adjust_paths_after_duplication.
7041         Add new argument.
7042         (thread_through_all_blocks): Add new argument to
7043         duplicate_thread_path.
7045 2018-06-30  Jim Wilson  <jimw@sifive.com>
7047         * config/riscv/predicates.md (p2m1_shift_operand): New.
7048         (high_mask_shift_operand): New.
7049         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
7050         pattern using p2m1_shift_operand.
7051         (lshsi3_zero_extend_3+2): New combiner pattern using
7052         high_mask_shift_operand.
7054 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
7056         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
7057         split out from...
7058         (vect_recog_rotate_pattern): ...here.
7059         (vect_convert_input): Try to insert casts of invariants in the
7060         preheader.
7061         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
7062         preheader to be empty.
7064 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
7066         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
7067         vector type.  If given, install it in the new statement's
7068         STMT_VINFO_VECTYPE.
7069         (vect_element_precision): New function.
7070         (vect_unpromoted_value): New struct.
7071         (vect_unpromoted_value::vect_unpromoted_value): New function.
7072         (vect_unpromoted_value::set_op): Likewise.
7073         (vect_look_through_possible_promotion): Likewise.
7074         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
7075         (vect_widened_op_tree, vect_convert_input): Likewise.
7076         (vect_convert_inputs, vect_convert_output): Likewise.
7077         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
7078         to handle the optional cast of the multiplication result and
7079         vect_widened_op_tree to detect the widened multiplication itself.
7080         Do not require the input and output of promotion casts to have
7081         the same sign, but base the signedness of the operation on the
7082         input rather than the result.  If the pattern includes two
7083         promotions, check that those promotions have the same sign.
7084         Do not restrict the MULT_EXPR handling to a double-width result;
7085         handle quadruple-width results and wider.  Use vect_convert_inputs
7086         to convert the inputs to the common type.
7087         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
7088         to handle the optional cast of the ABS result.  Also allow a sign
7089         change or a sign extension between the ABS and MINUS.
7090         Use vect_widened_op_tree to detect the widened subtraction and use
7091         vect_convert_inputs to convert the inputs to the common type.
7092         (vect_handle_widen_op_by_const): Delete.
7093         (vect_recog_widen_op_pattern): New function.
7094         (vect_recog_widen_mult_pattern): Use it.
7095         (vect_recog_widen_shift_pattern): Likewise.
7096         (vect_recog_widen_sum_pattern): Use
7097         vect_look_through_possible_promotion to handle the promoted
7098         PLUS_EXPR operand.
7100 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
7102         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
7103         the containing gimple_seq *.
7104         * gimple-iterator.h (gsi_for_stmt): Declare it.
7105         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
7106         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
7107         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
7108         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
7109         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
7110         checks.
7111         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
7112         split out from...
7113         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
7114         statement being replaced is part of an existing pattern
7115         definition sequence, inserting the new pattern statements before
7116         the original one.
7117         (vect_pattern_recog_1): Don't return a bool.  If the statement
7118         is already part of a pattern, instead apply pattern matching
7119         to the pattern definition statements.  Don't clear the
7120         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
7121         (vect_pattern_recog): Don't break after the first match;
7122         continue processing the pattern definition statements instead.
7123         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
7125 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
7127         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
7128         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7129         (vect_recog_widen_sum_pattern): Use it.
7131 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
7133         * tree-vect-loop.c (vectorizable_reduction): Assert that the
7134         phi is not a pattern statement and has not been replaced by
7135         a pattern statement.
7136         * tree-vect-patterns.c (type_conversion_p): Don't check
7137         STMT_VINFO_IN_PATTERN_P.
7138         (vect_recog_vector_vector_shift_pattern): Likewise.
7139         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
7140         the pattern statement rather than the original statement; check
7141         directly for a WIDEN_MULT_EXPR here.
7142         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
7143         vect_is_simple_use to return the pattern statement rather
7144         than the original statement; use is_pattern_stmt_p to check
7145         for such a pattern statement.
7146         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
7147         to return the pattern statement rather than the original statement;
7148         don't do the same transformation here.
7149         (vect_is_simple_use): If the defining statement has been replaced
7150         by a pattern statement, return the pattern statement instead.
7151         Remove the corresponding (local) transformation from the vectype
7152         overload.
7154 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
7156         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
7157         end and default to null.
7158         * tree-vect-loop.c (vect_create_epilog_for_reduction)
7159         (vectorizable_reduction): Update calls accordingly, dropping the
7160         gimple ** argument if the passed-back statement isn't needed.
7161         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
7162         (vect_recog_rotate_pattern): Likewise.
7163         (vect_recog_mask_conversion_pattern): Likewise.
7164         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
7165         (vect_mask_constant_operand_p): Likewise.
7166         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
7167         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
7168         (get_group_load_store_type, get_load_store_type): Likewise.
7169         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
7170         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
7171         (vectorizable_conversion, vectorizable_assignment): Likewise.
7172         (vectorizable_shift, vectorizable_operation): Likewise.
7173         (vectorizable_store, vect_is_simple_cond): Likewise.
7174         (vectorizable_condition, vectorizable_comparison): Likewise.
7175         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
7176         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
7177         and move it to the end.  Cope with null def_stmt_outs.
7179 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7181         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
7183 2018-06-29  Jeff Law  <law@redhat.com>
7185         * config/v850/v850.c (v850_legitimate_address_p): Handle large
7186         displacements for TARGET_V850E2V3 and newer.
7187         (TARGET_LRA_P): Remove.  Defaults to LRA now.
7188         * config/v850/v850.md (sign23byte_load): Remove.
7189         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
7190         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
7192 2018-06-29  Martin Liska  <mliska@suse.cz>
7194         PR lto/85759
7195         * coverage.c (coverage_init): Mangle full path name.
7196         * doc/invoke.texi: Document the change.
7197         * gcov-io.c (mangle_path): New.
7198         * gcov-io.h (mangle_path): Likewise.
7199         * gcov.c (mangle_name): Use mangle_path for path mangling.
7201 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7203         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
7204         if starting source register is not even.
7206 2018-06-29  Martin Liska  <mliska@suse.cz>
7208         PR tree-optimization/86263
7209         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
7210         Make edge redirection.
7212 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
7214         * dumpfile.c (dump_loc): Add indentation based on scope depth.
7215         (dump_scope_depth): New variable.
7216         (get_dump_scope_depth): New function.
7217         (dump_begin_scope): New function.
7218         (dump_end_scope): New function.
7219         * dumpfile.h (get_dump_scope_depth): New declaration.
7220         (dump_begin_scope): New declaration.
7221         (dump_end_scope): New declaration.
7222         (class auto_dump_scope): New class.
7223         (AUTO_DUMP_SCOPE): New macro.
7224         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
7225         AUTO_DUMP_SCOPE.
7227 2018-06-29  Richard Biener  <rguenther@suse.de>
7229         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
7230         compute_all_dependences succeeds.
7231         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
7232         exceed --param loop-max-datarefs-for-datadeps.
7234 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
7236         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
7238 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
7240         PR target/86348
7241         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
7242         alternative 0 in preferred_for_speed attribute.
7244 2018-06-28  Paul Koning  <ni1d@arrl.net>
7246         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
7247         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
7248         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
7249         * config/pdp11/pdp11.md: Correct "length" attribute calculation
7250         for shift insn patterns.
7252 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
7254         * cgraph.c (cgraph_node::get_body): Replace assignments to
7255         "dump_file" with calls to set_dump_file.
7256         * dumpfile.c (alt_dump_file): Make static, and group with...
7257         (alt_flags): ...this definition.
7258         (dumps_are_enabled): New variable.
7259         (refresh_dumps_are_enabled): New function.
7260         (set_dump_file): New function.
7261         (set_alt_dump_file): New function.
7262         (gcc::dump_manager::dump_start): Replace assignments to
7263         "dump_file" and "alt_dump_file" with calls to set_dump_file and
7264         set_alt_dump_file.
7265         (gcc::dump_manager::dump_finish): Likewise.
7266         * dumpfile.h (alt_dump_file): Delete decl.
7267         (dumps_are_enabled): New variable decl.
7268         (set_dump_file): New function decl.
7269         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
7270         global.
7271         * tree-nested.c (lower_nested_functions): Replace assignments to
7272         "dump_file" with calls to set_dump_file.
7274 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
7276         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
7277         goto_locus of each outgoing edge of each basic block.
7279 2018-06-28  Richard Biener  <rguenther@suse.de>
7281         * dwarf2out.c (decl_scope_table): Remove.
7282         (push_decl_scope): Likewise.
7283         (pop_decl_scope): Likewise.
7284         (gen_type_die_for_member): Do not call push/pop_decl_scope.
7285         (gen_struct_or_union_type_die): Likewise.
7286         (gen_tagged_type_die): Likewise.
7287         (dwarf2out_init): Do not initialize decl_scope_table.
7288         (dwarf2out_c_finalize): Do not free it.
7290 2018-06-28  Richard Biener  <rguenther@suse.de>
7292         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
7293         deciding whether to not re-use a DIE.
7295 2018-06-28  Richard Biener  <rguenther@suse.de>
7297         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
7298         DW_AT_abstract_origin attribute.
7300 2018-06-28  Martin Liska  <mliska@suse.cz>
7302         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7303         Use newly introduced constants.
7304         * tree-switch-conversion.h (struct jump_table_cluster):
7305         Define max_ratio_for_size and max_ratio_for_speed.
7307 2018-06-28  Martin Liska  <mliska@suse.cz>
7309         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7310         Add new checking assert to catch invalid state.
7311         (jump_table_cluster::can_be_handled): Handle single case
7312         clusters.
7313         (jump_table_cluster::is_beneficial): Bail out for such case.
7314         (bit_test_cluster::find_bit_tests):
7315         Add new checking assert to catch invalid state.
7316         (bit_test_cluster::can_be_handled): Handle single case
7317         clusters.
7318         (bit_test_cluster::is_beneficial): Bail out for such case.
7319         (switch_decision_tree::analyze_switch_statement):
7320         Fix comment.
7322 2018-06-28  Martin Liska  <mliska@suse.cz>
7324         * common.opt: Introduce -completion option.
7325         * gcc.c (driver_handle_option): Handle it.
7326         (driver::main): Print completions if completion
7327         is set.
7328         * opt-suggestions.c (option_proposer::get_completions):
7329         New function.
7330         (option_proposer::suggest_completion): Likewise.
7331         (option_proposer::find_param_completions): Likewise.
7332         (verify_autocompletions): Likewise.
7333         (test_completion_valid_options): Likewise.
7334         (test_completion_valid_params): Likewise.
7335         (in_completion_p): Likewise.
7336         (empty_completion_p): Likewise.
7337         (test_completion_partial_match): Likewise.
7338         (test_completion_garbage): Likewise.
7339         (opt_proposer_c_tests): Likewise.
7340         * opt-suggestions.h: Declare new functions.
7341         * opts.c (common_handle_option): Handle OPT__completion_.
7342         * selftest-run-tests.c (selftest::run_tests): Add
7343         opt_proposer_c_tests.
7344         * selftest.c (assert_str_startswith): New.
7345         * selftest.h (assert_str_startswith): Likewise.
7346         (opt_proposer_c_tests): New.
7347         (ASSERT_STR_STARTSWITH): Likewise.
7349 2018-06-28  Martin Liska  <mliska@suse.cz>
7351         * Makefile.in: Add opt-suggestions.o.
7352         * gcc-main.c: Include opt-suggestions.h.
7353         * gcc.c (driver::driver): Likewise.
7354         (driver::~driver): Remove m_option_suggestions.
7355         (driver::build_option_suggestions): Moved to option_proposer.
7356         (driver::suggest_option): Likewise.
7357         (driver::handle_unrecognized_options): Use option_proposer.
7358         * gcc.h (class driver): Add new memver m_option_proposer.
7359         * opt-suggestions.c: New file.
7360         * opt-suggestions.h: New file.
7362 2018-06-28  Martin Liska  <mliska@suse.cz>
7364         * vec.h (class auto_string_vec): New (moved from auto_argvec).
7365         (auto_string_vec::~auto_string_vec): Likewise.
7367 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
7369         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
7370         prevent_decl_creation_for_types fields up and add reset_location field.
7371         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
7372         statement if id->reset_location is true.
7373         (copy_edges_for_bb): Do not set goto_locus on the new edges if
7374         id->reset_location is true.
7375         (copy_phis_for_bb): Force input_location on the arguments if
7376         id->reset_location is true.
7377         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
7378         is set on the function to be inlined.
7380 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
7382         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
7384 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
7386         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
7387         registers for Pmode.
7388         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
7389         hard registers for the clobbered pseudo.
7391 2018-06-27  Paul Koning  <ni1d@arrl.net>
7393         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
7394         mutually exclusive options.
7395         * config/pdp11/constraints.md (h): New constraint.
7396         (O): Update definition to match shift code generation.
7397         (D): New constraint.
7398         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
7399         (CCFP): Remove.
7400         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
7401         function.
7402         (output_jump): Change arguments.
7403         (pdp11_fixed_cc_regs): New function.
7404         (pdp11_cc_mode): Ditto.
7405         (pdp11_expand_shift): Ditto.
7406         (pdp11_assemble_shift): Ditto.
7407         (pdp11_small_shift): Ditto.
7408         (pdp11_branch_cost): Remove.
7409         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
7410         from output.
7411         (pdp11_register_move_cost): Update for CC registers.
7412         (pdp11_rtx_costs): Add case for LSHIFTRT.
7413         (pdp11_output_jump): Add CCNZ mode conditional branches.
7414         (notice_update_cc_on_set): Remove.
7415         (pdp11_cc_mode): New function.
7416         (simple_memory_operand): Correct pre/post decrement case.
7417         (no_side_effect_operand): New function.
7418         (pdp11_regno_reg_class): Add CC_REGS class.
7419         (pdp11_fixed_cc_regs): New function.
7420         (pdp11_small_shift): New function.
7421         (pdp11_expand_shift): New function to expand shift insns.
7422         (pdp11_assemble_shift): New function to output shifts.
7423         (pdp11_branch_cost): Remove.
7424         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
7425         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
7426         (WCHAR_TYPE): Ditto.
7427         (PTRDIFF_TYPE): Ditto.
7428         (ADJUST_INSN_LENGTH): New macro.
7429         (FIXED_REGISTERS): Add CC registers.
7430         (CALL_USED_REGISTERS): Ditto.
7431         (reg_class): Ditto.
7432         (REG_CLASS_NAMES): Ditto.
7433         (REG_CLASS_CONTENTS): Ditto.
7434         (SELECT_CC_MODE): Use new function.
7435         (TARGET_FLAGS_REGNUM): New macro.
7436         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
7437         (cc0_reg_rtx): Remove.
7438         (CC_STATUS_MDEP): Remove.
7439         (CC_STATUS_MDEFP_INIT): Remove.
7440         (CC_IN_FPU): Remove.
7441         (NOTICE_UPDATE_CC): Remove.
7442         (REGISTER_NAMES): Add CC registers.
7443         (BRANCH_COST): Change to constant 1.
7444         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
7445         handling.
7446         * config/pdp11/pdp11.opt (mbcopy): Remove.
7447         (mbcopy-builtin): Remove.
7448         (mbranch-cheap): Remove.
7449         (mbranch-expensive): Remove.
7450         * config/pdp11/predicates.md (expand_shift_operand): Update to
7451         match shift code generation.
7452         (ccnz_operator): New predicate.
7453         * doc/invoke.texi (PDP-11 Options): Remove deleted options
7454         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
7455         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
7456         exclusive options.
7457         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
7458         description of O constraint.
7460 2018-06-27  Jeff Law  <law@redhat.com>
7461             Austin Law  <austinklaw@gmail.com>
7463         * config/v850/v850.md (addsi3_set_flags): New pattern.
7464         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
7465         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
7466         (zero_extendhisi2_v850_set_flags): Likewise.
7467         (zero_extendqisi2_v850_set_flags): Likewise.
7468         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
7469         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
7470         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
7472         * config/v850/v850-protos.h (notice_update_cc): Remove.
7473         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
7474         (v850_print_operand): Handle 'D' and "d".
7475         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
7476         Add handling of arithmetic/logical operations compared against zero.
7477         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
7478         Do not look at v850_compare_op, instead get mode from last argument.
7479         (v850_gen_compare): Remove
7480         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
7481         after reload for prologue insns.
7482         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
7483         patterns.
7484         (construct_save_jarl): Likewise.
7485         (TARGET_FLAGS_REGNUM): Define.
7486         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
7487         (NOTICE_UPDATE_CC): Remove.
7488         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
7489         than cc0.  Conditionalize on reload_completed.
7490         (cmpsi_insn, setfcc_insn): Likewise.
7491         (tst1 splitter): Turn into define_and_split which sets the flags
7492         after reload.
7493         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
7494         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
7495         (cstoresf4, cstoredf4): Clobber the flags.
7496         (cmpsi, cmpsf, cmpdf): Remove expanders.
7497         (setf_insn): Remove pattern.
7498         (addsi3): Turn into define_and_split which clobbers the flags after
7499         reload and a suitable pattern (addsi3_clobber_flags) for use after
7500         reload.
7501         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
7502         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
7503         (ashrsi3, ashrsi3_v850e2): Likewise.
7504         (bins): Clobber the flags.
7505         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
7506         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
7507         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
7508         (call_value_internal_short, call_value_internal_long): Likewise.
7509         (callt_save_interrupt, callt_return_interrupt): Likewise.
7510         (save_interrupt, return_interrupt): Likewise.
7511         (callt_save_all_interrupt, save_all_interrupt): Likewise.
7512         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
7513         (restore_all_interrupt, _restore_all_interrupt): Likewise.
7514         (All FP comparisons): Only allow after reload has completed.
7515         (trfsr): Likewise.
7516         (divh, divhu): Tweak output template.
7517         (branch_z_normal, branch_z_invert): Remove
7518         (branch_nz_normal, branch_nz_invert): Likewise.
7519         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
7521         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
7522         * config/v850/v850.c (notice_update_cc): Remove.
7523         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
7524         (CC_NO_CARRY): Likewise.
7525         (NOTICE_UPDATE_CC): Define to nothing.
7526         * config/v850/v850.md: Remove block comment on cc0 handling
7527         Remove "cc" attribute from all patterns.  Remove cc_status handling
7528         from all patterns.  Minor formatting fixes.
7530 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7532         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
7533         (cortex-a76.cortex-a55): Likewise.
7534         * config/aarch64/aarch64-tune.md: Regenerate.
7535         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
7536         cortex-a76.cortex-a55.
7538 2018-06-27  Jeff Law  <law@redhat.com>
7540         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
7541         (MULTILIB_DIRNAMES): Similarly.
7543 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
7545         * gimple.h (gimple_return_retbnd): Delete.
7546         (gimple_return_set_retbnd): Likewise.
7547         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
7548         gimple_return_set_retbnd.
7549         * gimple-pretty-print.c (dump_gimple_return): Remove call to
7550         gimple_return_retbnd and adjust.
7551         * tree-inline.h (struct copy_body_data): Remove retbnd field.
7552         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
7553         Explicitly return NULL in a couple more cases.  Move assertion
7554         on debug statements and remove unreachable code.
7555         (reset_debug_binding): Do not test id->retbnd.
7556         (expand_call_inline): Do not set it.
7558 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
7560         * configure.ac: Add --disable-gcov option.
7561         * configure: Regenerate.
7562         * Makefile.in: Honour @enable_gcov@.
7563         * doc/install.texi: Document --disable-gcov.
7565 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7567         * config/arm/arm-cpus.in (cortex-a76): New entry.
7568         (cortex-a76.cortex-a55): Likewise.
7569         * config/arm/arm-tables.opt: Regenerate.
7570         * config/arm/arm-tune.md: Likewise.
7571         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
7572         * doc/invoke.texi (ARM Options): Document cortex-a76 and
7573         cortex-a76.cortex-a55.
7575 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
7577         PR target/85769
7578         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
7580 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
7582         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
7583         comment.
7584         (EPILOGUE_USES): Likewise.
7586 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
7588         * tree-inline.c (remap_location): New function extracted from...
7589         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
7590         (copy_phis_for_bb): ...here.  Call remap_location.
7591         (copy_cfg_body): Adjust call to copy_edges_for_bb.
7593 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
7595         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
7596         unaligned vsx for 16B memset.
7598 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
7600         PR target/86285
7601         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
7602         ieee128_float_type_node to long_double_type_node unless
7603         TARGET_LONG_DOUBLE_128 is set.
7605 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
7607         * cfgloop.c (get_loop_location): Convert return type from
7608         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
7609         by implicit construction from rtx_insn *, and using
7610         dump_user_location_t::from_function_decl for the fallback case.
7611         * cfgloop.h (get_loop_location): Convert return type from
7612         location_t to dump_user_location_t.
7613         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
7614         dump_printf_loc to pass in a dump_location_t rather than a
7615         location_t, via the gimple stmt.
7616         * coverage.c (get_coverage_counts): Update calls to
7617         dump_printf_loc to pass in dump_location_t rather than a
7618         location_t.
7619         * doc/optinfo.texi (Dump types): Convert example of
7620         dump_printf_loc from taking "locus" to taking "insn".  Update
7621         description of the "_loc" calls to cover dump_location_t.
7622         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
7623         "selftest.h".
7624         (dump_user_location_t::dump_user_location_t): New constructors,
7625         from gimple *stmt and rtx_insn *.
7626         (dump_user_location_t::from_function_decl): New function.
7627         (dump_loc): Make static.
7628         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
7629         const dump_location_t &.
7630         (dump_generic_expr_loc): Delete.
7631         (dump_printf_loc): Convert param "loc" from location_t to
7632         const dump_location_t &.
7633         (selftest::test_impl_location): New function.
7634         (selftest::dumpfile_c_tests): New function.
7635         * dumpfile.h: Include "profile-count.h".
7636         (class dump_user_location_t): New class.
7637         (struct dump_impl_location_t): New struct.
7638         (class dump_location_t): New class.
7639         (dump_printf_loc): Convert 2nd param from source_location to
7640         const dump_location_t &.
7641         (dump_generic_expr_loc): Delete.
7642         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
7643         const dump_location_t &.
7644         * gimple-fold.c (fold_gimple_assign): Update call to
7645         dump_printf_loc to pass in a dump_location_t rather than a
7646         location_t, via the gimple stmt.
7647         (gimple_fold_call): Likewise.
7648         * gimple-loop-interchange.cc
7649         (loop_cand::analyze_iloop_reduction_var): Update for change to
7650         check_reduction_path.
7651         (tree_loop_interchange::interchange): Update for change to
7652         find_loop_location.
7653         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
7654         change in return-type of find_loop_location.
7655         (graphite_regenerate_ast_isl): Likewise.
7656         * graphite-optimize-isl.c (optimize_isl): Likewise.
7657         * graphite.c (graphite_transform_loops): Likewise.
7658         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
7659         pass in a dump_location_t rather than a location_t, via the
7660         gimple stmt.
7661         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7662         * ipa.c (walk_polymorphic_call_targets): Likewise.
7663         * loop-unroll.c (report_unroll): Convert "locus" param from
7664         location_t to dump_location_t.
7665         (decide_unrolling): Update for change to get_loop_location's
7666         return type.
7667         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
7668         location_t to dump_user_location_t.
7669         (grid_find_single_omp_among_assignments_1): Updates calls to
7670         dump_printf_loc to pass in a dump_location_t rather than a
7671         location_t, via the gimple stmt.
7672         (grid_parallel_clauses_gridifiable): Convert "tloc" from
7673         location_t to dump_location_t.  Updates calls to dump_printf_loc
7674         to pass in a dump_location_t rather than a location_t, via the
7675         gimple stmt.
7676         (grid_inner_loop_gridifiable_p): Likewise.
7677         (grid_dist_follows_simple_pattern): Likewise.
7678         (grid_gfor_follows_tiling_pattern): Likewise.
7679         (grid_target_follows_gridifiable_pattern): Likewise.
7680         (grid_attempt_target_gridification): Convert initialization
7681         of local "grid" from memset to zero-initialization; FIXME: does
7682         this require C++11?  Update call to dump_printf_loc to pass in a
7683         optinfo_location rather than a location_t, via the gimple stmt.
7684         * profile.c (read_profile_edge_counts): Updates call to
7685         dump_printf_loc to pass in a dump_location_t rather than a
7686         location_t
7687         (compute_branch_probabilities): Likewise.
7688         * selftest-run-tests.c (selftest::run_tests): Call
7689         dumpfile_c_tests.
7690         * selftest.h (dumpfile_c_tests): New decl.
7691         * tree-loop-distribution.c (pass_loop_distribution::execute):
7692         Update for change in return type of find_loop_location.
7693         * tree-parloops.c (parallelize_loops): Likewise.
7694         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
7695         "locus" from location_t to dump_user_location_t.
7696         (canonicalize_loop_induction_variables): Likewise.
7697         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
7698         for change in return type of find_loop_location.
7699         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
7700         to dump_printf_loc to pass in a dump_location_t rather than a
7701         location_t, via the stmt.
7702         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
7703         Likewise.
7704         * tree-vect-loop-manip.c (find_loop_location): Convert return
7705         type from source_location to dump_user_location_t.
7706         (vect_do_peeling): Update for above change.
7707         (vect_loop_versioning): Update for change in type of
7708         vect_location.
7709         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
7710         from location_t to dump_user_location_t.
7711         (vect_estimate_min_profitable_iters): Update for change in type
7712         of vect_location.
7713         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
7714         location_t to dump_location_t.
7715         (vect_slp_bb): Update for change in type of vect_location.
7716         * tree-vectorizer.c (vect_location): Convert from source_location
7717         to dump_user_location_t.
7718         (try_vectorize_loop_1): Update for change in vect_location's type.
7719         (vectorize_loops): Likewise.
7720         (increase_alignment): Likewise.
7721         * tree-vectorizer.h (vect_location): Convert from source_location
7722         to dump_user_location_t.
7723         (find_loop_location): Convert return type from source_location to
7724         dump_user_location_t.
7725         (check_reduction_path): Convert 1st param from location_t to
7726         dump_user_location_t.
7727         * value-prof.c (check_counter): Update call to dump_printf_loc to
7728         pass in a dump_user_location_t rather than a location_t; update
7729         call to error_at for change in type of "locus".
7730         (check_ic_target): Update call to dump_printf_loc to
7731         pass in a dump_user_location_t rather than a location_t, via the
7732         call_stmt.
7734 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
7736         * config/s390/s390.h (enum processor_flags): Do not use
7737         default tune parameter when -march was specified.
7739 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
7741         PR target/86314
7742         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
7743         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
7744         operands.
7746 2018-06-26  Richard Biener  <rguenther@suse.de>
7748         PR tree-optimization/86287
7749         PR bootstrap/86316
7750         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
7751         (vect_analyze_loop): Initialize n_stmts.
7753 2018-06-26  Richard Biener  <rguenther@suse.de>
7755         PR middle-end/86271
7756         * fold-const.c (fold_convertible_p): Pointer extension
7757         isn't valid.
7759 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
7761         PR debug/86064
7762         * dwarf2out.c (loc_list_has_views): Adjust comments.
7763         (dw_loc_list): Split single cross-partition range with
7764         nonzero locview.
7766 2018-06-25  Jeff Law  <law@redhat.com>
7768         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
7769         on -mbig-switch by default.
7771         * config/v850/predicates.md (const_float_1_operand): Fix match_code
7772         test.
7773         (const_float_0_operand): Remove unused predicate.
7774         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
7775         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
7776         (recipsf2): New expander.  Original pattern now called
7777         (recipsf2_insn).
7778         (recipdf2, recipdf2_insn): Similarly.
7779         (rsqrtsf2, rsqrtsf2_insn): Similarly
7780         (rsqrtdf2, rsqrtdf2_insn): Similarly
7782 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
7784         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
7785         Simplify logic for FreeBSD (twice).
7787 2018-06-25  Martin Sebor  <msebor@redhat.com>
7789         PR tree-optimization/86204
7790         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
7791         a strnlen result if it's less than the length of the string.
7793 2018-06-25  Martin Sebor  <msebor@redhat.com>
7795         PR tree-optimization/85700
7796         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
7797         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
7798         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
7800 2018-06-25  Martin Sebor  <msebor@redhat.com>
7802         * doc/extend.texi (Zero-length arrays): Update and clarify.
7804 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
7806         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
7807         added IEEE/IBM long double multilib support on PowerPC little
7808         endian Linux systems.
7809         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
7810         (MULTILIB_DEFAULTS): Likewise.
7811         * config/rs6000/rs6000.c (rs6000_option_override_internal):
7812         Likewise.
7813         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
7814         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
7815         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
7817 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
7819         PR middle-end/86311
7820         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
7821         (REORDER_45): Likewise.
7823 2018-06-25  Jeff Law  <law@redhat.com>
7825         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
7826         dividend to 32 bits.  Adjust length.
7827         (udivmodhi4): Cleanup output template.  Fix length.
7829 2018-06-25  Carl Love  <cel@us.ibm.com>
7831         * config/rs6000/vsx.md: Change word selector to prefered location.
7833 2018-06-25  Richard Biener  <rguenther@suse.de>
7835         PR tree-optimization/86304
7836         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
7837         epilogue-if-converted loops as well.
7839 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
7841         * lto-section-out.c (lto_begin_section): Do not print section
7842         name for noaddr and unnumbered dumps.
7844 2018-06-25  Richard Biener  <rguenther@suse.de>
7846         * tree-vectorizer.h (struct vec_info_shared): New structure
7847         with parts split out from struct vec_info and loop_nest from
7848         struct _loop_vec_info.
7849         (struct vec_info): Adjust accordingly.
7850         (struct _loop_vec_info): Likewise.
7851         (LOOP_VINFO_LOOP_NEST): Adjust.
7852         (LOOP_VINFO_DATAREFS): Likewise.
7853         (LOOP_VINFO_DDRS): Likewise.
7854         (struct _bb_vec_info): Likewise.
7855         (BB_VINFO_DATAREFS): Likewise.
7856         (BB_VINFO_DDRS): Likewise.
7857         (struct _stmt_vec_info): Add dr_aux member.
7858         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
7859         (DR_MISALIGNMENT_UNINITIALIZED): New.
7860         (set_dr_misalignment): Adjust.
7861         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
7862         (vect_analyze_loop): Adjust prototype.
7863         (vect_analyze_loop_form): Likewise.
7864         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
7865         Compute dependences lazily.
7866         (vect_record_base_alignments): Use shared datarefs/ddrs.
7867         (vect_verify_datarefs_alignment): Likewise.
7868         (vect_analyze_data_refs_alignment): Likewise.
7869         (vect_analyze_data_ref_accesses): Likewise.
7870         (vect_analyze_data_refs): Likewise.
7871         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
7872         constructor parameter for shared part.
7873         (vect_analyze_loop_form): Pass in shared part and adjust.
7874         (vect_analyze_loop_2): Pass in storage for the number of
7875         stmts.  Move loop nest finding to the caller.  Compute
7876         datarefs lazily.
7877         (vect_analyze_loop): Pass in shared part.
7878         (vect_transform_loop): Verify shared datarefs are unchanged.
7879         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
7880         constructor parameter for shared part.
7881         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
7882         (vect_slp_bb): Verify shared datarefs are unchanged before
7883         transform.
7884         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
7885         change.
7886         (new_stmt_vec_info): Initialize DR_AUX misalignment to
7887         DR_MISALIGNMENT_UNINITIALIZED.
7888         * tree-vectorizer.c (vec_info::vec_info): Add constructor
7889         parameter for shared part.
7890         (vec_info::~vec_info): Adjust.
7891         (vec_info_shared::vec_info_shared): New.
7892         (vec_info_shared::~vec_info_shared): Likewise.
7893         (vec_info_shared::save_datarefs): Likewise.
7894         (vec_info_shared::check_datarefs): Likewise.
7895         (try_vectorize_loop_1): Construct shared part live for analyses
7896         of a single loop for multiple vector sizes.
7897         * tree-parloops.c (gather_scalar_reductions): Adjust.
7899 2018-06-25  Richard Biener  <rguenther@suse.de>
7901         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
7902         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
7903         (vect_analyze_data_refs): Remove similar code from here and
7904         simplify accordingly.
7906 2018-06-25  Richard Biener  <rguenther@suse.de>
7908         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
7909         for reverse storage order accesses rather than asserting
7910         they cannot happen here.
7912 2018-06-25  Tom de Vries  <tdevries@suse.de>
7914         PR debug/86257
7915         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
7916         Use data16 instead of .byte for insn prefix.
7918 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
7920         PR C++/86082
7921         * parser.c (make_char_string_pack): Pass this literal chars
7922         through cpp_interpret_string.
7923         (cp_parser_userdef_numeric_literal): Check the result of
7924         make_char_string_pack.
7926 2018-06-24  Maya Rashish  <coypu@sdf.org>
7928         * ginclude/stddef.h: Simplify conditions around avoiding
7929         re-definition of __size_t.
7931 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
7933         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
7934         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
7936 2018-06-22  Maya Rashish  <coypu@sdf.org>
7938         * doc/invoke.texi (mno-fancy-math-387): Update for changes
7939         made to OpenBSD and NetBSD through the years.
7941 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7943         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7944         behavior of vec_pack (vector double, vector double) to match
7945         behavior of vec_float2 (vector double, vector double).
7947 2018-06-22  Olivier Hainque  <hainque@adacore.com>
7949         * gimplify.c (gimplify_function_tree): Prevent creation
7950         of a trampoline for the address of the current function
7951         passed to entry/exit instrumentation hooks.
7953 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
7955         PR target/86222
7956         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
7957         correctly.
7959 2018-06-22  Martin Liska  <mliska@suse.cz>
7961         PR tree-optimization/86263
7962         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7963         Bail out if is_enabled is false.
7964         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
7965         New declaration.
7966         (jump_table_cluster::is_enabled): New function.
7968 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
7970         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
7971         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
7972         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
7973         (lto_input_ts_binfo_tree_pointers): Likewise.
7974         * tree-streamer-out.c (streamer_write_tree_bitfields,
7975         write_ts_binfo_tree_pointers): Likewise.
7976         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
7978 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
7980         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
7982 2018-06-22  Martin Liska  <mliska@suse.cz>
7984         * symbol-summary.h (get): Make it pure and inline move
7985         functionality from ::get function.
7986         (get): Remove and inline into ::get and ::get_create.
7987         (get_create): Move code from ::get function.
7989 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7991         PR target/85994
7992         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
7993         -x assembler-with-cpp.
7995 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7997         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
7998         _FILE_OFFSET_BITS=64 for C++.
8000 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
8002         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
8003         conversion insn that shows up when pr85657-3.c is compiled using
8004         IEEE 128-bit long double.
8005         (neg<mode>2_internal): Use the correct mode to check whether the
8006         mode is IBM extended.
8007         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
8008         multiply and divide external functions from being created more
8009         than once.
8011 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
8013         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
8014         functions.
8015         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
8016         the edge can be forwarded.
8017         (cfg_layout_merge_blocks): Likewise.
8019 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
8021         * except.c (finish_eh_generation): Commit edge insertions only after
8022         the EH edges have been redirected from post-landing to landing pads.
8024 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
8026         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
8027         create_tmp_var_for to create the FRAME decl.
8028         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
8030 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
8032         * tree-inline.c (copy_edges_for_bb): Minor tweak.
8033         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
8034         debug statement when resetting its value.
8035         (expand_call_inline): Copy the locus of the call onto the assignment
8036         of the return value, if any.  Use local variable in more cases.
8038 2018-06-21  Martin Liska  <mliska@suse.cz>
8040         * ipa-pure-const.c (propagate_nothrow): Use
8041         funct_state_summaries->get.
8042         (dump_malloc_lattice): Likewise.
8043         (propagate_malloc): Likewise.
8045 2018-06-21  Richard Biener  <rguenther@suse.de>
8047         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
8048         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
8049         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
8050         comment.
8051         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
8052         BLOCK_ABSTRACT_ORIGIN unconditionally.
8054 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
8056         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
8057         deleting it.
8058         * ipa-reference.c (ipa_reference_c_finalize): Delete
8059         ipa_ref_opt_sum_summaries and set it to NULL.
8061 2018-06-21  Tom de Vries  <tdevries@suse.de>
8063         PR tree-optimization/85859
8064         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
8065         test with comment from bb_no_side_effects_p.
8067 2018-06-21  Richard Biener  <rguenther@suse.de>
8069         PR tree-optimization/86232
8070         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
8071         max for constant niter.
8073 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8075         * config/aarch64/aarch64-simd.md
8076         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
8078 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8080         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
8081         Make opernads of the unspec commutative.
8083 2018-06-21  Richard Biener  <rguenther@suse.de>
8085         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
8086         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
8087         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
8088         (vect_analyze_data_ref_dependence): Re-order checks to deal with
8089         NULL DR_STEP.
8090         (vect_record_base_alignments): Do not record base alignment
8091         for gathers or scatters.
8092         (vect_compute_data_ref_alignment): Drop return value that is always
8093         true.  Bail out early for gathers or scatters.
8094         (vect_enhance_data_refs_alignment): Bail out early for gathers
8095         or scatters.
8096         (vect_find_same_alignment_drs): Likewise.
8097         (vect_analyze_data_refs_alignment): Remove dead code.
8098         (vect_slp_analyze_and_verify_node_alignment): Likewise.
8099         (vect_analyze_data_refs): For possible gathers or scatters do
8100         not create an alternate DR, just check their possible validity
8101         and mark them.  Adjust DECL_NONALIASED handling to not rely
8102         on DR_BASE_ADDRESS.
8103         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
8104         update inits of gathers or scatters.
8105         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
8106         Also copy gather/scatter flag to pattern vinfo.
8108 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8110         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
8111         behavior of vec_packsu (vector unsigned long long, vector unsigned
8112         long long) to match behavior of vec_packs with same signature.
8114 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
8115             Thomas Schwinge <thomas@codesourcery.com>
8116             Cesar Philippidis  <cesar@codesourcery.com>
8118         * gimplify.c (gimplify_scan_omp_clauses): Add support for
8119         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8120         (gimplify_adjust_omp_clauses): Likewise.
8121         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
8122         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
8123         (gimplify_omp_target_update): Update handling of acc update and
8124         enter/exit data.
8125         * omp-low.c (install_var_field): Remove unused parameter
8126         base_pointers_restrict.
8127         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
8128         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
8129         FINALIZE}
8130         (omp_target_base_pointers_restrict_p): Delete.
8131         (scan_omp_target): Update call to scan_sharing_clauses.
8132         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
8133         FINALIZE}.
8134         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
8135         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8136         (convert_local_omp_clauses): Likewise.
8137         * tree-pretty-print.c (dump_omp_clause): Likewise.
8138         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
8139         FINALIZE}.
8140         (omp_clause_code_name): Likewise.
8142 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
8144         PR debug/86194
8145         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
8146         be narrowed.
8148         PR tree-optimization/86231
8149         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
8150         anti-range don't overwrite *vr0min before using it to compute *vr0max.
8152 2018-06-20  Tom de Vries  <tdevries@suse.de>
8154         PR tree-optimization/86097
8155         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
8156         iv type if signedness of iv type is not the same as that of *nit.
8158 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
8160         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
8161         EDGE_EH edges, verify they are all EDGE_EH.
8163 2018-06-20  Maya Rashish  <coypu@sdf.org>
8165         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
8167 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8169         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
8170         * config/aarch64/aarch64.c (xgene1_tunings): Add
8171         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
8172         (aarch64_mode_valid_for_sched_fusion_p):
8173         Allow 16-byte modes.
8174         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
8175         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
8176         128-bit modes.
8177         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
8178         New pattern.
8179         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
8180         * config/aarch64/iterators.md (VQ2): New mode iterator.
8182 2018-06-20  Martin Liska  <mliska@suse.cz>
8184         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
8185         Change default ratio from 10 to 8.
8187 2018-06-20  Martin Liska  <mliska@suse.cz>
8189         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8190         New.
8191         (bit_test_cluster::find_bit_tests): Likewise.
8192         (switch_decision_tree::analyze_switch_statement): Find clusters.
8193         * tree-switch-conversion.h (struct jump_table_cluster): Document
8194         hierarchy.
8196 2018-06-20  Martin Liska  <mliska@suse.cz>
8198         * tree-switch-conversion.c (switch_conversion::collect):
8199         Record m_uniq property.
8200         (switch_conversion::expand): Bail out for special conditions.
8201         (group_cluster::~group_cluster): New.
8202         (group_cluster::group_cluster): Likewise.
8203         (group_cluster::dump): Likewise.
8204         (jump_table_cluster::emit): New.
8205         (switch_decision_tree::fix_phi_operands_for_edges): New.
8206         (struct case_node): Remove struct.
8207         (jump_table_cluster::can_be_handled): New.
8208         (case_values_threshold): Moved to header.
8209         (reset_out_edges_aux): Likewise.
8210         (jump_table_cluster::is_beneficial): New.
8211         (bit_test_cluster::can_be_handled): Likewise.
8212         (add_case_node): Remove.
8213         (bit_test_cluster::is_beneficial): New.
8214         (case_bit_test::cmp): New.
8215         (bit_test_cluster::emit): New.
8216         (expand_switch_as_decision_tree_p): Remove.
8217         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
8218         (fix_phi_operands_for_edge): Likewise.
8219         (switch_decision_tree::analyze_switch_statement): New.
8220         (compute_cases_per_edge): Move ...
8221         (switch_decision_tree::compute_cases_per_edge): ... here.
8222         (try_switch_expansion): Likewise.
8223         (switch_decision_tree::try_switch_expansion): Likewise.
8224         (record_phi_operand_mapping): Likewise.
8225         (switch_decision_tree::record_phi_operand_mapping): Likewise.
8226         (emit_case_decision_tree): Likewise.
8227         (switch_decision_tree::emit): Likewise.
8228         (balance_case_nodes): Likewise.
8229         (switch_decision_tree::balance_case_nodes): Likewise.
8230         (dump_case_nodes): Likewise.
8231         (switch_decision_tree::dump_case_nodes): Likewise.
8232         (emit_jump): Likewise.
8233         (switch_decision_tree::emit_jump): Likewise.
8234         (emit_cmp_and_jump_insns): Likewise.
8235         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
8236         (emit_case_nodes): Likewise.
8237         (switch_decision_tree::emit_case_nodes): Likewise.
8238         (conditional_probability): Remove.
8239         * tree-switch-conversion.h (enum cluster_type): New.
8240         (PRINT_CASE): New.
8241         (struct cluster): Likewise.
8242         (cluster::cluster): Likewise.
8243         (struct simple_cluster): Likewise.
8244         (simple_cluster::simple_cluster): Likewise.
8245         (struct group_cluster): Likewise.
8246         (struct jump_table_cluster): Likewise.
8247         (struct bit_test_cluster): Likewise.
8248         (struct min_cluster_item): Likewise.
8249         (struct case_tree_node): Likewise.
8250         (case_tree_node::case_tree_node): Likewise.
8251         (jump_table_cluster::case_values_threshold): Likewise.
8252         (struct case_bit_test): Likewise.
8253         (struct switch_decision_tree): Likewise.
8254         (struct switch_conversion): Likewise.
8255         (switch_decision_tree::reset_out_edges_aux): Likewise.
8257 2018-06-20  Martin Liska  <mliska@suse.cz>
8259         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
8260         (hoist_edge_and_branch_if_true): Likewise.
8261         (expand_switch_using_bit_tests_p): Likewise.
8262         (struct case_bit_test): Likewise.
8263         (case_bit_test_cmp): Likewise.
8264         (emit_case_bit_tests): Likewise.
8265         (switch_conversion::switch_conversion): New class.
8266         (struct switch_conv_info): Remove old struct.
8267         (collect_switch_conv_info): More to ...
8268         (switch_conversion::collect): ... this.
8269         (check_range): Likewise.
8270         (switch_conversion::check_range): Likewise.
8271         (check_all_empty_except_final): Likewise.
8272         (switch_conversion::check_all_empty_except_final): Likewise.
8273         (check_final_bb): Likewise.
8274         (switch_conversion::check_final_bb): Likewise.
8275         (create_temp_arrays): Likewise.
8276         (switch_conversion::create_temp_arrays): Likewise.
8277         (free_temp_arrays): Likewise.
8278         (gather_default_values): Likewise.
8279         (switch_conversion::gather_default_values): Likewise.
8280         (build_constructors): Likewise.
8281         (switch_conversion::build_constructors): Likewise.
8282         (constructor_contains_same_values_p): Likewise.
8283         (switch_conversion::contains_same_values_p): Likewise.
8284         (array_value_type): Likewise.
8285         (switch_conversion::array_value_type): Likewise.
8286         (build_one_array): Likewise.
8287         (switch_conversion::build_one_array): Likewise.
8288         (build_arrays): Likewise.
8289         (switch_conversion::build_arrays): Likewise.
8290         (gen_def_assigns): Likewise.
8291         (switch_conversion::gen_def_assigns): Likewise.
8292         (prune_bbs): Likewise.
8293         (switch_conversion::prune_bbs): Likewise.
8294         (fix_phi_nodes): Likewise.
8295         (switch_conversion::fix_phi_nodes): Likewise.
8296         (gen_inbound_check): Likewise.
8297         (switch_conversion::gen_inbound_check): Likewise.
8298         (process_switch): Use the newly created class.
8299         (switch_conversion::expand): New.
8300         (switch_conversion::~switch_conversion): New.
8301         * tree-switch-conversion.h: New file.
8303 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8305         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
8306         tree-vect-patterns.c.
8307         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
8308         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
8309         (vect_recog_sad_pattern): Likewise.
8310         (vect_recog_widen_sum_pattern): Likewise.
8311         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
8312         (vect_recog_widen_shift_pattern): Remove the type_in argument.
8313         (vect_recog_rotate_pattern): Likewise.
8314         (vect_recog_mult_pattern): Likewise.
8315         (vect_recog_vector_vector_shift_pattern): Likewise.
8316         (vect_recog_divmod_pattern): Likewise.
8317         (vect_recog_mixed_size_cond_pattern): Likewise.
8318         (vect_recog_bool_pattern): Likewise.
8319         (vect_recog_mask_conversion_pattern): Likewise.
8320         (vect_try_gather_scatter_pattern): Likewise.
8321         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
8322         (vect_recog_over_widening_pattern): Likewise.
8323         (vect_recog_gather_scatter_pattern): Likewise.
8324         (vect_recog_func_ptr): Move from tree-vectorizer.h
8325         (vect_vect_recog_func_ptrs): Move further down the file.
8326         (vect_recog_func): Likewise.  Remove the third argument.
8327         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
8328         (vect_pattern_recog_1): Expect the pattern function to do any
8329         necessary target tests.  Also expect it to provide a vector type.
8330         Remove the type_in handling.
8332 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8334         * tree-vect-patterns.c (vect_pattern_detected): New function.
8335         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
8336         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
8337         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
8338         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
8339         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
8340         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
8341         (vect_recog_mask_conversion_pattern)
8342         (vect_try_gather_scatter_pattern): Likewise.
8344 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8346         * tree-vect-patterns.c (vect_get_internal_def): New function.
8347         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
8348         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
8349         (search_type_for_mask_1): Use it.
8351 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8353         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8354         redundant WIDEN_SUM_EXPR handling.
8355         (vect_recog_sad_pattern): Likewise.
8357 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8359         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8360         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
8361         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
8362         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
8363         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
8365 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8367         * tree-vect-stmts.c (vectorizable_call): Make sure that we
8368         use the stmt_vec_info of the original bb statement for the
8369         new zero assignment, even if the call is part of a pattern.
8371 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8373         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
8374         that the sequence is attached to the original statement rather
8375         than the pattern statement.
8376         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
8377         PATTERN_DEF_SEQ from the original statement rather than
8378         the main pattern statement.
8379         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
8380         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
8381         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
8383 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8385         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
8386         definition statements before the early exit for statements that aren't
8387         live or relevant.
8388         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
8389         split out from...
8390         (vect_transform_loop): ...here.  Process pattern definition
8391         statements without first checking whether the main pattern
8392         statement is live or relevant.
8394 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
8396         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
8397         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
8399 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
8401         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
8402         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
8403         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
8404         (expand_block_compare): Change select_block_compare_mode call.
8405         (expand_strncmp_align_check): Use new functions, fix comment.
8406         (emit_final_str_compare_gpr): New function.
8407         (expand_strn_compare): Refactor and clean up code.
8408         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
8410 2018-06-19  Tony Reix  <tony.reix@atos.com>
8411             Damien Bergamini  <damien.bergamini@atos.com>
8412             David Edelsohn  <dje.gcc@gmail.com>
8414         * collect2.c (static_obj): New variable.
8415         (static_libs): New variable.
8416         (is_in_list): Uncomment declaration.
8417         (main): Track AIX libraries linked statically.
8418         (is_in_list): Uncomment definition.
8419         (scan_prog_file): Don't add AIX shared libraries initializer
8420         to constructor list if linking statically.
8422 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
8424         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
8425         constant.
8426         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
8428 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
8430         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
8431         blocks.
8433 2018-06-19  Martin Liska  <mliska@suse.cz>
8435         * config/i386/i386.c (ix86_can_inline_p): Do not use
8436         ipa_fn_summaries::get_create.
8437         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
8438         get.
8439         (devirtualization_time_bonus): Likewise.
8440         (ipcp_propagate_stage): Likewise.
8441         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
8442         (edge_set_predicate): Likewise.
8443         (evaluate_conditions_for_known_args): Likewise.
8444         (evaluate_properties_for_edge): Likewise.
8445         (ipa_call_summary::reset): Tranform to ...
8446         (ipa_call_summary::~ipa_call_summary): ... this.
8447         (ipa_fn_summary::reset): Transform to ...
8448         (ipa_fn_summary::~ipa_fn_summary): ... this.
8449         (ipa_fn_summary_t::remove): Rename to ...
8450         (ipa_fn_summary_t::remove_callees): ... this.
8451         (ipa_fn_summary_t::duplicate): Use placement new
8452         instead of memory copy.
8453         (ipa_call_summary_t::duplicate): Likewise.
8454         (ipa_call_summary_t::remove): Remove.
8455         (dump_ipa_call_summary): Change get_create to get.
8456         (ipa_dump_fn_summary): Dump only when summary exists.
8457         (analyze_function_body): Use symbol_summary::get instead
8458         of get_create.
8459         (compute_fn_summary): Likewise.
8460         (estimate_edge_devirt_benefit): Likewise.
8461         (estimate_edge_size_and_time): Likewise.
8462         (inline_update_callee_summaries): Likewise.
8463         (remap_edge_change_prob): Likewise.
8464         (remap_edge_summaries): Likewise.
8465         (ipa_merge_fn_summary_after_inlining): Likewise.
8466         (write_ipa_call_summary): Likewise.
8467         (ipa_fn_summary_write): Likewise.
8468         (ipa_free_fn_summary): Likewise.
8469         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
8470         (struct ipa_call_summary): Likewise.
8471         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
8472         of get_create.
8473         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
8474         (estimate_size_after_inlining): Likewise.
8475         (estimate_growth): Likewise.
8476         (growth_likely_positive): Likewise.
8477         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
8478         (inline_call): Likewise.
8479         * ipa-inline.c (caller_growth_limits): Likewise.
8480         (can_inline_edge_p): Likewise.
8481         (can_inline_edge_by_limits_p): Likewise.
8482         (compute_uninlined_call_time): Likewise.
8483         (compute_inlined_call_time): Likewise.
8484         (want_inline_small_function_p): Likewise.
8485         (edge_badness): Likewise.
8486         (update_caller_keys): Likewise.
8487         (update_callee_keys): Likewise.
8488         (inline_small_functions): Likewise.
8489         (inline_to_all_callers_1): Likewise.
8490         (dump_overall_stats): Likewise.
8491         (early_inline_small_functions): Likewise.
8492         (early_inliner): Likewise.
8493         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
8494         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8495         * ipa-pure-const.c (malloc_candidate_p): Likewise.
8496         * ipa-split.c (execute_split_functions): Likewise.
8497         * symbol-summary.h: Likewise.
8498         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
8500 2018-06-19  Richard Biener  <rguenther@suse.de>
8502         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
8503         (vectorize_loops): ... here.  Fix dbgcnt handling.
8504         (try_vectorize_loop): Wrap try_vectorize_loop_1.
8506 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
8508         PR target/86197
8509         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
8510         ieee128 argument takes up only one (vector) register, not two (floating
8511         point) registers.
8513 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
8515         * gimplify.c (gimplify_init_constructor): Really never clear for an
8516         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
8518 2018-06-19  Richard Biener  <rguenther@suse.de>
8520         PR tree-optimization/86179
8521         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
8522         after failed recognition.
8524 2018-06-18  Martin Sebor  <msebor@redhat.com>
8526         PR middle-end/85602
8527         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
8528         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
8529         Handle integer subtraction.
8530         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
8531         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
8533 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
8535         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
8536         param from rtx to rtx_insn *.
8537         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
8538         param.
8539         (frv_ifcvt_modify_insn): Likwise.
8540         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
8541         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
8542         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
8543         as_a <rtx_insn *> cast to local "unprotected_region" once
8544         it's been established that it's not NULL or pc_rtx.
8545         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
8546         param "sethi" from rtx to rtx_insn *.
8547         (nds32_group_float_insns): Likewise for param "insn".
8548         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
8549         param.
8550         (vax_output_int_subtract): Likewise.
8551         * config/vax/vax.c (vax_output_int_add): Likewise for param
8552         "insn".
8553         (vax_output_int_subtract): Likewise.
8554         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
8555         (emit_pattern_after): Likewise for param "after".
8556         (emit_insn_after): Likewise.
8557         (emit_jump_insn_after): Likewise.
8558         (emit_call_insn_after): Likewise.
8559         (emit_debug_insn_after): Likewise.
8560         (emit_pattern_before): Likewise for param "before".
8561         (emit_insn_before): Likewise.
8562         (emit_jump_insn_before): Likewise.
8563         * final.c (get_insn_template): Likewise for param "insn", removing
8564         a cast.
8565         * output.h (get_insn_template): Likewise for 2nd param.
8566         * rtl.h (emit_insn_before): Likewise.
8567         (emit_jump_insn_before): Likewise.
8568         (emit_debug_insn_before_noloc): Likewise.
8569         (emit_insn_after): Likewise.
8570         (emit_jump_insn_after): Likewise.
8571         (emit_call_insn_after): Likewise.
8572         (emit_debug_insn_after): Likewise.
8573         (set_insn_deleted): Likewise for param.
8575 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
8577         PR target/85358
8578         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
8579         floating point modes, so that IFmode is numerically greater than
8580         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
8581         to declare the ordering.  This prevents IFmode from being
8582         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
8583         machine.  Include rs6000-modes.h to share the fractional values
8584         between genmodes* and the rest of the compiler.
8585         (IFmode): Likewise.
8586         (KFmode): Likewise.
8587         (TFmode): Likewise.
8588         * config/rs6000/rs6000-modes.h: New file.
8589         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
8590         meaning of rs6000_long_double_size so that 126..128 selects an
8591         appropriate 128-bit floating point type.
8592         (rs6000_option_override_internal): Likewise.
8593         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
8594         (TARGET_LONG_DOUBLE_128): Change the meaning of
8595         rs6000_long_double_size so that 126..128 selects an appropriate
8596         128-bit floating point type.
8597         (LONG_DOUBLE_TYPE_SIZE): Update comment.
8598         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
8599         source and destination to match the standard usage.
8600         (truncifkf2): Likewise.
8601         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
8602         ISA 2.07 to use an explicit clobber, instead of passing in a
8603         temporary.
8604         (copysign<mode>3_soft): Likewise.
8606 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
8608         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
8609         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
8610         (vect_slp_analyze_instance_dependence): Likewise.
8611         (vect_enhance_data_refs_alignment): Likewise.
8612         (vect_analyze_data_refs_alignment): Likewise.
8613         (vect_slp_analyze_and_verify_instance_alignment
8614         (vect_analyze_data_ref_accesses): Likewise.
8615         (vect_prune_runtime_alias_test_list): Likewise.
8616         (vect_analyze_data_refs): Likewise.
8617         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
8618         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
8619         (vect_analyze_scalar_cycles_1): Likewise.
8620         (vect_get_loop_niters): Likewise.
8621         (vect_analyze_loop_form_1): Likewise.
8622         (vect_update_vf_for_slp): Likewise.
8623         (vect_analyze_loop_operations): Likewise.
8624         (vect_analyze_loop): Likewise.
8625         (vectorizable_induction): Likewise.
8626         (vect_transform_loop): Likewise.
8627         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
8628         * tree-vect-slp.c (vect_analyze_slp): Likewise.
8629         (vect_make_slp_decision): Likewise.
8630         (vect_detect_hybrid_slp): Likewise.
8631         (vect_slp_analyze_operations): Likewise.
8632         (vect_slp_bb): Likewise.
8633         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
8634         (vectorizable_bswap): Likewise.
8635         (vectorizable_call): Likewise.
8636         (vectorizable_simd_clone_call): Likewise.
8637         (vectorizable_conversion): Likewise.
8638         (vectorizable_assignment): Likewise.
8639         (vectorizable_shift): Likewise.
8640         (vectorizable_operation): Likewise.
8641         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
8643 2018-06-18  Martin Sebor  <msebor@redhat.com>
8645         PR tree-optimization/81384
8646         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
8647         * builtins.c (expand_builtin_strnlen): New function.
8648         (expand_builtin): Call it.
8649         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
8650         * builtins.def (BUILT_IN_STRNLEN): New.
8651         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
8652         Warn for bounds in excess of maximum object size.
8653         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
8654         single-value ranges.  Handle strnlen.
8655         (handle_builtin_strlen): Handle strnlen.
8656         (strlen_check_and_optimize_stmt): Same.
8657         * doc/extend.texi (Other Builtins): Document strnlen.
8659 2018-06-18  Maya Rashish  <coypu@sdf.org>
8661         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
8662         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
8663         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
8665         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
8666         here to ...
8667         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
8669 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
8671         * tree.c (escaped_string::escape): Replace cast to char * by
8672         const_cast<char *> (unescaped).
8674 2018-06-18  Nick Clifton  <nickc@redhat.com>
8676         PR 84195
8677         * tree.c (escaped_string): New class.  Converts an unescaped
8678         string into its escaped equivalent.
8679         (warn_deprecated_use): Use the new class to convert the
8680         deprecation message, if present.
8681         (test_escaped_strings): New self test.
8682         (test_c_tests): Add test_escaped_strings.
8683         * doc/extend.texi (deprecated): Add a note that the
8684         deprecation message is affected by the -fmessage-length
8685         option, and that control characters will be escaped.
8686         (#pragma GCC error): Document this pragma.
8687         (#pragma GCC warning): Likewise.
8688         * doc/invoke.texi (-fmessage-length): Document this option's
8689         effect on the #warning and #error preprocessor directives and
8690         the deprecated attribute.
8692 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
8694         * tree.c (decl_value_expr_lookup): Revert latest change.
8695         (decl_value_expr_insert): Likewise.
8697 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
8699         * gimplify.c (nonlocal_vlas): Delete.
8700         (nonlocal_vla_vars): Likewise.
8701         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
8702         referenced VLAs.
8703         (gimplify_body): Do not create and destroy nonlocal_vlas.
8704         * tree-nested.c: Include diagnostic.h.
8705         (use_pointer_in_frame): Tweak.
8706         (lookup_field_for_decl): Add assertion and declare the transformation.
8707         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
8708         internal error when the reference is in a wrong context.  Do not
8709         create a debug decl by default.
8710         (note_nonlocal_block_vlas): Delete.
8711         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
8712         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
8713         create a debug decl by default.
8714         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
8715         call is in a wrong context.
8716         (fixup_vla_decls): New function.
8717         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
8718         debug variables were created.
8719         * tree.c (decl_value_expr_lookup): Add checking assertion.
8720         (decl_value_expr_insert): Likewise.
8722 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
8724         PR middle-end/82479
8725         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
8726         * tree-scalar-evolution.c (interpret_expr): Likewise.
8727         (expression_expensive_p): Likewise.
8728         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
8729         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
8730         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
8731         (ssa_defined_by_minus_one_stmt_p): New.
8733 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
8735         PR middle-end/64946
8736         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
8737         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
8738         * dojump.c (do_jump): Likewise.
8739         * expr.c (expand_expr_real_2): Check operand type's sign.
8740         * fold-const.c (const_unop): Handle ABSU_EXPR.
8741         (fold_abs_const): Likewise.
8742         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
8743         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
8744         (strip_sign_op_1): Likesise.
8745         * match.pd: Add new pattern to generate ABSU_EXPR.
8746         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
8747         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
8748         * tree-eh.c (operation_could_trap_helper_p): Likewise.
8749         * tree-inline.c (estimate_operator_cost): Likewise.
8750         * tree-pretty-print.c (dump_generic_node): Likewise.
8751         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
8752         * tree.def (ABSU_EXPR): New.
8754 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
8756         PR middle-end/86095
8757         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
8758         documented as preserved for backward compatibility only.
8759         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
8761         PR rtl-optimization/86108
8762         * bb-reorder.c (create_forwarder_block): Renamed to ...
8763         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
8764         jump from new landing pad to the second part.
8765         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
8766         Adjust callers.
8768 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
8770         PR middle-end/85878
8771         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
8772         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
8773         Only call store_expr for halves if the mode is the same.
8775         PR middle-end/86123
8776         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
8777         Fix up comment formatting.
8779 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8781         * typed-splay-tree.h (typed_splay_tree::remove): New function.
8782         (typed_splay_tree::closure,
8783         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
8784         (typed_splay_tree::typed_splay_tree,
8785         typed_splay_tree::operator =): Declared private.
8786         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
8787         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
8788         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
8789         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
8790         typed_splay_tree::splay_tree_splay,
8791         typed_splay_tree::splay_tree_foreach_helper,
8792         typed_splay_tree::splay_tree_insert,
8793         typed_splay_tree::splay_tree_remove,
8794         typed_splay_tree::splay_tree_lookup,
8795         typed_splay_tree::splay_tree_predecessor,
8796         typed_splay_tree::splay_tree_successor,
8797         typed_splay_tree::splay_tree_min,
8798         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
8799         (typed_splay_tree::root, typed_splay_tree::comp,
8800         typed_splay_tree::delete_key,
8801         typed_splay_tree::delete_value): New data members.
8802         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
8803         typed_splay_tree::remove.
8805 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
8807         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
8808         -mginv and -mno-ginv to the assembler.
8809         * config/mips/mips.opt (-mcrc): New option.
8810         (-mginv): Likewise.
8811         * doc/invoke.text (-mcrc): Document.
8812         (-mginv): Likewise.
8814 2018-06-15  Nick Clifton  <nickc@redhat.com>
8816         PR 84195
8817         * tree.c (escaped_string): New class.  Converts an unescaped
8818         string into its escaped equivalent.
8819         (warn_deprecated_use): Use the new class to convert the
8820         deprecation message, if present.
8821         (test_escaped_strings): New self test.
8822         (test_c_tests): Add test_escaped_strings.
8823         * doc/extend.texi (deprecated): Add a note that the
8824         deprecation message is affected by the -fmessage-length
8825         option, and that control characters will be escaped.
8826         (#pragma GCC error): Document this pragma.
8827         (#pragma GCC warning): Likewise.
8828         * doc/invoke.texi (-fmessage-length): Document this option's
8829         effect on the #warning and #error preprocessor directives and
8830         the deprecated attribute.
8832 2018-06-15  Richard Biener  <rguenther@suse.de>
8834         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
8835         here, also noting vector size used.
8836         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
8837         size used in MSG_OPTIMIZED_LOCATIONS dump.
8838         (pass_slp_vectorize::execute): Adjust.
8840 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
8842         PR target/85968
8843         * config/arc/arc.c (arc_return_address_register): Fix
8844         if-condition.
8846 2018-06-15  Richard Biener  <rguenther@suse.de>
8848         PR middle-end/86159
8849         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
8850         leave useless conversion stripping to force_gimple_operand_gsi.
8851         (gimplify_build2): Likewise.
8852         (gimplify_build1): Likewise.
8854 2018-06-15  Richard Biener  <rguenther@suse.de>
8856         PR middle-end/86076
8857         * tree-cfg.c (move_stmt_op): unshare invariant addresses
8858         before adjusting their block.
8860 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
8862         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
8863         multilibs for *-*-rtems*.
8864         * config/riscv/t-rtems: New file.
8866 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
8868         PR middle-end/86122
8869         * match.pd ((A +- CST1) +- CST2): Punt if last resort
8870         unsigned_type_for returns NULL.
8872         PR target/85945
8873         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
8874         subregs of multi-word pseudos unless the float mode has word size.
8876 2018-06-14  Richard Biener  <rguenther@suse.de>
8878         PR middle-end/86139
8879         * tree-vect-generic.c (build_word_mode_vector_type): Remove
8880         duplicate and harmful type_hash_canon.
8881         * tree.c (type_hash_canon): Assert we didn't find ourselves.
8883 2018-06-14  Richard Biener  <rguenther@suse.de>
8885         PR ipa/86124
8886         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
8887         NULL cgraph_node.
8889 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
8891         * config/rtems.h (STDINT_LONG32): Define.
8893 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
8894             Prachi Godbole  <prachi.godbole@imgtec.com>
8896         * config/mips/mips-cpus.def: Define P6600.
8897         * config/mips/mips-tables.opt: Regenerate.
8898         * config/mips/mips.c (mips_ucbranch_type): New enum.
8899         (mips_rtx_cost_data): Add support for P6600.
8900         (mips_issue_rate): Likewise.
8901         (mips_multipass_dfa_lookahead): Likewise.
8902         (mips_avoid_hazard): Likewise.
8903         (mips_reorg_process_insns): Likewise.
8904         (mips_classify_branch_p6600): New function.
8905         * config/mips/mips.h (TUNE_P6600): New define.
8906         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
8907         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
8908         * config/mips/mips.md: Include p6600.md.
8909         (processor): Add p6600.
8910         * config/mips/p6600.md: New file.
8911         * doc/invoke.texi: Add p6600 to supported architectures.
8913 2018-06-13  Martin Sebor  <msebor@redhat.com>
8915         PR tree-optimization/86114
8916         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
8917         of integer types.
8918         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
8920 2018-06-13  Richard Biener  <rguenther@suse.de>
8922         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
8923         Properly set vector type of the intermediate stmt.
8924         * tree-vect-stmts.c (vectorizable_operation): The destination
8925         var always has vectype_out type.
8927 2018-06-13  Jeff Law  <law@redhat.com>
8929         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
8930         integer 0 for argument to print_rtl_with_bb.
8931         (rl78_reorg): Likewise.
8933 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
8935         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
8936         from rtx to rtx_insn *.
8937         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
8938         "label".
8939         (add_sched_insns_for_speculation): Likewise for local "target",
8940         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8941         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
8942         from rtx_insn ** to rtx_code_label **.
8943         (reorg_emit_nops): Likewise.
8944         (c6x_reorg): Likewise for local "call_labels".
8945         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
8946         rtx to rtx_insn *.
8947         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
8948         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
8949         the loops over LABEL_REFS.
8950         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
8951         braf_label.
8952         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8953         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
8954         (split_branches): Strengthen local "olabel" from rtx to
8955         rtx_insn *, adding a safe_as_a cast.
8956         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
8957         to "rtx_insn *".
8958         (add_insn_after): Likewise for first two params.
8959         (add_insn_before): Likewise.
8960         (remove_insn): Likewise for param.
8961         (emit_pattern_before_noloc): Likewise for second and third params.
8962         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
8963         (emit_call_insn_before_noloc): Likewise.
8964         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
8965         to "rtx_insn *".
8966         (emit_barrier_before): Likewise.
8967         (emit_label_before): Strengthen "label" param from "rtx" to
8968         "rtx_code_label *".  Strengthen "before" param from "rtx" to
8969         "rtx_insn *".
8970         (emit_insn_after_1): Strengthen "after" param from "rtx" to
8971         "rtx_insn *".
8972         (emit_pattern_after_noloc): Likewise.
8973         (emit_insn_after_noloc): Likewise.
8974         (emit_jump_insn_after_noloc): Likewise.
8975         (emit_call_insn_after_noloc): Likewise.
8976         (emit_debug_insn_after_noloc): Likewise.
8977         (emit_barrier_after): Likewise.
8978         (emit_label_after): Likewise for both params.
8979         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
8980         "loc" param from "int" to "location_t".
8981         (emit_insn_after_setloc): Likewise.
8982         (emit_jump_insn_after_setloc): Likewise.
8983         (emit_call_insn_after_setloc): Likewise.
8984         (emit_debug_insn_after_setloc): Likewise.
8985         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
8986         "loc" param from "int" to "location_t".
8987         (emit_pattern_before): Convert NULL_RTX to NULL.
8988         (emit_insn_before_setloc): Convert "loc" param from "int" to
8989         "location_t".
8990         (emit_jump_insn_before_setloc): Likewise.
8991         (emit_call_insn_before_setloc): Likewise.
8992         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
8993         rtx_insn *.  Convert "loc" param from "int" to "location_t".
8994         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
8995         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
8996         Convert 3rd param from "int" to "location_t".
8997         (emit_barrier_before, emit_barrier_after, next_real_insn):
8998         Strengthen param from rtx to rtx_insn *.
8999         (emit_label_before): Strengthen 1st param from "rtx" to
9000         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
9001         "rtx_insn *".
9002         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
9003         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
9004         Strengthen 2nd param from "rtx" to "rtx_insn *".
9005         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
9006         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
9007         Likewise. Convert 3rd param from "int" to "location_t".
9008         (emit_label_after): Strengthen 1st param from "rtx" to
9009         "rtx_code_label *".
9010         (next_real_insn, remove_insn): Strengthen param from "rtx" to
9011         "rtx_insn *".
9012         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
9013         from "rtx" to "rtx_insn *".
9015 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
9017         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
9018         bodies streamed in with -Q.
9019         * dumpfile.c (dump_files): Add lto-stream-out dump file.
9020         * dumpfile.h (tree_dump_index): Add lto_stream_out.
9021         * gimple-streamer-out.c: Include gimple-pretty-print.h
9022         (output_bb): Dump stmts streamed.
9023         * lto-section-out.c: Include print-tree.h
9024         (lto_begin_section): Dump sections created.
9025         (lto_output_decl_index): Dump decl encoded.
9026         * lto-streamer-out.c: Include print-tree.h
9027         (create_output_block): Dump output block created.
9028         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
9029         (output_function): Dump function output.
9030         (output_constructor): Dump constructor streamed.
9031         (write_global_stream): Output indexes encoded.
9032         (produce_asm_for_decls): Dump streams encoded.
9033         * lto-streamer.c (streamer_dump_file): New global var.
9034         * lto-streamer.h (streamer_dump_file): Declare.
9035         * passes.c (ipa_write_summaries): Initialize streamer dump.
9036         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
9037         in.
9039 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
9041         PR target/86048
9042         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
9043         offsets for register save directives.  Emit a second batch of save
9044         directives, if need be, when the function accesses prior frames.
9046 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9048         * config/arc/fpu.md (fmasf4): Force operand to register.
9049         (fnmasf4): Likewise.
9051 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9053         * config/arc/arc-protos.h (arc_pad_return): Remove.
9054         * config/arc/arc.c (machine_function): Remove force_short_suffix
9055         and size_reason.
9056         (arc_print_operand): Adjust printing of '&'.
9057         (arc_verify_short): Remove conditional printing of short suffix.
9058         (arc_final_prescan_insn): Remove reference to size_reason.
9059         (pad_return): New function.
9060         (arc_reorg): Call pad_return.
9061         (arc_pad_return): Remove.
9062         (arc_init_machine_status): Remove reference to force_short_suffix.
9063         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
9064         (attr length): When attribute iscompact is true force to 2
9065         regardless; in the case of maybe check if we want to force the
9066         instruction to have 4 bytes length.
9067         (nopv): Change it to generate 4 byte long nop as well.
9068         (blockage): New pattern.
9069         (simple_return): Remove call to arc_pad_return.
9070         (p_return_i): Likewise.
9072 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9074         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
9076 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9078         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
9079         ARC cores.
9081 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9083         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
9084         for ARC700 and ARCv2.
9086 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
9088         PR target/86076
9089         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
9090         operands[2] instead of operands[1].
9093 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
9095         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
9096         case, check whether the outer register overlaps an unallocatable
9097         register, not just whether it fits the required class.
9099 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
9101         * poly-int.h (can_div_trunc_p): Add new overload in which all values
9102         are poly_ints.
9103         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
9104         (memrefs_conflict_p): Likewise.
9105         (init_alias_analysis): Likewise.
9106         * cfgexpand.c (expand_debug_expr): Likewise.
9107         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
9108         * cse.c (fold_rtx): Likewise.
9109         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
9110         * expr.c (emit_block_move_hints): Likewise.
9111         (clear_storage_hints, push_block, emit_push_insn): Likewise.
9112         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
9113         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
9114         (emit_group_store): Likewise.
9115         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
9116         to read the PRE/POST_MODIFY increment.
9117         * calls.c (store_one_arg): Use strip_offset.
9118         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
9119         poly_int_rtx_p.
9120         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
9121         by a VEC_SELECT.
9122         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
9123         (simplify_binary_operation_1): Extend CONST_INT handling to
9124         poly_int_rtx_p.
9125         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
9126         than a HOST_WIDE_INT.
9127         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
9128         poly_int64.
9129         (adjust_mems, add_stores): Update accodingly.
9130         (vt_canonicalize_addr): Track polynomial offsets.
9131         (emit_note_insn_var_location): Likewise.
9132         (vt_add_function_parameter): Likewise.
9133         (vt_initialize): Likewise.
9135 2018-06-12  Jeff Law  <law@redhat.com>
9137         * config.gcc (alpha*-*-freebsd*): Remove.
9138         * config/alpha/freebsd.h: Remove.
9140 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
9142         PR other/69968
9143         * spellcheck-tree.c (levenshtein_distance): Rename to...
9144         (get_edit_distance): ...this, and update for underlying renaming.
9145         * spellcheck-tree.h (levenshtein_distance): Rename to...
9146         (get_edit_distance): ...this.
9147         * spellcheck.c (levenshtein_distance): Rename to...
9148         (get_edit_distance): ...this.  Convert from Levenshtein distance
9149         to Damerau-Levenshtein distance by supporting transpositions of
9150         adjacent characters.  Rename "v1" to "v_next" and "v0" to
9151         "v_one_ago".
9152         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
9153         (selftest::test_edit_distance_unit_test_oneway): ...this, and
9154         update for underlying renaming.
9155         (selftest::levenshtein_distance_unit_test): Rename to...
9156         (selftest::test_get_edit_distance_unit): ...this, and update for
9157         underlying renaming.
9158         (selftest::test_find_closest_string): Add example from PR 69968
9159         where transposition helps
9160         (selftest::test_metric_conditions): Update for renaming.
9161         (selftest::test_metric_conditions): Likewise.
9162         (selftest::spellcheck_c_tests): Likewise.
9163         * spellcheck.h (levenshtein_distance): Rename both overloads to...
9164         (get_edit_distance): ...this.
9165         (best_match::consider): Update for renaming.
9167 2018-06-12  Martin Sebor  <msebor@redhat.com>
9169         PR tree-optimization/85259
9170         * builtins.c (compute_objsize): Handle constant offsets.
9171         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
9172         true iff a warning has been issued.
9173         * gimple.h (gimple_nonartificial_location): New function.
9174         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
9175         gimple_nonartificial_location and handle -Wno-system-headers.
9176         (handle_builtin_stxncpy): Same.
9178 2018-06-12  Martin Sebor  <msebor@redhat.com>
9180         PR c/85931
9181         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
9183 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
9185         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
9186         BUILTIN_VEC_XST entries for pointer to double and long long.
9188 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
9190         PR target/85990
9191         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9192         Update comments.
9193         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9194         Likewise.
9196 2018-06-12  Martin Liska  <mliska@suse.cz>
9198         * doc/options.texi: Document IntegerRange.
9200 2018-06-12  Martin Liska  <mliska@suse.cz>
9202         * config/i386/i386.opt: Make MPX-related options as Deprecated.
9203         * opt-functions.awk: Handle Deprecated flag.
9204         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
9205         and report error.
9206         (read_cmdline_option): Report warning for a deprecated option.
9207         * opts.h (struct cl_option): Add new field cl_deprecated.
9208         (CL_ERR_DEPRECATED): New.
9210 2018-06-12  Martin Liska  <mliska@suse.cz>
9212         * doc/options.texi: Document Deprecated option flag.
9214 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9216         * config/arc/arc-arch.h (arc_extras): New enum.
9217         (arc_cpu_t):Add field extra.
9218         (arc_cpu_types): Consider the extras.
9219         * config/arc/arc-cpus.def: Add extras info.
9220         * config/arc/arc-opts.h (processor_type): Consider extra field.
9221         * config/arc/arc.c (arc_override_options): Handle extra field.
9223 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9225         * config/arc/arc-arch.h: Update ARC_OPTX macro.
9226         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
9227         field.
9228         * config/arc/arc.c (arc_init): Update pic warning.
9229         (irq_range): Update irq range parsing warnings.
9230         (arc_override_options): Update various warning messages.
9231         (arc_handle_aux_attribute): Likewise.
9233 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
9235         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
9237 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
9239         * doc/sourcebuild.texi: Document usage of line number 0 in verify
9240         compiler messages directives.
9242 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
9244         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
9245         * config/mips/mips-tables.opt: Regenerate.
9246         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
9247         mips64r6.
9248         * doc/invoke.texi: Document -march=i6500.
9250 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
9252         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
9253         (i6400_gpmul): Add cpu_unit.
9254         (i6400_gpdiv): Likewise.
9255         (i6400_msa_add_d): Update reservations.
9256         (i6400_msa_int_add) Likewise.
9257         (i6400_msa_short_logic3) Likewise.
9258         (i6400_msa_short_logic2) Likewise.
9259         (i6400_msa_short_logic) Likewise.
9260         (i6400_msa_move) Likewise.
9261         (i6400_msa_cmp) Likewise.
9262         (i6400_msa_short_float2) Likewise.
9263         (i6400_msa_div_d) Likewise.
9264         (i6400_msa_long_logic1) Likewise.
9265         (i6400_msa_long_logic2) Likewise.
9266         (i6400_msa_mult) Likewise.
9267         (i6400_msa_long_float2) Likewise.
9268         (i6400_msa_long_float4) Likewise.
9269         (i6400_msa_long_float5) Likewise.
9270         (i6400_msa_long_float8) Likewise.
9271         (i6400_fpu_fadd): Include frint type.
9272         (i6400_fpu_store): New define_insn_reservation.
9273         (i6400_fpu_load): Likewise.
9274         (i6400_fpu_move): Likewise.
9275         (i6400_fpu_fcmp): Likewise.
9276         (i6400_fpu_fmadd): Likewise.
9277         (i6400_int_mult): Include imul3nc type and update reservation.
9278         (i6400_int_div): Include idiv3 type and update reservation.
9279         (i6400_int_load): Update to check type not move_type.
9280         (i6400_int_store): Likewise.
9281         (i6400_int_prefetch): Set zero latency.
9283 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
9285         * gcc.c: Document new %@{...} sequence.
9286         (LINK_COMMAND_SPEC): Use it for the -L switches.
9287         (cpp_unique_options): Use it for the -I switches.
9288         (at_file_argbuf): New global variable.
9289         (in_at_file): Likewise.
9290         (alloc_args): Create at_file_argbuf.
9291         (clear_args): Truncate at_file_argbuf.
9292         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
9293         (open_at_file): New function.
9294         (close_at_file): Likewise.
9295         (create_at_file): Delete.
9296         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
9297         <'o'>: Likewise.
9298         <'@'>: New case.
9299         (validate_switches_from_spec): Deal with %@{...} sequence.
9300         (validate_switches): Likewise.
9301         (driver::finalize): Call clear_args.
9303 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
9305         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
9307 2018-06-11  Martin Sebor  <msebor@redhat.com>
9309         * doc/invoke.texi (-Wall): List -Wc++17-compat.
9310         (Wno-class-memaccess): Add @opindex.
9311         (Wno-templates, Wno-multiple-inheritance): Same.
9312         (Wno-virtual-inheritance, Wno-namespaces): Same.
9313         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
9314         (Wno-format-overflow, Wno-format-truncation): Same.
9315         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
9316         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
9317         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
9318         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
9319         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
9320         (Wno-misspelled-isr): Same.
9322 2018-06-11  Martin Sebor  <msebor@redhat.com>
9324         * PR tree-optimization/86083
9325         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
9327 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
9329         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
9331 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
9333         PR target/85755
9334         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
9335         on the correct operand.
9336         (*movdi_internal64): Ditto.
9338 2018-06-11  Martin Liska  <mliska@suse.cz>
9340         PR tree-optimization/86089
9341         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
9343 2018-06-11  Julia Koval  <julia.koval@intel.com>
9345         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
9346         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
9347         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
9349 2018-06-11  Olivier Hainque  <hainque@adacore.com>
9351         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
9352         for Ada with strict dwarf2.
9354 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
9356         PR target/85755
9357         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
9358         addresses.
9360 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
9362         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
9364 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
9366         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
9367         TARGET_ELF.
9369 2018-06-08  Martin Liska  <mliska@suse.cz>
9371         * tree-cfg.h (debug_function): Fix argument type to match
9372         implementation.
9374 2018-06-08  Martin Liska  <mliska@suse.cz>
9376         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
9377         Remove usage of MPX-related (and removed) fields.
9378         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
9380 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
9382         * cfg.c (debug): Use TDF_NONE rather than 0.
9383         * cfghooks.c (debug): Likewise.
9384         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
9385         (struct dump_option_value_info): Convert to...
9386         (struct kv_pair): ...this template type.
9387         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
9388         rather than 0.
9389         (optinfo_verbosity_options): Likewise.
9390         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
9391         OPTGROUP_NONE.
9392         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
9393         than int for "optgroup_flags" param.
9394         (dump_generic_expr_loc): Use dump_flags_t rather than int for
9395         "dump_kind" param.
9396         (dump_dec): Likewise.
9397         (dump_finish): Use TDF_NONE rather than 0.
9398         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
9399         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
9400         than 0.  Update for change to option_ptr.
9401         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
9402         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
9403         0.  Update for changes to optinfo_verbosity_options and
9404         optgroup_options.
9405         (opt_info_switch_p): Convert optgroup_flags from int to
9406         optgroup_flags_t.
9407         (dump_basic_block): Use dump_flags_t rather than int
9408         for "dump_kind" param.
9409         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
9410         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
9411         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
9412         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
9413         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
9414         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
9415         TDF_NONE): Convert from macros to...
9416         (enum dump_flag): ...this new enum.
9417         (dump_flags_t): Update to use enum.
9418         (operator|, operator&, operator~, operator|=, operator&=):
9419         Implement for dump_flags_t.
9420         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
9421         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
9422         Convert from macros to...
9423         (enum optgroup_flag): ...this new enum.
9424         (optgroup_flags_t): New typedef.
9425         (operator|, operator|=): Implement for optgroup_flags_t.
9426         (struct dump_file_info): Convert field "alt_flags" to
9427         dump_flags_t.  Convert field "optgroup_flags" to
9428         optgroup_flags_t.
9429         (dump_basic_block): Use dump_flags_t rather than int for param.
9430         (dump_generic_expr_loc): Likewise.
9431         (dump_dec): Likewise.
9432         (dump_register): Convert param "optgroup_flags" to
9433         optgroup_flags_t.
9434         (opt_info_enable_passes): Likewise.
9435         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
9436         than 0.
9437         * gimple-pretty-print.c (debug): Likewise.
9438         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
9439         (merged_store_group::apply_stores): Likewise.
9440         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
9441         * gimple.c (verify_gimple_pp): Likewise.
9442         * graphite-poly.c (print_pbb_body): Likewise.
9443         * passes.c (pass_manager::register_one_dump_file): Convert
9444         local "optgroup_flags" to optgroup_flags_t.
9445         * print-tree.c (print_node): Use TDF_NONE rather than 0.
9446         (debug): Likewise.
9447         (debug_body): Likewise.
9448         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
9449         to optgroup_flags_t.
9450         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
9451         than 0.
9452         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
9453         (convert_mult_to_fma): Likewise.
9454         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
9455         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
9456         * tree-vect-data-refs.c (dump_lower_bound): Convert param
9457         "dump_kind" to dump_flags_t.
9459 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
9461         * config/rs6000/rs6000.c (min, max): Delete.
9463 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
9465         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
9466         -mabi=spe and -mabi=no-spe.
9468 2018-06-08  Martin Liska  <mliska@suse.cz>
9470         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
9471         where we expect an existing summary.
9473 2018-06-08  Martin Liska  <mliska@suse.cz>
9475         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
9476         * ipa-inline.h (estimate_edge_growth): Likewise.
9478 2018-06-08  Martin Liska  <mliska@suse.cz>
9480         * cgraph.c (function_version_hasher::hash): Use
9481         cgraph_node::get_uid ().
9482         (function_version_hasher::equal):
9483         * cgraph.h (cgraph_node::get_uid): New method.
9484         * ipa-inline.c (update_caller_keys): Use
9485         cgraph_node::get_uid ().
9486         (update_callee_keys): Likewise.
9487         * ipa-utils.c (searchc): Likewise.
9488         (ipa_reduced_postorder): Likewise.
9489         * lto-cgraph.c (input_node): Likewise.
9490         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
9491         * symbol-summary.h (symtab_insertion): Likewise.
9492         (symtab_removal): Likewise.
9493         (symtab_duplication): Likewise.
9494         * tree-pretty-print.c (dump_function_header): Likewise.
9495         * tree-sra.c (convert_callers_for_node): Likewise.
9497 2018-06-08  Martin Liska  <mliska@suse.cz>
9499         * cgraph.c (symbol_table::create_edge): Always assign a new
9500         unique number.
9501         (symbol_table::free_edge): Do not recycle numbers.
9502         * cgraph.h (cgraph_edge::get): New method.
9503         * symbol-summary.h (symtab_removal): Use it.
9504         (symtab_duplication): Likewise.
9505         (call_summary::hashable_uid): Remove.
9507 2018-06-08  Martin Liska  <mliska@suse.cz>
9509         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
9510         (initialize_growth_caches): Remove.
9511         (free_growth_caches): Likewise.
9512         (do_estimate_edge_time): Use edge_growth_cache.
9513         (do_estimate_edge_size): Likewise.
9514         (do_estimate_edge_hints): Likewise.
9515         * ipa-inline.c (reset_edge_caches): Likewise.
9516         (recursive_inlining): Likewise.
9517         (inline_small_functions): Likewise.
9518         * ipa-inline.h (initialize_growth_caches): Remove.
9519         (estimate_edge_size): Likewise.
9520         (estimate_edge_time): Likewise.
9521         (estimate_edge_hints): Likewise.
9522         (reset_edge_growth_cache): Likewise.
9523         * symbol-summary.h (call_summary::remove): New method.
9525 2018-06-08  Martin Liska  <mliska@suse.cz>
9527         * ipa-cp.c (class edge_clone_summary): New summary.
9528         (grow_edge_clone_vectors): Remove.
9529         (ipcp_edge_duplication_hook): Remove.
9530         (class edge_clone_summary_t): New call_summary class.
9531         (ipcp_edge_removal_hook): Remove.
9532         (edge_clone_summary_t::duplicate): New function.
9533         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
9534         (create_specialized_node): Likewise.
9535         (ipcp_driver): Initialize edge_clone_summaries and do not
9536         register hooks.
9538 2018-06-08  Martin Liska  <mliska@suse.cz>
9540         * symbol-summary.h (get): New function.
9541         (call_summary::m_initialize_when_cloning): New class member.
9543 2018-06-08  Martin Liska  <mliska@suse.cz>
9545         * cgraph.c (cgraph_node::remove): Do not recycle uid.
9546         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
9547         (symbol_table::allocate_cgraph_symbol): Do not set uid.
9548         * passes.c (uid_hash_t): Record removed_nodes by their uids.
9549         (remove_cgraph_node_from_order): Use the removed_nodes set.
9550         (do_per_function_toporder): Likwise.
9551         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
9552         instead of summary_uid.
9553         (symtab_removal): Likewise.
9554         (symtab_duplication): Likewise.
9556 2018-06-08  Martin Liska  <mliska@suse.cz>
9558         * ipa-cp.c (ipcp_store_bits_results): Use
9559         ipcp_transformation_sum.
9560         (ipcp_store_vr_results): Likewise.
9561         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
9562         to ...
9563         (ipcp_transformation_initialize): ... this.
9564         (ipa_set_node_agg_value_chain):
9565         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
9566         (write_ipcp_transformation_info): Likewise.
9567         (read_ipcp_transformation_info): Likewise.
9568         (ipcp_update_bits): Likewise.
9569         (ipcp_update_vr): Likewise.
9570         (ipcp_transform_function): Likewise.
9571         * ipa-prop.h: Rename ipcp_transformation_summary to
9572         ipcp_transformation.
9573         (class ipcp_transformation_t): New function summary.
9574         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
9575         (ipa_get_agg_replacements_for_node): Likewise.
9577 2018-06-08  Martin Liska  <mliska@suse.cz>
9579         * ipa-pure-const.c (struct funct_state_d): Do it class instead
9580         of struct.
9581         (class funct_state_summary_t): New function_summary class.
9582         (has_function_state): Remove.
9583         (get_function_state): Likewise.
9584         (set_function_state): Likewise.
9585         (add_new_function): Likewise.
9586         (funct_state_summary_t::insert): New function.
9587         (duplicate_node_data): Remove.
9588         (remove_node_data): Remove.
9589         (funct_state_summary_t::duplicate): New function.
9590         (register_hooks): Create new funct_state_summaries.
9591         (pure_const_generate_summary): Use it.
9592         (pure_const_write_summary): Likewise.
9593         (pure_const_read_summary): Likewise.
9594         (propagate_pure_const): Likewise.
9595         (propagate_nothrow): Likewise.
9596         (dump_malloc_lattice): Likewise.
9597         (propagate_malloc): Likewise.
9598         (execute): Do not register hooks, just remove summary
9599         instead.
9600         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
9601         constructor.
9603 2018-06-08  Martin Liska  <mliska@suse.cz>
9605         * ipa-reference.c (remove_node_data): Remove.
9606         (duplicate_node_data): Likewise.
9607         (class ipa_ref_var_info_summary_t): New class.
9608         (class ipa_ref_opt_summary_t): Likewise.
9609         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
9610         (get_reference_optimization_summary): Use
9611         ipa_ref_opt_sum_summaries.
9612         (set_reference_vars_info): Remove.
9613         (set_reference_optimization_summary): Likewise.
9614         (ipa_init): Create summaries.
9615         (init_function_info): Use function summary.
9616         (ipa_ref_opt_summary_t::duplicate): New function.
9617         (ipa_ref_opt_summary_t::remove): New function.
9618         (get_read_write_all_from_node): Fix GNU coding style.
9619         (propagate): Use function summary.
9620         (write_node_summary_p): Fix GNU coding style.
9621         (stream_out_bitmap): Likewise.
9622         (ipa_reference_read_optimization_summary): Use function summary.
9623         (ipa_reference_c_finalize): Do not release hooks.
9625 2018-06-08  Martin Liska  <mliska@suse.cz>
9627         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
9628         (analyze_function_body): Extract multiple calls of get_create.
9629         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9630         * ipa-inline.c (recursive_inlining): Use ::get method.
9631         * ipa-inline.h (estimate_edge_growth): Likewise.
9633 2018-06-08  Martin Liska  <mliska@suse.cz>
9635         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
9636         HSA_INVALID.
9637         (hsa_function_summary::hsa_function_summary): Use the new enum
9638         value.
9639         (hsa_gpu_implementation_p): Use hsa_summaries::get.
9640         * hsa-gen.c (hsa_get_host_function): Likewise.
9641         (get_brig_function_name): Likewise.
9642         * ipa-hsa.c (process_hsa_functions): Likewise.
9643         (ipa_hsa_write_summary): Likewise.
9644         * symbol-summary.h (symtab_duplication): Use ::get function/
9645         (get): New function.
9647 2018-06-08  Martin Liska  <mliska@suse.cz>
9649         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
9650         of get.
9651         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
9652         (hsa_register_kernel): Likewise.
9653         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
9654         * hsa-gen.c (hsa_get_host_function): Likewise.
9655         (get_brig_function_name): Likewise.
9656         (generate_hsa): Likewise.
9657         (pass_gen_hsail::execute): Likewise.
9658         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
9659         (devirtualization_time_bonus): Likewise.
9660         (ipcp_propagate_stage): Likewise.
9661         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
9662         (edge_set_predicate): Likewise.
9663         (evaluate_conditions_for_known_args): Likewise.
9664         (evaluate_properties_for_edge): Likewise.
9665         (ipa_fn_summary::reset): Likewise.
9666         (ipa_fn_summary_t::duplicate): Likewise.
9667         (dump_ipa_call_summary): Likewise.
9668         (ipa_dump_fn_summary): Likewise.
9669         (analyze_function_body): Likewise.
9670         (compute_fn_summary): Likewise.
9671         (estimate_edge_devirt_benefit): Likewise.
9672         (estimate_edge_size_and_time): Likewise.
9673         (estimate_calls_size_and_time): Likewise.
9674         (estimate_node_size_and_time): Likewise.
9675         (inline_update_callee_summaries): Likewise.
9676         (remap_edge_change_prob): Likewise.
9677         (remap_edge_summaries): Likewise.
9678         (ipa_merge_fn_summary_after_inlining): Likewise.
9679         (ipa_update_overall_fn_summary): Likewise.
9680         (read_ipa_call_summary): Likewise.
9681         (inline_read_section): Likewise.
9682         (write_ipa_call_summary): Likewise.
9683         (ipa_fn_summary_write): Likewise.
9684         (ipa_free_fn_summary): Likewise.
9685         * ipa-hsa.c (process_hsa_functions): Likewise.
9686         (ipa_hsa_write_summary): Likewise.
9687         (ipa_hsa_read_section): Likewise.
9688         * ipa-icf.c (sem_function::merge): Likewise.
9689         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9690         (do_estimate_edge_time): Likewise.
9691         (estimate_size_after_inlining): Likewise.
9692         (estimate_growth): Likewise.
9693         (growth_likely_positive): Likewise.
9694         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
9695         (inline_call): Likewise.
9696         * ipa-inline.c (caller_growth_limits): Likewise.
9697         (can_inline_edge_p): Likewise.
9698         (can_inline_edge_by_limits_p): Likewise.
9699         (compute_uninlined_call_time): Likewise.
9700         (compute_inlined_call_time): Likewise.
9701         (want_inline_small_function_p): Likewise.
9702         (edge_badness): Likewise.
9703         (update_caller_keys): Likewise.
9704         (update_callee_keys): Likewise.
9705         (recursive_inlining): Likewise.
9706         (inline_small_functions): Likewise.
9707         (inline_to_all_callers_1): Likewise.
9708         (dump_overall_stats): Likewise.
9709         (early_inline_small_functions): Likewise.
9710         (early_inliner): Likewise.
9711         * ipa-inline.h (estimate_edge_growth): Likewise.
9712         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
9713         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
9714         * ipa-prop.h (IPA_NODE_REF): Likewise.
9715         (IPA_EDGE_REF): Likewise.
9716         * ipa-pure-const.c (malloc_candidate_p): Likewise.
9717         (propagate_malloc): Likewise.
9718         * ipa-split.c (execute_split_functions): Likewise.
9719         * symbol-summary.h: Rename get to get_create.
9720         (get): Likewise.
9721         (get_create): Likewise.
9722         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
9724 2018-06-08  Martin Liska  <mliska@suse.cz>
9726         * symbol-summary.h (release): Move definition out of class
9727         declaration.
9728         (symtab_removal): Likewise.
9729         (symtab_duplication): Likewise.
9731 2018-06-08  Martin Liska  <mliska@suse.cz>
9733         * symbol-summary.h (function_summary): Move constructor
9734         implementation out of class declaration.
9735         (release): Likewise.
9736         (symtab_insertion): Likewise.
9737         (symtab_removal): Likewise.
9738         (symtab_duplication): Likewise.
9739         (get): Likewise.
9741 2018-06-08  Martin Liska  <mliska@suse.cz>
9743         * Makefile.in: Remove support for MPX (macros, related functions,
9744         fields in cgraph_node, ...).
9745         * builtin-types.def (BT_BND): Likewise.
9746         (BT_FN_BND_CONST_PTR): Likewise.
9747         (BT_FN_CONST_PTR_BND): Likewise.
9748         (BT_FN_VOID_PTR_BND): Likewise.
9749         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
9750         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
9751         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
9752         (expand_builtin_mempcpy_with_bounds): Likewise.
9753         (expand_builtin_memset_with_bounds): Likewise.
9754         (expand_builtin_memset_args): Likewise.
9755         (std_expand_builtin_va_start): Likewise.
9756         (expand_builtin): Likewise.
9757         (expand_builtin_with_bounds): Likewise.
9758         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
9759         (DEF_LIB_BUILTIN_CHKP): Likewise.
9760         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
9761         (DEF_CHKP_BUILTIN): Likewise.
9762         (BUILT_IN_MEMCPY): Likewise.
9763         (BUILT_IN_MEMMOVE): Likewise.
9764         (BUILT_IN_MEMPCPY): Likewise.
9765         (BUILT_IN_MEMSET): Likewise.
9766         (BUILT_IN_STPCPY): Likewise.
9767         (BUILT_IN_STRCAT): Likewise.
9768         (BUILT_IN_STRCHR): Likewise.
9769         (BUILT_IN_STRCPY): Likewise.
9770         (BUILT_IN_STRLEN): Likewise.
9771         (BUILT_IN_MEMCPY_CHK): Likewise.
9772         (BUILT_IN_MEMMOVE_CHK): Likewise.
9773         (BUILT_IN_MEMPCPY_CHK): Likewise.
9774         (BUILT_IN_MEMSET_CHK): Likewise.
9775         (BUILT_IN_STPCPY_CHK): Likewise.
9776         (BUILT_IN_STRCAT_CHK): Likewise.
9777         (BUILT_IN_STRCPY_CHK): Likewise.
9778         * calls.c (store_bounds): Likewise.
9779         (emit_call_1): Likewise.
9780         (special_function_p): Likewise.
9781         (maybe_warn_nonstring_arg): Likewise.
9782         (initialize_argument_information): Likewise.
9783         (finalize_must_preallocate): Likewise.
9784         (compute_argument_addresses): Likewise.
9785         (expand_call): Likewise.
9786         * cfgexpand.c (expand_call_stmt): Likewise.
9787         (expand_return): Likewise.
9788         (expand_gimple_stmt_1): Likewise.
9789         (pass_expand::execute): Likewise.
9790         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
9791         (cgraph_node::remove): Likewise.
9792         (cgraph_node::dump): Likewise.
9793         (cgraph_node::verify_node): Likewise.
9794         * cgraph.h (chkp_function_instrumented_p): Likewise.
9795         (symtab_node::get_alias_target): Likewise.
9796         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
9797         (cgraph_local_p): Likewise.
9798         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
9799         (cgraph_edge::rebuild_references): Likewise.
9800         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
9801         (walk_polymorphic_call_targets): Likewise.
9802         (cgraph_node::expand_thunk): Likewise.
9803         (symbol_table::output_weakrefs): Likewise.
9804         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
9805         (ix86_handle_option): Likewise.
9806         * config/i386/constraints.md: Likewise.
9807         * config/i386/i386-builtin-types.def (BND): Likewise.
9808         (VOID): Likewise.
9809         (PVOID): Likewise.
9810         (ULONG): Likewise.
9811         * config/i386/i386-builtin.def (BDESC_END): Likewise.
9812         (BDESC_FIRST): Likewise.
9813         (BDESC): Likewise.
9814         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
9815         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
9816         * config/i386/i386.c (enum reg_class): Likewise.
9817         (ix86_target_string): Likewise.
9818         (ix86_option_override_internal): Likewise.
9819         (ix86_conditional_register_usage): Likewise.
9820         (ix86_valid_target_attribute_inner_p): Likewise.
9821         (ix86_set_indirect_branch_type): Likewise.
9822         (ix86_set_current_function): Likewise.
9823         (ix86_function_arg_regno_p): Likewise.
9824         (init_cumulative_args): Likewise.
9825         (ix86_function_arg_advance): Likewise.
9826         (ix86_function_arg): Likewise.
9827         (ix86_pass_by_reference): Likewise.
9828         (ix86_function_value_regno_p): Likewise.
9829         (ix86_function_value_1): Likewise.
9830         (ix86_function_value_bounds): Likewise.
9831         (ix86_return_in_memory): Likewise.
9832         (ix86_setup_incoming_vararg_bounds): Likewise.
9833         (ix86_va_start): Likewise.
9834         (indirect_thunk_need_prefix): Likewise.
9835         (print_reg): Likewise.
9836         (ix86_print_operand): Likewise.
9837         (ix86_expand_call): Likewise.
9838         (ix86_output_function_return): Likewise.
9839         (reg_encoded_number): Likewise.
9840         (BDESC_VERIFYS): Likewise.
9841         (ix86_init_mpx_builtins): Likewise.
9842         (ix86_init_builtins): Likewise.
9843         (ix86_emit_cmove): Likewise.
9844         (ix86_emit_move_max): Likewise.
9845         (ix86_expand_builtin): Likewise.
9846         (ix86_builtin_mpx_function): Likewise.
9847         (ix86_get_arg_address_for_bt): Likewise.
9848         (ix86_load_bounds): Likewise.
9849         (ix86_store_bounds): Likewise.
9850         (ix86_load_returned_bounds): Likewise.
9851         (ix86_store_returned_bounds): Likewise.
9852         (ix86_class_likely_spilled_p): Likewise.
9853         (ix86_hard_regno_mode_ok): Likewise.
9854         (x86_order_regs_for_local_alloc): Likewise.
9855         (ix86_mitigate_rop): Likewise.
9856         (ix86_bnd_prefixed_insn_p): Likewise.
9857         (ix86_mpx_bound_mode): Likewise.
9858         (ix86_make_bounds_constant): Likewise.
9859         (ix86_initialize_bounds): Likewise.
9860         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
9861         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
9862         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
9863         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
9864         (TARGET_CHKP_BOUND_MODE): Likewise.
9865         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
9866         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
9867         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
9868         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
9869         * config/i386/i386.h (TARGET_MPX): Likewise.
9870         (TARGET_MPX_P): Likewise.
9871         (VALID_BND_REG_MODE): Likewise.
9872         (FIRST_BND_REG): Likewise.
9873         (LAST_BND_REG): Likewise.
9874         (enum reg_class): Likewise.
9875         (BND_REG_P): Likewise.
9876         (BND_REGNO_P): Likewise.
9877         (BNDmode): Likewise.
9878         (ADJUST_INSN_LENGTH): Likewise.
9879         * config/i386/i386.md: Likewise.
9880         * config/i386/i386.opt: Likewise.
9881         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
9882         (defined): Likewise.
9883         (LINK_MPX): Likewise.
9884         (MPX_SPEC): Likewise.
9885         (LIBMPX_SPEC): Likewise.
9886         (LIBMPXWRAPPERS_SPEC): Likewise.
9887         (CHKP_SPEC): Likewise.
9888         * config/i386/predicates.md: Likewise.
9889         * dbxout.c (dbxout_type): Likewise.
9890         * doc/extend.texi: Likewise.
9891         * doc/invoke.texi: Likewise.
9892         * doc/md.texi: Likewise.
9893         * doc/tm.texi: Likewise.
9894         * doc/tm.texi.in: Likewise.
9895         * dwarf2out.c (is_base_type): Likewise.
9896         (gen_formal_types_die): Likewise.
9897         (gen_subprogram_die): Likewise.
9898         (gen_type_die_with_usage): Likewise.
9899         (gen_decl_die): Likewise.
9900         (dwarf2out_late_global_decl): Likewise.
9901         * expr.c (expand_assignment): Likewise.
9902         (emit_storent_insn): Likewise.
9903         (store_expr_with_bounds): Likewise.
9904         (store_expr): Likewise.
9905         (expand_expr_real_1): Likewise.
9906         * expr.h (store_expr_with_bounds): Likewise.
9907         * function.c (use_register_for_decl): Likewise.
9908         (struct bounds_parm_data): Likewise.
9909         (assign_parms_augmented_arg_list): Likewise.
9910         (assign_parm_find_entry_rtl): Likewise.
9911         (assign_parm_is_stack_parm): Likewise.
9912         (assign_parm_load_bounds): Likewise.
9913         (assign_bounds): Likewise.
9914         (assign_parms): Likewise.
9915         (expand_function_start): Likewise.
9916         * gcc.c (CHKP_SPEC): Likewise.
9917         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
9918         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
9919         (wrestrict_dom_walker::check_call): Likewise.
9920         * gimple.c (gimple_build_call_from_tree): Likewise.
9921         * gimple.h (enum gf_mask): Likewise.
9922         (gimple_call_with_bounds_p): Likewise.
9923         (gimple_call_set_with_bounds): Likewise.
9924         * gimplify.c (gimplify_init_constructor): Likewise.
9925         * ipa-cp.c (initialize_node_lattices): Likewise.
9926         (propagate_constants_across_call): Likewise.
9927         (find_more_scalar_values_for_callers_subset): Likewise.
9928         * ipa-hsa.c (process_hsa_functions): Likewise.
9929         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
9930         * ipa-icf.c (sem_function::merge): Likewise.
9931         * ipa-inline.c (early_inliner): Likewise.
9932         * ipa-pure-const.c (warn_function_noreturn): Likewise.
9933         (warn_function_cold): Likewise.
9934         (propagate_pure_const): Likewise.
9935         * ipa-ref.h (enum GTY): Likewise.
9936         * ipa-split.c (find_retbnd): Likewise.
9937         (consider_split): Likewise.
9938         (split_function): Likewise.
9939         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
9940         * ipa.c (walk_polymorphic_call_targets): Likewise.
9941         (symbol_table::remove_unreachable_nodes): Likewise.
9942         (process_references): Likewise.
9943         (cgraph_build_static_cdtor_1): Likewise.
9944         * lto-cgraph.c (lto_output_node): Likewise.
9945         (output_refs): Likewise.
9946         (compute_ltrans_boundary): Likewise.
9947         (input_overwrite_node): Likewise.
9948         (input_node): Likewise.
9949         (input_cgraph_1): Likewise.
9950         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
9951         * passes.c (pass_manager::execute_early_local_passes): Likewise.
9952         (class pass_chkp_instrumentation_passes): Likewise.
9953         (make_pass_chkp_instrumentation_passes): Likewise.
9954         * passes.def: Likewise.
9955         * rtl.h (struct GTY): Likewise.
9956         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
9957         * stor-layout.c (layout_type): Likewise.
9958         * symtab.c: Likewise.
9959         * target.def: Likewise.
9960         * targhooks.c (default_chkp_bound_type): Likewise.
9961         (default_chkp_bound_mode): Likewise.
9962         (default_builtin_chkp_function): Likewise.
9963         (default_chkp_function_value_bounds): Likewise.
9964         (default_chkp_make_bounds_constant): Likewise.
9965         (default_chkp_initialize_bounds): Likewise.
9966         * targhooks.h (default_chkp_bound_type): Likewise.
9967         (default_chkp_bound_mode): Likewise.
9968         (default_builtin_chkp_function): Likewise.
9969         (default_chkp_function_value_bounds): Likewise.
9970         (default_chkp_make_bounds_constant): Likewise.
9971         (default_chkp_initialize_bounds): Likewise.
9972         * toplev.c (compile_file): Likewise.
9973         (process_options): Likewise.
9974         * tree-core.h (DEF_BUILTIN): Likewise.
9975         (DEF_BUILTIN_CHKP): Likewise.
9976         * tree-inline.c (declare_return_variable): Likewise.
9977         (remap_gimple_stmt): Likewise.
9978         (copy_bb): Likewise.
9979         (initialize_inlined_parameters): Likewise.
9980         (expand_call_inline): Likewise.
9981         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
9982         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
9983         (make_pass_ipa_chkp_produce_thunks): Likewise.
9984         (make_pass_chkp): Likewise.
9985         (make_pass_chkp_opt): Likewise.
9986         (make_pass_chkp_instrumentation_passes): Likewise.
9987         * tree-pretty-print.c (dump_generic_node): Likewise.
9988         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
9989         * tree-ssa-dce.c (propagate_necessity): Likewise.
9990         (eliminate_unnecessary_stmts): Likewise.
9991         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
9992         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
9993         * tree-ssa-sccvn.h: Likewise.
9994         * tree-ssa-strlen.c (get_string_length): Likewise.
9995         (valid_builtin_call): Likewise.
9996         (adjust_last_stmt): Likewise.
9997         (handle_builtin_strchr): Likewise.
9998         (handle_builtin_strcpy): Likewise.
9999         (handle_builtin_stxncpy): Likewise.
10000         (handle_builtin_memcpy): Likewise.
10001         (handle_builtin_strcat): Likewise.
10002         (strlen_check_and_optimize_stmt): Likewise.
10003         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
10004         * tree-streamer-in.c: Likewise.
10005         * tree-streamer.c (record_common_node): Likewise.
10006         * tree.c (tree_code_size): Likewise.
10007         (wide_int_to_tree_1): Likewise.
10008         (type_contains_placeholder_1): Likewise.
10009         (build_common_tree_nodes): Likewise.
10010         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
10011         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
10012         (POINTER_BOUNDS_P): Likewise.
10013         (BOUNDED_TYPE_P): Likewise.
10014         (BOUNDED_P): Likewise.
10015         (CALL_WITH_BOUNDS_P): Likewise.
10016         (pointer_bounds_type_node): Likewise.
10017         * value-prof.c (gimple_ic): Likewise.
10018         * var-tracking.c (vt_add_function_parameters): Likewise.
10019         * varasm.c (make_decl_rtl): Likewise.
10020         (assemble_start_function): Likewise.
10021         (output_constant): Likewise.
10022         (maybe_assemble_visibility): Likewise.
10023         * varpool.c (ctor_for_folding): Likewise.
10024         * chkp-builtins.def: Remove.
10025         * ipa-chkp.c: Remove.
10026         * ipa-chkp.h: Remove.
10027         * rtl-chkp.c: Remove.
10028         * rtl-chkp.h: Remove.
10029         * tree-chkp-opt.c: Remove.
10030         * tree-chkp.c: Remove.
10031         * tree-chkp.h: Remove.
10033 2018-06-07  Carl Love  <cel@us.ibm.com>
10035         * config/rs6000/vsx.md (vextract_fp_from_shorth,
10036         vextract_fp_from_shortl): Add BE support.
10038 2018-06-07  Paul Koning  <ni1d@arrl.net>
10040         * compare-elim.c (try_merge_compare): Don't merge compare if
10041         address contains a side effect.
10042         (try_eliminate_compare): Likewise.
10044 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
10046         * config.gcc: Support "tremont".
10047         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
10048         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10049         PROCESSOR_TREMONT.
10050         * config/i386/i386.c (m_TREMONT): Define.
10051         (processor_target_table): Add "tremont".
10052         (PTA_TREMONT): Define.
10053         (ix86_lea_outperforms): Add TARGET_TREMONT.
10054         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
10055         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
10056         and M_INTEL_GOLDMONT_PLUS.
10057         (fold_builtin_cpu): Add "tremont".
10058         (ix86_add_stmt_cost): Add TARGET_TREMONT.
10059         (ix86_option_override_internal): Add "tremont".
10060         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
10061         (processor_type): Add PROCESSOR_TREMONT.
10062         * config/i386/x86-tune.def: Add m_TREMONT.
10063         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
10065 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
10067         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
10068         symbol defined for msp430i* devices to be lower case.
10070 2018-06-07  Richard Biener  <rguenther@suse.de>
10072         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
10073         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
10074         Properly wrap signed arithmetic if overflow wraps.
10076 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
10078         PR tree-optimization/69615
10079         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
10080         of a cast from a same precision integral SSA_NAME in a bb dominated
10081         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
10082         cast to utype if rhs2 has already a compatible type.
10084 2018-06-07  Richard Biener  <rguenther@suse.de>
10086         PR tree-optimization/85935
10087         * graphite-scop-detection.c (find_params_in_bb): Analyze
10088         condition operands with respect to the correct loop.  Assert
10089         the analysis doesn't fail.
10091 2018-06-04  Carl Love  <cel@us.ibm.com>
10093         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
10094         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
10095         as it is slightly cheaper.
10096         (first_match_or_eos_index_<mode>):
10097         Calculate index using natural element order.
10098         (first_match_index_<mode>):
10099         Calculate index using natural element order.
10100         (first_match_or_eos_index_<mode>):
10101         Calculate index using natural order.
10102         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
10103         for BE and LE modes.
10104         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
10105         P9V_BUILTIN_VCLZLSBB_V16QI.
10106         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
10107         specific.
10109 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10111         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
10112         indentation and line wrap for many prototypes.  Add missing
10113         @smallexample directives around block of prototypes for vec_xl and
10114         vec_xst.
10116 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
10118         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
10119         track if we pass or return IEEE 128-bit floating point.
10120         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
10121         C++ mangling that is compatible with GCC 8.1.
10122         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
10123         (init_cumulative_args): Note if we pass or return IEEE 128-bit
10124         floating point types.
10125         (rs6000_function_arg_advance_1): Likewise.
10126         (rs6000_mangle_type): Optionally generate mangled names that match
10127         what GCC 8.1 generated for IEEE 128-bit floating point types.
10128         (rs6000_globalize_decl_name): If we have an external function that
10129         passes or returns IEEE 128-bit types, generate a weak reference
10130         from the mangled name used in GCC 8.1 to the current mangled
10131         name.
10132         (rs6000_init_builtins): Make __ibm128 use the long double type if
10133         long double is IBM extended double.  Make __float128 use the long
10134         double type if long double is IEEE 128-bit.
10136         PR target/85657
10137         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
10138         macro for __ibm128 built-in functions.
10139         (PACK_IF): Add __ibm128 pack/unpack functions.
10140         (UNPACK_IF): Likewise.
10141         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
10142         enable long double built-in functions if long double is IEEE
10143         128-bit floating point.
10144         (rs6000_invalid_builtin): Update long double built-in function
10145         error message.
10146         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
10147         functions, adjust the built-in function to use the long double
10148         built-in function if __ibm128 and long double are the same type.
10149         * doc/extend.texi (PowerPC builtins): Update documention for
10150         __builtin_{,un}pack_longdouble.  Add documentation for
10151         __builtin_{,un}pack_ibm128.
10153 2018-06-06  Jim Wilson  <jimw@sifive.com>
10155         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
10156         (struct machine_function): New field interrupt_mode.
10157         (riscv_handle_type_attribute): New function.  Add forward declaration.
10158         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
10159         (riscv_expand_epilogue): Check interrupt_mode field.
10160         (riscv_set_current_function): Check interrupt attribute args and
10161         set interrupt_mode field.
10162         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
10163         (riscv_sret, riscv_uret): New.
10164         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
10165         new arguments to interrupt attribute.
10167 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
10169         PR target/63177
10170         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
10171         Don't handle -mcpu=power8 if -mpower9-vector is also used.
10173 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10175         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
10176         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
10177         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
10178         several redundant entries.
10180 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
10182         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
10183         type from "rtx" to "rtx_insn *".
10184         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
10185         for local "call_insn", removing cast.
10186         (ix86_expand_call): Likewise, introducing a "call_insn" local.
10188 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
10190         PR tree-optimization/86066
10191         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
10192         for BIT_INSERT_EXPR stores.
10194 2018-06-06  Richard Biener  <rguenther@suse.de>
10196         PR tree-optimization/86062
10197         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
10198         component refs ontop
10199         of to be offsetted base.
10201 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
10203         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
10204         to be static and remove check on interrupt attribute name.
10206 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10208         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10209         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
10211 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
10213         PR target/79924
10214         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
10215         second argument.
10216         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
10217         Remove second argument, change how error is called.
10218         (aarch64_layout_arg): Remove second argument from
10219         aarch64_err_no_fpadvsimd call.
10220         (aarch64_init_cumulative_args): Ditto.
10221         (aarch64_gimplify_va_arg_expr): Ditto.
10222         * config/aarch64/aarch64.md (mov<mode>): Ditto.
10224 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
10226         * config/i386/i386.md (simple_return_indirect_internal): New expander.
10227         (*simple_return_indirect_internal<mode>): Rename from
10228         simple_return_indirect_internal.  Use W mode iterator.
10229         (rstorssp): New expander.
10230         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
10231         (clrssbsy): New expander.
10232         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
10234 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
10236         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
10237         __typeof__.
10238         (cmse_check_pointed_object): Likewise.
10240 2018-06-05  Martin Liska  <mliska@suse.cz>
10242         PR gcov-profile/47618
10243         * doc/invoke.texi: Document how -fprofile-dir format
10244         is extended.
10246 2018-06-05  Richard Biener  <rguenther@suse.de>
10248         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
10249         removal pretend DOM info isn't available so we do not update
10250         it and only remove edges, not dominated blocks.  Actually free
10251         DOM info in case we removed something.  Remove unreachable blocks.
10252         (mfb_keep_latches): Work with either DOM info or marked backedges.
10253         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
10254         first.  Mark backedges if DOM info isn't available.
10255         (Re-)compute DOM info after cleanup_control_flow_pre.
10257 2018-06-05  Richard Biener  <rguenther@suse.de>
10259         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
10260         (locus_discrim_hasher::hash): Adjust.
10261         (locus_discrim_hasher::equal): Likewise.
10262         (next_discriminator_for_locus): Work on line directly.
10263         (same_line_p): Pass in expanded locus1 as well.
10264         (assign_discriminators): Avoid redundant location expansions.
10266 2018-06-05  Richard Biener  <rguenther@suse.de>
10268         PR tree-optimization/86046
10269         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
10270         if required after clearing TREE_ADDRESSABLE.
10272 2018-06-05  Richard Biener  <rguenther@suse.de>
10274         PR tree-optimization/86047
10275         * tree-ssa-loop.c (for_each_index): Glob handling of all
10276         decls and constants and really handle all of them.
10278 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10280         PR target/81497
10281         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
10282         qualifier_void_pointer and qualifier_const_void_pointer.
10283         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
10284         (arm_init_builtins): Handle the above.
10285         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
10286         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
10287         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
10288         void intrinsics.
10290 2018-06-05  Martin Liska  <mliska@suse.cz>
10292         * auto-profile.c (read_autofdo_file): Do not use
10293         gcov_ctr_summary struct.
10294         (afdo_callsite_hot_enough_for_early_inline): Likewise.
10295         * coverage.c (struct counts_entry): Likewise.
10296         (read_counts_file): Read just single summary entry.
10297         (get_coverage_counts): Use gcov_summary struct.
10298         * coverage.h (get_coverage_counts): Likewise.
10299         * gcov-dump.c (dump_working_sets): Likewise.
10300         (tag_summary): Dump just single summary.
10301         * gcov-io.c (gcov_write_summary): Write just histogram
10302         summary.
10303         (gcov_read_summary): Read just single summary.
10304         (compute_working_sets): Use gcov_summary struct.
10305         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
10306         of GCOV_COUNTERS_SUMMABLE.
10307         (GCOV_COUNTERS_SUMMABLE): Remove.
10308         (GCOV_FIRST_VALUE_COUNTER): Replace with
10309         GCOV_COUNTER_V_INTERVAL.
10310         (struct gcov_ctr_summary): Remove.
10311         (struct gcov_summary): Directly use fields of former
10312         gcov_ctr_summary.
10313         (compute_working_sets): Use gcov_summary struct.
10314         * gcov.c (read_count_file): Do not use ctrs fields.
10315         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
10316         struct.
10317         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
10318         struct.
10319         * profile.c: Likewise.
10320         * profile.h: Likewise.
10322 2018-06-05  Martin Liska  <mliska@suse.cz>
10324         PR gcov-profile/84846
10325         * gcov.c (output_lines): Print working directory only
10326         in intermediate format.
10328 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
10330         * config/s390/s390-builtin-types.def: Add void function type.
10331         * config/s390/s390-builtins.def: Use the function type for the
10332         tbeginc builtin.
10334 2018-06-04  Jim Wilson  <jimw@sifive.com>
10336         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
10337         to int.
10338         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
10339         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
10340         handle EH_RETURN_DATA_REGNO registers properly.
10341         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
10342         (riscv_expand_epilogue): Update comment.  Change argument name and
10343         type.  Update code to use new name and type.  Pass new args to
10344         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
10345         EXCEPTION_RETURN.
10346         * config/riscv/riscv.md (NORMAL_RETURN): New.
10347         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
10348         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
10349         (eh_return): Call gen_eh_return_internal and emit barrier.
10350         (eh_return_internal): Call riscv_expand_epilogue.
10352 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
10354         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
10355         bit_insertion field and declare can_be_merged_into method.
10356         (merged_store_group::can_be_merged_into): New method.
10357         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
10358         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
10359         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
10361 2018-06-04  Richard Biener  <rguenther@suse.de>
10363         PR tree-optimization/85955
10364         * builtins.c (fold_builtin_sincos): Convert pointers to
10365         destination to appropriate type before dereferencing.
10367 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
10369         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
10371 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
10373         * expr.c (expand_expr_real_1): Force the operand into memory if
10374         its TYPE_MODE is BLKmode and if there is no integer mode for
10375         the number of bits being extracted.
10377 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
10379         PR target/85832
10380         PR target/86036
10381         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
10382         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
10384 2018-06-04  Richard Biener  <rguenther@suse.de>
10386         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
10387         (cleanup_tree_cfg_noloop): ... single caller.  Do
10388         start_recording_case_labels later.
10390 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
10392         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
10393         to _IMMINTRIN_H_INCLUDED.
10394         * config/i386/pconfigintrin.h: Ditto.
10395         * config/i386/waitpkgintrin.h: Ditto.
10396         * config/i386/immintrin.h: Add includes for sgxintrin.h,
10397         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
10398         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
10399         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
10400         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
10401         waitpkgintrin.h and cldemoteintrin.h.
10403 2018-06-04  Richard Biener  <rguenther@suse.de>
10405         PR tree-optimization/86038
10406         * tracer.c (find_best_successor): Check probability for
10407         being initialized, bail out if not.
10409 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
10411         PR target/86003
10412         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
10413         of bits to ignore when comparing architectures.
10415 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
10417         PR tree-optimization/69615
10418         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
10419         maximum or minimum of the type, try to merge it also as if
10420         range1 is + [-, x - 1] or + [x + 1, -].
10422         PR c++/86025
10423         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
10425 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
10427         PR tree-optimization/86034
10428         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
10429         the unsigned bitfield type in a bit insertion sequence if it does not
10430         have a larger precision than the bitfield size.
10431         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
10433 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
10435         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
10437 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
10439         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
10440         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
10441         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
10442         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
10444 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
10446         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
10447         Disable -fdelete-null-pointer-checks for ELF toolchain.
10449 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
10450             Kito Cheng  <kito.cheng@gmail.com>
10452         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
10453         (nds32le-*-*, nds32be-*-*): Integrate checking process.
10454         (nds32*-*-*): Add glibc and uclibc conditions.
10455         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
10456         (TARGET_EXCEPT_UNWIND_INFO): Define.
10457         * config/nds32/elf.h: New file.
10458         * config/nds32/linux.h: New file.
10459         * config/nds32/nds32-elf.opt: New file.
10460         * config/nds32/nds32-linux.opt: New file.
10461         * config/nds32/nds32-fp-as-gp.c
10462         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
10463         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
10464         TARGET_LINUX_ABI.
10465         (nds32_asm_file_end): Ditto.
10466         (nds32_print_operand): Ditto.
10467         (nds32_insert_attributes): Ditto.
10468         (nds32_init_libfuncs): New function.
10469         (TARGET_HAVE_TLS): Define.
10470         (TARGET_INIT_LIBFUNCS): Define.
10471         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
10472         spec content.
10473         (TARGET_ELF): Apply different mcmodel setting.
10474         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
10475         been migrated into elf.h and linux.h files.
10476         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
10477         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
10478         (mcmodel): The content has been migrated into nds32-elf.opt and
10479         nds32-linux.opt files.
10480         * config/nds32/t-elf: New file.
10481         * config/nds32/t-linux: New file.
10483 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
10484             Shiva Chen  <shiva0217@gmail.com>
10486         * config/nds32/constants.md (unspec_volatile_element): Add
10487         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
10488         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
10489         optimization.
10490         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
10491         (make_pass_nds32_fp_as_gp): Declare.
10492         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
10493         optmization pass.
10494         (nds32_asm_function_end_prologue): Remove unused asm output.
10495         (nds32_asm_function_begin_epilogue): Remove unused asm output.
10496         (nds32_asm_file_start): Output necessary fp_as_gp information.
10497         (nds32_option_override): Adjust register usage.
10498         (nds32_expand_prologue): Consider fp_as_gp situation.
10499         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
10500         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
10501         (epilogue): Ditto.
10502         (return): Ditto.
10503         (simple_return): Ditto.
10504         (omit_fp_begin): Output special directive for fp_as_gp.
10505         (omit_fp_end): Output special directive for fp_as_gp.
10506         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
10507         mforbid-fp-as-gp): New options.
10509 2018-06-01  Mark Wielaard  <mark@klomp.org>
10511         * dwarf2out.c (dwarf2out_finish): Remove generation of
10512         DW_AT_loclists_base.
10514 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
10516         * gimple-ssa-store-merging.c: Include gimple-fold.h.
10517         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
10518         (struct merged_store_group): Add bit_insertion field.
10519         (dump_char_array): Use standard hexadecimal format.
10520         (merged_store_group::merged_store_group): Set bit_insertion to false.
10521         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
10522         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
10523         also print the mask in the dump file.
10524         (pass_store_merging::gate): Minor tweak.
10525         (imm_store_chain_info::coalesce_immediate): Fix wrong association
10526         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
10527         stores with INTEGER_CST stores.
10528         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
10529         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
10530         and use it throughout.  Generate bit insertion sequences if need be.
10531         (pass_store_merging::process_store): Remove redundant condition.
10532         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
10534 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
10536         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
10537         the 128-bit floating point types.  Fix function comment.
10539 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10541         * config/aarch64/aarch64-simd.md
10542         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
10543         mnemonics.
10544         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
10545         mnemonics.
10547 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
10549         PR tree-optimization/85989
10550         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
10551         variable.
10552         (backprop::intersect_uses): Check it when deciding whether this
10553         is a backedge reference.
10554         (backprop::process_block): Add each phi to m_visited_phis
10555         after visiting it, then clear it at the end.
10557 2018-06-01  Richard Biener  <rguenther@suse.de>
10559         * tree-vectorizer.h (vect_dr_stmt): New function.
10560         (vect_get_load_cost): Adjust.
10561         (vect_get_store_cost): Likewise.
10562         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
10563         Use vect_dr_stmt instead of DR_SMTT.
10564         (vect_record_base_alignments): Likewise.
10565         (vect_calculate_target_alignment): Likewise.
10566         (vect_compute_data_ref_alignment): Likewise and make static.
10567         (vect_update_misalignment_for_peel): Likewise.
10568         (vect_verify_datarefs_alignment): Likewise.
10569         (vector_alignment_reachable_p): Likewise.
10570         (vect_get_data_access_cost): Likewise.  Pass down
10571         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
10572         (vect_get_peeling_costs_all_drs): Likewise.
10573         (vect_peeling_hash_get_lowest_cost): Likewise.
10574         (vect_enhance_data_refs_alignment): Likewise.
10575         (vect_find_same_alignment_drs): Likewise.
10576         (vect_analyze_data_refs_alignment): Likewise.
10577         (vect_analyze_group_access_1): Likewise.
10578         (vect_analyze_group_access): Likewise.
10579         (vect_analyze_data_ref_access): Likewise.
10580         (vect_analyze_data_ref_accesses): Likewise.
10581         (vect_vfa_segment_size): Likewise.
10582         (vect_small_gap_p): Likewise.
10583         (vectorizable_with_step_bound_p): Likewise.
10584         (vect_prune_runtime_alias_test_list): Likewise.
10585         (vect_analyze_data_refs): Likewise.
10586         (vect_supportable_dr_alignment): Likewise.
10587         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10588         (vect_gen_prolog_loop_niters): Likewise.
10589         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10590         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
10591         modify DR_STMT.
10592         (vect_recog_mask_conversion_pattern): Likewise.
10593         (vect_try_gather_scatter_pattern): Likewise.
10594         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
10595         to vect_get_store_cost.
10596         (vect_get_store_cost): Get stmt_info instead of DR.
10597         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
10598         (vect_get_load_cost): Get stmt_info instead of DR.
10600 2018-06-01  Richard Biener  <rguenther@suse.de>
10602         PR middle-end/86017
10603         * gimple-fold.c (var_decl_component_p): Also allow offsetted
10604         vars wrapped in MEM_REFs.
10606 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
10608         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10609         Fix subreg tests so that we only return a choice between
10610         GENERAL_REGS and FP_REGS if the original classes included both.
10612 2018-06-01  Richard Biener  <rguenther@suse.de>
10614         PR ipa/85960
10615         * tree-ssa-structalias.c (get_function_part_constraint):
10616         Handle NULL fi->decl.
10617         (find_func_aliases_for_call): Properly handle indirect
10618         fi from direct call.
10619         (find_func_clobbers): Likewise.
10620         (ipa_pta_execute): Likewise.
10621         (create_variable_info_for): For functions that are ifunc_resolver
10622         resolve to a varinfo that contains the result of the resolver call.
10623         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
10624         aliases.
10626 2018-05-31  Michael Collison  <michael.collison@arm.com>
10628         * config/aarch64/aarch64.md:
10629         (*fix_to_zero_extenddfdi2): New pattern.
10630         * gcc.target/aarch64/fix_extend1.c: New testcase.
10632 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
10634         PR middle-end/78809
10635         PR middle-end/83026
10636         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
10637         and BUILT_IN_STRNCMP_EQ.
10638         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
10639         BUILT_IN_STRNCMP_EQ.
10640         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
10641         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10642         (gimple_fold_builtin): Likewise.
10643         * tree-ssa-strlen.c (compute_string_length): New function.
10644         (determine_min_obsize): New function.
10645         (handle_builtin_string_cmp): New function to handle calls to
10646         string compare functions.
10647         (strlen_optimize_stmt): Add handling to builtin string compare
10648         calls.
10649         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
10650         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10651         * tree.c (build_common_builtin_nodes): Add new defines of
10652         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
10654 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
10656         PR target/85984
10657         * bb-reorder.c (pass_partition_blocks::gate): Return false for
10658         functions with naked attribute.
10660 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
10662         * config/i386/sse.md (avx_vec_concat<mode>):
10663         Substitute concat_tg_mode mode attribute with xtg_mode.
10664         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
10665         (concat_tg_mode): Remove mode attribute.
10667 2018-05-31  Martin Sebor  <msebor@redhat.com>
10669         PR c/82063
10670         * calls.c (alloc_max_size): Correct a logic error/typo.
10671         Treat excessive arguments as infinite.  Warn for invalid arguments.
10672         * doc/invoke.texi (-Walloc-size-larger-than): Update.
10674 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
10676         PR target/85829
10677         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
10678         and movx for Haswell.
10680 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
10681             Cesar Philippidis  <cesar@codesourcery.com>
10683         PR middle-end/85879
10684         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
10685         when emitting error on private/firstprivate reductions.
10686         * omp-low.c (lower_omp_target): Avoid reference-type processing
10687         on pointers for firstprivate clause.
10689 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
10691         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
10692         (st1x2): Likewise.
10693         (st1x3): Likewise.
10694         * config/aarch64/aarch64-simd.md
10695         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
10696         (aarch64_ld1_x3_<mode>): Likewise
10697         (aarch64_st1x2<VALLDIF:mode>): Likewise
10698         (aarch64_st1_x2_<mode>): Likewise
10699         (aarch64_st1x3<VALLDIF:mode>): Likewise
10700         (aarch64_st1_x3_<mode>): Likewise
10701         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
10702         (vld1_s8_x3): Likewise.
10703         (vld1_u16_x3): Likewise.
10704         (vld1_s16_x3): Likewise.
10705         (vld1_u32_x3): Likewise.
10706         (vld1_s32_x3): Likewise.
10707         (vld1_u64_x3): Likewise.
10708         (vld1_s64_x3): Likewise.
10709         (vld1_f16_x3): Likewise.
10710         (vld1_f32_x3): Likewise.
10711         (vld1_f64_x3): Likewise.
10712         (vld1_p8_x3): Likewise.
10713         (vld1_p16_x3): Likewise.
10714         (vld1_p64_x3): Likewise.
10715         (vld1q_u8_x3): Likewise.
10716         (vld1q_s8_x3): Likewise.
10717         (vld1q_u16_x3): Likewise.
10718         (vld1q_s16_x3): Likewise.
10719         (vld1q_u32_x3): Likewise.
10720         (vld1q_s32_x3): Likewise.
10721         (vld1q_u64_x3): Likewise.
10722         (vld1q_s64_x3): Likewise.
10723         (vld1q_f16_x3): Likewise.
10724         (vld1q_f32_x3): Likewise.
10725         (vld1q_f64_x3): Likewise.
10726         (vld1q_p8_x3): Likewise.
10727         (vld1q_p16_x3): Likewise.
10728         (vld1q_p64_x3): Likewise.
10729         (vst1_s64_x2): Likewise.
10730         (vst1_u64_x2): Likewise.
10731         (vst1_f64_x2): Likewise.
10732         (vst1_s8_x2): Likewise.
10733         (vst1_p8_x2): Likewise.
10734         (vst1_s16_x2): Likewise.
10735         (vst1_p16_x2): Likewise.
10736         (vst1_s32_x2): Likewise.
10737         (vst1_u8_x2): Likewise.
10738         (vst1_u16_x2): Likewise.
10739         (vst1_u32_x2): Likewise.
10740         (vst1_f16_x2): Likewise.
10741         (vst1_f32_x2): Likewise.
10742         (vst1_p64_x2): Likewise.
10743         (vst1q_s8_x2): Likewise.
10744         (vst1q_p8_x2): Likewise.
10745         (vst1q_s16_x2): Likewise.
10746         (vst1q_p16_x2): Likewise.
10747         (vst1q_s32_x2): Likewise.
10748         (vst1q_s64_x2): Likewise.
10749         (vst1q_u8_x2): Likewise.
10750         (vst1q_u16_x2): Likewise.
10751         (vst1q_u32_x2): Likewise.
10752         (vst1q_u64_x2): Likewise.
10753         (vst1q_f16_x2): Likewise.
10754         (vst1q_f32_x2): Likewise.
10755         (vst1q_f64_x2): Likewise.
10756         (vst1q_p64_x2): Likewise.
10757         (vst1_s64_x3): Likewise.
10758         (vst1_u64_x3): Likewise.
10759         (vst1_f64_x3): Likewise.
10760         (vst1_s8_x3): Likewise.
10761         (vst1_p8_x3): Likewise.
10762         (vst1_s16_x3): Likewise.
10763         (vst1_p16_x3): Likewise.
10764         (vst1_s32_x3): Likewise.
10765         (vst1_u8_x3): Likewise.
10766         (vst1_u16_x3): Likewise.
10767         (vst1_u32_x3): Likewise.
10768         (vst1_f16_x3): Likewise.
10769         (vst1_f32_x3): Likewise.
10770         (vst1_p64_x3): Likewise.
10771         (vst1q_s8_x3): Likewise.
10772         (vst1q_p8_x3): Likewise.
10773         (vst1q_s16_x3): Likewise.
10774         (vst1q_p16_x3): Likewise.
10775         (vst1q_s32_x3): Likewise.
10776         (vst1q_s64_x3): Likewise.
10777         (vst1q_u8_x3): Likewise.
10778         (vst1q_u16_x3): Likewise.
10779         (vst1q_u32_x3): Likewise.
10780         (vst1q_u64_x3): Likewise.
10781         (vst1q_f16_x3): Likewise.
10782         (vst1q_f32_x3): Likewise.
10783         (vst1q_f64_x3): Likewise.
10784         (vst1q_p64_x3): Likewise.
10786 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
10788         * config/msp430/msp430.c (msp430_output_labelref): Prepend
10789         user_label_prefix to name.
10791         * tree-core.h: Update comment about the format of NAME string
10792         passed to handler in attribute_spec.
10794         * config/msp430/msp430.md: Remove erroneous subreg expression from
10795         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
10796         zero_extend{q,h}isi2.
10798 2018-05-30  Borislav Petkov  <bp@suse.de>
10800         * doc/extend.texi: Document some architecture specific
10801         constraints and sort entries.
10803 2018-05-30  Martin Sebor  <msebor@redhat.com>
10805         PR middle-end/85369
10806         * builtins.c (expand_builtin_stpcpy_1): New function.
10807         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
10808         only if the former succeeds.
10810 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
10812         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
10813         in saphira.
10815 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
10817         * doc/invoke.texi (-flinker-output): Document
10819 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
10821         * passes.c (ipa_write_summaries): Only modify statements if body
10822         is in memory.
10823         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
10824         incrementally linking.
10825         (ipa_passes): Likewise.
10826         * lto-cgraph.c (lto_output_node): When incrementally linking do not
10827         pass down resolution info.
10828         * common.opt (flag_incremental_link): Update info.
10829         * gcc.c (plugin specs): Turn flinker-output=* to
10830         -plugin-opt=-linker-output-known
10831         * toplev.c (compile_file): Also cut compilation when doing incremental
10832         link.
10833         * flag-types. (enum lto_partition_model): Add
10834         LTO_LINKER_OUTPUT_NOLTOREL.
10835         (invoke.texi): Add -flinker-output docs.
10836         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
10837         link same way as WPA; do not stream in dead initializers.
10839         * dwarf2out.c (dwarf2out_die_ref_for_decl,
10840         darf2out_register_external_decl): Support incremental link.
10842 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
10844         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
10846 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
10848         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
10849         it down to simple_object_copy_lto_debug_sections.
10850         (run_gcc): Determine incremental LTO link time and configure
10851         lto1 into non-wpa mode, disable renaming of debug sections.
10853 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10855         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10856         descriptions of various incorrectly documented functions.
10858 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
10860         Revert:
10861         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10862         address check not strict.
10864 2018-05-30  Richard Biener  <rguenther@suse.de>
10866         PR tree-optimization/85964
10867         * tracer.c (better_p): Drop initialized count check, we only
10868         call the function with initialized counts now.
10869         (find_best_successor): Do find a best edge if one
10870         has uninitialized count.
10871         (find_best_predecessor): Likewise.  Do BB frequency check only
10872         if count is initialized.
10874 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
10876         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
10877         (aarch64_ldrstr_offset_compare): New.
10878         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
10879         load/store orderings.
10880         (aarch64_gen_adjusted_ldpstp): Likewise.
10882 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
10884         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10885         Check for subset of GENERAL_REGS and FP_REGS.
10886         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
10887         r=w alternative.
10889 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
10891         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
10892         and wi::to_poly_offset.  Add the current offset and then check
10893         whether the sum fits, rather than using an unchecked addition of
10894         a checked term.  Check for a shwi rather than a uhwi.
10895         * expr.c (get_bit_range): Use tree_to_poly_uint64.
10896         (store_constructor): Use poly_int_tree_p.
10897         (expand_expr_real_1): Likewise.
10898         * function.c (assign_temp): Likewise.
10899         * fold-const.c (const_binop): Use poly_int_tree_p and
10900         wi::to_poly_offset.
10901         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
10902         division.
10903         * ipa-icf-gimple.c (func_checker::compare_operand): Use
10904         to_poly_offset for MEM offsets.
10905         * ipa-icf.c (sem_variable::equals): Likewise.
10906         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
10907         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
10908         wi::to_poly_offset for BIT_FIELD_REF offsets.
10909         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
10910         wi::to_poly_offset.
10911         * var-tracking.c (emit_note_insn_var_location): Use
10912         tree_to_poly_uint64.
10914 2018-05-29  Jim Wilson  <jimw@sifive.com>
10916         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
10918 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
10920         PR target/85950
10921         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
10922         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
10923         sequence.
10924         (sse4_1_round<mode>2): Use nonimmediate_operand
10925         for operand 1 predicate.
10927 2018-05-29  Martin Sebor  <msebor@redhat.com>
10928             Richard Biener  <rguenther@suse.de>
10930         PR testsuite/85888
10931         * calls.c (get_size_range): Call determine_value_range instead
10932         of get_value_range..
10933         * tree-vrp.h (determine_value_range): Declared new function.
10934         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
10936 2018-05-29  Richard Biener  <rguenther@suse.de>
10938         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
10939         sure to use non-pattern stmts for get_earlier_stmt arguments.
10940         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
10941         called on pattern stmts.
10942         (get_later_stmt): Likewise.
10944 2018-05-29  Martin Liska  <mliska@suse.cz>
10946         PR gcov-profile/85759
10947         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
10948         env variables.
10950 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
10952         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
10953         VEC_UNPACK_*_EXPR.
10954         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
10955         VEC_PACK_*_EXPR.
10957         PR target/85918
10958         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10959         VEC_PACK_FLOAT_EXPR): New tree codes.
10960         * tree-pretty-print.c (op_code_prio): Handle
10961         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10962         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10963         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10964         * tree-inline.c (estimate_operator_cost): Likewise.
10965         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
10966         * fold-const.c (const_binop): Likewise.
10967         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
10968         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10969         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
10970         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
10971         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10972         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10973         * expr.c (expand_expr_real_2): Likewise.
10974         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
10975         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
10976         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
10977         optabs.
10978         * optabs.c (expand_widen_pattern_expr): For
10979         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
10980         sign from result type rather than operand's type.
10981         (expand_binop_directly): For vec_packu_float_optab and
10982         vec_packs_float_optab allow result type to be different from operand's
10983         type.
10984         * optabs-tree.c (optab_for_tree_code): Handle
10985         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10986         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
10987         * tree-vect-generic.c (expand_vector_operations_1):  Handle
10988         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10989         VEC_PACK_FLOAT_EXPR.
10990         * tree-vect-stmts.c (supportable_widening_operation): Handle
10991         FIX_TRUNC_EXPR.
10992         (supportable_narrowing_operation): Handle FLOAT_EXPR.
10993         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
10994         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
10995         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
10996         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
10997         mode attributes.
10998         (vec_pack<floatprefix>_float_<mode>): New expander.
10999         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
11000         attributes.
11001         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
11002         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
11003         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
11004         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
11005         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
11006         Document.
11007         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
11008         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
11009         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
11010         VEC_PACK_FLOAT_EXPR): Document.
11012 2018-05-29  Richard Biener  <rguenther@suse.de>
11014         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
11015         member.
11016         (stmt_vec_info_vec): Make pointer.
11017         (init_stmt_vec_info_vec): Remove.
11018         (free_stmt_vec_info_vec): Likewise.
11019         (set_stmt_vec_info_vec): New function.
11020         (free_stmt_vec_infos): Likewise.
11021         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
11022         (set_vinfo_for_stmt): Likewise.
11023         (get_earlier_stmt): Likewise.
11024         (get_later_stmt): Likewise.
11025         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
11026         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
11027         (vec_info::~vec_info): Free stmt_vec_infos.
11028         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
11029         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
11030         (pass_slp_vectorize::execute): Likewise.
11031         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
11032         (free_stmt_vec_info_vec): Likewise.
11033         (set_stmt_vec_info_vec): New function.
11034         (free_stmt_vec_infos): Likewise.
11035         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
11036         the global stmt_vec_info_vec.
11037         * tree-parloops.c (gather_scalar_reductions): Use
11038         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
11039         vector.
11041 2018-05-29  Richard Biener  <rguenther@suse.de>
11043         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
11045 2018-05-29  Martin Liska  <mliska@suse.cz>
11046             David Malcolm  <dmalcolm@redhat.com>
11048         * vec.c (test_reverse): New.
11049         (vec_c_tests): Add new test.
11050         * vec.h (vl_ptr>::reverse): New function.
11052 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
11054         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
11056         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
11057         and later.
11059 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11061         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
11063 2018-05-28  Richard Biener  <rguenther@suse.de>
11065         PR tree-optimization/85933
11066         * tree-vect-data-refs.c (vect_record_base_alignments): Only
11067         look at stmts marked as vectorizable.
11069 2018-05-28  Richard Biener  <rguenther@suse.de>
11071         PR tree-optimization/85934
11072         * tree-vect-generic.c (expand_vector_operations_1): Hoist
11073         vector boolean check before scalar optimization.
11075 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
11077         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
11078         for armv5te.
11080 2018-05-28  Mark Wielaard  <mark@klomp.org>
11082         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
11083         if it is an expression containing a minus sign.
11085 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
11087         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
11089 2018-05-27  Paul Koning  <ni1d@arrl.net>
11091         * config/pdp11/pdp11.md (truncsihi2): Remove.
11093 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
11094             Chung-Ju Wu  <jasonwucj@gmail.com>
11096         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
11097         implementation.
11098         (unaligned_store_dw): Ditto.
11099         * config/nds32/nds32-memory-manipulation.c
11100         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
11101         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
11102         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
11103         (emit_setmem_word_loop): Rename to ...
11104         (emit_setmem_doubleword_loop): ... this.
11105         (nds32_gen_dup_4_byte_to_word_value): New function.
11106         (nds32_gen_dup_8_byte_to_double_word_value): New function.
11107         (nds32_expand_setmem_loop): Refine implementation.
11108         (nds32_expand_setmem_loop_v3m): Ditto.
11109         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
11110         pattern.
11112 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
11114         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
11116 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
11118         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
11119         (nds32_init_machine_status): Initialize machine->attr_naked_p and
11120         machine->attr_no_prologue_p.
11121         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
11122         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
11123         (nds32_expand_epilogue): Consider attr_naked_p.
11124         (nds32_expand_epilogue_v3pop): Likewise.
11125         (nds32_can_use_return_insn): Likewise.
11126         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
11127         attr_no_prologue_p fields.
11128         * config/nds32/nds32.opt (mret-in-naked-func): New option.
11130 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
11132         PR target/85918
11133         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
11134         attributes.
11135         * config/i386/sse.md
11136         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
11137         Rename to ...
11138         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
11139         ... this.
11140         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
11141         Rename to ...
11142         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
11143         ... this.
11144         (*<floatsuffix>floatv2div2sf2): Rename to ...
11145         (*float<floatunssuffix>v2div2sf2): ... this.
11146         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
11147         (float<floatunssuffix>v2div2sf2_mask): ... this.
11148         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
11149         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
11150         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
11151         to ...
11152         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
11153         ... this.
11154         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11155         Rename to ...
11156         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11157         ... this.
11158         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11159         Rename to ...
11160         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11161         ... this.
11162         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
11163         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
11164         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
11165         gen_ufix_truncv8dfv8si2.
11166         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
11167         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
11168         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
11169         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
11170         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
11171         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
11172         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
11173         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
11175 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
11177         PR target/85900
11178         PR target/85345
11179         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
11181 2018-05-25  Jim Wilson  <jimw@sifive.com>
11183         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
11184         * config/riscv/riscv.c (struct machine_function): Add
11185         interrupt_handler_p and attribute_checked_p fields.
11186         (riscv_attribute_table): Add interrupt.
11187         (riscv_interrupt_type_p): New.
11188         (riscv_save_reg_p): Save extra regs for interrupt handler.
11189         (riscv_use_save_libcall): Return false  for interrupt handler.
11190         (riscv_first_stack_step): Add forward declaration.
11191         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
11192         for interrupt handler with large frame.  Use it for saved reg list.
11193         (riscv_expand_prologue): Move flag_stack_usage_info support to
11194         eliminate duplication.
11195         (riscv_expand_epilogue): Generate mret for interrupt handler.
11196         (riscv_epilogue_uses): New.
11197         (riscv_can_use_return_insn): Return false for interrupt handler.
11198         (riscv_function_ok_for_sibcall): Likewise.
11199         (riscv_set_current_function): Add interrupt handler support.
11200         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
11201         * config/riscv/riscv.md (UNSPECV_MRET): New.
11202         (GP_REGNUM): New.
11203         (riscv_frflags, riscv_fsflags): Use tab after opcode.
11204         (riscv_mret): New.
11205         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
11207 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
11209         PR tree-optimization/85712
11210         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
11211         this candidate has already been replaced in-situ by a copy.
11213 2018-05-25  Jason Merrill  <jason@redhat.com>
11215         PR c++/80485 - inline function non-zero address.
11216         * symtab.c (nonzero_address): Check DECL_COMDAT.
11218 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
11220         PR target/83628
11221         * config/alpha/alpha.md (ashlsi3): New insn pattern.
11222         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
11223         extension of SImode operation.  Use const123_operand predicate.
11224         (*saddsi_1): Remove.
11225         (*saddl_se_1): Ditto.
11226         (*ssubsi_1): Ditto.
11227         (*ssubl_se_1): Ditto.
11228         * config/alpha/predicates.md (const123_operand): New predicate.
11229         * config/alpha/constraints.md (P): Use IN_RANGE.
11231 2018-05-25  Richard Biener  <rguenther@suse.de>
11233         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
11234         defaulted to true.
11235         (ref_maybe_used_by_stmt_p): Likewise.
11236         (stmt_may_clobber_ref_p): Likewise.
11237         (stmt_may_clobber_ref_p_1): Likewise.
11238         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
11239         and pass it along.
11240         (ref_maybe_used_by_stmt_p): Likewise.
11241         (stmt_may_clobber_ref_p): Likewise.
11242         (stmt_may_clobber_ref_p_1): Likewise.
11243         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
11244         the alias oracle to disambiguate DRs with stmts DR analysis
11245         couldn't handle.
11246         (vect_analyze_data_refs): Do not give up on not analyzable
11247         DRs for BB vectorization.  Remove code truncating the dataref
11248         vector.
11250 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
11252         PR target/85832
11253         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
11254         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
11255         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
11257 2018-05-25  Richard Biener  <rguenther@suse.de>
11259         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
11260         function, combining stmt data ref gathering and fatal analysis
11261         parts.
11262         (vect_analyze_data_refs): Remove now redudnant code and simplify.
11263         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
11264         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
11265         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
11266         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
11268 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
11270         PR tree-optimization/85720
11271         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
11272         SCC if all partitions are builtins.
11273         (version_loop_by_alias_check): New parameter.  Generate cancelable
11274         runtime alias check if all partitions are builtins.
11275         (distribute_loop): Update call to above function.
11277 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
11279         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
11280         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
11281         (parm_default_def_partition_arg): Ditto.
11282         (set_parm_default_def_partition): Ditto.
11283         (get_parm_default_def_partitions): Ditto and make it static.
11284         (get_undefined_value_partitions): Ditto and make it static.
11285         (remove_ssa_form): Refactor call to init_var_map here.
11286         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
11287         computation for loop region.
11288         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
11289         (register_default_def): Delete.
11290         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
11291         (parm_default_def_partition_arg): Ditto.
11292         (set_parm_default_def_partition): Ditto.
11293         (get_parm_default_def_partitions): Ditto and make it static.
11294         (get_undefined_value_partitions): Ditto and make it static.
11295         (coalesce_with_default, coalesce_with_default): Update comment.
11296         (create_coalesce_list_for_region): New func factored out from
11297         create_outofssa_var_map.
11298         (populate_coalesce_list_for_outofssa): New func factored out from
11299         create_outofssa_var_map and coalesce_ssa_name.
11300         (create_outofssa_var_map): Delete.
11301         (coalesce_ssa_name): Refactor to support live range computation.
11302         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
11303         (get_parm_default_def_partitions): Delete.
11304         (get_undefined_value_partitions): Ditto.
11305         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
11306         computation for loop region.
11307         (new_tree_live_info, loe_visit_block): Ditto.
11308         (live_worklist, set_var_live_on_entry): Ditto.
11309         (calculate_live_on_exit, verify_live_on_entry): Ditto.
11310         * tree-ssa-live.h (struct _var_map): New fields.
11311         (init_var_map): Change decl.
11312         (region_contains_p): New.
11314 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
11316         * tree-ssa-live.h (live_merge_and_clear): Delete.
11318 2018-05-25  Richard Biener  <rguenther@suse.de>
11320         PR c++/85912
11321         * tree-dump.c (dequeue_and_dump): Remove access to removed
11322         operand 2 of a SWITCH_EXPR.
11324 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
11326         * doc/sourcebuild.texi (vect_double_cond_arith): Include
11327         multiplication and division.
11328         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
11329         (cond_udiv@var{m}, cond_umod@var{m}): Document.
11330         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
11331         (cond_udiv_optab, cond_umod_optab): New optabs.
11332         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
11333         (IFN_COND_RDIV): New internal functions.
11334         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
11335         TRUNC_MOD_EXPR and RDIV_EXPR.
11336         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
11337         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
11338         New unspecs.
11339         (SVE_INT_BINARY): Include mult.
11340         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
11341         (optab, sve_int_op): Handle mult.
11342         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
11343         UNSPEC_COND_DIV.
11344         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
11345         for SVE_INT_BINARY_SD.
11347 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
11349         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
11350         (optab, sve_int_op): Handle div and udiv.
11351         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
11352         for SVE_INT_BINARY_SD.
11353         (*<optab><mode>3): New insn for the same.
11355 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
11357         * tree-vect-patterns.c: Include predict.h.
11358         (vect_recog_divmod_pattern): Restrict check for division support
11359         to when optimizing for size.
11361 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
11363         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
11364         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
11365         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
11366         (gimple_match_op::set_op): Likewise.
11367         (gimple_resimplify4): Declare.
11368         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
11369         (expr::gen_transform): Likewise.
11370         (decision_tree::gen): Generate a simplification routine for 4 operands.
11371         * gimple-match-head.c (gimple_simplify): Add an overload for
11372         4 operands.  In the top-level function, handle up to 4 call
11373         arguments and call gimple_resimplify4.
11374         (gimple_resimplify4): New function.
11375         (build_call_internal): Pass a fourth operand.
11376         (maybe_push_to_seq): Likewise.
11377         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
11378         Fold VEC_COND_EXPRs of an operation and a default value into
11379         an IFN_COND_* function if possible.
11380         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
11381         New unspecs.
11382         (SVE_COND_FP_BINARY): Include them.
11383         (optab, sve_fp_op): Handle them.
11384         (SVE_INT_BINARY_REV): New code iterator.
11385         (SVE_COND_FP_BINARY_REV): New int iterator.
11386         (commutative): New int attribute.
11387         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
11388         Declare.
11389         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
11390         function.
11391         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
11392         (*cond_<optab><mode>): New patterns for reversed operands.
11394 2018-05-25  Richard Biener  <rguenther@suse.de>
11396         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
11397         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
11398         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
11399         (STMT_VINFO_GROUPED_ACCESS): Adjust.
11400         * tree-vect-data-refs.c (everywhere): Adjust users.
11401         * tree-vect-loop.c (everywhere): Likewise.
11402         * tree-vect-slp.c (everywhere): Likewise.
11403         * tree-vect-stmts.c (everywhere): Likewise.
11404         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
11406 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11408         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
11409         Rename to...
11410         (gcc_cv_as_section_exclude): ... this.
11411         Try Solaris as #exclude syntax.
11412         * configure: Regenerate.
11413         * config.in: Regenerate.
11414         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
11415         SECTION_EXCLUDE.
11416         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
11417         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
11419         * varasm.c (default_elf_asm_named_section): Don't check if
11420         HAVE_GAS_SECTION_EXCLUDE is defined.
11422 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
11424         * doc/md.texi: Update the documentation of the cond_* optabs
11425         to mention the new final operand.  Fix GET_MODE_NUNITS call.
11426         Describe the scalar case too.
11427         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
11428         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
11429         instead of 2.
11430         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
11431         (get_conditional_internal_fn): Update comment.
11432         * tree-vect-loop.c (vectorizable_reduction): Pass the original
11433         accumulator value as a final argument to conditional functions.
11434         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
11435         a define_expand and add an "else" operand.  Assert for now that
11436         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
11437         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
11438         (*cond_<optab><mode>): New patterns.
11439         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
11440         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
11441         (UNSPEC_COND_EOR): Delete.
11442         (optab): Remove associated mappings.
11443         (SVE_INT_BINARY): New code iterator.
11444         (sve_int_op): Remove int attribute and add "minus" to the code
11445         attribute.
11446         (SVE_COND_INT_OP): Delete.
11447         (SVE_COND_FP_OP): Rename to...
11448         (SVE_COND_FP_BINARY): ...this.
11450 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
11452         * optabs.c (can_reuse_operands_p): New function.
11453         (maybe_legitimize_operands): Try to reuse the results for
11454         earlier operands.
11456 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
11458         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
11459         Add {q} suffix to insn mnemonic.
11461 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
11463         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
11464         (msp430_warn_func_return): New.
11466 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
11468         * fold-const.c (tree_nonzero_bits): New function.
11469         * fold-const.h (tree_nonzero_bits): Likewise.
11470         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
11471         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
11473 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
11475         PR target/85900
11476         PR target/85345
11477         * varasm.c (assemble_alias): Check ifunc_resolver only on
11478         FUNCTION_DECL.
11480 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
11482         PR target/85903
11483         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
11484         when memory input operand is handled.
11486 2018-05-24  Luis Machado  <luis.machado@linaro.org>
11488         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
11489         global.
11490         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
11492 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
11494         * match.pd: Delay FMA folds until after vectorization.
11496 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
11498         PR target/83009
11499         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11500         address check not strict.
11502 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
11504         * gimple-match.h (gimple_match_op): New class.
11505         (mprts_hook): Replace parameters with a gimple_match_op *.
11506         (maybe_build_generic_op): Likewise.
11507         (gimple_simplified_result_is_gimple_val): Replace parameters with
11508         a const gimple_match_op *.
11509         (gimple_simplify): Replace code_helper * and tree * parameters with
11510         a gimple_match_op * parameter.
11511         (gimple_resimplify1): Replace code_helper *, tree and tree *
11512         parameters with a gimple_match_op * parameter.
11513         (gimple_resimplify2): Likewise.
11514         (gimple_resimplify3): Likewise.
11515         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
11516         parameters with a gimple_match_op * parameter.
11517         * gimple-match-head.c (gimple_simplify): Change prototypes of
11518         auto-generated functions to take a gimple_match_op * instead of
11519         separate code_helper * and tree * parameters.  Make the same
11520         change in the top-level overload and update calls to the
11521         gimple_resimplify routines.  Update calls to the auto-generated
11522         functions and to maybe_push_res_to_seq in the publicly-facing
11523         operation-specific gimple_simplify overloads.
11524         (gimple_match_op::MAX_NUM_OPS): Define.
11525         (gimple_resimplify1): Replace rcode and ops with a single res_op
11526         parameter.  Update call to gimple_simplify.
11527         (gimple_resimplify2): Likewise.
11528         (gimple_resimplify3): Likewise.
11529         (mprts_hook): Replace parameters with a gimple_match_op *.
11530         (maybe_build_generic_op): Likewise.
11531         (build_call_internal): Replace type, nargs and ops with
11532         a gimple_match_op *.
11533         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
11534         with a single gimple_match_op *.  Update calls to mprts_hook,
11535         build_call_internal and gimple_simplified_result_is_gimple_val.
11536         Factor out code that is common to the tree_code and combined_fn cases.
11537         * genmatch.c (expr::gen_transform): Replace tem_code and
11538         tem_ops with a gimple_match_op called tem_op.  Update calls
11539         to the gimple_resimplify functions and maybe_push_res_to_seq.
11540         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
11541         res_ops.  Update call to the gimple_resimplify functions.
11542         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
11543         (decision_tree::gen): Make the functions take a gimple_match_op *
11544         called res_op instead of separate res_code and res_ops parameters.
11545         Update call accordingly.
11546         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
11547         and ops with a single res_op parameter.  Update calls to
11548         maybe_build_generic_op and maybe_push_res_to_seq.
11549         (fold_stmt_1): Update calls to gimple_simplify and
11550         replace_stmt_with_simplification.
11551         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
11552         and gimple_simplified_result_is_gimple_val.
11553         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
11554         gimple_simplify.
11555         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
11556         with a gimple_match_op *.
11557         (vn_nary_build_or_lookup): Likewise.  Update call to
11558         vn_nary_build_or_lookup_1.
11559         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
11560         gimple_match_op *.  Update calls to the gimple_resimplify routines
11561         and to gimple_simplified_result_is_gimple_val.
11562         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
11563         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
11564         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
11565         (visit_nary_op): Likewise.
11566         (visit_reference_op_load): Likewise.
11568 2018-05-23  Luis Machado  <luis.machado@linaro.org>
11570         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
11571         modifier for printing the step amount.
11573 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
11575         PR target/78849
11576         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
11577         types.
11579 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
11581         * doc/sourcebuild.texi (Endianness): New subsubsection.
11583 2018-05-23  Luis Machado  <luis.machado@linaro.org>
11585         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11586         <prefetch_dynamic_strides>: New const bool field.
11587         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11588         prefetch_dynamic_strides.
11589         (exynosm1_prefetch_tune): Likewise.
11590         (thunderxt88_prefetch_tune): Likewise.
11591         (thunderx_prefetch_tune): Likewise.
11592         (thunderx2t99_prefetch_tune): Likewise.
11593         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
11594         false.
11595         (aarch64_override_options_internal): Update to set
11596         PARAM_PREFETCH_DYNAMIC_STRIDES.
11597         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11598         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11599         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11600         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11601         prefetch-dynamic-strides setting.
11603 2018-05-23  Luis Machado  <luis.machado@linaro.org>
11605         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11606         <minimum_stride>: New const int field.
11607         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11608         minimum_stride field defaulting to -1.
11609         (exynosm1_prefetch_tune): Likewise.
11610         (thunderxt88_prefetch_tune): Likewise.
11611         (thunderx_prefetch_tune): Likewise.
11612         (thunderx2t99_prefetch_tune): Likewise.
11613         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
11614         <default_opt_level>: Set to 3.
11615         (aarch64_override_options_internal): Update to set
11616         PARAM_PREFETCH_MINIMUM_STRIDE.
11617         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11618         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11619         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11620         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11621         stride is constant and is below the minimum stride threshold.
11623 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11625         * config/arm/arm-cpus.in (mode26): Delete.
11626         (armv4): Delete mode26 reference.
11627         * config/arm/arm.c (arm_configure_build_target): Delete use of
11628         isa_bit_mode26.
11630 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
11632         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
11633         New insn pattern.
11634         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
11635         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
11636         for non-SSE modes.
11637         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
11638         (floatunsdidf2): Ditto.
11640 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
11642         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
11643         (fixuns_trunc<mode>si2_avx512f): Ditto.
11644         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
11645         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
11646         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
11648 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
11650         PR rtl-optimization/79985
11651         * df-scan.c (df_insn_refs_collect): Remove special case for
11652         global registers and asm statements.
11654 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
11656         * extend.texi (Global Register Variables): Rewrite the bullet list.
11657         Note that the register is available for allocation. Note that access
11658         via inline asm must use constraints. Add note about async-signal
11659         handlers. Remove paragraph about automagic register selection.
11661 2018-05-23  Richard Biener  <rguenther@suse.de>
11663         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
11664         of fixed offset from memset VN.
11666 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
11668         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
11669         first_interp field.
11670         (alloc_cand_and_find_basis): Initialize first_interp field.
11671         (slsr_process_mul): Modify first_interp field.
11672         (slsr_process_add): Likewise.
11673         (slsr_process_cast): Modify first_interp field for each new
11674         interpretation.
11675         (slsr_process_copy): Likewise.
11676         (dump_candidate): Dump first_interp field.
11677         (replace_mult_candidate): Process all interpretations, not just
11678         subsequent ones.
11679         (replace_rhs_if_not_dup): Likewise.
11680         (replace_one_candidate): Likewise.
11682 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
11684         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
11685         Add new boolean.
11686         (aarch64_needs_frame_chain): New function.
11687         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
11689 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
11691         PR target/84882
11692         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
11693         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
11694         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
11695         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
11696         as true for strict-align.
11697         (aarch64_can_inline_p): Perform checks even when callee has no
11698         attributes to check for strict alignment.
11699         * doc/extend.texi (AArch64 Function Attributes): Document
11700         no-strict-align.
11701         * doc/invoke.texi: (AArch64 Options): Likewise.
11703 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
11705         PR tree-optimization/85853
11706         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
11707         the handling of the root of the node to...
11708         (vect_slp_analyze_node_operations_1): ...this new function,
11709         and run the whole thing with the child nodes' def types
11710         set according to their SLP node's def type.
11712 2018-05-23  Richard Biener  <rguenther@suse.de>
11714         PR middle-end/85874
11715         * tree-data-ref.c (create_runtime_alias_checks): Defer
11716         and ignore overflow warnings.
11718 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
11720         PR tree-optimization/85822
11721         * tree-vrp.c (is_masked_range_test): Fix handling of negative
11722         constants.
11724 2018-05-23  Richard Biener  <rguenther@suse.de>
11726         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
11727         memset constants via native_interpret_expr.
11729 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
11731         PR target/85345
11732         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
11733         attribute.
11734         (cgraph_node::create_alias): Likewise.
11735         (cgraph_node::get_availability): Check ifunc_resolver instead
11736         of looking up ifunc attribute.
11737         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
11738         * varasm.c (do_assemble_alias): Likewise.
11739         (assemble_alias): Likewise.
11740         (default_binds_local_p_3): Likewise.
11741         * cgraph.h (cgraph_node): Add ifunc_resolver.
11742         (cgraph_node::only_called_directly_or_aliased_p): Return false
11743         for IFUNC resolver.
11744         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
11745         attribute.
11746         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
11747         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
11748         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
11749         instead of looking up ifunc attribute.
11751 2018-05-22  Luis Machado  <luis.machado@linaro.org>
11753         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
11755 2018-05-22  Martin Sebor  <msebor@redhat.com>
11757         PR middle-end/85359
11758         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
11759         only when expasion succeeds.
11760         (expand_builtin_strcmp): Same.
11761         (expand_builtin_strncmp): Same.
11763 2018-05-22  Martin Sebor  <msebor@redhat.com>
11765         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
11767 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
11768             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11770         * config/aarch64/aarch64-ldpstp.md: Replace uses of
11771         aarch64_mem_pair_operand with memory_operand and delete operand swapping
11772         code.
11773         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11774         Add check for legitimate_address.
11775         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
11776         (aarch64_swap_ldrstr_operands): New.
11777         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
11778         Define prototype.
11780 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
11781             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11783         * config/aarch64/aarch64.md: New patterns to generate stp
11784         and ldp.
11785         (store_pair_sw, store_pair_dw): New patterns to generate stp for
11786         single words and double words.
11787         (load_pair_sw, load_pair_dw): Likewise.
11788         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
11789         Delete.
11790         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
11791         Delete.
11792         * config/aarch64/aarch64-ldpstp.md: Modify peephole
11793         for different mode ldpstp and add peephole for merged zero stores.
11794         Likewise for loads.
11795         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11796         Add size check.
11797         (aarch64_gen_store_pair): Rename calls to match new patterns.
11798         (aarch64_gen_load_pair): Rename calls to match new patterns.
11799         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
11800         (load_pair<DREG:mode><DREG2:mode>): ... This.
11801         (store_pair<mode>): Rename to...
11802         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
11803         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
11804         New mode iterators.
11805         (V_INT_EQUIV): Handle SImode.
11806         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
11807         New predicate.
11809 2018-05-22  Martin Sebor  <msebor@redhat.com>
11811         PR c/85623
11812         * calls.c (maybe_warn_nonstring_arg): Use string length to set
11813         or ajust the presumed bound on an operation to avoid unnecessary
11814         warnings.
11816 2018-05-22  Martin Sebor  <msebor@redhat.com>
11818         PR tree-optimization/85826
11819         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
11820         assuming that a DECL necesarily has a constant size.
11822 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
11824         PR middle-end/85862
11825         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
11827 2018-05-22  Richard Biener  <rguenther@suse.de>
11829         PR tree-optimization/85834
11830         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
11831         non-constant and non-zero memset arguments.
11833 2018-05-22  Martin Liska  <mliska@suse.cz>
11835         PR ipa/85607
11836         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
11838 2018-05-22  Richard Biener  <rguenther@suse.de>
11840         PR tree-optimization/85863
11841         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
11842         comparisons when vectype is specified.
11843         (vectorizable_condition): Do not specify vectype for
11844         vect_is_simple_cond when SLP vectorizing.
11846 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
11848         PR target/85657
11849         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
11850         define __ibm128 as long double.
11851         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
11852         as a distinct type when IEEE 128-bit support is enabled.
11853         (init_float128_ieee): Fix up conversions between IFmode and IEEE
11854         128-bit types to use the correct functions.
11855         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
11856         convert between 128-bit floating point types that have different
11857         modes but the same representation, instead of using gen_lowpart to
11858         makean alias.
11859         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
11860         KFmode.
11861         (IFKF_reg): New attributes to give the register constraints for
11862         IFmode and KFmode.
11863         (extend<mode>tf2_internal): New insns to mark an explicit
11864         conversion between 128-bit floating point types that have a
11865         different mode but share the same representation.
11867 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
11869         PR tree-optimization/85814
11870         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
11871         a null return from get_strinfo when unsharing the next
11872         strinfo in the chain.
11874 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
11876         PR gcc/84923
11877         * varasm.c (weak_finish): Clean up weak_decls.
11879 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11881         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
11882         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
11883         UNSPEC_UADALP values.
11884         * config/aarch64/iterators.md (ABAL): New int iterator.
11885         (ABDL2): Likewise.
11886         (ADALP): Likewise.
11887         (sur): Add mappings for the above.
11888         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
11889         New define_insn.
11890         (aarch64_<sur>abal<mode>_4): Likewise.
11891         (aarch64_<sur>adalp<mode>_3): Likewise.
11892         (<sur>sadv16qi): New define_expand.
11894 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
11896         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
11897         (*movdf_internal): Ditto.
11898         (*rcpsf2_sse): Ditto.
11899         (*rsqrtsf2_sse): Ditto.
11900         (*sqrt<mode>2_sse): Ditto.
11902 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
11904         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
11905         eor3q<mode>4.
11906         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
11907         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
11908         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
11909         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
11910         vbcaxq_s64): New.
11911         * config/aarch64/arm_neon.h: Likewise.
11912         * config/aarch64/iterators.md (VQ_I): New.
11914 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
11916         * config.gcc: Add arc/t-multilib-linux to tmake_file for
11917         arc*-*-linux*.
11918         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
11919         MULTILIB_DIRNAMES
11921 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
11923         * config/nds32/constraints.md (S): New constraint.
11924         * config/nds32/nds32.md (call_internal): Use constraint S.
11925         (call_value_internal): Likewise.
11926         (sibcall_internal): Likewise.
11927         (sibcall_value_internal): Likewise.
11929 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
11930             Chung-Ju Wu  <jasonwucj@gmail.com>
11932         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
11933         into consideration.
11935 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
11936             Chung-Ju Wu  <jasonwucj@gmail.com>
11938         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
11939         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
11940         (nds32_rtx_costs_impl): Simplify.
11941         (nds32_address_cost_impl): Simplify.
11942         (nds32_init_rtx_costs): New function.
11943         (nds32_rtx_costs_speed_prefer): Likewise.
11944         (nds32_rtx_costs_size_prefer): Likewise.
11945         (nds32_address_cost_speed_prefer): Likewise.
11946         (nds32_address_cost_speed_fwprop): Likewise.
11947         (nds32_address_cost_size_prefer): Likewise.
11948         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
11949         * config/nds32/nds32.c (nds32_option_override): Use
11950         nds32_init_rtx_costs function.
11952 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
11954         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
11955         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
11956         (TARGET_PIPELINE_N8): Likewise.
11957         (TARGET_PIPELINE_N10): Likewise.
11958         (TARGET_PIPELINE_N13): Likewise.
11959         (TARGET_PIPELINE_GRAYWOLF): Likewise.
11961 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
11963         * config/nds32/nds32-fpu.md: Update copyright year.
11965 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
11967         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
11969 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
11971         * config/nds32/nds32.c
11972         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
11973         * config/nds32/nds32.opt (minline-asm-r15): New option.
11975 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
11977         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
11978         MASK_HW_ABS.
11979         * config/nds32/nds32.md (abssi2): New pattern.
11981 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
11983         * config/i386/i386.md (rex64namesuffix): New mode attribute.
11984         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
11985         Merge insn pattern from sse_cvtsi2ss<round_name> and
11986         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
11987         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
11988         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
11989         using SWI48 mode iterator.
11990         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
11991         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
11992         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
11993         pattern from sse_cvttss2si<round_saeonly_name>
11994         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
11995         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
11996         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
11997         using SWI48 mode iterator.
11998         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
11999         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
12000         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
12001         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
12002         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
12003         using SWI48 mode iterator.
12004         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
12005         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
12006         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
12007         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
12008         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
12009         SWI48 mode iterator.
12010         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
12011         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
12012         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
12013         pattern from sse_cvttsd2si<round_saeonly_name>
12014         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
12016 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
12018         * config/nds32/nds32-md-auxiliary.c
12019         (nds32_valid_smw_lwm_base_p): Refine.
12020         (nds32_output_smw_single_word): Refine.
12021         (nds32_output_smw_double_word): New.
12022         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
12024 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
12026         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
12027         (nds32_output_stack_pop): Refine.
12028         (nds32_expand_unaligned_load): Refine.
12029         (nds32_expand_unaligned_store): Refine.
12031 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
12032             Chung-Ju Wu  <jasonwucj@gmail.com>
12034         * config/nds32/constants.md: Add TP_REGNUM constant.
12035         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
12036         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
12037         UNSPEC_ADD32.
12038         * config/nds32/nds32-doubleword.md: Consider flag_pic.
12039         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
12040         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
12041         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
12042         and PIC code generation.
12043         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
12044         code generation.
12045         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
12046         optimization.
12047         * config/nds32/nds32.md: Support TLS and PIC.
12048         * config/nds32/nds32.c: Support TLS and PIC.
12049         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
12050         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
12051         predicate.
12053 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
12055         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
12056         mode with E_ prefix.
12058 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
12059             Chung-Ju Wu  <jasonwucj@gmail.com>
12061         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
12062         * config/nds32/nds32-md-auxiliary.c
12063         (symbolic_reference_mentioned_p): New.
12064         (nds32_legitimize_ict_address): New.
12065         (nds32_expand_ict_move): New.
12066         (nds32_indirect_call_referenced_p): New.
12067         (nds32_symbol_binds_local_p): Delete.
12068         (nds32_long_call_p): Modify.
12069         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
12070         * config/nds32/nds32-protos.h
12071         (symbolic_reference_mentioned_p): Declare.
12072         (nds32_legitimize_ict_address): Declare.
12073         (nds32_expand_ict_move): Declare.
12074         (nds32_indirect_call_referenced_p): Declare.
12075         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
12076         (nds32_relax_group): Use nds32_ict_const_p as condition.
12077         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
12078         (nds32_asm_file_start): Output ict_model directive in asm code.
12079         (nds32_legitimate_address_p): Consider indirect call.
12080         (nds32_print_operand): Consider indirect call.
12081         (nds32_print_operand_address): Consider indirect call.
12082         (nds32_insert_attributes): Handle "indirect_call" attribute.
12083         (TARGET_LEGITIMATE_ADDRESS_P): Define.
12084         (TARGET_LEGITIMATE_CONSTANT_P): Define.
12085         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
12086         (TARGET_DELEGITIMIZE_ADDRESS): Define.
12087         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
12088         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
12089         (TARGET_ICT_MODEL_SMALL): Define.
12090         (TARGET_ICT_MODEL_LARGE): Define.
12091         * config/nds32/nds32.md (movsi): Consider ict model.
12092         (call, call_value): Consider ict model.
12093         (sibcall, sibcall_value): Consider ict model.
12094         * config/nds32/nds32.opt (mict-model): New option.
12095         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
12096         model.
12098 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
12099             Monk Chiang  <sh.chiang04@gmail.com>
12100             Jim Wilson <jimw@sifive.com>
12102         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
12103         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
12104         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
12105         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
12106         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
12107         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
12108         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
12109         compute save_libcall_adjustment properly.
12110         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
12111         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
12112         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
12113         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
12114         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
12115         (ABI_SPEC): Handle mabi=ilp32e.
12116         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
12117         (RVE): Add RVE mask.
12118         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
12119         <-march>: Add rv32e as an example.
12121 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
12123         PR c++/82899
12124         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
12125         (intra_create_variable_infos): Handle C++ constructors.
12127 2018-05-18  Martin Liska  <mliska@suse.cz>
12129         * passes.def: Remove a redundant pass.
12131 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
12133         PR bootstrap/85838
12134         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
12136 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12138         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
12139         (ARMv4): Update.
12140         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
12141         (ARMv6m): Update.
12142         (armv2, armv2a, armv3, armv3m): Delete architectures.
12143         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
12144         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
12145         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
12146         Delete cpus.
12147         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
12148         (*mulsidi3adddi): Likewise.
12149         (mulsidi3): Likewise.
12150         (*mulsidi3_nov6): Likewise.
12151         (umulsidi3): Likewise.
12152         (umulsidi3_nov6): Likewise.
12153         (umaddsidi4): Likewise.
12154         (*umulsidi3adddi): Likewise.
12155         (smulsi3_highpart): Likewise.
12156         (*smulsi3_highpart_nov6): Likewise.
12157         (umulsi3_highpart): Likewise.
12158         (*umulsi3_highpart_nov6): Likewise.
12159         * config/arm/arm.h (arm_arch3m): Delete.
12160         * config/arm/arm.c (arm_arch3m): Delete.
12161         (arm_option_override_internal): Update armv3-related comment.
12162         (arm_configure_build_target): Delete use of isa_bit_mode32.
12163         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
12164         (arm_rtx_costs_internal): Delete check of arm_arch3m.
12165         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
12166         (mulsa3): Likewise.
12167         (mulusa3): Likewise.
12168         * config/arm/arm-protos.h (arm_arch3m): Delete.
12169         * config/arm/arm-tables.opt: Regenerate.
12170         * config/arm/arm-tune.md: Likewise.
12171         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
12172         deleted architectures.
12174 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12176         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
12177         (armv5t, armv5te): New features.
12178         (ARMv5, ARMv5e): Delete fgroups.
12179         (ARMv5t, ARMv5te): Adjust for above changes.
12180         (ARMv6m): Likewise.
12181         (armv5, armv5e): Delete arches.
12182         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
12183         arm_arch5.
12184         (*call_reg_arm): Likewise.
12185         (*call_value_reg_armv5): Likewise.
12186         (*call_value_reg_arm): Likewise.
12187         (*call_symbol): Likewise.
12188         (*call_value_symbol): Likewise.
12189         (*sibcall_insn): Likewise.
12190         (*sibcall_value_insn): Likewise.
12191         (clzsi2): Likewise.
12192         (prefetch): Likewise.
12193         (define_split and define_peephole2 dependent on arm_arch5):
12194         Likewise.
12195         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
12196         arm_arch5e.
12197         (TARGET_ARM_QBIT): Likewise.
12198         (TARGET_DSP_MULTIPLY): Likewise.
12199         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
12200         (arm_arch5, arm_arch5e): Delete.
12201         (arm_arch5t, arm_arch5te): Declare.
12202         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
12203         (arm_arch5t): Declare.
12204         (arm_option_reconfigure_globals): Update for the above.
12205         (arm_options_perform_arch_sanity_checks): Update comment, replace
12206         use of arm_arch5 with arm_arch5t.
12207         (use_return_insn): Likewise.
12208         (arm_emit_call_insn): Likewise.
12209         (output_return_instruction): Likewise.
12210         (arm_final_prescan_insn): Likewise.
12211         (arm_coproc_builtin_available): Likewise.
12212         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
12213         arm_arch5e with arm_arch5t and arm_arch5te.
12214         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
12215         (arm_arch5t, arm_arch5te): Declare.
12216         * config/arm/arm-tables.opt: Regenerate.
12217         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
12218         * config/arm/t-multilib: Likewise.
12219         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
12220         instead of arm_arch5.
12221         (*call_reg_thumb1): Likewise.
12222         (*call_value_reg_thumb1_v5): Likewise.
12223         (*call_value_reg_thumb1): Likewise.
12224         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
12225         unreachable path.
12226         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
12228 2018-05-18  Martin Liska  <mliska@suse.cz>
12230         PR gcov-profile/84846
12231         * doc/gcov.texi: Document -t option of gcov tool.
12233 2018-05-18  Martin Liska  <mliska@suse.cz>
12235         PR gcov-profile/84846
12236         * gcov.c (print_usage): Add new -t option.
12237         (process_args): Handle the option.
12238         (generate_results): Use stdout as output when requested by
12239         the option.
12241 2018-05-18  Martin Liska  <mliska@suse.cz>
12243         PR gcov-profile/84846
12244         * coverage.c (coverage_init): Write PWD to .gcno file.
12245         * doc/gcov.texi: Document how working directory is printed.
12246         * gcov-dump.c (dump_gcov_file): Print PWD.
12247         * gcov.c (output_intermediate_file): Likewise.
12248         (read_graph_file): Read PWD string.
12249         (output_lines): Print PWD.
12251 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12253         PR middle-end/85817
12254         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
12255         for retval and return false if all args to phi are zero.
12257 2018-05-18  Richard Biener  <rguenther@suse.de>
12259         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
12260         method.
12261         (evrp_dom_walker::before_dom_children): Call it.
12263 2018-05-18  Richard Biener  <rguenther@suse.de>
12265         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
12266         results when processing array refs with variable index.
12268 2018-05-18  Toon Moene  <toon@moene.org>
12270         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
12271         directly after that of -floop-interchange. Indicate that both
12272         options are enabled by default when specifying -O3.
12274 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12276         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
12277         iterator.  Delete separate integer-mode vec_set<mode> expander.
12278         (aarch64_simd_vec_setv2di): Delete.
12279         (vec_setv2di): Delete.
12280         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
12281         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
12282         the "w, r" alternative.
12284 2018-05-18  Martin Liska  <mliska@suse.cz>
12286         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
12287         * tree-pass.h (make_pass_lower_switch_O0): New function.
12288         * tree-switch-conversion.c (node_has_low_bound): Remove.
12289         (node_has_high_bound): Likewise.
12290         (node_is_bounded): Likewise.
12291         (class pass_lower_switch): Make it a template type and create
12292         two instances.
12293         (pass_lower_switch::execute): Add template argument.
12294         (make_pass_lower_switch): New function.
12295         (make_pass_lower_switch_O0): New function.
12296         (do_jump_if_equal): Remove.
12297         (emit_case_nodes): Simplify to just handle all 3 cases and leave
12298         all the hard work to tree optimization passes.
12300 2018-05-18  Martin Liska  <mliska@suse.cz>
12302         * dbgcnt.c (limit_low): Renamed from limit.
12303         (limit_high): New variable.
12304         (dbg_cnt_is_enabled): Check for upper limit.
12305         (dbg_cnt): Adjust dumping.
12306         (dbg_cnt_set_limit_by_index): Add new argument for high
12307         value.
12308         (dbg_cnt_set_limit_by_name): Likewise.
12309         (dbg_cnt_process_single_pair): Parse new format.
12310         (dbg_cnt_process_opt): Use strtok.
12311         (dbg_cnt_list_all_counters): Remove 'value' and add
12312         'limit_high'.
12313         * doc/invoke.texi: Document changes.
12315 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
12317         * doc/sourcebuild.texi (scalar_all_fma): Document.
12318         * tree.def (FMA_EXPR): Delete.
12319         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
12320         * internal-fn.c (ternary_direct): New macro.
12321         (expand_ternary_optab_fn): Likewise.
12322         (direct_ternary_optab_supported_p): Likewise.
12323         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
12324         * builtins.c (fold_builtin_fma): Delete.
12325         (fold_builtin_3): Don't call it.
12326         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
12327         * expr.c (expand_expr_real_2): Likewise.
12328         * fold-const.c (operand_equal_p): Likewise.
12329         (fold_ternary_loc): Likewise.
12330         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
12331         * gimple.c (DEFTREECODE): Likewise.
12332         * gimplify.c (gimplify_expr): Likewise.
12333         * optabs-tree.c (optab_for_tree_code): Likewise.
12334         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
12335         * tree-eh.c (operation_could_trap_p): Likewise.
12336         (stmt_could_throw_1_p): Likewise.
12337         * tree-inline.c (estimate_operator_cost): Likewise.
12338         * tree-pretty-print.c (dump_generic_node): Likewise.
12339         (op_code_prio): Likewise.
12340         * tree-ssa-loop-im.c (stmt_cost): Likewise.
12341         * tree-ssa-operands.c (get_expr_operands): Likewise.
12342         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
12343         * fold-const-call.h (fold_fma): Delete.
12344         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
12345         CFN_FNMA and CFN_FNMS.
12346         (fold_fma): Delete.
12347         * genmatch.c (combined_fn): New enum.
12348         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
12349         (commutative_op): New function.
12350         (commutate): Use it.  Handle more than 2 operands.
12351         (dt_operand::gen_gimple_expr): Use commutative_op.
12352         (parser::parse_expr): Allow :c to be used with non-binary
12353         operators if the commutative operand is known.
12354         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
12355         CFN_FMS, CFN_FNMA and CFN_FNMS.
12356         (backprop::process_assign_use): Remove FMA_EXPR handling.
12357         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
12358         (gen_hsa_fma): New function.
12359         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
12360         IFN_FNMA and IFN_FNMS.
12361         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
12362         * gimple-fold.h (follow_all_ssa_edges): Declare.
12363         * gimple-fold.c (follow_all_ssa_edges): New function.
12364         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
12365         gimple_build interface and use follow_all_ssa_edges to fold the result.
12366         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
12367         instead of checking for optabs directly.
12368         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
12369         rather than FMA_EXPRs.
12370         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
12371         call to IFN_FMA instead of an FMA_EXPR.
12373 2018-05-17  Jim Wilson  <jimw@sifive.com>
12375         * expr.c (do_tablejump): When converting index to Pmode, if we have a
12376         sign extended promoted subreg, and the range does not have the sign bit
12377         set, then do a sign extend.
12379         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
12380         test, check for sign extended subreg and/or constant operands, and
12381         do a sign extend in that case.
12383 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
12385         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
12386         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
12387         Add untyped.
12388         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
12389         Change logics_shift_reg to logics_shift_imm.
12390         (thunderx2t99_fp_loadpair_basic): Delete.
12391         (thunderx2t99_fp_storepair_basic): Delete.
12392         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
12393         (thunderx2t99_asimd_polynomial): Delete.
12394         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
12395         and neon_fp_mul_d_scalar_q.
12396         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
12397         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
12398         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
12399         (thunderx2t99_asimd_lut): Add missing tbl types.
12400         (thunderx2t99_asimd_ext): Delete.
12401         (thunderx2t99_asimd_load1_1_mult): Delete.
12402         (thunderx2t99_asimd_load1_2_mult): Delete.
12403         (thunderx2t99_asimd_load1_ldp): New.
12404         (thunderx2t99_asimd_load1): New.
12405         (thunderx2t99_asimd_load2): Add missing *load2* types.
12406         (thunderx2t99_asimd_load3): New.
12407         (thunderx2t99_asimd_load4): New.
12408         (thunderx2t99_asimd_store1_1_mult): Delete.
12409         (thunderx2t99_asimd_store1_2_mult): Delete.
12410         (thunderx2t99_asimd_store2_mult): Delete.
12411         (thunderx2t99_asimd_store2_onelane): Delete.
12412         (thunderx2t99_asimd_store_stp): New.
12413         (thunderx2t99_asimd_store1): New.
12414         (thunderx2t99_asimd_store2): New.
12415         (thunderx2t99_asimd_store3): New.
12416         (thunderx2t99_asimd_store4): New.
12418 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
12420         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
12421         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
12423 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
12424             Segher Boessenkool  <segher@kernel.crashing.org>
12426         PR target/85698
12427         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
12428         operand.
12430 2018-05-17  Richard Biener  <rguenther@suse.de>
12432         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
12433         for pruning loop and prune defs feeding only already visited PHIs.
12435 2018-05-17  Richard Biener  <rguenther@suse.de>
12437         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
12439 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
12440             Richard Biener  <rguenther@suse.de>
12442         PR tree-optimization/85793
12443         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
12444         for VMAT_ELEMENTWISE.
12446 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
12448         * internal-fn.h (lookup_internal_fn): Declare
12449         * internal-fn.c (lookup_internal_fn): New function.
12450         * gimple.c (gimple_build_call_from_tree): Handle calls to
12451         internal functions.
12452         * gimple-pretty-print.c (dump_gimple_call): Print "." before
12453         internal function names.
12454         * tree-pretty-print.c (dump_generic_node): Likewise.
12455         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
12457 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
12459         * gimple-fold.h (gimple_build): Make the function forms take
12460         combined_fn rather than built_in_function.
12461         (gimple_simplify): Likewise.
12462         * gimple-match-head.c (gimple_simplify): Likewise.
12463         * gimple-fold.c (gimple_build): Likewise.
12464         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
12465         rather than gimple_build_call_internal.
12466         (get_initial_defs_for_reduction): Likewise.
12467         (vect_create_epilog_for_reduction): Likewise.
12468         (vectorizable_live_operation): Likewise.
12470 2018-05-17  Martin Liska  <mliska@suse.cz>
12472         * gimple-ssa-sprintf.c (format_directive): Do not use
12473         space in between 'G_' and '('.
12475 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
12477         PR target/85323
12478         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
12479         even if the mask is not all ones.
12481         PR target/85323
12482         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
12483         vector.
12484         (ix86_gimple_fold_builtin): Likewise.
12486         PR target/85323
12487         * config/i386/i386.c: Include tree-vector-builder.h.
12488         (ix86_vector_shift_count): New function.
12489         (ix86_fold_builtin): Fold shift builtins by scalar count.
12490         (ix86_gimple_fold_builtin): Likewise.
12492         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
12493         _mm512_setzero): New intrinsics.
12495 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
12496             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12498         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
12499         code generation for cases where splatting a value is not useful.
12500         * simplify-rtx.c (simplify_ternary_operation): Simplify
12501         vec_merge across a vec_duplicate and a paradoxical subreg forming
12502         a vector mode to a vec_concat.
12504 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
12506         * config.gcc: Support "goldmont-plus".
12507         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12508         "goldmont-plus".
12509         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12510         PROCESSOR_GOLDMONT_PLUS.
12511         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
12512         (processor_target_table): Add "goldmont-plus".
12513         (PTA_GOLDMONT_PLUS): Define.
12514         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
12515         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
12516         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
12517         (fold_builtin_cpu): Add "goldmont-plus".
12518         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
12519         (ix86_option_override_internal): Add "goldmont-plus".
12520         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
12521         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
12522         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
12523         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
12525 2018-05-17  Richard Biener  <rguenther@suse.de>
12527         PR tree-optimization/85757
12528         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
12529         remove defs that only feed that PHI from further processing.
12531 2018-05-16  Jim Wilson  <jimw@sifive.com>
12533         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
12534         asterisk to name.
12535         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
12537 2018-05-16  Mark Wielaard  <mark@klomp.org>
12539         * dwarf2out.c (count_index_strings): New function.
12540         (output_indirect_strings): Call count_index_strings and generate
12541         header for dwarf_version >= 5.
12543 2018-05-16  Mark Wielaard  <mark@klomp.org>
12545         * dwarf2out.c (dwarf_FORM): New function.
12546         (set_indirect_string): Use dwarf_FORM.
12547         (reset_indirect_string): Likewise.
12548         (size_of_die): Likewise.
12549         (value_format): Likewise.
12550         (output_die): Likewise.
12551         (add_skeleton_AT_string): Likewise.
12552         (output_macinfo_op): Likewise.
12553         (index_string): Likewise.
12554         (output_index_string_offset): Likewise.
12555         (output_index_string): Likewise.
12556         (count_index_strings): Likewise.
12558 2018-05-16  Carl Love  <cel@us.ibm.com>
12560         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12561         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
12563 2018-05-16  Martin Jambor  <mjambor@suse.cz>
12565         * ipa-prop.c (ipa_free_all_edge_args): Remove.
12566         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
12568 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
12570         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
12571         (fnma<mode>4): Likewise.
12572         (fms<mode>4): Likewise.
12573         (fnms<mode>4): Likewise.
12574         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
12575         (aarch64_fnma<mode>4): Likewise.
12576         (aarch64_fms<mode>4): Likewise.
12577         (aarch64_fnms<mode>4): Likewise.
12578         (aarch64_fnmadd<mode>4): Likewise.
12580 2018-05-16  Jason Merrill  <jason@redhat.com>
12582         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
12584 2018-05-16  Richard Biener  <rguenther@suse.de>
12586         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
12587         (dump_stmt_cost): Declare.
12588         (add_stmt_cost): Dump cost we add.
12589         (add_stmt_costs): New function.
12590         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
12591         No longer exported.
12592         (vect_analyze_stmt): Adjust prototype.
12593         (vectorizable_condition): Likewise.
12594         (vectorizable_live_operation): Likewise.
12595         (vectorizable_reduction): Likewise.
12596         (vectorizable_induction): Likewise.
12597         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
12598         cost vector to pass to vectorizable_ and record afterwards.
12599         (vect_model_reduction_cost): Take cost vector argument and adjust.
12600         (vect_model_induction_cost): Likewise.
12601         (vectorizable_reduction): Likewise.
12602         (vectorizable_induction): Likewise.
12603         (vectorizable_live_operation): Likewise.
12604         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
12605         SLP_TREE_NUMBER_OF_VEC_STMTS.
12606         (vect_analyze_slp_cost_1): Remove.
12607         (vect_analyze_slp_cost): Likewise.
12608         (vect_slp_analyze_node_operations): Take visited args and
12609         a target cost vector.  Avoid processing already visited stmt sets.
12610         (vect_slp_analyze_operations): Use a local cost vector to gather
12611         costs and register those of non-discarded instances.
12612         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
12613         (vect_schedule_slp_instance): Remove copying of
12614         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
12615         zero.
12616         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
12617         adding cost.  Record cost entry location.
12618         (vect_prologue_cost_for_slp_op): Function to compute cost of
12619         a constant or invariant generated for SLP vect in the prologue,
12620         split out from vect_analyze_slp_cost_1.
12621         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
12622         (vect_model_promotion_demotion_cost): Likewise.
12623         (vect_model_store_cost): Likewise, make static.
12624         (vect_model_load_cost): Likewise.
12625         (vectorizable_bswap): Add cost vector arg and adjust.
12626         (vectorizable_call): Likewise.
12627         (vectorizable_simd_clone_call): Likewise.
12628         (vectorizable_conversion): Likewise.
12629         (vectorizable_assignment): Likewise.
12630         (vectorizable_shift): Likewise.
12631         (vectorizable_operation): Likewise.
12632         (vectorizable_store): Likewise.
12633         (vectorizable_load): Likewise.
12634         (vectorizable_condition): Likewise.
12635         (vectorizable_comparison): Likewise.
12636         (can_vectorize_live_stmts): Likewise.
12637         (vect_analyze_stmt): Likewise.
12638         (vect_transform_stmt): Adjust calls to vectorizable_*.
12639         * tree-vectorizer.c: Include gimple-pretty-print.h.
12640         (dump_stmt_cost): New function.
12642 2018-05-16  Richard Biener  <rguenther@suse.de>
12644         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
12645         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
12646         * tree-ssa-dse.c: Include tree-ssa-loop.h.
12647         (check_name): New callback.
12648         (dse_classify_store): Track cycles via a visited bitmap of PHI
12649         defs and simplify handling of in-loop and across loop dead stores
12650         and properly fail for loop-variant refs.  Handle byte-tracking with
12651         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
12652         limiting the walk.
12654 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
12656         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
12657         (vect_get_mask_type_for_stmt): Likewise.
12658         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
12659         split out from...
12660         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
12661         to determine the statement's vector type and the vector type that
12662         should be used for calculating nunits.  Deal with cases in which
12663         the type has to be deferred.
12664         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
12665         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
12666         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
12667         (vect_determine_vf_for_stmt): New functions, split out from...
12668         (vect_determine_vectorization_factor): ...here.
12669         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
12670         (vect_get_mask_type_for_stmt): New functions, split out from
12671         vect_determine_vectorization_factor.
12673 2018-05-16  Richard Biener  <rguenther@suse.de>
12675         * tree-cfg.c (verify_gimple_assign_ternary): Properly
12676         verify the [VEC_]COND_EXPR embedded comparison.
12678 2018-05-15  Martin Sebor  <msebor@redhat.com>
12680         PR tree-optimization/85753
12681         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
12682         RECORD_TYPE in addition to ARRAY_TYPE.
12684 2018-05-15  Martin Sebor  <msebor@redhat.com>
12686         PR middle-end/85643
12687         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
12689 2018-05-15  Richard Biener  <rguenther@suse.de>
12691         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
12692         add by_clobber_p one.  Change algorithm to collect all defs
12693         representing uses we need to walk and try reducing them to
12694         a single one before failing.
12695         (dse_dom_walker::dse_optimize_stmt): Adjust.
12697 2018-05-13  Mark Wielaard  <mark@klomp.org>
12699         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
12700         (size_of_loc_descr): Likewise.
12701         (output_loc_operands): Likewise.
12702         (output_loc_operands_raw): Likewise.
12703         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
12704         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
12705         (hash_loc_operands): Likewise.
12706         (compare_loc_operands): Likewise.
12708 2018-05-14  Mark Wielaard  <mark@klomp.org>
12710         * dwarf2out.c (count_index_addrs): New function.
12711         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
12713 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12715         PR tree-optimization/83648
12716         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
12717         return value as malloc candidate.
12719 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12721         PR ipa/85734
12722         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
12723         param as true in call to suggest_attribute.
12725 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
12727         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
12728         -mreadonly-in-sdata.
12730 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12732         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
12733         New pattern.
12734         (aarch64_crypto_aesd_fused): Likewise.
12736 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
12738         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
12739         (movsi_aarch64): Likewise.
12740         (load_pairsi): Likewise.
12741         (load_pairdi): Likewise.
12742         (store_pairsi): Likewise.
12743         (store_pairdi): Likewise.
12744         (load_pairsf): Likewise.
12745         (load_pairdf): Likewise.
12746         (store_pairsf): Likewise.
12747         (store_pairdf): Likewise.
12748         (zero_extend): Likewise.
12749         (trunc): Swap alternatives.
12750         (fcvt_target): Add '?' to prefer w over r.
12752 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
12754         PR target/85756
12755         * config/i386/i386.md: Disallow non-commutative arithmetics in
12756         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
12757         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
12758         in the peephole2 before it.
12760 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
12762         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
12763         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
12764         (ix86_handle_option): Handle -mcldemote.
12765         * config.gcc: New header.
12766         * config/i386/cldemoteintrin.h: New file.
12767         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
12768         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12769         -mcldemote.
12770         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12771         OPTION_MASK_ISA_CLDEMOTE.
12772         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
12773         (ix86_valid_target_attribute_inner_p): Ditto.
12774         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
12775         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
12776         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
12777         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
12778         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
12779         (cldemote): New.
12780         * config/i386/i386.opt: Add -mcldemote.
12781         * config/i386/x86intrin.h: New header.
12782         * doc/invoke.texi: Add -mcldemote.
12784 2018-05-14  Richard Biener  <rguenther@suse.de>
12786         * doc/match-and-simplify.texi: Adjust :s documentation.
12788 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
12790         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
12791         intended memcpy size.
12792         (REORDER_45): Likewise.
12794 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
12796         * sort.cc: New file.
12797         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
12798         * vec.c (qsort_chk): Use gcc_qsort.
12799         * Makefile.in (OBJS-libcommon): Add sort.o.
12800         (build/sort.o): New target.  Use it...
12801         (BUILD_RTL): ... here, and...
12802         (build/gencfn-macros): ... here, and...
12803         (build/genmatch): ... here.
12805 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
12806             Chung-Ju Wu  <jasonwucj@gmail.com>
12808         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
12809         * config/nds32/nds32-graywolf.md: New file.
12810         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
12811         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
12812         pipeline.
12813         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
12814         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
12815         * config/nds32/nds32.md (pipeline_model): Add graywolf.
12816         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
12817         * config/nds32/pipelines.md: Include n15 settings.
12819 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
12820             Chung-Ju Wu  <jasonwucj@gmail.com>
12822         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
12823         * config/nds32/nds32-n13.md: New file.
12824         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
12825         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
12826         pipeline.
12827         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
12828         * config/nds32/nds32.md (pipeline_model): Add n13.
12829         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
12830         * config/nds32/pipelines.md: Include n13 settings.
12832 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
12833             Chung-Ju Wu  <jasonwucj@gmail.com>
12835         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
12836         * config/nds32/nds32-n10.md: New file.
12837         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
12838         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
12839         pipeline.
12840         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
12841         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
12842         * config/nds32/nds32.md (pipeline_model): Add n10.
12843         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
12844         * config/nds32/pipelines.md: Include n10 settings.
12846 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
12847             Kito Cheng  <kito.cheng@gmail.com>
12848             Chung-Ju Wu  <jasonwucj@gmail.com>
12850         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
12851         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12852         Add enum values for DSP extension instructions.
12853         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
12854         New constraints.
12855         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
12856         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
12857         New code iterators.
12858         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
12859         * config/nds32/nds32-dspext.md: New file for DSP implementation.
12860         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
12861         * config/nds32/nds32-intrinsic.md: Likewise.
12862         * config/nds32/nds32_intrinsic.h: Likewise.
12863         * config/nds32/nds32-md-auxiliary.c: Likewise.
12864         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
12865         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
12866         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
12867         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
12868         * config/nds32/nds32-protos.h: New declarations for DSP extension.
12869         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
12870         TYPE_DMAC in switch statement.
12871         * config/nds32/nds32.c: New checking and implementation for DSP
12872         extension instructions.
12873         * config/nds32/nds32.h: Likewise.
12874         * config/nds32/nds32.md: Likewise.
12875         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
12876         * config/nds32/predicates.md: Implement new predicates for DSP
12877         extension.
12879 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
12881         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
12882         Reformat alternatives and attributes so it is easier to identify
12883         which constraints/attributes go with which instruction.
12884         (mov<mode>_hardfloat32, FMOVE64): Likewise.
12885         (mov<mode>_softfloat32, FMOVE64): Likewise.
12886         (mov<mode>_hardfloat64, FMOVE64): Likewise.
12887         (mov<mode>_softfloat64, FMOVE64): Likewise.
12889 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12891         * doc/extend.texi (PowerPC Built-in Functions): Rename this
12892         subsection.
12893         (Basic PowerPC Built-in Functions): The new name of the
12894         subsection previously known as "PowerPC Built-in Functions".
12895         (Basic PowerPC Built-in Functions Available on all Configurations):
12896         New subsubsection.
12897         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
12898         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
12899         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
12900         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
12902 2018-05-11  Martin Jambor  <mjambor@suse.cz>
12904         PR ipa/85655
12905         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
12906         single const.
12908 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
12910         PR target/85733
12911         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
12913 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
12915         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
12916         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
12917         (ix86_handle_option): Handle -mwaitpkg.
12918         * config.gcc: New header.
12919         * config/i386/cpuid.h (bit_WAITPKG): New bit.
12920         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
12921         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
12922         function type.
12923         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12924         OPTION_MASK_ISA_WAITPKG.
12925         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
12926         (ix86_option_override_internal): Add PTA_WAITPKG.
12927         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
12928         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
12929         IX86_BUILTIN_TPAUSE.
12930         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
12931         __builtin_ia32_umwait and __builtin_ia32_tpause.
12932         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
12933         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
12934         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
12935         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
12936         UNSPECV_TPAUSE): New.
12937         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
12938         * config/i386/i386.opt: Add -mwaitpkg.
12939         * config/i386/waitpkgintrin.h: New file.
12940         * config/i386/x86intrin.h: New header.
12941         * doc/invoke.texi: Add -mwaitpkg.
12943 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
12945         PR target/85606
12946         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
12947         equivalent.
12948         (cortex-m0): Use armv6s-m isa.
12949         (cortex-m0plus): Likewise.
12950         (cortex-m1): Likewise.
12951         (cortex-m0.small-multiply): Likewise.
12952         (cortex-m0plus.small-multiply): Likewise.
12953         (cortex-m1.small-multiply): Likewise.
12955 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
12956             Jakub Jelinek  <jakub@redhat.com>
12958         PR tree-optimization/85692
12959         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
12960         source permute as well.
12962 2018-05-11  Martin Liska  <mliska@suse.cz>
12964         PR sanitizer/85556
12965         * doc/extend.texi: Document LLVM style format for no_sanitize
12966         attribute.
12968 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
12970         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
12971         mode_supports_vsx_dform_quad to mode_supports_dq_form.
12972         (mode_supports_vsx_dform_quad): Likewise.
12973         (mode_supports_vmx_dform): Move these functions to be next to the
12974         other mode_supports functions.
12975         (mode_supports_dq_form): Likewise.
12976         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
12977         mode_supports_dq_form.
12978         (reg_offset_addressing_ok_p): Likewise.
12979         (offsettable_ok_by_alignment): Likewise.
12980         (rs6000_legitimate_offset_address_p): Likewise.
12981         (legitimate_lo_sum_address_p): Likewise.
12982         (rs6000_legitimize_address): Likewise.
12983         (rs6000_legitimize_reload_address): Likewise.
12984         (rs6000_secondary_reload_inner): Likewise.
12985         (rs6000_preferred_reload_class): Likewise.
12986         (rs6000_output_move_128bit): Likewise.
12988 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
12990         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
12991         Generate SImode target register for null target.
12992         <case IX86_BUILTIN_XGETBV>: Ditto.
12993         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
12994         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
12996 2018-05-10  Carl Love  <cel@us.ibm.com>
12998         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12999         dcbtt and dcbtstt if operands[2] is 0.
13001 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
13003         PR target/85693
13004         * config/i386/sse.md (usadv64qi): New expander.
13006 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
13008         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
13009         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
13010         -maltivec=be support.
13011         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
13012         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
13013         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
13014         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
13015         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
13016         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
13017         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
13018         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
13019         altivec_vsumsws): Adjust.
13020         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
13021         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
13022         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
13023         support.
13024         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
13025         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
13026         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
13027         (altivec_lve<VI_char>x): Delete expand.
13028         (*altivec_lve<VI_char>x_internal): Rename to...
13029         (altivec_lve<VI_char>x): ... this.
13030         (altivec_lvxl_<mode>): Delete expand.
13031         (*altivec_lvxl_<mode>_internal): Rename to ...
13032         (altivec_lvxl_<mode>): ... this.
13033         (altivec_stvxl_<mode>): Delete expand.
13034         (*altivec_stvxl_<mode>_internal): Rename to ...
13035         (altivec_stvxl_<mode>): ... this.
13036         (altivec_stve<VI_char>x): Delete expand.
13037         (*altivec_stve<VI_char>x_internal): Rename to ...
13038         (altivec_stve<VI_char>x): ... this.
13039         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
13040         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
13041         reduc_plus_scal_<mode>): Adjust.
13042         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
13043         comment.
13044         (rs6000_cpu_cpp_builtins): Adjust.
13045         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
13046         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
13047         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
13048         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
13049         -maltivec=be support.
13050         (rs6000_split_vec_extract_var): Adjust.
13051         (rs6000_split_v4si_init): Adjust.
13052         (swap_selector_for_mode): Delete.
13053         (altivec_expand_lvx_be, altivec_expand_stvx_be,
13054         altivec_expand_stvex_be): Delete.
13055         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
13056         -maltivec=be support.
13057         (rs6000_gimple_fold_builtin): Ditto.
13058         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
13059         Adjust.
13060         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
13061         (TARGET_DIRECT_MOVE_64BIT): Adjust.
13062         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
13063         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
13064         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
13065         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
13066         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
13067         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
13068         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
13069         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
13070         anonymous split): Adjust.
13071         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
13072         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
13074 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
13076         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
13077         when --with-gxx-include-dir is also specified.
13078         * configure: Regenerate.
13080 2018-05-09  Jim Wilson  <jimw@sifive.com>
13082         PR target/84797
13083         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
13084         * config/riscv/t-withmultilib: New.
13085         * config/riscv/withmultilib.h: New.
13086         * doc/install.texi: Document RISC-V --with-multilib-list support.
13088 2018-05-09  Richard Biener  <rguenther@suse.de>
13090         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
13091         vector.
13092         (vect_bb_vectorization_profitable_p): Adjust.  Compute
13093         actual scalar cost using the cost vector and the add_stmt_cost
13094         machinery.
13096 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
13098         PR rtl-optimization/85645
13099         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
13100         in the REG_CFA_REGISTER note for LR, don't leave it empty.
13102 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
13104         PR rtl-optimization/85645
13105         * shrink-wrap.c (spread_components): Return a boolean saying if
13106         anything was changed.
13107         (try_shrink_wrapping_separate): Iterate spread_components until
13108         nothing changes anymore.
13110 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
13112         PR rtl-optimization/85645
13113         * regrename.c (build_def_use): Also kill the chains that include the
13114         destination of a REG_CFA_REGISTER note.
13116 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
13118         PR rtl-optimization/85645
13119         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
13120         insn that has a REG_CFA_REGISTER note.
13122 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
13124         * cfgexpand.c (expand_clobber): New function.
13125         (expand_gimple_stmt_1): Use it.
13126         * tree-vect-stmts.c (vect_clobber_variable): New function,
13127         split out from...
13128         (vectorizable_simd_clone_call): ...here.
13129         (vectorizable_store): Emit a clobber either side of an
13130         IFN_STORE_LANES sequence.
13131         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
13133 2018-05-09  Tom de Vries  <tom@codesourcery.com>
13135         PR target/85626
13136         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
13137         (define_insn "trap_if_false"): Add exit after trap.
13139 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
13141         PR rtl-optimization/85638
13142         * bb-reorder.c: Include common/common-target.h.
13143         (create_forwarder_block): New function extracted from...
13144         (fix_up_crossing_landing_pad): ...here.  Rename into...
13145         (dw2_fix_up_crossing_landing_pad): ...this.
13146         (sjlj_fix_up_crossing_landing_pad): New function.
13147         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
13148         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
13149         from both partitions and exit the loop after one iteration.
13151 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13153         Revert:
13154         * doc/extend.texi (PowerPC Built-in Functions): Rename this
13155         subsection.
13156         (Basic PowerPC Built-in Functions): The new name of the
13157         subsection previously known as "PowerPC Built-in Functions".
13158         (Basic PowerPC Built-in Functions Available on all Configurations):
13159         New subsubsection.
13160         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13161         subsubsection.
13162         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13163         subsubsection.
13164         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13165         subsubsection.
13166         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13167         subsubsection.
13169 2018-05-08  Jim Wilson  <jimw@sifive.com>
13171         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
13172         (LD_EMUL_SUFFIX): New.
13173         (LINK_SPEC): Use it.
13175 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13177         * doc/extend.texi (PowerPC Built-in Functions): Rename this
13178         subsection.
13179         (Basic PowerPC Built-in Functions): The new name of the
13180         subsection previously known as "PowerPC Built-in Functions".
13181         (Basic PowerPC Built-in Functions Available on all Configurations):
13182         New subsubsection.
13183         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13184         subsubsection.
13185         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13186         subsubsection.
13187         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13188         subsubsection.
13189         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13190         subsubsection.
13192 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
13194         PR target/85683
13195         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
13196         after cmpelim optimization.
13198 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
13200         * config.gcc: Support "goldmont".
13201         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
13202         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13203         PROCESSOR_GOLDMONT.
13204         * config/i386/i386.c (m_GOLDMONT): Define.
13205         (processor_target_table): Add "goldmont".
13206         (PTA_GOLDMONT): Define.
13207         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
13208         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
13209         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
13210         (fold_builtin_cpu): Add "goldmont".
13211         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
13212         (ix86_option_override_internal): Add "goldmont".
13213         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
13214         (processor_type): Add PROCESSOR_GOLDMONT.
13215         * config/i386/i386.md: Add CPU "glm".
13216         * config/i386/glm.md: New file.
13217         * config/i386/x86-tune.def: Add m_GOLDMONT.
13218         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
13220 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
13222         PR target/85572
13223         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
13224         E_V4DImode.
13225         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
13226         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
13227         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
13229         PR target/85317
13230         * config/i386/i386.c (ix86_fold_builtin): Handle
13231         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
13233         PR target/85480
13234         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
13235         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
13237 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
13239         PR target/85658
13240         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
13241         (check_arch): Likewise.
13242         (check_fpu): Return the result rather than printing it.
13243         (end arch): Fix operator precedence.
13244         (end cpu): Likewise.
13245         (END): Print the result from check_fpu.
13247 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
13248             Alan Hayward  <alan.hayward@arm.com>
13249             David Sherwood  <david.sherwood@arm.com>
13251         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
13252         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
13253         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
13254         (*fcmuo<mode>_and): New patterns.
13256 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
13258         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
13259         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
13260         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
13261         (cmp_op, sve_imm_con): New code attributes.
13262         (SVE_COND_INT_CMP, imm_con): Delete.
13263         (cmp_op): Remove above unspecs from int attribute.
13264         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
13265         to...
13266         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
13267         comparison-specific unspecs.
13268         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
13269         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
13270         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
13271         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
13272         (*vec_fcm<cmp_op><mode>): Rename to...
13273         (*fcm<cmp_op><mode>): ...this and adjust likewise.
13274         (*vec_fcmuo<mode>): Rename to...
13275         (*fcmuo<mode>): ...this and adjust likewise.
13276         (*pred_fcm<cmp_op><mode>): New pattern.
13277         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
13278         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
13279         functions.
13280         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
13281         and UNORDERED.
13282         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
13283         (aarch64_emit_sve_predicated_cond): New function.
13284         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
13285         (aarch64_emit_unspec_cond_or): Replace with...
13286         (aarch64_emit_sve_or_conds): ...this new function.  Use
13287         aarch64_emit_sve_ptrue_op for the individual comparisons and
13288         aarch64_emit_binop to OR them together.
13289         (aarch64_emit_inverted_unspec_cond): Replace with...
13290         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
13291         aarch64_emit_sve_ptrue_op for the comparison and
13292         aarch64_emit_unop to invert the result.
13293         (aarch64_expand_sve_vec_cmp_float): Update after the above
13294         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
13296 2018-05-07  Nathan Sidwell  <nathan@acm.org>
13298         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
13299         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
13300         (Backwards Compatibility): Likewise.
13302 2018-05-07  Luis Machado  <luis.machado@linaro.org>
13304         PR bootstrap/85681
13305         Revert:
13306         2018-05-07  Luis Machado  <luis.machado@linaro.org>
13308         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13309         <prefetch_dynamic_strides>: New const bool field.
13310         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13311         prefetch_dynamic_strides.
13312         (exynosm1_prefetch_tune): Likewise.
13313         (thunderxt88_prefetch_tune): Likewise.
13314         (thunderx_prefetch_tune): Likewise.
13315         (thunderx2t99_prefetch_tune): Likewise.
13316         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13317         to false.
13318         (aarch64_override_options_internal): Update to set
13319         PARAM_PREFETCH_DYNAMIC_STRIDES.
13320         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13321         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13322         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13323         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13324         prefetch-dynamic-strides setting.
13326         2018-05-07  Luis Machado  <luis.machado@linaro.org>
13328         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13329         <minimum_stride>: New const int field.
13330         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13331         minimum_stride field.
13332         (exynosm1_prefetch_tune): Likewise.
13333         (thunderxt88_prefetch_tune): Likewise.
13334         (thunderx_prefetch_tune): Likewise.
13335         (thunderx2t99_prefetch_tune): Likewise.
13336         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13337         (aarch64_override_options_internal): Update to set
13338         PARAM_PREFETCH_MINIMUM_STRIDE.
13339         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13340         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13341         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13342         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13343         stride is constant and is below the minimum stride threshold.
13345 2018-05-07  Luis Machado  <luis.machado@linaro.org>
13347         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
13348         to 512.
13350 2018-05-07  Luis Machado  <luis.machado@linaro.org>
13352         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13353         <prefetch_dynamic_strides>: New const bool field.
13354         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13355         prefetch_dynamic_strides.
13356         (exynosm1_prefetch_tune): Likewise.
13357         (thunderxt88_prefetch_tune): Likewise.
13358         (thunderx_prefetch_tune): Likewise.
13359         (thunderx2t99_prefetch_tune): Likewise.
13360         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13361         to false.
13362         (aarch64_override_options_internal): Update to set
13363         PARAM_PREFETCH_DYNAMIC_STRIDES.
13364         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13365         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13366         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13367         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13368         prefetch-dynamic-strides setting.
13370 2018-05-07  Luis Machado  <luis.machado@linaro.org>
13372         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13373         <minimum_stride>: New const int field.
13374         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13375         minimum_stride field.
13376         (exynosm1_prefetch_tune): Likewise.
13377         (thunderxt88_prefetch_tune): Likewise.
13378         (thunderx_prefetch_tune): Likewise.
13379         (thunderx2t99_prefetch_tune): Likewise.
13380         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13381         (aarch64_override_options_internal): Update to set
13382         PARAM_PREFETCH_MINIMUM_STRIDE.
13383         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13384         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13385         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13386         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13387         stride is constant and is below the minimum stride threshold.
13389 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
13391         PR c++/85659
13392         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
13393         the type is addressable.  Don't force op into register if it has
13394         BLKmode.
13396 2018-05-05  Roland McGrath  <mcgrathr@google.com>
13398         PR other/77609
13399         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
13400         any section for which we don't know a specific type it should have,
13401         regardless of name.  Previously this was done only for the exact
13402         names ".init_array", ".fini_array", and ".preinit_array".
13403         (default_elf_asm_named_section): Add comment about
13404         relationship with default_section_type_flags and SECTION_NOTYPE.
13405         (get_section): Don't consider it a type conflict if one side has
13406         SECTION_NOTYPE and the other doesn't, as long as neither has the
13407         SECTION_BSS et al used in the default_section_type_flags logic.
13409 2018-05-05  Tom de Vries  <tom@codesourcery.com>
13411         PR target/85653
13412         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
13413         (workaround_barsyncs): New function.
13414         (nvptx_reorg): Use workaround_barsyncs.
13415         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
13416         (define_expand "nvptx_membar_cta"): New define_expand.
13417         (define_insn "*nvptx_membar_cta"): New insn.
13419 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
13421         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
13422         To improve optimization opportunities.
13423         * builtin-types.def: The new needed builtin types for the above.
13425 2018-05-04  Richard Biener  <rguenther@suse.de>
13427         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
13428         * gimple-ssa-store-merging.c
13429         (imm_store_chain_info::output_merged_store): Remove redundant create,
13430         release split_store vector contents on failure.
13431         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
13432         scalar stmt vector on cache hit.
13434 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
13436         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
13437         Xilinx FP support.
13438         * config.gcc (powerpc-xilinx-eabi*): Remove.
13439         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
13440         support.
13441         (fusion_addis_mem_combo_load): Ditto.
13442         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
13443         FP support.
13444         (rs6000_cpu_cpp_builtins): Ditto.
13445         * config/rs6000/rs6000-linux.c
13446         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
13447         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
13448         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
13449         support.
13450         (rs6000_setup_reg_addr_masks): Ditto.
13451         (rs6000_init_hard_regno_mode_ok): Ditto.
13452         (rs6000_option_override_internal): Ditto.
13453         (legitimate_lo_sum_address_p): Ditto.
13454         (rs6000_legitimize_address): Ditto.
13455         (rs6000_legitimize_reload_address): Ditto.
13456         (rs6000_legitimate_address_p): Ditto.
13457         (abi_v4_pass_in_fpr): Ditto.
13458         (setup_incoming_varargs): Ditto.
13459         (rs6000_gimplify_va_arg): Ditto.
13460         (rs6000_split_multireg_move): Ditto.
13461         (rs6000_savres_strategy): Ditto.
13462         (rs6000_emit_prologue_components): Ditto.
13463         (rs6000_emit_epilogue_components): Ditto.
13464         (rs6000_emit_prologue): Ditto.
13465         (rs6000_emit_epilogue): Ditto.
13466         (rs6000_elf_file_end): Ditto.
13467         (rs6000_function_value): Ditto.
13468         (rs6000_libcall_value): Ditto.
13469         * config/rs6000/rs6000.h: Ditto.
13470         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
13471         (TARGET_MINMAX): ... this.  New.
13472         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
13473         * config/rs6000/rs6000.md: Remove Xilinx FP support.
13474         (*movsi_internal1_single): Delete.
13475         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
13476         mfpu=, mxilinx-fpu): Delete.
13477         * config/rs6000/singlefp.h: Delete.
13478         * config/rs6000/sysv4.h: Remove Xilinx FP support.
13479         * config/rs6000/t-rs6000: Ditto.
13480         * config/rs6000/t-xilinx: Delete.
13481         * config/rs6000/titan.md: Adjust for fp_type removal.
13482         * config/rs6000/vsx.md: Remove Xilinx FP support.
13483         (VStype_simple): Delete.
13484         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
13485         * config/rs6000/xfpu.h: Delete.
13486         * config/rs6000/xfpu.md: Delete.
13487         * config/rs6000/xilinx.h: Delete.
13488         * config/rs6000/xilinx.opt: Delete.
13489         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
13490         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
13492 2018-05-04  Tom de Vries  <tom@codesourcery.com>
13494         PR libgomp/85639
13495         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
13496         if ignore == 0.
13498 2018-05-04  Richard Biener  <rguenther@suse.de>
13500         PR middle-end/85627
13501         * tree-complex.c (update_complex_assignment): We are always in SSA form.
13502         (expand_complex_div_wide): Likewise.
13503         (expand_complex_operations_1): Likewise.
13504         (expand_complex_libcall): Preserve EH info of the original stmt.
13505         (tree_lower_complex): Handle removed blocks.
13506         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
13507         on complex multiplication and division libcall builtins.
13509 2018-05-04  Richard Biener  <rguenther@suse.de>
13511         PR middle-end/85574
13512         * fold-const.c (negate_expr_p): Restrict negation of operand
13513         zero of a division to when we know that can happen without
13514         overflow.
13515         (fold_negate_expr_1): Likewise.
13517 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
13519         PR libstdc++/85466
13520         * real.h (real_nextafter): Declare.
13521         * real.c (real_nextafter): New function.
13522         * fold-const-call.c (fold_const_nextafter): New function.
13523         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
13524         CASE_CFN_NEXTTOWARD.
13525         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
13526         even when arg1_mode is different from arg0_mode.
13528 2018-05-03  Nathan Sidwell  <nathan@acm.org>
13530         * doc/extend.texi (Deprecated Features): Remove
13531         -ffriend-injection.
13532         (Backwards Compatibility): Likewise.
13533         * doc/invoke.texi (C++ Language Options): Likewise.
13534         (C++ Dialect Options): Likewise.
13536 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
13538         PR target/85530
13539         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
13540         _mm512_mask_mullox_epi64): New intrinsics.
13542 2018-05-03  Tom de Vries  <tom@codesourcery.com>
13544         PR testsuite/85106
13545         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13546         dump files): Add offload-tree.
13548 2018-05-03  Richard Biener  <rguenther@suse.de>
13550         PR tree-optimization/85615
13551         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
13552         to loops not nested in BBs loop father to avoid creating multi-entry
13553         loops.
13555 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13557         PR tree-optimization/70291
13558         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
13559         arguments.  Change return type to tree.  Emit libcall as a new
13560         statement rather than replacing existing one when inplace_p is true.
13561         (expand_complex_multiplication_components): New function.
13562         (expand_complex_multiplication): Expand floating-point complex
13563         multiplication using the above.
13564         (expand_complex_division): Rename inner_type parameter to type.
13565         Update expand_complex_libcall call-site.
13566         (expand_complex_operations_1): Update expand_complex_multiplication
13567         and expand_complex_division call-sites.
13569 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
13571         PR target/85582
13572         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13573         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13574         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
13575         the highest significant bit of the shift count mask is clear.  In
13576         check whether and[sq]i3 is needed verify that all significant bits
13577         of the shift count other than the highest are set.
13579 2018-05-02  Tom de Vries  <tom@codesourcery.com>
13581         PR libgomp/82428
13582         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
13583         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
13584         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
13585         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
13586         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
13587         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
13588         __builtin_goacc_parlevel_size.
13590 2018-05-02  Richard Biener  <rguenther@suse.de>
13592         PR tree-optimization/85597
13593         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
13594         do not use split vect_get_vec_defs call but call vect_get_slp_defs
13595         directly.
13597 2018-05-02  Tom de Vries  <tom@codesourcery.com>
13599         PR testsuite/85106
13600         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13601         dump files): Add ltrans-tree.
13603 2018-05-02  Tom de Vries  <tom@codesourcery.com>
13605         PR testsuite/85106
13606         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13607         dump files): Add wpa-ipa.
13609 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
13611         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
13612         powerpc*-*-linux*paired* target.
13613         * config/rs6000/750cl.h: Delete.
13614         * config/rs6000/paired.h: Delete.
13615         * config/rs6000/paired.md: Delete.
13616         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
13617         float support.
13618         * config/rs6000/rs6000-builtin.def: Remove paired float support.
13619         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
13620         comment.  Remove paired float support.
13621         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
13622         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
13623         VECTOR_PAIRED.
13624         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
13625         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
13626         declarations.
13627         * config/rs6000/rs6000.c: Remove paired float support.
13628         (paired_expand_vector_init, paired_expand_vector_move,
13629         paired_emit_vector_compare, paired_emit_vector_cond_expr,
13630         (paired_expand_lv_builtin, paired_expand_stv_builtin,
13631         paired_expand_builtin, paired_expand_predicate_builtin,
13632         paired_init_builtins): Delete.
13633         * config/rs6000/rs6000.h: Remove paired float support.
13634         * config/rs6000/rs6000.md: Remove paired float support.
13635         (move_from_CR_ov_bit): Delete.
13636         * config/rs6000/rs6000.opt (mpaired): Delete.
13637         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
13638         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
13640 2018-05-02  Richard Biener  <rguenther@suse.de>
13642         PR middle-end/85567
13643         * gimplify.c (gimplify_save_expr): When in SSA form allow
13644         SAVE_EXPRs to compute to SSA vars.
13646 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
13648         PR target/85582
13649         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13650         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13651         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
13652         clobber operands[2], instead use a new pseudo.  Formatting fixes.
13654 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
13656         PR tree-optimization/85586
13657         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
13658         exit early for statements in the same group if the accesses are
13659         not strided.
13661 2018-05-02  Tom de Vries  <tom@codesourcery.com>
13663         PR lto/85451
13664         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
13665         error message.
13667 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
13669         PR tree-optimization/85143
13670         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
13672 2018-05-01  Tom de Vries  <tom@codesourcery.com>
13674         PR lto/85451
13675         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
13676         not found" error message.
13678 2018-05-01  Tom de Vries  <tom@codesourcery.com>
13680         PR other/83786
13681         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
13682         * vec.c (test_ordered_remove_if): New function.
13683         (vec_c_tests): Call test_ordered_remove_if.
13684         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
13685         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
13686         * tree-vect-patterns.c (vect_pattern_recog_1): Use
13687         VEC_ORDERED_REMOVE_IF.
13689 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
13691         PR tree-optimization/82665
13692         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
13693         pointer subtraction where arguments come from a memchr call.
13695 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
13697         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
13698         --push-state --as-needed and --pop-state instead of --as-needed and
13699         --no-as-needed if ld supports it.
13700         * configure: Regenerated.
13702         PR web/85578
13703         * doc/install.texi2html: Replace _002d with - and _002a with * in
13704         generated html files using sed.
13706 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
13708         PR c++/85523
13709         * gcc-rich-location.c (blank_line_before_p): New function.
13710         (use_new_line): New function.
13711         (gcc_rich_location::add_fixit_insert_formatted): New function.
13712         * gcc-rich-location.h
13713         (gcc_rich_location::add_fixit_insert_formatted): New function.
13715 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
13717         * selftest.c (assert_streq): Rename "expected" and "actual" to
13718         "val1" and "val2".  Extend NULL-handling to cover both inputs
13719         symmetrically, while still requiring both to be non-NULL for a pass.
13720         * selftest.h (assert_streq): Rename "expected" and "actual" to
13721         "val1" and "val2".
13722         (ASSERT_EQ): Likewise.
13723         (ASSERT_EQ_AT): Likewise.
13724         (ASSERT_KNOWN_EQ): Likewise.
13725         (ASSERT_KNOWN_EQ_AT): Likewise.
13726         (ASSERT_NE): Likewise.
13727         (ASSERT_MAYBE_NE): Likewise.
13728         (ASSERT_MAYBE_NE_AT): Likewise.
13729         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
13730         the assertion to pass.
13731         (ASSERT_STREQ_AT): Likewise.
13733 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
13735         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
13736         interaction with -pie.
13738 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
13740         * selftest.h: Fix alphabetization of per-source-file selftest
13741         declarations.
13743 2018-04-30  Jason Merrill  <jason@redhat.com>
13745         PR c++/61982 - dead stores to destroyed objects.
13746         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
13747         of clobber.
13749 2018-04-30  Jason Merrill  <jason@redhat.com>
13751         * tree.c (build_clobber): New.
13752         * tree.h: Declare it.
13753         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
13755 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
13757         * diagnostic-show-locus.c (layout::layout): Update for
13758         location_get_source_line returning a char_span.
13759         (struct char_span): Move to input.h.
13760         (struct correction): Update for fields in char_span becoming
13761         private.
13762         (struct source_line): Update for location_get_source_line
13763         returning a char_span.
13764         (layout::print_line): Likewise.
13765         * edit-context.c (edited_file::print_content): Likewise.
13766         (edited_file::print_diff_hunk): Likewise.
13767         (edited_file::print_run_of_changed_lines): Likewise.
13768         (edited_file::get_num_lines): Likewise.
13769         (edited_line::edited_line): Likewise.
13770         * final.c (asm_show_source): Likewise.
13771         * input.c (location_get_source_line): Convert return type
13772         from const char * to char_span, losing the final "line_len"
13773         param.
13774         (dump_location_info): Update for the above.
13775         (get_substring_ranges_for_loc): Likewise.  Use a char_span
13776         when handling the literal within the line.
13777         (test_reading_source_line): Update for location_get_source_line
13778         returning a char_span.
13779         * input.h (class char_span): Move here from
13780         diagnostic-show-locus.c, converting from a struct to a class.
13781         Make data members private.
13782         (char_span::operator bool): New.
13783         (char_span::length): New.
13784         (char_span::get_buffer): New.
13785         (char_span::operator[]): New.
13786         (char_span::subspan): Make const.
13787         (char_span::xstrdup): New.
13788         (location_get_source_line): Convert return type from const char *
13789         to char_span, losing the final "line_size" param.
13791 2018-04-30  Jan Hubicka  <jh@suse.cz>
13793         * lto-wrapper.c (ltrans_priorities): New static var.
13794         (cmp_priority): New.
13795         (run_gcc): Read priorities and if doing parallel build order
13796         the Makefile by them.
13798 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
13800         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
13802 2018-04-30  Richard Biener  <rguenther@suse.de>
13804         * tree-cfg.c (verify_address): Remove base argument, add
13805         flag whether to check TREE_ADDRESSABLE and do that.
13806         (verify_expr): Remove.
13807         (verify_types_in_gimple_reference): Add pieces from verify_expr.
13808         (verify_gimple_assign_single): Likewise.
13809         (verify_gimple_switch): Likewise.
13810         (verify_expr_location_1): Dereference tp once.  Add (disabled)
13811         piece from verify_expr.
13812         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
13814 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
13816         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
13818 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
13820         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
13821         (small_data_pattern): Likewise.
13822         (arc_rewrite_small_data): Likewise.
13823         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
13824         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
13825         (get_symbol_alignment): New function.
13826         (legitimate_small_data_address_p): Likewise.
13827         (legitimate_scaled_address): Update, call
13828         legitimate_small_data_address_p.
13829         (output_sdata): New static variable.
13830         (arc_print_operand): Update how we handle small data operands.
13831         (arc_print_operand_address): Likewise.
13832         (arc_legitimate_address_p): Update, use
13833         legitimate_small_data_address_p.
13834         (arc_rewrite_small_data_p): Remove.
13835         (arc_rewrite_small_data_1): Likewise.
13836         (arc_rewrite_small_data): Likewise.
13837         (small_data_pattern): Likewise.
13838         (compact_sda_memory_operand): Update to use
13839         legitimate_small_data_address_p and get_symbol_alignment.
13840         (prepare_move_operands): Don't rewite sdata pattern.
13841         (prepare_extend_operands): Remove.
13842         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
13843         pattern.
13844         (zero_extendqisi2): Likewise.
13845         (zero_extendhisi2): Likewise.
13846         (extendqihi2): Likewise.
13847         (extendqisi2): Likewise.
13848         (extendhisi2): Likewise.
13849         (addsi3): Likewise.
13850         (subsi3): Likewise.
13851         (andsi3): Likewise.
13852         * config/arc/constraints.md (Usd): Change it to memory constraint.
13854 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
13856         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
13857         as source of std instructions.
13858         * config/arc/arc.md (movsi_insn): Update pattern predicate to
13859         allow 6-bit constants as source for store instructions.
13860         (movdi_insn): Update instruction pattern to allow 6-bit constants
13861         as source for store instructions.
13863 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
13865         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
13867 2018-04-30  Nathan Sidwell  <nathan@acm.org>
13868             Sandra Loosemore <sandra@codesourcery.com>
13870         * dumpfile.c (dump_open): Allow '-' for stdout.
13871         * doc/invoke.texi (Developer Options): Document dump filename
13872         determination early.  Document stdin/stdout selection.
13874 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
13876         Microblaze Target: PIC data text relative
13878         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
13879         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
13880         Add declaration.
13881         * config/microblaze/microblaze.h (microblaze_constant_address_p):
13882         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
13883         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
13884         New addressing mode for data-text relative position indepenedent code.
13885         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
13886         'ADDRESS_SYMBOLIC_TXT_REL'.
13887         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
13888         (microblaze_legitimate_pic_operand): Exclude function calls from
13889         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
13890         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
13891         addresses cases.
13892         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13893         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13894         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
13895         for 'address + offset'.
13896         (microblaze_expand_prologue): Add new function prologue call for
13897         'r20' assignation.
13898         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
13899         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
13900         table in case of TARGET_PIC_DATA_TEXT_REL.
13901         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
13902         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
13903         Add new macros 'UNSPEC_TEXT',
13904         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
13905         + exclude function calls from 'UNSPEC_PLT' in case of data text
13906         relative mode.
13907         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13908         new target hook for generating address diff vector tables in case of
13909         flag_pic.
13910         * doc/tm.texi : Regenerate.
13911         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
13912         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
13913         of addr diff vector generation.
13914         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13915         target hook definition.
13916         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
13917         Add default function for generate_pic_addr_diff_vec -> flag_pic.
13918         * doc/invoke.texi (Add new pic option): Add new microblaze pic
13919         option for data text relative.
13921 2018-04-30  Richard Biener  <rguenther@suse.de>
13923         * tree-chrec.h (evolution_function_is_constant_p): Remove
13924         redundant check.
13925         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
13927 2018-04-30  Richard Biener  <rguenther@suse.de>
13929         PR bootstrap/85571
13930         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
13932 2018-04-30  Richard Biener  <rguenther@suse.de>
13934         PR tree-optimization/28364
13935         PR tree-optimization/85275
13936         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
13937         copying first exit test.
13939 2018-04-28  Mark Wielaard  <mark@klomp.org>
13941         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
13942         dwarf_version >= 5.
13943         (dwarf_AT): Handle DW_AT_addr_base.
13944         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
13946 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
13948         PR target/84431
13949         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
13950         (*ashl<dwi>3_doubleword_mask_1): Ditto.
13951         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
13952         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
13954 2018-04-28  Richard Biener  <rguenther@suse.de>
13956         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
13957         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
13958         to reflect use.  Only add interesting stmts.
13960 2018-04-27  Martin Jambor  <mjambor@suse.cz>
13962         PR ipa/85549
13963         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
13964         the jump function allows for passing through aggregate values.
13966 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
13968         * input.h (in_system_header_at): Convert from macro to inline
13969         function.
13970         (from_macro_expansion_at): Likewise.
13971         (from_macro_definition_at): Likewise.
13973 2018-04-27  Jeff Law  <law@redhat.com>
13975         * config.gcc: Mark tile* targets as deprecated/obsolete.
13977 2018-04-27  Richard Biener  <rguenther@suse.de>
13979         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
13980         fix for ILP32.
13982 2018-04-27  Richard Biener  <rguenther@suse.de>
13984         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
13986 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
13988         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
13989         with Yd constraint. Set "preferred_for_speed" attribute from
13990         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
13991         with Yd constraint.
13992         (*movdi_internal): Ditto.
13993         (movti_interunit splitters): Remove
13994         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
13995         (movdi_interunit splitters): Ditto.
13996         * config/i386/constraints.md (Ye): Remove.
13997         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
13999 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14001         PR target/85512
14002         * config/aarch64/constraints.md (Usg): Limit to 31.
14003         (Usj): Limit to 63.
14005 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
14007         PR tree-optimization/85529
14008         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
14009         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
14010         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
14011         zero extension or masking of the MSB bit.
14012         (optimize_range_tests): Add FIRST_BB argument, pass it through
14013         to optimize_range_tests_var_bound.
14014         (maybe_optimize_range_tests, reassociate_bb): Adjust
14015         optimize_range_tests callers.
14017 2018-04-26  Richard Biener  <rguenther@suse.de>
14018             Jakub Jelinek  <jakub@redhat.com>
14020         * cgraph.h (symbol_table): Just declare debug method here.
14021         * symtab.c (symbol_table::debug): Define.
14023 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
14025         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
14027 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
14029         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
14030         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
14031         (*movdi_internal): Substitute Yi and Yj constraint with x
14032         and Ym and Yn constraint with y constraint.  Update "isa"
14033         attribute and set "preferred_for_speed" attribute from
14034         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
14035         (*movsi_internal): Ditto.
14036         (*movdf_internal): Ditto.
14037         (*movsf_internal): Ditto.
14038         (*zero_extendsidi2): Ditto.
14039         * config/i386/sse.md (vec_set<mode>_0): Ditto.
14040         (sse2_loadld): Ditto.
14041         (*vec_extract<ssevecmodelower>_0): Ditto.
14042         (*vec_extractv4si_0_zext_sse4): Ditto.
14043         (vec_concatv2di): Ditto.
14044         (*vec_dup<mode>): Ditto.
14045         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
14046         * config/i386/constraints.md (Yi): Remove.
14047         (Yj): Remove.
14048         (Ym): Remove.
14049         (Yn): Remove.
14051 2018-04-26  Nathan Sidwell  <nathan@acm.org>
14053         * dumpfile.c (dump_open): New.
14054         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
14055         (dump_finish): Detect stdio/stderr by value not name.
14057 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
14059         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
14061 2018-04-26  Tom de Vries  <tom@codesourcery.com>
14063         PR target/84952
14064         * config/nvptx/nvptx.c (verify_neutering_jumps)
14065         (verify_neutering_labels): New function
14066         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
14068 2018-04-26  Tom de Vries  <tom@codesourcery.com>
14070         PR target/84025
14071         * config/nvptx/nvptx.c (needs_neutering_p): New function.
14072         (nvptx_single): Use needs_neutering_p to skip over insns that do not
14073         need neutering.
14075 2018-04-26  Richard Biener <rguenther@suse.de>
14076             Tom de Vries  <tom@codesourcery.com>
14078         PR lto/85422
14079         * lto-streamer-out.c (output_function): Fixup loops if required to match
14080         discovery done in the reader.
14082 2018-04-26  Richard Biener  <rguenther@suse.de>
14084         PR tree-optimization/85116
14085         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
14086         have a loop exit from the single latch predecessor.  Remove
14087         case of header with just condition.
14088         (ch_base::copy_headers): Exclude infinite loops from any
14089         processing.
14090         (pass_ch::execute): Record exits.
14092 2018-04-26  Richard Biener  <rguenther@suse.de>
14094         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
14095         prologue cost vector and pass it to vect_get_load_cost.
14096         (vect_get_peeling_costs_all_drs): Likewise.
14097         (vect_peeling_hash_get_lowest_cost): Likewise.
14098         (vect_enhance_data_refs_alignment): Likewise.
14100 2018-04-26  Richard Biener  <rguenther@suse.de>
14102         PR middle-end/85450
14103         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
14104         checking of integer<->pointer conversions.
14105         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
14106         sign-/zero-extending pointer types.
14107         (expand_omp_for_static_chunk): Likewise.
14109 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
14110             Jean Lee  <xiaoyur347@gmail.com>
14112         * config/mips/mips.c (mips_asan_shadow_offset): New function.
14113         (TARGET_ASAN_SHADOW_OFFSET): Define.
14114         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
14115         true for -fsanitize=address.
14117 2018-04-25  Mark Wielaard  <mark@klomp.org>
14119         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
14120         shorter ones.
14122 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
14124         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
14125         than "alu", remove explicit "memory" and "imm_disp" attributes.
14126         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
14128         PR middle-end/85414
14129         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
14130         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
14131         gen_lowpart_no_emit.
14133 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
14135         PR target/85473
14136         * config/i386/i386.c (ix86_expand_builtin): Change memory
14137         operand to XI, extend p0 to Pmode.
14138         * config/i386/i386.md: Change unspec volatile and operand
14139         1 mode to XI, change operand 0 mode to P.
14141 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
14143         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
14144         GET_MODE_MASK before any checking.
14145         (nds32_can_use_bset_p): Likewise.
14146         (nds32_can_use_btgl_p): Likewise.
14148 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
14150         * config/nds32/nds32-doubleword.md: New define_split pattern for
14151         illegal register number.
14153 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
14155         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
14157 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
14159         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
14161 2018-04-25  Richard Biener  <rguenther@suse.de>
14163         * lto-streamer.h (LTO_major_version): Bump to 8.
14165 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
14167         * BASE-VER: Set to 9.0.0.
14169 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
14171         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
14172         in __abskf2 and __powikf2.
14174 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14176         PR target/85512
14177         * config/aarch64/constraints.md (Usg, Usj): New constraints.
14178         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
14179         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
14180         Use the above on operand 2.  Reindent.
14181         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
14183 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
14185         PR target/85485
14186         * common/config/i386/i386-common.c (ix86_handle_option): Don't
14187         handle OPT_mcet.
14188         * config/i386/i386.opt (mcet): Removed.
14189         * doc/install.texi: Remove -mcet documentation.
14190         * doc/invoke.texi: Likewise.
14192 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
14194         PR target/85485
14195         * doc/install.texi: Remove -mcet from bootstrap-cet.
14197 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
14199         PR target/85511
14200         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
14201         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
14202         if TARGET_64BIT.
14204         PR target/85503
14205         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
14206         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
14207         containing a CONST_VECTOR.
14209 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
14211         * doc/install.texi: Update newlib dependency for nvptx.
14213 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
14215         PR target/85508
14216         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
14217         instead of INTVAL when shifting x left.
14219 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
14221         PR tree-optimization/85478
14222         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
14223         vect_grouped_store_supported for single element vectors.
14225 2018-04-24  Richard Biener  <rguenther@suse.de>
14227         PR target/85491
14228         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
14229         load cost increase to the case of non-constant step.
14231 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
14233         PR target/84828
14234         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
14235         destination if any_malformed_asm.
14237 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
14239         PR middle-end/85496
14240         * expr.c (store_field): In the bitfield case, if the value comes from
14241         a function call and is returned in registers by means of a PARALLEL,
14242         do not change the mode of the temporary unless BLKmode and VOIDmode.
14244 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
14246         PR rtl-optimization/85423
14247         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
14248         dependencies to debug insns when the previous insn is non-debug.
14250 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
14252         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
14253         enums into a single definition.
14254         (fls): Fix predicates and printing.
14255         (seti): Likewise.
14257 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
14259         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
14260         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
14261         and short u6 immediate.
14262         (check_if_valid_sleep_operand): Remove.
14263         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
14265 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
14267         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
14268         flag_always_save_lp condition.
14269         * config/nds32/nds32.opt (malways-save-lp): New option.
14271 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
14273         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
14274         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
14275         * config/nds32/nds32.h
14276         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
14277         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
14279 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
14281         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
14282         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
14284 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
14285             Chung-Ju Wu  <jasonwucj@gmail.com>
14287         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
14288         Declare.
14289         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
14290         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
14292 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
14294         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
14296 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
14298         * config/nds32/nds32-protos.h (nds32_data_alignment,
14299         nds32_local_alignment): Declare.
14300         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
14301         nds32_local_alignment): New functions.
14302         (TARGET_CONSTANT_ALIGNMENT): Define.
14303         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
14305 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
14307         * config/nds32/nds32.c
14308         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
14309         (TARGET_MODES_TIEABLE_P): Likewise.
14311 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
14313         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
14314         level Ofast and Og.
14316 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
14317             Chung-Ju Wu  <jasonwucj@gmail.com>
14319         * config/nds32/constants.md (unspec_volatile_element): Add enum values
14320         for unaligned access.
14321         * config/nds32/nds32-intrinsic.c: Implementation of expanding
14322         unaligned access.
14323         * config/nds32/nds32-intrinsic.md: Likewise.
14324         * config/nds32/nds32_intrinsic.h: Likewise.
14325         * config/nds32/nds32.h (nds32_builtins): Likewise.
14326         * config/nds32/nds32.opt (munaligned-access): New option.
14327         * config/nds32/nds32.c (nds32_asm_file_start): Display
14328         flag_unaligned_access status.
14330 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
14332         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
14333         -mno-relax is present.
14334         * config/riscv/linux.h (LINK_SPEC): Ditto.
14336 2018-04-20  Martin Sebor  <msebor@redhat.com>
14338         PR c/85365
14339         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
14340         for null pointers.
14341         (gimple_fold_builtin_stxcpy_chk): Same.
14342         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
14344 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
14346         PR target/85456
14347         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
14348         __powikf2 when long double is IEEE 128-bit.
14350 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
14352         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
14353         step to make sure stack always aligned.
14355 2018-04-20  Carl Love  <cel@us.ibm.com>
14357         PR target/83402
14358         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
14359         size check for arg0.
14361 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
14362             Tom de Vries  <tom@codesourcery.com>
14364         PR target/85445
14365         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
14366         Emit insns for calls too.
14367         (nvptx_find_par): Always look for worker-level predecessor insn.
14368         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
14369         calls.
14370         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
14371         (nvptx_process_pars): Propagate frames for calls.
14373 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
14375         PR target/85469
14376         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
14377         Removed.
14378         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
14379         (ix86_handle_option): Don't handle OPT_mibt.
14380         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
14381         __SHSTK__.
14382         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
14383         has_ibt and ibt.
14384         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
14385         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
14386         (ix86_target_macros): Define __CET__ with flag_cf_protection
14387         for -fcf-protection.
14388         * config/i386/i386.c (isa2_opts): Remove -mibt.
14389         * config/i386/i386.h (TARGET_IBT): Removed.
14390         (TARGET_IBT_P): Likewise.
14391         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
14392         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
14393         * config/i386/i386.opt (mcet): Update help message.
14394         (mshstk): Likewise.
14395         (mibt): Removed.
14396         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
14397         -mcet as an alias for -mshstk.
14399 2018-04-20  Richard Biener <rguenther@suse.de>
14401         PR middle-end/85475
14402         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
14403         complexity by forcing a single use of the multiply operand.
14405 2018-04-20  Martin Jambor  <mjambor@suse.cz>
14407         ipa/85449
14408         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
14409         recursion dependency to only apply to non-clones.
14411 2018-04-20  Martin Jambor  <mjambor@suse.cz>
14413         ipa/85447
14414         * ipa-cp.c (create_specialized_node): Check that clones of
14415         self-recursive edges exist during IPA-CP.
14417 2018-04-19  Toon Moene  <toon@moene.org>
14419         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
14420         by -O3.
14422 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
14424         PR tree-optimization/85467
14425         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
14426         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
14427         VECTOR_CST element to type.
14429 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
14431         PR target/85397
14432         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
14433         * config/i386/i386.md (builtin_setjmp_setup): Removed.
14434         (builtin_longjmp): Likewise.
14435         (save_stack_nonlocal): New pattern.
14436         (restore_stack_nonlocal): Likewise.
14438 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
14440         PR target/85404
14441         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14442         Replace ASM_OUTPUT_LABEL with fprintf.
14444 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
14446         PR target/85417
14447         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14448         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
14449         * config/i386/i386-c.c (ix86_target_macros_internal): Also
14450         define __IBT__ and __SHSTK__ for -fcf-protection.
14451         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
14452         TARGET_IBT.
14453         (ix86_trampoline_init): Likewise.
14454         (x86_output_mi_thunk): Likewise.
14455         (ix86_notrack_prefixed_insn_p): Likewise.
14456         (ix86_option_override_internal): Don't disallow -fcf-protection.
14457         * config/i386/i386.md (rdssp<mode>): Also enable for
14458         -fcf-protection.
14459         (incssp<mode>): Likewise.
14460         (nop_endbr): Likewise.
14461         * config/i386/i386.opt (mcet): Change help message to built-in
14462         functions only.
14463         (mibt): Likewise.
14464         (mshstk): Likewise.
14465         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
14466         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
14467         enable CET built-in functions.
14469 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
14471         * common/config/i386/i386-common.c
14472         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
14473         OPTION_MASK_ISA_MOVDIRI_UNSET,
14474         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
14475         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
14476         * config.gcc (movdirintrin.h): New header.
14477         * config/i386/cpuid.h (bit_MOVDIRI,
14478         bit_MOVDIR64B): New bits.
14479         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
14480         and -mmvodir64b.
14481         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
14482         (VOID, PVOID, PCVOID)): New function types.
14483         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
14484         __builtin_ia32_directstoreu_u64,
14485         __builtin_ia32_movdir64b): New builtins.
14486         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
14487         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
14488         and -mmovdiri.
14489         (ix86_valid_target_attribute_inner_p): Ditto.
14490         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
14491         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
14492         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
14493         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
14494         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
14495         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
14496         (movdiri<mode>, movdir64b_<mode>): New.
14497         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
14498         * config/i386/immintrin.h: Include movdirintrin.h.
14499         * config/i386/movdirintrin.h: New file.
14500         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
14502 2018-04-19  Richard Biener  <rguenther@suse.de>
14504         PR middle-end/85455
14505         * cfg.c (clear_bb_flags): When loop state says we have
14506         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
14508 2018-04-19  Richard Biener  <rguenther@suse.de>
14510         PR tree-optimization/84737
14511         * tree-vect-data-refs.c (vect_copy_ref_info): New function
14512         copying restrict info.
14513         (vect_setup_realignment): Use it.
14514         * tree-vectorizer.h (vect_copy_ref_info): Declare.
14515         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
14516         the first DR to all generated stores.
14517         (vectorizable_load): Likewise for loads.
14519 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
14521         PR tree-optimization/85446
14522         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
14523         the integral and pointer types to have the same precision.
14525         * doc/install.texi: Document --disable-cet being the default and
14526         --enable-cet=auto.
14528 2018-04-18  Martin Liska  <mliska@suse.cz>
14530         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
14531         style.
14533 2018-04-18  Martin Liska  <mliska@suse.cz>
14535         Revert
14536         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
14538         PR ipa/83983
14539         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
14540         arguments if they are comparable.
14542 2018-04-18  Martin Liska  <mliska@suse.cz>
14544         Revert
14545         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
14547         PR lto/84805
14548         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
14549         incomplete types.
14551 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
14553         PR target/85388
14554         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
14555         ENDBR after calling __morestack.
14557 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
14559         PR jit/85384
14560         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
14561         by using gcc_base_ver to generate a gcc_driver_version, and use
14562         it when generating GCC_DRIVER_NAME.
14563         * configure: Regenerate.
14565 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
14567         PR target/81084
14568         * config.gcc: Obsolete powerpc*-*-*spe*.
14570 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
14572         PR debug/84637
14573         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
14574         (stabstr_D): Change type of unum from unsigned int to
14575         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
14576         type.
14578 2018-04-17  Jim Wilson  <jimw@sifive.com>
14580         PR 84856
14581         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
14582         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
14583         Set arg_pointer_offset after using pretend_args_size.
14585 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
14587         PR rtl-optimization/85431
14588         * dse.c (record_store): Ignore zero width stores.
14590         PR sanitizer/85230
14591         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
14592         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
14593         __builtin_stack_restore rather than after it.
14594         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
14595         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
14596         argument instead of virtual_dynamic_stack_rtx.
14598 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14600         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
14601         New prototype.
14602         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
14603         Add note to error message to explain internal mapping of overloaded
14604         built-in function name to non-overloaded built-in function name.
14605         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
14606         function.
14608 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
14610         PR target/85424
14611         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
14612         where the inputs overlap with the output.
14614 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
14616         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
14617         (=v, v) alternative and explicit "memory" attribute.
14618         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
14619         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14620         attributes.
14621         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
14622         "sselog1" type instead of "sselog".
14623         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
14624         "sselog".  Remove explicit "memory" attribute.
14625         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
14626         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14627         attributes.
14628         (vec_extract_hi_v32hi): Merge all alternatives into one, use
14629         "sselog1" type instead of "sselog".  Remove explicit "memory"
14630         attribute.
14631         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
14632         use "sselog1" type instead of "sselog".  Remove explicit "memory"
14633         attribute.
14634         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
14635         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14636         attributes.
14637         (vec_extract_hi_v64qi): Merge all alternatives into one, use
14638         "sselog1" type instead of "sselog".  Remove explicit "memory"
14639         attribute.
14640         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
14641         use "sselog1" type instead of "sselog".  Remove explicit "memory"
14642         attribute.
14644         PR target/85430
14645         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
14647         PR middle-end/85414
14648         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
14649         on a SUBREG.
14651 2018-04-17  Martin Jambor  <mjambor@suse.cz>
14653         PR ipa/85421
14654         * ipa-cp.c (create_specialized_node): Call
14655         expand_all_artificial_thunks if necessary.
14657 2018-04-17  Martin Liska  <mliska@suse.cz>
14659         PR lto/85405
14660         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
14661         in message, remote space in between '_G' and '('.
14663 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
14665         PR target/85281
14666         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
14667         avx512f_vmcmp<mode>3<round_saeonly_name>,
14668         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
14669         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
14670         avx512f_rndscale<mode><round_saeonly_name>,
14671         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
14672         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
14673         Use %<iptr>2 instead of %2 for -masm=intel.
14674         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
14675         avx512f_vcvttss2usi<round_saeonly_name>,
14676         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
14677         -masm=intel.
14678         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
14679         avx512f_vcvttsd2usi<round_saeonly_name>,
14680         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
14681         Use %q1 instead of %1 for -masm=intel.
14682         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
14683         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
14684         of %3 for -masm=intel.
14685         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
14686         -masm=intel.
14687         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
14688         -masm=intel.
14689         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
14690         -masm=intel.
14691         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
14692         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
14693         %g1.
14694         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
14695         -masm=intel.
14696         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
14697         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
14698         %g1 and one with %0 and %1.
14699         (avx512er_vmrcp28<mode><round_saeonly_name>,
14700         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
14701         %1 for -masm=intel.
14702         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
14703         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
14704         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
14705         of %0 and %{%4%} for -masm=intel.
14706         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
14707         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
14708         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
14709         order of %0 and %{%5%}%{z%} for -masm=intel.
14711 2018-04-17  Jan Hubicka  <jh@suse.cz>
14713         PR lto/85405
14714         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
14716 2018-04-17  Martin Liska  <mliska@suse.cz>
14718         PR ipa/85329
14719         * multiple_target.c (create_dispatcher_calls): Set apostrophes
14720         for target_clone error message.  Make default implementation
14721         clone to be a local declaration.
14722         (separate_attrs): Add new argument and check for an empty
14723         string.
14724         (expand_target_clones): Handle it.
14725         (ipa_target_clone): Make redirection just for target_clones
14726         functions.
14728 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
14729             Tom de Vries  <tom@codesourcery.com>
14731         PR middle-end/84955
14732         * omp-expand.c (expand_oacc_for): Add dummy false branch for
14733         tiled basic blocks without omp continue statements.
14735 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
14737         PR target/83660
14738         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
14739         vec_extract expression as having side effects to make sure it gets
14740         a cleanup point.
14742 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
14744         PR target/85403
14745         * config/i386/i386.c (get_builtin_code_for_version): Check
14746         error_mark_node.
14748 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
14750         PR target/84331
14751         * config.gcc: Support "skylake".
14752         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14753         PROCESSOR_SKYLAKE.
14754         * config/i386/i386.c (m_SKYLAKE): Define.
14755         (processor_target_table): Add "skylake".
14756         (ix86_option_override_internal): Add "skylake".
14757         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
14758         PROCESSOR_CANNONLAKE.
14759         (get_builtin_code_for_version): Fix priority for
14760         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
14761         PROCESSOR_SKYLAKE-AVX512.
14762         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
14763         (processor_type): Add PROCESSOR_SKYLAKE.
14765 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
14766             Jason Merrill  <jason@redhat.com>
14768         PR c++/85112
14769         * convert.c (convert_to_integer_1): Use direct recursion for
14770         enumeral types and types with a precision less than the number
14771         of bits in their mode.
14773 2018-04-16  Julia Koval  <julia.koval@intel.com>
14775         PR target/84413
14776         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
14777         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
14779 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
14781         PR target/85293
14782         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
14783         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
14784         and -mno-direct-move.
14786 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
14788         PR target/83402
14789         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
14790         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
14791         Ensure negative shifts result in {0}.
14793 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
14795         PR rtl-optimization/79916
14796         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
14797         regs (if any) to define how to gnerate SD moves when LRA is in
14798         progress.
14800 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
14802         PR rtl-optimization/85393
14803         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
14804         * except.c (expand_dw2_landing_pad_for_region): Make static.
14805         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
14806         a label and unconditional jump to old_bb, rather than
14807         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
14808         basic block.
14810         PR rtl-optimization/85376
14811         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
14812         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
14813         instead of a specific value.
14815 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
14816             Bin Cheng  <bin.cheng@arm.com>
14818         PR tree-optimization/82965
14819         PR tree-optimization/83991
14820         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
14821         by_profile_only parameter.
14822         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
14823         information if the loop was predicted to iterate too many times.
14824         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
14826 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
14828         PR lto/71991
14829         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
14830         always inline.
14832 2018-04-13  Martin Liska  <mliska@suse.cz>
14833             Jakub Jelinek  <jakub@redhat.com>
14835         PR middle-end/81657
14836         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
14837         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
14838         * builtins.c (expand_builtin_memory_copy_args): Use
14839         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
14840         handle dest_addr == pc_rtx.
14842 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
14844         PR target/85291
14845         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
14846         asked to not generate direct moves.
14847         (fix_trunc<mode>si2_stfiwx): Similar.
14848         (fix_trunc<mode>si2_internal): Similar.
14850 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
14852         PR debug/83157
14853         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
14854         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
14855         lookup if dest in some wider mode is known to be const0_rtx and
14856         if so, record permanent equivalence for it to be ZERO_EXTEND of
14857         the narrower mode destination.
14859 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
14861         * lto-streamer-out.c (output_function): Revert 259346.
14862         * omp-expand.c (expand_oacc_for): Likewise.
14864 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
14866         PR rtl-optimization/85354
14867         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
14868         * sel-sched.c (sel_global_init): ... here.
14870 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
14872         PR target/85238
14873         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
14874         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
14875         mode for PE-COFF targets.
14876         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
14877         (i386_pe_asm_lto_end): Likewise.
14878         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
14879         (TARGET_ASM_LTO_END): Likewise.
14880         * config/i386/winnt.c (saved_debug_info_level): New static variable.
14881         (i386_pe_asm_lto_start): New function.
14882         (i386_pe_asm_lto_end): Likewise.
14884 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
14885             Richard Biener  <rguenther@suse.de>
14887         PR middle-end/84955
14888         * lto-streamer-out.c (output_function): Fix CFG loop state before
14889         streaming out.
14890         * omp-expand.c (expand_oacc_for): Handle calls to internal
14891         functions like regular functions.
14893 2018-04-12  Richard Biener  <rguenther@suse.de>
14895         PR lto/85371
14896         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
14897         for the early LTO debug to properly generate references to it
14898         during DIE emission.  Do not re-use that for the skeleton for
14899         split-dwarf.
14900         (dwarf2out_early_finish): Likewise.
14902 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
14904         PR target/85328
14905         * config/i386/sse.md
14906         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
14907         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
14908         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
14909         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
14910         and output is a reg, avoid creating invalid lowpart subreg, but
14911         instead split into a 512-bit move.  Don't split if not AVX512VL,
14912         input is xmm16+ reg and output is a mem.
14913         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
14914         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
14915         xmm16+ reg and output is a mem.
14917 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
14919         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
14920         also for flag_dwarf2_cfi_asm.
14922 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
14924         PR rtl-optimization/85342
14925         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
14926         a bool scalar var inside of the loop instead.  Don't try to update
14927         recog_data.operand after failed apply_change_group.
14929 2018-04-12  Tom de Vries  <tom@codesourcery.com>
14931         PR target/85296
14932         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
14933         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
14934         array with flexible array member as array without given dimension.
14935         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
14936         argument for undefined param to true.
14938 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
14940         PR target/85321
14941         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14942         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
14943         from PowerPC section.
14944         * config/rs6000/sysv4.opt (mcall-): Improve help text.
14945         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
14946         help text that is too long.
14947         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
14948         help text that is too long.
14949         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
14950         help text that is too long.
14952 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
14954         * config/alpha/alpha.md (stack_probe_internal): Rename
14955         from "probe_stack".  Update all callers.
14957 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
14959         PR rtl-optimization/84566
14960         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
14961         sched_macro_fuse_insns.
14963 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
14965         PR target/84301
14966         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
14967         (compute_block_dependences): ... from here.
14969 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
14971         PR tree-optimization/85331
14972         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
14973         from int to HOST_WIDE_INT.
14975 2018-04-11  Martin Jambor  <mjambor@suse.cz>
14977         PR ipa/84149
14978         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
14979         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
14980         not the same as the source val.
14981         (cgraph_edge_brings_value_p): New parameter.
14982         (gather_edges_for_value): Pass destination value to
14983         cgraph_edge_brings_value_p.
14984         (perhaps_add_new_callers): Likewise.
14985         (get_info_about_necessary_edges): Likewise and exclude values brought
14986         only by self-recursive edges.
14987         (create_specialized_node): Redirect only clones of self-calling edges.
14988         (+self_recursive_pass_through_p): New function.
14989         (find_more_scalar_values_for_callers_subset): Use it.
14990         (find_aggregate_values_for_callers_subset): Likewise.
14991         (known_aggs_to_agg_replacement_list): Removed.
14992         (decide_whether_version_node): Re-calculate known constants for all
14993         remaining context clones.
14995 2018-04-11  Richard Biener  <rguenther@suse.de>
14997         PR lto/85339
14998         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
14999         from early DWARF output.
15000         (dwarf2out_early_finish): Output line info unconditionally into
15001         early DWARF and add reference to it.
15003 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
15005         PR target/85281
15006         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
15007         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
15008         other than V2DFmode using iptr mode attribute.
15009         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
15011 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
15013         PR rtl-optimization/84659
15014         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
15016 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
15018         PR debug/85302
15019         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
15020         SIZEP is NULL.
15021         (output_loc_list): Pass address of a dummy size variable even in the
15022         locview handling loop.
15023         (index_location_lists): Add comment on why skip_loc_list_entry can't
15024         call size_of_locs.
15026 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
15028         PR target/85261
15029         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
15030         into register.
15032 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
15034         PR target/85321
15035         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
15036         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
15037         and -mstring-compare-inline-limit.
15039 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
15041         PR target/85287
15042         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
15043         for stack clash protection in a register whenever we need it to be in
15044         a register.
15046 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
15048         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
15049         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
15051 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
15053         PR target/85321
15054         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
15055         the help text.
15056         (mlong-double-): Ditto.
15057         * config/rs6000/sysv4.opt (msdata=): Ditto.
15058         (mtls-size=): Ditto.
15060 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15062         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
15063         erroneous entries for
15064         "vector int vec_ldl (int, long int *)", and
15065         "vector unsigned int vec_ldl (int, unsigned long int *)".
15066         Add comments and entries for
15067         "vector bool char vec_ldl (int, bool char *)",
15068         "vector bool short vec_ldl (int, bool short *)",
15069         "vector bool int vec_ldl (int, bool int *)",
15070         "vector bool long long vec_ldl (int, bool long long *)",
15071         "vector pixel vec_ldl (int, pixel *)",
15072         "vector long long vec_ldl (int, long long *)",
15073         "vector unsigned long long vec_ldl (int, unsigned long long *)".
15074         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
15075         type tree bool_long_long_type_node and correct definition of
15076         bool_V2DI_type_node to make reference to this new type tree.
15077         (rs6000_mangle_type): Replace erroneous reference to
15078         bool_long_type_node with bool_long_long_type_node.
15079         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
15080         comments to emphasize sign distinctions for char and int types and
15081         replace RS6000_BTI_bool_long constant with
15082         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
15083         use of RS6000_BTI_pixel.
15084         (bool_long_type_node): Remove this macro definition.
15085         (bool_long_long_type_node): New macro definition
15087 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
15089         PR rtl-optimization/85300
15090         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
15091         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
15092         simplify_unary_operation fails.
15094 2018-04-10  Martin Liska  <mliska@suse.cz>
15096         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
15097         cgraph_edge and ipa_ref.
15099 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
15101         PR target/85177
15102         PR target/85255
15103         * config/i386/sse.md
15104         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
15105         computation of the VEC_MERGE selector from mask.
15106         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
15107         Fix decoding of the VEC_MERGE selector into mask.
15109 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
15111         PR tree-optimization/85286
15112         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
15114 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
15116         * final.c (final_1): Set insn_last_address as well as
15117         insn_current_address.
15119 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15121         PR target/85173
15122         * explow.c (emit_stack_probe): Call validize_mem on memory location
15123         before passing it to gen_probe_stack.  Create address operand and
15124         legitimize it for the probe_stack_address case.
15126 2018-04-09  Jan Hubicka  <jh@suse.cz>
15128         PR lto/85078
15129         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
15130         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
15131         * tree.c (free_lang_data_in_type): Fix handling of binfos;
15132         walk basetypes.
15133         (free_lang_data): Rebuild type inheritance graph.
15135 2018-04-09  Martin Sebor  <msebor@redhat.com>
15137         * invoke.texi (-finline-small-functions): Mention other optimization
15138         options.
15139         (-findirect-inlining, -fpartial-inlining): Same.
15140         (-finline-functions-called-once): Same.
15141         (-freorder-blocks-and-partition): Same.
15143 2018-04-09  Jan Hubicka  <jh@suse.cz>
15145         PR rtl/84058
15146         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
15147         jumps; choose last target that matches the criteria (i.e.
15148         no partition changes for non-crossing jumps).
15149         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
15150         support for redirecting crossing jumps to non-crossing.
15152 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
15154         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
15155         also for naked functions.
15157 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
15159         * config/arc/arc.md (add_shift): New pattern.
15160         (add_shift2): Likewise.
15161         (sub_shift): Likewise.
15162         (sub_shift_cmp0_noout): Likewise.
15163         (compare_si_ashiftsi): Likewise.
15164         (xbfu_cmp0_noout): New combine pattern.
15165         (xbfu_cmp0"): Likewise.
15166         (movsi_set_cc_insn): Place the predicable variant first.
15167         (commutative_binary_cmp0_noout): Remove clobber.
15168         (commutative_binary_cmp0): New pattern.
15169         (noncommutative_binary_cmp0): Likewise.
15170         (noncommutative_binary_cmp0_noout): Likewise.
15171         (noncommutative_binary_comparison_result_used): Removed.
15172         (rsub_cmp0): New pattern.
15173         (rsub_cmp0_noout): Likewise.
15174         (extzvsi): Changed, keep only meaningful variants.
15175         (SQH, SEZ): New iterators.
15176         (SQH_postfix): New mode attribute.
15177         (SEZ_prefix): New code attribute.
15178         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
15179         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
15180         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
15181         of numerical value.
15182         (noncommutative_operator): Check the availability of barrel
15183         shifter option.
15185 2018-04-09  Richard Biener  <rguenther@suse.de>
15187         PR tree-optimization/85284
15188         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
15189         Only use the niter constraining form of simple_iv when the exit
15190         is always executed.
15192 2018-04-09  Tom de Vries  <tom@codesourcery.com>
15194         PR target/84041
15195         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
15196         (define_expand "*memory_barrier"): New define_expand.
15197         (define_insn "memory_barrier"): New insn.
15199 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
15201         PR rtl-optimization/80463
15202         PR rtl-optimization/83972
15203         PR rtl-optimization/83480
15205         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
15206         correct producer for the insn.
15207         (tidy_control_flow): Fixup seqnos in case of debug insns.
15209 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
15211         PR rtl-optimization/83913
15213         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
15214         different sched-times when merging exprs.
15216 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
15218         PR rtl-optimization/83962
15220         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
15221         tidy_fallthru_edge and tidy_control_flow.
15223 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
15225         PR rtl-optimization/83530
15227         * sel-sched.c (force_next_insn): New global variable.
15228         (remove_insn_for_debug): When force_next_insn is true, also leave only
15229         next insn in the ready list.
15230         (sel_sched_region): When the region wasn't scheduled, make another pass
15231         over it with force_next_insn set to 1.
15233 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
15235         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
15236         into tm_file.
15237         * config/nds32/constants.md (unspec_volatile_element): Add enum values
15238         for interrupt control.
15239         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15240         functions for interrupt control.
15241         * config/nds32/nds32-intrinsic.md: Likewise.
15242         * config/nds32/nds32_intrinsic.h: Likewise.
15243         * config/nds32/nds32.h (nds32_builtins): Likewise.
15245 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
15247         * config/nds32/nds32.c (nds32_init_machine_status,
15248         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
15249         strict_aligned_p field.
15250         (nds32_expand_to_rtl_hook): New function.
15251         (TARGET_EXPAND_TO_RTL_HOOK): Define.
15252         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
15254 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
15255             Chung-Ju Wu  <jasonwucj@gmail.com>
15257         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
15258         * config/nds32/nds32-n7.md: New file.
15259         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
15260         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
15261         pipeline.
15262         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
15263         * config/nds32/nds32.md (pipeline_model): Add n7.
15264         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
15265         * config/nds32/pipelines.md: Include n7 settings.
15267 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
15268             Chung-Ju Wu  <jasonwucj@gmail.com>
15270         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
15271         * config/nds32/nds32-e8.md: New file.
15272         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
15273         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
15274         pipeline.
15275         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
15276         * config/nds32/nds32.md (pipeline_model): Add e8.
15277         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
15278         * config/nds32/pipelines.md: Include e8 settings.
15280 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
15281             Chung-Ju Wu  <jasonwucj@gmail.com>
15283         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
15284         * config/nds32/nds32-n8.md: New file.
15285         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
15286         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
15287         pipeline.
15288         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
15289         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
15290         * config/nds32/nds32.md (pipeline_model): Add n8.
15291         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
15292         * config/nds32/pipelines.md: Include n8 settings.
15294 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
15295             Chung-Ju Wu  <jasonwucj@gmail.com>
15297         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
15298         * config/nds32/nds32-n9-2r1w.md: New file.
15299         * config/nds32/nds32-n9-3r2w.md: New file.
15300         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
15301         nds32_register_ports): New or modify for cpu n9.
15302         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
15303         pipeline.
15304         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
15305         * config/nds32/nds32-utils.c: New file.
15306         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
15307         TARGET_MUL_SLOW): Define.
15308         * config/nds32/nds32.md (pipeline_model): New attribute.
15309         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
15310         New options that support cpu n9.
15311         * config/nds32/pipelines.md: Include n9 settings.
15312         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
15314 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
15316         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
15317         information if necessary.
15318         (output_cond_branch_compare_zero): Likewise.
15319         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
15320         (nds32_target_alignment): Refine for alignment.
15321         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
15322         (FUNCTION_BOUNDARY): Modify.
15323         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
15324         align case.
15325         * config/nds32/nds32.opt (malways-align, malign-functions): New.
15327 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
15329         * config/nds32/constants.md (unspec_volatile_element): Add values for
15330         TLB operation and data prefetch.
15331         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15332         functions for TLB operation and data prefetch.
15333         * config/nds32/nds32-intrinsic.md: Likewise.
15334         * config/nds32/nds32_intrinsic.h: Likewise.
15335         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
15336         (nds32_print_operand): Likewise.
15337         * config/nds32/nds32.h (nds32_builtins): Likewise.
15339 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
15340         Andrew Pinski <pinsika@gcc.gnu.org>
15342         PR middle-end/82976
15343         * match.pd: Use constant_boolean_node of correct type instead of
15344         boolean_true_node or boolean_false_node for simplifying
15345         pointer comparisons to zero.
15347 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
15349         PR tree-optimization/80021
15350         * tree.c (verify_type_variant): Make error call in verify_variant_match
15351         translatable and remove final full stop.
15353 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
15355         * config/nds32/constants.md (unspec_volatile_element): Add
15356         UNSPEC_VOLATILE_EH_RETURN.
15357         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
15358         nds32_output_stack_pop): Support dwarf exception handling process.
15359         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
15360         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
15361         exception handling process.
15362         (nds32_compute_stack_frame): Likewise.
15363         (nds32_return_addr_rtx): Likewise.
15364         (nds32_initial_elimination_offset): Likewise.
15365         (nds32_expand_prologue): Likewise.
15366         (nds32_expand_epilogue): Likewise.
15367         (nds32_dynamic_chain_address): New function.
15368         * config/nds32/nds32.h (machine_function): Add fields for dwarf
15369         exception handling.
15370         (DYNAMIC_CHAIN_ADDRESS): Define.
15371         (EH_RETURN_DATA_REGNO): Define.
15372         (EH_RETURN_STACKADJ_RTX): Define.
15373         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
15374         patterns for dwarf exception handling.
15376 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
15378         * config/nds32/nds32.h: Clean up obsolete macros.
15380 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
15382         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15383         Add enum values for particular instructions.
15384         * config/nds32/nds32-intrinsic.c: Implementation of expanding
15385         particular intrinsic functions.
15386         * config/nds32/nds32-intrinsic.md: Likewise.
15387         * config/nds32/nds32_intrinsic.h: Likewise.
15388         * config/nds32/nds32.h (nds32_builtins): Likewise.
15389         * config/nds32/nds32.md (type): Add pbsad and pbsada.
15390         (btst, ave): New patterns for particular instructions.
15392 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
15394         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15395         Add enum values for atomic load/store and memory sync.
15396         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
15397         and memory sync.
15398         * config/nds32/nds32-intrinsic.md: Likewise.
15399         * config/nds32/nds32_intrinsic.h: Likewise.
15400         * config/nds32/nds32.h (nds32_builtins): Likewise.
15402 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
15404         PR tree-optimization/85257
15405         * fold-const.c (native_encode_vector): If not all elts could fit
15406         and off is -1, return 0 rather than offset.
15407         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
15408         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
15409         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
15410         adjust buffer in native_interpret_expr call.
15412 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
15414         * config/nds32/constants.md (unspec_volatile_element): Add cache
15415         control enum values.
15416         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
15417         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
15418         * config/nds32/nds32.c (nds32_cctl_names): New.
15419         (nds32_print_operand): Handle cache control register names.
15420         * config/nds32/nds32.h (nds32_builtins): New enum values.
15421         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
15422         macros.
15423         * config/nds32/nds32.md (type): Add mmu.
15424         * config/nds32/pipelines.md (simple_insn): Add mmu.
15426 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
15428         * config/nds32/nds32.md (type): Remove call.
15429         * config/nds32/pipelines.md (simple_insn): Likewise.
15431 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
15433         * config/nds32/constants.md (unspec_volatile_element): Add
15434         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
15435         UNSPEC_VOLATILE_FMFCFG.
15436         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
15437         description for fmfcfg and fmfcsr.
15438         (bdesc_1arg): Add fmtcsr.
15439         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
15440         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
15441         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
15442         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
15443         unspec_fmfcfg): New patterns.
15444         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
15445         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
15446         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
15447         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
15448         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
15449         __nds32__fmfcfg): Define.
15451 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
15453         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
15454         intrinsic register names.
15455         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
15456         intrinsic register enum values and macros.
15458 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
15460         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
15461         for load/store addressing form.
15462         (nds32_print_operand_address): Likewise.
15464 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
15466         PR target/85196
15467         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
15468         based on LABEL_REF.  Remove useless assertion.
15469         (pic_address_needs_scratch): Fix formatting.
15470         (sparc_legitimize_pic_address): Minor tweaks.
15471         (sparc_delegitimize_address): Adjust assertion accordingly.
15472         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
15473         into symbolic_operand.
15474         (movsi_high_pic_label_ref): Likewise.
15475         (movsi_lo_sum_pic_label_ref): Likewise.
15476         (movdi_pic_label_ref): Likewise.
15477         (movdi_high_pic_label_ref): Likewise.
15478         (movdi_lo_sum_pic_label_ref): Likewise.
15480 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
15482         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
15483         custom LIB_SPEC setup.
15485 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
15486             Kito Cheng  <kito.cheng@gmail.com>
15488         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
15489         * config/riscv/freebsd.h: New.
15491 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
15493         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
15494         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
15495         file.
15497 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
15498             Kito Cheng  <kito.cheng@gmail.com>
15500         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
15501         nds32_output_call, nds32_symbol_binds_local_p): New functions.
15502         * config/nds32/nds32-protos.h (nds32_output_call,
15503         nds32_output_return): Declare.
15504         * config/nds32/nds32.md: Refine all the call and return patterns.
15506 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
15508         PR debug/85252
15509         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
15510         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
15512         PR rtl-optimization/84872
15513         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
15514         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
15515         EDGE_CROSSING edge.
15517 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
15519         * expr.c (copy_blkmode_to_reg): Revert 254862.
15520         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
15522 2018-04-06  Richard Biener  <rguenther@suse.de>
15524         PR middle-end/85244
15525         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
15526         after seeing a component reference with an adjacent field.  Treat
15527         refs to arrays at struct end of external decls similar to
15528         refs to unconstrained commons.
15530 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
15532         PR sanitizer/85213
15533         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
15534         look through SAVE_EXPRs with non-side-effects argument.  Adjust
15535         recursive calls.
15536         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
15537         save_p here.
15539 2018-04-06  Richard Biener  <rguenther@suse.de>
15541         PR middle-end/85180
15542         * alias.c (find_base_term): New wrapper around find_base_term
15543         unwinding CSELIB_VAL_PTR changes.
15544         (find_base_term): Do not restore CSELIB_VAL_PTR during the
15545         recursion.
15547 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
15549         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
15550         instructions.
15551         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
15552         constant definitions.
15553         ("nop"): lr 0,0 -> nopr r0
15554         ("nop_lr0", "nop_lr1"): New insn definitions.
15556 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
15558         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
15559         NDS32_V3PUSH_AVAILABLE_P macro.
15561 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
15562             Chung-Ju Wu  <jasonwucj@gmail.com>
15564         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
15565         (nds32*-*-*): Add float and fpu_config into supported_defaults.
15566         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
15567         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
15568         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
15569         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
15570         * config/nds32/constraints.md: New constraints and checking for hard
15571         float configuration.
15572         * config/nds32/iterators.md: New mode iterator and attribute for hard
15573         float configuration.
15574         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
15575         patterns.
15576         * config/nds32/nds32-fpu.md: New file.
15577         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
15578         deal with hard float code generation.
15579         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
15580         ARCH_V3S.
15581         (abi_type, float_reg_number): New enum type.
15582         * config/nds32/nds32-predicates.c: New predicates for hard float.
15583         * config/nds32/nds32-protos.h: Declare functions for hard float.
15584         * config/nds32/nds32.c: Implementation for hard float configuration.
15585         * config/nds32/nds32.h: Definitions for hard float configuration.
15586         * config/nds32/nds32.md: Include hard float machine description and
15587         modify patterns for hard float configuration.
15588         * config/nds32/nds32.opt: New options for hard float configuration.
15589         * config/nds32/predicates.md: New predicates for hard float
15590         configuration.
15592 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
15594         * common/config/nds32/nds32-common.c
15595         (nds32_option_optimization_table): Enable -mreleax-hint by default.
15597 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
15599         PR middle-end/85195
15600         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
15601         CONSTRUCTOR_ELT (ctor, ...)->value.
15603 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
15605         PR target/85193
15606         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
15608 2018-04-05  Tom de Vries  <tom@codesourcery.com>
15610         PR target/85204
15611         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
15612         cond jump.
15614 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
15615             Kito Cheng  <kito.cheng@gmail.com>
15617         * config/nds32/constraints.md (U33): Fine-tune checking condition.
15618         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
15619         * config/nds32/nds32.h (nds32_16bit_address_type): Add
15620         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
15622 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
15623             Kito Cheng  <kito.cheng@gmail.com>
15625         * config/nds32/constraints.md (Ufe): New memory constraint.
15626         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
15627         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
15628         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
15629         operands.
15630         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
15631         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
15633 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15635         * config/nds32/nds32.md: Use optimize_size in the condition for
15636         alu-shift instructions.
15638 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15640         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
15642 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15644         * config/nds32/nds32.md (negsi2): Refine pattern.
15646 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
15647             Chung-Ju Wu  <jasonwucj@gmail.com>
15649         * config/nds32/iterators.md (shift_rotate): New code iterator.
15650         (shift): New code attribute.
15651         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
15652         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
15653         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
15654         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
15655         bit-wise operations.
15656         (andsi3, *andsi3): Ditto.
15657         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
15658         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
15659         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
15660         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
15661         nds32_ior_operand, nds32_xor_operand): New predicates.
15663 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15665         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
15666         (addsi3, subsi3): ... this.
15668 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15670         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
15672 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15674         * config/nds32/nds32.md: Adjust indention.
15676 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
15678         * config/nds32/nds32.md (feature): New attribute.
15680 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15682         * config/nds32/nds32.md (subtype): New attribute.
15684 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
15686         PR target/85203
15687         * config/arm/arm-builtins.c (arm_expand_builtin): Change
15688         expansion to perform a bitwise AND of the argument followed by a
15689         boolean negation of the result.
15691 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
15693         PR rtl-optimization/84878
15694         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
15695         the basic block.  Assert the use reference is not artificial and that
15696         it has an associated insn.
15698 2018-04-04  Michael Matz  <matz@suse.de>
15700         * builtins.c (compute_objsize): Pass correct operand
15701         to array_at_struct_end_p.
15703 2018-04-04  Richard Biener  <rguenther@suse.de>
15705         PR lto/85176
15706         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
15707         from contexts for DINFO_LEVEL_TERSE and below.
15709 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
15711         * config/nds32/nds32-doubleword.md (move_<mode>): Require
15712         resiter_operand condition.
15713         * config/nds32/nds32.md (*move<mode>): Ditto.
15715 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
15716             Monk Chiang  <sh.chiang04@gmail.com>
15718         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
15720 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
15722         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
15724 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
15725             Kito Cheng  <kito.cheng@gmail.com>
15727         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
15728         nds32_cond_code_str, output_cond_branch,
15729         output_cond_branch_compare_zero, nds32_expand_cbranch,
15730         nds32_expand_cstore, nds32_expand_movcc,
15731         nds32_output_cbranchsi4_equality_zero,
15732         nds32_output_cbranchsi4_equality_reg,
15733         nds32_output_cbranchsi4_equality_reg_or_const_int,
15734         nds32_output_cbranchsi4_greater_less_zero: New functions.
15735         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
15736         nds32_expand_cstore, nds32_expand_movcc,
15737         nds32_output_cbranchsi4_equality_zero,
15738         nds32_output_cbranchsi4_equality_reg,
15739         nds32_output_cbranchsi4_equality_reg_or_const_int,
15740         nds32_output_cbranchsi4_greater_less_zero): Declare.
15741         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
15742         nds32_rimm11s_operand): New predicates.
15743         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
15744         * config/nds32/nds32.md: Rewrite all the branch and conditional move
15745         patterns.
15747 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
15749         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
15750         * config/nds32/nds32.md: Ditto.
15751         * config/nds32/pipelines.md: Ditto.
15753 2018-04-04  Richard Biener  <rguenther@suse.de>
15755         PR tree-optimization/85168
15756         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
15757         propagating abnormals.
15759 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
15761         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
15763 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
15764             Kito Cheng  <kito.cheng@gmail.com>
15766         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
15767         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
15768         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
15769         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
15770         * config/nds32/nds32.md (sibcall_internal): New.
15771         (sibcall_register): Remove.
15772         (sibcall_immediate): Remove.
15773         (sibcall_value_internal): New.
15774         (sibcall_value_register): Remove.
15775         (sibcall_value_immediate): Remove.
15776         * config/nds32/predicates.md (nds32_general_register_operand): New.
15777         (nds32_call_address_operand): New.
15779 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
15781         PR rtl-optimization/85167
15782         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
15783         bb_defs if *split_p, instead preinitialize it to NULL.
15785         PR tree-optimization/85156
15786         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
15787         evaluating the argument multiple times.
15789 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
15791         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
15792         than vector.
15793         (_mm_cvtpd_ps): Likewise.
15794         (_mm_cvttpd_epi32): Likewise.
15795         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
15796         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
15797         vector, pixel, and bool following altivec.h include.
15799 2018-04-03  Martin Sebor  <msebor@redhat.com>
15801         * doc/extend.texi (Common Function Attributes): Clarify.
15802         (const attribute): Likewise.
15803         (pure attribute): Likewise.
15805 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
15807         PR target/85169
15808         * config/i386/i386.c (ix86_expand_vector_set): Use
15809         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
15811 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
15813         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
15814         instructions when changing rounding bits to preserve precision bits
15815         in the x87 control word.
15817 2018-04-03  Martin Liska  <mliska@suse.cz>
15819         PR tree-optimization/82491
15820         * rtl.h (strip_offset_and_add): Replace += suboffset with
15821         poly_uint64 () + suboffset.
15823 2018-03-29  Martin Liska  <mliska@suse.cz>
15824             Martin Jambor  <mjambor@suse.cz>
15826         PR ipa/84947
15827         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
15828         param_type is not an integral or pointer type.
15830 2018-04-03  Richard Biener  <rguenther@suse.de>
15832         * sese.h (recompute_all_dominators): Remove.
15834 2018-04-02  Martin Sebor  <msebor@redhat.com>
15836         * doc/invoke.texi (-Wrestrict): Fix typos.
15838 2018-04-02  Jim Wilson  <jimw@sifive.com>
15840         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
15841         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
15842         (<optab>di3, <optab>si3_extend): Likewise.
15843         (<optab>si3_mask, <optab>si3_mask_1): New.
15844         (<optab>di3_mask, <optab>di3_mask_1): New.
15845         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
15846         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
15847         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
15849 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
15851         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
15852         example.
15854 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
15856         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
15857         (nds32_canonicalize_comparison): New function.
15859 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
15860             Kito Cheng  <kito.cheng@gmail.com>
15861             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
15863         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
15864         * config/nds32/constants.md (unspec_volatile_element): Add
15865         UNSPEC_VOLATILE_RELAX_GROUP.
15866         * config/nds32/nds32-relax-opt.c: New file.
15867         * config/nds32/nds32-predicates.c
15868         (nds32_symbol_load_store_p): New function.
15869         * config/nds32/nds32-protos.h
15870         (nds32_symbol_load_store_p): Declare function.
15871         (make_pass_nds32_relax_opt): Declare new rtl pass function.
15872         * config/nds32/nds32.c
15873         (nds32_register_pass): New function to register pass.
15874         (nds32_register_passes): New function to register passes.
15875         * config/nds32/nds32.md (relax_group): New pattern.
15876         * config/nds32/nds32.opt (mrelax-hint): New option.
15877         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
15879 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
15881         * config/nds32/t-nds32: Modify files dependency.
15883 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
15885         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
15886         (PROFILE_HOOK): Define its implementation.
15888 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
15890         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
15891         type and 32-bit size.
15893 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
15895         PR middle-end/85090
15896         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
15897         (V_128_256): New mode iterator.
15898         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
15899         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
15900         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
15901         of V.
15902         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
15903         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
15905 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
15907         PR target/83315
15908         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
15909         NaN inputs correctly.
15911 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
15913         PR target/80546
15914         * config/rs6000/vsx.md (??r): New mode attribute.
15915         (*vsx_mov<mode>_64bit): Use it.
15916         (*vsx_mov<mode>_32bit): Likewise.
15918 2018-03-30  Martin Sebor  <msebor@redhat.com>
15920         PR tree-optimization/84818
15921         * builtins.c (check_access): Use warning_n.
15923 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
15925         PR target/83822
15926         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
15927         condition.
15928         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
15929         condition.
15931 2018-03-30  Julia Koval  <julia.koval@intel.com>
15933         PR target/84413
15934         * x86-tune.def (movx, partial_reg_dependency): Enable for
15935         m_SKYLAKE_AVX512.
15937 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
15939         PR inline-asm/84985
15940         * lra-constraints.c (process_alt_operands): Move setting
15941         this_alternative_matches below.
15943 2018-03-29  Martin Liska  <mliska@suse.cz>
15945         PR lto/84995.
15946         * doc/invoke.texi: Document how LTO works with debug info.
15947         Describe auto-load support of binutils.  Mention 'x86-64'
15948         as valid option value of -march option.
15950 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
15952         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
15954         PR c/85094
15955         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
15956         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
15957         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
15958         checking.
15960 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
15962         PR target/84912
15963         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
15964         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
15965         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
15966         for RS6000_BTM_POWERPC64.
15967         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
15968         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
15969         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
15970         definition.
15971         (DIVDE): Use it.
15972         (DIVDEU): Likewise.
15974 2018-03-28  Carl Love  <cel@us.ibm.com>
15976         Revert
15977         2017-09-27  Carl Love  <cel@us.ibm.com>
15979         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
15980         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
15981         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
15982         fctiw instruction.
15984 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15986         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
15987         instead of __vector bool.
15988         (_mm_max_pu8): Likewise.
15989         (_mm_min_pi16): Likewise.
15991 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
15993         PR target/84912
15994         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
15995         (DIVWEUO): Likewise.
15996         (DIVDEO): Likewise.
15997         (DIVDEUO): Likewise.
15998         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
15999         DIVWEUO and DIVDEUO.
16000         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
16001         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
16002         (div_extend): Likewise.
16003         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
16004         builtin function.
16005         (__builtin_divweuo): Likewise.
16006         (__builtin_divdeo): Likewise.
16007         (__builtin_divdeuo): Likewise.
16009 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
16011         PR target/85095
16012         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
16013         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
16015         PR tree-optimization/82004
16016         * gimple-match-head.c (optimize_pow_to_exp): New function.
16017         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
16018         Don't fold to exp if optimize_pow_to_exp is false.
16020 2018-03-28  Martin Liska  <mliska@suse.cz>
16022         PR other/84819
16023         * calls.c (initialize_argument_information): Fix trailing space.
16024         * common.opt: Fix typo and provide better explanation for
16025         -fsanitize-coverage option.
16026         * config/i386/i386.opt: Fix typo.
16028 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
16029             Martin Liska  <mliska@suse.cz>
16031         PR sanitizer/85081
16032         * gimplify.c (asan_poison_variable): Don't do the check for
16033         gimplify_omp_ctxp here.
16034         (gimplify_decl_expr): Do it here.
16035         (gimplify_target_expr): Likewise.
16037 2018-03-28  Martin Liska  <mliska@suse.cz>
16039         PR target/84988
16040         * config/i386/i386.c (ix86_function_arg_advance): Do not call
16041         chkp_type_bounds_count if MPX is not enabled.
16043 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
16045         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
16047 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
16049         PR target/84914
16050         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
16051         function to create the function decl for complex long double
16052         multiply and divide for -mabi=ieeelongdouble.
16053         (init_float128_ieee): Call it.
16055 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
16057         PR target/85044
16058         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
16059         -fcf-protection=branch -mibt.
16060         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
16062 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
16064         PR target/81863
16065         * config/arm/arm.c (arm_valid_symbolic_address): Handle
16066         arm_word_relocations.
16068 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
16070         PR target/85056
16071         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
16072         extern array declarations.
16074 2018-03-27  Richard Biener  <rguenther@suse.de>
16076         PR middle-end/84067
16077         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
16078         explicit single_use checks.
16080 2018-03-27  Richard Biener  <rguenther@suse.de>
16082         PR tree-optimization/85082
16083         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
16084         Valueize the VUSE.
16086 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
16088         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
16089         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
16090         Turn on fasynchronous-unwind-tables and funwind-tables.
16092 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
16094         PR target/85073
16095         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
16096         (*bmi_blsr_<mode>_ccz): Ditto.
16098 2018-03-26  Tom de Vries  <tom@codesourcery.com>
16100         PR tree-optimization/85063
16101         * omp-general.c (offloading_function_p): New function.  Factor out
16102         of ...
16103         * omp-offload.c (pass_omp_target_link::gate): ... here.
16104         * omp-general.h (offloading_function_p): Declare.
16105         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
16106         with attribute omp declare target for offloading functions.
16108 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
16110         PR tree-optimization/84005
16111         * tree-data-ref.h (get_base_for_alignment): Declare.
16112         * tree-data-ref.c (get_base_for_alignment_1): New function.
16113         (get_base_for_alignment): Likewise.
16114         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
16115         get_base_for_alignment to find a suitable base object, instead
16116         of always using drb->base_address.
16118 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
16120         PR inline-asm/85022
16121         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
16122         known size by default.
16124 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
16126         PR inline-asm/85030
16127         * lra-constraints.c (process_alt_operands): Don't match BLKmode
16128         and non BLKmode operands.
16130 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16132         PR target/85026
16133         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
16134         Clean up attributes.
16136 2018-03-23  Richard Biener  <rguenther@suse.de>
16138         PR debug/85020
16139         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
16140         we are going to emit early debug for LTO.
16142 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
16144         PR inline-asm/85034
16145         * function.c (match_asm_constraints_1): Don't optimize if input
16146         doesn't satisfy general_operand predicate for output's mode.
16148         PR inline-asm/85022
16149         * alias.c (write_dependence_p): Don't require for x_canonicalized
16150         non-VOIDmode if x has VOIDmode.
16152         PR sanitizer/85029
16153         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
16154         just don't try to optimize it rather than assert it never happens.
16156 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16158         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
16159         macro expansions for definition of ST_INTERNAL_<mode> and
16160         LD_INTERNAL_<mode> builtins.
16161         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
16162         Remove prototype.
16163         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
16164         function.
16165         (altivec_expand_st_builtin): Likewise.
16166         (altivec_expand_builtin): Remove calls to deleted functions.
16167         (rs6000_address_for_altivec): Delete this function.
16168         * config/rs6000/vector.md: Remove expands for
16169         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
16171 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
16173         PR target/84826
16174         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
16175         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
16176         re-computing once computed.
16177         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
16178         (arm_init_machine_status): Initialize
16179         machine->static_chain_stack_bytes.
16181 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16183         PR target/84760
16184         * doc/extend.texi: Add four new prototypes for vec_ld.
16185         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
16186         definitions for more logical presentation.
16187         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
16188         entries for V1TI variants of __builtin_altivec_ld builtin.
16189         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
16190         handling of V1TI variant of LVX icode pattern.
16191         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
16192         (rs6000_gimple_fold_builtin): Likewise.
16193         (altivec_init_builtins): Add code to define
16194         __builtin_altivec_lvx_v1ti function.
16196 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
16198         PR inline-asm/84941
16199         * function.c (match_asm_constraints_1): Don't do the optimization
16200         if input isn't a REG, SUBREG, MEM or constant.
16202 2018-03-22  Tom de Vries  <tom@codesourcery.com>
16204         PR tree-optimization/84956
16205         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
16206         bb_has_abnormal_pred.
16208 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
16210         PR sanitizer/85018
16211         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
16212         DECL_INITIAL (decl) to decl at the end.
16213         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
16214         adjust the comment.
16216 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
16218         * doc/extend.texi (__builtin_tgmath): Document when complex
16219         integer types are treated as _Complex _Float64.
16221 2018-03-21  Tom de Vries  <tom@codesourcery.com>
16223         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
16225 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
16227         PR tree-optimization/84960
16228         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
16229         if it is ENTRY block, move them into single succ of ENTRY in that case.
16231 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
16233         PR tree-optimization/84811
16234         * poly-int.h (poly_span_traits): Remove the T3 parameter and
16235         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
16236         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
16237         (known_subrange_p): Update accordingly.  Cast each value involved
16238         in the size comparison, rather than casting the result of the
16239         subtraction.
16241 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
16243         PR tree-optimization/84982
16244         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
16245         by flipping the least significant bit rather than all bits from
16246         bitpos to bitpos + bitsize - 1.
16248 2018-03-21  Nathan Sidwell  <nathan@acm.org>
16250         * doc/extend.texi (Deprecated Features): Remove mention of
16251         long-deleted deprecations.
16253 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16255         PR jit/84288
16256         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
16257         * configure: Regenerate.
16259 2018-03-21  Tom de Vries  <tom@codesourcery.com>
16261         PR tree-optimization/83126
16262         * tree-parloops.c (num_phis): New function.
16263         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
16265 2018-03-21  Nathan Sidwell  <nathan@acm.org>
16267         * doc/extend.texi (Deprecated Features): Update deprecated flags,
16268         mention anon-struct/union members and trailing attributes.
16270 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
16272         PR tree-optimization/84969
16273         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
16274         builtin memset partitions if they set different rhs values.
16276 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
16278         PR rtl-optimization/84989
16279         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
16280         VEC_DUPLICATE with scalar result mode.
16282 2018-03-21  Martin Liska  <mliska@suse.cz>
16284         PR ipa/84963
16285         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
16286         not intended return statement.
16288 2018-03-21  Martin Liska  <mliska@suse.cz>
16290         PR target/84988
16291         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
16292         (chkp_find_bound_slots_1): Limit number of iterations.
16294 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
16296         PR target/84838
16297         * Minor grammar fixes for x86 options.
16299 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
16301         PR debug/84875
16302         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
16303         holding REG_CFA_RESTORE notes, instead turn them into a USE.
16305 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
16307         PR target/83789
16308         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
16309         (altivec_lvx_<mode>_1op): Likewise.
16310         (altivec_stvx_<mode>_2op): Likewise.
16311         (altivec_stvx_<mode>_1op): Likewise.
16312         (altivec_lvx_<VM2:mode>): New define_expand.
16313         (altivec_stvx_<VM2:mode>): Likewise.
16314         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
16315         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16316         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
16317         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16318         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
16319         (rs6000_gen_lvx): Likewise.
16320         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
16321         (altivec_expand_stv_builtin): Likewise.
16322         (altivec_expand_builtin): Likewise.
16323         * config/rs6000/vector.md: Likewise.
16325 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16327         PR target/82518
16328         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
16329         BYTES_BIG_ENDIAN.
16331 2018-03-20  Richard Biener  <rguenther@suse.de>
16333         PR target/84986
16334         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
16335         sign-conversions as zero, fall back to standard scalar_stmt
16336         cost for the rest.
16338 2018-03-20  Martin Liska  <mliska@suse.cz>
16340         PR ipa/84825
16341         * predict.c (rebuild_frequencies): Handle case when we have
16342         PROFILE_ABSENT, but flag_guess_branch_prob is false.
16344 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
16346         PR target/84990
16347         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
16348         flag_section_anchors.
16349         * varasm.c (use_blocks_for_decl_p): Remove hack for
16350         dw2_force_const_mem.
16352         PR target/84845
16353         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
16354         to ...
16355         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
16356         be created, use lowpart_subreg of operands[0] rather than operands[0]
16357         itself.
16358         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
16359         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
16360         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
16361         and n constraint instead of aarch64_shift_imm_di and Usd.
16362         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
16363         (*aarch64_<optab>_reg_minus<mode>3): ... this.
16365 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
16367         PR target/82989
16368         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
16369         to favor GPR over NEON registers.
16370         (<shift>di3_neon): Likewise.
16372 2018-03-20  Tom de Vries  <tom@codesourcery.com>
16374         PR target/84952
16375         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
16376         (nvptx_process_pars): Emit bar.sync asap and alap.
16378 2018-03-20  Tom de Vries  <tom@codesourcery.com>
16380         PR target/84954
16381         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
16382         seen_label if seen_label is already set.
16384 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
16386         PR target/84945
16387         * config/i386/i386.c (fold_builtin_cpu): For features above 31
16388         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
16389         Use 1U instead of 1.  Formatting fixes.
16391         PR c/84953
16392         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
16393         instead of TREE_TYPE (s1) for the return value.
16395 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
16397         PR tree-optimization/84946
16398         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
16399         bitsize + bitsize in poly_uint64 rather than poly_int64.
16401         PR sanitizer/78651
16402         * dwarf2asm.c: Include fold-const.c.
16403         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
16404         of decl rather than decl itself.
16406         PR rtl-optimization/84643
16407         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
16409 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
16411         PR sanitizer/78651
16412         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
16413         calling assemble_variable.
16415 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
16417         PR target/81647
16418         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
16419         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
16421 2018-03-19  Jim Wilson  <jimw@sifive.com>
16423         PR bootstrap/84856
16424         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
16425         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
16426         (riscv_first_stack_step): Likewise.
16427         (riscv_option_override): Use STACK_BOUNDARY instead of
16428         MIN_STACK_BOUNDARY.
16429         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
16430         MIN_STACK_BOUNDARY.
16431         (BIGGEST_ALIGNMENT): Set to 128.
16432         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
16433         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
16434         STACK_BOUNDARY.
16436 2018-03-19  Richard Biener  <rguenther@suse.de>
16438         PR tree-optimization/84933
16439         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
16440         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
16442 2018-03-19  Richard Biener  <rguenther@suse.de>
16444         PR tree-optimization/84859
16445         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
16446         (cond_if_else_store_replacement): Perform sinking operation on
16447         single-store BBs regardless of MAX_STORES_TO_SINK setting.
16448         Generalize what a BB with a single eligible store is.
16450 2018-03-19  Richard Biener  <rguenther@suse.de>
16452         PR tree-optimization/84929
16453         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
16454         chrec_is_positive against non-chrec arg.
16456 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
16458         PR target/84711
16459         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
16461 2018-03-18  Martin Liska  <mliska@suse.cz>
16463         PR rtl-optimization/84635
16464         * regrename.c (build_def_use): Use matches_mode only when
16465         matches >= 0.
16467 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
16469         PR tree-optimization/84913
16470         * tree-vect-loop.c (vectorizable_reduction): Don't try to
16471         vectorize chains of COND_EXPRs.
16473 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
16475         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
16477 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
16479         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
16481 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
16483         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
16485 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
16486             Kito Cheng  <kito.cheng@gmail.com>
16488         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
16489         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
16490         (nds32_adjust_reg_alloc_order): New function.
16491         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
16493 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
16495         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
16496         nds32_print_operand, nds32_print_operand_address): Use
16497         HOST_WIDE_INT_PRINT_DEC instead.
16499 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
16501         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
16503 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
16505         PR target/84902
16506         * config/i386/i386.c (initial_ix86_tune_features,
16507         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
16508         unsigned long long.
16509         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
16510         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
16511         rather than 1u << ix86_tune.  Formatting fix.
16512         (ix86_option_override_internal): Change ix86_arch_mask from
16513         unsigned int to unsigned HOST_WIDE_INT, initialize to
16514         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
16515         (ix86_function_specific_restore): Likewise.
16517 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
16519         PR target/84899
16520         * postreload.c (reload_combine_recognize_pattern): Perform
16521         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
16522         truncate_int_for_mode the result for the destination's mode.
16524         PR c/84909
16525         * hsa-gen.c (mem_type_for_type): Fix comment typo.
16526         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
16527         Likewise.
16528         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16529         Likewise.
16531 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
16533         PR target/84876
16534         * lra-assigns.c (lra_split_hard_reg_for): Don't use
16535         regno_allocno_class_array and sorted_pseudos.
16536         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
16537         insns where regno is used.
16539 2018-03-16  Martin Liska  <mliska@suse.cz>
16541         PR ipa/84833
16542         * multiple_target.c (create_dispatcher_calls): Redirect
16543         reference in the symbol table.
16545 2018-03-16  Martin Liska  <mliska@suse.cz>
16547         PR ipa/84722
16548         * multiple_target.c (create_dispatcher_calls): Redirect also
16549         an alias.
16551 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
16553         PR c++/79937
16554         PR c++/82410
16555         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
16556         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
16557         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
16559 2018-03-16  Julia Koval  <julia.koval@intel.com>
16561         * doc/invoke.texi (Skylake Server): Add CLWB.
16562         Cannonlake): Remove CLWB.
16564 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
16566         PR tree-optimization/84841
16567         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
16568         1 << 3.
16569         (FLOAT_ONE_CONST_TYPE): Define.
16570         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
16571         (sort_by_operand_rank): Put entries with higher constant_type last
16572         rather than first to match comments.
16574 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
16576         * config/nios2/nios2.md (movsi_internal): Fix thinko in
16577         split predicate.
16579 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
16581         PR c++/79085
16582         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
16583         check and use address of target always.
16585 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
16587         PR target/84574
16588         * config/i386/i386.c (indirect_thunk_needed): Update comments.
16589         (indirect_thunk_bnd_needed): Likewise.
16590         (indirect_thunks_used): Likewise.
16591         (indirect_thunks_bnd_used): Likewise.
16592         (indirect_return_needed): New.
16593         (indirect_return_bnd_needed): Likewise.
16594         (output_indirect_thunk_function): Add a bool argument for
16595         function return.
16596         (output_indirect_thunk_function): Don't generate alias for
16597         function return thunk.
16598         (ix86_code_end): Call output_indirect_thunk_function to generate
16599         function return thunks.
16600         (ix86_output_function_return): Set indirect_return_bnd_needed
16601         and indirect_return_needed instead of indirect_thunk_bnd_needed
16602         and indirect_thunk_needed.
16604 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
16606         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
16607         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
16608         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
16610 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
16611             Paul Hua <paul.hua.gm@gmail.com>
16613         PR c/84852
16614         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
16616 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
16618         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
16619         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
16620         resp. SFmode cases.
16622 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
16624         PR target/84711
16625         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
16626         instead of GET_MODE_SIZE when comparing Units.
16628 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
16630         PR target/68256
16631         * varasm.c (hash_section): Return an unchangeble hash value
16632         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
16633         Return !aarch64_can_use_per_function_literal_pools_p ().
16635 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
16637         PR target/84860
16638         * optabs.c (emit_conditional_move): Pass address of cmode's copy
16639         rather than address of cmode as last argument to prepare_cmp_insn.
16641 2018-03-15  Julia Koval  <julia.koval@intel.com>
16643         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
16644         F_AVX512VNNI, F_AVX512BITALG): New.
16646 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
16648         PR target/83451
16649         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
16650         insn for floating-point loads and stores.
16652 2018-03-14  Carl Love  <cel@us.ibm.com>
16654         * config/rs6000/rs6000-c.c: Add macro definitions for
16655         ALTIVEC_BUILTIN_VEC_PERMXOR.
16656         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
16657         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
16658         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
16659         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
16660         UNSPEC_VPERMXOR.
16661         * config/doc/extend.texi: Add prototypes for vec_permxor.
16663 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
16665         PR c/84852
16666         * diagnostic-show-locus.c (class layout_point): Convert m_line
16667         from int to linenum_type.
16668         (line_span::comparator): Use linenum "compare" function when
16669         comparing line numbers.
16670         (test_line_span): New function.
16671         (layout_range::contains_point): Convert param "row" from int to
16672         linenum_type.
16673         (layout_range::intersects_line_p): Likewise.
16674         (layout::will_show_line_p): Likewise.
16675         (layout::print_source_line): Likewise.
16676         (layout::should_print_annotation_line_p): Likewise.
16677         (layout::print_annotation_line): Likewise.
16678         (layout::print_leading_fixits): Likewise.
16679         (layout::annotation_line_showed_range_p): Likewise.
16680         (struct line_corrections): Likewise for field m_row.
16681         (line_corrections::line_corrections): Likewise for param "row".
16682         (layout::print_trailing_fixits): Likewise.
16683         (layout::get_state_at_point): Likewise.
16684         (layout::get_x_bound_for_row): Likewise.
16685         (layout::print_line): Likewise.
16686         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
16687         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
16688         * input.c (selftest::test_linenum_comparisons): New function.
16689         (selftest::input_c_tests): Call it.
16690         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
16691         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
16692         * selftest.h (ASSERT_GT): New macro.
16693         (ASSERT_GT_AT): New macro.
16694         (ASSERT_LT): New macro.
16695         (ASSERT_LT_AT): New macro.
16697 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
16699         PR rtl-optimization/84780
16700         * combine.c (distribute_links): Don't make a link based on pc_rtx.
16702 2018-03-14  Martin Liska  <mliska@suse.cz>
16704         * tree.c (record_node_allocation_statistics): Use
16705         get_stats_node_kind.
16706         (get_stats_node_kind): New function extracted from
16707         record_node_allocation_statistics.
16708         (free_node): Use get_stats_node_kind.
16710 2018-03-14  Richard Biener  <rguenther@suse.de>
16712         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
16713         that the value-set of ANTIC_IN doesn't grow.
16715         Revert
16716         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16717         member.
16718         (BB_VISITED_WITH_VISITED_SUCCS): New define.
16719         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16721 2018-03-14  Julia Koval  <julia.koval@intel.com>
16723         * config.gcc (icelake-client, icelake-server): New.
16724         (icelake): Remove.
16725         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
16726         (initial_ix86_arch_features): Ditto.
16727         (PTA_SKYLAKE): Add SGX.
16728         (PTA_ICELAKE): Remove.
16729         (PTA_ICELAKE_CLIENT): New.
16730         (PTA_ICELAKE_SERVER): New.
16731         (ix86_option_override_internal): Split up icelake on icelake client and
16732         icelake server.
16733         (get_builtin_code_for_version): Ditto.
16734         (fold_builtin_cpu): Ditto.
16735         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
16736         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
16737         * config/i386/i386.h (processor_type): Ditto.
16738         * doc/invoke.texi: Ditto.
16740 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
16742         PR sanitizer/83392
16743         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
16744         INTEGER_CST offset, add it together with bitpos / 8 and
16745         sign extend based on POINTER_SIZE.
16747         PR target/84844
16748         Revert
16749         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
16751         PR target/78090
16752         * config/i386/constraints.md (Yc): New register constraint.
16753         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
16754         Use Yc constraint for alternative 2 of operand 0.  Remove
16755         preferred_for_speed attribute.
16757 2018-03-14  Richard Biener  <rguenther@suse.de>
16759         PR tree-optimization/84830
16760         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
16761         with the old one to avoid oscillations.
16763 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
16765         PR target/83712
16766         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
16767         pseudos.
16768         (assign_by_spills): Return a flag of reload assignment failure.
16769         Do not process the reload assignment failures.  Do not spill other
16770         reload pseudos if they has the same reg class.  Update n if
16771         necessary.
16772         (lra_assign): Add a return arg.  Set up from the result of
16773         assign_by_spills call.
16774         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16775         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
16776         usage_insns if it is not NULL.
16777         (spill_hard_reg_in_range): New function.
16778         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16779         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16780         function prototypes.
16781         (lra_assign): Change prototype.
16782         * lra.c (lra): Add code to deal with fails by splitting hard reg
16783         live ranges.
16785 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
16787         * config/riscv/riscv.opt (mrelax): New option.
16788         * config/riscv/riscv.c (riscv_file_start): Emit ".option
16789         "norelax" when riscv_mrelax is disabled.
16790         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
16792 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
16794         PR target/84743
16795         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
16796         reassociation for int modes.
16798 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
16800         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
16801         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
16802         for big-endian.
16803         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
16804         * config/aarch64/aarch64-sve.md
16805         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
16806         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
16807         (*extend<mode><Vwide>2): Rename to...
16808         (aarch64_sve_extend<mode><Vwide>2): ...this.
16809         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
16810         renaming the old pattern to...
16811         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
16812         unsigned packs.
16813         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
16814         define_expand, renaming the old pattern to...
16815         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
16816         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
16817         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
16818         account when deciding which SVE instruction the optab should use.
16819         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
16821 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
16823         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
16824         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
16825         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
16826         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
16827         (tlsdesc_small_<mode>): Turn a define_expand and use
16828         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
16829         (tlsdesc_small_advsimd_<mode>): ...this.
16830         (tlsdesc_small_sve_<mode>): New pattern.
16832 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
16834         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
16835         (UNSPEC_UMUL_HIGHPART): New constants.
16836         (MUL_HIGHPART): New int iteraor.
16837         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
16838         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
16839         define_expand.
16840         (*<su>mul<mode>3_highpart): New define_insn.
16842 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
16844         PR lto/84805
16845         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
16846         incomplete types.
16848 2018-03-13  Martin Liska  <mliska@suse.cz>
16850         PR ipa/84658.
16851         * (sem_item_optimizer::sem_item_optimizer): Initialize new
16852         vector.
16853         (sem_item_optimizer::~sem_item_optimizer): Release it.
16854         (sem_item_optimizer::merge_classes): Register variable aliases.
16855         (sem_item_optimizer::fixup_pt_set): New function.
16856         (sem_item_optimizer::fixup_points_to_sets): Likewise.
16857         * ipa-icf.h: Declare new variables and functions.
16859 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
16861         PR middle-end/84834
16862         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
16863         integer_pow2p@2 and test integer_pow2p in condition.
16864         (A < 0 ? C : 0): Similarly for @1.
16866         PR middle-end/84831
16867         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
16868         characters starting at p contain '\0' character, don't look beyond
16869         that.
16871         PR target/84827
16872         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
16873         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
16875         PR target/84828
16876         * reg-stack.c (change_stack): Change update_end var from int to
16877         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
16878         also call set_block_for_insn on the newly added insns and rescan.
16880         PR target/84786
16881         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
16882         on the last operand.
16884         PR c++/84704
16885         * tree.c (stabilize_reference_1): Return save_expr (e) for
16886         STATEMENT_LIST even if it doesn't have side-effects.
16888 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
16890         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
16892 2018-03-12  Renlin Li  <renlin.li@arm.com>
16894         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
16895         aarch64_output_scalar_simd_mov_immediate.
16897 2018-03-12  Martin Sebor  <msebor@redhat.com>
16899         PR tree-optimization/83456
16900         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
16901         for perfectly overlapping calls to memcpy.
16902         (gimple_fold_builtin_memory_chk): Same.
16903         (gimple_fold_builtin_strcpy): Handle no-warning.
16904         (gimple_fold_builtin_stxcpy_chk): Same.
16905         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
16907 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
16909         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
16910         parameter.  Use it for SFmode.
16911         (rs6000_function_arg_advance_1): Adjust.
16912         (rs6000_function_arg): Adjust.
16913         (rs6000_gimplify_va_arg): Pass false for that new parameter.
16915 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
16917         PR rtl-optimization/84169
16918         PR rtl-optimization/84780
16919         * combine.c (can_combine_p): Check for a 2-insn combination whether
16920         the destination register is used between the two insns, too.
16922 2018-03-12  Richard Biener  <rguenther@suse.de>
16924         PR tree-optimization/84803
16925         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
16926         for refs DR analysis didn't process.
16928 2018-03-12  Richard Biener  <rguenther@suse.de>
16930         PR tree-optimization/84777
16931         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
16932         force-vectorize loops ignore whether we are optimizing for size.
16934 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
16936         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
16937         (TARGET_MD_ASM_ADJUST): Define.
16939 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
16940             Kito Cheng  <kito.cheng@gmail.com>
16941             Chung-Ju Wu  <jasonwucj@gmail.com>
16943         * config/nds32/nds32.c (nds32_compute_stack_frame,
16944         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
16945         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
16946         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
16947         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
16948         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
16949         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
16950         * config/nds32/nds32.md (prologue, epilogue): Use macro
16951         NDS32_V3PUSH_AVAILABLE_P to do checking.
16953 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
16955         PR debug/58150
16956         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
16957         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
16958         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
16959         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
16960         addition of most attributes on !orig_type_die or the attribute not
16961         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
16963 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
16964             Chung-Ju Wu  <jasonwucj@gmail.com>
16966         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
16967         __NDS32_VH__ macro.
16968         * config/nds32/nds32.opt (mvh): New option.
16970 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
16971             Chung-Ju Wu  <jasonwucj@gmail.com>
16973         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
16974         function.
16975         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
16976         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
16977         definition.
16979 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
16980             Chung-Ju Wu  <jasonwucj@gmail.com>
16982         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
16983         function.
16984         * config/nds32/nds32-multiple.md (strlensi): New pattern.
16985         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
16987 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
16988             Kito Cheng  <kito.cheng@gmail.com>
16989             Chung-Ju Wu  <jasonwucj@gmail.com>
16991         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
16992         UNSPEC_FFMISM and UNSPEC_FLMISM.
16993         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
16994         for ffb, ffmism and flmism.
16995         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
16996         (unspec_ffmism): Ditto.
16997         (unspec_flmism): Ditto.
16998         (nds32_expand_builtin_impl): Check if string extension is available.
16999         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
17000         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
17002 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
17004         Reverting patch:
17005         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
17007         PR target/83712
17008         * lra-assigns.c (assign_by_spills): Return a flag of reload
17009         assignment failure.  Do not process the reload assignment
17010         failures.  Do not spill other reload pseudos if they has the same
17011         reg class.
17012         (lra_assign): Add a return arg.  Set up from the result of
17013         assign_by_spills call.
17014         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17015         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
17016         usage_insns if it is not NULL.
17017         (spill_hard_reg_in_range): New function.
17018         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17019         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17020         function prototypes.
17021         (lra_assign): Change prototype.
17022         * lra.c (lra): Add code to deal with fails by splitting hard reg
17023         live ranges.
17025 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
17027         PR target/84807
17028         * config/i386/i386.opt: Replace Enforcment with Enforcement.
17030 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
17032         PR debug/84620
17033         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
17034         (dw_val_node): Add val_symbolic_view.
17035         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
17036         (symview_upper_bound): New.
17037         (new_line_info_table): Initialize symviews_since_reset.
17038         (dwarf2out_source_line): Count symviews_since_reset and set
17039         symview_upper_bound.
17040         (dw_val_equal_p): Handle symview.
17041         (add_AT_symview): New.
17042         (print_dw_val): Handle symview.
17043         (attr_checksum, attr_checksum_ordered): Likewise.
17044         (same_dw_val_p, size_of_die): Likewise.
17045         (value_format, output_die): Likewise.
17046         (add_high_low_attributes): Use add_AT_symview for entry_view.
17047         (dwarf2out_finish): Reset symview_upper_bound, clear
17048         zero_view_p.
17050 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
17052         PR target/83969
17053         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
17054         Add strict argument and use it.
17055         (rs6000_split_multireg_move): Update for new strict argument.
17056         (mem_operand_gpr): Disallow all non-offsettable addresses.
17057         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
17059 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
17061         PR target/84772
17062         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
17063         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
17064         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
17066         PR c++/84767
17067         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
17068         decl, use remap_type if we want to use the type.
17070 2018-03-09  Martin Sebor  <msebor@redhat.com>
17072         PR tree-optimization/84526
17073         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
17074         Remove dead code.
17075         (builtin_access::generic_overlap): Be prepared to handle non-array
17076         base objects.
17078 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
17080         PR rtl-optimization/84682
17081         * lra-constraints.c (process_address_1): Check is_address flag
17082         for address constraints.
17083         (process_alt_operands): Likewise.
17084         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
17085         preprocess_constraints.
17086         * recog.h (preprocess_constraints): Add oploc parameter.
17087         Adjust callers.
17088         * recog.c (preprocess_constraints): Test address_operand for
17089         CT_ADDRESS constraints.
17091 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
17093         PR target/83712
17094         * lra-assigns.c (assign_by_spills): Return a flag of reload
17095         assignment failure.  Do not process the reload assignment
17096         failures.  Do not spill other reload pseudos if they has the same
17097         reg class.
17098         (lra_assign): Add a return arg.  Set up from the result of
17099         assign_by_spills call.
17100         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17101         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
17102         usage_insns if it is not NULL.
17103         (spill_hard_reg_in_range): New function.
17104         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17105         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17106         function prototypes.
17107         (lra_assign): Change prototype.
17108         * lra.c (lra): Add code to deal with fails by splitting hard reg
17109         live ranges.
17111 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17113         PR target/83193
17114         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
17115         Accept complain bool parameter.  Only emit errors if it is true.
17116         (arm_parse_cpu_option_name): Likewise.
17117         (arm_target_thumb_only): Adjust callers of the above.
17118         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
17119         prototype to take a default true bool parameter.
17120         (arm_parse_arch_option_name): Likewise.
17122 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
17123             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
17125         PR jit/64089
17126         PR jit/84288
17127         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
17128         * configure: Regenerate.
17129         * configure.ac ("linker --version-script option"): New.
17130         ("linker soname option"): New.
17132 2018-03-09  Richard Biener  <rguenther@suse.de>
17134         PR tree-optimization/84775
17135         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
17136         immediate uses of predicate stmts and mark them modified.
17138         Revert
17139         PR tree-optimization/84178
17140         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17141         to caller.
17142         (version_loop_for_if_conversion): Delay update_ssa call.
17143         (tree_if_conversion): Delay update_ssa until after predicate
17144         insertion.
17146 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
17148         PR target/84763
17149         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
17150         when the function accesses prior frames.
17152 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
17154         PR debug/84456
17155         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
17156         gen_llsym, otherwise call maybe_gen_llsym.
17158         PR inline-asm/84742
17159         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
17160         has ',' character inside of it.
17162 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17164         PR target/84748
17165         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
17166         as clobbering CC_REGNUM.
17168 2018-03-08  Richard Biener  <rguenther@suse.de>
17170         PR middle-end/84552
17171         * tree-scalar-evolution.c: Include tree-into-ssa.h.
17172         (follow_copies_to_constant): Do not follow SSA names registered
17173         for update.
17175 2018-03-08  Richard Biener  <rguenther@suse.de>
17177         PR tree-optimization/84178
17178         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17179         to caller.
17180         (version_loop_for_if_conversion): Delay update_ssa call.
17181         (tree_if_conversion): Delay update_ssa until after predicate
17182         insertion.
17184 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
17186         PR tree-optimization/84178
17187         * tree-if-conv.c (release_bb_predicate): Remove the
17188         the assertion that the stmts have NULL use_ops.
17189         Discard the statements, asserting that they haven't
17190         yet been added to a BB.
17192 2018-03-08  Richard Biener  <rguenther@suse.de>
17194         PR tree-optimization/84746
17195         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
17196         (phi_translate): Pass in destination ANTIC_OUT set.
17197         (phi_translate_1): Likewise.  For a simplified result lookup
17198         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
17199         (phi_translate_set): Adjust.
17200         (do_pre_regular_insertion): Likewise.
17201         (do_pre_partial_partial_insertion): Likewise.
17203 2018-03-08  Martin Liska  <mliska@suse.cz>
17205         PR gcov-profile/84735
17206         * doc/gcov.texi: Document usage of profile files.
17207         * gcov-io.h: Document changes in the format.
17209 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
17211         PR debug/84404
17212         PR debug/84408
17213         * dwarf2out.c (struct dw_line_info_table): Update comments for
17214         view == -1.
17215         (FORCE_RESET_NEXT_VIEW): New.
17216         (FORCE_RESETTING_VIEW_P): New.
17217         (RESETTING_VIEW_P): Check for -1 too.
17218         (ZERO_VIEW_P): Likewise.
17219         (new_line_info_table): Force-reset next view.
17220         (dwarf2out_begin_function): Likewise.
17221         (dwarf2out_source_line): Simplify zero_view_p initialization.
17222         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
17223         view directly.  Omit view when omitting .loc at line 0.
17225 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
17227         PR tree-optimization/84740
17228         * tree-switch-conversion.c (process_switch): Call build_constructors
17229         only if info.phi_count is non-zero.
17231         PR tree-optimization/84739
17232         * tree-tailcall.c (find_tail_calls): Check call arguments against
17233         DECL_ARGUMENTS (current_function_decl) rather than
17234         DECL_ARGUMENTS (func) when checking for tail recursion.
17236 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
17238         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
17239         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
17240         Volker Reichelt's entry and add entries for people that perform
17241         GCC fuzzy testing and report numerous bugs.
17243 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
17245         PR target/82411
17246         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
17247         readonly data in sdata, if that is disabled.
17248         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
17249         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
17250         -mreadonly-in-sdata option.
17252 2018-03-07  Martin Sebor  <msebor@redhat.com>
17254         PR tree-optimization/84468
17255         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
17256         basic block when looking for nul assignment.
17258 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
17260         PR target/84277
17261         * except.h (output_function_exception_table): Adjust prototype.
17262         * except.c (output_function_exception_table): Remove FNNAME parameter
17263         and add SECTION parameter.  Ouput one part of the table at a time.
17264         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
17265         the first part of the exception table and emit unwind directives.
17266         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
17267         (i386_pe_seh_cold_init): Likewise.
17268         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
17269         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
17270         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
17271         (ix86_output_call_insn): Emit a nop in one more case for SEH.
17272         * config/i386/winnt.c: Include except.h.
17273         (struct seh_frame_state): Add reg_offset, after_prologue and
17274         in_cold_section fields.
17275         (i386_pe_seh_end_prologue): Set seh->after_prologue.
17276         (i386_pe_seh_cold_init): New function.
17277         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
17278         to seh->in_cold_section.
17279         (seh_emit_push): Record the offset of the push.
17280         (seh_emit_save): Record the offet of the save.
17281         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
17282         Test seh->after_prologue to disregard the epilogue.
17283         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
17284         (i386_pe_end_cold_function): New function.
17286 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
17288         PR fortran/84565
17289         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
17290         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
17292         PR c++/84704
17293         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
17294         on tmp_var.
17295         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
17296         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
17298         PR middle-end/84723
17299         * multiple_target.c: Include tree-inline.h and intl.h.
17300         (expand_target_clones): Diagnose and fail if node->definition and
17301         !tree_versionable_function_p (node->decl).
17303 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
17305         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
17306         sprint_ul.
17307         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
17308         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
17309         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
17311 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
17313         PR target/84710
17314         * combine.c (try_combine): Use reg_or_subregno instead of handling
17315         just paradoxical SUBREGs and REGs.
17317 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
17319         * config/arc/arc.c (arc_finalize_pic): Remove function.
17320         (arc_must_save_register): We use single base PIC register, remove
17321         checks to save/restore the PIC register.
17322         (arc_expand_prologue): Likewise.
17323         * config/arc/arc-protos.h (arc_set_default_type_attributes):
17324         Remove.
17325         (arc_verify_short): Likewise.
17326         (arc_attr_type): Likewise.
17327         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
17328         (walk_stores): Likewise.
17329         (arc_address_cost): Make it static.
17330         (arc_verify_short): Likewise.
17331         (branch_dest): Likewise.
17332         (arc_attr_type): Likewise.
17333         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
17334         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
17335         (arc_final_prescan_insn): Remove inserting the nops due to
17336         hardware hazards.  It is done in reorg step.
17337         (insn_length_variant_t): Remove.
17338         (insn_length_parameters_t): Likewise.
17339         (arc_insn_length_parameters): Likewise.
17340         (arc_get_insn_variants): Likewise.
17341         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
17343 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
17345         PR inline-asm/84683
17346         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
17347         assertion failure.
17349         PR tree-optimization/84687
17350         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
17351         on new_node->decl.
17352         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
17354 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17356         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
17357         Rename to ppc_speculation_barrier.
17358         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
17359         __builtin_ppc_speculation_barrier.
17361 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
17363         PR target/84700
17364         * combine.c (combine_simplify_rtx): Don't try to simplify if
17365         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
17366         are equal to x.
17368 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
17370         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
17371         to 32 bytes when compiling for POWER9.
17373 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
17375         PR target/84564
17376         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
17377         regparm >= 3 with no arg reg available also for calls with
17378         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
17380         PR target/84524
17381         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
17382         orig,vex.
17383         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
17385 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
17387         PR target/84264
17388         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
17390 2018-03-05  Richard Biener  <rguenther@suse.de>
17392         PR tree-optimization/84486
17393         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
17394         When inserting a __builtin_assume_aligned call set the LHS
17395         SSA name alignment info accordingly.
17397 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
17399         PR tree-optimization/84114
17400         * config/aarch64/aarch64.c (aarch64_reassociation_width)
17401         Avoid reassociation of FLOAT_MODE addition.
17403 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
17405         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
17406         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
17407         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
17408         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
17409         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
17410         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
17411         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
17412         and -mwbnoinvd.
17413         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
17414         __builtin_ia32_wbinvd): New builtins.
17415         (SPECIAL_ARGS2): New.
17416         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
17417         (SPECIAL_ARGS2): New.
17418         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
17419         (ix86_valid_target_attribute_inner_p): Ditto.
17420         (ix86_init_mmx_sse_builtins): Add special_args2.
17421         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
17422         TARGET_WBNOINVD_P): New.
17423         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
17424         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
17425         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
17426         * config/i386/immintrin.h (_wbinvd): New intrinsic.
17427         * config/i386/pconfigintrin.h: New file.
17428         * config/i386/wbnoinvdintrin.h: Ditto.
17429         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
17430         wbnoinvdintrin.h.
17431         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
17433 2018-03-05  Richard Biener  <rguenther@suse.de>
17435         PR tree-optimization/84670
17436         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
17437         member.
17438         (BB_VISITED_WITH_VISITED_SUCCS): New define.
17439         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
17440         (compute_antic_aux): Only assert the number of values in ANTIC_IN
17441         doesn't grow if all successors (recursively) were visited at least
17442         once.
17444 2018-03-05  Richard Biener  <rguenther@suse.de>
17446         PR tree-optimization/84650
17447         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
17448         if executed in the loop pipeline.
17450 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
17452         * doc/configfiles.texi (Configuration Files): Move info about
17453         conditionalizing $target-protos.h to...
17454         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
17455         differs from $target-protos.h.
17457 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
17458             Chung-Ju Wu  <jasonwucj@gmail.com>
17460         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
17461         * config/nds32/nds32-multiple.md (setmemsi): Define.
17462         * config/nds32/nds32-memory-manipulation.c
17463         (nds32_gen_dup_4_byte_to_word_value): New.
17464         (emit_setmem_word_loop): New.
17465         (emit_setmem_byte_loop): New.
17466         (nds32_expand_setmem_loop): New.
17467         (nds32_expand_setmem_loop_v3m): New.
17468         (nds32_expand_setmem_unroll): New.
17469         (nds32_expand_setmem): New.
17471 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
17472             Chung-Ju Wu  <jasonwucj@gmail.com>
17474         * config/nds32/nds32-memory-manipulation.c
17475         (nds32_emit_load_store): New.
17476         (nds32_emit_post_inc_load_store): New.
17477         (nds32_emit_mem_move): New.
17478         (nds32_emit_mem_move_block): New.
17479         (nds32_expand_movmemsi_loop_unknown_size): New.
17480         (nds32_expand_movmemsi_loop_known_size): New.
17481         (nds32_expand_movmemsi_loop): New.
17482         (nds32_expand_movmemsi_unroll): New.
17483         (nds32_expand_movmemqi): Rename ...
17484         (nds32_expand_movmemsi): ... to this.
17485         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
17486         (movmemsi): ... to this.
17487         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
17488         (nds32_expand_movmemsi): ... to this.
17490 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
17491             Monk Chiang  <sh.chiang04@gmail.com>
17492             Chung-Ju Wu  <jasonwucj@gmail.com>
17494         * config/nds32/nds32-protos.h
17495         (nds32_expand_load_multiple): New arguments.
17496         (nds32_expand_store_multiple): Ditto.
17497         (nds32_valid_multiple_load_store): Rename ...
17498         (nds32_valid_multiple_load_store_p): ... to this.
17499         * config/nds32/nds32-memory-manipulation.c
17500         (nds32_expand_load_multiple): Refine implementation.
17501         (nds32_expand_store_multiple): Ditto.
17502         * config/nds32/nds32-multiple.md
17503         (load_multiple): Update nds32_expand_load_multiple interface.
17504         (store_multiple): Update nds32_expand_store_multiple interface.
17505         * config/nds32/nds32-predicates.c
17506         (nds32_valid_multiple_load_store): Rename ...
17507         (nds32_valid_multiple_load_store_p): ... to this and refine
17508         implementation.
17509         * config/nds32/predicates.md
17510         (nds32_load_multiple_and_update_address_operation): New predicate.
17511         (nds32_store_multiple_and_update_address_operation): New predicate.
17513 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
17514             Chung-Ju Wu  <jasonwucj@gmail.com>
17516         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
17517         (combo): New attribute.
17518         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
17520 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
17522         * config/nds32/nds32.opt: Change -mcmodel= default value.
17524 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
17525             Monk Chiang  <sh.chiang04@gmail.com>
17526             Chung-Ju Wu  <jasonwucj@gmail.com>
17528         * config/nds32/constants.md (unspec_element): New enum.
17529         * config/nds32/constraints.md (Umw): New constraint.
17530         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
17531         * config/nds32/nds32-intrinsic.md: Likewise.
17532         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
17533         (nds32_valid_smw_lwm_base_p): New.
17534         (nds32_output_smw_single_word): New.
17535         (nds32_output_lmw_single_word): New.
17536         (nds32_expand_unaligned_load): New.
17537         (nds32_expand_unaligned_store): New.
17538         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
17539         (nds32_output_smw_single_word): Declare.
17540         (nds32_output_lmw_single_word): Declare.
17541         (nds32_expand_unaligned_load): Declare.
17542         (nds32_expand_unaligned_store): Declare.
17543         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
17544         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
17545         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
17546         NDS32_BUILTIN_UASTORE_DW.
17547         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
17548         predicate.
17550 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
17551             Kito Cheng  <kito.cheng@gmail.com>
17552             Chung-Ju Wu  <jasonwucj@gmail.com>
17554         * config/nds32/nds32-intrinsic.c
17555         (nds32_expand_builtin_null_ftype_reg): Delete.
17556         (nds32_expand_builtin_reg_ftype_imm): Ditto.
17557         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
17558         (nds32_read_argument): New.
17559         (nds32_legitimize_target): Ditto.
17560         (nds32_legitimize_argument): Ditto.
17561         (nds32_check_constant_argument): Ditto.
17562         (nds32_expand_unop_builtin): Ditto.
17563         (nds32_expand_unopimm_builtin): Ditto.
17564         (nds32_expand_binop_builtin): Ditto.
17565         (nds32_builtin_decl_impl): Ditto.
17566         (builtin_description): Ditto.
17567         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
17568         (nds32_init_builtins_impl): Ditto.
17569         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
17570         (nds32_builtin_decl): New.
17571         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
17572         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
17574 2018-03-02  Jeff Law  <law@redhat.com>
17576         * reorg.c (stop_search_p): Handle DEBUG_INSN.
17577         (redundant_insn, fill_simple_delay_slots): Likewise.
17578         (fill_slots_from_thread): Likewise.
17579         * resource.c (mark_referenced_resources): Likewise.
17580         (mark_set_resources, find_dead_or_set_registers): Likewise.
17582 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
17584         * substring-locations.h (format_warning_va): Formatting fix for
17585         ATTRIBUTE_GCC_DIAG.
17586         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
17587         argument.
17588         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
17589         * substring-locations.c: Include intl.h.
17590         (format_warning_va): Turned into small wrapper around
17591         format_warning_n_va, renamed to ...
17592         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
17593         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
17594         use ngettext.
17595         (format_warning_at_substring_n): New function.
17596         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
17597         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
17598         format_warning_at_substring with just a shorter name instead of
17599         const function pointer.
17600         (fmtwarn_n): New function.
17601         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
17602         appropriate, get rid of all the fmtstr temporaries, move conditionals
17603         with G_() wrapped string literals directly into fmtwarn arguments,
17604         cast dir.len to (int), formatting fixes.
17606 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
17608         * doc/invoke.texi: Remove "Cilk Plus" references.
17610 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
17611             Richard Biener  <rguenther@suse.de>
17613         PR ipa/84628
17614         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
17615         for error or warning attributes if CALL_FROM_THUNK_P is set.
17616         Formatting fixes.
17618 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
17620         PR target/56540
17621         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
17622         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
17624         PR target/56540
17625         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
17626         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
17628         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
17629         instead of -1U in last predictors element's probability member.
17631 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
17633         PR ipa/83983
17634         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
17635         arguments if they are comparable.
17637 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
17639         PR tree-optimization/84634
17640         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
17641         masks and masked_loop_p with a single loop_masks, making sure it's
17642         null for bb vectorization.
17644 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
17646         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
17647         (vect_analyze_data_ref_access): Use loop->safe_len rather than
17648         loop->force_vectorize to check whether there is no alias.
17650 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
17652         PR target/84614
17653         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
17654         prototypes.
17655         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
17656         comments.
17657         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
17658         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
17659         instead of a loop around prev_real_insn.
17660         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
17661         prev_real_insn.
17663         PR inline-asm/84625
17664         * config/i386/i386.c (ix86_print_operand): Use conditional
17665         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
17666         zero vector.
17668 2018-03-02  Richard Biener  <rguenther@suse.de>
17670         PR tree-optimization/84427
17671         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
17672         (bitmap_set_subtract_values): Rewrite to handle multiple
17673         exprs per value.
17674         (clean): Likewise.
17675         (prune_clobbered_mems): Likewise.
17676         (phi_translate): Take edge instead of pred/phiblock.
17677         (phi_translate_1): Likewise.
17678         (phi_translate_set): Likewise.  Insert all translated
17679         exprs for a value into the set, keeping possibly multiple
17680         expressions per value.
17681         (compute_antic_aux): Adjust for phi_translate changes.
17682         When intersecting union the expressions and prune those
17683         not in the final value set, keeping possibly multiple
17684         expressions per value.  Do not use value-insertion
17685         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
17686         all expressions.  Add verification that the value-sets
17687         only shrink during iteration.
17688         (compute_partial_antic_aux): Adjust for the phi_translate changes.
17689         (do_pre_regular_insertion): Likewise.
17690         (do_pre_partial_partial_insertion): Likewise.
17692 2018-03-02  Richard Biener  <rguenther@suse.de>
17694         PR target/82005
17695         * config/darwin.c (saved_debug_info_level): New static global.
17696         (darwin_asm_lto_start): Disable debug info generation for LTO out.
17697         (darwin_asm_lto_end): Restore debug info generation settings.
17699 2018-03-01  Martin Liska  <mliska@suse.cz>
17701         PR sanitizer/82484
17702         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
17703         volatile arguments.
17705 2018-03-01  Richard Biener  <rguenther@suse.de>
17707         PR debug/84645
17708         * dwarf2out.c (gen_variable_die): Properly handle late VLA
17709         type annotation with LTO when debug was disabled at compile-time.
17711 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
17713         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
17714         XINT with INTVAL.
17715         (mips_final_postscan_insn): Likewise.
17717 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
17719         PR rtl-optimization/84528
17720         * alias.c (init_alias_target): Add commentary.
17721         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
17722         a unique base value if the frame pointer is not eliminated
17723         to the stack pointer.
17725 2018-03-01  Tom de Vries  <tom@codesourcery.com>
17727         PR rtl-optimization/83327
17728         * lra-int.h (hard_regs_spilled_into): Declare.
17729         * lra.c (hard_regs_spilled_into): Define.
17730         (init_reg_info): Init hard_regs_spilled_into.
17731         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
17732         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
17733         (process_bb_lives): Handle hard_regs_spilled_into.
17734         (lra_create_live_ranges_1): Before doing liveness propagation, clear
17735         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
17737 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
17739         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
17740         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
17741         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
17742         * config/rs6000/aix72.h: New file.
17744 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
17746         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
17747         instead of warning_at with conditional singular and plural messages
17748         where possible.
17750         PR target/52991
17751         * stor-layout.c (update_alignment_for_field): For
17752         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
17753         && !DECL_PACKED (field), do the alignment update, just use
17754         only desired_align instead of MAX (type_align, desired_align)
17755         as the alignment.
17756         (place_field): Don't do known_align < desired_align handling
17757         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
17758         is non-NULL, instead do it after rli->prev_field handling and
17759         only if not within a bitfield word.  For DECL_PACKED (field)
17760         use type_align of BITS_PER_UNIT.
17762 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
17764         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
17765         superfluous parentheses and trailing spaces.
17767 2018-02-28  Richard Biener  <rguenther@suse.de>
17769         PR tree-optimization/84584
17770         * graphite-scop-detection.c (scop_detection::add_scop): Discard
17771         SCoPs with fake exit edge.
17773 2018-02-28  Martin Liska  <mliska@suse.cz>
17775         PR testsuite/84597
17776         * timevar.c (timer::print): Fix format to properly print 100%
17777         values.
17779 2018-02-28  Richard Biener  <rguenther@suse.de>
17781         PR middle-end/84607
17782         * genmatch.c (capture_info::walk_match): Do not mark
17783         captured expressions without operands as expr_p given
17784         they act more like predicates and should be subject to
17785         "lost tail" side-effect preserving.
17787 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
17789         PR rtl-optimization/81611
17790         * auto-inc-dec.c (attempt_change): Move dead note from
17791         mem_insn if it's the next use of regno
17792         (find_address): Take address use of reg holding
17793         non-incremented value.  Add parm to limit search to the named
17794         reg only.
17795         (merge_in_block): Attempt to use a mem insn that is the next
17796         use of the original regno.
17798 2018-02-27  Martin Sebor  <msebor@redhat.com>
17800         PR c++/83871
17801         * doc/invoke.texi (-Wmissing-attributes): New option.
17802         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
17804 2018-02-27  Martin Sebor  <msebor@redhat.com>
17806         PR translation/84207
17807         * diagnostic-core.h (warning_n, error_n, inform_n): Change
17808         n argument to unsigned HOST_WIDE_INT.
17809         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
17810         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
17811         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
17812         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
17814 2018-02-27  Richard Biener  <rguenther@suse.de>
17816         PR tree-optimization/84512
17817         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
17818         Do not use the estimate returned from record_stmt_cost for
17819         the scalar iteration cost but sum properly using add_stmt_cost.
17821 2018-02-27  Richard Biener  <rguenther@suse.de>
17823         PR tree-optimization/84466
17824         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
17825         Adjust last change to less strictly validate use operands.
17827 2018-02-27  Martin Liska  <mliska@suse.cz>
17829         PR gcov-profile/84548
17830         * gcov.c (process_file): Allow partial overlap and consider it
17831         also as group functions.
17832         (output_lines): Properly calculate range of lines for a group.
17834 2018-02-27  Martin Liska  <mliska@suse.cz>
17836         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
17837         'ggc' suffixes.  Change first column width.
17838         (timer::print): Fix formatting of the column.
17840 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
17842         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
17843         preserve inline entry blocks for the sake of debug inline
17844         entry point markers alone.
17845         (remove_unused_locals): Suggest in comments a better place to
17846         force the preservation of inline entry blocks that are
17847         otherwise unused, but do not preserve them.
17849 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
17851         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
17853 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
17855         PR target/84039
17856         * config/i386/constraints.md (Bs): Replace
17857         ix86_indirect_branch_register with
17858         TARGET_INDIRECT_BRANCH_REGISTER.
17859         (Bw): Likewise.
17860         * config/i386/i386.md (indirect_jump): Likewise.
17861         (tablejump): Likewise.
17862         (*sibcall_memory): Likewise.
17863         (*sibcall_value_memory): Likewise.
17864         Peepholes of indirect call and jump via memory: Likewise.
17865         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
17866         (*sibcall_value_GOT_32): Likewise.
17867         * config/i386/predicates.md (indirect_branch_operand): Likewise.
17868         (GOT_memory_operand): Likewise.
17869         (call_insn_operand): Likewise.
17870         (sibcall_insn_operand): Likewise.
17871         (GOT32_symbol_operand): Likewise.
17872         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
17874 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
17876         PR rtl-optimization/83496
17877         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
17878         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
17879         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
17880         redundant insn, if any.
17881         (relax_delay_slots): Likewise.
17882         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
17884 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
17886         PR tree-optimization/83965
17887         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
17888         that grouped statements are part of a reduction chain.  Return
17889         true if the statement is not marked as a reduction itself but
17890         is part of a group.
17891         (vect_recog_dot_prod_pattern): Don't check whether the statement
17892         is part of a group here.
17893         (vect_recog_sad_pattern): Likewise.
17894         (vect_recog_widen_sum_pattern): Likewise.
17896 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
17898         PR debug/84545
17899         * final.c (rest_of_clean_state): Also look for calls inside sequences.
17901 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
17903         PR target/84530
17904         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
17905         the bool argument.
17906         (ix86_output_indirect_function_return): New prototype.
17907         (ix86_split_simple_return_pop_internal): Likewise.
17908         * config/i386/i386.c (indirect_return_via_cx): New.
17909         (indirect_return_via_cx_bnd): Likewise.
17910         (indirect_thunk_name): Handle return va CX_REG.
17911         (output_indirect_thunk_function): Create alias for
17912         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
17913         (ix86_output_indirect_jmp): Remove the bool argument.
17914         (ix86_output_indirect_function_return): New function.
17915         (ix86_split_simple_return_pop_internal): Likewise.
17916         * config/i386/i386.md (*indirect_jump): Don't pass false
17917         to ix86_output_indirect_jmp.
17918         (*tablejump_1): Likewise.
17919         (simple_return_pop_internal): Change it to define_insn_and_split.
17920         Call ix86_split_simple_return_pop_internal to split it for
17921         -mfunction-return=.
17922         (simple_return_indirect_internal): Call
17923         ix86_output_indirect_function_return instead of
17924         ix86_output_indirect_jmp.
17926 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
17928         PR bootstrap/84405
17929         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
17930         memset and value initialization afterwards.
17932 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
17934         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
17936 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
17938         PR target/84521
17939         * common/config/aarch64/aarch64-common.c
17940         (aarch_option_optimization_table[]): Switch
17941         off fomit-frame-pointer
17943 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
17944             Chung-Ju Wu  <jasonwucj@gmail.com>
17946         * config/nds32/nds32-multiple.md (load_multiple): Disallow
17947         volatile memory.
17948         (store_multiple): Ditto.
17950 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
17952         * config.gcc: Add --with-cpu support for nds32 target.
17953         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
17954         * config/nds32/nds32.opt: Add -mcpu= option.
17956 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
17958         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
17959         isel=yes): Warn for these deprecated options.
17961 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
17963         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
17964         ISA_2_5_MASKS_EMBEDDED.
17966 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
17968         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
17969         p->max as pointers rather than using iterative_hash_expr.
17971 2018-02-23  Carl Love  <cel@us.ibm.com>
17973         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
17974         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
17975         BU_P8V_OVERLOAD_2.
17976         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
17977         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
17978         P8V_BUILTIN_VEC_VUNSIGNED2.
17980 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
17982         PR target/81572
17983         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
17984         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
17985         LRA_UNKNOWN_ALT.
17986         * lra-constraints.c (curr_insn_transform): Set up
17987         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
17988         LRA_UNKNOWN_ALT.
17989         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
17990         * lra-eliminations.c (spill_pseudos): Ditto.
17991         (process_insn_for_elimination): Ditto.
17992         * lra-lives.c (reg_early_clobber_p): Use the new macros.
17993         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
17994         LRA_NON_CLOBBERED_ALT.
17996 2018-02-22  Martin Sebor  <msebor@redhat.com>
17998         PR tree-optimization/84480
17999         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
18000         to maybe_diag_stxncpy_trunc.  Call it.
18001         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
18002         from gimple_fold_builtin_strcpy.  Print inlining stack.
18003         (handle_builtin_stxncpy): Print inlining stack.
18004         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
18006 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
18008         PR target/84176
18009         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
18010         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
18011         and -fcheck-pointer-bounds are used together.
18012         (indirect_thunk_prefix): New enum.
18013         (indirect_thunk_need_prefix): New function.
18014         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
18015         "_nt" instead of "_bnd" for NOTRACK prefix.
18016         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
18017         (output_indirect_thunk_function): Likewise.
18018         (): Likewise.
18019         (ix86_code_end): Update output_indirect_thunk_function calls.
18020         (ix86_output_indirect_branch_via_reg): Replace
18021         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
18022         (ix86_output_indirect_branch_via_push): Likewise.
18023         (ix86_output_function_return): Likewise.
18024         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
18025         incompatible with -fcf-protection=branch and
18026         -fcheck-pointer-bounds.
18028 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
18030         PR target/83335
18031         * config/aarch64/aarch64.c (aarch64_print_address_internal):
18032         Change gcc_assert call to output_operand_lossage.
18034 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
18036         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
18038 2018-02-22  DJ Delorie  <dj@redhat.com>
18039             Sebastian Perta  <sebastian.perta@renesas.com>
18040             Oleg Endo  <olegendo@gcc.gnu.org>
18042         * config/rx/rx.c (rx_rtx_costs): New function.
18043         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
18045 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
18047         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
18049 2018-02-22  Martin Liska  <mliska@suse.cz>
18051         PR driver/83193
18052         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
18053         Add "native" as a possible value.
18055 2018-02-22  Martin Liska  <mliska@suse.cz>
18057         PR driver/83193
18058         * config/i386/i386.c (ix86_option_override_internal):
18059         Add "native" as a possible value for -march and -mtune.
18061 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
18063         PR target/84502
18064         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
18065         to all type variants.
18067         PR tree-optimization/84503
18068         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
18069         width as info->bitpos + info->bitsize - start.
18070         (merged_store_group::merge_overlapping): Simplify width computation.
18071         (check_no_overlap): New function.
18072         (imm_store_chain_info::try_coalesce_bswap): Compute expected
18073         start + width and last_order of the group, fail if check_no_overlap
18074         fails.
18075         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
18076         to group if check_no_overlap fails.
18078 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
18080         * config/rs6000/altivec.md: Delete contraint arguments to
18081         define_expand, define_split, and define_peephole2, and in
18082         define_insn_and_split if always unused.
18083         * config/rs6000/darwin.md: Ditto.
18084         * config/rs6000/dfp.md: Ditto.
18085         * config/rs6000/rs6000.md: Ditto.
18086         * config/rs6000/sync.md: Ditto.
18087         * config/rs6000/vector.md: Ditto.
18088         * config/rs6000/vsx.md: Ditto.
18090 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
18092         * config/rs6000/altivec.md: Write output control strings as braced
18093         blocks instead of double-quoted strings.
18094         * config/rs6000/darwin.md: Ditto.
18095         * config/rs6000/rs6000.md: Ditto.
18096         * config/rs6000/vector.md: Ditto.
18097         * config/rs6000/vsx.md: Ditto.
18099 2018-02-21  Jason Merrill  <jason@redhat.com>
18101         PR c++/84314 - ICE with templates and fastcall attribute.
18102         * attribs.c (build_type_attribute_qual_variant): Remove assert.
18104 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
18106         * ipa-cp.c (determine_versionability): Fix comment typos.
18108 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
18110         PR c/84229
18111         * ipa-cp.c (determine_versionability): Do not version functions caling
18112         va_arg_pack.
18114 2018-02-21  Martin Liska  <mliska@suse.cz>
18116         PR driver/83193
18117         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
18118         Add "native" as a possible value.
18119         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
18120         the macro when native cpu detection is available.
18122 2018-02-21  Martin Liska  <mliska@suse.cz>
18124         PR driver/83193
18125         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
18126         Add "native" as a possible value.
18127         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
18128         when native cpu detection is available.
18130 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
18131             Martin Sebor  <msebor@redhat.com>
18133         PR tree-optimization/84478
18134         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
18135         false.
18136         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
18137         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
18138         support which is conservatively correct, for 2 only stay conservative
18139         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
18140         argument to the 2 argument get_range_strlen, adjust 6 arg
18141         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
18142         false.
18143         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
18144         (gimple_fold_builtin_strlen): Pass true as last argument to
18145         get_range_strlen.
18147 2018-02-20  Martin Sebor  <msebor@redhat.com>
18149         PR middle-end/84095
18150         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
18151         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
18152         (builtin_memref::builtin_memref): Factor out parts into
18153         set_base_and_offset and call it.
18155 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
18157         PR middle-end/84406
18158         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
18159         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
18160         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
18161         search at the associated MODE_INT.
18163 2018-02-20  Jeff Law  <law@redhat.com>
18165         PR middle-end/82123
18166         PR tree-optimization/81592
18167         PR middle-end/79257
18168         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
18169         for range data rather than using global data.
18170         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
18171         range data rather than using global data.
18172         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
18173         pass it to children as needed.
18174         (struct directive::fmtresult): Similarly.
18175         (struct directive::set_width): Similarly.
18176         (struct directive::set_precision): Similarly.
18177         (format_integer, format_directive, parse_directive): Similarly.
18178         (format_none): Accept unnamed vr_values parameter.
18179         (format_percent, format_floating, format_character): Similarly.
18180         (format_string, format_plain): Similarly.
18181         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
18182         the EVRP range analyzer for range data rather than using global data.
18183         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
18184         gimple-ssa-evrp-analyze.h
18185         (class sprintf_dom_walker): Add after_dom_children member function.
18186         Add evrp_range_analyzer member.
18187         (sprintf_dom_walker::before_dom_children): Call into the EVRP
18188         range analyzer as needed.
18189         (sprintf_dom_walker::after_dom_children): New member function.
18190         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
18191         if not optimizing.
18192         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
18193         (evrp_range_analyzer::pop_to_marker): Likewise.
18195 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
18197         PR tree-optimization/84419
18198         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
18199         with the required type if its current type is compatible but
18200         different.
18202 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
18204         PR middle-end/82004
18205         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
18206         after vectorization.
18208 2018-02-20  Martin Liska  <mliska@suse.cz>
18210         PR driver/83193
18211         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
18212         possible values if we don't have a hint.
18214 2018-02-20  Martin Liska  <mliska@suse.cz>
18216         PR c/84310
18217         PR target/79747
18218         * final.c (shorten_branches): Build align_tab array with one
18219         more element.
18220         * opts.c (finish_options): Add alignment option limit check.
18221         (MAX_CODE_ALIGN): Likewise.
18222         (MAX_CODE_ALIGN_VALUE): Likewise.
18223         * doc/invoke.texi: Document maximum allowed option value for
18224         all -falign-* options.
18226 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
18228         PR target/84146
18229         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
18230         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
18231         * var-tracking.c (emit_note_insn_var_location): Remove all references
18232         to NOTE_INSN_CALL_ARG_LOCATION.
18233         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
18234         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
18235         Use copy_rtx_if_shared.
18236         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
18237         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
18238         (dwarf2out_var_location): Remove handling of
18239         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
18240         on call_insn.
18241         * final.c (final_scan_insn): Remove all references to
18242         NOTE_INSN_CALL_ARG_LOCATION.
18243         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
18244         before dumping final insns.
18245         * except.c (emit_note_eh_region_end): Remove all references to
18246         NOTE_INSN_CALL_ARG_LOCATION.
18247         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
18248         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
18249         * config/arc/arc.c (hwloop_optimize): Likewise.
18250         * config/arm/arm.c (create_fix_barrier): Likewise.
18251         * config/s390/s390.c (s390_chunkify_start): Likewise.
18252         * config/sh/sh.c (find_barrier): Likewise.
18253         * config/i386/i386.c (rest_of_insert_endbranch,
18254         ix86_seh_fixup_eh_fallthru): Likewise.
18255         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
18256         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
18257         * config/frv/frv.c (frv_function_prologue): Likewise.
18258         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
18259         reg note.
18260         (note_outside_basic_block_p): Remove all references to
18261         NOTE_INSN_CALL_ARG_LOCATION.
18262         * gengtype.c (adjust_field_rtx_def): Likewise.
18263         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
18264         Likewise.
18265         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
18266         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
18268         PR c++/84444
18269         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
18270         is ADDR_EXPR.
18272         PR tree-optimization/84452
18273         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
18274         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
18275         is NULL.
18277 2018-02-19  Martin Liska  <mliska@suse.cz>
18279         PR sanitizer/82183
18280         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
18282 2018-02-19  Martin Liska  <mliska@suse.cz>
18283             Richard Sandiford  <richard.sandiford@linaro.org>
18285         PR tree-optimization/82491
18286         * gimple-fold.c (get_base_constructor): Make earlier bail out
18287         to prevent ubsan.
18289 2018-02-19  Carl Love  <cel@us.ibm.com>
18291         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
18292         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
18293         BU_P8V_OVERLOAD_1.
18294         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
18295         P8V_BUILTIN_VEC_NEG.
18297 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
18299         * config/rl78/rl78.md (movdf): New define expand.
18301 2018-02-19  Martin Liska  <mliska@suse.cz>
18303         PR other/80589
18304         * doc/invoke.texi: Fix typo.
18305         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
18307 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
18309         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
18310         handle rs6000_single_float and rs6000_double_float specially for
18311         e500 family CPUs.
18313 2018-02-16  Jeff Law  <law@redhat.com>
18315         * config/rx/rx.c (add_pop_cfi_notes): New function.;
18316         (pop_regs): Use it.
18318 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
18320         PR ipa/84425
18321         * ipa-inline.c (inline_small_functions): Fix a typo.
18323 2018-02-16  Nathan Sidwell  <nathan@acm.org>
18325         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
18327 2018-02-16  Carl Love  <cel@us.ibm.com>
18329         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
18330         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
18331         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
18332         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
18333         expansion to P8V_BUILTIN_VEC_FLOAT2.
18335 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
18337         PR rtl-optimization/70023
18338         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
18339         src_regno into account.
18341 2018-02-16  Carl Love  <cel@us.ibm.com>
18343         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
18344         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
18345         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
18346         * config/rs6000/rs6000.c: Remove case statements for
18347         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
18348         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
18349         and P9V_BUILTIN_VEC_VINSERT4B.
18350         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
18351         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
18352         * config/rs6000/vsx.md:
18353         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
18354         vec_insert4b.
18356 2018-02-16  Carl Love  <cel@us.ibm.com>
18358         * config/rs6000/altivec.h: Add builtin names vec_extract4b
18359         vec_insert4b.
18360         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
18361         definitions.
18362         * config/rs6000/rs6000-c.c: Add the definitions for
18363         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
18364         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
18365         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
18366         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
18367         definition for insert4b and define insn *insert3b_internal.
18368         * doc/extend.texi: Add documentation for vec_extract4b.
18370 2018-02-16  Nathan Sidwell  <nathan@acm.org>
18372         * doc/extend.texi (Backwards Compatibility): Mention friend
18373         injection.  Note for-scope is deprecated.
18374         * doc/invoke.texi (-ffriend-injection): Deprecate.
18376 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
18378         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
18379         that moved to I2, also allow destinations that are a paradoxical
18380         subreg (instead of a normal reg).
18382 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
18384         PR target/83831
18385         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
18386         to QImode.
18388 2018-02-16  Richard Biener  <rguenther@suse.de>
18390         PR tree-optimization/84037
18391         PR tree-optimization/84016
18392         PR target/82862
18393         * config/i386/i386.c (ix86_builtin_vectorization_cost):
18394         Adjust vec_construct for the fact we need additional higher latency
18395         128bit inserts for AVX256 and AVX512 vector builds.
18396         (ix86_add_stmt_cost): Scale vector construction cost for
18397         elementwise loads.
18399 2018-02-16  Richard Biener  <rguenther@suse.de>
18401         PR tree-optimization/84417
18402         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
18403         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
18404         (non_rewritable_lvalue_p): Likewise, use poly-ints.
18406 2018-02-16  Martin Liska  <mliska@suse.cz>
18408         PR sanitizer/84307
18409         * internal-fn.def (ASAN_CHECK): Set proper flags.
18410         (ASAN_MARK): Likewise.
18412 2018-02-16  Julia Koval  <julia.koval@intel.com>
18414         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
18415         from PTA_CANNONLAKE.
18417 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
18419         PR target/84272
18420         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
18421         Use ++iter rather than iter++ for std::list iterators.
18422         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
18423         defer deleting them until all nodes in the forest are processed.  Do
18424         free even leaf nodes.  Change to_process into auto_vec.
18426         PR bootstrap/84405
18427         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
18428         * vec.h (vec_default_construct): Use memset instead of placement new
18429         if BROKEN_VALUE_INITIALIZATION is defined.
18430         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
18431         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
18432         is defined.
18434         PR rtl-optimization/83723
18435         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
18436         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
18437         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
18438         recursive calls.
18439         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
18440         callers.
18441         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
18443 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
18445         PR rtl-optimization/81443
18446         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
18447         from inner REGs to paradoxical SUBREGs.
18449 2018-02-16  Richard Biener  <rguenther@suse.de>
18451         PR tree-optimization/84399
18452         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
18453         For operands we can analyze at their definition make sure we can
18454         analyze them at each use as well.
18456 2018-02-16  Richard Biener  <rguenther@suse.de>
18458         PR tree-optimization/84190
18459         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
18460         volatile accesses if the decl isn't volatile.
18462 2018-02-15  Jason Merrill  <jason@redhat.com>
18464         PR c++/84314 - ICE with templates and fastcall attribute.
18465         * attribs.c (build_type_attribute_qual_variant): Don't clobber
18466         TYPE_CANONICAL on an existing type.
18468 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
18470         PR tree-optimization/84383
18471         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
18472         dstoff nor call operand_equal_p if dstbase is NULL.
18474         PR tree-optimization/84334
18475         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
18476         also a CONSTANT_CLASS_P, punt.
18478 2018-02-14  Jim Wilson  <jimw@sifive.com>
18480         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
18481         first SMALL_OPERAND check.  New local min_second_step.  Move assert
18482         to where locals are set.  Add TARGET_RVC support.
18483         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
18485 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
18487         * doc/invoke.texi: Correct -Wformat-overflow code sample.
18489 2018-02-14  Martin Sebor  <msebor@redhat.com>
18491         PR tree-optimization/83698
18492         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
18493         arrays constrain the offset range to their bounds.
18494         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
18495         (builtin_access::overlap): Avoid setting the size of overlap if it's
18496         already been set.
18497         (maybe_diag_overlap): Also consider arrays when deciding what values
18498         of offsets to include in diagnostics.
18500 2018-02-14  Martin Sebor  <msebor@redhat.com>
18502         PR c/84108
18503         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
18504         that correspond to the kind of a declaration.
18506 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
18508         PR target/83984
18509         * config/pa/pa.md: Load address of PIC label using the linkage table
18510         if the label is nonlocal.
18512 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18514         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
18515         warning message if user requests -maltivec=be.
18516         * doc/invoke.texi: Document deprecation of -maltivec=be.
18518 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
18520         PR target/84220
18521         * config/rs6000/rs6000-c.c: Update definitions for
18522         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
18523         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
18525 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
18527         PR target/84239
18528         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
18529         add _get_ssp intrinsics. Remove argument from
18530         __builtin_ia32_rdssp[d|q].
18531         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
18532         * config/i386/i386-builtin.def: Remove argument from
18533         __builtin_ia32_rdssp[d|q].
18534         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
18535         ix86_expand_special_args_builtin for _rdssp[d|q].
18536         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
18537         Clear register before usage.
18538         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
18539         Add documentation for new _get_ssp and _inc_ssp intrinsics.
18541 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
18543         PR tree-optimization/84357
18544         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
18545         operand 1 of an ARRAY_REF too.
18547 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
18549         PR target/83831
18550         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
18551         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18552         declarations.
18553         (set_of_reg): New struct.
18554         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
18555         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
18556         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18557         functions.
18558         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
18559         Split into bitclr, bitset, bitinvert patterns if appropriate.
18560         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
18561         use rx_fuse_in_memory_bitop.
18562         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
18563         to named insn, correct maximum insn length.
18565 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
18567         PR target/79242
18568         * machmode.def: Define a complex mode for PARTIAL_INT.
18569         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
18570         MODE_PARTIAL_INT.
18571         * doc/rtl.texi: Document CSPImode.
18572         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
18573         handling.
18574         (msp430_hard_regno_nregs_with_padding): Likewise.
18576 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
18578         PR target/84279
18579         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
18581 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
18583         PR rtl-optimization/84169
18584         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
18585         we generated a parallel as new i3 and we split that to new i2 and i3
18586         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
18587         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
18588         those to i2, not i1.  Partially rewrite this scan code.
18590 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
18592         PR c/82210
18593         * stor-layout.c (place_field): For variable length fields, adjust
18594         offset_align afterwards not just based on the field's alignment,
18595         but also on the size.
18597         PR middle-end/84309
18598         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
18599         of exps and logs in the use_exp2 case.
18601 2018-02-13  Jeff Law  <law@redhat.com>
18603         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
18604         entry for "vector".
18606         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
18607         ARGS as unused.
18609 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
18611         PR debug/84342
18612         PR debug/84319
18613         * common.opt (gas-loc-support, gas-locview-support): New.
18614         (ginline-points, ginternal-reset-location-views): New.
18615         * doc/invoke.texi: Document them.  Use @itemx where intended.
18616         (gvariable-location-views): Adjust.
18617         * target.def (reset_location_view): New.
18618         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
18619         (TARGET_RESET_LOCATION_VIEW): New.
18620         * doc/tm.texi: Rebuilt.
18621         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
18622         (dwarf2out_default_as_locview_support): New.
18623         (output_asm_line_debug_info): Use option variables.
18624         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
18625         (output_loc_list): Likewise.
18626         (add_high_low_attributes): Check option variables.
18627         Don't output entry view attribute in strict mode.
18628         (gen_inlined_subroutine_die): Check option variables.
18629         (dwarf2out_inline_entry): Likewise.
18630         (init_sections_and_labels): Likewise.
18631         (dwarf2out_early_finish): Likewise.
18632         (maybe_reset_location_view): New, from...
18633         (dwarf2out_var_location): ... here.  Call it.
18634         * debug.h (dwarf2out_default_as_loc_support): Declare.
18635         (dwarf2out_default_as_locview_support): Declare.
18636         * hooks.c (hook_int_rtx_insn_0): New.
18637         * hooks.h (hook_int_rtx_insn_0): Declare.
18638         * toplev.c (process_options): Take -gas-loc-support and
18639         -gas-locview-support from dwarf2out.  Enable
18640         -gvariable-location-views by default only with locview
18641         assembler support.  Enable -ginternal-reset-location-views by
18642         default only if the target defines the corresponding hook.
18643         Enable -ginline-points by default if location views are
18644         enabled; force it disabled if statement frontiers are
18645         disabled.
18646         * tree-inline.c (expand_call_inline): Check option variables.
18647         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
18649 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
18651         PR tree-optimization/84321
18652         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
18653         handling.  Also check whether the anti-range contains any values
18654         that satisfy the mask; switch to a VR_RANGE if not.
18656 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
18658         PR sanitizer/84340
18659         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
18661 2018-02-13  Martin Jambor  <mjambor@suse.cz>
18663         PR c++/83990
18664         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
18665         of call statements, also set location of a load to a temporary.
18667 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
18669         * config/rl78/rl78.c (add_vector_labels): New function.
18670         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
18671         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
18672         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
18673         which checks that no arguments are passed.
18674         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
18675         * doc/extend.texi: Documentation for the new attribute.
18677 2018-02-13  Andreas Schwab  <schwab@suse.de>
18679         * config/riscv/linux.h (CPP_SPEC): Define.
18681 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
18683         PR target/84335
18684         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
18685         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
18686         OPTION_MASK_ISA_AES as first argument to def_builtin_const
18687         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
18688         instead of OPTION_MASK_ISA_PCLMUL as first argument to
18689         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
18690         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
18691         temporarily for AES and PCLMUL builtins.
18693         PR tree-optimization/84339
18694         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
18695         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
18696         Formatting fixes.
18698         PR middle-end/84309
18699         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
18700         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
18701         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
18702         inline function.
18703         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
18704         inline function.
18705         * omp-simd-clone.h: New file.
18706         * omp-simd-clone.c: Include omp-simd-clone.h.
18707         (expand_simd_clones): No longer static.
18708         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
18709         cgraph.h and omp-simd-clone.h.
18710         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
18711         (vect_recog_widen_shift_pattern): Formatting fix.
18712         (vect_pattern_recog_1): Don't check optab for calls.
18714         PR target/84336
18715         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
18716         operands[2] into a REG before using gen_lowpart on it.
18718 2018-02-12  Jeff Law  <law@redhat.com>
18720         PR target/83760
18721         * config/sh/sh.c (find_barrier): Consider a sibling call
18722         a barrier as well.
18724         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
18725         successfully back substituting a reg.
18727 2018-02-12  Richard Biener  <rguenther@suse.de>
18729         PR tree-optimization/84037
18730         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
18731         parameter, move visited init to caller.
18732         (vect_slp_analyze_operations): Separate cost from validity
18733         check, initialize visited once for all instances.
18734         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
18735         for all instances.
18736         * tree-vect-stmts.c (vect_model_simple_cost): Make early
18737         out an assert.
18738         (vect_model_promotion_demotion_cost): Likewise.
18739         (vectorizable_bswap): Guard cost modeling with !slp_node
18740         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
18741         SLP stmts.
18742         (vectorizable_call): Likewise.
18743         (vectorizable_conversion): Likewise.
18744         (vectorizable_assignment): Likewise.
18745         (vectorizable_shift): Likewise.
18746         (vectorizable_operation): Likewise.
18747         (vectorizable_store): Likewise.
18748         (vectorizable_load): Likewise.
18749         (vectorizable_condition): Likewise.
18750         (vectorizable_comparison): Likewise.
18752 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
18754         PR sanitizer/84307
18755         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
18756         (ASAN_MARK): Fix fnspec to account for return value, change pointer
18757         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
18759 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
18761         PR middle-end/83665
18762         * params.def (inline-min-speedup): Increase from 8 to 15.
18763         (max-inline-insns-auto): Decrease from 40 to 30.
18764         * ipa-split.c (consider_split): Add some buffer for function to
18765         be considered inlining candidate.
18766         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
18767         default values.
18769 2018-02-12  Richard Biener  <rguenther@suse.de>
18771         PR tree-optimization/84037
18772         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
18773         matched stmts if we cannot swap the non-matched ones.
18775 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
18777         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
18778         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
18779         _mm_maskz_scalef_round_ss): New intrinsics.
18780         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
18781         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
18782         __builtin_ia32_scalefss_round): Remove.
18783         (__builtin_ia32_scalefsd_mask_round,
18784         __builtin_ia32_scalefss_mask_round): New intrinsics.
18785         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
18786         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
18787         ((match_operand:VF_128 2 "<round_nimm_predicate>"
18788         "<round_constraint>")): Changed to ...
18789         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
18790         "<round_scalar_constraint>")): ... this.
18791         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
18792         %0, %1, %2<round_op3>}"): Changed to ...
18793         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
18794         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
18795         %2<round_scalar_mask_op3>}"): ... this.
18796         * config/i386/subst.md (round_scalar_nimm_predicate): New.
18798 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
18800         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
18801         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
18802         (_mm_maskz_sqrt_round_ss): New intrinsics.
18803         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
18804         (__builtin_ia32_sqrtsd_mask_round)
18805         (__builtin_ia32_sqrtss_mask_round): New builtins.
18806         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
18807         (__builtin_ia32_sqrtss_round): Remove.
18808         (__builtin_ia32_sqrtsd_mask_round)
18809         (__builtin_ia32_sqrtss_mask_round): New builtins.
18810         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
18811         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
18812         ((match_operand:VF_128 1 "vector_operand"
18813         "xBm,<round_constraint>")): Changed to ...
18814         ((match_operand:VF_128 1 "vector_operand"
18815         "xBm,<round_scalar_constraint>")): ... this.
18816         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
18817         %0, %2, %<iptr>1<round_op3>}): Changed to ...
18818         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
18819         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
18820         %<iptr>1<round_scalar_mask_op3>}): ... this.
18821         ((set_attr "prefix" "<round_prefix>")): Changed to ...
18822         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
18824 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
18826         PR target/84266
18827         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
18828         Cast vec_cmpeq result to correct type.
18829         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
18830         Cast vec_cmpgt result to correct type.
18832 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
18834         * final.c (final_scan_insn_1): Renamed from...
18835         (final_scan_insn): ... this.  New wrapper, to recover
18836         seen from the outermost call in recursive ones.
18837         * config/sparc/sparc.c (output_return): Drop seen from call.
18838         (output_sibcall): Likewise.
18839         * config/visium/visium.c (output_branch): Likewise.
18841 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
18843         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
18844         function label.
18846 2018-02-10  Alan Modra  <amodra@gmail.com>
18848         PR target/84300
18849         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
18850         Specify LR as an input.
18852 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
18854         PR sanitizer/83987
18855         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
18856         remove_member_access_dummy_vars): New functions.
18857         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
18858         lower_omp_1, execute_lower_omp): Use them.
18860         PR rtl-optimization/84308
18861         * shrink-wrap.c (spread_components): Release todo vector.
18863 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
18865         PR rtl-optimization/57193
18866         * ira-color.c (struct allocno_color_data): Add member
18867         conflict_allocno_hard_prefs.
18868         (update_conflict_allocno_hard_prefs): New.
18869         (bucket_allocno_compare_func): Add a preference based on
18870         conflict_allocno_hard_prefs.
18871         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
18872         (color_allocnos): Remove a dead code.  Initiate
18873         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
18875 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
18877         PR target/84226
18878         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
18879         constraint from =wa to wa.  Avoid a subreg on the output operand,
18880         instead use a pseudo and subreg it in a move.
18881         (p9_xxbrd_<mode>): Changed to ...
18882         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
18883         (p9_xxbrd_v2df): New expander.
18884         (p9_xxbrw_<mode>): Changed to ...
18885         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
18886         (p9_xxbrw_v4sf): New expander.
18888 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
18890         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
18892 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
18894         PR target/83926
18895         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
18896         multiply in 32-bit mode.
18897         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
18898         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
18899         mode.
18901 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
18903         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
18904         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
18905         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
18906         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
18908 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
18910         PR lto/84213
18911         * dwarf2out.c (is_trivial_indirect_ref): New function.
18912         (dwarf2out_late_global_decl): Do not generate a location
18913         attribute for variables that have a non-trivial DECL_VALUE_EXPR
18914         and that are not defined in the current unit.
18916 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
18918         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
18919         instead of a libcall for UNORDERED.
18921 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
18923         PR target/82641
18924         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
18925         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
18927 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18929         PR target/PR84295
18930         * config/s390/s390.c (s390_set_current_function): Invoke
18931         s390_indirect_branch_settings also if fndecl didn't change.
18933 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
18935         * config/rs6000/rs6000.md (blockage): Set length to zero.
18937 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
18939         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
18941 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
18943         PR sanitizer/84285
18944         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
18945         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
18946         -static-lib*san.
18948         PR debug/84252
18949         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
18950         PARALLEL incoming that failed vt_get_decl_and_offset check.
18952         PR middle-end/84237
18953         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
18954         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
18955         TREE_READONLY bit.
18956         (get_variable_section): For decls in named .bss* sections pass true as
18957         second argument to bss_initializer_p.
18959 2018-02-09  Marek Polacek  <polacek@redhat.com>
18960             Jakub Jelinek  <jakub@redhat.com>
18962         PR c++/83659
18963         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
18964         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
18965         Sync some changes from cxx_fold_indirect_ref.
18967 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
18969         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
18970         markers.
18971         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
18972         (BLOCK_INLINE_ENTRY_LABEL): New.
18973         (dwarf2out_var_location): Disregard inline entry markers.
18974         (inline_entry_data): New struct.
18975         (inline_entry_data_hasher): New hashtable type.
18976         (inline_entry_data_hasher::hash): New.
18977         (inline_entry_data_hasher::equal): New.
18978         (inline_entry_data_table): New variable.
18979         (add_high_low_attributes): Add DW_AT_entry_pc and
18980         DW_AT_GNU_entry_view attributes if a pending entry is found
18981         in inline_entry_data_table.  Add old entry_pc attribute only
18982         if debug nonbinding markers are disabled.
18983         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
18984         markers are enabled.
18985         (block_within_block_p, dwarf2out_inline_entry): New.
18986         (dwarf2out_finish): Check that no entries remained in
18987         inline_entry_data_table.
18988         * final.c (reemit_insn_block_notes): Handle inline entry notes.
18989         (final_scan_insn, notice_source_line): Likewise.
18990         (rest_of_clean_state): Skip inline entry markers.
18991         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
18992         markers.
18993         * gimple.c (gimple_build_debug_inline_entry): New.
18994         * gimple.h (enum gimple_debug_subcode): Add
18995         GIMPLE_DEBUG_INLINE_ENTRY.
18996         (gimple_build_debug_inline_entry): Declare.
18997         (gimple_debug_inline_entry_p): New.
18998         (gimple_debug_nonbind_marker_p): Adjust.
18999         * insn-notes.def (INLINE_ENTRY): New.
19000         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
19001         inline entry marker notes.
19002         (print_insn): Likewise.
19003         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
19004         (INSN_DEBUG_MARKER_KIND): Likewise.
19005         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
19006         * tree-inline.c (expand_call_inline): Build and insert
19007         debug_inline_entry stmt.
19008         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
19009         inline entry blocks early, if nonbind markers are enabled.
19010         (dump_scope_block): Dump fragment info.
19011         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
19012         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
19013         (gimple_build_debug_inline_entry): New.
19014         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
19015         Enable/disable inline entry points too.
19016         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
19017         (DEBUG_INSN): Describe inline entry markers.
19019         * common.opt (gvariable-location-views): New.
19020         (gvariable-location-views=incompat5): New.
19021         * config.in: Rebuilt.
19022         * configure: Rebuilt.
19023         * configure.ac: Test assembler for view support.
19024         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
19025         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
19026         * dwarf2out.c (var_loc_view): New typedef.
19027         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
19028         (dwarf2out_locviews_in_attribute): New.
19029         (dwarf2out_locviews_in_loclist): New.
19030         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
19031         (enum dw_line_info_opcode): Add LI_adv_address.
19032         (struct dw_line_info_table): Add view.
19033         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
19034         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
19035         (zero_view_p): New variable.
19036         (ZERO_VIEW_P): New macro.
19037         (output_asm_line_debug_info): New.
19038         (struct var_loc_node): Add view.
19039         (add_AT_view_list, AT_loc_list): New.
19040         (add_var_loc_to_decl): Add view param.  Test it against last.
19041         (new_loc_list): Add view params.  Record them.
19042         (AT_loc_list_ptr): Handle loc and view lists.
19043         (view_list_to_loc_list_val_node): New.
19044         (print_dw_val): Handle dw_val_class_view_list.
19045         (size_of_die): Likewise.
19046         (value_format): Likewise.
19047         (loc_list_has_views): New.
19048         (gen_llsym): Set vl_symbol too.
19049         (maybe_gen_llsym, skip_loc_list_entry): New.
19050         (dwarf2out_maybe_output_loclist_view_pair): New.
19051         (output_loc_list): Output view list or entries too.
19052         (output_view_list_offset): New.
19053         (output_die): Handle dw_val_class_view_list.
19054         (output_dwarf_version): New.
19055         (output_compilation_unit_header): Use it.
19056         (output_skeleton_debug_sections): Likewise.
19057         (output_rnglists, output_line_info): Likewise.
19058         (output_pubnames, output_aranges): Update version comments.
19059         (output_one_line_info_table): Output view numbers in asm comments.
19060         (dw_loc_list): Determine current endview, pass it to new_loc_list.
19061         Call maybe_gen_llsym.
19062         (loc_list_from_tree_1): Adjust.
19063         (add_AT_location_description): Create view list attribute if
19064         needed, check it's absent otherwise.
19065         (convert_cfa_to_fb_loc_list): Adjust.
19066         (maybe_emit_file): Call output_asm_line_debug_info for test.
19067         (dwarf2out_var_location): Reset views as needed.  Precompute
19068         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
19069         attribute.  Set view.
19070         (new_line_info_table): Reset next view.
19071         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
19072         (dwarf2out_source_line): Likewise.  Output view resets and labels to
19073         the assembler, or select appropriate line info opcodes.
19074         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
19075         (optimize_string_length): Catch it.  Adjust.
19076         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
19077         dw_val_class_view_list, and remove it if no longer needed.
19078         (hash_loc_list): Hash view numbers.
19079         (loc_list_hasher::equal): Compare them.
19080         (optimize_location_lists): Check whether a view list symbol is
19081         needed, and whether the locview attribute is present, and
19082         whether they match.  Remove the locview attribute if no longer
19083         needed.
19084         (index_location_lists): Call skip_loc_list_entry for test.
19085         (dwarf2out_finish): Call output_asm_line_debug_info for test.
19086         Use output_dwarf_version.
19087         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
19088         (struct dw_val_node): Add val_view_list.
19089         * final.c (SEEN_NEXT_VIEW): New.
19090         (set_next_view_needed): New.
19091         (clear_next_view_needed): New.
19092         (maybe_output_next_view): New.
19093         (final_start_function): Rename to...
19094         (final_start_function_1): ... this.  Take pointer to FIRST,
19095         add SEEN parameter.  Emit param bindings in the initial view.
19096         (final_start_function): Reintroduce SEEN-less interface.
19097         (final): Rename to...
19098         (final_1): ... this.  Take SEEN parameter.  Output final pending
19099         next view at the end.
19100         (final): Reintroduce seen-less interface.
19101         (final_scan_insn): Output pending next view before switching
19102         sections or ending a block.  Mark the next view as needed when
19103         outputting variable locations.  Notify debug backend of section
19104         changes, and of location view changes.
19105         (rest_of_handle_final): Adjust.
19106         * toplev.c (process_options): Autodetect value for debug variable
19107         location views option.  Warn on incompat5 without -gdwarf-5.
19108         * doc/invoke.texi (gvariable-location-views): New.
19109         (gvariable-location-views=incompat5): New.
19110         (gno-variable-location-views): New.
19112 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
19114         PR tree-optimization/84136
19115         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
19116         that the result of find_edge is non-NULL.
19118 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
19120         PR target/83008
19121         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
19122         storing integer register in SImode.  Fix cost of 256 and 512
19123         byte aligned SSE register store.
19125 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
19127         * config/i386/i386.c (ix86_multiplication_cost): Fix
19128         multiplication cost for TARGET_AVX512DQ.
19130 2018-02-08  Marek Polacek  <polacek@redhat.com>
19132         PR tree-optimization/84238
19133         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
19134         get_range_strlen.
19136 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
19138         PR tree-optimization/84265
19139         * tree-vect-stmts.c (vectorizable_store): Don't treat
19140         VMAT_CONTIGUOUS accesses as grouped.
19141         (vectorizable_load): Likewise.
19143 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
19145         PR tree-optimization/81635
19146         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
19147         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
19148         (test_round_for_mask): New functions.
19149         (wide_int_cc_tests): Call test_round_for_mask.
19150         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
19151         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
19152         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
19153         range returned by get_range_info.
19155 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
19157         PR ipa/81360
19158         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
19159         * symtab.c: Include builtins.h
19160         (symtab_node::output_to_lto_symbol_table_p): Move here
19161         from lto-streamer-out.c:output_symbol_p.
19162         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
19163         (output_symbol_p): Move all logic to symtab.c
19164         (produce_symtab): Update.
19166 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
19168         * config/s390/s390-opts.h (enum indirect_branch): Define.
19169         * config/s390/s390-protos.h (s390_return_addr_from_memory)
19170         (s390_indirect_branch_via_thunk)
19171         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
19172         (enum s390_indirect_branch_type): Define.
19173         * config/s390/s390.c (struct s390_frame_layout, struct
19174         machine_function): Remove.
19175         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
19176         (indirect_branch_table_label_no, indirect_branch_table_name):
19177         Define variables.
19178         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
19179         (enum s390_indirect_branch_option): Define.
19180         (s390_return_addr_from_memory): New function.
19181         (s390_handle_string_attribute): New function.
19182         (s390_attribute_table): Add new attribute handler.
19183         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
19184         (s390_indirect_branch_via_thunk): New function.
19185         (s390_indirect_branch_via_inline_thunk): New function.
19186         (s390_function_ok_for_sibcall): When jumping via thunk disallow
19187         sibling call optimization for non z10 compiles.
19188         (s390_emit_call): Force indirect branch target to be a single
19189         register.  Add r1 clobber for non-z10 compiles.
19190         (s390_emit_epilogue): Emit return jump via return_use expander.
19191         (s390_reorg): Handle JUMP_INSNs as execute targets.
19192         (s390_option_override_internal): Perform validity checks for the
19193         new command line options.
19194         (s390_indirect_branch_attrvalue): New function.
19195         (s390_indirect_branch_settings): New function.
19196         (s390_set_current_function): Invoke s390_indirect_branch_settings.
19197         (s390_output_indirect_thunk_function):  New function.
19198         (s390_code_end): Implement target hook.
19199         (s390_case_values_threshold): Implement target hook.
19200         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
19201         macros.
19202         * config/s390/s390.h (struct s390_frame_layout)
19203         (struct machine_function): Move here from s390.c.
19204         (TARGET_INDIRECT_BRANCH_NOBP_RET)
19205         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
19206         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
19207         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
19208         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
19209         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
19210         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
19211         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
19212         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
19213         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
19214         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
19215         (mnemonic attribute): Add values which aren't recognized
19216         automatically.
19217         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
19218         pattern for branch conversion.  Fix mnemonic attribute.
19219         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
19220         indirect branch via thunk if requested.
19221         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
19222         ("*indirect_jump"): Disable for branch conversion using out of
19223         line thunks.
19224         ("indirect_jump_via_thunk<mode>_z10")
19225         ("indirect_jump_via_thunk<mode>")
19226         ("indirect_jump_via_inlinethunk<mode>_z10")
19227         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
19228         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
19229         ("casesi_jump_via_inlinethunk<mode>_z10")
19230         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
19231         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
19232         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
19233         ("*indirect2_jump"): Disable for branch conversion.
19234         ("casesi_jump"): Turn into expander and expand patterns for branch
19235         conversion.
19236         ("return_use"): New expander.
19237         ("*return"): Emit return via thunk and rename it to ...
19238         ("*return<mode>"): ... this one.
19239         * config/s390/s390.opt: Add new options and and enum for the
19240         option values.
19242 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
19244         * lra-constraints.c (match_reload): Unconditionally use
19245         gen_lowpart_SUBREG, rather than selecting between that
19246         and equivalent gen_rtx_SUBREG code.
19248 2018-02-08  Richard Biener  <rguenther@suse.de>
19250         PR tree-optimization/84233
19251         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
19252         changed flag instead of boguously re-using phi_inserted.
19254 2018-02-08  Martin Jambor  <mjambor@suse.cz>
19256         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
19257         static local variables.
19259 2018-02-08  Richard Biener  <rguenther@suse.de>
19261         PR tree-optimization/84278
19262         * tree-vect-stmts.c (vectorizable_store): When looking for
19263         smaller vector types to perform grouped strided loads/stores
19264         make sure the mode is supported by the target.
19265         (vectorizable_load): Likewise.
19267 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
19269         * config/aarch64/aarch64.c (aarch64_components_for_bb):
19270         Increase LDP/STP opportunities by adding adjacent callee-saves.
19272 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
19274         PR rtl-optimization/84068
19275         PR rtl-optimization/83459
19276         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
19278 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
19280         PR tree-optimization/84224
19281         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
19282         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
19283         non-zero arguments.
19285 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
19287         PR target/84113
19288         * config/rs6000/altivec.md (*restore_world): Remove LR use.
19289         * config/rs6000/predicates.md (restore_world_operation): Adjust op
19290         count, remove one USE.
19292 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
19294         * doc/install.texi (Configuration): Document the
19295         --with-long-double-format={ibm,ieee} PowerPC configuration
19296         options.
19298         PR target/84154
19299         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
19300         Convert from define_expand to be define_insn_and_split.  Rework
19301         float/double/_Float128 conversions to QI/HI/SImode to work with
19302         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
19303         conversions to QI/HImode types did a store and then a load to
19304         truncate the value.  For conversions to VSX registers, don't split
19305         the insn, instead emit the code directly.  Use the code iterator
19306         any_fix to combine signed and unsigned conversions.
19307         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
19308         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
19309         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19310         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
19311         (fix_<mode>di2_hw): Likewise.
19312         (fixuns_<mode>di2_hw): Likewise.
19313         (fix_<mode>si2_hw): Likewise.
19314         (fixuns_<mode>si2_hw): Likewise.
19315         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
19316         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19317         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
19318         fix<uns>_trunc<SFDF:mode>si2_p8.
19319         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
19320         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
19321         (fix<uns>_<mode>_mem): Likewise.
19322         (fctiw<u>z_<mode>_mem): Likewise.
19323         (fix<uns>_<mode>_mem): Likewise.
19324         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
19325         the register allocator from doing a direct move to the GPRs to do
19326         a store, and instead use the ISA 3.0 store byte/half-word from
19327         vector register instruction.  For IEEE 128-bit floating point,
19328         also optimize stores of 32-bit ints.
19329         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
19331 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
19333         * genextract.c (push_pathstr_operand): New function to support
19334         [a-zA-Z].
19335         (walk_rtx): Call push_pathstr_operand.
19336         (print_path): Support [a-zA-Z].
19338 2018-02-07  Richard Biener  <rguenther@suse.de>
19340         PR tree-optimization/84037
19341         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
19342         (cse_and_gimplify_to_preheader): Declare.
19343         (vect_get_place_in_interleaving_chain): Likewise.
19344         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19345         ivexpr_map.
19346         (_loop_vec_info::~_loop_vec_info): Delete it.
19347         (cse_and_gimplify_to_preheader): New function.
19348         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
19349         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
19350         (vectorizable_load): Likewise.  For grouped stores always base
19351         the IV on the first element.
19352         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
19353         condition before gimplifying.
19355 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
19357         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
19358         *DIV_EXPR and *MOD_EXPR.
19360 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
19362         PR target/84248
19363         * config/i386/i386.c (ix86_option_override_internal): Mask out
19364         the CF_SET bit when checking -fcf-protection.
19366 2018-02-07  Tom de Vries  <tom@codesourcery.com>
19368         PR libgomp/84217
19369         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
19370         enough.
19372 2018-02-07  Richard Biener  <rguenther@suse.de>
19374         PR tree-optimization/84204
19375         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
19376         this place.
19378         PR tree-optimization/84205
19379         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
19380         special-case isl_ast_op_zdiv_r.
19382         PR tree-optimization/84223
19383         * graphite-scop-detection.c (gather_bbs::before_dom_children):
19384         Only add conditions from within the region.
19385         (gather_bbs::after_dom_children): Adjust.
19387 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
19389         PR target/84209
19390         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
19391         * config/avr/avr.md: Only post-reload split REG-REG moves if
19392         either register is GENERAL_REG_P.
19394 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
19396         PR tree-optimization/84235
19397         * tree-ssa-scopedtables.c
19398         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
19399         if the subtraction is performed in floating point type where NaNs are
19400         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
19401         build 1.  Formatting fix.
19403 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
19405         PR target/84146
19406         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
19407         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
19408         and skip it regardless of bb boundaries.  Use CALL_P macro,
19409         don't test INSN_P (insn) together with CALL_P or JUMP_P check
19410         unnecessarily, formatting fix.
19412 2018-02-06  Michael Collison  <michael.collison@arm.com>
19414         * config/arm/thumb2.md:
19415         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
19416         (*thumb_mov_notscc): Ditto.
19418 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
19420         PR target/84154
19421         * config/rs6000/rs6000.md (su code attribute): Use "u" for
19422         unsigned_fix, not "s".
19424 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19426         * configure.ac (gcc_fn_eh_frame_ro): New function.
19427         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
19428         correct .eh_frame permissions.
19429         * configure: Regenerate.
19431 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
19433         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
19434         irrelevant options.
19436 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19438         * config/rs6000/rs6000.c (rs6000_option_override_internal):
19439         Display warning message for -mno-speculate-indirect-jumps.
19441 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
19443         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
19444         Undocumented.
19445         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
19447 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
19449         PR tree-optimization/84225
19450         * tree-eh.c (find_trapping_overflow): Only call
19451         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
19453 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
19455         PR target/84145
19456         * config/i386/i386.c: Reimplement the check of possible options
19457         -mibt/-mshstk conbination. Change error messages.
19458         * doc/invoke.texi: Fix a typo: remove extra '='.
19460 2018-02-06  Marek Polacek  <polacek@redhat.com>
19462         PR tree-optimization/84228
19463         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
19465 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
19467         PR target/82641
19468         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
19469         emitted arch directives.
19470         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
19471         __ARM_FEATURE_COPROC before changing architectures.
19473 2018-02-06  Richard Biener  <rguenther@suse.de>
19475         * config/i386/i386.c (print_reg): Fix typo.
19476         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
19478 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
19480         * configure: Regenerate.
19482 2018-02-05  Martin Sebor  <msebor@redhat.com>
19484         PR tree-optimization/83369
19485         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
19486         inlining context.
19488 2018-02-05  Martin Liska  <mliska@suse.cz>
19490         * doc/invoke.texi: Cherry-pick upstream r323995.
19492 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
19494         * ira.c (ira_init_register_move_cost): Adjust comment.
19496 2018-02-05  Martin Liska  <mliska@suse.cz>
19498         PR gcov-profile/84137
19499         * doc/gcov.texi: Fix typo in documentation.
19501 2018-02-05  Martin Liska  <mliska@suse.cz>
19503         PR gcov-profile/83879
19504         * doc/gcov.texi: Document necessity of --dynamic-list-data when
19505         using dlopen functionality.
19507 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
19509         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
19510         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
19511         _mm_maskz_range_ss, _mm_mask_range_round_ss,
19512         _mm_maskz_range_round_ss): New intrinsics.
19513         (__builtin_ia32_rangesd128_round)
19514         (__builtin_ia32_rangess128_round): Remove.
19515         (__builtin_ia32_rangesd128_mask_round,
19516         __builtin_ia32_rangess128_mask_round): New builtins.
19517         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
19518         __builtin_ia32_rangess128_round): Remove.
19519         (__builtin_ia32_rangesd128_mask_round,
19520         __builtin_ia32_rangess128_mask_round): New builtins.
19521         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
19522         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
19523         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
19524         "<round_saeonly_constraint>")): Changed to ...
19525         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
19526         "<round_saeonly_scalar_constraint>")): ... this.
19527         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
19528         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
19529         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
19530         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
19531         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
19533 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
19535         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
19536         options.
19537         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
19538         Remove all values except native, 8540 and 8548.
19540 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
19542         * config/i386/i386.c (ix86_output_function_return): Pass
19543         INVALID_REGNUM, instead of -1, as invalid register number to
19544         indirect_thunk_name and output_indirect_thunk.
19546 2018-02-02  Julia Koval  <julia.koval@intel.com>
19548         * config.gcc: Add -march=icelake.
19549         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
19550         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
19551         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
19552         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
19553         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
19554         (processor_target_table): Add icelake.
19555         (ix86_option_override_internal): Handle new PTAs.
19556         (get_builtin_code_for_version): Handle icelake.
19557         (M_INTEL_COREI7_ICELAKE): New.
19558         (fold_builtin_cpu): Handle icelake.
19559         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
19560         * doc/invoke.texi: Add -march=icelake.
19562 2018-02-02  Julia Koval  <julia.koval@intel.com>
19564         * config/i386/i386.c (ix86_option_override_internal): Change flags type
19565         to wide_int_bitmask.
19566         * wide-int-bitmask.h: New.
19568 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
19570         PR target/84066
19571         * config/i386/i386.md: Replace Pmode with word_mode in
19572         builtin_setjmp_setup and builtin_longjmp to support x32.
19574 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
19576         PR target/56010
19577         PR target/83743
19578         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
19579         #include "opts.h".
19580         (rs6000_supported_cpu_names): New static variable.
19581         (linux_cpu_translation_table): Likewise.
19582         (elf_platform) <cpu>: Define new static variable and use it.
19583         Translate kernel AT_PLATFORM name to canonical name if needed.
19584         Error if platform name is unknown.
19586 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
19588         PR target/84089
19589         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
19591 2018-02-01  Jeff Law  <law@redhat.com>
19593         PR target/84128
19594         * config/i386/i386.c (release_scratch_register_on_entry): Add new
19595         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
19596         the scratch if RELEASE_VIA_POP is false.
19597         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
19598         If we have to save a temporary register, decrement SIZE appropriately.
19599         Pass new arguments to release_scratch_register_on_entry.
19600         (ix86_adjust_stack_and_probe): Likewise.
19601         (ix86_emit_probe_stack_range): Pass new arguments to
19602         release_scratch_register_on_entry.
19604 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
19606         PR rtl-optimization/84157
19607         * combine.c (change_zero_ext): Use REG_P predicate in
19608         front of HARD_REGISTER_P predicate.
19610 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
19612         * config/avr/avr.c (avr_option_override): Move disabling of
19613         -fdelete-null-pointer-checks to...
19614         * common/config/avr/avr-common.c (avr_option_optimization_table):
19615         ...here.
19617 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19619         PR tree-optimization/81635
19620         * tree-data-ref.c (split_constant_offset_1): For types that
19621         wrap on overflow, try to use range info to prove that wrapping
19622         cannot occur.
19624 2018-02-01  Renlin Li  <renlin.li@arm.com>
19626         PR target/83370
19627         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
19628         TAILCALL_ADDR_REGS.
19629         (aarch64_register_move_cost): Likewise.
19630         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
19631         TAILCALL_ADDR_REGS.
19632         (REG_CLASS_NAMES): Likewise.
19633         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
19634         TAILCALL_ADDR_REGS. Remove IP registers.
19635         * config/aarch64/aarch64.md (Ucs): Update register constraint.
19637 2018-02-01  Richard Biener  <rguenther@suse.de>
19639         * domwalk.h (dom_walker::dom_walker): Add additional constructor
19640         for specifying RPO order and allow NULL for that.
19641         * domwalk.c (dom_walker::dom_walker): Likewise.
19642         (dom_walker::walk): Handle NULL RPO order.
19643         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
19644         in RPO order.
19645         (rewrite_update_dom_walker): Likewise.
19646         (mark_def_dom_walker): Likewise.
19648 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19650         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
19651         (aarch64_maybe_expand_sve_subreg_move): Declare.
19652         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
19653         * config/aarch64/predicates.md (aarch64_any_register_operand): New
19654         predicate.
19655         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
19656         that are semantically a reverse operation.
19657         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
19658         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
19659         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
19660         functions.
19661         (aarch64_can_change_mode_class): For big-endian, forbid changes
19662         between two SVE modes if they have different element sizes.
19664 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19666         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
19667         the TImode handling for big-endian targets.
19669 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19671         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
19672         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
19673         not just bytes.
19674         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
19675         Remove BSWAP handing for big-endian targets and use the form of
19676         LD1RQ appropariate for the mode.
19678 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19680         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
19681         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
19682         duplicated element.
19684 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19686         PR tearget/83845
19687         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
19688         check for operands that need to go through aarch64_sve_reload_be.
19690 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
19692         PR tree-optimization/81661
19693         PR tree-optimization/84117
19694         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
19695         * tree-eh.c: Include gimplify.h.
19696         (find_trapping_overflow, replace_trapping_overflow,
19697         rewrite_to_non_trapping_overflow): New functions.
19698         * tree-vect-loop.c: Include tree-eh.h.
19699         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
19700         * tree-data-ref.c: Include tree-eh.h.
19701         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
19703 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
19705         PR rtl-optimization/84123
19706         * combine.c (change_zero_ext): Check if hard register satisfies
19707         can_change_dest_mode before calling gen_lowpart_SUBREG.
19709 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
19711         PR target/82444
19712         * ira.c (ira_init_register_move_cost): Remove assert.
19714 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
19716         PR rtl-optimization/84071
19717         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
19718         * doc/tm.texi: Regenerate.
19720 2018-01-31  Richard Biener  <rguenther@suse.de>
19722         PR tree-optimization/84132
19723         * tree-data-ref.c (analyze_miv_subscript): Properly
19724         check whether evolution_function_is_affine_multivariate_p
19725         before calling gcd_of_steps_may_divide_p.
19727 2018-01-31  Julia Koval  <julia.koval@intel.com>
19729         PR target/83618
19730         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
19731         * config/i386/i386.md (rdpid_rex64) New.
19732         (rdpid): Make 32bit only.
19734 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
19736         PR lto/84105
19737         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
19738         an IDENTIFIER_NODE for FUNCTION_TYPE's.
19740 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
19742         Revert
19743         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
19745         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19747 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
19749         PR rtl-optimization/84071
19750         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
19751         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
19753 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
19755         * config/arc/arc.c (arc_handle_aux_attribute): New function.
19756         (arc_attribute_table): Add 'aux' attribute.
19757         (arc_in_small_data_p): Consider aux like variables.
19758         (arc_is_aux_reg_p): New function.
19759         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
19760         (arc_get_aux_arg): New function.
19761         (prepare_move_operands): Handle aux-register access.
19762         (arc_handle_aux_attribute): New function.
19763         * doc/extend.texi (ARC Variable attributes): Add subsection.
19765 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
19767         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
19768         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
19769         (arc_attribute_table): Add 'uncached' attribute.
19770         (arc_print_operand): Print '.di' flag for uncached memory
19771         accesses.
19772         (arc_in_small_data_p): Do not consider for small data the uncached
19773         types.
19774         (arc_is_uncached_mem_p): New function.
19775         * config/arc/predicates.md (compact_store_memory_operand): Check
19776         for uncached memory accesses.
19777         (nonvol_nonimm_operand): Likewise.
19778         * doc/extend.texi (ARC Type Attribute): New subsection.
19780 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
19782         PR c/84100
19783         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
19784         falign-loops=): Add Optimization flag.
19786 2018-01-30  Jeff Law  <law@redhat.com>
19788         PR target/84064
19789         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
19790         INT_REGISTERS_SAVED.  Check it prior to calling
19791         get_scratch_register_on_entry.
19792         (ix86_adjust_stack_and_probe): Similarly.
19793         (ix86_emit_probe_stack_range): Similarly.
19794         (ix86_expand_prologue): Corresponding changes.
19796 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19798         PR target/40411
19799         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
19800         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
19802 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
19804         PR target/84112
19805         * lra-constraints.c (curr_insn_transform): Process AND in the
19806         address.
19808 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
19810         PR rtl-optimization/83986
19811         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
19812         dependence against last_pending_memory_flush in addition to
19813         pending_jump_insns.
19815 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
19817         PR tree-optimization/81611
19818         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
19819         copies.
19821 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
19823         PR target/83758
19824         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
19825         a reg rtx.
19827 2018-01-30  Richard Biener  <rguenther@suse.de>
19828             Jakub Jelinek  <jakub@redhat.com>
19830         PR tree-optimization/84111
19831         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
19832         inner loops added during recursion, as they don't have up-to-date
19833         SSA form.
19835 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
19837         PR ipa/81360
19838         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
19839         (can_inline_edge_by_limits_p): ... here.
19840         (can_early_inline_edge_p, check_callers,
19841         update_caller_keys, update_callee_keys, recursive_inlining,
19842         add_new_edges_to_heap, speculation_useful_p,
19843         inline_small_functions,
19844         inline_small_functions, flatten_function,
19845         inline_to_all_callers_1): Update.
19847 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
19849         * profile-count.c (profile_count::combine_with_ipa_count): Handle
19850         zeros correctly.
19852 2018-01-30  Richard Biener  <rguenther@suse.de>
19854         PR tree-optimization/83008
19855         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
19856         invariant and constant vector uses in stmts when they need
19857         more than one stmt.
19859 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19861         PR bootstrap/84017
19862         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
19863         * configure: Regenerate.
19865 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
19867         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
19868         pattern.
19869         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
19870         Use gen_rtx_REG rather than gen_lowpart.
19872 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
19874         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
19875         rather than 0 when creating partial subregs.
19877 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
19879         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
19880         of usage.
19882 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
19884         PR target/81550
19885         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
19886         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
19887         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
19888         flags.  This restores the settings used before the 2017-07-24.
19889         Turning off pre increment/decrement/modify allows IVOPTS to
19890         optimize DF/SF loops where the index is an int.
19892 2018-01-29  Richard Biener  <rguenther@suse.de>
19893             Kelvin Nilsen  <kelvin@gcc.gnu.org>
19895         PR bootstrap/80867
19896         * tree-vect-stmts.c (vectorizable_call): Don't call
19897         targetm.vectorize_builtin_md_vectorized_function if callee is
19898         NULL.
19900 2018-01-22  Carl Love  <cel@us.ibm.com>
19902         * doc/extend.tex: Fix typo in second arg in
19903         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
19905 2018-01-29  Richard Biener  <rguenther@suse.de>
19907         PR tree-optimization/84086
19908         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
19909         (flush_ssaname_freelist): When SSA names were released reset
19910         the SCEV hash table.
19912 2018-01-29  Richard Biener  <rguenther@suse.de>
19914         PR tree-optimization/84057
19915         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
19916         removed paths when removing edges.
19918 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
19920         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
19921         -mfunction-return=@var{choice}.
19923 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
19925         PR diagnostic/84034
19926         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
19927         Handle CR like TAB.
19928         (layout::print_source_line): Likewise.
19929         (test_get_line_width_without_trailing_whitespace): Add test cases.
19931 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
19933         PR middle-end/84040
19934         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
19935         debug insns.
19937 2018-01-26  Jim Wilson  <jimw@sifive.com>
19939         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
19941         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
19942         specified.
19944 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19946         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
19947         and CMP + SUB-immediate -> SUBS.
19949 2018-01-26  Martin Sebor  <msebor@redhat.com>
19951         PR tree-optimization/83896
19952         * tree-ssa-strlen.c (get_string_len): Rename...
19953         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
19954         Avoid assuming length is constant.
19955         (handle_char_store): Use HOST_WIDE_INT for string length.
19957 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
19959         PR target/81763
19960         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
19961         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
19963 2018-01-26  Richard Biener  <rguenther@suse.de>
19965         PR rtl-optimization/84003
19966         * dse.c (record_store): Only record redundant stores when
19967         the earlier store aliases at least all accesses the later one does.
19969 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
19971         PR rtl-optimization/83985
19972         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
19973         REG_CFA_RESTORE insns.
19974         (delete_unmarked_insns): Don't ignore separate shrink wrapping
19975         REG_CFA_RESTORE insns here.
19977         PR c/83989
19978         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
19979         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
19981 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
19983         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
19984         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
19985         (arc_init): Likewise.
19986         (arc_override_options): Likewise.
19987         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
19988         value.
19989         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
19990         support.
19991         * config/arc/arc.h (TARGET_DBNZ): Define.
19992         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
19993         properly set the tune attribute.
19994         (dbnz): Use TARGET_DBNZ guard.
19995         * config/arc/arc.opt (mtune): Add core3 option.
19997 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
19999         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
20000         recognize new pic like addresses.
20001         (arc_delegitimize_address): Clean up.
20003 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
20005         * config/arc/arc-arches.def: Option mrf16 valid for all
20006         architectures.
20007         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
20008         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
20009         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
20010         * config/arc/arc-tables.opt: Regenerate.
20011         * config/arc/arc.c (arc_conditional_register_usage): Handle
20012         reduced register file case.
20013         (arc_file_start): Set must have build attributes.
20014         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
20015         mrf16 option value.
20016         * config/arc/arc.opt (mrf16): Add new option.
20017         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
20018         * config/arc/genmultilib.awk: Handle new mrf16 option.
20019         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
20020         * config/arc/t-multilib: Regenerate.
20021         * doc/invoke.texi (ARC Options): Document mrf16 option.
20023 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
20025         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
20026         * config/arc/arc.c (arc_handle_secure_attribute): New function.
20027         (arc_attribute_table): Add 'secure_call' attribute.
20028         (arc_print_operand): Print secure call operand.
20029         (arc_function_ok_for_sibcall): Don't optimize tail calls when
20030         secure.
20031         (arc_is_secure_call_p): New function.  * config/arc/arc.md
20032         (call_i): Add support for sjli instruction.
20033         (call_value_i): Likewise.
20034         * config/arc/constraints.md (Csc): New constraint.
20036 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
20037             John Eric Martin  <John.Martin@emmicro-us.com>
20039         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
20040         * config/arc/arc.c (_arc_jli_section): New struct.
20041         (arc_jli_section): New type.
20042         (rc_jli_sections): New static variable.
20043         (arc_handle_jli_attribute): New function.
20044         (arc_attribute_table): Add jli_always and jli_fixed attribute.
20045         (arc_file_end): New function.
20046         (TARGET_ASM_FILE_END): Define.
20047         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
20048         (arc_add_jli_section): New function.
20049         (jli_call_scan): Likewise.
20050         (arc_reorg): Call jli_call_scan.
20051         (arc_output_addsi): Remove 'S' from printing asm operand.
20052         (arc_is_jli_call_p): New function.
20053         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
20054         operand.
20055         (movhi_insn): Likewise.
20056         (movsi_insn): Likewise.
20057         (movsi_set_cc_insn): Likewise.
20058         (loadqi_update): Likewise.
20059         (load_zeroextendqisi_update): Likewise.
20060         (load_signextendqisi_update): Likewise.
20061         (loadhi_update): Likewise.
20062         (load_zeroextendhisi_update): Likewise.
20063         (load_signextendhisi_update): Likewise.
20064         (loadsi_update): Likewise.
20065         (loadsf_update): Likewise.
20066         (movsicc_insn): Likewise.
20067         (bset_insn): Likewise.
20068         (bxor_insn): Likewise.
20069         (bclr_insn): Likewise.
20070         (bmsk_insn): Likewise.
20071         (bicsi3_insn): Likewise.
20072         (cmpsi_cc_c_insn): Likewise.
20073         (movsi_ne): Likewise.
20074         (movsi_cond_exec): Likewise.
20075         (clrsbsi2): Likewise.
20076         (norm_f): Likewise.
20077         (normw): Likewise.
20078         (swap): Likewise.
20079         (divaw): Likewise.
20080         (flag): Likewise.
20081         (sr): Likewise.
20082         (kflag): Likewise.
20083         (ffs): Likewise.
20084         (ffs_f): Likewise.
20085         (fls): Likewise.
20086         (call_i): Remove 'S' asm letter, add jli instruction.
20087         (call_value_i): Likewise.
20088         * config/arc/arc.op (mjli-always): New option.
20089         * config/arc/constraints.md (Cji): New constraint.
20090         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
20091         operand.
20092         (subsf3_fpx): Likewise.
20093         (mulsf3_fpx): Likewise.
20094         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
20095         asm operand.
20096         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
20097         function attrbutes.
20098         * doc/invoke.texi (ARC): Document mjli-always option.
20100 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
20102         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
20103         avoid addition with 0 and use incw and decw where possible.
20105 2018-01-26  Richard Biener  <rguenther@suse.de>
20107         PR tree-optimization/81082
20108         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
20109         association if it requires casting to unsigned.
20110         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
20111         from fold_plusminus_mult_expr to catch important cases late when
20112         range info is available.
20114 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20116         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
20117         * configure.ac (hidden_linkonce): New test.
20118         * configure: Regenerate.
20119         * config.in: Regenerate.
20121 2018-01-26  Julia Koval  <julia.koval@intel.com>
20123         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
20124         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
20125         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
20126         _mm_mask_bitshuffle_epi64_mask): Fix type.
20127         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
20128         USI_FTYPE_V4DI_V4DI_USI): Remove.
20129         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
20130         __builtin_ia32_vpshufbitqmb256_mask,
20131         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
20132         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
20133         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
20135 2018-01-26  Alan Modra  <amodra@gmail.com>
20137         PR target/84033
20138         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
20139         UNSPEC_VBPERMQ.  Sort other unspecs.
20141 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
20143         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
20145 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
20147         PR middle-end/83055
20148         * predict.c (drop_profile): Do not push/pop cfun; update also
20149         node->count.
20150         (handle_missing_profiles): Fix logic looking for zero profiles.
20152 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
20154         PR middle-end/83977
20155         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
20156         on functions with #pragma omp declare simd or functions with simd
20157         attribute.
20158         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
20159         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
20160         Remove trailing \n from warning_at calls.
20162 2018-01-25  Tom de Vries  <tom@codesourcery.com>
20164         PR target/84028
20165         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20166         for neutered workers.
20168 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
20170         PR target/68467
20171         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
20172         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
20174 2018-01-24  Jeff Law  <law@redhat.com>
20176         PR target/83994
20177         * i386.c (get_probe_interval): Move to earlier point.
20178         (ix86_compute_frame_layout): If -fstack-clash-protection and
20179         the frame is larger than the probe interval, then use pushes
20180         to save registers rather than reg->mem moves.
20181         (ix86_expand_prologue): Remove conditional for int_registers_saved
20182         assertion.
20184 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
20186         PR target/84014
20187         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
20188         min/max for never referenced object.
20190 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
20192         PR middle-end/83977
20193         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
20194         here.
20195         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
20196         attributes from DECL_ATTRIBUTES (decl) without affecting
20197         DECL_ATTRIBUTES (current_function_decl).
20198         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
20199         functions with non-NULL DECL_ABSTRACT_ORIGIN.
20201 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
20203         PR tree-optimization/83979
20204         * fold-const.c (fold_comparison): Use constant_boolean_node
20205         instead of boolean_{true,false}_node.
20207 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
20209         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
20210         with zero counts.
20212 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20214         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20215         Simplify the clause that sets the length attribute.
20216         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20217         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
20218         clause that sets the length attribute.
20219         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20221 2018-01-24  Tom de Vries  <tom@codesourcery.com>
20223         PR target/83589
20224         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
20225         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
20226         Add strict parameter.
20227         (prevent_branch_around_nothing): Insert dummy insn between branch to
20228         label and label with no ptx insn inbetween.
20229         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
20231 2018-01-24  Tom de Vries  <tom@codesourcery.com>
20233         PR target/81352
20234         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20235         for neutered threads in warp.
20236         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
20238 2018-01-24  Richard Biener  <rguenther@suse.de>
20240         PR tree-optimization/83176
20241         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
20242         operands.
20244 2018-01-24  Richard Biener  <rguenther@suse.de>
20246         PR tree-optimization/82819
20247         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
20248         code generating pluses that are no-ops in the target precision.
20250 2018-01-24  Richard Biener  <rguenther@suse.de>
20252         PR middle-end/84000
20253         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
20255 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
20257         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
20258         to merge probabilities.
20259         * predict.c (probably_never_executed): Also mark as cold functions
20260         with global 0 profile and guessed local profile.
20261         * profile-count.c (profile_probability::combine_with_count): New
20262         member function.
20263         * profile-count.h (profile_probability::operator*,
20264         profile_probability::operator*=, profile_probability::operator/,
20265         profile_probability::operator/=): Reduce precision to adjusted
20266         and set value to guessed on contradictory divisions.
20267         (profile_probability::combine_with_freq): Remove.
20268         (profile_probability::combine_wiht_count): Declare.
20269         (profile_count::force_nonzero):: Set to adjusted.
20270         (profile_count::probability_in):: Set quality to adjusted.
20271         * tree-ssa-tail-merge.c (replace_block_by): Use
20272         combine_with_count.
20274 2018-01-23  Andrew Waterman  <andrew@sifive.com>
20275             Jim Wilson  <jimw@sifive.com>
20277         * config/riscv/riscv.c (riscv_stack_boundary): New.
20278         (riscv_option_override): Set riscv_stack_boundary.  Handle
20279         riscv_preferred_stack_boundary_arg.
20280         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
20281         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
20282         (STACK_BOUNDARY): Set to riscv_stack_boundary.
20283         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
20284         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
20285         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
20287 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
20289         PR target/83905
20290         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
20291         of struct ix86_frame.
20292         (ix86_expand_epilogue): Likewise.  Add a local variable for
20293         the reg_save_offset field in struct ix86_frame.
20295 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
20297         PR tree-optimization/82604
20298         * tree-loop-distribution.c (enum partition_kind): New enum item
20299         PKIND_PARTIAL_MEMSET.
20300         (partition_builtin_p): Support above new enum item.
20301         (generate_code_for_partition): Ditto.
20302         (compute_access_range): Differentiate cases that equality can be
20303         proven at all loops, the innermost loops or no loops.
20304         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
20305         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
20306         (finalize_partitions, distribute_loop): Don't fuse partition of
20307         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
20308         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
20309         parloop is enabled.
20311 2018-01-23  Martin Liska  <mliska@suse.cz>
20313         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
20314         order to ignore the predictor.
20315         (PRED_POLYMORPHIC_CALL): Likewise.
20316         (PRED_RECURSIVE_CALL): Likewise.
20318 2018-01-23  Martin Liska  <mliska@suse.cz>
20320         * tree-profile.c (tree_profiling): Print function header to
20321         aware reader which function we are working on.
20322         * value-prof.c (gimple_find_values_to_profile): Do not print
20323         not interesting value histograms.
20325 2018-01-23  Martin Liska  <mliska@suse.cz>
20327         * profile-count.h (enum profile_quality): Add
20328         profile_uninitialized as the first value. Do not number values
20329         as they are zero based.
20330         (profile_count::verify): Update sanity check.
20331         (profile_probability::verify): Likewise.
20333 2018-01-23  Nathan Sidwell  <nathan@acm.org>
20335         * doc/invoke.texi (ffor-scope): Deprecate.
20337 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
20339         PR tree-optimization/83510
20340         * domwalk.c (set_all_edges_as_executable): New function.
20341         (dom_walker::dom_walker): Convert bool param
20342         "skip_unreachable_blocks" to enum reachability.  Move setup of
20343         edge flags to set_all_edges_as_executable and only do it when
20344         reachability is REACHABLE_BLOCKS.
20345         * domwalk.h (enum dom_walker::reachability): New enum.
20346         (dom_walker::dom_walker): Convert bool param
20347         "skip_unreachable_blocks" to enum reachability.
20348         (set_all_edges_as_executable): New decl.
20349         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
20350         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
20351         "reachability".
20352         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
20353         but converting true to REACHABLE_BLOCKS.
20354         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
20355         * tree-vrp.c
20356         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
20357         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
20358         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
20359         REACHABLE_BLOCKS.
20360         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
20361         if check_all_array_refs will be called.
20363 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
20365         * tree.c (selftest::test_location_wrappers): Add more test
20366         coverage.
20368 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
20370         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
20371         (selftest::test_bit_in_range): Likewise.
20373 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
20375         PR testsuite/83888
20376         * doc/sourcebuild.texi (vect_float): Say that the selector
20377         only describes the situation when -funsafe-math-optimizations is on.
20378         (vect_float_strict): Document.
20380 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
20382         PR tree-optimization/83965
20383         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
20384         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
20385         instead of checking only for a reduction.
20386         (vect_recog_widen_sum_pattern): Likewise.
20388 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
20390         * predict.c (probably_never_executed): Only use precise profile info.
20391         (compute_function_frequency): Skip after inlining hack since we now
20392         have quality checking.
20394 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
20396         * profile-count.h (profile_probability::very_unlikely,
20397         profile_probability::unlikely, profile_probability::even): Set
20398         precision to guessed.
20400 2018-01-23  Richard Biener  <rguenther@suse.de>
20402         PR tree-optimization/83963
20403         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
20404         Properly terminate dominator walk when crossing the exit edge not
20405         when visiting its source block.
20407 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
20409         PR c++/83918
20410         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
20411         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
20413 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
20415         PR tree-optimization/83957
20416         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
20417         semicolon after for body surrounded by braces.
20419         PR tree-optimization/83081
20420         * profile-count.h (profile_probability::split): New method.
20421         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
20422         Use profile_probability::split.
20423         (do_compare_rtx_and_jump): Fix adjustment of probabilities
20424         when splitting a single conditional jump into 2.
20426 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
20428         PR tree-optimization/69452
20429         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
20430         decl.
20432 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20434         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
20435         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
20436         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
20438 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20440         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
20441         declaration.
20442         * config/rl78/rl78.md (movdi): New define_expand.
20443         * config/rl78/rl78.c (rl78_split_movdi): New function.
20445 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
20447         PR target/83862
20448         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
20449         no longer used.
20450         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
20451         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
20452         128-bit to produce an UNSPEC move to get the double word with the
20453         signbit and then a shift directly to do signbit.
20454         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
20455         implementation with a new version that just does either a direct
20456         move or a regular move.  Move memory interface to separate insns.
20457         Move insns so they are next to the expander.
20458         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
20459         with signbit move.  Split big and little endian case.
20460         (signbit<mode>2_dm_mem_le): Likewise.
20461         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
20462         (signbit<mode>2_dm2): Likewise.
20464 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20466         * config/rl78/rl78.md (anddi3): New define_expand.
20468 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20470         * config/rl78/rl78.md (umindi3): New define_expand.
20472 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20474         * config/rl78/rl78.md (smindi3): New define_expand.
20476 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20478         * config/rl78/rl78.md (smaxdi3): New define_expand.
20480 2018-01-22  Carl Love  <cel@us.ibm.com>
20482         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
20483         LVX_V1TI): Add macro expansion.
20484         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
20485         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
20486         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
20487         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
20488         Change check to determine if the instruction is a byte reversing
20489         entry.  Fix typo in comment.
20490         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
20491         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
20492         Add def_builtin calls for new builtins.
20493         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
20494         Add define_insn expansion.
20496 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20498         * config/rl78/rl78.md (umaxdi3): New define_expand.
20500 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20502         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
20503         for non-QImode registers.
20505 2018-01-22  Richard Biener  <rguenther@suse.de>
20507         PR tree-optimization/83963
20508         * graphite-scop-detection.c (scop_detection::get_sese): Delay
20509         including the loop exit block.
20510         (scop_detection::merge_sese): Likewise.
20511         (scop_detection::add_scop): Do it here instead.
20513 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20515         * doc/sourcebuild.texi (arm_softfloat): Document.
20517 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
20519         PR gcc/77734
20520         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
20521         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
20522         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
20524 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20525             David Edelsohn  <dje.gcc@gmail.com>
20527         PR target/83946
20528         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20529         Change "crset eq" to "crset 2".
20530         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20531         (*call_indirect_aix<mode>_nospec): Likewise.
20532         (*call_value_indirect_aix<mode>_nospec): Likewise.
20533         (*call_indirect_elfv2<mode>_nospec): Likewise.
20534         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
20535         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
20536         change assembly output from . to $.
20537         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20538         (indirect_jump<mode>_nospec): Change assembly output from . to $.
20539         (*tablejump<mode>_internal1_nospec): Likewise.
20541 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
20543         PR target/80870
20544         * config/sh/sh_optimize_sett_clrt.cc:
20545         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
20547 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
20549         PR tree-optimization/83940
20550         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
20551         offset_dt to vect_constant_def rather than vect_unknown_def_type.
20552         (vect_check_load_store_mask): Add a mask_dt_out parameter and
20553         use it to pass back the definition type.
20554         (vect_check_store_rhs): Likewise rhs_dt_out.
20555         (vect_build_gather_load_calls): Add a mask_dt argument and use
20556         it instead of a call to vect_is_simple_use.
20557         (vectorizable_store): Update calls to vect_check_load_store_mask
20558         and vect_check_store_rhs.  Use the dt returned by the latter instead
20559         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
20560         instead of calls to vect_is_simple_use.  Pass the scalar rather
20561         than the vector operand to vect_is_simple_use when handling
20562         second and subsequent copies of an rhs value.
20563         (vectorizable_load): Update calls to vect_check_load_store_mask
20564         and vect_build_gather_load_calls.  Use the cached mask_dt and
20565         gs_info.offset_dt instead of calls to vect_is_simple_use.
20567 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
20569         PR middle-end/83945
20570         * tree-emutls.c: Include gimplify.h.
20571         (lower_emutls_2): New function.
20572         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
20573         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
20574         it before further processing.
20576         PR target/83930
20577         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
20578         UINTVAL (trueop1) instead of INTVAL (op1).
20580 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
20582         PR debug/81570
20583         PR debug/83728
20584         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
20585         INCOMING_FRAME_SP_OFFSET if not defined.
20586         (scan_trace): Add ENTRY argument.  If true and
20587         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
20588         emit a note to adjust the CFA offset.
20589         (create_cfi_notes): Adjust scan_trace callers.
20590         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
20591         INCOMING_FRAME_SP_OFFSET in the CIE.
20592         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
20593         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
20594         Likewise.
20595         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
20596         * doc/tm.texi: Regenerated.
20598 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
20600         PR rtl-optimization/83147
20601         * lra-constraints.c (remove_inheritance_pseudos): Use
20602         lra_substitute_pseudo_within_insn.
20604 2018-01-19  Tom de Vries  <tom@codesourcery.com>
20605             Cesar Philippidis  <cesar@codesourcery.com>
20607         PR target/83920
20608         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
20610 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
20612         PR target/83790
20613         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
20614         spaces for function labels.
20616 2018-01-19  Martin Liska  <mliska@suse.cz>
20618         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
20619         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
20620         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
20621         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
20622         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
20623         (PRED_CONST_RETURN): Change from 69 to 65.
20624         (PRED_NULL_RETURN): Change from 91 to 71.
20625         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
20626         (PRED_LOOP_GUARD): Change from 66 to 73.
20628 2018-01-19  Martin Liska  <mliska@suse.cz>
20630         * predict.c (predict_insn_def): Add new assert.
20631         (struct branch_predictor): Change type to signed integer.
20632         (test_prediction_value_range): Amend test to cover
20633         PROB_UNINITIALIZED.
20634         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
20635         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
20636         (PRED_LOOP_ITERATIONS_MAX): Likewise.
20637         (PRED_LOOP_IV_COMPARE): Likewise.
20638         * predict.h (PROB_UNINITIALIZED): Define new constant.
20640 2018-01-19  Martin Liska  <mliska@suse.cz>
20642         * predict.c (dump_prediction): Add new format for
20643         analyze_brprob.py script which is enabled with -details
20644         suboption.
20645         * profile-count.h (precise_p): New function.
20647 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
20649         PR tree-optimization/83922
20650         * tree-vect-loop.c (vect_verify_full_masking): Return false if
20651         there are no statements that need masking.
20652         (vect_active_double_reduction_p): New function.
20653         (vect_analyze_loop_operations): Use it when handling phis that
20654         are not in the loop header.
20656 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
20658         PR tree-optimization/83914
20659         * tree-vect-loop.c (vectorizable_induction): Don't convert
20660         init_expr or apply the peeling adjustment for inductions
20661         that are nested within the vectorized loop.
20663 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20665         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
20666         instead of NEG.
20668 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
20670         PR sanitizer/81715
20671         PR testsuite/83882
20672         * function.h (gimplify_parameters): Add gimple_seq * argument.
20673         * function.c: Include gimple.h and options.h.
20674         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
20675         for the added local temporaries if needed.
20676         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
20677         if there are any parameter cleanups, wrap whole body into a
20678         try/finally with the cleanups.
20680 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
20682         PR target/82964
20683         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
20684         Use GET_MODE_CLASS for scalar floating point.
20686 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
20688         PR ipa/82256
20689         patch by PaX Team
20690         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
20691         Fix call of call_cgraph_insertion_hooks.
20693 2018-01-18  Martin Sebor  <msebor@redhat.com>
20695         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
20697 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
20699         PR ipa/83619
20700         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
20701         frequencies.
20703 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
20705         PR other/70268
20706         * common.opt: (-ffile-prefix-map): New option.
20707         * opts.c (common_handle_option): Defer it.
20708         * opts-global.c (handle_common_deferred_options): Handle it.
20709         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
20710         * file-prefix-map.h: New file.
20711         (remap_debug_filename, add_debug_prefix_map): ...here.
20712         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
20713         * final.c (debug_prefix_map, add_debug_prefix_map
20714         remap_debug_filename): Move to...
20715         * file-prefix-map.c: New file.
20716         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
20717         generalize, get rid of alloca(), use strrchr() instead of strchr().
20718         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
20719         Implement in terms of add_prefix_map().
20720         (remap_macro_filename, remap_debug_filename): Implement in term of
20721         remap_filename().
20722         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
20723         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
20724         * dbxout.c: Include file-prefix-map.h.
20725         * varasm.c: Likewise.
20726         * vmsdbgout.c: Likewise.
20727         * xcoffout.c: Likewise.
20728         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
20729         * doc/cppopts.texi (-fmacro-prefix-map): Document.
20730         * doc/invoke.texi (-ffile-prefix-map): Document.
20731         (-fdebug-prefix-map): Update description.
20733 2018-01-18  Martin Liska  <mliska@suse.cz>
20735         * config/i386/i386.c (indirect_thunk_name): Document that also
20736         lfence is emitted.
20737         (output_indirect_thunk): Document why both instructions
20738         (pause and lfence) are generated.
20740 2018-01-18  Richard Biener  <rguenther@suse.de>
20742         PR tree-optimization/83887
20743         * graphite-scop-detection.c
20744         (scop_detection::get_nearest_dom_with_single_entry): Remove.
20745         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
20746         (scop_detection::merge_sese): Re-implement with a flood-fill
20747         algorithm that properly finds a SESE region if it exists.
20749 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
20751         PR c/61240
20752         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
20753         pointer_diff optimizations use view_convert instead of convert.
20755 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20757         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20758         Generate different code for -mno-speculate-indirect-jumps.
20759         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20760         (*call_indirect_aix<mode>): Disable for
20761         -mno-speculate-indirect-jumps.
20762         (*call_indirect_aix<mode>_nospec): New define_insn.
20763         (*call_value_indirect_aix<mode>): Disable for
20764         -mno-speculate-indirect-jumps.
20765         (*call_value_indirect_aix<mode>_nospec): New define_insn.
20766         (*sibcall_nonlocal_sysv<mode>): Generate different code for
20767         -mno-speculate-indirect-jumps.
20768         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20770 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
20772         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
20773         long double type, set the flags for noting the default long double
20774         type, even if we don't pass or return a long double type.
20776 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
20778         PR ipa/83051
20779         * ipa-inline.c (flatten_function): Do not overwrite final inlining
20780         failure.
20782 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
20784         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
20785         support for merge[hl].
20786         (fold_mergehl_helper): New helper function.
20787         (tree-vector-builder.h): New #include for tree_vector_builder usage.
20788         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
20789         (altivec_vmrglw_direct): Add xxmrglw insn.
20791 2018-01-17  Andrew Waterman  <andrew@sifive.com>
20793         * config/riscv/riscv.c (riscv_conditional_register_usage): If
20794         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
20796 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
20798         PR lto/83121
20799         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
20800         call the lto_location_cache before reading the
20801         DECL_SOURCE_LOCATION of the types.
20803 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
20804             Richard Sandiford  <richard.sandiford@linaro.org>
20806         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
20807         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
20808         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
20809         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
20810         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
20811         Add declaration.
20812         * config/aarch64/constraints.md (aarch64_movti_operand):
20813         Limit immediates.
20814         * config/aarch64/predicates.md (Uti): Add new constraint.
20816 2018-01-17  Carl Love  <cel@us.ibm.com>
20818         * config/rs6000/vsx.md (define_expand xl_len_r,
20819         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
20820         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
20821         lxvll.
20822         (define_expand, define_insn): Move the shift left from  the
20823         define_insn to the define_expand for lxvl and stxvl instructions.
20824         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
20825         and XL_LEN_R definitions to PURE.
20827 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
20829         * config/i386/i386.c (indirect_thunk_name): Declare regno
20830         as unsigned int.  Compare regno with INVALID_REGNUM.
20831         (output_indirect_thunk): Ditto.
20832         (output_indirect_thunk_function): Ditto.
20833         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
20834         in the call to output_indirect_thunk_function.
20836 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
20838         PR middle-end/83884
20839         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
20840         rather than the size of inner_type to determine the stack slot size
20841         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
20843 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
20845         PR target/83546
20846         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
20847         to PTA_SILVERMONT.
20849 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
20851         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
20852         endian Linux systems to optionally enable multilibs for selecting
20853         the long double type if the user configured an explicit type.
20854         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
20855         have no long double multilibs if not defined.
20856         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
20857         warn if the user used -mabi={ieee,ibm}longdouble and we built
20858         multilibs for long double.
20859         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
20860         appropriate multilib option.
20861         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
20862         multilib options.
20863         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
20864         for building long double multilibs.
20865         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
20867 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
20869         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
20870         copies.
20872         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
20873         64 bits.
20874         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
20875         128 bits.
20877         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
20878         variables.
20880         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
20881         return value.
20883 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
20885         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
20886         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
20888 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20890         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
20891         different rtl trees depending on TARGET_64BIT.
20892         (rs6000_gen_lvx): Likewise.
20894 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
20896         * config/visium/visium.md (nop): Tweak comment.
20897         (hazard_nop): Likewise.
20899 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20901         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
20902         -mspeculate-indirect-jumps.
20903         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
20904         for -mno-speculate-indirect-jumps.
20905         (*call_indirect_elfv2<mode>_nospec): New define_insn.
20906         (*call_value_indirect_elfv2<mode>): Disable for
20907         -mno-speculate-indirect-jumps.
20908         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
20909         (indirect_jump): Emit different RTL for
20910         -mno-speculate-indirect-jumps.
20911         (*indirect_jump<mode>): Disable for
20912         -mno-speculate-indirect-jumps.
20913         (*indirect_jump<mode>_nospec): New define_insn.
20914         (tablejump): Emit different RTL for
20915         -mno-speculate-indirect-jumps.
20916         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
20917         (tablejumpsi_nospec): New define_expand.
20918         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
20919         (tablejumpdi_nospec): New define_expand.
20920         (*tablejump<mode>_internal1): Disable for
20921         -mno-speculate-indirect-jumps.
20922         (*tablejump<mode>_internal1_nospec): New define_insn.
20923         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
20924         option.
20926 2018-01-16  Artyom Skrobov tyomitch@gmail.com
20928         * caller-save.c (insert_save): Drop unnecessary parameter.  All
20929         callers updated.
20931 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
20932             Richard Biener  <rguenth@suse.de>
20934         PR libgomp/83590
20935         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
20936         return early, inline manually is_gimple_sizepos.  Make sure if we
20937         call gimplify_expr we don't end up with a gimple constant.
20938         * tree.c (variably_modified_type_p): Don't return true for
20939         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
20940         * gimplify.h (is_gimple_sizepos): Remove.
20942 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
20944         PR tree-optimization/83857
20945         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
20946         vectorizable_live_operation for pure SLP statements.
20947         (vectorizable_live_operation): Handle PHIs.
20949 2018-01-16  Richard Biener  <rguenther@suse.de>
20951         PR tree-optimization/83867
20952         * tree-vect-stmts.c (vect_transform_stmt): Precompute
20953         nested_in_vect_loop_p since the scalar stmt may get invalidated.
20955 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
20957         PR c/83844
20958         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
20959         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
20960         If off is not INTEGER_CST, issue a may not be aligned warning
20961         rather than isn't aligned.  Use isn%'t rather than isn't.
20962         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
20963         into MULT_EXPR.
20964         <case MULT_EXPR>: Improve the case when bottom and one of the
20965         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
20966         operand, in that case check if the other operand is multiple of
20967         bottom divided by the INTEGER_CST operand.
20969 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
20971         PR target/83858
20972         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
20973         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
20974         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
20975         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
20976         * config/pa/pa.c (pa_function_arg_advance): Likewise.
20977         (pa_function_arg, pa_arg_partial_bytes): Likewise.
20978         (pa_function_arg_size): New function.
20980 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
20982         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
20983         in a separate statement.
20985 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
20987         PR tree-optimization/83847
20988         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
20989         group gathers and scatters.
20991 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
20993         PR rtl-optimization/86620
20994         * params.def (max-sched-ready-insns): Bump minimum value to 1.
20996         PR rtl-optimization/83213
20997         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
20998         to last if both are JUMP_INSNs.
21000         PR tree-optimization/83843
21001         * gimple-ssa-store-merging.c
21002         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
21003         store_immediate_info for bswap/nop orig_stores.
21005 2018-01-15  Andrew Waterman  <andrew@sifive.com>
21007         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
21008         !TARGET_MUL.
21009         <UDIV>: Increase cost if !TARGET_DIV.
21011 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
21013         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
21014         (define_attr "cr_logical_3op"): New.
21015         (cceq_ior_compare): Adjust.
21016         (cceq_ior_compare_complement): Adjust.
21017         (*cceq_rev_compare): Adjust.
21018         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
21019         (is_cracked_insn): Adjust.
21020         (insn_must_be_first_in_group): Adjust.
21021         * config/rs6000/40x.md: Adjust.
21022         * config/rs6000/440.md: Adjust.
21023         * config/rs6000/476.md: Adjust.
21024         * config/rs6000/601.md: Adjust.
21025         * config/rs6000/603.md: Adjust.
21026         * config/rs6000/6xx.md: Adjust.
21027         * config/rs6000/7450.md: Adjust.
21028         * config/rs6000/7xx.md: Adjust.
21029         * config/rs6000/8540.md: Adjust.
21030         * config/rs6000/cell.md: Adjust.
21031         * config/rs6000/e300c2c3.md: Adjust.
21032         * config/rs6000/e500mc.md: Adjust.
21033         * config/rs6000/e500mc64.md: Adjust.
21034         * config/rs6000/e5500.md: Adjust.
21035         * config/rs6000/e6500.md: Adjust.
21036         * config/rs6000/mpc.md: Adjust.
21037         * config/rs6000/power4.md: Adjust.
21038         * config/rs6000/power5.md: Adjust.
21039         * config/rs6000/power6.md: Adjust.
21040         * config/rs6000/power7.md: Adjust.
21041         * config/rs6000/power8.md: Adjust.
21042         * config/rs6000/power9.md: Adjust.
21043         * config/rs6000/rs64.md: Adjust.
21044         * config/rs6000/titan.md: Adjust.
21046 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
21048         * config/i386/predicates.md (indirect_branch_operand): Rewrite
21049         ix86_indirect_branch_register logic.
21051 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
21053         * config/i386/constraints.md (Bs): Update
21054         ix86_indirect_branch_register check.  Don't check
21055         ix86_indirect_branch_register with GOT_memory_operand.
21056         (Bw): Likewise.
21057         * config/i386/predicates.md (GOT_memory_operand): Don't check
21058         ix86_indirect_branch_register here.
21059         (GOT32_symbol_operand): Likewise.
21061 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
21063         * config/i386/predicates.md (constant_call_address_operand):
21064         Rewrite ix86_indirect_branch_register logic.
21065         (sibcall_insn_operand): Likewise.
21067 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
21069         * config/i386/constraints.md (Bs): Replace
21070         ix86_indirect_branch_thunk_register with
21071         ix86_indirect_branch_register.
21072         (Bw): Likewise.
21073         * config/i386/i386.md (indirect_jump): Likewise.
21074         (tablejump): Likewise.
21075         (*sibcall_memory): Likewise.
21076         (*sibcall_value_memory): Likewise.
21077         Peepholes of indirect call and jump via memory: Likewise.
21078         * config/i386/i386.opt: Likewise.
21079         * config/i386/predicates.md (indirect_branch_operand): Likewise.
21080         (GOT_memory_operand): Likewise.
21081         (call_insn_operand): Likewise.
21082         (sibcall_insn_operand): Likewise.
21083         (GOT32_symbol_operand): Likewise.
21085 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
21087         PR middle-end/83837
21088         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
21089         type rather than type addr's type points to.
21090         (expand_omp_atomic_mutex): Likewise.
21091         (expand_omp_atomic): Likewise.
21093 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
21095         PR target/83839
21096         * config/i386/i386.c (output_indirect_thunk_function): Use
21097         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
21098         for  __x86_return_thunk.
21100 2018-01-15  Richard Biener  <rguenther@suse.de>
21102         PR middle-end/83850
21103         * expmed.c (extract_bit_field_1): Fix typo.
21105 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21107         PR target/83687
21108         * config/arm/iterators.md (VF): New mode iterator.
21109         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
21110         Remove integer-related logic from pattern.
21111         (neon_vabd<mode>_3): Likewise.
21113 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
21115         PR middle-end/82694
21116         * common.opt (fstrict-overflow): No longer an alias.
21117         (fwrapv-pointer): New option.
21118         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
21119         also for pointer types based on flag_wrapv_pointer.
21120         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
21121         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
21122         opts->x_flag_wrapv got set.
21123         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
21124         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
21125         POINTER_TYPE_OVERFLOW_UNDEFINED.
21126         * match.pd: Likewise in address comparison pattern.
21127         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
21129 2018-01-15  Richard Biener  <rguenther@suse.de>
21131         PR lto/83804
21132         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
21133         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
21134         Reset type names to their identifier if their TYPE_DECL doesn't
21135         have linkage (and thus is used for ODR and devirt).
21136         (save_debug_info_for_decl): Remove.
21137         (save_debug_info_for_type): Likewise.
21138         (add_tree_to_fld_list): Adjust.
21139         * tree-pretty-print.c (dump_generic_node): Make dumping of
21140         type names more robust.
21142 2018-01-15  Richard Biener  <rguenther@suse.de>
21144         * BASE-VER: Bump to 8.0.1.
21146 2018-01-14  Martin Sebor  <msebor@redhat.com>
21148         PR other/83508
21149         * builtins.c (check_access): Avoid warning when the no-warning bit
21150         is set.
21152 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
21154         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
21155         * ira-color (allocno_hard_regs_compare): Likewise.
21157 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
21159         PR target/83013
21160         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
21161         Use .pushsection/.popsection.
21163 2018-01-14  Martin Sebor  <msebor@redhat.com>
21165         PR c++/81327
21166         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
21168 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
21170         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
21171         entry from extra_headers.
21172         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
21173         extra_headers, make the list bitwise identical to the i?86-*-* one.
21175 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
21177         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
21178         -mcmodel=large with -mindirect-branch=thunk,
21179         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
21180         -mfunction-return=thunk-extern.
21181         * doc/invoke.texi: Document -mcmodel=large is incompatible with
21182         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
21183         -mfunction-return=thunk and -mfunction-return=thunk-extern.
21185 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
21187         * config/i386/i386.c (print_reg): Print the name of the full
21188         integer register without '%'.
21189         (ix86_print_operand): Handle 'V'.
21190         * doc/extend.texi: Document 'V' modifier.
21192 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
21194         * config/i386/constraints.md (Bs): Disallow memory operand for
21195         -mindirect-branch-register.
21196         (Bw): Likewise.
21197         * config/i386/predicates.md (indirect_branch_operand): Likewise.
21198         (GOT_memory_operand): Likewise.
21199         (call_insn_operand): Likewise.
21200         (sibcall_insn_operand): Likewise.
21201         (GOT32_symbol_operand): Likewise.
21202         * config/i386/i386.md (indirect_jump): Call convert_memory_address
21203         for -mindirect-branch-register.
21204         (tablejump): Likewise.
21205         (*sibcall_memory): Likewise.
21206         (*sibcall_value_memory): Likewise.
21207         Disallow peepholes of indirect call and jump via memory for
21208         -mindirect-branch-register.
21209         (*call_pop): Replace m with Bw.
21210         (*call_value_pop): Likewise.
21211         (*sibcall_pop_memory): Replace m with Bs.
21212         * config/i386/i386.opt (mindirect-branch-register): New option.
21213         * doc/invoke.texi: Document -mindirect-branch-register option.
21215 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
21217         * config/i386/i386-protos.h (ix86_output_function_return): New.
21218         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
21219         set function_return_type.
21220         (indirect_thunk_name): Add ret_p to indicate thunk for function
21221         return.
21222         (output_indirect_thunk_function): Pass false to
21223         indirect_thunk_name.
21224         (ix86_output_indirect_branch_via_reg): Likewise.
21225         (ix86_output_indirect_branch_via_push): Likewise.
21226         (output_indirect_thunk_function): Create alias for function
21227         return thunk if regno < 0.
21228         (ix86_output_function_return): New function.
21229         (ix86_handle_fndecl_attribute): Handle function_return.
21230         (ix86_attribute_table): Add function_return.
21231         * config/i386/i386.h (machine_function): Add
21232         function_return_type.
21233         * config/i386/i386.md (simple_return_internal): Use
21234         ix86_output_function_return.
21235         (simple_return_internal_long): Likewise.
21236         * config/i386/i386.opt (mfunction-return=): New option.
21237         (indirect_branch): Mention -mfunction-return=.
21238         * doc/extend.texi: Document function_return function attribute.
21239         * doc/invoke.texi: Document -mfunction-return= option.
21241 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
21243         * config/i386/i386-opts.h (indirect_branch): New.
21244         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
21245         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
21246         with local indirect jump when converting indirect call and jump.
21247         (ix86_set_indirect_branch_type): New.
21248         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
21249         (indirectlabelno): New.
21250         (indirect_thunk_needed): Likewise.
21251         (indirect_thunk_bnd_needed): Likewise.
21252         (indirect_thunks_used): Likewise.
21253         (indirect_thunks_bnd_used): Likewise.
21254         (INDIRECT_LABEL): Likewise.
21255         (indirect_thunk_name): Likewise.
21256         (output_indirect_thunk): Likewise.
21257         (output_indirect_thunk_function): Likewise.
21258         (ix86_output_indirect_branch_via_reg): Likewise.
21259         (ix86_output_indirect_branch_via_push): Likewise.
21260         (ix86_output_indirect_branch): Likewise.
21261         (ix86_output_indirect_jmp): Likewise.
21262         (ix86_code_end): Call output_indirect_thunk_function if needed.
21263         (ix86_output_call_insn): Call ix86_output_indirect_branch if
21264         needed.
21265         (ix86_handle_fndecl_attribute): Handle indirect_branch.
21266         (ix86_attribute_table): Add indirect_branch.
21267         * config/i386/i386.h (machine_function): Add indirect_branch_type
21268         and has_local_indirect_jump.
21269         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
21270         to true.
21271         (tablejump): Likewise.
21272         (*indirect_jump): Use ix86_output_indirect_jmp.
21273         (*tablejump_1): Likewise.
21274         (simple_return_indirect_internal): Likewise.
21275         * config/i386/i386.opt (mindirect-branch=): New option.
21276         (indirect_branch): New.
21277         (keep): Likewise.
21278         (thunk): Likewise.
21279         (thunk-inline): Likewise.
21280         (thunk-extern): Likewise.
21281         * doc/extend.texi: Document indirect_branch function attribute.
21282         * doc/invoke.texi: Document -mindirect-branch= option.
21284 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
21286         PR ipa/83051
21287         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
21289 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
21291         * ipa-inline.c (want_inline_small_function_p): Return false if
21292         inlining has already failed with CIF_FINAL_ERROR.
21293         (update_caller_keys): Call want_inline_small_function_p before
21294         can_inline_edge_p.
21295         (update_callee_keys): Likewise.
21297 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
21299         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
21300         New function.
21301         (rs6000_quadword_masked_address_p): Likewise.
21302         (quad_aligned_load_p): Likewise.
21303         (quad_aligned_store_p): Likewise.
21304         (const_load_sequence_p): Add comment to describe the outer-most loop.
21305         (mimic_memory_attributes_and_flags): New function.
21306         (rs6000_gen_stvx): Likewise.
21307         (replace_swapped_aligned_store): Likewise.
21308         (rs6000_gen_lvx): Likewise.
21309         (replace_swapped_aligned_load): Likewise.
21310         (replace_swapped_load_constant): Capitalize argument name in
21311         comment describing this function.
21312         (rs6000_analyze_swaps): Add a third pass to search for vector loads
21313         and stores that access quad-word aligned addresses and replace
21314         with stvx or lvx instructions when appropriate.
21315         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
21316         New function prototype.
21317         (rs6000_quadword_masked_address_p): Likewise.
21318         (rs6000_gen_lvx): Likewise.
21319         (rs6000_gen_stvx): Likewise.
21320         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
21321         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
21322         when memory address is aligned.
21323         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
21324         this split to select lvx instruction when memory address is aligned.
21325         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
21326         instruction when memory address is aligned.
21327         (*vsx_le_perm_load_v16qi): Likewise.
21328         (four unnamed splitters): Modify to select the stvx instruction
21329         when memory is aligned.
21331 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
21333         * predict.c (determine_unlikely_bbs): Handle correctly BBs
21334         which appears in the queue multiple times.
21336 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21337             Alan Hayward  <alan.hayward@arm.com>
21338             David Sherwood  <david.sherwood@arm.com>
21340         * tree-vectorizer.h (vec_lower_bound): New structure.
21341         (_loop_vec_info): Add check_nonzero and lower_bounds.
21342         (LOOP_VINFO_CHECK_NONZERO): New macro.
21343         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
21344         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
21345         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
21346         fields.  Make seg_len the distance travelled, not including the
21347         access size.
21348         (dr_direction_indicator): Declare.
21349         (dr_zero_step_indicator): Likewise.
21350         (dr_known_forward_stride_p): Likewise.
21351         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
21352         tree-ssanames.h.
21353         (runtime_alias_check_p): Allow runtime alias checks with
21354         variable strides.
21355         (operator ==): Compare access_size and align.
21356         (prune_runtime_alias_test_list): Rework for new distinction between
21357         the access_size and seg_len.
21358         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
21359         segment lengths.
21360         (get_segment_min_max): New function.
21361         (create_intersect_range_checks): Use it.
21362         (dr_step_indicator): New function.
21363         (dr_direction_indicator): Likewise.
21364         (dr_zero_step_indicator): Likewise.
21365         (dr_known_forward_stride_p): Likewise.
21366         * tree-loop-distribution.c (data_ref_segment_size): Return
21367         DR_STEP * (niters - 1).
21368         (compute_alias_check_pairs): Update call to the dr_with_seg_len
21369         constructor.
21370         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
21371         (vect_preserves_scalar_order_p): New function, split out from...
21372         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
21373         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
21374         (vect_vfa_access_size): New function.
21375         (vect_vfa_align): Likewise.
21376         (vect_compile_time_alias): Take access_size_a and access_b arguments.
21377         (dump_lower_bound): New function.
21378         (vect_check_lower_bound): Likewise.
21379         (vect_small_gap_p): Likewise.
21380         (vectorizable_with_step_bound_p): Likewise.
21381         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
21382         depencies if the vectorization factor is 1.  Convert the checks
21383         for nonzero steps into checks on the bounds of DR_STEP.  Try using
21384         a bunds check for variable steps if the minimum required step is
21385         relatively small. Update calls to the dr_with_seg_len
21386         constructor and to vect_compile_time_alias.
21387         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
21388         function.
21389         (vect_loop_versioning): Call it.
21390         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
21391         when retrying.
21392         (vect_estimate_min_profitable_iters): Account for any bounds checks.
21394 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21395             Alan Hayward  <alan.hayward@arm.com>
21396             David Sherwood  <david.sherwood@arm.com>
21398         * doc/sourcebuild.texi (vect_scatter_store): Document.
21399         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
21400         optabs.
21401         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
21402         Document.
21403         * genopinit.c (main): Add supports_vec_scatter_store and
21404         supports_vec_scatter_store_cached to target_optabs.
21405         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
21406         IFN_MASK_SCATTER_STORE.
21407         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
21408         functions.
21409         * internal-fn.h (internal_store_fn_p): Declare.
21410         (internal_fn_stored_value_index): Likewise.
21411         * internal-fn.c (scatter_store_direct): New macro.
21412         (expand_scatter_store_optab_fn): New function.
21413         (direct_scatter_store_optab_supported_p): New macro.
21414         (internal_store_fn_p): New function.
21415         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
21416         IFN_MASK_SCATTER_STORE.
21417         (internal_fn_mask_index): Likewise.
21418         (internal_fn_stored_value_index): New function.
21419         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
21420         for scatter stores.
21421         * optabs-query.h (supports_vec_scatter_store_p): Declare.
21422         * optabs-query.c (supports_vec_scatter_store_p): New function.
21423         * tree-vectorizer.h (vect_get_store_rhs): Declare.
21424         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
21425         true for scatter stores.
21426         (vect_gather_scatter_fn_p): Handle scatter stores too.
21427         (vect_check_gather_scatter): Consider using scatter stores if
21428         supports_vec_scatter_store_p.
21429         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
21430         scatter stores too.
21431         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21432         internal_fn_stored_value_index.
21433         (check_load_store_masking): Handle scatter stores too.
21434         (vect_get_store_rhs): Make public.
21435         (vectorizable_call): Use internal_store_fn_p.
21436         (vectorizable_store): Handle scatter store internal functions.
21437         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
21438         when deciding whether the end of the group has been reached.
21439         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
21440         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
21441         (mask_scatter_store<mode>): New insns.
21443 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21444             Alan Hayward  <alan.hayward@arm.com>
21445             David Sherwood  <david.sherwood@arm.com>
21447         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
21448         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
21449         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
21450         function.
21451         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
21452         Use vect_truncate_gather_scatter_offset if we can't treat the
21453         operation as a normal gather load or scatter store.
21454         (get_group_load_store_type): Take the gather_scatter_info
21455         as argument.  Try using a gather load or scatter store for
21456         single-element groups.
21457         (get_load_store_type): Update calls to get_group_load_store_type
21458         and vect_use_strided_gather_scatters_p.
21460 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21461             Alan Hayward  <alan.hayward@arm.com>
21462             David Sherwood  <david.sherwood@arm.com>
21464         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
21465         optional tree argument.
21466         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
21467         null target hooks.
21468         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
21469         but continue to use the current value as a fallback.
21470         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
21471         to compare the updates.
21472         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
21473         (get_load_store_type): Use it when handling a strided access.
21474         (vect_get_strided_load_store_ops): New function.
21475         (vect_get_data_ptr_increment): Likewise.
21476         (vectorizable_load): Handle strided gather loads.  Always pass
21477         a step to vect_create_data_ref_ptr and bump_vector_ptr.
21479 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21480             Alan Hayward  <alan.hayward@arm.com>
21481             David Sherwood  <david.sherwood@arm.com>
21483         * doc/md.texi (gather_load@var{m}): Document.
21484         (mask_gather_load@var{m}): Likewise.
21485         * genopinit.c (main): Add supports_vec_gather_load and
21486         supports_vec_gather_load_cached to target_optabs.
21487         * optabs-tree.c (init_tree_optimization_optabs): Use
21488         ggc_cleared_alloc to allocate target_optabs.
21489         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
21490         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
21491         functions.
21492         * internal-fn.h (internal_load_fn_p): Declare.
21493         (internal_gather_scatter_fn_p): Likewise.
21494         (internal_fn_mask_index): Likewise.
21495         (internal_gather_scatter_fn_supported_p): Likewise.
21496         * internal-fn.c (gather_load_direct): New macro.
21497         (expand_gather_load_optab_fn): New function.
21498         (direct_gather_load_optab_supported_p): New macro.
21499         (direct_internal_fn_optab): New function.
21500         (internal_load_fn_p): Likewise.
21501         (internal_gather_scatter_fn_p): Likewise.
21502         (internal_fn_mask_index): Likewise.
21503         (internal_gather_scatter_fn_supported_p): Likewise.
21504         * optabs-query.c (supports_at_least_one_mode_p): New function.
21505         (supports_vec_gather_load_p): Likewise.
21506         * optabs-query.h (supports_vec_gather_load_p): Declare.
21507         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
21508         and memory_type field.
21509         (NUM_PATTERNS): Bump to 15.
21510         * tree-vect-data-refs.c: Include internal-fn.h.
21511         (vect_gather_scatter_fn_p): New function.
21512         (vect_describe_gather_scatter_call): Likewise.
21513         (vect_check_gather_scatter): Try using internal functions for
21514         gather loads.  Recognize existing calls to a gather load function.
21515         (vect_analyze_data_refs): Consider using gather loads if
21516         supports_vec_gather_load_p.
21517         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
21518         (vect_get_gather_scatter_offset_type): Likewise.
21519         (vect_convert_mask_for_vectype): Likewise.
21520         (vect_add_conversion_to_patterm): Likewise.
21521         (vect_try_gather_scatter_pattern): Likewise.
21522         (vect_recog_gather_scatter_pattern): New pattern recognizer.
21523         (vect_vect_recog_func_ptrs): Add it.
21524         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21525         internal_fn_mask_index and internal_gather_scatter_fn_p.
21526         (check_load_store_masking): Take the gather_scatter_info as an
21527         argument and handle gather loads.
21528         (vect_get_gather_scatter_ops): New function.
21529         (vectorizable_call): Check internal_load_fn_p.
21530         (vectorizable_load): Likewise.  Handle gather load internal
21531         functions.
21532         (vectorizable_store): Update call to check_load_store_masking.
21533         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
21534         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
21535         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
21536         (aarch64_gather_scale_operand_d): New predicates.
21537         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
21538         (mask_gather_load<mode>): New insns.
21540 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21541             Alan Hayward  <alan.hayward@arm.com>
21542             David Sherwood  <david.sherwood@arm.com>
21544         * optabs.def (fold_left_plus_optab): New optab.
21545         * doc/md.texi (fold_left_plus_@var{m}): Document.
21546         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
21547         * internal-fn.c (fold_left_direct): Define.
21548         (expand_fold_left_optab_fn): Likewise.
21549         (direct_fold_left_optab_supported_p): Likewise.
21550         * fold-const-call.c (fold_const_fold_left): New function.
21551         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
21552         * tree-parloops.c (valid_reduction_p): New function.
21553         (gather_scalar_reductions): Use it.
21554         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
21555         (vect_finish_replace_stmt): Declare.
21556         * tree-vect-loop.c (fold_left_reduction_fn): New function.
21557         (needs_fold_left_reduction_p): New function, split out from...
21558         (vect_is_simple_reduction): ...here.  Accept reductions that
21559         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
21560         (vect_force_simple_reduction): Also store the reduction type in
21561         the assignment's STMT_VINFO_REDUC_TYPE.
21562         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
21563         (merge_with_identity): New function.
21564         (vect_expand_fold_left): Likewise.
21565         (vectorize_fold_left_reduction): Likewise.
21566         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
21567         scalar phi in place for it.  Check for target support and reject
21568         cases that would reassociate the operation.  Defer the transform
21569         phase to vectorize_fold_left_reduction.
21570         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
21571         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
21572         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
21574 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21576         * tree-if-conv.c (predicate_mem_writes): Remove redundant
21577         call to ifc_temp_var.
21579 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21580             Alan Hayward  <alan.hayward@arm.com>
21581             David Sherwood  <david.sherwood@arm.com>
21583         * target.def (legitimize_address_displacement): Take the original
21584         offset as a poly_int.
21585         * targhooks.h (default_legitimize_address_displacement): Update
21586         accordingly.
21587         * targhooks.c (default_legitimize_address_displacement): Likewise.
21588         * doc/tm.texi: Regenerate.
21589         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
21590         as an argument, moving assert of ad->disp == ad->disp_term to...
21591         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
21592         Try calling targetm.legitimize_address_displacement before expanding
21593         the address rather than afterwards, and adjust for the new interface.
21594         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
21595         Match the new hook interface.  Handle SVE addresses.
21596         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
21597         new hook interface.
21599 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21601         * Makefile.in (OBJS): Add early-remat.o.
21602         * target.def (select_early_remat_modes): New hook.
21603         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
21604         * doc/tm.texi: Regenerate.
21605         * targhooks.h (default_select_early_remat_modes): Declare.
21606         * targhooks.c (default_select_early_remat_modes): New function.
21607         * timevar.def (TV_EARLY_REMAT): New timevar.
21608         * passes.def (pass_early_remat): New pass.
21609         * tree-pass.h (make_pass_early_remat): Declare.
21610         * early-remat.c: New file.
21611         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
21612         function.
21613         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
21615 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21616             Alan Hayward  <alan.hayward@arm.com>
21617             David Sherwood  <david.sherwood@arm.com>
21619         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
21620         vfm1 with a bound_epilog parameter.
21621         (vect_do_peeling): Update calls accordingly, and move the prologue
21622         call earlier in the function.  Treat the base bound_epilog as 0 for
21623         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
21624         this base when peeling for gaps.
21625         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
21626         with fully-masked loops.
21627         (vect_estimate_min_profitable_iters): Handle the single peeled
21628         iteration in that case.
21630 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21631             Alan Hayward  <alan.hayward@arm.com>
21632             David Sherwood  <david.sherwood@arm.com>
21634         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
21635         single-element interleaving even if the size is not a power of 2.
21636         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
21637         accesses for single-element interleaving if the group size is
21638         not a power of 2.
21640 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21641             Alan Hayward  <alan.hayward@arm.com>
21642             David Sherwood  <david.sherwood@arm.com>
21644         * doc/md.texi (fold_extract_last_@var{m}): Document.
21645         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
21646         * optabs.def (fold_extract_last_optab): New optab.
21647         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
21648         * internal-fn.c (fold_extract_direct): New macro.
21649         (expand_fold_extract_optab_fn): Likewise.
21650         (direct_fold_extract_optab_supported_p): Likewise.
21651         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
21652         * tree-vect-loop.c (vect_model_reduction_cost): Handle
21653         EXTRACT_LAST_REDUCTION.
21654         (get_initial_def_for_reduction): Do not create an initial vector
21655         for EXTRACT_LAST_REDUCTION reductions.
21656         (vectorizable_reduction): Leave the scalar phi in place for
21657         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
21658         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
21659         epilogue code for EXTRACT_LAST_REDUCTION and defer the
21660         transform phase to vectorizable_condition.
21661         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
21662         split out from...
21663         (vect_finish_stmt_generation): ...here.
21664         (vect_finish_replace_stmt): New function.
21665         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
21666         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
21667         pattern.
21668         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
21670 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21671             Alan Hayward  <alan.hayward@arm.com>
21672             David Sherwood  <david.sherwood@arm.com>
21674         * doc/md.texi (extract_last_@var{m}): Document.
21675         * optabs.def (extract_last_optab): New optab.
21676         * internal-fn.def (EXTRACT_LAST): New internal function.
21677         * internal-fn.c (cond_unary_direct): New macro.
21678         (expand_cond_unary_optab_fn): Likewise.
21679         (direct_cond_unary_optab_supported_p): Likewise.
21680         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
21681         loops using EXTRACT_LAST.
21682         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
21683         (extract_last_<mode>): ...this optab.
21684         (vec_extract<mode><Vel>): Update accordingly.
21686 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21687             Alan Hayward  <alan.hayward@arm.com>
21688             David Sherwood  <david.sherwood@arm.com>
21690         * target.def (empty_mask_is_expensive): New hook.
21691         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
21692         * doc/tm.texi: Regenerate.
21693         * targhooks.h (default_empty_mask_is_expensive): Declare.
21694         * targhooks.c (default_empty_mask_is_expensive): New function.
21695         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
21696         if the target says that empty masks are expensive.
21697         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
21698         New function.
21699         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
21701 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21702             Alan Hayward  <alan.hayward@arm.com>
21703             David Sherwood  <david.sherwood@arm.com>
21705         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
21706         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
21707         (vect_use_loop_mask_for_alignment_p): New function.
21708         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
21709         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
21710         niters_skip argument.  Make sure that the first niters_skip elements
21711         of the first iteration are inactive.
21712         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
21713         Update call to vect_set_loop_masks_directly.
21714         (get_misalign_in_elems): New function, split out from...
21715         (vect_gen_prolog_loop_niters): ...here.
21716         (vect_update_init_of_dr): Take a code argument that specifies whether
21717         the adjustment should be added or subtracted.
21718         (vect_update_init_of_drs): Likewise.
21719         (vect_prepare_for_masked_peels): New function.
21720         (vect_do_peeling): Skip prologue peeling if we're using a mask
21721         instead.  Update call to vect_update_inits_of_drs.
21722         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21723         mask_skip_niters.
21724         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
21725         alignment.  Do not include the number of peeled iterations in
21726         the minimum threshold in that case.
21727         (vectorizable_induction): Adjust the start value down by
21728         LOOP_VINFO_MASK_SKIP_NITERS iterations.
21729         (vect_transform_loop): Call vect_prepare_for_masked_peels.
21730         Take the number of skipped iterations into account when calculating
21731         the loop bounds.
21732         * tree-vect-stmts.c (vect_gen_while_not): New function.
21734 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21735             Alan Hayward  <alan.hayward@arm.com>
21736             David Sherwood  <david.sherwood@arm.com>
21738         * doc/sourcebuild.texi (vect_fully_masked): Document.
21739         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
21740         default value to 0.
21741         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
21742         split out from...
21743         (vect_analyze_loop_2): ...here. Don't check the vectorization
21744         factor against the number of loop iterations if the loop is
21745         fully-masked.
21747 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21748             Alan Hayward  <alan.hayward@arm.com>
21749             David Sherwood  <david.sherwood@arm.com>
21751         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
21752         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
21753         (dump_groups): Update accordingly.
21754         (iv_use::mem_type): New member variable.
21755         (address_p): New function.
21756         (record_use): Add a mem_type argument and initialize the new
21757         mem_type field.
21758         (record_group_use): Add a mem_type argument.  Use address_p.
21759         Remove obsolete null checks of base_object.  Update call to record_use.
21760         (find_interesting_uses_op): Update call to record_group_use.
21761         (find_interesting_uses_cond): Likewise.
21762         (find_interesting_uses_address): Likewise.
21763         (get_mem_type_for_internal_fn): New function.
21764         (find_address_like_use): Likewise.
21765         (find_interesting_uses_stmt): Try find_address_like_use before
21766         calling find_interesting_uses_op.
21767         (addr_offset_valid_p): Use the iv mem_type field as the type
21768         of the addressed memory.
21769         (add_autoinc_candidates): Likewise.
21770         (get_address_cost): Likewise.
21771         (split_small_address_groups_p): Use address_p.
21772         (split_address_groups): Likewise.
21773         (add_iv_candidate_for_use): Likewise.
21774         (autoinc_possible_for_pair): Likewise.
21775         (rewrite_groups): Likewise.
21776         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
21777         (determine_group_iv_cost): Update after split of USE_ADDRESS.
21778         (get_alias_ptr_type_for_ptr_address): New function.
21779         (rewrite_use_address): Rewrite address uses in calls that were
21780         identified by find_address_like_use.
21782 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21783             Alan Hayward  <alan.hayward@arm.com>
21784             David Sherwood  <david.sherwood@arm.com>
21786         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
21787         TARGET_MEM_REFs.
21788         * gimple-expr.h (is_gimple_addressable: Likewise.
21789         * gimple-expr.c (is_gimple_address): Likewise.
21790         * internal-fn.c (expand_call_mem_ref): New function.
21791         (expand_mask_load_optab_fn): Use it.
21792         (expand_mask_store_optab_fn): Likewise.
21794 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21795             Alan Hayward  <alan.hayward@arm.com>
21796             David Sherwood  <david.sherwood@arm.com>
21798         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
21799         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
21800         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
21801         (cond_umax@var{mode}): Document.
21802         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
21803         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
21804         (cond_umin_optab, cond_umax_optab): New optabs.
21805         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
21806         (COND_IOR, COND_XOR): New internal functions.
21807         * internal-fn.h (get_conditional_internal_fn): Declare.
21808         * internal-fn.c (cond_binary_direct): New macro.
21809         (expand_cond_binary_optab_fn): Likewise.
21810         (direct_cond_binary_optab_supported_p): Likewise.
21811         (get_conditional_internal_fn): New function.
21812         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
21813         Cope with reduction statements that are vectorized as calls rather
21814         than assignments.
21815         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
21816         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
21817         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
21818         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
21819         (UNSPEC_COND_EOR): New unspecs.
21820         (optab): Add mappings for them.
21821         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
21822         (sve_int_op, sve_fp_op): New int attributes.
21824 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21825             Alan Hayward  <alan.hayward@arm.com>
21826             David Sherwood  <david.sherwood@arm.com>
21828         * optabs.def (while_ult_optab): New optab.
21829         * doc/md.texi (while_ult@var{m}@var{n}): Document.
21830         * internal-fn.def (WHILE_ULT): New internal function.
21831         * internal-fn.h (direct_internal_fn_supported_p): New override
21832         that takes two types as argument.
21833         * internal-fn.c (while_direct): New macro.
21834         (expand_while_optab_fn): New function.
21835         (convert_optab_supported_p): Likewise.
21836         (direct_while_optab_supported_p): New macro.
21837         * wide-int.h (wi::udiv_ceil): New function.
21838         * tree-vectorizer.h (rgroup_masks): New structure.
21839         (vec_loop_masks): New typedef.
21840         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
21841         and fully_masked_p.
21842         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
21843         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
21844         (vect_max_vf): New function.
21845         (slpeel_make_loop_iterate_ntimes): Delete.
21846         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
21847         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
21848         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
21849         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
21850         internal-fn.h, stor-layout.h and optabs-query.h.
21851         (vect_set_loop_mask): New function.
21852         (add_preheader_seq): Likewise.
21853         (add_header_seq): Likewise.
21854         (interleave_supported_p): Likewise.
21855         (vect_maybe_permute_loop_masks): Likewise.
21856         (vect_set_loop_masks_directly): Likewise.
21857         (vect_set_loop_condition_masked): Likewise.
21858         (vect_set_loop_condition_unmasked): New function, split out from
21859         slpeel_make_loop_iterate_ntimes.
21860         (slpeel_make_loop_iterate_ntimes): Rename to..
21861         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
21862         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
21863         (vect_do_peeling): Update call accordingly.
21864         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
21865         loops.
21866         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21867         mask_compare_type, can_fully_mask_p and fully_masked_p.
21868         (release_vec_loop_masks): New function.
21869         (_loop_vec_info): Use it to free the loop masks.
21870         (can_produce_all_loop_masks_p): New function.
21871         (vect_get_max_nscalars_per_iter): Likewise.
21872         (vect_verify_full_masking): Likewise.
21873         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
21874         retries, and free the mask rgroups before retrying.  Check loop-wide
21875         reasons for disallowing fully-masked loops.  Make the final decision
21876         about whether use a fully-masked loop or not.
21877         (vect_estimate_min_profitable_iters): Do not assume that peeling
21878         for the number of iterations will be needed for fully-masked loops.
21879         (vectorizable_reduction): Disable fully-masked loops.
21880         (vectorizable_live_operation): Likewise.
21881         (vect_halve_mask_nunits): New function.
21882         (vect_double_mask_nunits): Likewise.
21883         (vect_record_loop_mask): Likewise.
21884         (vect_get_loop_mask): Likewise.
21885         (vect_transform_loop): Handle the case in which the final loop
21886         iteration might handle a partial vector.  Call vect_set_loop_condition
21887         instead of slpeel_make_loop_iterate_ntimes.
21888         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
21889         (check_load_store_masking): New function.
21890         (prepare_load_store_mask): Likewise.
21891         (vectorizable_store): Handle fully-masked loops.
21892         (vectorizable_load): Likewise.
21893         (supportable_widening_operation): Use vect_halve_mask_nunits for
21894         booleans.
21895         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
21896         (vect_gen_while): New function.
21897         * config/aarch64/aarch64.md (umax<mode>3): New expander.
21898         (aarch64_uqdec<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         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
21905         (reduc_xor_scal_optab): New optabs.
21906         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
21907         (reduc_xor_scal_@var{m}): Document.
21908         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
21909         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
21910         internal functions.
21911         * fold-const-call.c (fold_const_call): Handle them.
21912         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
21913         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
21914         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
21915         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
21916         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
21917         (UNSPEC_XORV): New unspecs.
21918         (optab): Add entries for them.
21919         (BITWISEV): New int iterator.
21920         (bit_reduc_op): New int attributes.
21922 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21923             Alan Hayward  <alan.hayward@arm.com>
21924             David Sherwood  <david.sherwood@arm.com>
21926         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
21927         * internal-fn.def (VEC_SHL_INSERT): New internal function.
21928         * optabs.def (vec_shl_insert_optab): New optab.
21929         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
21930         (duplicate_and_interleave): Likewise.
21931         * tree-vect-loop.c: Include internal-fn.h.
21932         (neutral_op_for_slp_reduction): New function, split out from
21933         get_initial_defs_for_reduction.
21934         (get_initial_def_for_reduction): Handle option 2 for variable-length
21935         vectors by loading the neutral value into a vector and then shifting
21936         the initial value into element 0.
21937         (get_initial_defs_for_reduction): Replace the code argument with
21938         the neutral value calculated by neutral_op_for_slp_reduction.
21939         Use gimple_build_vector for constant-length vectors.
21940         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
21941         but the first group_size elements have a neutral value.
21942         Use duplicate_and_interleave otherwise.
21943         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
21944         Update call to get_initial_defs_for_reduction.  Handle SLP
21945         reductions for variable-length vectors by creating one vector
21946         result for each scalar result, with the elements associated
21947         with other scalar results stubbed out with the neutral value.
21948         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
21949         Require IFN_VEC_SHL_INSERT for double reductions on
21950         variable-length vectors, or SLP reductions that have
21951         a neutral value.  Require can_duplicate_and_interleave_p
21952         support for variable-length unchained SLP reductions if there
21953         is no neutral value, such as for MIN/MAX reductions.  Also require
21954         the number of vector elements to be a multiple of the number of
21955         SLP statements when doing variable-length unchained SLP reductions.
21956         Update call to vect_create_epilog_for_reduction.
21957         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
21958         and remove initial values.
21959         (duplicate_and_interleave): Make public.
21960         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
21961         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
21963 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21964             Alan Hayward  <alan.hayward@arm.com>
21965             David Sherwood  <david.sherwood@arm.com>
21967         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
21968         (can_duplicate_and_interleave_p): New function.
21969         (vect_get_and_check_slp_defs): Take the vector of statements
21970         rather than just the current one.  Remove excess parentheses.
21971         Restriction rejectinon of vect_constant_def and vect_external_def
21972         for variable-length vectors to boolean types, or types for which
21973         can_duplicate_and_interleave_p is false.
21974         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
21975         (duplicate_and_interleave): New function.
21976         (vect_get_constant_vectors): Use gimple_build_vector for
21977         constant-length vectors and suitable variable-length constant
21978         vectors.  Use duplicate_and_interleave for other variable-length
21979         vectors.  Don't defer the update when inserting new statements.
21981 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21982             Alan Hayward  <alan.hayward@arm.com>
21983             David Sherwood  <david.sherwood@arm.com>
21985         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
21986         min_profitable_iters doesn't go negative.
21988 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21989             Alan Hayward  <alan.hayward@arm.com>
21990             David Sherwood  <david.sherwood@arm.com>
21992         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
21993         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
21994         * optabs.def (vec_mask_load_lanes_optab): New optab.
21995         (vec_mask_store_lanes_optab): Likewise.
21996         * internal-fn.def (MASK_LOAD_LANES): New internal function.
21997         (MASK_STORE_LANES): Likewise.
21998         * internal-fn.c (mask_load_lanes_direct): New macro.
21999         (mask_store_lanes_direct): Likewise.
22000         (expand_mask_load_optab_fn): Handle masked operations.
22001         (expand_mask_load_lanes_optab_fn): New macro.
22002         (expand_mask_store_optab_fn): Handle masked operations.
22003         (expand_mask_store_lanes_optab_fn): New macro.
22004         (direct_mask_load_lanes_optab_supported_p): Likewise.
22005         (direct_mask_store_lanes_optab_supported_p): Likewise.
22006         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
22007         parameter.
22008         (vect_load_lanes_supported): Likewise.
22009         * tree-vect-data-refs.c (strip_conversion): New function.
22010         (can_group_stmts_p): Likewise.
22011         (vect_analyze_data_ref_accesses): Use it instead of checking
22012         for a pair of assignments.
22013         (vect_store_lanes_supported): Take a masked_p parameter.
22014         (vect_load_lanes_supported): Likewise.
22015         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
22016         vect_store_lanes_supported and vect_load_lanes_supported.
22017         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
22018         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
22019         parameter.  Don't allow gaps for masked accesses.
22020         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
22021         and vect_load_lanes_supported.
22022         (get_load_store_type): Take a masked_p parameter and update
22023         call to get_group_load_store_type.
22024         (vectorizable_store): Update call to get_load_store_type.
22025         Handle IFN_MASK_STORE_LANES.
22026         (vectorizable_load): Update call to get_load_store_type.
22027         Handle IFN_MASK_LOAD_LANES.
22029 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22030             Alan Hayward  <alan.hayward@arm.com>
22031             David Sherwood  <david.sherwood@arm.com>
22033         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
22034         modes for SVE.
22035         * config/aarch64/aarch64-protos.h
22036         (aarch64_sve_struct_memory_operand_p): Declare.
22037         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
22038         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
22039         (VPRED, vpred): Handle SVE structure modes.
22040         * config/aarch64/constraints.md (Utx): New constraint.
22041         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
22042         (aarch64_sve_struct_nonimmediate_operand): New predicates.
22043         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
22044         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
22045         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
22046         structure modes.  Split into pieces after RA.
22047         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
22048         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
22049         New patterns.
22050         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
22051         SVE structure modes.
22052         (aarch64_classify_address): Likewise.
22053         (sizetochar): Move earlier in file.
22054         (aarch64_print_operand): Handle SVE register lists.
22055         (aarch64_array_mode): New function.
22056         (aarch64_sve_struct_memory_operand_p): Likewise.
22057         (TARGET_ARRAY_MODE): Redefine.
22059 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22060             Alan Hayward  <alan.hayward@arm.com>
22061             David Sherwood  <david.sherwood@arm.com>
22063         * target.def (array_mode): New target hook.
22064         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
22065         * doc/tm.texi: Regenerate.
22066         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
22067         * hooks.c (hook_optmode_mode_uhwi_none): New function.
22068         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
22069         targetm.array_mode.
22070         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
22071         type sizes.
22073 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22074             Alan Hayward  <alan.hayward@arm.com>
22075             David Sherwood  <david.sherwood@arm.com>
22077         * fold-const.c (fold_binary_loc): Check the argument types
22078         rather than the result type when testing for a vector operation.
22080 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22082         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
22083         * doc/tm.texi: Regenerate.
22085 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22086             Alan Hayward  <alan.hayward@arm.com>
22087             David Sherwood  <david.sherwood@arm.com>
22089         * doc/invoke.texi (-msve-vector-bits=): Document new option.
22090         (sve): Document new AArch64 extension.
22091         * doc/md.texi (w): Extend the description of the AArch64
22092         constraint to include SVE vectors.
22093         (Upl, Upa): Document new AArch64 predicate constraints.
22094         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
22095         enum.
22096         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
22097         (msve-vector-bits=): New option.
22098         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
22099         SVE when these are disabled.
22100         (sve): New extension.
22101         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
22102         modes.  Adjust their number of units based on aarch64_sve_vg.
22103         (MAX_BITSIZE_MODE_ANY_MODE): Define.
22104         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
22105         aarch64_addr_query_type.
22106         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
22107         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
22108         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
22109         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
22110         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
22111         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
22112         (aarch64_simd_imm_zero_p): Delete.
22113         (aarch64_check_zero_based_sve_index_immediate): Declare.
22114         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22115         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22116         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22117         (aarch64_sve_float_mul_immediate_p): Likewise.
22118         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22119         rather than an rtx.
22120         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
22121         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
22122         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
22123         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
22124         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
22125         (aarch64_regmode_natural_size): Likewise.
22126         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
22127         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
22128         left one place.
22129         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
22130         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
22131         for VG and the SVE predicate registers.
22132         (V_ALIASES): Add a "z"-prefixed alias.
22133         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
22134         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
22135         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
22136         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
22137         (REG_CLASS_NAMES): Add entries for them.
22138         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
22139         and the predicate registers.
22140         (aarch64_sve_vg): Declare.
22141         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
22142         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
22143         (REGMODE_NATURAL_SIZE): Define.
22144         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
22145         SVE macros.
22146         * config/aarch64/aarch64.c: Include cfgrtl.h.
22147         (simd_immediate_info): Add a constructor for series vectors,
22148         and an associated step field.
22149         (aarch64_sve_vg): New variable.
22150         (aarch64_dbx_register_number): Handle VG and the predicate registers.
22151         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
22152         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
22153         (VEC_ANY_DATA, VEC_STRUCT): New constants.
22154         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
22155         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
22156         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
22157         (aarch64_get_mask_mode): New functions.
22158         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
22159         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
22160         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
22161         predicate modes and predicate registers.  Explicitly restrict
22162         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
22163         to store a vector mode if it is recognized by
22164         aarch64_classify_vector_mode.
22165         (aarch64_regmode_natural_size): New function.
22166         (aarch64_hard_regno_caller_save_mode): Return the original mode
22167         for predicates.
22168         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
22169         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
22170         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
22171         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
22172         functions.
22173         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
22174         does not overlap dest if the function is frame-related.  Handle
22175         SVE constants.
22176         (aarch64_split_add_offset): New function.
22177         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
22178         them aarch64_add_offset.
22179         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
22180         and update call to aarch64_sub_sp.
22181         (aarch64_add_cfa_expression): New function.
22182         (aarch64_expand_prologue): Pass extra temporary registers to the
22183         functions above.  Handle the case in which we need to emit new
22184         DW_CFA_expressions for registers that were originally saved
22185         relative to the stack pointer, but now have to be expressed
22186         relative to the frame pointer.
22187         (aarch64_output_mi_thunk): Pass extra temporary registers to the
22188         functions above.
22189         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
22190         IP0 and IP1 values for SVE frames.
22191         (aarch64_expand_vec_series): New function.
22192         (aarch64_expand_sve_widened_duplicate): Likewise.
22193         (aarch64_expand_sve_const_vector): Likewise.
22194         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
22195         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
22196         into the register, rather than emitting a SET directly.
22197         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
22198         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
22199         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
22200         (offset_9bit_signed_scaled_p): New functions.
22201         (aarch64_replicate_bitmask_imm): New function.
22202         (aarch64_bitmask_imm): Use it.
22203         (aarch64_cannot_force_const_mem): Reject expressions involving
22204         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
22205         (aarch64_classify_index): Handle SVE indices, by requiring
22206         a plain register index with a scale that matches the element size.
22207         (aarch64_classify_address): Handle SVE addresses.  Assert that
22208         the mode of the address is VOIDmode or an integer mode.
22209         Update call to aarch64_classify_symbol.
22210         (aarch64_classify_symbolic_expression): Update call to
22211         aarch64_classify_symbol.
22212         (aarch64_const_vec_all_in_range_p): New function.
22213         (aarch64_print_vector_float_operand): Likewise.
22214         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
22215         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
22216         and the FP immediates 1.0 and 0.5.
22217         (aarch64_print_address_internal): Handle SVE addresses.
22218         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
22219         (aarch64_regno_regclass): Handle predicate registers.
22220         (aarch64_secondary_reload): Handle big-endian reloads of SVE
22221         data modes.
22222         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
22223         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
22224         (aarch64_convert_sve_vector_bits): New function.
22225         (aarch64_override_options): Use it to handle -msve-vector-bits=.
22226         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22227         rather than an rtx.
22228         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
22229         Handle SVE vector and predicate modes.  Accept VL-based constants
22230         that need only one temporary register, and VL offsets that require
22231         no temporary registers.
22232         (aarch64_conditional_register_usage): Mark the predicate registers
22233         as fixed if SVE isn't available.
22234         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
22235         Return true for SVE vector and predicate modes.
22236         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
22237         rather than an unsigned int.  Handle SVE modes.
22238         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
22239         SVE modes.
22240         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
22241         if SVE is enabled.
22242         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22243         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22244         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22245         (aarch64_sve_float_mul_immediate_p): New functions.
22246         (aarch64_sve_valid_immediate): New function.
22247         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
22248         Explicitly reject structure modes.  Check for INDEX constants.
22249         Handle PTRUE and PFALSE constants.
22250         (aarch64_check_zero_based_sve_index_immediate): New function.
22251         (aarch64_simd_imm_zero_p): Delete.
22252         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
22253         vector modes.  Accept constants in the range of CNT[BHWD].
22254         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
22255         ask for an Advanced SIMD mode.
22256         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
22257         (aarch64_simd_vector_alignment): Handle SVE predicates.
22258         (aarch64_vectorize_preferred_vector_alignment): New function.
22259         (aarch64_simd_vector_alignment_reachable): Use it instead of
22260         the vector size.
22261         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
22262         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
22263         functions.
22264         (MAX_VECT_LEN): Delete.
22265         (expand_vec_perm_d): Add a vec_flags field.
22266         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
22267         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
22268         (aarch64_evpc_ext): Don't apply a big-endian lane correction
22269         for SVE modes.
22270         (aarch64_evpc_rev): Rename to...
22271         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
22272         (aarch64_evpc_rev_global): New function.
22273         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
22274         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
22275         MAX_VECT_LEN.
22276         (aarch64_evpc_sve_tbl): New function.
22277         (aarch64_expand_vec_perm_const_1): Update after rename of
22278         aarch64_evpc_rev.  Handle SVE permutes too, trying
22279         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
22280         than aarch64_evpc_tbl.
22281         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
22282         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
22283         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
22284         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
22285         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
22286         (aarch64_expand_sve_vcond): New functions.
22287         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
22288         of aarch64_vector_mode_p.
22289         (aarch64_dwarf_poly_indeterminate_value): New function.
22290         (aarch64_compute_pressure_classes): Likewise.
22291         (aarch64_can_change_mode_class): Likewise.
22292         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
22293         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
22294         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
22295         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
22296         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
22297         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
22298         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
22299         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
22300         constraints.
22301         (Dn, Dl, Dr): Accept const as well as const_vector.
22302         (Dz): Likewise.  Compare against CONST0_RTX.
22303         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
22304         of "vector" where appropriate.
22305         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
22306         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
22307         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
22308         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
22309         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
22310         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
22311         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
22312         (v_int_equiv): Extend to SVE modes.
22313         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
22314         mode attributes.
22315         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
22316         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
22317         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
22318         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
22319         (SVE_COND_FP_CMP): New int iterators.
22320         (perm_hilo): Handle the new unpack unspecs.
22321         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
22322         attributes.
22323         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
22324         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
22325         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
22326         (aarch64_equality_operator, aarch64_constant_vector_operand)
22327         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
22328         (aarch64_sve_nonimmediate_operand): Likewise.
22329         (aarch64_sve_general_operand): Likewise.
22330         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
22331         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
22332         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
22333         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
22334         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
22335         (aarch64_sve_float_arith_immediate): Likewise.
22336         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
22337         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
22338         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
22339         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
22340         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
22341         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
22342         (aarch64_sve_float_arith_operand): Likewise.
22343         (aarch64_sve_float_arith_with_sub_operand): Likewise.
22344         (aarch64_sve_float_mul_operand): Likewise.
22345         (aarch64_sve_vec_perm_operand): Likewise.
22346         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
22347         (aarch64_mov_operand): Accept const_poly_int and const_vector.
22348         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
22349         as well as const_vector.
22350         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
22351         in file.  Use CONST0_RTX and CONSTM1_RTX.
22352         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
22353         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
22354         Use aarch64_simd_imm_zero.
22355         * config/aarch64/aarch64-sve.md: New file.
22356         * config/aarch64/aarch64.md: Include it.
22357         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
22358         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
22359         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
22360         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
22361         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
22362         (sve): New attribute.
22363         (enabled): Disable instructions with the sve attribute unless
22364         TARGET_SVE.
22365         (movqi, movhi): Pass CONST_POLY_INT operaneds through
22366         aarch64_expand_mov_immediate.
22367         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
22368         CNT[BHSD] immediates.
22369         (movti): Split CONST_POLY_INT moves into two halves.
22370         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
22371         Split additions that need a temporary here if the destination
22372         is the stack pointer.
22373         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
22374         (*add<mode>3_poly_1): New instruction.
22375         (set_clobber_cc): New expander.
22377 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22379         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
22380         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
22381         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
22382         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
22383         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
22384         Change innermode from fixed_mode_size to machine_mode.
22385         (simplify_subreg): Update call accordingly.  Handle a constant-sized
22386         subreg of a variable-length CONST_VECTOR.
22388 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22389             Alan Hayward  <alan.hayward@arm.com>
22390             David Sherwood  <david.sherwood@arm.com>
22392         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
22393         (add_offset_to_base): New function, split out from...
22394         (create_mem_ref): ...here.  When handling a scale other than 1,
22395         check first whether the address is valid without the offset.
22396         Add it into the base if so, leaving the index and scale as-is.
22398 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
22400         PR c++/83778
22401         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
22402         fold_for_warn before checking if arg2 is INTEGER_CST.
22404 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
22406         * config/rs6000/predicates.md (load_multiple_operation): Delete.
22407         (store_multiple_operation): Delete.
22408         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
22409         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
22410         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
22411         guarded by TARGET_STRING.
22412         (rs6000_output_load_multiple): Delete.
22413         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
22414         OPTION_MASK_STRING / TARGET_STRING handling.
22415         (print_operand) <'N', 'O'>: Add comment that these are unused now.
22416         (const rs6000_opt_masks) <"string">: Change mask to 0.
22417         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
22418         (MASK_STRING): Delete.
22419         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
22420         parts.  Simplify.
22421         (load_multiple): Delete.
22422         (*ldmsi8): Delete.
22423         (*ldmsi7): Delete.
22424         (*ldmsi6): Delete.
22425         (*ldmsi5): Delete.
22426         (*ldmsi4): Delete.
22427         (*ldmsi3): Delete.
22428         (store_multiple): Delete.
22429         (*stmsi8): Delete.
22430         (*stmsi7): Delete.
22431         (*stmsi6): Delete.
22432         (*stmsi5): Delete.
22433         (*stmsi4): Delete.
22434         (*stmsi3): Delete.
22435         (movmemsi_8reg): Delete.
22436         (corresponding unnamed define_insn): Delete.
22437         (movmemsi_6reg): Delete.
22438         (corresponding unnamed define_insn): Delete.
22439         (movmemsi_4reg): Delete.
22440         (corresponding unnamed define_insn): Delete.
22441         (movmemsi_2reg): Delete.
22442         (corresponding unnamed define_insn): Delete.
22443         (movmemsi_1reg): Delete.
22444         (corresponding unnamed define_insn): Delete.
22445         * config/rs6000/rs6000.opt (mno-string): New.
22446         (mstring): Replace by deprecation warning stub.
22447         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
22449 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
22451         * regrename.c (regrename_do_replace): If replacing the same
22452         reg multiple times, try to reuse last created gen_raw_REG.
22454         PR debug/81155
22455         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
22456         main to workaround a bug in GDB.
22458 2018-01-12  Tom de Vries  <tom@codesourcery.com>
22460         PR target/83737
22461         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
22463 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
22465         PR rtl-optimization/80481
22466         * ira-color.c (get_cap_member): New function.
22467         (allocnos_conflict_by_live_ranges_p): Use it.
22468         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
22469         (setup_slot_coalesced_allocno_live_ranges): Ditto.
22471 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
22473         PR target/83628
22474         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
22475         (*saddl_se_1): Ditto.
22476         (*ssubsi_1): Ditto.
22477         (*ssubl_se_1): Ditto.
22479 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
22481         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
22482         rather than wi::to_widest for DR_INITs.
22483         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
22484         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
22485         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
22486         INTEGER_CSTs.
22487         (vect_analyze_group_access_1): Note that here.
22489 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
22491         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
22492         polynomial type sizes.
22494 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
22496         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
22497         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
22498         (gimple_add_tmp_var): Likewise.
22500 2018-01-12  Martin Liska  <mliska@suse.cz>
22502         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
22503         (gimple_alloc_sizes): Likewise.
22504         (dump_gimple_statistics): Use PRIu64 in printf format.
22505         * gimple.h: Change uint64_t to int.
22507 2018-01-12  Martin Liska  <mliska@suse.cz>
22509         * tree-core.h: Use uint64_t instead of int.
22510         * tree.c (tree_node_counts): Likewise.
22511         (tree_node_sizes): Likewise.
22512         (dump_tree_statistics): Use PRIu64 in printf format.
22514 2018-01-12  Martin Liska  <mliska@suse.cz>
22516         * Makefile.in: As qsort_chk is implemented in vec.c, add
22517         vec.o to linkage of gencfn-macros.
22518         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
22519         passing the info to record_node_allocation_statistics.
22520         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
22521         and pass the info.
22522         * ggc-common.c (struct ggc_usage): Add operator== and use
22523         it in operator< and compare function.
22524         * mem-stats.h (struct mem_usage): Likewise.
22525         * vec.c (struct vec_usage): Remove operator< and compare
22526         function. Can be simply inherited.
22528 2018-01-12  Martin Jambor  <mjambor@suse.cz>
22530         PR target/81616
22531         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
22532         * tree-ssa-math-opts.c: Include domwalk.h.
22533         (convert_mult_to_fma_1): New function.
22534         (fma_transformation_info): New type.
22535         (fma_deferring_state): Likewise.
22536         (cancel_fma_deferring): New function.
22537         (result_of_phi): Likewise.
22538         (last_fma_candidate_feeds_initial_phi): Likewise.
22539         (convert_mult_to_fma): Added deferring logic, split actual
22540         transformation to convert_mult_to_fma_1.
22541         (math_opts_dom_walker): New type.
22542         (math_opts_dom_walker::after_dom_children): New method, body moved
22543         here from pass_optimize_widening_mul::execute, added deferring logic
22544         bits.
22545         (pass_optimize_widening_mul::execute): Moved most of code to
22546         math_opts_dom_walker::after_dom_children.
22547         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
22548         * config/i386/i386.c (ix86_option_override_internal): Added
22549         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
22551 2018-01-12  Richard Biener  <rguenther@suse.de>
22553         PR debug/83157
22554         * dwarf2out.c (gen_variable_die): Do not reset old_die for
22555         inline instance vars.
22557 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
22559         PR target/81819
22560         * config/rx/rx.c (rx_is_restricted_memory_address):
22561         Handle SUBREG case.
22563 2018-01-12  Richard Biener  <rguenther@suse.de>
22565         PR tree-optimization/80846
22566         * target.def (split_reduction): New target hook.
22567         * targhooks.c (default_split_reduction): New function.
22568         * targhooks.h (default_split_reduction): Declare.
22569         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
22570         target requests first reduce vectors by combining low and high
22571         parts.
22572         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
22573         (get_vectype_for_scalar_type_and_size): Export.
22574         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
22575         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
22576         * doc/tm.texi: Regenerate.
22577         * config/i386/i386.c (ix86_split_reduction): Implement
22578         TARGET_VECTORIZE_SPLIT_REDUCTION.
22580 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
22582         PR target/83368
22583         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
22584         in PIC mode except for TARGET_VXWORKS_RTP.
22585         * config/sparc/sparc.c: Include cfgrtl.h.
22586         (TARGET_INIT_PIC_REG): Define.
22587         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
22588         (sparc_pic_register_p): New predicate.
22589         (sparc_legitimate_address_p): Use it.
22590         (sparc_legitimize_pic_address): Likewise.
22591         (sparc_delegitimize_address): Likewise.
22592         (sparc_mode_dependent_address_p): Likewise.
22593         (gen_load_pcrel_sym): Remove 4th parameter.
22594         (load_got_register): Adjust call to above.  Remove obsolete stuff.
22595         (sparc_expand_prologue): Do not call load_got_register here.
22596         (sparc_flat_expand_prologue): Likewise.
22597         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
22598         (sparc_use_pseudo_pic_reg): New function.
22599         (sparc_init_pic_reg): Likewise.
22600         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
22601         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
22603 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
22605         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
22606         Add item for branch_cost.
22608 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
22610         PR rtl-optimization/83565
22611         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
22612         not extend the result to a larger mode for rotate operations.
22613         (num_sign_bit_copies1): Likewise.
22615 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22617         PR target/40411
22618         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
22619         -symbolic.
22620         Use values-Xc.o for -pedantic.
22621         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
22623 2018-01-12  Martin Liska  <mliska@suse.cz>
22625         PR ipa/83054
22626         * ipa-devirt.c (final_warning_record::grow_type_warnings):
22627         New function.
22628         (possible_polymorphic_call_targets): Use it.
22629         (ipa_devirt): Likewise.
22631 2018-01-12  Martin Liska  <mliska@suse.cz>
22633         * profile-count.h (enum profile_quality): Use 0 as invalid
22634         enum value of profile_quality.
22636 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
22638         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
22639         -mext-string options.
22641 2018-01-12  Richard Biener  <rguenther@suse.de>
22643         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
22644         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
22645         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
22646         Likewise.
22647         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
22649 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
22651         * configure.ac (--with-long-double-format): Add support for the
22652         configuration option to change the default long double format on
22653         PowerPC systems.
22654         * config.gcc (powerpc*-linux*-*): Likewise.
22655         * configure: Regenerate.
22656         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
22657         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
22658         used without modification.
22660 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22662         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
22663         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
22664         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
22665         MISC_BUILTIN_SPEC_BARRIER.
22666         (rs6000_init_builtins): Likewise.
22667         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
22668         enum value.
22669         (speculation_barrier): New define_insn.
22670         * doc/extend.texi: Document __builtin_speculation_barrier.
22672 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
22674         PR target/83203
22675         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
22676         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
22677         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
22678         iterators.
22679         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
22680         integral modes instead of "ss" and "sd".
22681         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
22682         vectors with 32-bit and 64-bit elements.
22683         (vecdupssescalarmodesuffix): New mode attribute.
22684         (vec_dup<mode>): Use it.
22686 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
22688         PR target/83330
22689         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
22690         frame if argument is passed on stack.
22692 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
22694         PR target/82682
22695         * ree.c (combine_reaching_defs): Optimize also
22696         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
22697         reg2=any_extend(exp); reg1=reg2;, formatting fix.
22699 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
22701         PR middle-end/83189
22702         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
22704 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
22706         PR middle-end/83718
22707         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
22708         after they are computed.
22710 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
22712         PR tree-optimization/83695
22713         * gimple-loop-linterchange.cc
22714         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
22715         reset cached scev information after interchange.
22716         (pass_linterchange::execute): Remove call to scev_reset_htab.
22718 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22720         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
22721         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
22722         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
22723         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
22724         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
22725         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
22726         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
22727         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
22728         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
22729         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
22730         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
22731         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
22732         (V_lane_reg): Likewise.
22733         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
22734         New define_expand.
22735         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
22736         (vfmal_lane_low<mode>_intrinsic,
22737         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
22738         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
22739         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
22740         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
22741         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
22742         vfmsl_lane_high<mode>_intrinsic): New define_insns.
22744 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22746         * config/arm/arm-cpus.in (fp16fml): New feature.
22747         (ALL_SIMD): Add fp16fml.
22748         (armv8.2-a): Add fp16fml as an option.
22749         (armv8.3-a): Likewise.
22750         (armv8.4-a): Add fp16fml as part of fp16.
22751         * config/arm/arm.h (TARGET_FP16FML): Define.
22752         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
22753         when appropriate.
22754         * config/arm/arm-modes.def (V2HF): Define.
22755         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
22756         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
22757         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
22758         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
22759         vfmsl_low, vfmsl_high): New set of builtins.
22760         * config/arm/iterators.md (PLUSMINUS): New code iterator.
22761         (vfml_op): New code attribute.
22762         (VFMLHALVES): New int iterator.
22763         (VFML, VFMLSEL): New mode attributes.
22764         (V_reg): Define mapping for V2HF.
22765         (V_hi, V_lo): New mode attributes.
22766         (VF_constraint): Likewise.
22767         (vfml_half, vfml_half_selector): New int attributes.
22768         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
22769         define_expand.
22770         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
22771         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
22772         New define_insn.
22773         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
22774         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
22775         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
22776         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
22777         documentation.
22778         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
22779         Document new effective target and option set.
22781 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22783         * config/arm/arm-cpus.in (armv8_4): New feature.
22784         (ARMv8_4a): New fgroup.
22785         (armv8.4-a): New arch.
22786         * config/arm/arm-tables.opt: Regenerate.
22787         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
22788         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
22789         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
22790         Add matching rules for -march=armv8.4-a and extensions.
22791         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
22793 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
22795         PR target/81821
22796         * config/rx/rx.md (BW): New mode attribute.
22797         (sync_lock_test_and_setsi): Add mode suffix to insn output.
22799 2018-01-11  Richard Biener  <rguenther@suse.de>
22801         PR tree-optimization/83435
22802         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
22803         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
22804         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
22806 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22807             Alan Hayward  <alan.hayward@arm.com>
22808             David Sherwood  <david.sherwood@arm.com>
22810         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
22811         field.
22812         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
22813         (aarch64_print_address_internal): Use it to check for a zero offset.
22815 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22816             Alan Hayward  <alan.hayward@arm.com>
22817             David Sherwood  <david.sherwood@arm.com>
22819         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
22820         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
22821         Return a poly_int64 rather than a HOST_WIDE_INT.
22822         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
22823         rather than a HOST_WIDE_INT.
22824         * config/aarch64/aarch64.h (aarch64_frame): Protect with
22825         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
22826         hard_fp_offset, frame_size, initial_adjust, callee_offset and
22827         final_offset from HOST_WIDE_INT to poly_int64.
22828         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
22829         to_constant when getting the number of units in an Advanced SIMD
22830         mode.
22831         (aarch64_builtin_vectorized_function): Check for a constant number
22832         of units.
22833         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
22834         GET_MODE_SIZE.
22835         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
22836         attribute instead of GET_MODE_NUNITS.
22837         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
22838         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
22839         GET_MODE_SIZE for fixed-size registers.
22840         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
22841         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
22842         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
22843         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
22844         (aarch64_print_operand, aarch64_print_address_internal)
22845         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
22846         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
22847         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
22848         Handle polynomial GET_MODE_SIZE.
22849         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
22850         wider than SImode without modification.
22851         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
22852         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
22853         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
22854         passing and returning SVE modes.
22855         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
22856         rather than GEN_INT.
22857         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
22858         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
22859         (aarch64_allocate_and_probe_stack_space): Likewise.
22860         (aarch64_layout_frame): Cope with polynomial offsets.
22861         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
22862         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
22863         polynomial offsets.
22864         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
22865         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
22866         poly_int64 rather than a HOST_WIDE_INT.
22867         (aarch64_get_separate_components, aarch64_process_components)
22868         (aarch64_expand_prologue, aarch64_expand_epilogue)
22869         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
22870         (aarch64_anchor_offset): New function, split out from...
22871         (aarch64_legitimize_address): ...here.
22872         (aarch64_builtin_vectorization_cost): Handle polynomial
22873         TYPE_VECTOR_SUBPARTS.
22874         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
22875         GET_MODE_NUNITS.
22876         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
22877         number of elements from the PARALLEL rather than the mode.
22878         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
22879         rather than GET_MODE_BITSIZE.
22880         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
22881         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
22882         (aarch64_expand_vec_perm_const_1): Handle polynomial
22883         d->perm.length () and d->perm elements.
22884         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
22885         Apply to_constant to d->perm elements.
22886         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
22887         polynomial CONST_VECTOR_NUNITS.
22888         (aarch64_move_pointer): Take amount as a poly_int64 rather
22889         than an int.
22890         (aarch64_progress_pointer): Avoid temporary variable.
22891         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
22892         the mode attribute instead of GET_MODE.
22894 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22895             Alan Hayward  <alan.hayward@arm.com>
22896             David Sherwood  <david.sherwood@arm.com>
22898         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
22899         x exists before using it.
22900         (aarch64_add_constant_internal): Rename to...
22901         (aarch64_add_offset_1): ...this.  Replace regnum with separate
22902         src and dest rtxes.  Handle the case in which they're different,
22903         including when the offset is zero.  Replace scratchreg with an rtx.
22904         Use 2 additions if there is no spare register into which we can
22905         move a 16-bit constant.
22906         (aarch64_add_constant): Delete.
22907         (aarch64_add_offset): Replace reg with separate src and dest
22908         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
22909         Use aarch64_add_offset_1.
22910         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
22911         an rtx rather than an int.  Take the delta as a poly_int64
22912         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
22913         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
22914         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
22915         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
22916         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
22917         and aarch64_add_sp.
22918         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
22919         aarch64_add_constant.
22921 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22923         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
22924         Use scalar_float_mode.
22926 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22928         * config/aarch64/aarch64-simd.md
22929         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
22930         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
22931         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
22932         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
22933         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
22934         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
22935         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
22936         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
22937         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
22938         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
22940 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
22942         PR target/83514
22943         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
22944         targ_options->x_arm_arch_string is non NULL.
22946 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
22948         * config/aarch64/aarch64.h
22949         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
22951 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
22953         PR target/82096
22954         * expmed.c (emit_store_flag_force): Swap if const op0
22955         and change VOIDmode to mode of op0.
22957 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22959         PR rtl-optimization/83761
22960         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
22961         than bytes to mode_for_size.
22963 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
22965         PR middle-end/83189
22966         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
22967         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
22968         profile.
22970 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
22972         PR middle-end/83575
22973         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
22974         when in layout mode.
22975         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
22976         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
22977         partition fixup.
22979 2018-01-10  Michael Collison  <michael.collison@arm.com>
22981         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
22982         * config/aarch64/aarch64-option-extension.def: Add
22983         AARCH64_OPT_EXTENSION of 'fp16fml'.
22984         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22985         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
22986         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
22987         * config/aarch64/constraints.md (Ui7): New constraint.
22988         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
22989         (VFMLA_SEL_W): Ditto.
22990         (f16quad): Ditto.
22991         (f16mac1): Ditto.
22992         (VFMLA16_LOW): New int iterator.
22993         (VFMLA16_HIGH): Ditto.
22994         (UNSPEC_FMLAL): New unspec.
22995         (UNSPEC_FMLSL): Ditto.
22996         (UNSPEC_FMLAL2): Ditto.
22997         (UNSPEC_FMLSL2): Ditto.
22998         (f16mac): New code attribute.
22999         * config/aarch64/aarch64-simd-builtins.def
23000         (aarch64_fmlal_lowv2sf): Ditto.
23001         (aarch64_fmlsl_lowv2sf): Ditto.
23002         (aarch64_fmlalq_lowv4sf): Ditto.
23003         (aarch64_fmlslq_lowv4sf): Ditto.
23004         (aarch64_fmlal_highv2sf): Ditto.
23005         (aarch64_fmlsl_highv2sf): Ditto.
23006         (aarch64_fmlalq_highv4sf): Ditto.
23007         (aarch64_fmlslq_highv4sf): Ditto.
23008         (aarch64_fmlal_lane_lowv2sf): Ditto.
23009         (aarch64_fmlsl_lane_lowv2sf): Ditto.
23010         (aarch64_fmlal_laneq_lowv2sf): Ditto.
23011         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
23012         (aarch64_fmlalq_lane_lowv4sf): Ditto.
23013         (aarch64_fmlsl_lane_lowv4sf): Ditto.
23014         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
23015         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
23016         (aarch64_fmlal_lane_highv2sf): Ditto.
23017         (aarch64_fmlsl_lane_highv2sf): Ditto.
23018         (aarch64_fmlal_laneq_highv2sf): Ditto.
23019         (aarch64_fmlsl_laneq_highv2sf): Ditto.
23020         (aarch64_fmlalq_lane_highv4sf): Ditto.
23021         (aarch64_fmlsl_lane_highv4sf): Ditto.
23022         (aarch64_fmlalq_laneq_highv4sf): Ditto.
23023         (aarch64_fmlsl_laneq_highv4sf): Ditto.
23024         * config/aarch64/aarch64-simd.md:
23025         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
23026         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
23027         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
23028         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
23029         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
23030         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
23031         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
23032         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
23033         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
23034         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
23035         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
23036         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
23037         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
23038         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
23039         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
23040         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
23041         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
23042         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
23043         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
23044         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
23045         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
23046         (vfmlsl_low_u32): Ditto.
23047         (vfmlalq_low_u32): Ditto.
23048         (vfmlslq_low_u32): Ditto.
23049         (vfmlal_high_u32): Ditto.
23050         (vfmlsl_high_u32): Ditto.
23051         (vfmlalq_high_u32): Ditto.
23052         (vfmlslq_high_u32): Ditto.
23053         (vfmlal_lane_low_u32): Ditto.
23054         (vfmlsl_lane_low_u32): Ditto.
23055         (vfmlal_laneq_low_u32): Ditto.
23056         (vfmlsl_laneq_low_u32): Ditto.
23057         (vfmlalq_lane_low_u32): Ditto.
23058         (vfmlslq_lane_low_u32): Ditto.
23059         (vfmlalq_laneq_low_u32): Ditto.
23060         (vfmlslq_laneq_low_u32): Ditto.
23061         (vfmlal_lane_high_u32): Ditto.
23062         (vfmlsl_lane_high_u32): Ditto.
23063         (vfmlal_laneq_high_u32): Ditto.
23064         (vfmlsl_laneq_high_u32): Ditto.
23065         (vfmlalq_lane_high_u32): Ditto.
23066         (vfmlslq_lane_high_u32): Ditto.
23067         (vfmlalq_laneq_high_u32): Ditto.
23068         (vfmlslq_laneq_high_u32): Ditto.
23069         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
23070         (AARCH64_FL_FOR_ARCH8_4): New.
23071         (AARCH64_ISA_F16FML): New ISA flag.
23072         (TARGET_F16FML): New feature flag for fp16fml.
23073         (doc/invoke.texi): Document new fp16fml option.
23075 2018-01-10  Michael Collison  <michael.collison@arm.com>
23077         * config/aarch64/aarch64-builtins.c:
23078         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
23079         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23080         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
23081         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
23082         (AARCH64_ISA_SHA3): New ISA flag.
23083         (TARGET_SHA3): New feature flag for sha3.
23084         * config/aarch64/iterators.md (sha512_op): New int attribute.
23085         (CRYPTO_SHA512): New int iterator.
23086         (UNSPEC_SHA512H): New unspec.
23087         (UNSPEC_SHA512H2): Ditto.
23088         (UNSPEC_SHA512SU0): Ditto.
23089         (UNSPEC_SHA512SU1): Ditto.
23090         * config/aarch64/aarch64-simd-builtins.def
23091         (aarch64_crypto_sha512hqv2di): New builtin.
23092         (aarch64_crypto_sha512h2qv2di): Ditto.
23093         (aarch64_crypto_sha512su0qv2di): Ditto.
23094         (aarch64_crypto_sha512su1qv2di): Ditto.
23095         (aarch64_eor3qv8hi): Ditto.
23096         (aarch64_rax1qv2di): Ditto.
23097         (aarch64_xarqv2di): Ditto.
23098         (aarch64_bcaxqv8hi): Ditto.
23099         * config/aarch64/aarch64-simd.md:
23100         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
23101         (aarch64_crypto_sha512su0qv2di): Ditto.
23102         (aarch64_crypto_sha512su1qv2di): Ditto.
23103         (aarch64_eor3qv8hi): Ditto.
23104         (aarch64_rax1qv2di): Ditto.
23105         (aarch64_xarqv2di): Ditto.
23106         (aarch64_bcaxqv8hi): Ditto.
23107         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
23108         (vsha512h2q_u64): Ditto.
23109         (vsha512su0q_u64): Ditto.
23110         (vsha512su1q_u64): Ditto.
23111         (veor3q_u16): Ditto.
23112         (vrax1q_u64): Ditto.
23113         (vxarq_u64): Ditto.
23114         (vbcaxq_u16): Ditto.
23115         * config/arm/types.md (crypto_sha512): New type attribute.
23116         (crypto_sha3): Ditto.
23117         (doc/invoke.texi): Document new sha3 option.
23119 2018-01-10  Michael Collison  <michael.collison@arm.com>
23121         * config/aarch64/aarch64-builtins.c:
23122         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
23123         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23124         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
23125         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
23126         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
23127         (AARCH64_ISA_SM4): New ISA flag.
23128         (TARGET_SM4): New feature flag for sm4.
23129         * config/aarch64/aarch64-simd-builtins.def
23130         (aarch64_sm3ss1qv4si): Ditto.
23131         (aarch64_sm3tt1aq4si): Ditto.
23132         (aarch64_sm3tt1bq4si): Ditto.
23133         (aarch64_sm3tt2aq4si): Ditto.
23134         (aarch64_sm3tt2bq4si): Ditto.
23135         (aarch64_sm3partw1qv4si): Ditto.
23136         (aarch64_sm3partw2qv4si): Ditto.
23137         (aarch64_sm4eqv4si): Ditto.
23138         (aarch64_sm4ekeyqv4si): Ditto.
23139         * config/aarch64/aarch64-simd.md:
23140         (aarch64_sm3ss1qv4si): Ditto.
23141         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
23142         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
23143         (aarch64_sm4eqv4si): Ditto.
23144         (aarch64_sm4ekeyqv4si): Ditto.
23145         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
23146         (sm3part_op): Ditto.
23147         (CRYPTO_SM3TT): Ditto.
23148         (CRYPTO_SM3PART): Ditto.
23149         (UNSPEC_SM3SS1): New unspec.
23150         (UNSPEC_SM3TT1A): Ditto.
23151         (UNSPEC_SM3TT1B): Ditto.
23152         (UNSPEC_SM3TT2A): Ditto.
23153         (UNSPEC_SM3TT2B): Ditto.
23154         (UNSPEC_SM3PARTW1): Ditto.
23155         (UNSPEC_SM3PARTW2): Ditto.
23156         (UNSPEC_SM4E): Ditto.
23157         (UNSPEC_SM4EKEY): Ditto.
23158         * config/aarch64/constraints.md (Ui2): New constraint.
23159         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
23160         * config/arm/types.md (crypto_sm3): New type attribute.
23161         (crypto_sm4): Ditto.
23162         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
23163         (vsm3tt1aq_u32): Ditto.
23164         (vsm3tt1bq_u32): Ditto.
23165         (vsm3tt2aq_u32): Ditto.
23166         (vsm3tt2bq_u32): Ditto.
23167         (vsm3partw1q_u32): Ditto.
23168         (vsm3partw2q_u32): Ditto.
23169         (vsm4eq_u32): Ditto.
23170         (vsm4ekeyq_u32): Ditto.
23171         (doc/invoke.texi): Document new sm4 option.
23173 2018-01-10  Michael Collison  <michael.collison@arm.com>
23175         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
23176         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
23177         (AARCH64_FL_FOR_ARCH8_4): New.
23178         (AARCH64_FL_V8_4): New flag.
23179         (doc/invoke.texi): Document new armv8.4-a option.
23181 2018-01-10  Michael Collison  <michael.collison@arm.com>
23183         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23184         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
23185         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
23186         * config/aarch64/aarch64-option-extension.def: Add
23187         AARCH64_OPT_EXTENSION of 'sha2'.
23188         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
23189         (crypto): Disable sha2 and aes if crypto disabled.
23190         (crypto): Enable aes and sha2 if enabled.
23191         (simd): Disable sha2 and aes if simd disabled.
23192         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
23193         New flags.
23194         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
23195         (TARGET_SHA2): New feature flag for sha2.
23196         (TARGET_AES): New feature flag for aes.
23197         * config/aarch64/aarch64-simd.md:
23198         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
23199         conditional on TARGET_AES.
23200         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
23201         (aarch64_crypto_sha1hsi): Make pattern conditional
23202         on TARGET_SHA2.
23203         (aarch64_crypto_sha1hv4si): Ditto.
23204         (aarch64_be_crypto_sha1hv4si): Ditto.
23205         (aarch64_crypto_sha1su1v4si): Ditto.
23206         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
23207         (aarch64_crypto_sha1su0v4si): Ditto.
23208         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
23209         (aarch64_crypto_sha256su0v4si): Ditto.
23210         (aarch64_crypto_sha256su1v4si): Ditto.
23211         (doc/invoke.texi): Document new aes and sha2 options.
23213 2018-01-10  Martin Sebor  <msebor@redhat.com>
23215         PR tree-optimization/83781
23216         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
23217         as string arrays.
23219 2018-01-11  Martin Sebor  <msebor@gmail.com>
23220             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
23222         PR tree-optimization/83501
23223         PR tree-optimization/81703
23225         * tree-ssa-strlen.c (get_string_cst): Rename...
23226         (get_string_len): ...to this.  Handle global constants.
23227         (handle_char_store): Adjust.
23229 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
23230             Jim Wilson  <jimw@sifive.com>
23232         * config/riscv/riscv-protos.h (riscv_output_return): New.
23233         * config/riscv/riscv.c (struct machine_function): New naked_p field.
23234         (riscv_attribute_table, riscv_output_return),
23235         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
23236         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
23237         (riscv_compute_frame_info): Only compute frame->mask if not a naked
23238         function.
23239         (riscv_expand_prologue): Add early return for naked function.
23240         (riscv_expand_epilogue): Likewise.
23241         (riscv_function_ok_for_sibcall): Return false for naked function.
23242         (riscv_set_current_function): New.
23243         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
23244         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
23245         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
23246         * doc/extend.texi (RISC-V Function Attributes): New.
23248 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
23250         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
23251         check for 128-bit long double before checking TCmode.
23252         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
23253         128-bit long doubles before checking TFmode or TCmode.
23254         (FLOAT128_IBM_P): Likewise.
23256 2018-01-10  Martin Sebor  <msebor@redhat.com>
23258         PR tree-optimization/83671
23259         * builtins.c (c_strlen): Unconditionally return zero for the empty
23260         string.
23261         Use -Warray-bounds for warnings.
23262         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
23263         for non-constant array indices with COMPONENT_REF, arrays of
23264         arrays, and pointers to arrays.
23265         (gimple_fold_builtin_strlen): Determine and set length range for
23266         non-constant character arrays.
23268 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
23270         PR middle-end/81897
23271         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
23272         empty blocks.
23274 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
23276         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
23278 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
23280         PR target/83399
23281         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
23282         VECTOR_MEM_ALTIVEC_OR_VSX_P.
23283         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
23284         indexed_or_indirect_operand predicate.
23285         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
23286         (*vsx_le_perm_load_v8hi): Likewise.
23287         (*vsx_le_perm_load_v16qi): Likewise.
23288         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
23289         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
23290         (*vsx_le_perm_store_v8hi): Likewise.
23291         (*vsx_le_perm_store_v16qi): Likewise.
23292         (eight unnamed splitters): Likewise.
23294 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
23296         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
23297         * config/rs6000/emmintrin.h: Likewise.
23298         * config/rs6000/mmintrin.h: Likewise.
23299         * config/rs6000/xmmintrin.h: Likewise.
23301 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
23303         PR c++/43486
23304         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
23305         "public_flag".
23306         * tree.c (tree_nop_conversion): Return true for location wrapper
23307         nodes.
23308         (maybe_wrap_with_location): New function.
23309         (selftest::check_strip_nops): New function.
23310         (selftest::test_location_wrappers): New function.
23311         (selftest::tree_c_tests): Call it.
23312         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
23313         (maybe_wrap_with_location): New decl.
23314         (EXPR_LOCATION_WRAPPER_P): New macro.
23315         (location_wrapper_p): New inline function.
23316         (tree_strip_any_location_wrapper): New inline function.
23318 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
23320         PR target/83735
23321         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
23322         stack_realign_offset for the largest alignment of stack slot
23323         actually used.
23324         (ix86_find_max_used_stack_alignment): New function.
23325         (ix86_finalize_stack_frame_flags): Use it.  Set
23326         max_used_stack_alignment if we don't realign stack.
23327         * config/i386/i386.h (machine_function): Add
23328         max_used_stack_alignment.
23330 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
23332         * config/arm/arm.opt (-mbranch-cost): New option.
23333         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
23334         account.
23336 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
23338         PR target/83629
23339         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
23340         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
23342 2018-01-10  Richard Biener  <rguenther@suse.de>
23344         PR debug/83765
23345         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
23346         early out so it also covers the case where we have a non-NULL
23347         origin.
23349 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
23351         PR tree-optimization/83753
23352         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
23353         for non-strided grouped accesses if the number of elements is 1.
23355 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
23357         PR target/81616
23358         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
23359         * i386.h (TARGET_USE_GATHER): Define.
23360         * x86-tune.def (X86_TUNE_USE_GATHER): New.
23362 2018-01-10  Martin Liska  <mliska@suse.cz>
23364         PR bootstrap/82831
23365         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
23366         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
23367         partitioning.
23368         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
23369         CLEANUP_NO_PARTITIONING is not set.
23371 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
23373         * doc/rtl.texi: Remove documentation of (const ...) wrappers
23374         for vectors, as a partial revert of r254296.
23375         * rtl.h (const_vec_p): Delete.
23376         (const_vec_duplicate_p): Don't test for vector CONSTs.
23377         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
23378         * expmed.c (make_tree): Likewise.
23380         Revert:
23381         * common.md (E, F): Use CONSTANT_P instead of checking for
23382         CONST_VECTOR.
23383         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
23384         checking for CONST_VECTOR.
23386 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
23388         PR middle-end/83575
23389         * predict.c (force_edge_cold): Handle in more sane way edges
23390         with no prediction.
23392 2018-01-09  Carl Love  <cel@us.ibm.com>
23394         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
23395         V4SI, V4SF types.
23396         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
23397         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
23398         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
23399         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
23400         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
23401         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
23402         * config/rs6000/rs6000-protos.h: Add extern defition for
23403         rs6000_generate_float2_double_code.
23404         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
23405         function.
23406         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
23407         (float2_v2df): Add define_expand.
23409 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
23411         PR target/83628
23412         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
23413         op_mode in the force_to_mode call.
23415 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
23417         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
23418         instead of checking each element individually.
23419         (aarch64_evpc_uzp): Likewise.
23420         (aarch64_evpc_zip): Likewise.
23421         (aarch64_evpc_ext): Likewise.
23422         (aarch64_evpc_rev): Likewise.
23423         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
23424         instead of checking each element individually.  Return true without
23425         generating rtl if
23426         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
23427         whether all selected elements come from the same input, instead of
23428         checking each element individually.  Remove calls to gen_rtx_REG,
23429         start_sequence and end_sequence and instead assert that no rtl is
23430         generated.
23432 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
23434         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
23435         order of HIGH and CONST checks.
23437 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
23439         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
23440         if the destination isn't an SSA_NAME.
23442 2018-01-09  Richard Biener  <rguenther@suse.de>
23444         PR tree-optimization/83668
23445         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
23446         move prologue...
23447         (canonicalize_loop_form): ... here, renamed from ...
23448         (canonicalize_loop_closed_ssa_form): ... this and amended to
23449         swap successor edges for loop exit blocks to make us use
23450         the RPO order we need for initial schedule generation.
23452 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
23454         PR tree-optimization/64811
23455         * match.pd: When optimizing comparisons with Inf, avoid
23456         introducing or losing exceptions from comparisons with NaN.
23458 2018-01-09  Martin Liska  <mliska@suse.cz>
23460         PR sanitizer/82517
23461         * asan.c (shadow_mem_size): Add gcc_assert.
23463 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
23465         Don't save registers in main().
23467         PR target/83738
23468         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
23469         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
23470         * config/avr/avr.c (avr_set_current_function): Don't error if
23471         naked, OS_task or OS_main are specified at the same time.
23472         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
23473         OS_main.
23474         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
23475         attribute.
23476         * common/config/avr/avr-common.c (avr_option_optimization_table):
23477         Switch on -mmain-is-OS_task for optimizing compilations.
23479 2018-01-09  Richard Biener  <rguenther@suse.de>
23481         PR tree-optimization/83572
23482         * graphite.c: Include cfganal.h.
23483         (graphite_transform_loops): Connect infinite loops to exit
23484         and remove fake edges at the end.
23486 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
23488         * ipa-inline.c (edge_badness): Revert accidental checkin.
23490 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
23492         PR ipa/80763
23493         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
23494         symbols; not inline clones.
23496 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
23498         PR target/83507
23499         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
23500         hard registers.  Formatting fixes.
23502         PR preprocessor/83722
23503         * gcc.c (try_generate_repro): Pass
23504         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
23505         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
23506         do_report_bug.
23508 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
23509             Kito Cheng  <kito.cheng@gmail.com>
23511         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
23512         (riscv_leaf_function_p): Delete.
23513         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
23515 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23517         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
23518         function.
23519         (do_ifelse): New function.
23520         (do_isel): New function.
23521         (do_sub3): New function.
23522         (do_add3): New function.
23523         (do_load_mask_compare): New function.
23524         (do_overlap_load_compare): New function.
23525         (expand_compare_loop): New function.
23526         (expand_block_compare): Call expand_compare_loop() when appropriate.
23527         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
23528         option description.
23529         (-mblock-compare-inline-loop-limit): New option.
23531 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23533         PR target/83677
23534         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
23535         Reverse order of second and third operands in first alternative.
23536         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
23537         of first and second elements in UNSPEC_VPERMR vector.
23538         (altivec_expand_vec_perm_le): Likewise.
23540 2018-01-08  Jeff Law  <law@redhat.com>
23542         PR rtl-optimizatin/81308
23543         * tree-switch-conversion.c (cfg_altered): New file scoped static.
23544         (process_switch): If group_case_labels makes a change, then set
23545         cfg_altered.
23546         (pass_convert_switch::execute): If a switch is converted, then
23547         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
23549         PR rtl-optimization/81308
23550         * recog.c (split_all_insns): Conditionally cleanup the CFG after
23551         splitting insns.
23553 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
23555         PR target/83663 - Revert r255946
23556         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
23557         generation for cases where splatting a value is not useful.
23558         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
23559         across a vec_duplicate and a paradoxical subreg forming a vector
23560         mode to a vec_concat.
23562 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23564         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
23565         -march=armv8.3-a variants.
23566         * config/arm/t-multilib: Likewise.
23567         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
23569 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23571         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
23572         to generate rtl.
23573         (cceq_ior_compare_complement): Give it a name so I can use it, and
23574         change boolean_or_operator predicate to boolean_operator so it can
23575         be used to generate a crand.
23576         (eqne): New code iterator.
23577         (bd/bd_neg): New code_attrs.
23578         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
23579         a single define_insn.
23580         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
23581         decrement (bdnzt/bdnzf/bdzt/bdzf).
23582         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
23583         with the new names of the branch decrement patterns, and added the
23584         names of the branch decrement conditional patterns.
23586 2018-01-08  Richard Biener  <rguenther@suse.de>
23588         PR tree-optimization/83563
23589         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
23590         cache.
23592 2018-01-08  Richard Biener  <rguenther@suse.de>
23594         PR middle-end/83713
23595         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
23597 2018-01-08  Richard Biener  <rguenther@suse.de>
23599         PR tree-optimization/83685
23600         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
23601         references to abnormals.
23603 2018-01-08  Richard Biener  <rguenther@suse.de>
23605         PR lto/83719
23606         * dwarf2out.c (output_indirect_strings): Handle empty
23607         skeleton_debug_str_hash.
23608         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
23610 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
23612         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
23613         (emit_store_direct): Likewise.
23614         (arc_trampoline_adjust_address): Likewise.
23615         (arc_asm_trampoline_template): New function.
23616         (arc_initialize_trampoline): Use asm_trampoline_template.
23617         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
23618         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
23619         * config/arc/arc.md (flush_icache): Delete pattern.
23621 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
23623         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
23624         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
23625         munaligned-access.
23627 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
23629         PR target/83681
23630         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
23631         by not USED_FOR_TARGET.
23632         (make_pass_resolve_sw_modes): Likewise.
23634 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
23636         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
23637         USED_FOR_TARGET.
23639 2018-01-08  Richard Biener  <rguenther@suse.de>
23641         PR middle-end/83580
23642         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
23644 2018-01-08  Richard Biener  <rguenther@suse.de>
23646         PR middle-end/83517
23647         * match.pd ((t * 2) / 2) -> t): Add missing :c.
23649 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
23651         PR middle-end/81897
23652         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
23653         basic blocks with a small number of successors.
23654         (convert_control_dep_chain_into_preds): Improve handling of
23655         forwarder blocks.
23656         (dump_predicates): Split apart into...
23657         (dump_pred_chain): ...here...
23658         (dump_pred_info): ...and here.
23659         (can_one_predicate_be_invalidated_p): Add debugging printfs.
23660         (can_chain_union_be_invalidated_p): Improve check for invalidation
23661         of paths.
23662         (uninit_uses_cannot_happen): Avoid unnecessary if
23663         convert_control_dep_chain_into_preds yielded nothing.
23665 2018-01-06  Martin Sebor  <msebor@redhat.com>
23667         PR tree-optimization/83640
23668         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
23669         subtracting negative offset from size.
23670         (builtin_access::overlap): Adjust offset bounds of the access to fall
23671         within the size of the object if possible.
23673 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
23675         PR rtl-optimization/83699
23676         * expmed.c (extract_bit_field_1): Restrict the vector usage of
23677         extract_bit_field_as_subreg to cases in which the extracted
23678         value is also a vector.
23680         * lra-constraints.c (process_alt_operands): Test for the equivalence
23681         substitutions when detecting a possible reload cycle.
23683 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
23685         PR debug/83480
23686         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
23687         by default if flag_selective_schedling{,2}.  Formatting fixes.
23689         PR rtl-optimization/83682
23690         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
23691         if it has non-VECTOR_MODE element mode.
23692         (vec_duplicate_p): Likewise.
23694         PR middle-end/83694
23695         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
23696         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
23698 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
23700         PR target/83604
23701         * config/i386/i386-builtin.def
23702         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
23703         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
23704         Require also OPTION_MASK_ISA_AVX512F in addition to
23705         OPTION_MASK_ISA_GFNI.
23706         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
23707         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
23708         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
23709         to OPTION_MASK_ISA_GFNI.
23710         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
23711         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
23712         OPTION_MASK_ISA_AVX512BW.
23713         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
23714         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
23715         addition to OPTION_MASK_ISA_GFNI.
23716         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
23717         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
23718         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
23719         to OPTION_MASK_ISA_GFNI.
23720         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
23721         a requirement for all ISAs rather than any of them with a few
23722         exceptions.
23723         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
23724         processing.
23725         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
23726         bitmasks to be enabled with 3 exceptions, instead of requiring any
23727         enabled ISA with lots of exceptions.
23728         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
23729         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
23730         Change avx512bw in isa attribute to avx512f.
23731         * config/i386/sgxintrin.h: Add license boilerplate.
23732         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
23733         to __AVX512F__ and __AVX512VL to __AVX512VL__.
23734         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
23735         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
23736         defined.
23737         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
23738         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
23739         temporarily sse2 rather than sse if not enabled already.
23741         PR target/83604
23742         * config/i386/sse.md (VI248_VLBW): Rename to ...
23743         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
23744         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
23745         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
23746         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
23747         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
23748         mode iterator instead of VI248_VLBW.
23750 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
23752         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
23753         (record_modified): Skip clobbers; add debug output.
23754         (param_change_prob): Use sreal frequencies.
23756 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
23758         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
23759         punt for user-aligned variables.
23761 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
23763         * tree-chrec.c (chrec_contains_symbols): Return true for
23764         POLY_INT_CST.
23766 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
23768         PR target/82439
23769         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
23770         of (x|y) == x for BICS pattern.
23772 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
23774         PR tree-optimization/83605
23775         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
23776         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
23777         can throw.
23779 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
23781         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
23782         * config/epiphany/rtems.h: New file.
23784 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
23785             Uros Bizjak  <ubizjak@gmail.com>
23787         PR target/83554
23788         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
23789         QIreg_operand instead of register_operand predicate.
23790         * config/i386/i386.c (ix86_rop_should_change_byte_p,
23791         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
23792         comments instead of -fmitigate[-_]rop.
23794 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
23796         PR bootstrap/81926
23797         * cgraphunit.c (symbol_table::compile): Switch to text_section
23798         before calling assembly_start debug hook.
23799         * run-rtl-passes.c (run_rtl_passes): Likewise.
23800         Include output.h.
23802 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23804         * tree-vrp.c (extract_range_from_binary_expr_1): Check
23805         range_int_cst_p rather than !symbolic_range_p before calling
23806         extract_range_from_multiplicative_op_1.
23808 2018-01-04  Jeff Law  <law@redhat.com>
23810         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
23811         redundant test in assertion.
23813 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23815         * doc/rtl.texi: Document machine_mode wrapper classes.
23817 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23819         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
23820         using tree_to_uhwi.
23822 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23824         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
23825         the VEC_PERM_EXPR fold to fail.
23827 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
23829         PR debug/83585
23830         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
23831         to switched_sections.
23833 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23835         PR target/83680
23836         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
23837         test for d.testing.
23839 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
23841         PR target/83387
23842         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
23843         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
23845 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
23847         PR debug/83666
23848         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
23849         is BLKmode and bitpos not zero or mode change is needed.
23851 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23853         PR target/83675
23854         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
23855         TARGET_VIS2.
23857 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
23859         PR target/83628
23860         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
23861         instead of MULT rtx.  Update all corresponding splitters.
23862         (*saddl_se): Ditto.
23863         (*ssub<modesuffix>): Ditto.
23864         (*ssubl_se): Ditto.
23865         (*cmp_sadd_di): Update split patterns.
23866         (*cmp_sadd_si): Ditto.
23867         (*cmp_sadd_sidi): Ditto.
23868         (*cmp_ssub_di): Ditto.
23869         (*cmp_ssub_si): Ditto.
23870         (*cmp_ssub_sidi): Ditto.
23871         * config/alpha/predicates.md (const23_operand): New predicate.
23872         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
23873         Look for ASHIFT, not MULT inner operand.
23874         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
23876 2018-01-04  Martin Liska  <mliska@suse.cz>
23878         PR gcov-profile/83669
23879         * gcov.c (output_intermediate_file): Add version to intermediate
23880         gcov file.
23881         * doc/gcov.texi: Document new field 'version' in intermediate
23882         file format. Fix location of '-k' option of gcov command.
23884 2018-01-04  Martin Liska  <mliska@suse.cz>
23886         PR ipa/82352
23887         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
23889 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
23891         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
23893 2018-01-03  Martin Sebor  <msebor@redhat.com>
23895         PR tree-optimization/83655
23896         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
23897         checking calls with invalid arguments.
23899 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23901         * tree-vect-stmts.c (vect_get_store_rhs): New function.
23902         (vectorizable_mask_load_store): Delete.
23903         (vectorizable_call): Return false for masked loads and stores.
23904         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
23905         instead of gimple_assign_rhs1.
23906         (vectorizable_load): Handle IFN_MASK_LOAD.
23907         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
23909 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23911         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
23912         split out from..,
23913         (vectorizable_mask_load_store): ...here.
23914         (vectorizable_load): ...and here.
23916 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23918         * tree-vect-stmts.c (vect_build_all_ones_mask)
23919         (vect_build_zero_merge_argument): New functions, split out from...
23920         (vectorizable_load): ...here.
23922 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23924         * tree-vect-stmts.c (vect_check_store_rhs): New function,
23925         split out from...
23926         (vectorizable_mask_load_store): ...here.
23927         (vectorizable_store): ...and here.
23929 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23931         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
23932         split out from...
23933         (vectorizable_mask_load_store): ...here.
23935 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23937         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
23938         (vect_model_store_cost): Take a vec_load_store_type instead of a
23939         vect_def_type.
23940         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
23941         (vect_model_store_cost): Take a vec_load_store_type instead of a
23942         vect_def_type.
23943         (vectorizable_mask_load_store): Update accordingly.
23944         (vectorizable_store): Likewise.
23945         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
23947 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23949         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
23950         IFN_MASK_LOAD calls here rather than...
23951         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
23953 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23954             Alan Hayward  <alan.hayward@arm.com>
23955             David Sherwood  <david.sherwood@arm.com>
23957         * expmed.c (extract_bit_field_1): For vector extracts,
23958         fall back to extract_bit_field_as_subreg if vec_extract
23959         isn't available.
23961 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23962             Alan Hayward  <alan.hayward@arm.com>
23963             David Sherwood  <david.sherwood@arm.com>
23965         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
23966         they are variable or constant sized.
23967         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
23968         slots for constant-sized data.
23970 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23971             Alan Hayward  <alan.hayward@arm.com>
23972             David Sherwood  <david.sherwood@arm.com>
23974         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
23975         handling COND_EXPRs with boolean comparisons, try to find a better
23976         basis for the mask type than the boolean itself.
23978 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23980         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
23981         is calculated and how it can be overridden.
23982         * genmodes.c (max_bitsize_mode_any_mode): New variable.
23983         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
23984         if defined.
23985         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
23986         if nonzero.
23988 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23989             Alan Hayward  <alan.hayward@arm.com>
23990             David Sherwood  <david.sherwood@arm.com>
23992         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
23993         Remove the mode argument.
23994         (aarch64_simd_valid_immediate): Remove the mode and inverse
23995         arguments.
23996         * config/aarch64/iterators.md (bitsize): New iterator.
23997         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
23998         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
23999         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
24000         aarch64_simd_valid_immediate.
24001         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
24002         (aarch64_reg_or_bic_imm): Likewise.
24003         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
24004         with an insn_type enum and msl with a modifier_type enum.
24005         Replace element_width with a scalar_mode.  Change the shift
24006         to unsigned int.  Add constructors for scalar_float_mode and
24007         scalar_int_mode elements.
24008         (aarch64_vect_float_const_representable_p): Delete.
24009         (aarch64_can_const_movi_rtx_p)
24010         (aarch64_simd_scalar_immediate_valid_for_move)
24011         (aarch64_simd_make_constant): Update call to
24012         aarch64_simd_valid_immediate.
24013         (aarch64_advsimd_valid_immediate_hs): New function.
24014         (aarch64_advsimd_valid_immediate): Likewise.
24015         (aarch64_simd_valid_immediate): Remove mode and inverse
24016         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
24017         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
24018         and aarch64_float_const_representable_p on the result.
24019         (aarch64_output_simd_mov_immediate): Remove mode argument.
24020         Update call to aarch64_simd_valid_immediate and use of
24021         simd_immediate_info.
24022         (aarch64_output_scalar_simd_mov_immediate): Update call
24023         accordingly.
24025 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24026             Alan Hayward  <alan.hayward@arm.com>
24027             David Sherwood  <david.sherwood@arm.com>
24029         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
24030         (mode_nunits): Likewise CONST_MODE_NUNITS.
24031         * machmode.def (ADJUST_NUNITS): Document.
24032         * genmodes.c (mode_data::need_nunits_adj): New field.
24033         (blank_mode): Update accordingly.
24034         (adj_nunits): New variable.
24035         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
24036         parameter.
24037         (emit_mode_size_inline): Set need_bytesize_adj for all modes
24038         listed in adj_nunits.
24039         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
24040         listed in adj_nunits.  Don't emit case statements for such modes.
24041         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
24042         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
24043         nothing if adj_nunits is nonnull.
24044         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
24045         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
24046         (emit_mode_fbit): Update use of print_maybe_const_decl.
24047         (emit_move_size): Likewise.  Treat the array as non-const
24048         if adj_nunits.
24049         (emit_mode_adjustments): Handle adj_nunits.
24051 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24053         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
24054         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
24055         (VECTOR_MODES): Use it.
24056         (make_vector_modes): Take the prefix as an argument.
24058 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24059             Alan Hayward  <alan.hayward@arm.com>
24060             David Sherwood  <david.sherwood@arm.com>
24062         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
24063         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
24064         for MODE_VECTOR_BOOL.
24065         * machmode.def (VECTOR_BOOL_MODE): Document.
24066         * genmodes.c (VECTOR_BOOL_MODE): New macro.
24067         (make_vector_bool_mode): New function.
24068         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
24069         MODE_VECTOR_BOOL.
24070         * lto-streamer-in.c (lto_input_mode_table): Likewise.
24071         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
24072         Likewise.
24073         * stor-layout.c (int_mode_for_mode): Likewise.
24074         * tree.c (build_vector_type_for_mode): Likewise.
24075         * varasm.c (output_constant_pool_2): Likewise.
24076         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
24077         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
24078         for MODE_VECTOR_BOOL.
24079         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
24080         of mode class checks.
24081         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
24082         instead of a list of mode class checks.
24083         (expand_vector_scalar_condition): Likewise.
24084         (type_for_widest_vector_mode): Handle BImode as an inner mode.
24086 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24087             Alan Hayward  <alan.hayward@arm.com>
24088             David Sherwood  <david.sherwood@arm.com>
24090         * machmode.h (mode_size): Change from unsigned short to
24091         poly_uint16_pod.
24092         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
24093         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24094         or if measurement_type is not polynomial.
24095         (fixed_size_mode::includes_p): Check for constant-sized modes.
24096         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
24097         return a poly_uint16 rather than an unsigned short.
24098         (emit_mode_size): Change the type of mode_size from unsigned short
24099         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
24100         (emit_mode_adjustments): Cope with polynomial vector sizes.
24101         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24102         for GET_MODE_SIZE.
24103         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24104         for GET_MODE_SIZE.
24105         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
24106         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
24107         * caller-save.c (setup_save_areas): Likewise.
24108         (replace_reg_with_saved_mem): Likewise.
24109         * calls.c (emit_library_call_value_1): Likewise.
24110         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
24111         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
24112         (gen_lowpart_for_combine): Likewise.
24113         * convert.c (convert_to_integer_1): Likewise.
24114         * cse.c (equiv_constant, cse_insn): Likewise.
24115         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
24116         (cselib_subst_to_values): Likewise.
24117         * dce.c (word_dce_process_block): Likewise.
24118         * df-problems.c (df_word_lr_mark_ref): Likewise.
24119         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
24120         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
24121         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
24122         (rtl_for_decl_location): Likewise.
24123         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
24124         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
24125         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
24126         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
24127         (expand_expr_real_1): Likewise.
24128         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
24129         (pad_below): Likewise.
24130         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24131         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
24132         * ira.c (get_subreg_tracking_sizes): Likewise.
24133         * ira-build.c (ira_create_allocno_objects): Likewise.
24134         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
24135         (ira_sort_regnos_for_alter_reg): Likewise.
24136         * ira-costs.c (record_operand_costs): Likewise.
24137         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
24138         (resolve_simple_move): Likewise.
24139         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
24140         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
24141         (lra_constraints): Likewise.
24142         (CONST_POOL_OK_P): Reject variable-sized modes.
24143         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
24144         (add_pseudo_to_slot, lra_spill): Likewise.
24145         * omp-low.c (omp_clause_aligned_alignment): Likewise.
24146         * optabs-query.c (get_best_extraction_insn): Likewise.
24147         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24148         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
24149         (expand_mult_highpart, valid_multiword_target_p): Likewise.
24150         * recog.c (offsettable_address_addr_space_p): Likewise.
24151         * regcprop.c (maybe_mode_change): Likewise.
24152         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
24153         * regrename.c (build_def_use): Likewise.
24154         * regstat.c (dump_reg_info): Likewise.
24155         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
24156         (find_reloads, find_reloads_subreg_address): Likewise.
24157         * reload1.c (eliminate_regs_1): Likewise.
24158         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
24159         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
24160         (simplify_binary_operation_1, simplify_subreg): Likewise.
24161         * targhooks.c (default_function_arg_padding): Likewise.
24162         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
24163         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
24164         (verify_gimple_assign_ternary): Likewise.
24165         * tree-inline.c (estimate_move_cost): Likewise.
24166         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24167         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
24168         (get_address_cost_ainc): Likewise.
24169         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
24170         (vect_supportable_dr_alignment): Likewise.
24171         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24172         (vectorizable_reduction): Likewise.
24173         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
24174         (vectorizable_operation, vectorizable_load): Likewise.
24175         * tree.c (build_same_sized_truth_vector_type): Likewise.
24176         * valtrack.c (cleanup_auto_inc_dec): Likewise.
24177         * var-tracking.c (emit_note_insn_var_location): Likewise.
24178         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
24179         (ADDR_VEC_ALIGN): Likewise.
24181 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24182             Alan Hayward  <alan.hayward@arm.com>
24183             David Sherwood  <david.sherwood@arm.com>
24185         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
24186         unsigned short.
24187         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24188         or if measurement_type is polynomial.
24189         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
24190         * combine.c (make_extraction): Likewise.
24191         * dse.c (find_shift_sequence): Likewise.
24192         * dwarf2out.c (mem_loc_descriptor): Likewise.
24193         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
24194         (extract_bit_field, extract_low_bits): Likewise.
24195         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
24196         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
24197         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
24198         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
24199         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24200         * reload.c (find_reloads): Likewise.
24201         * reload1.c (alter_reg): Likewise.
24202         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
24203         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
24204         * tree-if-conv.c (predicate_mem_writes): Likewise.
24205         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
24206         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
24207         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
24208         * valtrack.c (dead_debug_insert_temp): Likewise.
24209         * varasm.c (mergeable_constant_section): Likewise.
24210         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
24212 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24213             Alan Hayward  <alan.hayward@arm.com>
24214             David Sherwood  <david.sherwood@arm.com>
24216         * expr.c (expand_assignment): Cope with polynomial mode sizes
24217         when assigning to a CONCAT.
24219 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24220             Alan Hayward  <alan.hayward@arm.com>
24221             David Sherwood  <david.sherwood@arm.com>
24223         * machmode.h (mode_precision): Change from unsigned short to
24224         poly_uint16_pod.
24225         (mode_to_precision): Return a poly_uint16 rather than an unsigned
24226         short.
24227         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
24228         or if measurement_type is not polynomial.
24229         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
24230         in which the mode is already known to be a scalar_int_mode.
24231         * genmodes.c (emit_mode_precision): Change the type of mode_precision
24232         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
24233         initializer.
24234         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24235         for GET_MODE_PRECISION.
24236         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24237         for GET_MODE_PRECISION.
24238         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
24239         as polynomial.
24240         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
24241         (expand_field_assignment, make_extraction): Likewise.
24242         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
24243         (get_last_value): Likewise.
24244         * convert.c (convert_to_integer_1): Likewise.
24245         * cse.c (cse_insn): Likewise.
24246         * expr.c (expand_expr_real_1): Likewise.
24247         * lra-constraints.c (simplify_operand_subreg): Likewise.
24248         * optabs-query.c (can_atomic_load_p): Likewise.
24249         * optabs.c (expand_atomic_load): Likewise.
24250         (expand_atomic_store): Likewise.
24251         * ree.c (combine_reaching_defs): Likewise.
24252         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
24253         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
24254         * tree.h (type_has_mode_precision_p): Likewise.
24255         * ubsan.c (instrument_si_overflow): Likewise.
24257 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24258             Alan Hayward  <alan.hayward@arm.com>
24259             David Sherwood  <david.sherwood@arm.com>
24261         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
24262         polynomial numbers of units.
24263         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
24264         (valid_vector_subparts_p): New function.
24265         (build_vector_type): Remove temporary shim and take the number
24266         of units as a poly_uint64 rather than an int.
24267         (build_opaque_vector_type): Take the number of units as a
24268         poly_uint64 rather than an int.
24269         * tree.c (build_vector_from_ctor): Handle polynomial
24270         TYPE_VECTOR_SUBPARTS.
24271         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
24272         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
24273         (build_vector_from_val): If the number of units is variable,
24274         use build_vec_duplicate_cst for constant operands and
24275         VEC_DUPLICATE_EXPR otherwise.
24276         (make_vector_type): Remove temporary is_constant ().
24277         (build_vector_type, build_opaque_vector_type): Take the number of
24278         units as a poly_uint64 rather than an int.
24279         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
24280         VECTOR_CST_NELTS.
24281         * cfgexpand.c (expand_debug_expr): Likewise.
24282         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
24283         (store_constructor, expand_expr_real_1): Likewise.
24284         (const_scalar_mask_from_tree): Likewise.
24285         * fold-const-call.c (fold_const_reduction): Likewise.
24286         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
24287         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
24288         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
24289         (fold_relational_const): Likewise.
24290         (native_interpret_vector): Likewise.  Change the size from an
24291         int to an unsigned int.
24292         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
24293         TYPE_VECTOR_SUBPARTS.
24294         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
24295         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
24296         duplicating a non-constant operand into a variable-length vector.
24297         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
24298         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
24299         * ipa-icf.c (sem_variable::equals): Likewise.
24300         * match.pd: Likewise.
24301         * omp-simd-clone.c (simd_clone_subparts): Likewise.
24302         * print-tree.c (print_node): Likewise.
24303         * stor-layout.c (layout_type): Likewise.
24304         * targhooks.c (default_builtin_vectorization_cost): Likewise.
24305         * tree-cfg.c (verify_gimple_comparison): Likewise.
24306         (verify_gimple_assign_binary): Likewise.
24307         (verify_gimple_assign_ternary): Likewise.
24308         (verify_gimple_assign_single): Likewise.
24309         * tree-pretty-print.c (dump_generic_node): Likewise.
24310         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24311         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
24312         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
24313         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
24314         (vect_shift_permute_load_chain): Likewise.
24315         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
24316         (expand_vector_condition, optimize_vector_constructor): Likewise.
24317         (lower_vec_perm, get_compute_type): Likewise.
24318         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24319         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
24320         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
24321         (vect_recog_mask_conversion_pattern): Likewise.
24322         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
24323         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
24324         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24325         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
24326         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
24327         (vectorizable_shift, vectorizable_operation, vectorizable_store)
24328         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
24329         (supportable_widening_operation): Likewise.
24330         (supportable_narrowing_operation): Likewise.
24331         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
24332         Likewise.
24333         * varasm.c (output_constant): Likewise.
24335 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24336             Alan Hayward  <alan.hayward@arm.com>
24337             David Sherwood  <david.sherwood@arm.com>
24339         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
24340         so that both the length == 3 and length != 3 cases set up their
24341         own permute vectors.  Add comments explaining why we know the
24342         number of elements is constant.
24343         (vect_permute_load_chain): Likewise.
24345 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24346             Alan Hayward  <alan.hayward@arm.com>
24347             David Sherwood  <david.sherwood@arm.com>
24349         * machmode.h (mode_nunits): Change from unsigned char to
24350         poly_uint16_pod.
24351         (ONLY_FIXED_SIZE_MODES): New macro.
24352         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
24353         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
24354         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
24355         New typedefs.
24356         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
24357         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
24358         or if measurement_type is not polynomial.
24359         * genmodes.c (ZERO_COEFFS): New macro.
24360         (emit_mode_nunits_inline): Make mode_nunits_inline return a
24361         poly_uint16.
24362         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
24363         Use ZERO_COEFFS when emitting initializers.
24364         * data-streamer.h (bp_pack_poly_value): New function.
24365         (bp_unpack_poly_value): Likewise.
24366         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24367         for GET_MODE_NUNITS.
24368         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24369         for GET_MODE_NUNITS.
24370         * tree.c (make_vector_type): Remove temporary shim and make
24371         the real function take the number of units as a poly_uint64
24372         rather than an int.
24373         (build_vector_type_for_mode): Handle polynomial nunits.
24374         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
24375         * emit-rtl.c (const_vec_series_p_1): Likewise.
24376         (gen_rtx_CONST_VECTOR): Likewise.
24377         * fold-const.c (test_vec_duplicate_folding): Likewise.
24378         * genrecog.c (validate_pattern): Likewise.
24379         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
24380         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24381         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
24382         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
24383         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
24384         * rtlanal.c (subreg_get_info): Likewise.
24385         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24386         (vect_grouped_load_supported): Likewise.
24387         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
24388         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
24389         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
24390         (simplify_const_unary_operation, simplify_binary_operation_1)
24391         (simplify_const_binary_operation, simplify_ternary_operation)
24392         (test_vector_ops_duplicate, test_vector_ops): Likewise.
24393         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
24394         instead of CONST_VECTOR_NUNITS.
24395         * varasm.c (output_constant_pool_2): Likewise.
24396         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
24397         explicit-encoded elements in the XVEC for variable-length vectors.
24399 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24401         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
24403 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24404             Alan Hayward  <alan.hayward@arm.com>
24405             David Sherwood  <david.sherwood@arm.com>
24407         * coretypes.h (fixed_size_mode): Declare.
24408         (fixed_size_mode_pod): New typedef.
24409         * builtins.h (target_builtins::x_apply_args_mode)
24410         (target_builtins::x_apply_result_mode): Change type to
24411         fixed_size_mode_pod.
24412         * builtins.c (apply_args_size, apply_result_size, result_vector)
24413         (expand_builtin_apply_args_1, expand_builtin_apply)
24414         (expand_builtin_return): Update accordingly.
24416 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24418         * cse.c (hash_rtx_cb): Hash only the encoded elements.
24419         * cselib.c (cselib_hash_rtx): Likewise.
24420         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
24421         CONST_VECTOR encoding.
24423 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
24424             Jeff Law  <law@redhat.com>
24426         PR target/83641
24427         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
24428         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
24429         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
24430         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
24432         PR target/83641
24433         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
24434         explicitly probe *sp in a noreturn function if there were any callee
24435         register saves or frame pointer is needed.
24437 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
24439         PR debug/83621
24440         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
24441         BLKmode for ternary, binary or unary expressions.
24443         PR debug/83645
24444         * var-tracking.c (delete_vta_debug_insn): New inline function.
24445         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
24446         insns from get_insns () to NULL instead of each bb separately.
24447         Use delete_vta_debug_insn.  No longer static.
24448         (vt_debug_insns_local, variable_tracking_main_1): Adjust
24449         delete_vta_debug_insns callers.
24450         * rtl.h (delete_vta_debug_insns): Declare.
24451         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
24452         instead of variable_tracking_main.
24454 2018-01-03  Martin Sebor  <msebor@redhat.com>
24456         PR tree-optimization/83603
24457         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
24458         arguments past the endof the argument list in functions declared
24459         without a prototype.
24460         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
24461         Avoid checking when arguments are null.
24463 2018-01-03  Martin Sebor  <msebor@redhat.com>
24465         PR c/83559
24466         * doc/extend.texi (attribute const): Fix a typo.
24467         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
24468         issuing -Wsuggest-attribute for void functions.
24470 2018-01-03  Martin Sebor  <msebor@redhat.com>
24472         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
24473         offset_int::from instead of wide_int::to_shwi.
24474         (maybe_diag_overlap): Remove assertion.
24475         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
24476         * gimple-ssa-sprintf.c (format_directive): Same.
24477         (parse_directive): Same.
24478         (sprintf_dom_walker::compute_format_length): Same.
24479         (try_substitute_return_value): Same.
24481 2018-01-03  Jeff Law  <law@redhat.com>
24483         PR middle-end/83654
24484         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
24485         non-constant residual for zero at runtime and avoid probing in
24486         that case.  Reorganize code for trailing problem to mirror handling
24487         of the residual.
24489 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
24491         PR tree-optimization/83501
24492         * tree-ssa-strlen.c (get_string_cst): New.
24493         (handle_char_store): Call get_string_cst.
24495 2018-01-03  Martin Liska  <mliska@suse.cz>
24497         PR tree-optimization/83593
24498         * tree-ssa-strlen.c: Include tree-cfg.h.
24499         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
24500         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
24501         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
24502         to false.
24503         (strlen_dom_walker::before_dom_children): Call
24504         gimple_purge_dead_eh_edges. Dump tranformation with details
24505         dump flags.
24506         (strlen_dom_walker::before_dom_children): Update call by adding
24507         new argument cleanup_eh.
24508         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
24510 2018-01-03  Martin Liska  <mliska@suse.cz>
24512         PR ipa/83549
24513         * cif-code.def (VARIADIC_THUNK): New enum value.
24514         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
24515         thunks.
24517 2018-01-03  Jan Beulich  <jbeulich@suse.com>
24519         * sse.md (mov<mode>_internal): Tighten condition for when to use
24520         vmovdqu<ssescalarsize> for TI and OI modes.
24522 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
24524         Update copyright years.
24526 2018-01-03  Martin Liska  <mliska@suse.cz>
24528         PR ipa/83594
24529         * ipa-visibility.c (function_and_variable_visibility): Skip
24530         functions with noipa attribure.
24532 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
24534         * gcc.c (process_command): Update copyright notice dates.
24535         * gcov-dump.c (print_version): Ditto.
24536         * gcov.c (print_version): Ditto.
24537         * gcov-tool.c (print_version): Ditto.
24538         * gengtype.c (create_file): Ditto.
24539         * doc/cpp.texi: Bump @copying's copyright year.
24540         * doc/cppinternals.texi: Ditto.
24541         * doc/gcc.texi: Ditto.
24542         * doc/gccint.texi: Ditto.
24543         * doc/gcov.texi: Ditto.
24544         * doc/install.texi: Ditto.
24545         * doc/invoke.texi: Ditto.
24547 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24549         * vector-builder.h (vector_builder::m_full_nelts): Change from
24550         unsigned int to poly_uint64.
24551         (vector_builder::full_nelts): Update prototype accordingly.
24552         (vector_builder::new_vector): Likewise.
24553         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
24554         (vector_builder::operator ==): Likewise.
24555         (vector_builder::finalize): Likewise.
24556         * int-vector-builder.h (int_vector_builder::int_vector_builder):
24557         Take the number of elements as a poly_uint64 rather than an
24558         unsigned int.
24559         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
24560         from unsigned int to poly_uint64.
24561         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
24562         (vec_perm_indices::new_vector): Likewise.
24563         (vec_perm_indices::length): Likewise.
24564         (vec_perm_indices::nelts_per_input): Likewise.
24565         (vec_perm_indices::input_nelts): Likewise.
24566         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
24567         number of elements per input as a poly_uint64 rather than an
24568         unsigned int.  Use the original encoding for variable-length
24569         vectors, rather than clamping each individual element.
24570         For the second and subsequent elements in each pattern,
24571         clamp the step and base before clamping their sum.
24572         (vec_perm_indices::series_p): Handle polynomial element counts.
24573         (vec_perm_indices::all_in_range_p): Likewise.
24574         (vec_perm_indices_to_tree): Likewise.
24575         (vec_perm_indices_to_rtx): Likewise.
24576         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
24577         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
24578         (tree_vector_builder::new_binary_operation): Handle polynomial
24579         element counts.  Return false if we need to know the number
24580         of elements at compile time.
24581         * fold-const.c (fold_vec_perm): Punt if the number of elements
24582         isn't known at compile time.
24584 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24586         * vec-perm-indices.h (vec_perm_builder): Change element type
24587         from HOST_WIDE_INT to poly_int64.
24588         (vec_perm_indices::element_type): Update accordingly.
24589         (vec_perm_indices::clamp): Handle polynomial element_types.
24590         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24591         (vec_perm_indices::all_in_range_p): Likewise.
24592         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
24593         than shwi trees.
24594         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
24595         polynomial vec_perm_indices element types.
24596         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
24597         * fold-const.c (fold_vec_perm): Likewise.
24598         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
24599         * tree-vect-generic.c (lower_vec_perm): Likewise.
24600         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24601         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
24602         element type to HOST_WIDE_INT.
24604 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24605             Alan Hayward  <alan.hayward@arm.com>
24606             David Sherwood  <david.sherwood@arm.com>
24608         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
24609         rather than an int.  Use plus_constant.
24610         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
24611         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
24613 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24614             Alan Hayward  <alan.hayward@arm.com>
24615             David Sherwood  <david.sherwood@arm.com>
24617         * calls.c (emit_call_1, expand_call): Change struct_value_size from
24618         a HOST_WIDE_INT to a poly_int64.
24620 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24621             Alan Hayward  <alan.hayward@arm.com>
24622             David Sherwood  <david.sherwood@arm.com>
24624         * calls.c (load_register_parameters): Cope with polynomial
24625         mode sizes.  Require a constant size for BLKmode parameters
24626         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
24627         forces a parameter to be padded at the lsb end in order to
24628         fill a complete number of words, require the parameter size
24629         to be ordered wrt UNITS_PER_WORD.
24631 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24632             Alan Hayward  <alan.hayward@arm.com>
24633             David Sherwood  <david.sherwood@arm.com>
24635         * reload1.c (spill_stack_slot_width): Change element type
24636         from unsigned int to poly_uint64_pod.
24637         (alter_reg): Treat mode sizes as polynomial.
24639 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24640             Alan Hayward  <alan.hayward@arm.com>
24641             David Sherwood  <david.sherwood@arm.com>
24643         * reload.c (complex_word_subreg_p): New function.
24644         (reload_inner_reg_of_subreg, push_reload): Use it.
24646 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24647             Alan Hayward  <alan.hayward@arm.com>
24648             David Sherwood  <david.sherwood@arm.com>
24650         * lra-constraints.c (process_alt_operands): Reject matched
24651         operands whose sizes aren't ordered.
24652         (match_reload): Refer to this check here.
24654 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24655             Alan Hayward  <alan.hayward@arm.com>
24656             David Sherwood  <david.sherwood@arm.com>
24658         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
24659         that the mode size is in the set {1, 2, 4, 8, 16}.
24661 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24662             Alan Hayward  <alan.hayward@arm.com>
24663             David Sherwood  <david.sherwood@arm.com>
24665         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
24666         Use plus_constant instead of gen_rtx_PLUS.
24668 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24669             Alan Hayward  <alan.hayward@arm.com>
24670             David Sherwood  <david.sherwood@arm.com>
24672         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
24673         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
24674         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
24675         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
24676         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
24677         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
24678         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
24679         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
24680         * config/i386/i386.c (ix86_push_rounding): ...this new function.
24681         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
24682         a poly_int64.
24683         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
24684         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
24685         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
24686         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
24687         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
24688         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
24689         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
24690         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
24691         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
24692         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
24693         function.
24694         * expr.c (emit_move_resolve_push): Treat the input and result
24695         of PUSH_ROUNDING as a poly_int64.
24696         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
24697         (emit_push_insn): Likewise.
24698         * lra-eliminations.c (mark_not_eliminable): Likewise.
24699         * recog.c (push_operand): Likewise.
24700         * reload1.c (elimination_effects): Likewise.
24701         * rtlanal.c (nonzero_bits1): Likewise.
24702         * calls.c (store_one_arg): Likewise.  Require the padding to be
24703         known at compile time.
24705 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24706             Alan Hayward  <alan.hayward@arm.com>
24707             David Sherwood  <david.sherwood@arm.com>
24709         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
24710         Use plus_constant instead of gen_rtx_PLUS.
24712 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24713             Alan Hayward  <alan.hayward@arm.com>
24714             David Sherwood  <david.sherwood@arm.com>
24716         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
24717         rather than an int.
24719 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24720             Alan Hayward  <alan.hayward@arm.com>
24721             David Sherwood  <david.sherwood@arm.com>
24723         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
24724         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
24725         via stack temporaries.  Treat the mode size as polynomial too.
24727 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24728             Alan Hayward  <alan.hayward@arm.com>
24729             David Sherwood  <david.sherwood@arm.com>
24731         * expr.c (expand_expr_real_2): When handling conversions involving
24732         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
24733         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
24734         as a poly_uint64 too.
24736 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24737             Alan Hayward  <alan.hayward@arm.com>
24738             David Sherwood  <david.sherwood@arm.com>
24740         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
24742 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24743             Alan Hayward  <alan.hayward@arm.com>
24744             David Sherwood  <david.sherwood@arm.com>
24746         * combine.c (can_change_dest_mode): Handle polynomial
24747         REGMODE_NATURAL_SIZE.
24748         * expmed.c (store_bit_field_1): Likewise.
24749         * expr.c (store_constructor): Likewise.
24750         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
24751         and polynomial REGMODE_NATURAL_SIZE.
24752         (gen_lowpart_common): Likewise.
24753         * reginfo.c (record_subregs_of_mode): Likewise.
24754         * rtlanal.c (read_modify_subreg_p): Likewise.
24756 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24757             Alan Hayward  <alan.hayward@arm.com>
24758             David Sherwood  <david.sherwood@arm.com>
24760         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
24761         numbers of elements.
24763 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24764             Alan Hayward  <alan.hayward@arm.com>
24765             David Sherwood  <david.sherwood@arm.com>
24767         * match.pd: Cope with polynomial numbers of vector elements.
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         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
24774         in a POINTER_PLUS_EXPR.
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         * omp-simd-clone.c (simd_clone_subparts): New function.
24781         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
24782         (ipa_simd_modify_function_body): Likewise.
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-generic.c (nunits_for_known_piecewise_op): New function.
24789         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
24790         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
24791         (expand_vector_condition, vector_element): Likewise.
24792         (subparts_gt): New function.
24793         (get_compute_type): Use subparts_gt.
24794         (count_type_subparts): Delete.
24795         (expand_vector_operations_1): Use subparts_gt instead of
24796         count_type_subparts.
24798 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24799             Alan Hayward  <alan.hayward@arm.com>
24800             David Sherwood  <david.sherwood@arm.com>
24802         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
24803         (vect_compile_time_alias): ...this new function.  Do the calculation
24804         on poly_ints rather than trees.
24805         (vect_prune_runtime_alias_test_list): Update call accordingly.
24807 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24808             Alan Hayward  <alan.hayward@arm.com>
24809             David Sherwood  <david.sherwood@arm.com>
24811         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
24812         numbers of units.
24813         (vect_schedule_slp_instance): Likewise.
24815 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24816             Alan Hayward  <alan.hayward@arm.com>
24817             David Sherwood  <david.sherwood@arm.com>
24819         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
24820         constant and extern definitions for variable-length vectors.
24821         (vect_get_constant_vectors): Note that the number of units
24822         is known to be constant.
24824 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24825             Alan Hayward  <alan.hayward@arm.com>
24826             David Sherwood  <david.sherwood@arm.com>
24828         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
24829         of units as polynomial.  Choose between WIDE and NARROW based
24830         on multiple_p.
24832 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24833             Alan Hayward  <alan.hayward@arm.com>
24834             David Sherwood  <david.sherwood@arm.com>
24836         * tree-vect-stmts.c (simd_clone_subparts): New function.
24837         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
24839 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24840             Alan Hayward  <alan.hayward@arm.com>
24841             David Sherwood  <david.sherwood@arm.com>
24843         * tree-vect-stmts.c (vectorizable_call): Treat the number of
24844         vectors as polynomial.  Use build_index_vector for
24845         IFN_GOMP_SIMD_LANE.
24847 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24848             Alan Hayward  <alan.hayward@arm.com>
24849             David Sherwood  <david.sherwood@arm.com>
24851         * tree-vect-stmts.c (get_load_store_type): Treat the number of
24852         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
24853         for variable-length vectors.
24854         (vectorizable_mask_load_store): Treat the number of units as
24855         polynomial, asserting that it is constant if the condition has
24856         already been enforced.
24857         (vectorizable_store, vectorizable_load): Likewise.
24859 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24860             Alan Hayward  <alan.hayward@arm.com>
24861             David Sherwood  <david.sherwood@arm.com>
24863         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
24864         of units as polynomial.  Punt if we can't tell at compile time
24865         which vector contains the final result.
24867 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24868             Alan Hayward  <alan.hayward@arm.com>
24869             David Sherwood  <david.sherwood@arm.com>
24871         * tree-vect-loop.c (vectorizable_induction): Treat the number
24872         of units as polynomial.  Punt on SLP inductions.  Use an integer
24873         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
24874         cast of such a series for variable-length floating-point
24875         reductions.
24877 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24878             Alan Hayward  <alan.hayward@arm.com>
24879             David Sherwood  <david.sherwood@arm.com>
24881         * tree.h (build_index_vector): Declare.
24882         * tree.c (build_index_vector): New function.
24883         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
24884         of units as polynomial, forcibly converting it to a constant if
24885         vectorizable_reduction has already enforced the condition.
24886         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
24887         to create a {1,2,3,...} vector.
24888         (vectorizable_reduction): Treat the number of units as polynomial.
24889         Choose vectype_in based on the largest scalar element size rather
24890         than the smallest number of units.  Enforce the restrictions
24891         relied on above.
24893 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24894             Alan Hayward  <alan.hayward@arm.com>
24895             David Sherwood  <david.sherwood@arm.com>
24897         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
24898         number of units as polynomial.
24900 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24901             Alan Hayward  <alan.hayward@arm.com>
24902             David Sherwood  <david.sherwood@arm.com>
24904         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
24905         * target.def (autovectorize_vector_sizes): Return the vector sizes
24906         by pointer, using vector_sizes rather than a bitmask.
24907         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
24908         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
24909         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
24910         Likewise.
24911         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
24912         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
24913         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
24914         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
24915         * omp-general.c (omp_max_vf): Likewise.
24916         * omp-low.c (omp_clause_aligned_alignment): Likewise.
24917         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
24918         * tree-vect-loop.c (vect_analyze_loop): Likewise.
24919         * tree-vect-slp.c (vect_slp_bb): Likewise.
24920         * doc/tm.texi: Regenerate.
24921         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
24922         to a poly_uint64.
24923         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
24924         the vector size as a poly_uint64 rather than an unsigned int.
24925         (current_vector_size): Change from an unsigned int to a poly_uint64.
24926         (get_vectype_for_scalar_type): Update accordingly.
24927         * tree.h (build_truth_vector_type): Take the size and number of
24928         units as a poly_uint64 rather than an unsigned int.
24929         (build_vector_type): Add a temporary overload that takes
24930         the number of units as a poly_uint64 rather than an unsigned int.
24931         * tree.c (make_vector_type): Likewise.
24932         (build_truth_vector_type): Take the number of units as a poly_uint64
24933         rather than an unsigned int.
24935 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24936             Alan Hayward  <alan.hayward@arm.com>
24937             David Sherwood  <david.sherwood@arm.com>
24939         * target.def (get_mask_mode): Take the number of units and length
24940         as poly_uint64s rather than unsigned ints.
24941         * targhooks.h (default_get_mask_mode): Update accordingly.
24942         * targhooks.c (default_get_mask_mode): Likewise.
24943         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
24944         * doc/tm.texi: Regenerate.
24946 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24947             Alan Hayward  <alan.hayward@arm.com>
24948             David Sherwood  <david.sherwood@arm.com>
24950         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
24951         * omp-general.c (omp_max_vf): Likewise.
24952         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
24953         (expand_omp_simd): Handle polynomial safelen.
24954         * omp-low.c (omplow_simd_context): Add a default constructor.
24955         (omplow_simd_context::max_vf): Change from int to poly_uint64.
24956         (lower_rec_simd_input_clauses): Update accordingly.
24957         (lower_rec_input_clauses): Likewise.
24959 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24960             Alan Hayward  <alan.hayward@arm.com>
24961             David Sherwood  <david.sherwood@arm.com>
24963         * tree-vectorizer.h (vect_nunits_for_cost): New function.
24964         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
24965         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
24966         (vect_analyze_slp_cost): Likewise.
24967         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
24968         (vect_model_load_cost): Likewise.
24970 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24971             Alan Hayward  <alan.hayward@arm.com>
24972             David Sherwood  <david.sherwood@arm.com>
24974         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
24975         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
24976         from an unsigned int * to a poly_uint64_pod *.
24977         (calculate_unrolling_factor): New function.
24978         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
24980 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24981             Alan Hayward  <alan.hayward@arm.com>
24982             David Sherwood  <david.sherwood@arm.com>
24984         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
24985         from an unsigned int to a poly_uint64.
24986         (_loop_vec_info::slp_unrolling_factor): Likewise.
24987         (_loop_vec_info::vectorization_factor): Change from an int
24988         to a poly_uint64.
24989         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
24990         (vect_get_num_vectors): New function.
24991         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
24992         (vect_get_num_copies): Use vect_get_num_vectors.
24993         (vect_analyze_data_ref_dependences): Change max_vf from an int *
24994         to an unsigned int *.
24995         (vect_analyze_data_refs): Change min_vf from an int * to a
24996         poly_uint64 *.
24997         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24998         than an unsigned HOST_WIDE_INT.
24999         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
25000         (vect_analyze_data_ref_dependence): Change max_vf from an int *
25001         to an unsigned int *.
25002         (vect_analyze_data_ref_dependences): Likewise.
25003         (vect_compute_data_ref_alignment): Handle polynomial vf.
25004         (vect_enhance_data_refs_alignment): Likewise.
25005         (vect_prune_runtime_alias_test_list): Likewise.
25006         (vect_shift_permute_load_chain): Likewise.
25007         (vect_supportable_dr_alignment): Likewise.
25008         (dependence_distance_ge_vf): Take the vectorization factor as a
25009         poly_uint64 rather than an unsigned HOST_WIDE_INT.
25010         (vect_analyze_data_refs): Change min_vf from an int * to a
25011         poly_uint64 *.
25012         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
25013         vfm1 as a poly_uint64 rather than an int.  Make the same change
25014         for the returned bound_scalar.
25015         (vect_gen_vector_loop_niters): Handle polynomial vf.
25016         (vect_do_peeling): Likewise.  Update call to
25017         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
25018         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
25019         be constant.
25020         * tree-vect-loop.c (vect_determine_vectorization_factor)
25021         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
25022         (vect_get_known_peeling_cost): Likewise.
25023         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
25024         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
25025         (vect_transform_loop): Likewise.  Use the lowest possible VF when
25026         updating the upper bounds of the loop.
25027         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
25028         rather than an int.
25029         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
25030         polynomial unroll factors.
25031         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
25032         (vect_make_slp_decision): Likewise.
25033         (vect_supported_load_permutation_p): Likewise, and polynomial
25034         vf too.
25035         (vect_analyze_slp_cost): Handle polynomial vf.
25036         (vect_slp_analyze_node_operations): Likewise.
25037         (vect_slp_analyze_bb_1): Likewise.
25038         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
25039         than an unsigned HOST_WIDE_INT.
25040         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
25041         (vectorizable_load): Handle polynomial vf.
25042         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
25043         a poly_uint64.
25044         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
25046 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25047             Alan Hayward  <alan.hayward@arm.com>
25048             David Sherwood  <david.sherwood@arm.com>
25050         * match.pd: Handle bit operations involving three constants
25051         and try to fold one pair.
25053 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25055         * tree-vect-loop-manip.c: Include gimple-fold.h.
25056         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
25057         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
25058         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
25059         Add a path that uses a step of VF instead of 1, but disable it
25060         for now.
25061         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
25062         and niters_no_overflow parameters.  Update calls to
25063         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
25064         Create a new SSA name if the latter choses to use a ste other
25065         than zero, and return it via niters_vector_mult_vf_var.
25066         * tree-vect-loop.c (vect_transform_loop): Update calls to
25067         vect_do_peeling, vect_gen_vector_loop_niters and
25068         slpeel_make_loop_iterate_ntimes.
25069         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
25070         (vect_gen_vector_loop_niters): Update declarations after above changes.
25072 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
25074         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
25075         128-bit round to integer instructions.
25076         (ceil<mode>2): Likewise.
25077         (btrunc<mode>2): Likewise.
25078         (round<mode>2): Likewise.
25080 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
25082         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
25083         unaligned VSX load/store on P8/P9.
25084         (expand_block_clear): Allow the use of unaligned VSX
25085         load/store on P8/P9.
25087 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25089         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
25090         New function.
25091         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
25092         swap associated with both a load and a store.
25094 2018-01-02  Andrew Waterman  <andrew@sifive.com>
25096         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
25097         * config/riscv/riscv.md (clear_cache): Use it.
25099 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
25101         * web.c: Remove out-of-date comment.
25103 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25105         * expr.c (fixup_args_size_notes): Check that any existing
25106         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
25107         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
25108         (emit_single_push_insn): ...here.
25110 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25112         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
25113         (const_vector_encoded_nelts): New function.
25114         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
25115         (const_vector_int_elt, const_vector_elt): Declare.
25116         * emit-rtl.c (const_vector_int_elt_1): New function.
25117         (const_vector_elt): Likewise.
25118         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
25119         of CONST_VECTOR_ELT.
25121 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25123         * expr.c: Include rtx-vector-builder.h.
25124         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
25125         directly on the tree encoding.
25126         (const_vector_from_tree): Likewise.
25127         * optabs.c: Include rtx-vector-builder.h.
25128         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
25129         sequence of "u" values.
25130         * vec-perm-indices.c: Include rtx-vector-builder.h.
25131         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
25132         directly on the vec_perm_indices encoding.
25134 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25136         * doc/rtl.texi (const_vector): Describe new encoding scheme.
25137         * Makefile.in (OBJS): Add rtx-vector-builder.o.
25138         * rtx-vector-builder.h: New file.
25139         * rtx-vector-builder.c: Likewise.
25140         * rtl.h (rtx_def::u2): Add a const_vector field.
25141         (CONST_VECTOR_NPATTERNS): New macro.
25142         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
25143         (CONST_VECTOR_DUPLICATE_P): Likewise.
25144         (CONST_VECTOR_STEPPED_P): Likewise.
25145         (CONST_VECTOR_ENCODED_ELT): Likewise.
25146         (const_vec_duplicate_p): Check for a duplicated vector encoding.
25147         (unwrap_const_vec_duplicate): Likewise.
25148         (const_vec_series_p): Check for a non-duplicated vector encoding.
25149         Say that the function only returns true for integer vectors.
25150         * emit-rtl.c: Include rtx-vector-builder.h.
25151         (gen_const_vec_duplicate_1): Delete.
25152         (gen_const_vector): Call gen_const_vec_duplicate instead of
25153         gen_const_vec_duplicate_1.
25154         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
25155         (gen_const_vec_duplicate): Use rtx_vector_builder.
25156         (gen_const_vec_series): Likewise.
25157         (gen_rtx_CONST_VECTOR): Likewise.
25158         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
25159         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25160         Build a new vector rather than modifying a CONST_VECTOR in-place.
25161         (handle_special_swappables): Update call accordingly.
25162         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
25163         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25164         Build a new vector rather than modifying a CONST_VECTOR in-place.
25165         (handle_special_swappables): Update call accordingly.
25167 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25169         * simplify-rtx.c (simplify_const_binary_operation): Use
25170         CONST_VECTOR_ELT instead of XVECEXP.
25172 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25174         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
25175         the selector elements to be different from the data elements
25176         if the selector is a VECTOR_CST.
25177         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
25178         ssizetype for the selector.
25180 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25182         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
25183         before testing each element individually.
25184         * tree-vect-generic.c (lower_vec_perm): Likewise.
25186 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25188         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
25189         * selftest-run-tests.c (selftest::run_tests): Call it.
25190         * vector-builder.h (vector_builder::operator ==): New function.
25191         (vector_builder::operator !=): Likewise.
25192         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
25193         (vec_perm_indices::all_from_input_p): New function.
25194         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
25195         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
25196         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
25197         instead of reading the VECTOR_CST directly.  Detect whether both
25198         vector inputs are the same before constructing the vec_perm_indices,
25199         and update the number of inputs argument accordingly.  Use the
25200         utility functions added above.  Only construct sel2 if we need to.
25202 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25204         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
25205         the broadcast of the low byte.
25206         (expand_mult_highpart): Use an explicit encoding for the permutes.
25207         * optabs-query.c (can_mult_highpart_p): Likewise.
25208         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
25209         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25210         (vectorizable_bswap): Likewise.
25211         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
25212         explicit encoding for the power-of-2 permutes.
25213         (vect_permute_store_chain): Likewise.
25214         (vect_grouped_load_supported): Likewise.
25215         (vect_permute_load_chain): Likewise.
25217 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25219         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
25220         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
25221         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
25222         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
25223         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
25224         (vect_gen_perm_mask_any): Likewise.
25226 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25228         * int-vector-builder.h: New file.
25229         * vec-perm-indices.h: Include int-vector-builder.h.
25230         (vec_perm_indices): Redefine as an int_vector_builder.
25231         (auto_vec_perm_indices): Delete.
25232         (vec_perm_builder): Redefine as a stand-alone class.
25233         (vec_perm_indices::vec_perm_indices): New function.
25234         (vec_perm_indices::clamp): Likewise.
25235         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
25236         (vec_perm_indices::new_vector): New function.
25237         (vec_perm_indices::new_expanded_vector): Update for new
25238         vec_perm_indices class.
25239         (vec_perm_indices::rotate_inputs): New function.
25240         (vec_perm_indices::all_in_range_p): Operate directly on the
25241         encoded form, without computing elided elements.
25242         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
25243         encoding.  Update for new vec_perm_indices class.
25244         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
25245         the given vec_perm_builder.
25246         (expand_vec_perm_var): Update vec_perm_builder constructor.
25247         (expand_mult_highpart): Use vec_perm_builder instead of
25248         auto_vec_perm_indices.
25249         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
25250         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
25251         or double series encoding as appropriate.
25252         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
25253         vec_perm_indices instead of auto_vec_perm_indices.
25254         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25255         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25256         (vect_permute_store_chain): Likewise.
25257         (vect_grouped_load_supported): Likewise.
25258         (vect_permute_load_chain): Likewise.
25259         (vect_shift_permute_load_chain): Likewise.
25260         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25261         (vect_transform_slp_perm_load): Likewise.
25262         (vect_schedule_slp_instance): Likewise.
25263         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25264         (vectorizable_mask_load_store): Likewise.
25265         (vectorizable_bswap): Likewise.
25266         (vectorizable_store): Likewise.
25267         (vectorizable_load): Likewise.
25268         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
25269         vec_perm_indices instead of auto_vec_perm_indices.  Use
25270         tree_to_vec_perm_builder to read the vector from a tree.
25271         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
25272         vec_perm_builder instead of a vec_perm_indices.
25273         (have_whole_vector_shift): Use vec_perm_builder and
25274         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
25275         truncation to calc_vec_perm_mask_for_shift.
25276         (vect_create_epilog_for_reduction): Likewise.
25277         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
25278         from auto_vec_perm_indices to vec_perm_indices.
25279         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25280         instead of changing individual elements.
25281         (aarch64_vectorize_vec_perm_const): Use new_vector to install
25282         the vector in d.perm.
25283         * config/arm/arm.c (expand_vec_perm_d::perm): Change
25284         from auto_vec_perm_indices to vec_perm_indices.
25285         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25286         instead of changing individual elements.
25287         (arm_vectorize_vec_perm_const): Use new_vector to install
25288         the vector in d.perm.
25289         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
25290         Update vec_perm_builder constructor.
25291         (rs6000_expand_interleave): Likewise.
25292         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
25293         (rs6000_expand_interleave): Likewise.
25295 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25297         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
25298         to qimode could truncate the indices.
25299         * optabs.c (expand_vec_perm_var): Likewise.
25301 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25303         * Makefile.in (OBJS): Add vec-perm-indices.o.
25304         * vec-perm-indices.h: New file.
25305         * vec-perm-indices.c: Likewise.
25306         * target.h (vec_perm_indices): Replace with a forward class
25307         declaration.
25308         (auto_vec_perm_indices): Move to vec-perm-indices.h.
25309         * optabs.h: Include vec-perm-indices.h.
25310         (expand_vec_perm): Delete.
25311         (selector_fits_mode_p, expand_vec_perm_var): Declare.
25312         (expand_vec_perm_const): Declare.
25313         * target.def (vec_perm_const_ok): Replace with...
25314         (vec_perm_const): ...this new hook.
25315         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
25316         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
25317         * doc/tm.texi: Regenerate.
25318         * optabs.def (vec_perm_const): Delete.
25319         * doc/md.texi (vec_perm_const): Likewise.
25320         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
25321         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
25322         expand_vec_perm for constant permutation vectors.  Assert that
25323         the mode of variable permutation vectors is the integer equivalent
25324         of the mode that is being permuted.
25325         * optabs-query.h (selector_fits_mode_p): Declare.
25326         * optabs-query.c: Include vec-perm-indices.h.
25327         (selector_fits_mode_p): New function.
25328         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
25329         is defined, instead of checking whether the vec_perm_const_optab
25330         exists.  Use targetm.vectorize.vec_perm_const instead of
25331         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
25332         fit in the vector mode before using a variable permute.
25333         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
25334         vec_perm_indices instead of an rtx.
25335         (expand_vec_perm): Replace with...
25336         (expand_vec_perm_const): ...this new function.  Take the selector
25337         as a vec_perm_indices rather than an rtx.  Also take the mode of
25338         the selector.  Update call to shift_amt_for_vec_perm_mask.
25339         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
25340         Use vec_perm_indices::new_expanded_vector to expand the original
25341         selector into bytes.  Check whether the indices fit in the vector
25342         mode before using a variable permute.
25343         (expand_vec_perm_var): Make global.
25344         (expand_mult_highpart): Use expand_vec_perm_const.
25345         * fold-const.c: Includes vec-perm-indices.h.
25346         * tree-ssa-forwprop.c: Likewise.
25347         * tree-vect-data-refs.c: Likewise.
25348         * tree-vect-generic.c: Likewise.
25349         * tree-vect-loop.c: Likewise.
25350         * tree-vect-slp.c: Likewise.
25351         * tree-vect-stmts.c: Likewise.
25352         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
25353         Delete.
25354         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
25355         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
25356         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
25357         (aarch64_vectorize_vec_perm_const): ...this new function.
25358         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25359         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25360         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
25361         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
25362         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25363         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25364         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
25365         into...
25366         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
25367         check for NEON modes.
25368         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
25369         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
25370         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
25371         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
25372         into...
25373         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
25374         the old VEC_PERM_CONST conditions.
25375         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
25376         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
25377         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
25378         (ia64_vectorize_vec_perm_const_ok): Merge into...
25379         (ia64_vectorize_vec_perm_const): ...this new function.
25380         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
25381         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
25382         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
25383         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
25384         * config/mips/mips.c (mips_expand_vec_perm_const)
25385         (mips_vectorize_vec_perm_const_ok): Merge into...
25386         (mips_vectorize_vec_perm_const): ...this new function.
25387         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
25388         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
25389         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
25390         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
25391         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
25392         (rs6000_expand_vec_perm_const): Delete.
25393         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
25394         Delete.
25395         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25396         (altivec_expand_vec_perm_const_le): Take each operand individually.
25397         Operate on constant selectors rather than rtxes.
25398         (altivec_expand_vec_perm_const): Likewise.  Update call to
25399         altivec_expand_vec_perm_const_le.
25400         (rs6000_expand_vec_perm_const): Delete.
25401         (rs6000_vectorize_vec_perm_const_ok): Delete.
25402         (rs6000_vectorize_vec_perm_const): New function.
25403         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25404         an element count and rtx array.
25405         (rs6000_expand_extract_even): Update call accordingly.
25406         (rs6000_expand_interleave): Likewise.
25407         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
25408         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
25409         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
25410         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
25411         (rs6000_expand_vec_perm_const): Delete.
25412         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25413         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25414         (altivec_expand_vec_perm_const_le): Take each operand individually.
25415         Operate on constant selectors rather than rtxes.
25416         (altivec_expand_vec_perm_const): Likewise.  Update call to
25417         altivec_expand_vec_perm_const_le.
25418         (rs6000_expand_vec_perm_const): Delete.
25419         (rs6000_vectorize_vec_perm_const_ok): Delete.
25420         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
25421         reference to the SPE evmerge intructions.
25422         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25423         an element count and rtx array.
25424         (rs6000_expand_extract_even): Update call accordingly.
25425         (rs6000_expand_interleave): Likewise.
25426         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
25427         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
25428         new function.
25429         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25431 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25433         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
25434         vector mode and that that mode matches the mode of the data
25435         being permuted.
25436         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
25437         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
25438         directly using expand_vec_perm_1 when forcing selectors into
25439         registers.
25440         (expand_vec_perm_var): New function, split out from expand_vec_perm.
25442 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25444         * optabs-query.h (can_vec_perm_p): Delete.
25445         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
25446         * optabs-query.c (can_vec_perm_p): Split into...
25447         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
25448         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
25449         particular selector is valid.
25450         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25451         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25452         (vect_grouped_load_supported): Likewise.
25453         (vect_shift_permute_load_chain): Likewise.
25454         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25455         (vect_transform_slp_perm_load): Likewise.
25456         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25457         (vectorizable_bswap): Likewise.
25458         (vect_gen_perm_mask_checked): Likewise.
25459         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
25460         implementations of variable permutation vectors into account
25461         when deciding which selector to use.
25462         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
25463         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
25464         with a false third argument.
25465         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
25466         to test whether the constant selector is valid and can_vec_perm_var_p
25467         to test whether a variable selector is valid.
25469 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25471         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
25472         * optabs-query.c (can_vec_perm_p): Likewise.
25473         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
25474         instead of vec_perm_indices.
25475         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
25476         (vect_gen_perm_mask_checked): Likewise,
25477         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
25478         (vect_gen_perm_mask_checked): Likewise,
25480 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25482         * optabs-query.h (qimode_for_vec_perm): Declare.
25483         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
25484         (qimode_for_vec_perm): ...this new function.
25485         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
25487 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
25489         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
25490         does not have a conditional at the top.
25492 2018-01-02  Richard Biener  <rguenther@suse.de>
25494         * ipa-inline.c (big_speedup_p): Fix expression.
25496 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
25498         PR target/81616
25499         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
25500         for generic 4->6.
25502 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
25504         PR target/81616
25505         Generic tuning.
25506         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
25507         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
25508         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
25509         cond_taken_branch_cost 3->4.
25511 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
25513         PR tree-optimization/83581
25514         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
25515         TODO_cleanup_cfg if any changes have been made.
25517         PR middle-end/83608
25518         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
25519         convert_modes if target mode has the right side, but different mode
25520         class.
25522         PR middle-end/83609
25523         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
25524         last argument when extracting from CONCAT.  If either from_real or
25525         from_imag is NULL, use expansion through memory.  If result is not
25526         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
25527         the parts directly to inner mode, if even that fails, use expansion
25528         through memory.
25530         PR middle-end/83623
25531         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
25532         check for bswap in mode rather than HImode and use that in expand_unop
25533         too.
25535 Copyright (C) 2018 Free Software Foundation, Inc.
25537 Copying and distribution of this file, with or without modification,
25538 are permitted in any medium without royalty provided the copyright
25539 notice and this notice are preserved.