2018-09-14 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / ChangeLog
blob3a004ec4a459e8d128312992d49914d671b5ed0e
1 2018-09-14  Richard Biener  <rguenther@suse.de>
3         PR middle-end/63155
4         * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
5         bits for the merged partition.
7 2018-09-13  Martin Sebor  <msebor@redhat.com>
8             Bernd Edlinger  <bernd.edlinger@hotmail.de>
10         * builtins.h (c_srlen): Add argument.
11         * builtins.c (warn_string_no_nul): New function.
12         (c_strlen): Add argument and use it.  Update recursive calls.
13         Pass DECL argument to string_constant to get info on non
14         terminated strings.  Update *NONSTR as needed.
15         (fold_builtin_strlen): Add argument to calls to c_strlen.
16         Warn for unterminated arrays.
17         (warn_string_no_null): Add prototype.
18         * expr.c (string_constant): Update arguments.  Update recursive
19         calls appropriately.  Detect missing NUL terminator and outermost
20         declaration its missing in.
21         Improve checks for arrays with nonzero lower bound or elements
22         that are not a single byte.  Simplify offset computation.
23         Simplify checks for non-NUL terminated strings.
24         * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
25         * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
27 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
29         * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
30         correctly.
31         * fold-const.c (c_getstr): Fix function comment.  Remove unused third
32         argument.  Fix range checks.
33         * fold-const.h (c_getstr): Adjust protoype.
34         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
35         string is constant but contains no NUL byte.
37         * expr.c (string_constant): Adjust function comment.
38         Remove bogus check for zero termination.
40         * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
42         * varasm.c (compare_constant): Compare type size of STRING_CSTs.
43         (get_constant_size): Don't make STRING_CSTs larger than they are.
44         (check_string_literal): New check function for STRING_CSTs.
45         (output_constant): Use it.
47 2018-09-13  Eric Botcazou  <ebotcazou@adacore.com>
49         PR target/86812
50         * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
52 2018-09-13  Richard Biener  <rguenther@suse.de>
54         PR tree-optimization/87263
55         * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
56         (struct unwind_state): Add max_rpo field.
57         (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
58         Compute max_rpo, the max RPO number a block can be backwards reached
59         from.  Re-write non-iterating mode to a RPO ordered worklist approach,
60         separating it from the iterating mode.
62 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
64         * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
65         (rfs_decision): New scheduling decision.
67 2018-09-13  Richard Biener  <rguenther@suse.de>
69         PR bootstrap/87134
70         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
71         (vn_nary_op_insert_pieces_predicated): Do not write useless
72         valid_dominated_by_p entry outside of the allocated storage.
74 2018-09-13  Omar Sandoval  <osandov@osandov.com>
75             Tom de Vries  <tdevries@suse.de>
77         PR debug/86985
78         * dwarf2out.c (is_c): New function.
79         (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
81 2018-09-13  Sam Tebbs  <sam.tebbs@arm.com>
83         PR target/85628
84         * config/aarch64/aarch64.md (*aarch64_bfxil):
85         Define.
86         * config/aarch64/constraints.md (Ulc): Define.
87         * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
88         Define.
89         * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
90         New function.
92 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
94         * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
95         * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
96         aarch64_layout_frame call. 
97         (aarch64_expand_epilogue): Likewise.
98         (aarch64_initial_elimination_offset): Likewise.
99         (aarch64_get_separate_components): Likewise.
100         (aarch64_use_return_insn_p): Likewise.
101         (aarch64_layout_frame): Remove unneeded check.
103 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
105         * configure.ac: Only append
106         " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
107         gcc_config_arguments if it was never reconfigured or last reconfigure
108         was with different arguments.
109         * configure: Regenerated.
111 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
112             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
114         PR middle-end/87290
115         * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
116         (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
118 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
120         PR tree-optimization/87287
121         * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
122         X % C == 0 to X % (unsigned) C == 0 optimization to ...
123         * match.pd (X % C == 0): ... here.  New optimization.
125 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
127         PR middle-end/82853
128         * expr.h (maybe_optimize_mod_cmp): Declare.
129         * expr.c (mod_inv): New function.
130         (maybe_optimize_mod_cmp): New function.
131         (do_store_flag): Use it.
132         * cfgexpand.c (expand_gimple_cond): Likewise.
134 2018-09-09  Cesar Philippidis  <cesar@codesourcery.com>
135             Julian Brown  <julian@codesourcery.com>
137         PR middle-end/86336
138         * gimplify.c (gimplify_scan_omp_clauses): Set
139         target_firstprivatize_array_bases in OpenACC parallel and kernels
140         region contexts.  Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
141         OpenACC data regions.
143 2018-09-12  Uros Bizjak  <ubizjak@gmail.com>
145         * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
146         (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
148 2018-09-12  Richard Biener  <rguenther@suse.de>
150         PR tree-optimization/87280
151         * tree-ssa-sccvn.c (process_bb): Handle the case of executable
152         edge but unreachable target.
153         (do_rpo_vn): For conservatively handling a PHI only mark
154         the backedge executable but not the block reachable.
156 2018-09-12  Richard Biener  <rguenther@suse.de>
158         PR tree-optimization/87266
159         * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
160         visited blocks.
162 2018-09-12  Andreas Krebbel  <krebbel@linux.ibm.com>
164         * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
165         constants.
166         ("trunc<BFP:mode><DFP_ALL:mode>2")
167         ("trunc<DFP_ALL:mode><BFP:mode>2")
168         ("extend<BFP:mode><DFP_ALL:mode>2")
169         ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
170         according to the target operand type.
172 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
173             Andreas Krebbel  <krebbel@linux.ibm.com>
175         PR tree-optimization/86844
176         * gimple-ssa-store-merging.c
177         (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
178         there are any overlapping stores in between them, make sure they are
179         also coalesced or we give up completely.
181 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
183         PR middle-end/87248
184         * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
185         BIT_AND_EXPR's second operand is a power of two.  Formatting fix.
187 2018-09-12  Tom de Vries  <tdevries@suse.de>
189         * common.opt (gdescribe-dies): Add option.
190         * dwarf2out.c (add_name_and_src_coords_attributes): Add description
191         attribute for artifical and nameless decls.
192         (dwarf2out_register_external_die): Add description attribute to
193         external reference die.
194         (add_desc_attribute): New functions.
195         (gen_subprogram_die): Add description attribute to
196         DW_TAG_call_site_parameter.
197         * tree-pretty-print.c (print_generic_expr_to_str): New function.
198         * tree-pretty-print.h (print_generic_expr_to_str): Declare.
199         * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
200         -gno-describe-dies.
201         (@item -gdescribe-dies): Add.
203 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
205         * tree-vrp.c (vrp_shift_undefined_p): Remove.
206         (extract_range_from_binary_expr_1: Call
207         wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
208         * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
209         depend on sign.
211 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
213         * gimple-ssa-warn-alloca.c
214         (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
215         field for ALLOCA_BOUND_*_LARGE.
217 2018-09-11  Nathan Sidwell  <nathan@acm.org>
219         * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
221 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
223         * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
224         for clobbers.  Remove obsolete comment.
226 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
228         * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
229         mpxchk, mpxld and mpxst types.
230         (define_attr length_immediate): Remove all processing of mpx types.
231         (define_attr prefix_0f): Ditto.
232         (define_attr memory): Ditto.
234 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
236         * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
237         (log<mode>2): Change operand 1 predicate to general_operand.
238         Extend operand 1 to XFmode and generate logxf3 insn.
239         (log10<mode>2): Change operand 1 predicate to general_operand.
240         Extend operand 1 to XFmode and generate log10xf3 insn.
241         (log2<mode>2): Change operand 1 predicate to general_operand.
242         Extend operand 1 to XFmode and generate log2xf3 insn.
243         (fyl2xp1_extend<mode>xf3_i387): Remove.
244         (log1p<mode>2): Change operand 1 predicate to general_operand.
245         Extend operand 1 to XFmode and generate log1pxf3 insn.
246         (fxtract_extend<mode>xf3_i387): Remove.
247         (logb<mode>2): Change operand 1 predicate to general_operand.
248         Extend operand 1 to XFmode and generate logbxf3 insn.
249         (ilogb<mode>2): Change operand 1 predicate to general_operand.
250         Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
251         (significand<mode>2): Change operand 1 predicate to general_operand.
252         Extend operand 1 to XFmode and generate significandxf3 insn.
254 2018-09-11  Nathan Sidwell  <nathan@acm.org>
256         * gcc.c (perror_with_name, pfatal_with_name): Delete.
257         (load_specs): Use fatal_error.
258         (DELETE_IF_ORDINARY, process_command): Use error.
259         (execute, run_attempt): Use fatal_error.
261 2018-09-11  Andrew Stubbs  <ams@codesourcery.com>
263         * diagnostic-core.h (sorry_at): New prototype.
264         * diagnostic.c (sorry_at): New function.
266 2018-09-11  Aldy Hernandez  <aldyh@redhat.com>
268         * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
269         by zero as VR_UNDEFINED.
271 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
273         * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
274         (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
275         (<sincos>mode2): New expander.
276         (sincos_extend<mode>xf3_i387): Remove insn pattern.
277         (sincos -> sin, cos splitters): Remove splitter patterns.
278         (sincos<mode>3): Change operand 2 predicate to general_operand.
279         Extend operand 2 to XFmode and generate sincosxf3 insn.
280         (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
281         Change operand 3 predicate to const1_operand.
282         (fptan_extend<mode>xf4_i387): Remove insn pattern.
283         (tanxf2): Update operands in the call to fptanxf4_i387.
284         (tan<mode>2): Change operand 1 predicate to general_operand.
285         Extend operand 1 to XFmode and generate tanxf3 insn.
286         (atan2xf3): Rename from *fpatanxf3_i387.
287         (fpatan_extend<mode>xf3_i387): Remove insn pattern.
288         (atan2xf3): Remove expander.
289         (atan2<mode<3):  Change operand 1 and 2 predicates to general_operand.
290         Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
291         (atan<mode>2): Change operand 1 predicate to general_operand.
292         Extend operand 1 to XFmode and generate atanxf3 insn.
294 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
296         * config/i386/i386.md (x87/SSE constant load splitter): Use
297         memory_operand instead of nonimmediate_operand for input operand
298         predicate.
300 2018-09-09  Uros Bizjak  <ubizjak@gmail.com>
302         * config/i386/i386.md (float partial SSE register stall splitter): Move
303         splitter near its instruction pattern.
304         (float_extend partial SSE register stall splitter): Ditto.
305         (float_truncate partial SSE register stall splitter): Ditto.
307 2018-09-09  Hans-Peter Nilsson  <hp@bitrange.com>
309         PR target/86794
310         * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
311         to speculation_safe_value_not_needed.
313         PR target/85666
314         * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
315         non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
316         (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
317         leaf_function_p, instead use has_hard_reg_initial_val.
319 2018-09-09  Nathan Sidwell  <nathan@acm.org>
321         * gcc.h (pfatal_with_name): Don't declare here.
322         * gcc.c (pfatal_with_name): Make static.
324 2018-09-09  Xianmiao Qu  <xianmiao_qu@c-sky.com>
326         * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
327         earlyclobber.
329 2018-09-08  John David Anglin  <danglin@gcc.gnu.org>
331         PR rtl-optimization/85458
332         * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
333         priority hook to reduce the priority of EXPR.
335 2018-09-07  Uros Bizjak  <ubizjak@gmail.com>
337         * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
338         DImode for x87 on 32bit targets.  Conditionally disable x87 modes
339         with X87_ENABLE_FLOAT.  Remove preparation code.
340         (*float<SWI48:mode><MODEF:mode>2): Rename from
341         *float<SWI48:mode><MODEF:mode>2_mixed.  Handle x87, SSE and mixed
342         math using "enabled" attribute.
343         (*floatdi<MODEF:mode>2_i387): Rename from
344         *float<SWI48x:mode><MODEF:mode>2_i387.  Handle only DImode and
345         enable for 32bit targets only.
346         (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
347         splitter.
348         (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
349         as operand 1 predicate.  Rewrite as define_insn_and_split.
350         (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
352 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
354         * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
355         to fallthru to FLOAT case.
357 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
359         PR target/86731
360         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
361         around folding of vec_sl to handle out of range shift values.
363 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
365         * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
366         Update callers to gen_fix_trunc<mode>_i387_fisttp
367         (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
368         nonimmediate_operand.
369         (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
370         and corresponding splitters.
371         (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
372         (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
373         (fix_truncdi_i387_with_temp): Remove insn pattern
374         and corresponding splitters.
375         (fix_trunc<mode>_i387): Change operand 0 predicate to
376         nonimmediate_operand.
377         (fix_trunc<mode>_i387_with_temp): Remove insn pattern
378         and corresponding splitters.
379         (*fistdi2_1): Remove.
380         (fistdi2): Ditto.
381         (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
382         (lrintxfdi2): Remove expander.  Reimplement as define_insn.
383         (*fist<mode>2_1): Remove.
384         (fist<mode>2): Ditto.
385         (fist<mode>2_with_temp): Remove insn pattern and corresponding
386         splitters.
387         (lrintxf<mode>2): Remove expander.  Reimplement as define_insn.
388         (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
389         (fistdi2_<rounding>): Change operand 0 predicate to
390         nonimmediate_operand.
391         (fistdi2_<rounding>_with_temp): Remove insn pattern
392         and corresponding splitters.
393         (fist<mode>2_<rounding>): Change operand 0 predicate to
394         nonimmediate_operand.
395         (fist<mode>2_<rounding>_with_temp): Remove insn pattern
396         and corresponding splitters.
398         (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
400 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
402         * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
403         the init value.
405 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
407         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
408         early gimple folding of vec_splat().
409         * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
410         * gimple-fold.h: Add an extern define for tree_vec_extract().
412 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
414         * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
415         wrappers around TREE_TYPE comparisons.
417 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
419         PR target/80080
420         * config/s390/predicates.md: Add nonsym_memory_operand.
421         * config/s390/s390.c (s390_legitimize_cs_operand): If operand
422         contains a SYMBOL_REF, load it into an intermediate pseudo.
423         (s390_emit_compare_and_swap): Legitimize operand.
424         * config/s390/s390.md: Use the new nonsym_memory_operand
425         with UNSPECV_CAS patterns.
427 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
429         PR target/80080
430         * config/s390/s390-passes.def: New file.
431         * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
432         declaration.
433         (make_pass_s390_early_mach): Add declaration.
434         * config/s390/s390.c (make_pass_s390_early_mach):
435         (s390_option_override): Remove dynamic registration.
436         * config/s390/t-s390: Add s390-passes.def.
438 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
440         * config/s390/s390.c (s390_decompose_constant_pool_ref):
441         Remove UNSPEC_LTREL_BASE check.
442         (annotate_constant_pool_refs): Likewise.
443         (find_constant_pool_ref): Likewise.
444         (find_ltrel_base): Removed.
445         (replace_ltrel_base): Removed.
446         (s390_mainpool_finish): Remove replace_ltrel_base call.
447         (s390_chunkify_start): Remove pending LTREL_BASE logic.
448         (s390_chunkify_finish): Remove replace_ltrel_base call.
449         * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
451 2018-09-06  Hans-Peter Nilsson  <hp@axis.com>
453         PR target/86779
454         * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
455         to speculation_safe_value_not_needed.
457 2018-09-05  Cesar Philippidis  <cesar@codesourcery.com>
458             Bernd Schmidt  <bernds_cb1@t-online.de>
460         * config/nvptx/nvptx-opts.h: New file.
461         * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
462         * config/nvptx/nvptx.h: Include "nvptx-opts.h".
463         (ASM_SPEC): Define.
464         (TARGET_SM35): New macro.
465         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
466         correct predicate.
467         * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
468         values.
469         (misa=): New option.
470         * doc/invoke.texi (Nvidia PTX Options): Document -misa.
472 2018-09-05  Uros Bizjak  <ubizjak@gmail.com>
474         * config/i386/i386.md (truncdfsf2): Remove expander.
475         (truncdfsf2_with_temp): Ditto.
476         (truncxf<mode>2): Ditto.
477         (*truncdfsf_fast_mixed): Remove insn pattern.
478         (*truncdfsf_fast_i387): Ditto.
479         (*truncdfsf_mixed): Ditto.
480         (*truncdfsf_i387): Ditto.
481         (*truncdfsf2_i387_1): Ditto.
482         (*truncxfsf2_mixed): Ditto.
483         (*truncxfdf2_mixed): Ditto.
484         (*truncxf<mode>2_i387_noop): Ditto. Update callers
485         to call gen_truncxf<mode>2 instead.
486         (*truncxf<mode>2_i387): Remove.
487         (reg->reg splitters): Remove splitter pattern.
488         (reg->mem splitters): Ditto.
490         (truncdfsf2): New insn pattern.
491         (truncxf<mode>2): Ditto.
493 2018-09-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
495         * tree-ssa-math-opts.c (is_mult_by): New function.
496         (is_square_of): Use the above.
497         (optimize_recip_sqrt): New function.
498         (pass_cse_reciprocals::execute): Use the above.
500 2018-09-05  Richard Biener  <rguenther@suse.de>
502         PR bootstrap/87134
503         * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
504         to zero-init the emplaced vec.
506 2018-09-05  Martin Liska  <mliska@suse.cz>
508         PR tree-optimization/87205
509         * tree-switch-conversion.c (pass_lower_switch::execute):
510         Group cases for switch statements.
512 2018-09-05  Richard Biener  <rguenther@suse.de>
514         PR tree-optimization/87217
515         * tree-ssa-sccvn.c (vuse_valueize): New.
516         (vn_reference_lookup_pieces): Use it.
517         (vn_reference_lookup): Likewise.
519 2018-09-05  Nathan Sidwell  <nathan@acm.org>
521         PR c++/87137
522         * stor-layout.c (place_field): Scan forwards to check last
523         bitfield when ms_bitfield_placement is in effect.
525 2018-09-05  Richard Biener  <rguenther@suse.de>
527         PR bootstrap/87225
528         * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
529         return.
531 2018-09-05  Siddhesh Poyarekar  <siddhesh@sourceware.org>
532             Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
534         * config/aarch64/falkor-tag-collision-avoidance.c: New file.
535         * config.gcc (extra_objs): Build it.
536         * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
537         Likewise.
538         * config/aarch64/aarch64-passes.def
539         (pass_tag_collision_avoidance): New pass.
540         * config/aarch64/aarch64.c (qdf24xx_tunings): Add
541         AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
542         (aarch64_classify_address): Remove static qualifier.
543         (aarch64_address_info, aarch64_address_type): Move to...
544         * config/aarch64/aarch64-protos.h: ... here.
545         (make_pass_tag_collision_avoidance): New function.
546         * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
547         New tuning flag.
549 2018-09-05  Martin Liska  <mliska@suse.cz>
551         * doc/gcov.texi: Update documentation of humar
552         readable mode.
553         * gcov.c (format_count): Print one decimal place, it provides
554         more fine number of situations like '1G' vs. '1.4G'.
556 2018-09-05  Martin Liska  <mliska@suse.cz>
558         PR target/87164
559         * config/rs6000/rs6000.opt: Mark the option as Deprecated.
560         * optc-gen.awk: Allow 'Var' for Deprecated options in order
561         to generate a MASK value.
563 2018-09-04  H.J. Lu  <hongjiu.lu@intel.com>
565         PR debug/86593
566         * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
567         if frame pointer isn't used.
568         (compute_frame_pointer_to_fb_displacement): Likewise.
570 2018-09-04  Jakub Jelinek  <jakub@redhat.com>
572         PR target/87198
573         * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
574         OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
575         OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
576         (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
577         and OPTION_MASK_ISA_XSAVEC_UNSET.
579 2018-09-04  Max Filippov  <jcmvbkbc@gmail.com>
581         * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
582         XOR operations in NAND case.
584 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
586         * wide-int-range.cc (wide_int_range_convert): New.
587         * wide-int-range.h (wide_int_range_convert): New.
588         * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
589         code into wide_int_range_convert.
590         (extract_range_into_wide_ints): Do not munge anti range constants
591         into the entire domain.  Just return the range back.
593 2018-09-04  Martin Liska  <mliska@suse.cz>
595         * genmatch.c (output_line_directive): Add new argument
596         fnargs.
597         (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
599 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
601         * doc/invoke.texi (Option Summary): Add whitespace.
603         * doc/invoke.texi (Option Summary): Add -Waligned-new.
605 2018-09-04  Richard Biener  <rguenther@suse.de>
607         PR tree-optimization/87211
608         * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
609         backedge value we're supposed to treat as VARYING also number
610         the PHI to VARYING in case it got a different value-number already.
612 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
614         * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
615         (extract_range_from_binary_expr_1): Do not call
616         vrp_can_optimize_bit_op.
617         * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
618         static.
619         (wide_int_range_get_mask_and_bounds): New.
620         (wide_int_range_optimize_bit_op): New.
621         (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
622         (wide_int_range_bit_and): Same.
623         * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
624         (wide_int_range_optimize_bit_op): New.
625         (wide_int_range_get_mask_and_bounds): New.
627 2018-09-04  Richard Biener  <rguenther@suse.de>
629         PR tree-optimization/87176
630         * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
631         variable.  When value-numbering a virtual PHI node make sure
632         to not value-number to the backedge value.
634 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
636         * doc/extend.texi (Long Long, Hex Floats): Document support for
637         long long and hex floats in more recent versions of ISO C++.
639 2018-09-03  Richard Biener  <rguenther@suse.de>
641         PR tree-optimization/87177
642         * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
643         cleanup.
645 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
647         * bb-reorder.c (edge_order): Convert to C-qsort-style
648         tri-state comparator.
649         (reorder_basic_blocks_simple): Change std::stable_sort to gcc_stablesort.
651 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
653         * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
654         tri-state comparator.
655         (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
657 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
659         * sort.cc (struct sort_ctx): New field 'nlim'.  Use it...
660         (mergesort): ... here as maximum count for using netsort.
661         (gcc_qsort): Set nlim to 3 if stable sort is requested.
662         (gcc_stablesort): New.
663         * system.h (gcc_stablesort): Declare.
665 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
667         * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
668         * system.h (qsort): Always redirect to gcc_qsort.  Update comment.
669         * vec.c (qsort_chk): Do not call gcc_qsort.  Update comment.
671 2018-09-03  Segher Boessenkool  <segher@kernel.crashing.org>
673         * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
674         lxsdx and stxsdx alternatives.
675         (*mov<mode>_hardfloat64): Ditto.
676         * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
678 2018-09-03  Richard Biener  <rguenther@suse.de>
680         PR tree-optimization/87200
681         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
682         simplify result.
684 2018-09-03  Martin Liska  <mliska@suse.cz>
686         PR tree-optimization/87201
687         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
688         Fix parenthesis in an expression.
690 2018-09-03  Richard Biener  <rguenther@suse.de>
692         PR tree-optimization/87197
693         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
694         visited.  CSE the VN_INFO hashtable lookup.
696         PR tree-optimization/87169
697         * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
698         iterating make sure there's no extra backedges from irreducible
699         regions feeding the header.  Mark the destination block
700         executable.
702 2018-09-03  Martin Liska  <mliska@suse.cz>
704         PR driver/83193
705         * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
706         * common/common-targhooks.c (default_get_valid_option_values):
707         New function.
708         * common/common-targhooks.h (default_get_valid_option_values):
709         Likewise.
710         * common/config/i386/i386-common.c: Move processor_target_table
711         from i386.c.
712         (ix86_get_valid_option_values): New function.
713         (TARGET_GET_VALID_OPTION_VALUES): New macro.
714         * config/i386/i386.c (struct ptt): Move to i386-common.c.
715         (PTA_*): Move all defined masks into i386-common.c.
716         (ix86_function_specific_restore): Use new processor_cost_table.
717         * config/i386/i386.h (struct ptt): Moved from i386.c.
718         (struct pta): Likewise.
719         * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
720         * doc/tm.texi.in: Likewise.
721         * opt-suggestions.c (option_proposer::suggest_option):
722         Pass prefix to build_option_suggestions.
723         (option_proposer::get_completions): Likewise.
724         (option_proposer::build_option_suggestions): Use the new target
725         hook.
726         * opts.c (struct option_help_tuple): New struct.
727         (print_filtered_help): Use the new target hook.
729 2018-09-03  Martin Liska  <mliska@suse.cz>
731         PR middle-end/59521
732         * predict.c (set_even_probabilities): Add likely_edges
733         argument and handle cases where we have precisely one
734         likely edge.
735         (combine_predictions_for_bb): Catch also likely_edges.
736         (tree_predict_by_opcode): Handle gswitch statements.
737         * tree-cfg.h (find_case_label_for_value): New declaration.
738         (find_taken_edge_switch_expr): Likewise.
739         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
740         Find pivot in decision tree based on probabily, not by number of
741         nodes.
743 2018-09-02  Gerald Pfeifer  <gerald@pfeifer.com>
745         * doc/standards.texi (Standards): Update Objective-C reference.
747 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
749         * doc/install.texi (Prerequisites): Update link for MPC.
751 2018-09-01  Michael Matz  <matz@suse.de>
753         PR tree-optimization/87074
754         * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
755         PHIs for outer-loop uses.
757 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
759         * doc/generic.texi (OpenMP): Adjust link to openmp.org.
760         * doc/invoke.texi (C Dialect Options): Ditto.
762 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
764         * doc/install.texi (Prerequisites): Adjust link mpfr.org.
766 2018-08-31  Richard Biener  <rguenther@suse.de>
768         PR tree-optimization/87168
769         * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
770         (rpo_elim::eliminate_avail): When OP was not visited it must
771         be available.
773 2018-08-31  David Malcolm  <dmalcolm@redhat.com>
775         * tree-vrp.c (copy_value_range): Convert param "from" from
776         "value_range *" to "const value_range *".
777         (range_is_null): Likewise for param "vr".
778         (range_int_cst_p): Likewise.
779         (range_int_cst_singleton_p): Likewise.
780         (symbolic_range_p): Likewise.
781         (value_ranges_intersect_p): Likewise for both params.
782         (value_range_nonnegative_p): Likewise for param "vr".
783         (value_range_constant_singleton): Likewise.
784         (vrp_set_zero_nonzero_bits): Likewise for param "ar".
785         (extract_range_into_wide_ints): Likewise for param "vr".
786         (extract_range_from_multiplicative_op): Likewise for params "vr0"
787         and "vr1".
788         (vrp_can_optimize_bit_op): Likewise.
789         (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
790         "vr1_".
791         (extract_range_from_unary_expr): Likewise.
792         (debug_value_range): Likewise for param "vr".
793         (value_range::dump): Add "const" qualifier.
794         (vrp_prop::check_array_ref): Convert local "vr" from
795         "value_range *" to "const value_range *".
796         (vrp_prop::check_mem_ref): Likewise.
797         (vrp_prop::visit_stmt): Likewise for local "old_vr".
798         (vrp_intersect_ranges_1): Likewise for param "vr_1".
799         (vrp_intersect_ranges): Likewise.
800         (simplify_stmt_for_jump_threading): Likewise for local "vr".
801         (vrp_prop::vrp_finalize): Likewise.
802         * tree-vrp.h (value_range::dump): Add "const" qualifier.
803         (vrp_intersect_ranges): Add "const" qualifier to params as above.
804         (extract_range_from_unary_expr): Likewise.
805         (value_range_constant_singleton): Likewise.
806         (symbolic_range_p): Likewise.
807         (copy_value_range): Likewise.
808         (extract_range_from_binary_expr_1): Likewise.
809         (range_int_cst_p): Likewise.
810         (vrp_set_zero_nonzero_bits): Likewise.
811         (range_int_cst_singleton_p): Likewise.
813 2018-08-31  Vlad Lazar  <vlad.lazar@arm.com>
815         * config/aarch64/arm_neon.h (vabsd_s64): New.
816         (vnegd_s64): Likewise.
818 2018-08-31  Martin Jambor  <mjambor@suse.cz>
820         * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
822 2018-08-31  Martin Liska  <mliska@suse.cz>
824         * ipa-icf.c (sem_item::add_type): Use
825         sem_item::m_type_hash_cache.
826         * ipa-icf.h: Move the cache from sem_item_optimizer
827         to sem_item.
829 2018-08-31  Nathan Sidwell  <nathan@acm.org>
831         * doc/extend.texi (Backwards Compatibility): Remove implicit
832         extern C leeway of () being (...).
834 2018-08-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
836         * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
838 2018-08-31  Segher Boessenkool  <segher@kernel.crashing.org>
840         PR target/86684
841         PR target/87149
842         * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
844 2018-08-31  Jakub Jelinek  <jakub@redhat.com>
846         PR middle-end/87138
847         * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
848         gen_int_mode.  Formatting fixes.
850 2018-08-30  Sandra Loosemore  <sandra@codesourcery.com>
852         * target.def (custom_function_descriptors): Improve documentation.
853         * doc/tm.texi.in (Trampolines): Expand discussion of function
854         descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
855         beginning of the section.
856         * doc/tm.texi: Regenerated.
858 2018-08-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
860         * cfg.h (class auto_edge_flag): Spell out the template-id of the
861         base class in the initializer list.  This is a workaround for
862         building with older GCC.
863         (class auto_bb_flag): Likewise.
865 2018-08-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
867         * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
868         (altivec_vcmpequ<VI_char>_p): Remove star.
869         * config/rs6000/rs6000-string.c (do_load_for_compare): Support
870         vector load modes.
871         (expand_strncmp_vec_sequence): New function.
872         (emit_final_str_compare_vec): New function.
873         (expand_strn_compare): Add support for vector strncmp.
874         * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
875         length specification to bytes.
876         * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
877         (vcmpnezb_p): New pattern.
878         * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
879         for option -mstring-compare-inline-limit.
881 2018-08-30  Thiago Macieira  <thiago.macieira@intel.com>
883         * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
884         (PTA_SKYLAKE): Add PTA_AES.
885         (PTA_GOLDMONT): Likewise.
887 2018-08-29  Jan Hubicka  <jh@suse.cz>
889         PR lto/86517
890         * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
891         * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
893 2018-08-29  Jan Hubicka  <jh@suse.cz>
895         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
896         TYPE_STUB_DECL.
897         (hash_tree): Do not visit TYPE_STUB_DECL.
898         * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
899         stream TYPE_STUB_DECL.
900         * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
901         * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
902         after free_lang_data.
903         (type_in_anonymous_namespace_p): Likewise.
905 2018-08-29  Jan Hubicka  <jh@suse.cz>
907         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
908         comment that it has to be even number.
909         (class sreal): Change m_sig type to int32_t.
910         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
911         int64_t for temporary calculations.
912         (sreal_verify_basics): Drop one bit from minimum and maximum.
914 2018-08-30  Richard Biener  <rguenther@suse.de>
916         PR tree-optimization/87147
917         * tree-ssa-sccvn.c (SSA_VISITED): New function.
918         (visit_phi): When the degenerate result is from the backedge and
919         we didn't visit its definition yet drop to VARYING.
920         (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
922 2018-08-29  Jan Hubicka  <jh@suse.cz>
924         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
925         DECL_VINDEX.
926         (hash_tree): Likewise.
928 2018-08-29  Jan Hubicka  <jh@suse.cz>
930         * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
931         and TYPE_NEXT_REF_TO.
933 2018-08-29  Jan Hubicka  <jh@suse.cz>
935         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
936         comment that it has to be even number.
937         (class sreal): Change m_sig type to int32_t.
938         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
939         int64_t for temporary calculations.
940         (sreal_verify_basics): Drop one bit from minimum and maximum.
942 2018-08-30  Tamar Christina  <tamar.christina@arm.com>
944         * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
946 2018-08-30  Vlad Lazar  <vlad.lazar@arm.com>
948         PR middle-end/86995
949         * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
950         if to_add is negative.
952 2018-08-29  Bernd Edlinger  <bernd.edlinger@hotmail.de>
954         PR middle-end/87053
955         * builtins.c (c_strlen): Improve range checks.
957 2018-08-29  Martin Sebor  <msebor@redhat.com>
958             Jeff Law  <law@redhat.com>
960         PR tree-optimization/86714
961         PR tree-optimization/86711
962         * builtins.c (c_strlen): Add arguments to call to string_constant.
963         * expr.c (string_constant): Add argument.  Detect missing nul
964         terminator and outermost declaration it's missing in.
965         * expr.h (string_constant): Add argument.
966         * fold-const.c (read_from_constant_string): Add arguments to call to
967         string_constant.
968         (c_getstr): Likewise.
969         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
970         to string_constant.
971         * tree-ssa-strlen.c (get_stridx): Likewise.
973 2018-08-29  Jan Hubicka  <jh@suse.cz>
975         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
976         Do not stream DECL_VINDEX.
977         * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
978         * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
979         (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
981 2018-08-29  Richard Biener  <rguenther@suse.de>
983         * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
984         virtual operands that are not default defs to honor region
985         boundaries.
986         (rpo_vn_valueize): Remove ineffective code here.
988 2018-08-29  Richard Biener  <rguenther@suse.de>
990         PR tree-optimization/87132
991         * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
992         when skipping defs reachable over backedges.
994 2018-08-29  Richard Biener  <rguenther@suse.de>
996         * tree-core.h: Document use of deprecated_flag in SSA_NAME.
997         * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
998         * tree-into-ssa.c (pass_build_ssa::execute): Initialize
999         function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
1000         * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
1001         (vn_reference_lookup_3): Remove use of const_parms.
1002         (free_rpo_vn): Do not free const_parms.
1003         (do_rpo_vn): Do not call init_const_parms.
1004         * tree-ssa-alias.c (refs_may_alias_p_1): Honor
1005         SSA_NAME_POINTS_TO_READONLY_MEMORY.
1006         (call_may_clobber_ref_p_1): Likewise.
1008 2018-08-29  Alexander Monakov  <amonakov@ispras.ru>
1010         PR other/86726
1011         * invoke.texi (Optimization Options): List -ftree-scev-cprop.
1012         (-O): Ditto.
1013         (-ftree-scev-cprop): Document.
1015 2018-08-29  Jan Hubicka  <jh@suse.cz>
1017         * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
1018         parameters.
1019         (sreal constructor): Update.
1020         * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
1021         sreal:operator/): Update.
1023 2018-08-29  Martin Liska  <mliska@suse.cz>
1025         * tree-switch-conversion.c (switch_conversion::expand):
1026         Strenghten assumption about gswitch statements.
1028 2018-08-29  Richard Biener  <rguenther@suse.de>
1030         PR tree-optimization/87117
1031         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
1032         re-value-number released SSA VDEFs.
1034 2018-08-29  Richard Biener  <rguenther@suse.de>
1036         PR tree-optimization/87126
1037         * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
1039 2018-08-28  Jim Wilson  <jimw@sifive.com>
1041         * config/riscv/pic.md: Rewrite.
1042         * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
1043         invalid address.
1044         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
1045         (SOFTF, default_load, softload, softstore): New.
1047 2018-08-28  Jeff Law  <law@redhat.com>
1049         * fold-const.c (fold_binary_loc): Remove recently added assert.
1051 2018-08-28  Joern Rennecke  <joern.rennecke@riscy-ip.com>
1053         * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
1054         to OP parmeter of generated function.
1056 2018-08-28  MCC CS  <deswurstes@users.noreply.github.com>
1058         PR tree-optimization/87009
1059         * match.pd: Add boolean optimizations.
1061 2018-08-28  Martin Sebor  <msebor@redhat.com>
1063         PR middle-end/86631
1064         * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
1065         * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
1066         (pass_walloca::gate): Use it.
1067         (alloca_call_type): Same.
1068         (pass_walloca::execute): Same.
1069         * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
1071 2018-08-28  David Malcolm  <dmalcolm@redhat.com>
1073         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
1074         GCC_VERSION for usage of "__gcc_dump_printf__" format from
1075         >= 3005 to >= 9000.
1077 2018-08-28  Richard Biener  <rguenther@suse.de>
1079         PR tree-optimization/87124
1080         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
1081         constants before looking up avail.
1083 2018-08-28  Jakub Jelinek  <jakub@redhat.com>
1085         PR middle-end/87099
1086         * calls.c (maybe_warn_nonstring_arg): Punt early if
1087         warn_stringop_overflow is zero.  Don't call get_range_strlen
1088         on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
1089         Swap comparison operands to have constants on rhs.  Only use
1090         lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
1091         increment lenrng[0].
1093 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
1095         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
1096         use of tree_to_shwi.  Remove duplicated test for the size being
1097         a whole number of bytes.
1099 2018-08-28  Richard Biener  <rguenther@suse.de>
1101         PR tree-optimization/87117
1102         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
1103         Handle removed stmt without LHS (GIMPLE_NOP).
1105 2018-08-28  Richard Biener  <rguenther@suse.de>
1107         PR tree-optimization/87117
1108         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
1109         void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
1111 2018-08-28  Richard Biener  <rguenther@suse.de>
1113         PR tree-optimization/87117
1114         * tree-ssa-pre.c (compute_avail): Do not make expressions
1115         with predicated values available.
1116         (get_expr_value_id): Assert we do not run into predicated value
1117         expressions.
1119 2018-08-28  Richard Biener  <rguenther@suse.de>
1121         PR tree-optimization/87117
1122         * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
1123         get virtual operands.
1124         (get_expr_operands): Handle STRING_CST like other decls.
1126 2018-08-28  Martin Liska  <mliska@suse.cz>
1128         * tree.h: Update documentation of fndecl_built_in_p
1129         functions.
1132 2018-08-27  Jeff Law  <law@redhat.com>
1133         PR tree-optimization/87110
1134         * tree-ssa-dse.c (compute_trims): Handle non-constant
1135         TYPE_SIZE_UNIT.
1137 2018-08-27  Martin Sebor  <msebor@redhat.com>
1139         PR tree-optimization/86914
1140         * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
1142 2018-08-27  Martin Sebor  <msebor@redhat.com>
1144         PR tree-optimization/87112
1145         * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
1146         the type of the bound argument.
1148 2018-08-27  Jeff Law  <law@redhat.com>
1150         * tree-ssa-dse.c (compute_trims): Handle case where the reference's
1151         type does not have a TYPE_SIZE_UNIT.
1153 2018-08-27  Steve Ellcey  <sellcey@cavium.com>
1155         * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
1156         with include of backend.h.
1158 2018-08-27  Richard Biener  <rguenther@suse.de>
1160         PR tree-optimization/86927
1161         * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
1162         use const cond reduction code.
1164 2018-08-27  Alexander Monakov  <amonakov@ispras.ru>
1166         PR tree-optimization/85758
1167         * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
1169 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
1171         PR c++/87091
1172         * diagnostic-show-locus.c (class layout_range): Update for
1173         conversion of show_caret_p to a tri-state.
1174         (layout_range::layout_range): Likewise.
1175         (make_range): Likewise.
1176         (layout::maybe_add_location_range): Likewise.
1177         (layout::should_print_annotation_line_p): Don't show annotation
1178         lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
1179         (layout::get_state_at_point): Update for conversion of
1180         show_caret_p to a tri-state.  Bail out early for
1181         SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
1182         underlining or source colorization.
1183         (gcc_rich_location::add_location_if_nearby): Update for conversion
1184         of show_caret_p to a tri-state.
1185         (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
1186         (selftest::test_one_liner_fixit_replace_equal_secondary_range):
1187         Likewise.
1188         (selftest::test_one_liner_labels): Likewise.
1189         * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
1190         conversion of show_caret_p to a tri-state.
1191         * pretty-print.c (text_info::set_location): Likewise.
1192         * pretty-print.h (text_info::set_location): Likewise.
1193         * substring-locations.c (format_warning_n_va): Likewise.
1194         * tree-diagnostic.c (default_tree_printer): Likewise.
1195         * tree-pretty-print.c (newline_and_indent): Likewise.
1197 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
1199         PR c++/87091
1200         * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
1201         line above for line-insertion fix-it hints.
1202         (selftest::test_fixit_insert_containing_newline): Update the
1203         expected results, and add a test with line-numbering enabled.
1205 2018-08-27  Martin Liska  <mliska@suse.cz>
1207         PR sanitizer/86962
1208         * sanopt.c (sanitize_rewrite_addressable_params): Ignore
1209         params with DECL_HAS_VALUE_EXPR_P.
1211 2018-08-27  Martin Liska  <mliska@suse.cz>
1213         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
1214         selected expansion strategy.
1216 2018-08-27  Martin Liska  <mliska@suse.cz>
1218         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
1219         * builtins.c (is_builtin_fn): Likewise.
1220         * attribs.c (diag_attr_exclusions): Use new function
1221         fndecl_built_in_p and remove check for FUNCTION_DECL if
1222         possible.
1223         (builtin_mathfn_code): Likewise.
1224         (fold_builtin_expect): Likewise.
1225         (fold_call_expr): Likewise.
1226         (fold_builtin_call_array): Likewise.
1227         (fold_call_stmt): Likewise.
1228         (set_builtin_user_assembler_name): Likewise.
1229         (is_simple_builtin): Likewise.
1230         * calls.c (gimple_alloca_call_p): Likewise.
1231         (maybe_warn_nonstring_arg): Likewise.
1232         * cfgexpand.c (expand_call_stmt): Likewise.
1233         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
1234         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
1235         (cgraph_node::verify_node): Likewise.
1236         * cgraphclones.c (build_function_decl_skip_args): Likewise.
1237         (cgraph_node::create_clone): Likewise.
1238         * config/arm/arm.c (arm_insert_attributes): Likewise.
1239         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
1240         * dse.c (scan_insn): Likewise.
1241         * expr.c (expand_expr_real_1): Likewise.
1242         * fold-const.c (operand_equal_p): Likewise.
1243         (fold_binary_loc): Likewise.
1244         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
1245         * gimple-low.c (lower_stmt): Likewise.
1246         * gimple-pretty-print.c (dump_gimple_call): Likewise.
1247         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Likewise.
1248         * gimple.c (gimple_build_call_from_tree): Likewise.
1249         (gimple_call_builtin_p): Likewise.
1250         (gimple_call_combined_fn): Likewise.
1251         * gimplify.c (gimplify_call_expr): Likewise.
1252         (gimple_boolify): Likewise.
1253         (gimplify_modify_expr): Likewise.
1254         (gimplify_addr_expr): Likewise.
1255         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
1256         * ipa-cp.c (determine_versionability): Likewise.
1257         * ipa-fnsummary.c (compute_fn_summary): Likewise.
1258         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
1259         * ipa-split.c (visit_bb): Likewise.
1260         (split_function): Likewise.
1261         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
1262         * lto-cgraph.c (input_node): Likewise.
1263         * lto-streamer-out.c (write_symbol): Likewise.
1264         * omp-low.c (setjmp_or_longjmp_p): Likewise.
1265         (lower_omp_1): Likewise.
1266         * predict.c (strip_predict_hints): Likewise.
1267         * print-tree.c (print_node): Likewise.
1268         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
1269         * trans-mem.c (is_tm_irrevocable): Likewise.
1270         (is_tm_load): Likewise.
1271         (is_tm_simple_load): Likewise.
1272         (is_tm_store): Likewise.
1273         (is_tm_simple_store): Likewise.
1274         (is_tm_abort): Likewise.
1275         (tm_region_init_1): Likewise.
1276         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
1277         * tree-cfg.c (verify_gimple_call): Likewise.
1278         (move_stmt_r): Likewise.
1279         (stmt_can_terminate_bb_p): Likewise.
1280         * tree-eh.c (lower_eh_constructs_2): Likewise.
1281         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
1282         * tree-inline.c (remap_gimple_stmt): Likewise.
1283         (copy_bb): Likewise.
1284         (estimate_num_insns): Likewise.
1285         (fold_marked_statements): Likewise.
1286         * tree-sra.c (scan_function): Likewise.
1287         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
1288         (optimize_stack_restore): Likewise.
1289         (pass_fold_builtins::execute): Likewise.
1290         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
1291         (mark_all_reaching_defs_necessary_1): Likewise.
1292         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
1293         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
1294         (pass_forwprop::execute): Likewise.
1295         * tree-ssa-loop-im.c (stmt_cost): Likewise.
1296         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
1297         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
1298         * tree-ssa-strlen.c (get_string_length): Likewise.
1299         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
1300         (find_func_aliases_for_call): Likewise.
1301         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
1302         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
1303         * tree-tailcall.c (find_tail_calls): Likewise.
1304         * tree.c (need_assembler_name_p): Likewise.
1305         (free_lang_data_in_decl): Likewise.
1306         (get_call_combined_fn): Likewise.
1307         * ubsan.c (is_ubsan_builtin_p): Likewise.
1308         * varasm.c (incorporeal_function_p): Likewise.
1309         * tree.h (DECL_BUILT_IN): Remove and replace with
1310         fndecl_built_in_p.
1311         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
1312         (fndecl_built_in_p): New.
1314 2018-08-27  Martin Liska  <mliska@suse.cz>
1316         PR tree-optimization/86847
1317         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
1318         Dump also subtree probability.
1319         (switch_decision_tree::do_jump_if_equal): New function.
1320         (switch_decision_tree::emit_case_nodes): Handle special
1321         situations in balanced tree that can be emitted much simpler.
1322         Fix calculation of probabilities that happen in tree expansion.
1323         * tree-switch-conversion.h (struct cluster): Add
1324         is_single_value_p.
1325         (struct simple_cluster): Likewise.
1326         (struct case_tree_node): Add new function has_child.
1327         (do_jump_if_equal): New.
1329 2018-08-27  Martin Liska  <mliska@suse.cz>
1331         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
1332         Add new argument to bit_test_cluster constructor.
1333         (bit_test_cluster::emit): Set bits really number of values
1334         handlel by a test.
1335         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
1336         probability argument.
1337         * tree-switch-conversion.h (struct bit_test_cluster):
1338         Add m_handles_entire_switch.
1340 2018-08-27  Martin Liska  <mliska@suse.cz>
1342         PR tree-optimization/86702
1343         * tree-switch-conversion.c (jump_table_cluster::emit):
1344         Make probabilities even for values in jump table
1345         according to number of cases handled.
1346         (switch_decision_tree::compute_cases_per_edge): Pass
1347         argument to reset_out_edges_aux function.
1348         (switch_decision_tree::analyze_switch_statement): Likewise.
1349         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
1350         Make it static.
1352 2018-08-27  Martin Liska  <mliska@suse.cz>
1354         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
1355         cfun argument explicitly.
1356         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
1357         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
1358         function gimple_switch_default_bb.
1359         (convert_switch_statements):
1360         (expand_builtins):
1361         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
1362         * stmt.c (label_to_block_fn): Use label_to_block and pass
1363         cfun argument explicitly and use gimple_switch_label_bb.
1364         (expand_case): Likewise.
1365         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
1366         cfun argument explicitly. Likewise.
1367         (make_edges_bb): Likewise.
1368         (make_cond_expr_edges): Likewise.
1369         (get_cases_for_edge): Likewise.
1370         (make_gimple_switch_edges): Likewise.
1371         (label_to_block_fn): Likewise.
1372         (label_to_block): Likewise.
1373         (make_goto_expr_edges): Likewise.
1374         (make_gimple_asm_edges): Likewise.
1375         (main_block_label): Likewise.
1376         (group_case_labels_stmt): Likewise.
1377         (find_taken_edge_computed_goto): Likewise.
1378         (find_taken_edge_switch_expr): Likewise.
1379         (gimple_verify_flow_info): Likewise.
1380         (gimple_redirect_edge_and_branch): Likewise.
1381         (gimple_switch_label_bb): New function.
1382         (gimple_switch_default_bb): Likewise.
1383         (gimple_switch_edge): Likewise.
1384         (gimple_switch_default_edge): Likewise.
1385         * tree-cfg.h (label_to_block_fn): Remove and replace ...
1386         (label_to_block): ... with this.
1387         (gimple_switch_label_bb): New.
1388         (gimple_switch_default_bb): Likewise.
1389         (gimple_switch_edge): Likewise.
1390         (gimple_switch_default_edge): Likewise.
1391         * tree-cfgcleanup.c (convert_single_case_switch): Use
1392         new gimple functions and pass new argument to label_to_block.
1393         (cleanup_control_flow_bb):
1394         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
1395         cfun argument explicitly.
1396         (make_eh_edges): Likewise.
1397         (redirect_eh_dispatch_edge): Likewise.
1398         (lower_resx): Likewise.
1399         (lower_eh_dispatch): Likewise.
1400         (maybe_remove_unreachable_handlers): Likewise.
1401         (unsplit_eh): Likewise.
1402         (cleanup_empty_eh): Likewise.
1403         (verify_eh_edges): Likewise.
1404         (verify_eh_dispatch_edge): Likewise.
1405         * tree-ssa-dom.c (record_edge_info): Likewise.
1406         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
1407         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
1408         (thread_through_normal_block): Likewise.
1409         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
1410         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
1411         * tree-switch-conversion.c (switch_conversion::collect): Use new
1412         gimple functions.
1413         (switch_conversion::check_final_bb): Likewise.
1414         (switch_conversion::gather_default_values): Pass new argument
1415         to label_to_block.
1416         (switch_conversion::build_constructors): Likewise.
1417         (switch_decision_tree::compute_cases_per_edge): Use new
1418         gimple_switch_edge function.
1419         (switch_decision_tree::analyze_switch_statement): Pass new argument
1420         to label_to_block.
1421         (switch_decision_tree::try_switch_expansion): Use
1422         gimple_switch_default_edge.
1423         * tree-vrp.c (find_switch_asserts): Pass new argument
1424         to label_to_block.
1425         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
1426         (vr_values::simplify_switch_using_ranges): Likewise.
1428 2018-08-27  Richard Biener  <rguenther@suse.de>
1430         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
1431         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
1433         * tree-ssa-sccvn.h (struct vn_pval): New structure.
1434         (struct vn_nary_op_s): Add unwind_to member.  Add
1435         predicated_values flag and put result into a union together
1436         with a linked list of vn_pval.
1437         (struct vn_ssa_aux): Add name member to make maintaining
1438         a map of SSA name to vn_ssa_aux possible.  Remove no longer
1439         needed info, dfsnum, low, visited, on_sccstack, use_processed
1440         and range_info_anti_range_p members.
1441         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
1442         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
1443         New functions.
1444         (vn_valueize): New global.
1445         (vn_context_bb): Likewise.
1446         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
1447         VN_INFO_PTR_INFO): Remove.
1448         * tree-ssa-sccvn.c: ... (rewrite)
1449         (pass_fre::execute): For -O2+ initialize loops and run
1450         RPO VN in optimistic mode (iterating).  For -O1 and -Og
1451         run RPO VN in non-optimistic mode.
1452         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
1453         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
1454         * doc/invoke.texi (sccvn-max-scc-size): Remove.
1455         (rpo-vn-max-loop-depth): Document.
1456         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
1457         when valuezing the VUSE signals we walked out of the region.
1458         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
1459         (phi_translate): Set VN context block to use for availability
1460         lookup.
1461         (compute_avail): Likewise.
1462         (pre_valueize): New function.
1463         (pass_pre::execute): Adjust to the RPO VN API.
1465         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
1466         (propagate_constants_for_unrolling): Remove.
1467         (tree_unroll_loops_completely): Perform value-numbering
1468         on the unrolled bodies loop parent.
1470 2018-08-27  Richard Biener  <rguenther@suse.de>
1472         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
1473         for partial antic compute.
1475 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
1477         PR rtl-optimization/87065
1478         * combine.c (simplify_if_then_else): Formatting fix.
1479         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
1480         check.
1481         (known_cond): Don't return const_true_rtx for vector modes.  Use
1482         CONST0_RTX instead of const0_rtx.  Formatting fixes.
1484 2018-08-27  Martin Liska  <mliska@suse.cz>
1486         PR gcov-profile/87069
1487         * gcov.c (process_file): Record files already processed
1488         and warn about a file being processed multiple times.
1490 2018-08-27  Martin Liska  <mliska@suse.cz>
1492         PR driver/83193
1493         * config/aarch64/aarch64.c (aarch64_override_options_internal):
1494         Set default values for x_aarch64_*_string strings.
1495         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
1496         prefix.  For -mabi do not print '=ABI' in help and use
1497         <option_value> format for -msve-vector-bits and -moverride
1498         options.
1500 2018-08-26  Jeff Law  <law@redhat.com>
1502         * config/mips/frame-header-opt.c: Include "backend.h" rather than
1503         "cfg.h"
1505 2018-08-26  Marek Polacek  <polacek@redhat.com>
1507         PR c++/87029, Implement -Wredundant-move.
1508         * doc/invoke.texi: Document -Wredundant-move.
1510 2018-08-25  Martin Sebor  <msebor@redhat.com>
1512         PR tree-optimization/87059
1513         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
1514         to the same type as the other.
1515         * fold-const.c (fold_binary_loc): Assert expectation.
1517 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
1519         * config/darwin.c (machopic_legitimize_pic_address): Clean up
1520         extraneous parentheses, dead code section and formatting.
1522 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
1524         PR c++/87091
1525         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
1526         wide enough for jumps in the line-numbering to be visible.
1527         (layout::print_gap_in_line_numbering): New member function.
1528         (layout::calculate_line_spans): When using line numbering, merge
1529         line spans that are only 1 line apart.
1530         (diagnostic_show_locus): When printing line numbers, show gaps in
1531         line numbering directly, rather than printing headers.
1532         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
1533         line-numbering with multiple line spans.
1534         (selftest::test_fixit_insert_containing_newline_2): Add test of
1535         line-numbering, in which the spans are close enough to be merged.
1537 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
1539         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
1540         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
1541         * tree-vrp.c (range_is_nonnull): Remove.
1542         (range_includes_zero_p): Accept value_range instead of min/max.
1543         (extract_range_from_binary_expr_1): Do not early bail on
1544         POINTER_PLUS_EXPR.
1545         Use range_includes_zero_p instead of range_is_nonnull.
1546         (extract_range_from_unary_expr): Use range_includes_zero_p instead
1547         of range_is_nonnull.
1548         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
1549         special case VR_ANTI_RANGE.
1550         (vrp_finalize): Same.
1551         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
1552         instead of min/max.
1553         (range_is_nonnull): Remove.
1554         * vr-values.c (vrp_stmt_computes_nonzero): Use
1555         range_includes_zero_p instead of range_is_nonnull.
1556         (extract_range_basic): Pass value_range to range_includes_zero_p
1557         instead of range_is_nonnull.
1559 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
1561         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
1562         * emit-rtl.h (rtl_data): Remove return_bnd.
1563         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
1564         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
1565         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
1566         (POINTER_BOUNDS_MODE): Remove definition.
1567         (make_pointer_bounds_mode): Remove.
1568         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
1569         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
1570         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
1571         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
1572         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
1573         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
1574         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
1576         * config/i386/i386-modes.def (BND32, BND64): Remove.
1577         * config/i386/i386.c (dbx_register_map): Remove bound registers.
1578         (dbx64_register_map): Ditto.
1579         (svr4_dbx_register_map): Ditto.
1580         (indirect_thunk_bnd_needed): Remove.
1581         (indirect_thunks_bnd_used): Ditto.
1582         (indirect_return_bnd_needed): Ditto.
1583         (indirect_return_via_cx_bnd): Ditto.
1584         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
1585         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
1586         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
1587         (output_indirect_thunk_function): Remove handling of
1588         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
1589         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
1590         (ix86_save_reg): Remove handling of crtl->return_bnd.
1591         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
1592         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
1593         and UNSPEC_BNDLX_ADDR.
1594         (ix86_output_indirect_branch_via_reg): Remove handling of
1595         indirect_thunk_prefix_bnd.
1596         (ix86_output_indirect_branch_via_push): Ditto.
1597         (ix86_output_function_return): Ditto.
1598         (ix86_output_indirect_function_return): Ditto.
1599         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
1600         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
1601         (CALL_USED_REGISTERS): Ditto.
1602         (REG_ALLOC_ORDER): Update for removal of bound registers.
1603         (HI_REGISTER_NAMES): Ditto.
1604         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
1605         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
1606         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
1607         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
1608         (FIRST_PSEUDO_REG): Update.
1609         (BND): Remove mode iterator.
1610         * config/i386/predicates.md (bnd_mem_operator): Remove.
1612 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
1614         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
1615         vectors.
1617 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
1619         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
1620         the case in which the permute needs only a single element and
1621         repeats for every vector of the result.  Extend that case to
1622         handle variable-length vectors.
1623         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
1625 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
1627         PR debug/79342
1628         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
1629         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
1631 2018-08-24  Richard Biener  <rguenther@suse.de>
1633         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
1634         bb_flags_allocated members.
1635         (auto_flag): New RAII class for allocating flags.
1636         (auto_edge_flag): New RAII class for allocating edge flags.
1637         (auto_bb_flag): New RAII class for allocating bb flags.
1638         * cfgloop.c (verify_loop_structure): Allocate temporary edge
1639         flag dynamically.
1640         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
1641         in favor of temporarily allocated BB flag.
1642         * hsa-brig.c: Re-order includes.
1643         * hsa-dump.c: Likewise.
1644         * hsa-regalloc.c: Likewise.
1645         * print-rtl.c: Likewise.
1646         * profile-count.c: Likewise.
1648 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
1650         PR target/86989
1651         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
1652         the TOC register.
1654 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
1656         PR 87073/bootstrap
1657         * wide-int-range.cc (wide_int_range_div): Do not ignore result
1658         from wide_int_range_multiplicative_op.
1660 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1662         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
1663         "permutaion".
1665 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
1667         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
1668         to 'expanded'.
1670 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
1672         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
1673         full GENERIC expression used for replacement.
1675 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
1677         * tree-vrp.c (abs_extent_range): Remove.
1678         (extract_range_into_wide_ints): Pass wide ints by reference.
1679         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
1680         Pass wide ints by reference in all calls to
1681         extract_range_into_wide_ints.
1682         * wide-int-range.cc (wide_int_range_div): New.
1683         * wide-int-range.h (wide_int_range_div): New.
1684         (wide_int_range_includes_zero_p): New.
1685         (wide_int_range_zero_p): New.
1687 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
1689         * config/aarch64/aarch64.md (arches): New enum.
1690         (arch): New enum attr.
1691         (arch_enabled): New attr.
1692         (enabled): Now uses arch_enabled only.
1693         (simd, sve, fp16): Removed attribute.
1694         (fp): Attr now defined in terms of 'arch'.
1695         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
1696         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
1697         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
1698         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
1699         attributes into 'arch'.
1700         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
1701         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
1702         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
1703         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
1704         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
1705         'simd' attribute into 'arch'.
1706         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
1707         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
1708         Convert use of 'fp' attribute to 'arch'.
1709         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
1710         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
1711         into 'arch'.
1712         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
1713         (different modes) Merge 'fp' and 'simd' into 'arch'.
1714         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
1715         'simd' into 'arch'.
1717 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
1719         PR rtl-optimization/87026
1720         * expmed.c (canonicalize_comparison): If we can no longer create
1721         pseudoregisters, don't.
1723 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
1725         PR target/86951
1726         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
1727         prototype.
1728         * config/arm/arm.c (speculation_barrier_libfunc): New static
1729         variable.
1730         (arm_init_libfuncs): Initialize it.
1731         (arm_emit_speculation_barrier): New function.
1732         * config/arm/arm.md (speculation_barrier): Call
1733         arm_emit_speculation_barrier for architectures that do not have
1734         DSB or ISB.
1735         (speculation_barrier_insn): Only match on Armv7 or later.
1737 2018-08-23  Richard Biener  <rguenther@suse.de>
1739         PR middle-end/87024
1740         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
1741         calls.
1743 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
1745         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
1746         of single-vector TBLs.
1747         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
1748         one input is given.
1750 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
1752         PR target/85910
1753         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
1754         aarch64_evpc_tbl guard.
1756 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1758         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
1759         behaviour.
1761 2018-08-22  Martin Sebor  <msebor@redhat.com>
1763         PR middle-end/87052
1764         * tree-pretty-print.c (pretty_print_string): Add argument.
1765         (dump_generic_node): Call to pretty_print_string with string size.
1767 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
1769         PR rtl-optimization/86771
1770         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
1771         of two SETs into those two SETs, one to be placed at i2, if that SETs
1772         destination is modified between i2 and i3.
1774 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
1776         PR tree-optimization/86725
1777         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
1778         function.
1779         (vect_analyze_scalar_cycles_1): Check it.
1781 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
1783         PR tree-optimization/86725
1784         * tree-vect-loop.c (vect_is_simple_reduction): When treating
1785         an outer loop phi as a double reduction, make sure that the
1786         single user of the phi result is an inner loop phi.
1788 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
1790         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
1791         grouped stores with gaps to a strided group.
1793 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
1795         * tree-vect-stmts.c (get_group_load_store_type)
1796         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
1797         first statement in a group.
1799 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
1801         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
1802         the sequence used in gcc/gcc.c.
1804 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
1806         PR other/704
1807         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
1808         building it.
1810 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
1812         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
1813         Darwin10-specific unwinder-shim.
1814         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
1815         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC): 
1816         New to cater for Darwin10 Rosetta.
1818 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
1820         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
1821         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
1823 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
1825         PR bootstrap/81033
1826         PR target/81733
1827         PR target/52795
1828         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
1829         (dwarf2out_switch_text_section): Generate a local label for the
1830         second function sub-section and apply it as the second FDE start
1831         label.
1832         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
1833         second sub-section start.
1835 2018-08-22  Richard Biener  <rguenther@suse.de>
1837         PR tree-optimization/86988
1838         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
1840 2018-08-22  Richard Biener  <rguenther@suse.de>
1842         PR tree-optimization/86945
1843         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
1845 2018-08-22  Alexandre Oliva <oliva@adacore.com>
1847         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
1848         a comment about how uses of r2 for .sdata2 come about.
1850 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
1852         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
1854 2018-08-21  Marek Polacek  <polacek@redhat.com>
1856         PR c++/86981, Implement -Wpessimizing-move.
1857         * doc/invoke.texi: Document -Wpessimizing-move.
1859 2018-08-21  Jan Hubicka  <jh@suse.cz>
1861         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
1862         * tree.h (is_redundant_typedef): Remove.
1863         * dwarf2out.c (is_redundant_typedef): Turn into static function.
1865 2018-08-21  Jan Hubicka  <jh@suse.cz>
1867         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
1868         when possible.
1870 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
1872         * expmed.c (extract_low_bits): Reject invalid subregs early.
1874 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1876         PR middle-end/86121
1877         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
1878         behaviour.
1880 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
1882         * config/vxworks.h: Guard vxworks_asm_out_constructor and
1883         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
1884         * config/vxworks.c: Likewise.
1886 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
1888         * config/vxworks.c: Set targetm.have_ctors_dtors
1889         if HAVE_INITFINI_ARRAY_SUPPORT.
1890         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
1891         if HAVE_INITFINI_ARRAY_SUPPORT.
1893 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
1895         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
1896         default search path for VxWorks < 7.
1898 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1900         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
1901         (get_format_string): Refer to c_getstr.
1903 2018-08-21  Tom de Vries  <tdevries@suse.de>
1905         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1906         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1907         (debuginfo_early_stop): Declare.
1908         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
1909         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
1910         (debuginfo_early_stop): New function.
1911         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
1912         and debuginfo_early_stop.
1913         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
1914         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
1915         (general_init): Call debuginfo_early_init.
1916         (finalize): Call debuginfo_fini.
1917         (do_compile): Call debuginfo_init.
1918         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
1919         -fdump-early-debug.
1920         (@item -fdump-debug, @item -fdump-earlydebug): Add.
1922 2018-08-21  Tom de Vries  <tdevries@suse.de>
1924         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
1925         flag_dump_noaddr and flag_dump_unnumbered.
1927 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
1929         * wide-int-range.cc (wide_int_range_abs): New.
1930         (wide_int_range_order_set): Rename from wide_int_range_min_max.
1931         * wide-int-range.h (wide_int_range_abs): New.
1932         (wide_int_range_min_max): New.
1933         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
1934         case to call wide_int_range_abs.
1935         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
1936         (extract_range_from_abs_expr): Delete.
1938 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
1940         PR target/87033
1941         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
1942         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
1943         for indexed loads.
1945 2018-08-20  Nathan Sidwell  <nathan@acm.org>
1946             Jeff Law <law@redhat.com>
1948         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
1949         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
1951 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
1953         PR other/84889
1954         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
1955         (decl_attributes): Likewise.
1956         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
1957         instance.
1958         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
1959         * diagnostic-core.h (class auto_diagnostic_group): New class.
1960         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
1961         (diagnostic_report_diagnostic): Handle the first diagnostics within
1962         a group.
1963         (emit_diagnostic): Add auto_diagnostic_group instance.
1964         (inform): Likewise.
1965         (inform_n): Likewise.
1966         (warning): Likewise.
1967         (warning_at): Likewise.
1968         (warning_n): Likewise.
1969         (pedwarn): Likewise.
1970         (permerror): Likewise.
1971         (error): Likewise.
1972         (error_n): Likewise.
1973         (error_at): Likewise.
1974         (sorry): Likewise.
1975         (fatal_error): Likewise.
1976         (internal_error): Likewise.
1977         (internal_error_no_backtrace): Likewise.
1978         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
1979         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
1980         * diagnostic.h (struct diagnostic_context): Add fields
1981         "diagnostic_group_nesting_depth",
1982         "diagnostic_group_emission_count", "begin_group_cb",
1983         "end_group_cb".
1984         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
1985         Add auto_diagnostic_group instance(s).
1986         (find_explicit_erroneous_behavior): Likewise.
1987         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
1988         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
1989         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
1990         (gimplify_va_arg_expr): Likewise.
1991         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
1992         (HSA_SORRY_AT): Likewise.
1993         * ipa-devirt.c (compare_virtual_tables): Likewise.
1994         (warn_odr): Likewise.
1995         * multiple_target.c (expand_target_clones): Likewise.
1996         * opts-common.c (cmdline_handle_error): Likewise.
1997         * reginfo.c (globalize_reg): Likewise.
1998         * substring-locations.c (format_warning_n_va): Likewise.
1999         * tree-inline.c (expand_call_inline): Likewise.
2000         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
2001         * tree-ssa-loop-niter.c
2002         (do_warn_aggressive_loop_optimizations): Likewise.
2003         * tree-ssa-uninit.c (warn_uninit): Likewise.
2004         * tree.c (warn_deprecated_use): Likewise.
2006 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
2008         PR target/87014
2009         * config/i386/i386.md (eh_return): Always update EH return
2010         address in word_mode.
2012 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
2014         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
2015         TARGET_SPLIT_COMPLEX_ARG is defined.
2017 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2019         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
2021 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2023         PR target/86984
2024         * expr.c (expand_assignment): Assert that bitpos is positive.
2025         (store_field): Likewise
2026         (expand_expr_real_1): Make sure that bitpos is positive.
2027         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
2028         integer overflow.
2030 2018-08-20  Nathan Sidwell  <nathan@acm.org>
2032         * Makefile.in (CPP_ID_DATA_H): Delete.
2033         (CPP_INTERNAL_H): Don't add it.
2034         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
2035         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
2037 2018-08-20  Richard Biener  <rguenther@suse.de>
2039         PR tree-optimization/78655
2040         * tree-vrp.c (extract_range_from_binary_expr_1): Make
2041         pointer + offset nonnull if either operand is nonnull work.
2043 2018-08-20  Tom de Vries  <tdevries@suse.de>
2045         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
2046         unless the referenced die describes the added property using
2047         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
2048         Otherwise, add a DW_AT_location to the referenced die.
2050 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
2052         PR target/86994
2053         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
2054         register_operand when calling ix86_set_reg_reg_cost.
2055         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
2056         Set *total to 0 for operands that satisfy x86_64_immediate_operand
2057         predicate and to 1 otherwise.
2059 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
2061         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
2062         emit a diagnostic that it is not supported and reset the option.
2063         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
2064         supported and consume the option.  (ASM_FINAL_SPEC): New.
2066 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
2068         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
2069         a sentence.
2071 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
2073         C-SKY port: Documentation
2075         * doc/extend.texi (C-SKY Function Attributes): New section.
2076         * doc/invoke.texi (Option Summary): Add C-SKY options.
2077         (C-SKY Options): New section.
2078         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
2080 2018-08-17  Jojo  <jijie_rong@c-sky.com>
2081             Huibin Wang  <huibin_wang@c-sky.com>
2082             Sandra Loosemore  <sandra@codesourcery.com>
2083             Chung-Lin Tang  <cltang@codesourcery.com>
2085         C-SKY port: Backend implementation
2087         * config/csky/*: New.
2088         * common/config/csky/*: New.
2090 2018-08-17  Jojo  <jijie_rong@c-sky.com>
2091             Huibin Wang  <huibin_wang@c-sky.com>
2092             Sandra Loosemore  <sandra@codesourcery.com>
2093             Chung-Lin Tang  <cltang@codesourcery.com>
2094             Andrew Jenner  <andrew@codesourcery.com>
2096         C-SKY port: Configury
2098         * config.gcc (csky-*-*): New.
2099         * configure.ac: Add csky to targets for dwarf2 debug_line support.
2100         * configure: Regenerated.
2102 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
2104         * dump-context.h: Include "dumpfile.h".
2105         (dump_context::dump_printf_va): Convert final param from va_list
2106         to va_list *.  Convert from ATTRIBUTE_PRINTF to
2107         ATTRIBUTE_GCC_DUMP_PRINTF.
2108         (dump_context::dump_printf_loc_va): Likewise.
2109         * dumpfile.c: Include "stringpool.h".
2110         (make_item_for_dump_printf_va): Delete.
2111         (make_item_for_dump_printf): Delete.
2112         (class dump_pretty_printer): New class.
2113         (dump_pretty_printer::dump_pretty_printer): New ctor.
2114         (dump_pretty_printer::emit_items): New member function.
2115         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
2116         function.
2117         (dump_pretty_printer::emit_item): New member function.
2118         (dump_pretty_printer::stash_item): New member function.
2119         (dump_pretty_printer::format_decoder_cb): New member function.
2120         (dump_pretty_printer::decode_format): New member function.
2121         (dump_context::dump_printf_va): Reimplement in terms of
2122         dump_pretty_printer.
2123         (dump_context::dump_printf_loc_va): Convert final param from va_list
2124         to va_list *.
2125         (dump_context::begin_scope): Reimplement call to
2126         make_item_for_dump_printf.
2127         (dump_printf): Update for change to dump_printf_va.
2128         (dump_printf_loc): Likewise.
2129         (selftest::test_capture_of_dump_calls): Convert "stmt" from
2130         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
2131         with %T, %E, and %G.
2132         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
2133         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
2134         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
2135         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
2136         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
2137         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
2138         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
2139         within a dump_printf_loc call to "%wu".
2140         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
2141         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
2142         missing space after "=".
2143         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
2144         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
2145         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
2146         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
2147         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
2148         duplicate "vectorized" from message.
2150 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
2152         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
2153         polyNxK_t element's TYPE_STRING_FLAG.
2155 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
2157         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
2158         (they were unnamed before).  Fix comments.
2160 2018-08-17  Nathan Sidwell  <nathan@acm.org>
2162         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
2164 2018-08-17  Richard Biener  <rguenther@suse.de>
2166         PR tree-optimization/86841
2167         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
2169 2018-08-17  Martin Liska  <mliska@suse.cz>
2171         * common.opt: Remove Warn, Init and Report for options with
2172         Ignore/Deprecated flag. Warning is done automatically for
2173         Deprecated flags.
2174         * config/i386/i386.opt: Likewise.
2175         * config/ia64/ia64.opt: Likewise.
2176         * config/rs6000/rs6000.opt: Likewise.
2177         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
2178         Remove usage of flag_check_pointer_bounds.
2179         * lto-wrapper.c (merge_and_complain): Do not handle
2180         OPT_fcheck_pointer_bounds.
2181         (append_compiler_options): Likewise.
2182         * opt-functions.awk: Do not handle Deprecated.
2183         * optc-gen.awk: Check that Var, Report and Init are not
2184         used for an option with Ignore/Deprecated flag.
2185         * opts-common.c (decode_cmdline_option): Do not report
2186         CL_ERR_DEPRECATED.
2187         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
2188         options.
2189         * opts.h (struct cl_option): Remove cl_deprecated flag.
2190         (CL_ERR_DEPRECATED): Remove error enum value.
2192 2018-08-17  Richard Biener  <rguenther@suse.de>
2194         PR middle-end/86505
2195         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
2196         across a va-arg-pack using call adjust its return value accordingly.
2198 2018-08-16  Martin Sebor  <msebor@redhat.com>
2200         PR tree-optimization/86853
2201         * gimple-ssa-sprintf.c (struct format_result): Rename member.
2202         (struct fmtresult): Add member and initialize it in ctors.
2203         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
2204         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
2205         (format_directive): Set POSUNDER4K when MAYFAIL is set.
2206         (parse_directive): Handle %C same as %c.
2207         (sprintf_dom_walker::compute_format_length): Adjust.
2208         (is_call_safe): Adjust.
2210 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2212         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
2213         for determining how to count the elements.
2214         * builtins.h (c_strlen): Adjust prototype.
2215         * expr.c (string_constant): Add new parameter mem_size.
2216         Set *mem_size appropriately.
2217         * expr.h (string_constant): Adjust protoype.
2218         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
2219         * gimple-fold.h (get_range_strlen): Adjust prototype.
2220         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
2221         (format_string): Call get_string_length with eltsize.
2223 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
2225         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
2226         to emit the span, rather than setting it as the prefix.
2228 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
2230         * diagnostic-show-locus.c (layout::start_annotation_line): Add
2231         "margin_char" parameter, defaulting to space.  Use it in place
2232         of pp_space for the initial part of the margin.
2233         (layout::print_leading_fixits): Use '+' when filling the margin
2234         of line-insertion fix-it hints.
2236 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
2238         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
2239         Delete.
2241 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
2243         * config/rs6000/altivec.md: Don't set length attribute to the default
2244         value.
2245         * config/rs6000/darwin.md: Ditto.
2246         * config/rs6000/dfp.md: Ditto.
2247         * config/rs6000/htm.md: Ditto.
2248         * config/rs6000/rs6000.md: Ditto.
2249         * config/rs6000/sync.md: Ditto.
2250         * config/rs6000/vsx.md: Ditto.
2252 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
2254         * config/rs6000/altivec.md: Don't set length attribute to the default
2255         value, for branch instructions.
2256         * config/rs6000/darwin.md: Ditto.
2257         * config/rs6000/rs6000.md: Ditto.
2259 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
2261         * config/rs6000/rs6000.md (length): Always define as const_int 4.
2262         (unnamed conditional branch define_insn): Set length to 4 or 8
2263         depending on offset.
2264         (<bd>_<mode>): Similar, for alternative 0.
2265         (<bd>tf_<mode>): Ditto.
2267 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
2269         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
2271 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
2273         * doc/rtl.texi: Replace old RTX class names with new names.
2276 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
2278         * expmed.h (canonicalize_comparison): New declaration.
2279         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
2280         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
2281         * optabs.c (prepare_cmp_insn): Likewise.
2282         * rtl.h (unsigned_condition_p): New function which checks if a
2283         comparison operator is unsigned.
2285 2018-08-16  Nathan Sidwell  <nathan@acm.org>
2287         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
2288         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
2290 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
2292         PR target/84711
2293         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
2294         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
2295         (mov<mov>): ..this and enable unconditionally.
2297 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
2299         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
2301 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
2303         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
2304         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
2305         "Common" with "Target".
2307 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
2309         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
2310         * doc/invoke.texi (mmitigate-rop): Remove.
2311         * config/i386/i386.c: Do not include "regrename.h".
2312         (ix86_rop_should_change_byte_p, reg_encoded_number)
2313         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
2314         Remove.
2315         (ix86_reorg): Remove call to ix86_mitigate_rop.
2316         * config/i386/i386.md (attr "modrm_class"): Remove.
2317         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
2318         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
2319         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
2321 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
2323         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
2324         allow folding of mergeh() and mergel() for the float and double types.
2325         (fold_mergehl_helper): Rework to handle building a permute tree
2326         for float vectors.
2328 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
2330         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
2331         for TARGET_SSE.
2333 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
2335         * common.opt (fdiagnostics-show-labels): New option.
2336         * diagnostic-show-locus.c (class layout_range): Add field
2337         "m_label".
2338         (class layout): Add field "m_show_labels_p".
2339         (layout_range::layout_range): Add param "label" and use it to
2340         initialize m_label.
2341         (make_range): Pass in NULL for new "label" param of layout_range's
2342         ctor.
2343         (layout::layout): Initialize m_show_labels_p.
2344         (layout::maybe_add_location_range): Pass in loc_range->m_label
2345         when constructing layout_range instances.
2346         (struct line_label): New struct.
2347         (layout::print_any_labels): New member function.
2348         (layout::print_line): Call it if label-printing is enabled.
2349         (selftest::test_one_liner_labels): New test.
2350         (selftest::test_diagnostic_show_locus_one_liner): Call it.
2351         * diagnostic.c (diagnostic_initialize): Initialize
2352         context->show_labels_p.
2353         * diagnostic.h (struct diagnostic_context): Add field
2354         "show_labels_p".
2355         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2356         -fno-diagnostics-show-labels.
2357         * dwarf2out.c (gen_producer_string): Add
2358         OPT_fdiagnostics_show_labels to the ignored options.
2359         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
2360         param.
2361         (gcc_rich_location::maybe_add_expr): Likewise.
2362         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
2363         label" param, defaulting to NULL.
2364         (gcc_rich_location::add_expr): Add "label" param.
2365         (gcc_rich_location::maybe_add_expr): Likewise.
2366         (class text_range_label): New class.
2367         (class range_label_for_type_mismatch): New class.
2368         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
2369         of format_warning_va.
2370         (fmtwarn_n): Likewise for new params of format_warning_n_va.
2371         * lto-wrapper.c (merge_and_complain): Add
2372         OPT_fdiagnostics_show_labels to the "pick one setting" options.
2373         (append_compiler_options): Likewise to the dropped options.
2374         (append_diag_options): Likewise to the passed-on options.
2375         * opts.c (common_handle_option): Handle the new option.
2376         * selftest-diagnostic.c
2377         (test_diagnostic_context::test_diagnostic_context): Enable
2378         show_labels_p.
2379         * substring-locations.c: Include "gcc-rich-location.h".
2380         (format_warning_n_va): Add "fmt_label" and "param_label" params
2381         and use them as appropriate.
2382         (format_warning_va): Add "fmt_label" and "param_label" params,
2383         passing them on to format_warning_n_va.
2384         (format_warning_at_substring): Likewise.
2385         (format_warning_at_substring_n): Likewise.
2386         * substring-locations.h (format_warning_va): Add "fmt_label" and
2387         "param_label" params.
2388         (format_warning_n_va): Likewise.
2389         (format_warning_at_substring): Likewise.
2390         (format_warning_at_substring_n): Likewise.
2391         * toplev.c (general_init): Initialize global_dc->show_labels_p.
2393 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
2395         PR testsuite/86519
2396         * builtins.c (expand_builtin_memcmp): Do not expand the call
2397         when overflow is detected.
2399 2018-08-15  Martin Sebor  <msebor@redhat.com>
2401         PR tree-optimization/71625
2402         * config/aarch64/aarch64-builtins.c
2403         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
2405 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
2407         * config/s390/s390.c (s390_reorg): Remove loop.
2409 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
2411         * config/darwin.c
2412          (darwin_function_switched_text_sections): Delete.
2413         * gcc/config/darwin.h
2414          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
2416 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
2418         PR target/81685
2419         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
2420         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
2421         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
2423 2018-08-15  Martin Liska  <mliska@suse.cz>
2425         PR tree-optimization/86925
2426         * predict.c (expr_expected_value_1): When taking
2427         later predictor, assign also probability.
2428         Use fold_build2_initializer_loc in order to fold
2429         the expression in -frounding-math.
2431 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
2433         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
2434         patterns.
2435         (expand_vec_perm_1): Try the new method.
2437 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
2439         PR target/86547
2440         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
2441         Check whether lra_live_max_point is 0 before dividing.
2443 2018-08-14  Martin Sebor  <msebor@redhat.com>
2445         PR tree-optimization/86650
2446         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
2447         (vrp_prop::check_mem_ref): Same.
2449 2018-08-13  Liu Hao <lh_mouse@126.com>
2451         * pretty-print.c (eat_esc_sequence): Swap the foreground and
2452         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
2453         and clear it thereafter, as it only works for DBCS.
2455 2018-08-13  Liu Hao <lh_mouse@126.com>
2457         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
2458         handle returned by _get_osf_handle().
2460 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
2462         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
2463         for folding vec_perm.
2465 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
2467         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
2468         Add support for gimple-folding of vec_pack() and vec_unpack()
2469         intrinsics.
2471 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
2473         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
2474         vec_xst variants to the list.
2475         (rs6000_gimple_fold_builtin): Add support for folding unaligned
2476         vector loads and stores.
2478 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
2480         * config.gcc (rs6000-ibm-aix4.x): Delete.
2481         (rs6000-ibm-aix5.1): Delete.
2482         (rs6000-ibm-aix5.2): Delete.
2483         (rs6000-ibm-aix5.3): Delete.
2484         * config/rs6000/aix43.h: Delete.
2485         * config/rs6000/aix51.h: Delete.
2486         * config/rs6000/aix52.h: Delete.
2487         * config/rs6000/t-aix43: Delete.
2489 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
2491         * config/s390/s390.c (s390_decompose_constant_pool_ref):
2492         New function.
2493         (s390_decompose_address): Factor out constant pool ref
2494         decomposition.
2496 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
2498         * config/nds32/nds32-predicates.c
2499         (nds32_can_use_bclr_p): Change return type as bool.
2500         (nds32_can_use_bset_p): Ditto.
2501         (nds32_can_use_btgl_p): Ditto.
2502         (nds32_can_use_bitci_p): Ditto.
2503         * config/nds32/nds32-protos.h
2504         (nds32_can_use_bclr_p): Change declaration.
2505         (nds32_can_use_bset_p): Ditto.
2506         (nds32_can_use_btgl_p): Ditto.
2507         (nds32_can_use_bitci_p): Ditto.
2509 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
2511         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
2512         Support -msched-prolog-epilog option.
2513         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
2515 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
2517         * common/config/nds32/nds32-common.c
2518         (nds32_option_optimization_table): Enalbe -malways-align.
2520 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
2522         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
2523         extra_headers.
2524         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
2525         OPT_misr_secure_ case.
2526         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
2527         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
2528         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
2529         secure attribute.
2530         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
2531         (nds32_isr_info): New field security_level.
2532         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
2533         * config/nds32/nds32.md (return_internal): Consider critical attribute.
2534         * config/nds32/nds32.opt (misr-secure): New option.
2535         * config/nds32/nds32_init.inc: New file.
2536         * config/nds32/nds32_isr.h: New file.
2538 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
2540         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
2541         Update comment for atomic instructions.
2542         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
2543         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
2544         Remove.
2545         (atomic_loaddi): Revise fence expansion to only emit fence prior to
2546         load for __ATOMIC_SEQ_CST model.
2547         (atomic_loaddi_1): Remove float register target.
2548         (atomic_storedi): Handle CONST_INT values.
2549         (atomic_storedi_1): Remove float register source.  Add special case
2550         for zero value.
2551         (memory_barrier): New expander and insn.
2553 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
2555         PR tree-optimization/86835
2556         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
2557         new_stmt after def_gsi, make sure to insert new_square_stmt after
2558         that stmt, not 2 stmts before it.
2560 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
2562         PR target/82418
2563         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
2564         instead of SWI48.
2566 2018-08-10  Martin Liska  <mliska@suse.cz>
2568         PR target/83610
2569         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
2570         function type.
2571         * builtins.c (expand_builtin_expect_with_probability):
2572         New function.
2573         (expand_builtin_expect_with_probability): New function.
2574         (build_builtin_expect_predicate): Add new argumnet probability
2575         for BUILT_IN_EXPECT_WITH_PROBABILITY.
2576         (fold_builtin_expect):
2577         (fold_builtin_2):
2578         (fold_builtin_3):
2579         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
2580         * builtins.h (fold_builtin_expect): Set new argument.
2581         * doc/extend.texi: Document __builtin_expect_with_probability.
2582         * doc/invoke.texi: Likewise.
2583         * gimple-fold.c (gimple_fold_call): Pass new argument.
2584         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
2585         also BUILT_IN_EXPECT_WITH_PROBABILITY.
2586         * predict.c (get_predictor_value): New function.
2587         (expr_expected_value): Add new argument probability. Assume
2588         that predictor and probability are always non-null.
2589         (expr_expected_value_1): Likewise.  For __builtin_expect and
2590         __builtin_expect_with_probability set probability.  Handle
2591         combination in binary expressions.
2592         (tree_predict_by_opcode): Simplify code by simply calling
2593         get_predictor_value.
2594         (pass_strip_predict_hints::execute): Add handling of
2595         BUILT_IN_EXPECT_WITH_PROBABILITY.
2596         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
2597         new predictor.
2598         * tree.h (DECL_BUILT_IN_P): New function.
2600 2018-08-10  Martin Liska  <mliska@suse.cz>
2602         PR tree-optimization/85799
2603         * passes.def: Add argument for pass_strip_predict_hints.
2604         * predict.c (class pass_strip_predict_hints): Add new argument
2605         early_p.
2606         (strip_predictor_early): New function.
2607         (pass_strip_predict_hints::execute): Call the function to
2608         strip predictors.
2609         (strip_predict_hints): New function.
2610         * predict.def: Fix comment.
2612 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
2614         * Makefile.in: Clarify which tm.texi to copy over to assert the
2615         right to grant a GFDL license for all.
2617 2018-08-09  Jeff Law  <law@redhat.com>
2619         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
2620         unused variable.
2622 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
2624         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
2625         prototype.
2627 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
2629         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
2630         reductions for variable-length vectors.
2632 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
2634         PR other/84889
2635         * common.opt (fdiagnostics-show-line-numbers): New option.
2636         * diagnostic-show-locus.c (class layout): Add fields
2637         "m_show_line_numbers_p" and "m_linenum_width";
2638         (num_digits): New function.
2639         (test_num_digits): New function.
2640         (layout::layout): Initialize new fields.  Update m_x_offset
2641         logic to handle any left margin.
2642         (layout::print_source_line): Print line number when requested.
2643         (layout::start_annotation_line): New member function.
2644         (layout::print_annotation_line): Call it.
2645         (layout::print_leading_fixits): Likewise.
2646         (layout::print_trailing_fixits): Likewise.  Update calls to
2647         move_to_column for new parameter.
2648         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
2649         it to potentially call start_annotation_line.
2650         (layout::show_ruler): Call start_annotation_line.
2651         (selftest::test_line_numbers_multiline_range): New selftest.
2652         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
2653         and selftest::test_line_numbers_multiline_range.
2654         * diagnostic.c (diagnostic_initialize): Initialize
2655         show_line_numbers_p.
2656         * diagnostic.h (struct diagnostic_context): Add field
2657         "show_line_numbers_p".
2658         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
2659         -fno-diagnostics-show-line-numbers.
2660         * dwarf2out.c (gen_producer_string): Add
2661         OPT_fdiagnostics_show_line_numbers to the ignored options.
2662         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
2663         one setting" options.
2664         (append_compiler_options): Likewise to the dropped options.
2665         (append_diag_options): Likewise to the passed-on options.
2666         * opts.c (common_handle_option): Handle the new option.
2667         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
2669 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2671         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
2672         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
2673         third argument of type "const signed char" to descriptions of
2674         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
2675         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
2676         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
2677         __builtin_bcdsub_ov functions.
2679 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
2681         PR tree-optimization/86858
2682         * tree-vect-loop.c (vect_is_simple_reduction): Restore
2683         flow_bb_inside_loop_p calls.
2685 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
2687         PR tree-optimization/86871
2688         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
2689         instead of gimple_assign_lhs.
2691 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
2693         PR target/86887
2694         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
2695         register constraint to operand 0.
2696         (add<mode>3_carryinC): Likewise.
2697         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
2699 2018-08-09  Martin Liska  <mliska@suse.cz>
2701         PR c/86895
2702         * common.opt: Remove extra line.
2704 2018-08-09  Martin Liska  <mliska@suse.cz>
2706         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
2707         at the end of a line, make first letter capital and end up
2708         a sentence with a dot.
2709         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
2710         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
2711         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
2712         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
2713         (PARAM_MAX_ISL_OPERATIONS): Likewise.
2714         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
2715         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
2716         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
2717         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
2718         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
2719         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
2720         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
2721         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
2722         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
2723         (PARAM_TREE_REASSOC_WIDTH): Likewise.
2724         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
2725         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
2726         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
2728 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
2730         PR target/84332
2731         * config/s390/s390.c (s390_option_override_internal): Reduce the
2732         stack-clash-protection-probe-interval param if it would be too big
2733         for z900.
2735 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
2737         PR target/46179
2738         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
2739         * config/m68k/m68k.c (handle_move_double): Don't call
2740         m68k_final_prescan_insn.
2741         (m68k_adjust_decorated_operand): Renamed from
2742         m68k_final_prescan_insn, remove first and third operand and
2743         simplify.
2744         (print_operand): Call it.
2745         (print_operand_address): Call it.
2747 2018-08-08  Nathan Sidwell  <nathan@acm.org>
2749         * diagnostic.c (diagnostic_report_current_module): Use
2750         linemap_included_from & linemap_included_from_linemap.
2752 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
2754         * config/aarch64/aarch64-cores.def: Add phecda core.
2755         * config/aarch64/aarch64-tune.md: Regenerate.
2756         * doc/invoke.texi: Add phecda core.
2758 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
2760         PR target/85295
2761         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
2762         definitions.
2763         * config/s390/s390.md ("movti"): Add more alternatives for
2764         constant to GPR copies.
2766 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
2768         * config/s390/s390.c: Fix whitespace damage throughout the file.
2769         * config/s390/s390.h: Likewise.
2770         * config/s390/tpf.h: Likewise.
2772 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
2774         * config/s390/s390.c (s390_loadrelative_operand_p):
2775         Remove TARGET_CPU_ZARCH usages.
2776         (s390_rtx_costs): Likewise.
2777         (s390_legitimate_constant_p): Likewise.
2778         (s390_cannot_force_const_mem): Likewise.
2779         (legitimate_reload_constant_p): Likewise.
2780         (s390_preferred_reload_class): Likewise.
2781         (legitimize_pic_address): Likewise.
2782         (legitimize_tls_address): Likewise.
2783         (s390_split_branches): Removed.
2784         (s390_add_execute): Removed.
2785         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
2786         (s390_mainpool_start): Likewise.
2787         (s390_mainpool_finish): Likewise.
2788         (s390_mainpool_cancel): Removed.
2789         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
2790         (s390_chunkify_cancel): Likewise.
2791         (s390_return_addr_rtx): Likewise.
2792         (s390_register_info): Remove split_branches_pending_p uages.
2793         (s390_optimize_register_info): Likewise.
2794         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
2795         split_branches_pending_p usages.
2796         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
2797         (s390_load_got): Likewise.
2798         (s390_expand_split_stack_prologue): Likewise.
2799         (output_asm_nops): Likewise.
2800         (s390_function_profiler): Likewise.
2801         (s390_emit_call): Likewise.
2802         (s390_conditional_register_usage): Likewise.
2803         (s390_optimize_prologue): Likewise.
2804         (s390_reorg): Remove TARGET_CPU_ZARCH and
2805         split_branches_pending_p usages.
2806         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
2807         usages.
2808         (s390_output_indirect_thunk_function): Likewise.
2809         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
2810         (TARGET_CPU_ZARCH_P): Removed.
2811         (struct machine_function): Remove split_branches_pending_p.
2812         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
2814 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
2816         * common/config/s390/s390-common.c (processor_flags_table):
2817         Remove flags.
2818         * config.gcc: Remove with_arch/with_tune support.
2819         * config/s390/2064.md: Remove cpu attribute comparisons.
2820         * config/s390/driver-native.c (s390_host_detect_local_cpu):
2821         Remove MTN.
2822         * config/s390/linux.h (ASM_SPEC):
2823         Remove -march support.
2824         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
2825         Use a table to get an arch level.
2826         * config/s390/s390-opts.h (enum processor_type):
2827         Remove enum values.
2828         * config/s390/s390.c
2829         (processor_table): Remove entries, add arch_level values.
2830         (s390_issue_rate): Remove cases.
2831         (s390_option_override): Adjust
2832         s390_option_override_internal() call.
2833         (s390_option_override_internal): Remove deprecation warning.
2834         (s390_valid_target_attribute_tree): Adjust
2835         s390_option_override_internal() call.
2836         * config/s390/s390.h (struct s390_processor):
2837         Share with s390-c.c, add arch_level field.
2838         * config/s390/s390.md:
2839         Remove occurrences in cpu attribute.
2840         * config/s390/s390.opt: Remove -march/-mtune support.
2841         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
2842         * doc/invoke.texi: Remove deprecation warning.
2844 2018-08-08  Luis Machado  <luis.machado@linaro.org>
2846         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
2847         global.
2848         (qdf24xx_tunings): Set vector cost structure to
2849         qdf24xx_vector_cost.
2851         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
2852         <register_sextend>: Set to 3.
2854 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
2856         PR target/86838
2857         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
2858         * config/aarch64/aarch64-simd.md
2859         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
2860         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
2861         (aarch64_frecpx<mode>): ...this new pattern.
2862         * config/aarch64/aarch64-simd-builtins.def: Remove comment
2863         about aarch64_frecp<FRECP:frecp_suffix><mode>.
2865 2018-08-07  Martin Liska  <mliska@suse.cz>
2867         PR middle-end/83023
2868         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
2869         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
2870         * predict.def (PRED_MALLOC_NONNULL): New predictor.
2871         * doc/extend.texi: Document that malloc attribute adds
2872         hit to compiler.
2874 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
2876         PR target/86785
2877         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2878         Define to speculation_safe_value_not_needed.
2880 2018-08-06  Jeff Law  <law@redhat.com>
2882         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
2883         the vr_values instance to cprop_into_stmt.
2884         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
2885         (cprop_operand): Also query EVRP to determine if OP is a constant.
2887 2018-08-06  Nathan Sidwell  <nathan@acm.org>
2889         * diagnostic.c (diagnostic_report_current_module): Reroll
2890         included-at loop.  Translate text.
2892 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
2894         * function-tests.c (selftest::test_expansion_to_rtl): Call
2895         free_after_compilation.
2897 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2899         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
2901 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
2903         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
2904         loops with memory block operations from getting unrolled.
2906 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
2908         PR target/86807
2909         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
2910         Define to speculation_safe_value_not_needed.
2912 2018-08-06  Jeff Law  <law@redhat.com>
2914         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
2915         assert.
2917 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2919         PR target/86662
2920         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
2921         with all enabled __intN types.
2923         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
2925 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2927         * alias.c (record_set): Check for clobber high.
2928         * cfgexpand.c (expand_gimple_stmt): Likewise.
2929         * combine-stack-adj.c (single_set_for_csa): Likewise.
2930         * combine.c (find_single_use_1): Likewise.
2931         (set_nonzero_bits_and_sign_copies): Likewise.
2932         (get_combine_src_dest): Likewise.
2933         (is_parallel_of_n_reg_sets): Likewise.
2934         (try_combine): Likewise.
2935         (record_dead_and_set_regs_1): Likewise.
2936         (reg_dead_at_p_1): Likewise.
2937         (reg_dead_at_p): Likewise.
2938         * dce.c (deletable_insn_p): Likewise.
2939         (mark_nonreg_stores_1): Likewise.
2940         (mark_nonreg_stores_2): Likewise.
2941         * df-scan.c (df_find_hard_reg_defs): Likewise.
2942         (df_uses_record): Likewise.
2943         (df_get_call_refs): Likewise.
2944         * dwarf2out.c (mem_loc_descriptor): Likewise.
2945         * haifa-sched.c (haifa_classify_rtx): Likewise.
2946         * ira-build.c (create_insn_allocnos): Likewise.
2947         * ira-costs.c (scan_one_insn): Likewise.
2948         * ira.c (equiv_init_movable_p): Likewise.
2949         (rtx_moveable_p): Likewise.
2950         (interesting_dest_for_shprep): Likewise.
2951         * jump.c (mark_jump_label_1): Likewise.
2952         * postreload-gcse.c (record_opr_changes): Likewise.
2953         * postreload.c (reload_cse_simplify): Likewise.
2954         (struct reg_use): Add source expr.
2955         (reload_combine): Check for clobber high.
2956         (reload_combine_note_use): Likewise.
2957         (reload_cse_move2add): Likewise.
2958         (move2add_note_store): Likewise.
2959         * print-rtl.c (print_pattern): Likewise.
2960         * recog.c (decode_asm_operands): Likewise.
2961         (store_data_bypass_p): Likewise.
2962         (if_test_bypass_p): Likewise.
2963         * regcprop.c (kill_clobbered_value): Likewise.
2964         (kill_set_value): Likewise.
2965         * reginfo.c (reg_scan_mark_refs): Likewise.
2966         * reload1.c (maybe_fix_stack_asms): Likewise.
2967         (eliminate_regs_1): Likewise.
2968         (elimination_effects): Likewise.
2969         (mark_not_eliminable): Likewise.
2970         (scan_paradoxical_subregs): Likewise.
2971         (forget_old_reloads_1): Likewise.
2972         * reorg.c (find_end_label): Likewise.
2973         (try_merge_delay_insns): Likewise.
2974         (redundant_insn): Likewise.
2975         (own_thread_p): Likewise.
2976         (fill_simple_delay_slots): Likewise.
2977         (fill_slots_from_thread): Likewise.
2978         (dbr_schedule): Likewise.
2979         * resource.c (update_live_status): Likewise.
2980         (mark_referenced_resources): Likewise.
2981         (mark_set_resources): Likewise.
2982         * rtl.c (copy_rtx): Likewise.
2983         * rtlanal.c (reg_referenced_p): Likewise.
2984         (single_set_2): Likewise.
2985         (noop_move_p): Likewise.
2986         (note_stores): Likewise.
2987         * sched-deps.c (sched_analyze_reg): Likewise.
2988         (sched_analyze_insn): Likewise.
2990 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
2992         * cse.c (invalidate_reg): New function extracted from...
2993         (invalidate): ...here.
2994         (canonicalize_insn): Check for clobber high.
2995         (invalidate_from_clobbers): invalidate clobber highs.
2996         (invalidate_from_sets_and_clobbers): Likewise.
2997         (count_reg_usage): Check for clobber high.
2998         (insn_live_p): Likewise.
2999         * cselib.c (cselib_expand_value_rtx_1):Likewise.
3000         (cselib_invalidate_regno): Check for clobber in setter.
3001         (cselib_invalidate_rtx): Pass through setter.
3002         (cselib_invalidate_rtx_note_stores):
3003         (cselib_process_insn): Check for clobber high.
3004         * cselib.h (cselib_invalidate_rtx): Add operand.
3006 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
3008         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
3009         (mark_not_eliminable): Likewise.
3010         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
3011         * lra-lives.c (process_bb_lives): Check for clobber high.
3012         * lra.c (new_insn_reg): Remember clobber highs.
3013         (collect_non_operand_hard_regs): Check for clobber high.
3014         (lra_set_insn_recog_data): Likewise.
3015         (add_regs_to_insn_regno_info): Likewise.
3016         (lra_update_insn_regno_info): Likewise.
3018 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
3020         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
3021         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
3023 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
3025         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
3026         (copy_insn_1): Likewise.
3027         (gen_hard_reg_clobber_high): New gen function.
3028         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
3029         * genemit.c (gen_exp): Likewise.
3030         (gen_emit_seq): Pass through info.
3031         (gen_insn): Check for CLOBBER_HIGH.
3032         (gen_expand): Pass through info.
3033         (gen_split): Likewise.
3034         (output_add_clobbers): Likewise.
3035         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
3036         (remove_clobbers): Likewise.
3037         * rtl.h (gen_hard_reg_clobber_high): New declaration.
3039 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
3041         * doc/rtl.texi (clobber_high): Add.
3042         (parallel): Add in clobber high
3043         * rtl.c (rtl_check_failed_code3): Add function.
3044         * rtl.def (CLOBBER_HIGH): Add expression.
3045         * rtl.h (RTL_CHECKC3): Add macro.
3046         (rtl_check_failed_code3): Add declaration.
3047         (XC3EXP): Add macro.
3049 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
3051         PR target/86386
3052         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
3053         cfun->machine->max_used_stack_alignment if needed.
3055 2018-08-04  Martin Sebor  <msebor@redhat.com>
3057         PR tree-optimization/86571
3058         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
3059         NaN output to 4.
3061 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
3063         PR target/86799
3064         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3065         Define.
3067 2018-08-03  Jeff Law  <law@redhat.com>
3069         PR target/86795
3070         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3071         Define to speculation_safe_value_not_needed.
3073 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
3075         * doc/gcov.texi (-x): Remove duplicate "to".
3076         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
3077         (-Wif-not-aligned): Remove duplicate "is".
3078         (-flto): Remove duplicate "the".
3079         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
3080         duplicate "v5.00.b".
3081         (MSP430 Options): Remove duplicate "and" from the description
3082         of "-mgprel-sec=regexp".
3083         (x86 Options): Remove duplicate copies of "vmldLog102" and
3084         vmlsLog104 from description of "-mveclibabi=type".
3086 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
3088         * internal-fn.h (first_commutative_argument): Declare.
3089         * internal-fn.c (first_commutative_argument): New function.
3090         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
3091         restrictions for pattern statements.  Use first_commutative_argument
3092         to look for commutative operands in calls to internal functions.
3094 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
3096         * Makefile.in (wide-int-range.o): New.
3097         * tree-vrp.c: Move all the wide_int_* functions to...
3098         * wide-int-range.cc: ...here.
3099         * tree-vrp.h: Move all the wide_int_* prototypes to...
3100         * wide-int-range.h: ...here.
3102 2018-08-03  Tom de Vries  <tdevries@suse.de>
3104         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
3105         UI_NONE.
3106         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
3107         * except.c (output_function_exception_table): Do early exit if
3108         targetm_common.except_unwind_info (&global_options) == UI_NONE.
3110 2018-08-03  Martin Liska  <mliska@suse.cz>
3112         * predict.c (dump_prediction): Change to 2 digits
3113         in fraction part.
3115 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
3117         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
3118         neon_dup_q to...
3119         (falkor_am_1_gtov_gtov): ... a new insn reservation.
3121 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
3123         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
3124         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
3125         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
3126         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
3127         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
3129 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
3131         * diagnostic-show-locus.c (diagnostic_show_locus): Use
3132         pp_take_prefix when saving the existing prefix.
3133         * diagnostic.c (diagnostic_append_note): Likewise.
3134         * langhooks.c (lhd_print_error_function): Likewise.
3135         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
3136         param's type.  Free the existing prefix.
3137         (pp_take_prefix): New function.
3138         (pretty_printer::pretty_printer): Drop the prefix parameter.
3139         Rename the length parameter to match the comment.
3140         (pretty_printer::~pretty_printer): Free the prefix.
3141         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
3142         parameter.
3143         (struct pretty_printer): Drop the "const" from "prefix" field's
3144         type and clarify memory management.
3145         (pp_set_prefix): Drop the "const" from the 2nd param.
3146         (pp_take_prefix): New decl.
3148 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
3150         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
3151         for word_mode_ok here instead of passing as argument.
3152         (expand_block_compare): Change select_block_compare_mode() call.
3153         (expand_strncmp_gpr_sequence): New function.
3154         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
3156 2018-08-02  Jeff Law  <law@redhat.com>
3158         PR target/86790
3159         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3160         Define to speculation_safe_value_not_needed.
3162         PR target/86784
3163         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3164         Define to speculation_safe_value_not_needed.
3166 2018-08-02  Tom de Vries  <tdevries@suse.de>
3168         PR target/86660
3169         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
3170         function.  Return UI_TARGET unconditionally.
3171         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
3172         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
3174 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
3176         * genemit.c (print_overload_test): Fix typo.
3178 2018-08-02  Richard Biener  <rguenther@suse.de>
3180         PR tree-optimization/86816
3181         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
3182         which checks for value availability before querying it.
3183         (gvn_uses_equal): Use it.
3184         (same_succ_hash): Likewise.
3185         (gimple_equal_p): Likewise.
3187 2018-08-02  Nick Clifton  <nickc@redhat.com>
3189         PR target/86813
3190         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3191         Define to speculation_safe_value_not_needed.
3193         PR target/86810
3194         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3195         Define to speculation_safe_value_not_needed.
3197         PR target/86810
3198         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3199         Define to speculation_safe_value_not_needed.
3201         PR target/86803
3202         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3203         Define to speculation_safe_value_not_needed.
3205         PR target/86797
3206         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3207         Define to speculation_safe_value_not_needed.
3209         PR target/86791
3210         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3211         Define to speculation_safe_value_not_needed.
3213         PR target/86789
3214         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3215         Define to speculation_safe_value_not_needed.
3217         PR target/86787
3218         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3219         Define to speculation_safe_value_not_needed.
3221         PR target/86782
3222         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3223         speculation_safe_value_not_needed.
3225         PR target/86781
3226         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
3227         to speculation_safe_value_not_needed.
3229 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
3231         * doc/md.texi: Expand the documentation of instruction names
3232         to mention port-local uses.  Document '@' in pattern names.
3233         * read-md.h (overloaded_instance, overloaded_name): New structs.
3234         (mapping): Declare.
3235         (md_reader::handle_overloaded_name): New member function.
3236         (md_reader::get_overloads): Likewise.
3237         (md_reader::m_first_overload): New member variable.
3238         (md_reader::m_next_overload_ptr): Likewise.
3239         (md_reader::m_overloads_htab): Likewise.
3240         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
3241         m_next_overload_ptr and m_overloads_htab.
3242         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
3243         (get_mode_token, get_code_token, get_int_token): New functions.
3244         (map_attr_string): Add an optional argument that passes back
3245         the associated iterator.
3246         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
3247         (md_reader::handle_overloaded_name, add_overload_instance): New
3248         functions.
3249         (apply_iterators): Handle '@' names.  Report an error if '@'
3250         is used without iterators.
3251         (initialize_iterators): Initialize the new iterator_group fields.
3252         * genopinit.c (handle_overloaded_code_for)
3253         (handle_overloaded_gen): New functions.
3254         (main): Use them to print declarations of maybe_code_for_* and
3255         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
3256         * genemit.c (print_overload_arguments, print_overload_test)
3257         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
3258         (main): Use it to print definitions of maybe_code_for_* and
3259         maybe_gen_* functions.
3260         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
3261         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
3262         instead of explicit mode checks.
3263         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
3264         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
3265         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
3266         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
3267         (aarch64_expand_compare_and_swap): Likewise
3268         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
3269         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
3270         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
3271         (aarch64_constant_pool_reload_icode): Delete.
3272         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
3273         instead of aarch64_constant_pool_reload_icode.  Use
3274         code_for_aarch64_reload_mov instead of explicit mode checks.
3275         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
3276         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
3277         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
3278         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
3279         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
3280         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
3281         (aarch64_atomic_load_op_code): Delete.
3282         (aarch64_emit_atomic_load_op): Likewise.
3283         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
3284         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
3285         instead of aarch64_emit_atomic_load_op.
3286         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
3287         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
3288         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
3289         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
3290         character before the pattern name.
3291         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
3292         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
3293         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
3294         (aarch64_frecps<mode>): Likewise.
3295         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
3296         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
3297         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
3298         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
3299         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
3301 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
3303         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
3304         Allow HFmode constants if TARGET_FP_F16INST.
3306 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
3308         PR target/86014
3309         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
3310         No longer check last store for clobber of address register.
3312 2018-08-02  Martin Liska  <mliska@suse.cz>
3314         PR gcov-profile/86817
3315         * gcov.c (process_all_functions): New function.
3316         (main): Call it.
3317         (process_file): Move functions processing to
3318         process_all_functions.
3320 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
3322         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
3323         "const" to the "gimple *" and "rtx_insn *" parameters.
3324         * dumpfile.h (dump_user_location_t::dump_user_location_t):
3325         Likewise.
3326         (dump_location_t::dump_location_t): Likewise.
3328 2018-08-01  Martin Sebor  <msebor@redhat.com>
3330         PR tree-optimization/86650
3331         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
3332         rather than a "gcall *".  Directly pass the data of interest
3333         to percent_K_format, rather than building a temporary CALL_EXPR
3334         to hold it.
3335         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
3336         (gimple_fold_builtin_strncat): Adjust.
3337         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
3338         gcall* argument with gimple*.
3339         * gimple-ssa-warn-restrict.c (check_call): Same.
3340         (wrestrict_dom_walker::before_dom_children): Same.
3341         (builtin_access::builtin_access): Same.
3342         (check_bounds_or_overlap): Same
3343         (maybe_diag_overlap): Same.
3344         (maybe_diag_offset_bounds): Same.
3345         * tree-diagnostic.c (default_tree_printer): Move usage of
3346         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
3347         to this callsite.
3348         * tree-pretty-print.c (percent_K_format): Add argument.
3349         * tree-pretty-print.h: Add argument.
3350         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
3351         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
3352         (maybe_diag_stxncpy_trunc): Same.
3353         (handle_builtin_stxncpy): Same.
3354         (handle_builtin_strcat): Same.
3356 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3358         * match.pd: Optimise pointer range checks.
3360 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3362         PR tree-optimization/86758
3363         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
3364         to remove pattern statements.
3366 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3368         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
3369         result of dfs_enumerate_from when constructing stmt_vec_infos,
3370         instead of additionally calling get_loop_body.
3372 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3374         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
3375         parameter.
3376         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
3377         When creating an iv, assert that the step is not known to be zero.
3378         (vect_setup_realignment): Update call accordingly.
3379         * tree-vect-stmts.c (vectorizable_store): Likewise.
3380         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
3382 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3384         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
3385         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
3386         (vectorizable_reduction): Likewise.
3387         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
3388         (vect_detect_hybrid_slp_stmts): Likewise.
3389         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
3391 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
3393         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
3394         (wide_int_set_zero_nonzero_bits): ...this.
3395         (zero_nonzero_bits_from_vr): Rename to...
3396         (vrp_set_zero_nonzero_bits): ...this.
3397         (extract_range_from_multiplicative_op_1): Abstract wide int
3398         code...
3399         (wide_int_range_multiplicative_op): ...here.
3400         (extract_range_from_binary_expr_1): Extract wide int binary
3401         operations into their own functions.
3402         (wide_int_range_lshift): New.
3403         (wide_int_range_can_optimize_bit_op): New.
3404         (wide_int_range_shift_undefined_p): New.
3405         (wide_int_range_bit_xor): New.
3406         (wide_int_range_bit_ior): New.
3407         (wide_int_range_bit_and): New.
3408         (wide_int_range_trunc_mod): New.
3409         (extract_range_into_wide_ints): New.
3410         (vrp_shift_undefined_p): New.
3411         (extract_range_from_multiplicative_op): New.
3412         (vrp_can_optimize_bit_op): New.
3413         * tree-vrp.h (value_range::dump): New.
3414         (wide_int_range_multiplicative_op): New.
3415         (wide_int_range_lshift):New.
3416         (wide_int_range_shift_undefined_p): New.
3417         (wide_int_range_bit_xor): New.
3418         (wide_int_range_bit_ior): New.
3419         (wide_int_range_bit_and): New.
3420         (wide_int_range_trunc_mod): New.
3421         (zero_nonzero_bits_from_bounds): Rename to...
3422         (wide_int_set_zero_nonzero_bits): ...this.
3423         (zero_nonzero_bits_from_vr): Rename to...
3424         (vrp_set_zero_nonzero_bits): ...this.
3425         (range_easy_mask_min_max): Rename to...
3426         (wide_int_range_can_optimize_bit_op): this.
3427         * vr-values.c (simplify_bit_ops_using_ranges): Rename
3428         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
3430 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3432         * tree-vectorizer.h (vect_orig_stmt): New function.
3433         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
3434         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
3435         (vect_create_epilog_for_reduction): Likewise.
3436         (vectorizable_live_operation): Likewise.
3437         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
3438         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
3439         * tree-vect-stmts.c (vectorizable_call): Likewise.
3440         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
3442 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3444         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
3445         argument.
3446         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
3447         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
3448         (vect_transform_loop): Likewise.
3449         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3451 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3453         * tree-vectorizer.h (vect_schedule_slp): Return void.
3454         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
3455         (vect_schedule_slp): Likewise.
3457 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3459         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
3460         argument.
3461         (vect_transform_loop): Update calls accordingly.  Schedule SLP
3462         instances before the main loop, if any exist.
3464 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
3466         PR tree-optimization/86749
3467         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
3468         If the lhs is used in a COND_EXPR, check that it is being used
3469         as the "then" or "else" value.
3471 2018-08-01  Tom de Vries  <tdevries@suse.de>
3473         PR target/86800
3474         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
3475         speculation_safe_value_not_needed.
3477 2018-08-01  Richard Biener  <rguenther@suse.de>
3479         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
3480         as base and offset.
3482 2018-08-01  Martin Liska  <mliska@suse.cz>
3484         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
3485         format how successful transformation is dumped.
3486         (gimple_mod_pow2_value_transform): Likewise.
3487         (gimple_mod_subtract_transform): Likewise.
3488         (gimple_stringops_transform): Likewise.
3490 2018-08-01  Martin Liska  <mliska@suse.cz>
3492         PR value-prof/35543
3493         * value-prof.c (interesting_stringop_to_profile_p):
3494         Simplify the code and add BUILT_IN_MEMMOVE.
3495         (gimple_stringops_transform): Likewise.
3497 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
3499         * config/aarch64/aarch64-simd.md
3500         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
3501         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
3502         use GPI iterator instead of SI mode.
3504 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
3506         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
3507         rs6000_speculation_barrier.
3508         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
3509         new barrier pattern name.
3511 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
3513         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
3514         (speculation_barrier): New insn.
3516 2018-08-01  Richard Biener  <rguenther@suse.de>
3518         PR bootstrap/86724
3519         * graphite.h: Include isl/id.h and isl/space.h to allow build
3520         with ISL 0.20.
3522 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
3524         PR target/86651
3525         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
3526         mode for COFF targets.
3527         * defaults.h (TARGET_COFF): Define.
3528         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
3529         TARGET_COFF): Define.
3530         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
3531         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
3532         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
3534 2018-07-31  Alexandre Oliva <oliva@adacore.com>
3536         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
3537         * gimple-streamer-out.c (output_bb): Save it.
3538         * lto-streamer-in.c (input_struct_function_base): Restore
3539         instance discriminator if available.  Create map on demand.
3540         * lto-streamer-out.c (output_struct_function_base): Save it if
3541         available.
3542         * final.c (decl_to_instance_map): Document LTO strategy.
3544 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
3545             Olivier Hainque  <hainque@adacore.com>
3547         * debug.h (decl_to_instance_map_t): New type.
3548         (decl_to_instance_map): Declare.
3549         (maybe_create_decl_to_instance_map): New inline function.
3550         * final.c (bb_discriminator, last_bb_discriminator): New statics,
3551         to track basic block discriminators.
3552         (final_start_function_1): Initialize them.
3553         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
3554         bb_discriminator.
3555         (decl_to_instance_map): New variable.
3556         (map_decl_to_instance, maybe_set_discriminator): New functions.
3557         (notice_source_line): Set discriminator.
3559 2018-07-31  Ian Lance Taylor  <iant@golang.org>
3561         * targhooks.c (default_have_speculation_safe_value): Add
3562         ATTRIBUTE_UNUSED.
3564 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
3566         * dump-context.h: Include "pretty-print.h".
3567         (dump_context::refresh_dumps_are_enabled): New decl.
3568         (dump_context::emit_item): New decl.
3569         (class dump_context): Add fields "m_test_pp" and
3570         "m_test_pp_flags".
3571         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3572         (temp_dump_context::get_dumped_text): New decl.
3573         (class temp_dump_context): Add field "m_pp".
3574         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
3575         (dump_context::refresh_dumps_are_enabled): ...and add a test for
3576         m_test_pp.
3577         (set_dump_file): Update for above change.
3578         (set_alt_dump_file): Likewise.
3579         (dump_loc): New overload, taking a pretty_printer *.
3580         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
3581         to any test pretty-printer.
3582         (make_item_for_dump_gimple_stmt): New function, adapted from
3583         optinfo::add_gimple_stmt.
3584         (dump_context::dump_gimple_stmt): Call it, and use the result,
3585         eliminating the direct usage of dump_file and alt_dump_file in
3586         favor of indirectly using them via emit_item.
3587         (make_item_for_dump_gimple_expr): New function, adapted from
3588         optinfo::add_gimple_expr.
3589         (dump_context::dump_gimple_expr): Call it, and use the result,
3590         eliminating the direct usage of dump_file and alt_dump_file in
3591         favor of indirectly using them via emit_item.
3592         (make_item_for_dump_generic_expr): New function, adapted from
3593         optinfo::add_tree.
3594         (dump_context::dump_generic_expr): Call it, and use the result,
3595         eliminating the direct usage of dump_file and alt_dump_file in
3596         favor of indirectly using them via emit_item.
3597         (make_item_for_dump_printf_va): New function, adapted from
3598         optinfo::add_printf_va.
3599         (make_item_for_dump_printf): New function.
3600         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
3601         and use the result, eliminating the direct usage of dump_file and
3602         alt_dump_file in favor of indirectly using them via emit_item.
3603         (make_item_for_dump_dec): New function.
3604         (dump_context::dump_dec): Call it, and use the result,
3605         eliminating the direct usage of dump_file and alt_dump_file in
3606         favor of indirectly using them via emit_item.
3607         (make_item_for_dump_symtab_node): New function, adapted from
3608         optinfo::add_symtab_node.
3609         (dump_context::dump_symtab_node): Call it, and use the result,
3610         eliminating the direct usage of dump_file and alt_dump_file in
3611         favor of indirectly using them via emit_item.
3612         (dump_context::begin_scope): Reimplement, avoiding direct usage
3613         of dump_file and alt_dump_file in favor of indirectly using them
3614         via emit_item.
3615         (dump_context::emit_item): New member function.
3616         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
3617         Set up test pretty-printer on the underlying context.  Call
3618         refresh_dumps_are_enabled.
3619         (temp_dump_context::~temp_dump_context): Call
3620         refresh_dumps_are_enabled.
3621         (temp_dump_context::get_dumped_text): New member function.
3622         (selftest::verify_dumped_text): New function.
3623         (ASSERT_DUMPED_TEXT_EQ): New macro.
3624         (selftest::test_capture_of_dump_calls): Run all tests twice, with
3625         and then without optinfo enabled.  Add uses of
3626         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
3627         * dumpfile.h: Update comment for the dump_* API.
3628         * optinfo-emit-json.cc
3629         (selftest::test_building_json_from_dump_calls): Update for new
3630         param for temp_dump_context ctor.
3631         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
3632         and "m_owned" field.
3633         (optinfo_item::~optinfo_item): Likewise.
3634         (optinfo::add_item): New member function.
3635         (optinfo::emit): Update comment.
3636         (optinfo::add_string): Delete.
3637         (optinfo::add_printf): Delete.
3638         (optinfo::add_printf_va): Delete.
3639         (optinfo::add_gimple_stmt): Delete.
3640         (optinfo::add_gimple_expr): Delete.
3641         (optinfo::add_tree): Delete.
3642         (optinfo::add_symtab_node): Delete.
3643         (optinfo::add_dec): Delete.
3644         * optinfo.h (class dump_context): New forward decl.
3645         (optinfo::add_item): New decl.
3646         (optinfo::add_string): Delete.
3647         (optinfo::add_printf): Delete.
3648         (optinfo::add_printf_va): Delete.
3649         (optinfo::add_gimple_stmt): Delete.
3650         (optinfo::add_gimple_expr): Delete.
3651         (optinfo::add_tree): Delete.
3652         (optinfo::add_symtab_node): Delete.
3653         (optinfo::add_dec): Delete.
3654         (optinfo::add_poly_int): Delete.
3655         (optinfo_item::optinfo_item): Remove "owned" param.
3656         (class optinfo_item): Remove field "m_owned".
3658 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
3660         PR middle-end/86705
3661         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
3662         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
3663         requested variable alignment.
3664         (expand_one_ssa_partition): Likewise.
3665         (expand_one_var): Likewise.
3667 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3669         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3670         to speculation_safe_value_not_needed.
3672 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3674         * targhooks.h (speculation_safe_value_not_needed): New prototype.
3675         * targhooks.c (speculation_safe_value_not_needed): New function.
3676         * target.def (have_speculation_safe_value): Update documentation.
3677         * doc/tm.texi: Regenerated.
3679 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3681         * config/aarch64/iterators.md (ALLI_TI): New iterator.
3682         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
3683         expand.
3684         (despeculate_copy<ALLI:mode>_insn): New insn.
3685         (despeculate_copyti_insn): New insn.
3686         (despeculate_simple<ALLI:mode>): New insn
3687         (despeculate_simpleti): New insn.
3688         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
3689         function.
3690         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
3691         aarch64_speculation_safe_value.
3692         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
3694 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3696         * config/aarch64/aarch64-speculation.cc: New file.
3697         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
3698         before pass_reorder_blocks.
3699         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
3700         prototype.
3701         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
3702         X14 and X15 when tracking speculation.
3703         * config/aarch64/aarch64.md (register name constants): Add
3704         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
3705         (unspec): Add UNSPEC_SPECULATION_TRACKER.
3706         (speculation_barrier): New insn attribute.
3707         (cmp<mode>): Allow SP in comparisons.
3708         (speculation_tracker): New insn.
3709         (speculation_barrier): Add speculation_barrier attribute.
3710         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
3711         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
3712         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
3714 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3716         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
3717         aarch64_track_speculation is true.
3718         (tb<optab><mode>1): Likewise.
3719         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
3720         generate CB[N]Z when tracking speculation.
3721         (aarch64_split_compare_and_swap): Likewise.
3722         (aarch64_split_atomic_op): Likewise.
3724 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3726         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
3728 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3730         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
3731         (speculation_barrier): New insn.
3733 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3735         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
3736         * config/arm/arm.md (speculation_barrier): New expand.
3737         (speculation_barrier_insn): New pattern.
3739 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3741         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
3742         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
3743         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
3744         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
3745         list.
3746         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
3747         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
3748         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
3749         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
3750         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
3751         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
3752         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
3753         * builtins.c (expand_speculation_safe_value): New function.
3754         (expand_builtin): Call it.
3755         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
3756         * doc/extend.texi: Document __builtin_speculation_safe_value.
3757         * doc/md.texi: Document "speculation_barrier" pattern.
3758         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
3759         TARGET_HAVE_SPECULATION_SAFE_VALUE.
3760         * doc/tm.texi: Regenerated.
3761         * target.def (have_speculation_safe_value, speculation_safe_value): New
3762         hooks.
3763         * targhooks.c (default_have_speculation_safe_value): New function.
3764         (default_speculation_safe_value): New function.
3765         * targhooks.h (default_have_speculation_safe_value): Add prototype.
3766         (default_speculation_safe_value): Add prototype.
3768 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
3770         * dump-context.h (dump_context::dump_loc): New decl.
3771         * dumpfile.c (dump_context::dump_loc): New member function.
3772         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
3773         and dump_gimple_stmt.
3774         (dump_context::dump_gimple_expr_loc): Likewise, using
3775         dump_gimple_expr.
3776         (dump_context::dump_generic_expr_loc): Likewise, using
3777         dump_generic_expr.
3778         (dump_context::dump_printf_loc_va): Likewise, using
3779         dump_printf_va.
3780         (dump_context::begin_scope): Explicitly using the global function
3781         "dump_loc", rather than the member function.
3783 2018-07-31  Martin Sebor  <msebor@redhat.com>
3785         PR tree-optimization/86741
3786         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
3788 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
3790         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
3791         depend on whether prefetch instructions will be emitted or not.
3792         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
3793         will be emitted or not.
3794         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
3795         (TARGET_SETMEM_PFD): New macros.
3797 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3799         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
3800         (NULL_STMT_VEC_INFO): Delete.
3801         (stmt_vec_info::operator*): Likewise.
3802         (stmt_vec_info::operator gimple *): Likewise.
3803         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
3804         of NULL_STMT_VEC_INFO.
3805         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
3806         (vect_reassociating_reduction_p): Likewise.
3807         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
3808         (vectorizable_store): Likewise.
3809         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
3810         (vec_info::free_stmt_vec_infos): Likewise.
3812 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3814         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
3815         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
3817 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3819         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
3820         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3821         (vec_info::free_stmt_vec_info): New private member functions.
3822         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
3823         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
3824         * tree-parloops.c (gather_scalar_reductions): Remove calls to
3825         set_stmt_vec_info_vec and free_stmt_vec_infos.
3826         * tree-vect-loop.c (_loop_vec_info): Remove call to
3827         set_stmt_vec_info_vec.
3828         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
3829         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
3830         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
3831         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
3832         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
3833         assignments in {vec_info::,}new_stmt_vec_info that are redundant
3834         with the clearing in the xcalloc.
3835         (stmt_vec_info_vec): Delete.
3836         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
3837         (vectorize_loops): Likewise.
3838         (vec_info::~vec_info): Remove argument from call to
3839         free_stmt_vec_infos.
3840         (vec_info::add_stmt): Remove vinfo argument from call to
3841         new_stmt_vec_info.
3843 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3845         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
3846         rather than a gimple stmt.
3847         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
3848         information for pattern statements when passed the original
3849         statement; instead wait to be passed the pattern statement itself.
3850         Don't call set_vinfo_for_stmt here.
3851         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
3852         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
3853         stmt_vec_infos here.
3854         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
3855         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
3856         stmt_vec_infos entry.
3858 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3860         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
3861         * tree-vectorizer.c (vec_info::replace_stmt): New function.
3862         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
3863         * tree-vect-stmts.c (vectorizable_call): Likewise.
3864         (vectorizable_simd_clone_call): Likewise.
3866 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3868         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
3869         * tree-vectorizer.c (vec_info::remove_stmt): New function.
3870         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
3871         * tree-vect-loop.c (vect_transform_loop): Likewise.
3872         * tree-vect-slp.c (vect_schedule_slp): Likewise.
3873         * tree-vect-stmts.c (vect_remove_stores): Likewise.
3875 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3877         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
3878         (vect_dr_stmt): Delete.
3879         * tree-vectorizer.c (vec_info::lookup_dr): New function.
3880         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
3881         of DR_VECT_AUX.
3882         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
3883         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
3884         (vect_verify_datarefs_alignment, vect_peeling_supportable)
3885         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3886         (vect_analyze_data_refs): Likewise.
3887         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
3888         argument.
3889         (vect_find_same_alignment_drs): Likewise.
3890         (vect_slp_analyze_node_dependences): Update calls accordingly.
3891         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
3892         instead of DR_VECT_AUX.
3893         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
3894         of a vector data references.  Use vec_info::lookup_dr instead of
3895         DR_VECT_AUX.
3896         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
3897         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
3898         instead of DR_VECT_AUX.
3900 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3902         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
3903         dr_vec_info.
3904         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
3905         accordingly.
3906         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3907         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3908         (vect_gen_prolog_loop_niters): Likewise.
3910 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3912         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
3913         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
3914         (vect_known_alignment_in_bytes, vect_dr_behavior)
3915         (vect_get_scalar_dr_size): Take references as dr_vec_infos
3916         instead of data_references.  Update calls to other routines for
3917         which the same change has been made.
3918         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
3919         dr_vec_infos instead of stmt_vec_infos.
3920         (vect_analyze_data_ref_dependence): Update call accordingly.
3921         (vect_slp_analyze_data_ref_dependence)
3922         (vect_record_base_alignments): Use DR_VECT_AUX.
3923         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
3924         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
3925         (vector_alignment_reachable_p, vect_get_data_access_cost)
3926         (vect_peeling_supportable, vect_analyze_group_access_1)
3927         (vect_analyze_group_access, vect_analyze_data_ref_access)
3928         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
3929         (vect_compile_time_alias, vect_small_gap_p)
3930         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
3931         (vect_supportable_dr_alignment): Take references as dr_vec_infos
3932         instead of data_references.  Update calls to other routines for
3933         which the same change has been made.
3934         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
3935         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
3936         (vect_slp_analyze_and_verify_node_alignment)
3937         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
3938         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
3939         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
3940         above changes.
3941         (_vect_peel_info::dr): Replace with...
3942         (_vect_peel_info::dr_info): ...this new field.
3943         (vect_peeling_hash_get_most_frequent)
3944         (vect_peeling_hash_choose_best_peeling): Update accordingly.
3945         (vect_peeling_hash_get_lowest_cost):
3946         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
3947         routines for which the same change has been made.
3948         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
3949         data_reference.
3950         * tree-vect-loop-manip.c (get_misalign_in_elems)
3951         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
3952         above changes.
3953         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3954         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
3955         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
3956         (get_group_load_store_type, get_negative_load_store_type)
3957         (vect_get_data_ptr_increment, vectorizable_store)
3958         (vectorizable_load): Likewise.
3959         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
3960         Update calls to other routines for which the same change has been made.
3962 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3964         * tree-vectorizer.h (vec_info::move_dr): New member function.
3965         (dataref_aux): Rename to...
3966         (dr_vec_info): ...this and add "dr" and "stmt" fields.
3967         (_stmt_vec_info::dr_aux): Update accordingly.
3968         (_stmt_vec_info::data_ref_info): Delete.
3969         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
3970         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
3971         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
3972         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
3973         of data_ref.
3974         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
3975         (STMT_VINFO_DR_INFO): New macro.
3976         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
3977         (set_dr_misalignment): Update after rename of dataref_aux.
3978         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
3979         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
3980         initialization of STMT_VINFO_DATA_REF.
3981         * tree-vectorizer.c (vec_info::move_dr): New function.
3982         * tree-vect-patterns.c (vect_recog_bool_pattern)
3983         (vect_recog_mask_conversion_pattern)
3984         (vect_recog_gather_scatter_pattern): Use it.
3985         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
3986         the "dr" and "stmt" fields of dr_vec_info instead of
3987         STMT_VINFO_DATA_REF.
3989 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3991         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
3992         (is_pattern_stmt_p): Use it.
3993         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
3994         on pattern statements.
3996 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
3998         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
3999         original stmt as a stmt_vec_info rather than a gimple stmt.
4000         (vect_pattern_recog_1): Take the statement directly as a
4001         stmt_vec_info, rather than via a gimple_stmt_iterator.
4002         Update call to vect_mark_pattern_stmts.
4003         (vect_pattern_recog): Update calls accordingly.
4005 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4007         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
4008         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
4009         a vect_def_type for the first argument.
4010         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
4011         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
4012         operand if it isn't defined by a vectorized statement.
4013         (vect_build_gather_load_calls): Remove the mask_dt argument and
4014         update calls to vect_get_vec_def_for_stmt_copy.
4015         (vectorizable_bswap): Likewise the dt argument.
4016         (vectorizable_call): Update calls to vectorizable_bswap and
4017         vect_get_vec_def_for_stmt_copy.
4018         (vectorizable_simd_clone_call, vectorizable_assignment)
4019         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
4020         (vectorizable_comparison): Update calls to
4021         vect_get_vec_def_for_stmt_copy.
4022         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
4023         vect_is_simple_use.
4024         (vect_get_loop_based_defs): Remove dt argument and update call
4025         to vect_get_vec_def_for_stmt_copy.
4026         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
4027         and vect_get_vec_def_for_stmt_copy.
4028         (vectorizable_load): Update calls to vect_build_gather_load_calls
4029         and vect_get_vec_def_for_stmt_copy.
4030         * tree-vect-loop.c (vect_create_epilog_for_reduction)
4031         (vectorizable_reduction, vectorizable_live_operation): Update calls
4032         to vect_get_vec_def_for_stmt_copy.
4034 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4036         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
4037         and gimple stmt arguments with a stmt_vec_info.
4038         (vect_record_base_alignments): Update calls accordingly.
4039         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
4040         and gimple stmt arguments with a stmt_vec_info.
4041         (vect_build_slp_tree_1): Remove vinfo argument and update call
4042         to vect_record_max_nunits.
4043         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
4044         and vect_record_max_nunits.
4046 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4048         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
4049         file and take a stmt_vec_info instead of a gimple stmt.
4050         (supportable_widening_operation, vect_finish_replace_stmt)
4051         (vect_finish_stmt_generation, vect_get_store_rhs)
4052         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
4053         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
4054         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
4055         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
4056         (vect_create_data_ref_ptr, bump_vector_ptr)
4057         (vect_permute_store_chain, vect_setup_realignment)
4058         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
4059         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
4060         (vectorizable_reduction, vectorizable_induction)
4061         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
4062         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
4063         than gimple stmts as arguments.
4064         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
4065         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
4066         (can_group_stmts_p, vect_check_gather_scatter)
4067         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
4068         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
4069         (vect_permute_load_chain, vect_shift_permute_load_chain)
4070         (vect_transform_grouped_load)
4071         (vect_record_grouped_load_vectors): Likewise.
4072         * tree-vect-loop.c (vect_fixup_reduc_chain)
4073         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
4074         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
4075         (vectorizable_reduction, vectorizable_induction)
4076         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
4077         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
4078         (vect_get_load_store_mask): Likewise.
4079         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
4080         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
4081         * tree-vect-stmts.c (vect_mark_relevant)
4082         (is_simple_and_all_uses_invariant)
4083         (exist_non_indexing_operands_for_use_p, process_use)
4084         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
4085         (vect_get_vec_def_for_operand, vect_get_vec_defs)
4086         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
4087         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
4088         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
4089         (get_negative_load_store_type, get_load_store_type)
4090         (vect_check_load_store_mask, vect_check_store_rhs)
4091         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
4092         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4093         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4094         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4095         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
4096         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
4097         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
4098         (supportable_widening_operation): Likewise.
4100 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4102         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
4103         a stmt_vec_info instead of a gcall.
4104         (vect_check_gather_scatter): Update call accordingly.
4105         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
4106         of a gphi.
4107         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
4108         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
4109         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
4110         instead of a gimple stmt.
4111         (vect_transform_loop): Update calls accordingly.
4112         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
4113         stmt_vec_infos instead of gimple stmts.
4114         (vect_analyze_slp_instance): Update use accordingly.
4115         * tree-vect-stmts.c (read_vector_array, write_vector_array)
4116         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
4117         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
4118         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
4119         (vect_gen_widened_results_half, vect_get_loop_based_defs)
4120         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
4121         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
4122         down to subroutines.
4124 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4126         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
4127         of the worklist from a vector of gimple stmts to a vector of
4128         stmt_vec_infos.
4129         * tree-vect-stmts.c (vect_mark_relevant, process_use)
4130         (vect_mark_stmts_to_be_vectorized): Likewise
4132 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4134         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
4135         statement before passing it to vect_analyze_stmt.
4136         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
4137         the chain of phi vector definitions.  Track the exit phi via its
4138         stmt_vec_info.
4139         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
4140         STMT_VINFO_REDUC_DEF.
4141         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
4142         stmt_vec_infos to handle the statement chains.
4143         (vect_get_slp_defs): Record the first statement in the node
4144         using a stmt_vec_info.
4145         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
4146         statements here and pass their stmt_vec_info down to subroutines.
4147         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
4148         down to vect_finish_stmt_generation.
4149         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
4150         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
4151         stmt_vec_infos to subroutines.
4152         (vect_remove_stores): Use stmt_vec_infos to handle the statement
4153         chains.
4155 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4157         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
4158         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
4159         (vect_permute_store_chain, vect_setup_realignment)
4160         (vect_permute_load_chain, vect_shift_permute_load_chain)
4161         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
4162         stmts internally, and when passing values to other vectorizer routines.
4163         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4164         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
4165         (vect_analyze_loop_operations, get_initial_def_for_reduction)
4166         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
4167         (vectorizable_reduction, vectorizable_induction)
4168         (vectorizable_live_operation, vect_transform_loop_stmt)
4169         (vect_transform_loop): Likewise.
4170         * tree-vect-patterns.c (vect_reassociating_reduction_p)
4171         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
4172         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
4173         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4174         (vect_slp_analyze_node_operations_1): Likewise.
4175         * tree-vect-stmts.c (vect_mark_relevant, process_use)
4176         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
4177         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
4178         (vect_finish_stmt_generation_1, get_group_load_store_type)
4179         (get_load_store_type, vect_build_gather_load_calls)
4180         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4181         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4182         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4183         (vectorizable_store, vectorizable_load, vectorizable_condition)
4184         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
4185         (supportable_widening_operation): Likewise.
4186         (vect_get_vector_types_for_stmt): Likewise.
4187         * tree-vectorizer.h (vect_dr_behavior): Likewise.
4189 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4191         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4192         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
4193         (vect_permute_store_chain, vect_permute_load_chain)
4194         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
4195         repeated stmt_vec_info lookups.
4196         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
4197         (vect_update_ivs_after_vectorizer): Likewise.
4198         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
4199         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4200         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
4201         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4202         (vect_bb_slp_scalar_cost): Likewise.
4203         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
4205 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4207         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
4208         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
4209         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
4210         to get gassigns and gcalls, rather than operating on generc gimple
4211         stmts.
4212         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
4213         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
4214         (vectorizable_load, vect_analyze_stmt): Likewise.
4215         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
4217 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4219         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
4220         return stmt_vec_infos rather than gimple stmts.  Do not accept
4221         null arguments.
4222         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
4223         of a gimple stmt.
4224         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
4225         Update use of get_later_stmt.
4226         (vect_get_constant_vectors): Update call accordingly.
4227         (vect_schedule_slp_instance): Likewise
4228         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
4229         (vect_slp_analyze_instance_dependence): Likewise.
4230         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
4232 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4234         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
4235         (stmt_info_for_cost::stmt_info): ...this new field.
4236         (add_stmt_costs): Update accordingly.
4237         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4238         (vect_get_known_peeling_cost): Likewise.
4239         (vect_estimate_min_profitable_iters): Likewise.
4240         * tree-vect-stmts.c (record_stmt_cost): Likewise.
4242 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4244         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
4245         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4246         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
4247         accordingly.
4248         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
4250 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4252         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
4253         a gimple stmt to a stmt_vec_info.
4254         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
4256 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4258         * tree-vectorizer.h (vec_info::grouped_stores): Change from
4259         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4260         (_loop_vec_info::reduction_chains): Likewise.
4261         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
4262         accordingly.
4263         * tree-vect-slp.c (vect_analyze_slp): Likewise.
4265 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4267         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
4268         a gimple stmt to a stmt_vec_info.
4269         (_stmt_vec_info::next_element): Likewise.
4270         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
4271         (vect_slp_analyze_and_verify_node_alignment)
4272         (vect_analyze_group_access_1, vect_analyze_group_access)
4273         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
4274         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
4275         (vect_supportable_dr_alignment): Update accordingly.
4276         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
4277         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
4278         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
4279         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
4280         * tree-vect-slp.c (vect_build_slp_tree_1)
4281         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
4282         (vect_split_slp_store_group, vect_analyze_slp_instance)
4283         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
4284         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
4285         (get_group_load_store_type, get_load_store_type)
4286         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
4287         (vect_transform_stmt, vect_remove_stores): Likewise.
4289 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4291         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
4292         than a gimple stmt.
4293         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4294         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
4295         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
4296         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
4297         (vector_alignment_reachable_p, vect_get_data_access_cost)
4298         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
4299         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
4300         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
4301         (vect_analyze_group_access_1, vect_analyze_group_access)
4302         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
4303         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
4304         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
4305         result of vect_dr_stmt and use the stmt_vec_info instead of
4306         the associated gimple stmt.
4307         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4308         (vect_gen_prolog_loop_niters): Likewise.
4309         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4311 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4313         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
4314         to a vec<stmt_vec_info>.
4315         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
4316         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
4317         vec<stmt_vec_info>.
4318         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
4319         to a vec<stmt_vec_info>.
4320         (bst_traits::value_type, bst_traits::value_type): Likewise.
4321         (bst_traits::hash): Update accordingly.
4322         (vect_get_and_check_slp_defs): Change the stmts parameter from
4323         a vec<gimple *> to a vec<stmt_vec_info>.
4324         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
4325         (vect_build_slp_tree): Likewise.
4326         (vect_build_slp_tree_2): Likewise.  Update uses of
4327         SLP_TREE_SCALAR_STMTS.
4328         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
4329         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
4330         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
4331         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
4332         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
4333         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
4334         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
4335         (vect_get_constant_vectors, vect_get_slp_defs)
4336         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
4337         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
4338         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
4339         instead of gimple stmts.
4340         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
4341         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
4342         (vect_slp_analyze_instance_dependence): Update uses of
4343         SLP_TREE_SCALAR_STMTS.
4344         (vect_slp_analyze_and_verify_node_alignment): Likewise.
4345         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
4346         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
4347         (get_initial_defs_for_reduction): Likewise.
4348         (vect_create_epilog_for_reduction): Likewise.
4349         (vectorize_fold_left_reduction): Likewise.
4350         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
4351         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
4352         (can_vectorize_live_stmts): Likewise.
4354 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4356         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
4357         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
4358         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
4359         than gimple stmts.
4360         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
4361         of a gimple stmt.
4362         (gather_scalar_reductions): Update after above interface changes.
4363         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
4364         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
4365         than gimple stmts.
4366         (vect_force_simple_reduction): Likewise.
4367         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
4368         LOOP_VINFO_REDUCTIONS.
4369         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
4371 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4373         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
4374         a gimple stmt to a stmt_vec_info.
4375         * tree-vect-loop.c (vect_active_double_reduction_p)
4376         (vect_force_simple_reduction, vectorizable_reduction): Update
4377         accordingly.
4379 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4381         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
4382         vec<gimple *> to a vec<stmt_vec_info>.
4383         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
4384         the reduction_phis argument from a vec<gimple *> to a
4385         vec<stmt_vec_info>.
4386         (vectorizable_reduction): Likewise the phis local variable that
4387         is passed to vect_create_epilog_for_reduction.  Update for new type
4388         of SLP_TREE_VEC_STMTS.
4389         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
4390         (vectorizable_live_operation): Likewise.
4391         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
4392         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
4394 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4396         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
4397         a gimple stmt to a stmt_vec_info.
4398         (vectorizable_condition, vectorizable_live_operation)
4399         (vectorizable_reduction, vectorizable_induction): Pass back the
4400         vectorized statement as a stmt_vec_info.
4401         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
4402         use of STMT_VINFO_VEC_STMT.
4403         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
4404         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
4405         as stmt_vec_infos rather than gimple stmts.
4406         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
4407         to a stmt_vec_info.
4408         (vectorizable_live_operation): Likewise.
4409         (vectorizable_reduction, vectorizable_induction): Likewise,
4410         updating use of STMT_VINFO_VEC_STMT.
4411         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
4412         of STMT_VINFO_VEC_STMT.
4413         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
4414         (vectorizable_simd_clone_call, vectorizable_conversion)
4415         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4416         (vectorizable_store, vectorizable_load, vectorizable_condition)
4417         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
4418         from a gimple stmt to a stmt_vec_info.
4419         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
4420         pointer to a stmt_vec_info to the vectorizable_* routines.
4422 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4424         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
4425         a gimple stmt to a stmt_vec_info.
4426         (is_pattern_stmt_p): Update accordingly.
4427         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
4428         (vect_record_grouped_load_vectors): Likewise.
4429         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
4430         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
4431         (vect_model_reduction_cost): Likewise.
4432         (vect_create_epilog_for_reduction): Likewise.
4433         (vectorizable_reduction, vectorizable_induction): Likewise.
4434         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4435         Return the stmt_vec_info for the pattern statement.
4436         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
4437         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
4438         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4439         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
4440         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
4441         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
4442         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
4443         (free_stmt_vec_info, vect_is_simple_use): Likewise.
4445 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4447         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
4448         (vect_finish_stmt_generation): Likewise.
4449         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4450         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
4451         (vect_build_gather_load_calls): Use the return value of the above
4452         functions instead of a separate call to vinfo_for_stmt.  Use narrow
4453         scopes for the input gimple stmt and wider scopes for the associated
4454         stmt_vec_info.  Use vec_info::lookup_def when setting these
4455         stmt_vec_infos from an SSA_NAME definition.
4456         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
4457         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
4458         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
4459         (vectorizable_store, vectorizable_load, vectorizable_condition)
4460         (vectorizable_comparison): Likewise.
4461         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
4462         (vectorizable_reduction): Likewise.
4464 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4466         * tree-vectorizer.h (vect_is_simple_use): Add an optional
4467         stmt_vec_info * parameter before the optional gimple **.
4468         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4469         (process_use, vect_get_vec_def_for_operand_1): Update callers.
4470         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
4471         * tree-vect-loop.c (vectorizable_reduction): Likewise.
4472         (vectorizable_live_operation): Likewise.
4473         * tree-vect-patterns.c (type_conversion_p): Likewise.
4474         (vect_look_through_possible_promotion): Likewise.
4475         (vect_recog_rotate_pattern): Likewise.
4476         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4478 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4480         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
4481         a typedef to a wrapper class.
4482         (NULL_STMT_VEC_INFO): New macro.
4483         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
4484         (stmt_vec_info::operator*): New function.
4485         (stmt_vec_info::operator gimple *): Likewise.
4486         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
4487         (add_stmt_costs): Likewise.
4488         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
4489         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
4490         (vect_get_known_peeling_cost): Likewise.
4491         (vect_estimate_min_profitable_iters): Likewise.
4492         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4493         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
4494         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
4495         (vectorizable_store, free_stmt_vec_infos): Likewise.
4496         (new_stmt_vec_info): Change return type of xcalloc to
4497         _stmt_vec_info *.
4499 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4501         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
4502         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
4503         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
4504         a single_imm_use-based sequence.
4505         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
4507 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4509         * tree-vectorizer.h (vec_info::lookup_def): Declare.
4510         * tree-vectorizer.c (vec_info::lookup_def): New function.
4511         * tree-vect-patterns.c (vect_get_internal_def): Use it.
4512         (vect_widened_op_tree): Likewise.
4513         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
4514         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
4515         (vectorizable_reduction): Likewise.
4516         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
4517         of a gimple *.
4518         (vect_is_slp_reduction): Update calls accordingly.  Use
4519         vec_info::lookup_def.
4520         (vect_is_simple_reduction): Likewise
4521         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
4523 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4525         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
4526         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
4527         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
4528         of vinfo_for_stmt.
4529         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
4530         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
4531         (vect_update_vf_for_slp, vect_analyze_loop_operations)
4532         (vect_is_slp_reduction, vectorizable_induction)
4533         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
4534         * tree-vect-patterns.c (vect_init_pattern_stmt):
4535         (vect_determine_min_output_precision_1, vect_determine_precisions)
4536         (vect_pattern_recog): Likewise.
4537         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
4538         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
4539         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
4540         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
4541         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
4542         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
4543         info field from a loop to a loop_vec_info.
4545 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4547         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
4548         (vec_info::add_stmt): Declare.
4549         * tree-vectorizer.c (vec_info::add_stmt): New function.
4550         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
4551         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
4552         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
4553         (vectorizable_induction): Likewise.
4554         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
4555         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4556         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
4557         (vectorizable_load): Likewise.
4558         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
4559         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
4560         (vect_recog_gather_scatter_pattern): Likewise.
4561         (append_pattern_def_seq): Likewise.  Remove a check that is
4562         performed by add_stmt itself.
4564 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4566         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
4567         which make_ssa_name was called with new_stmt before new_stmt
4568         had been created.
4570 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4572         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
4573         split out from...
4574         (vect_is_slp_reduction): ...here...
4575         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
4576         that are already known to be false.
4578 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4580         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
4581         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
4582         STMT_VINFO_NUM_SLP_USES when it's true.
4583         (vect_free_slp_instance): Add a final_p parameter and pass it to
4584         vect_free_slp_tree.
4585         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
4586         (vect_analyze_slp_instance): Likewise.
4587         (vect_slp_analyze_operations): Likewise.
4588         (vect_slp_analyze_bb_1): Likewise.
4589         * tree-vectorizer.c (vec_info): Likewise.
4590         * tree-vect-loop.c (vect_transform_loop): Likewise.
4592 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4594         * tree-vect-loop.c (vectorizable_reduction): Assert that the
4595         function is not called for second and subsequent members of
4596         a reduction group.
4598 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
4600         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
4601         cases for nested loops from here to ...
4602         (vect_create_epilog_for_reduction): ...here.  Only call
4603         vect_is_simple_use for inner-loop reductions.
4605 2018-07-31  Martin Liska  <mliska@suse.cz>
4607         PR gcov-profile/85338
4608         PR gcov-profile/85350
4609         PR gcov-profile/85372
4610         * profile.c (struct location_triplet): New.
4611         (struct location_triplet_hash): Likewise.
4612         (output_location): Do not output a BB that
4613         is already recorded for a line.
4614         (branch_prob): Use streamed_locations.
4616 2018-07-31  Martin Liska  <mliska@suse.cz>
4618         PR gcov-profile/85370
4619         * coverage.c (coverage_begin_function): Do not mark target
4620         clones as artificial functions.
4622 2018-07-31  Martin Liska  <mliska@suse.cz>
4624         PR gcov-profile/83813
4625         PR gcov-profile/84758
4626         PR gcov-profile/85217
4627         PR gcov-profile/85332
4628         * profile.c (branch_prob): Do not record GOTO expressions
4629         for GIMPLE statements which locations are already streamed.
4631 2018-07-31  Olivier Hainque  <hainque@adacore.com>
4633         * gcc.c (handle_spec_function): Accept a soft_matched_part
4634         argument, as do_spec_1.  Pass it down to ...
4635         (eval_spec_function): Accept a soft_matched_part argument,
4636         and pass it down to ...
4637         (do_spec_2): Accept a soft_matched_part argument, and pass
4638         it down to do_spec_1.
4639         (do_spec_1): Pass soft_matched_part to handle_spec_function.
4640         (handle_braces): Update call to handle_spec_function.
4641         (driver::set_up_specs): Update calls to do_spec_2.
4642         (compare_debug_dump_opt_spec_function): Likewise.
4643         (compare_debug_self_opt_spec_function): Likewise.
4645 2018-07-31  Olivier Hainque  <hainque@adacore.com>
4647         * common.opt (nolibc): New option.
4648         * doc/invoke.texi (Link Options): Document it.
4649         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
4650         * config/alpha/linux.h: Likewise.
4651         * config/arc/elf.h: Likewise.
4652         * config/arm/uclinux-elf.h: Likewise.
4653         * config/arm/unknown-elf.h: Likewise.
4654         * config/avr/avrlibc.h: Likewise.
4655         * config/bfin/bfin.h: Likewise.
4656         * config/bfin/linux.h: Likewise.
4657         * config/bfin/uclinux.h: Likewise.
4658         * config/darwin.h: Likewise.
4659         * config/darwin10.h: Likewise.
4660         * config/darwin12.h: Likewise.
4661         * config/gnu-user.h: Likewise.
4662         * config/lm32/uclinux-elf.h: Likewise.
4663         * config/pa/pa-hpux11.h: Likewise.
4664         * config/pa/pa64-hpux.h: Likewise.
4665         * config/sparc/sparc.h: Likewise.
4667 2018-07-31  Olivier Hainque  <hainque@adacore.com>
4669         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
4670         undefined variables.
4672 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
4674         PR target/86640
4675         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
4676         instead of GEN_INT.
4678 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4680         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4681         terminated string literal.
4683 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
4685         PR rtl-optimization/85160
4686         * combine.c (is_just_move): New function.
4687         (try_combine): Allow combining two instructions into two if neither of
4688         the original instructions was a move.
4690 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
4692         PR target/86673
4693         * doc/extend.texi (Global Register Variables): Discourage use of type
4694         qualifiers.
4695         (Local Register Variables): Likewise.
4697 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
4699         PR tree-optimization/86506
4700         * hwint.h (ceil_log2): Resync with hwint.c implementation.
4702 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
4704         PR target/86547
4705         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
4706         hard_regno, make sure no insn between `from` and `to` clobbers it.
4708 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
4709             Tom de Vries  <tdevries@suse.de>
4711         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
4712         (PTX_DEFAULT_RUNTIME_DIM): ... this.
4713         (nvptx_goacc_validate_dims): Set default worker and gang dims to
4714         PTX_DEFAULT_RUNTIME_DIM.
4715         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
4717 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
4719         * config/pa/pa.c (pa_output_addr_vec): Align address table.
4720         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
4721         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
4723 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
4725         * config/rs6000/constraints.md (wG constraint): Delete, no longer
4726         used.
4727         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
4728         predicate to reflect toc fusion has been deleted.
4729         (toc_fusion_mem_raw): Delete, no longer used.
4730         (toc_fusion_mem_wrapped): Likewise.
4731         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
4732         fusion mask bit.
4733         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
4734         Delete, no longer used.
4735         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
4736         meant to be used for toc fusion.
4737         (rs6000_debug_print_mode): Delete toc fusion debugging.
4738         (rs6000_debug_reg_global): Likewise.
4739         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
4740         fusion and secondary reload support that were never used.
4741         (rs6000_option_override_internal): Delete TOC fusion, that was only
4742         partially defined, and it did not work unless you also used the
4743         -mcmodel= switch.
4744         (rs6000_legitimate_address_p): Delete TOC fusion support.
4745         (rs6000_opt_masks): Likewise.
4746         (fusion_wrap_memory_address): Delete function, no longer used.
4747         (fusion_split_address); Delete TOC fusion support.
4748         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
4749         longer used with toc fusion being deleted.
4750         (TARGET_TOC_FUSION_FP): Likewise.
4751         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
4752         UNSPEC.
4753         (toc fusion spliter): Delete TOC fusion support.
4754         (toc_fusionload_<mode>): Likewise.
4755         (toc_fusionload_di): Likewise.
4756         (fusion_gpr_load_<mode>): Delete generator function, this insn no
4757         longer needs to be named.  Rename predicate to delete TOC fusion.
4758         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4759         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4760         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
4761         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
4762         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
4764 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
4766         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
4767         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
4768         __int128 in built-in function prototypes.
4769         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
4770         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
4772 2018-07-27  Martin Sebor  <msebor@redhat.com>
4774         PR tree-optimization/86696
4775         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
4776         types, including enums.
4777         (handle_char_store): Be prepared for the above function to fail.
4779 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
4781         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
4782         when optimization level is lower than 2 or optimize for size.
4784 2018-07-26  Martin Sebor  <msebor@redhat.com>
4786         PR tree-optimization/86043
4787         PR tree-optimization/86042
4788         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
4789         (get_string_cst_length): Rename...
4790         (get_min_string_length): ...to this.  Add argument.
4791         (handle_char_store): Extend to handle multi-character stores by
4792         MEM_REF.
4793         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
4794         * tree.h (initializer_zerop): Add argument.
4796 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
4798         PR middle-end/86660
4799         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
4800         declare target to variables if they have always,{to,from,tofrom} map
4801         kinds.
4803 2018-07-26  Martin Liska  <mliska@suse.cz>
4805         PR lto/86548
4806         * lto-wrapper.c: Add linker_output as prefix
4807         for ltrans_output_file.
4809 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
4811         PR rtl-optimization/85805
4812         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
4813         value for hard registers if that was written in the same mode.
4815 2018-07-26  Martin Liska  <mliska@suse.cz>
4817         PR gcov-profile/86536
4818         * gcov.c (format_gcov): Use printf format %.*f directly
4819         and do not handle special values.
4821 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
4823         * common/config/arc/arc-common.c (arc_option_optimization_table):
4824         Update default optimizations for size.
4826 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
4828         * config/arc/arc.md (movsf_insn): Add short instruction selection.
4829         * config/arc/constraints.md (CfZ): New constraint.
4830         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
4831         (subsf3_fpu): Likewise.
4832         (cmpsf_fpu): Likewise.
4833         (cmpsf_fpu_uneq): Likewise.
4835 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
4837         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
4838         accesses as well.
4839         (arc_is_uncached_mem_p): uncached applies to both the variable and
4840         the pointer.
4842 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
4844         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
4845         register names.
4847 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
4849         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
4850         field "m_scopes" from vec to auto_vec.
4852 2018-07-25  Martin Liska  <mliska@suse.cz>
4854         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
4855         return type.
4857 2018-07-25  Richard Biener  <rguenther@suse.de>
4859         PR debug/86654
4860         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
4861         special wrt context_die late.
4862         (gen_subprogram_die): Re-use DIEs in local scope.
4864 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
4866         PR tree-optimization/86644
4867         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
4869 2018-07-25  Martin Liska  <mliska@suse.cz>
4871         PR middle-end/86645
4872         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
4873         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
4875 2018-07-25  Martin Liska  <mliska@suse.cz>
4877         PR sanitizer/79635
4878         * params.def: Explain ASan abbreviation and provide
4879         a documentation link.
4881 2018-07-24  Martin Sebor  <msebor@redhat.com>
4883         PR tree-optimization/86622
4884         PR tree-optimization/86532
4885         * builtins.h (string_length): Declare.
4886         * builtins.c (c_strlen): Correct handling of non-constant offsets.
4887         (check_access): Be prepared for non-constant length ranges.
4888         (string_length): Make extern.
4889         * expr.c (string_constant): Only handle the minor non-constant
4890         array index.  Use string_constant to compute the length of
4891         a generic string constant.
4893 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
4895         PR tree-optimization/86618
4896         * tree-vect-stmts.c (vectorizable_call): Don't take the address
4897         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
4899 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
4901         PR tree-optimization/86636
4902         * json.cc (json::object::set): Fix comment.  Add assertions.
4903         (json::array::append): Move here from json.h.  Add comment and an
4904         assertion.
4905         (json::string::string): Likewise.
4906         * json.h (json::array::append): Move to json.cc.
4907         (json::string::string): Likewise.
4908         * optinfo-emit-json.cc
4909         (optrecord_json_writer::impl_location_to_json): Assert that we
4910         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
4911         wrapper around it.  Expand the location once, rather than three
4912         times.
4913         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
4914         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
4915         wrappers.
4916         (optrecord_json_writer::optinfo_to_json): Likewise, in four
4917         places.  Fix some overlong lines.
4919 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
4921         * config/aarch64/aarch64-simd.md
4922         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
4923         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
4924         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
4925         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
4926         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
4927         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
4928         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
4929         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
4930         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
4932 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
4934         PR middle-end/86627
4935         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
4936         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
4937         and abs_d == d, do the power of two handling if profitable.
4939 2018-07-24  Richard Biener  <rguenther@suse.de>
4941         * match.pd: Add BIT_FIELD_REF canonicalizations.
4943 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4945         PR c/86617
4946         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
4948 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4950         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
4951         terminated STRING_CST object.
4953 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4955         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
4957 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
4959         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
4960         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
4961         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
4962         the elements into a register.
4963         (rs6000_split_v4si_init_di_reg): Delete.
4964         (rs6000_split_v4si_init): Delete.
4965         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
4966         (vsx_init_v4si): Rewrite as a define_expand.
4968 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
4970         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
4971         zero_extend argument from memory): New.
4973 2018-07-22  Martin Sebor  <msebor@redhat.com>
4975         PR bootstrap/86621
4976         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
4977         diagnosing calls with unknown arguments unless -Walloca-larger-than
4978         is restricted to less than PTRDIFF_MAX bytes.
4980 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
4982         * doc/gcov.texi (Invoking Gcov): Editorial changes.
4984 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
4986         * pretty-print.c (text_info::set_location): Remove redundant
4987         "line_table" parameter from call to rich_location::set_range.
4989 2018-07-20  Martin Sebor  <msebor@redhat.com>
4991         PR middle-end/82063
4992         * builtins.c (expand_builtin_alloca): Adjust.
4993         * calls.c (alloc_max_size): Simplify.
4994         * cgraphunit.c (cgraph_node::expand): Adjust.
4995         * common.opt (larger_than_size, warn_frame_larger_than): Remove
4996         variables.
4997         (frame_larger_than_size): Same.
4998         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
4999         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
5000         Initialize.
5001         * doc/invoke.texi (GCC Command Options): Document option arguments.
5002         Explain byte-size arguments and suffixes.
5003         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
5004         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
5005         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
5006         * doc/options.texi (UInteger): Expand.
5007         (Host_Wide_Int, ByteSize): Document new properties.
5008         * final.c (final_start_function_1): Include sizes in an error message.
5009         * function.c (frame_offset_overflow): Same.
5010         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
5011         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
5012         Diagnose unbounded alloca calls only for limits of less than
5013         PTRDIFF_MAX.
5014         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
5015         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
5016         for alloca(0).
5017         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
5018         only for limits of less than PTRDIFF_MAX.
5019         * langhooks-def.h (lhd_handle_option): Change function argument
5020         to HOST_WIDE_INT.
5021         * langhooks.c (lhd_handle_option): Same.
5022         * langhooks.h (handle_option): Same.
5023         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
5024         ByteSize flags.
5025         (var_type, var_type_struct): Same.
5026         (var_set): Handle ByteSize flag.
5027         * optc-gen.awk: Add comments to output to ease debugging.  Make
5028         use of HOST_WIDE_INT where appropriate.
5029         * opts-gen-save.awk:  Use %lx to format unsigned long.
5030         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
5031         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
5032         arguments.  Parse bytes-size suffixes.
5033         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
5034         (enum_value_to_arg): Same.
5035         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
5036         (handle_option): Adjust.
5037         (generate_option): Change function argument to HOST_WIDE_INT.
5038         (cmdline_handle_error): Adjust.
5039         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
5040         (set_option): Change function argument to HOST_WIDE_INT.
5041         (option_enabled): Handle cl_host_wide_int.
5042         (get_option_state): Handle CLVC_SIZE.
5043         (control_warning_option): Same.
5044         * opts.c (common_handle_option): Change function argument to
5045         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
5046         OPT_Wvla_larger_than_.
5047         * opts.h (enum cl_var_type): Add an enumerator.
5048         * stor-layout.c (layout_decl): Print a more meaningful warning.
5049         * toplev.c (output_stack_usage): Adjust.
5051 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
5053         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
5054         call to inline_expand_builtin_string_cmp.
5055         (expand_builtin_strcmp): Likewise.
5056         (expand_builtin_strncmp): Likewise.
5057         (inline_string_cmp): Delete the last parameter, change char_type_node
5058         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
5059         two operands.
5060         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
5061         the inlining expansion on target where the type of the call has same or
5062         narrower precision than unsigned char.
5064 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
5066         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
5067         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
5068         * common.opt (fsave-optimization-record): New option.
5069         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
5070         * doc/invoke.texi (-fsave-optimization-record): New option.
5071         * dumpfile.c: Include "optinfo-emit-json.h".
5072         (struct kv_pair): Move to coretypes.h.
5073         (optgroup_options): Make non-static.
5074         (dump_context::end_scope): Call
5075         optimization_records_maybe_pop_dump_scope.
5076         * dumpfile.h (optgroup_options): New decl.
5077         * json.cc: New file.
5078         * json.h: New file.
5079         * optinfo-emit-json.cc: New file.
5080         * optinfo-emit-json.h: New file.
5081         * optinfo.cc: Include "optinfo-emit-json.h".
5082         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
5083         (optinfo_enabled_p): Check optimization_records_enabled_p.
5084         (optinfo_wants_inlining_info_p): Likewise.
5085         * optinfo.h: Update comment.
5086         * profile-count.c (profile_quality_as_string): New function.
5087         * profile-count.h (profile_quality_as_string): New decl.
5088         (profile_count::quality): New accessor.
5089         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
5090         and optinfo_emit_json_cc_tests.
5091         * selftest.h (selftest::json_cc_tests): New decl.
5092         (selftest::optinfo_emit_json_cc_tests): New decl.
5093         * toplev.c: Include "optinfo-emit-json.h".
5094         (compile_file): Call optimization_records_finish.
5095         (do_compile): Call optimization_records_start.
5096         * tree-ssa-live.c: Include optinfo.h.
5097         (remove_unused_scope_block_p): Retain inlining information if
5098         optinfo_wants_inlining_info_p returns true.
5100 2018-07-20  Richard Biener  <rguenther@suse.de>
5102         PR debug/86585
5103         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
5104         to cover -flto-partition=none.
5106 2018-07-20  Martin Liska  <mliska@suse.cz>
5108         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
5109         (get_decl_source_range): Remove unused function.
5111 2018-07-20  Richard Biener  <rguenther@suse.de>
5113         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
5114         (struct vn_phi_s): Likewise.
5115         (struct vn_reference_s): Likewise.
5116         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
5117         for searching the slot of an entry known to be in the hash itself.
5118         (vn_phi_hasher::equal): Likewise.
5119         (vn_reference_hasher::equal): Likewise.
5120         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
5121         globals.
5122         (optimistic_info, current_info): Remove, keeping only valid_info.
5123         (vn_reference_lookup_1): Remove fallback lookup.
5124         (vn_reference_lookup_2): Likewise.
5125         (vn_nary_op_lookup_1): Likewise.
5126         (vn_phi_lookup): Likewise.
5127         (vn_nary_build_or_lookup_1): Make sure to not chain the built
5128         hash element.
5129         (vn_reference_insert): Adjust, chain the inserted hash element
5130         at last_inserted_ref.
5131         (vn_reference_insert_pieces): Likewise.
5132         (visit_reference_op_call): Likewise.
5133         (vn_nary_op_insert_into): Chain the inserted hash element at
5134         last_inserted_nary.
5135         (vn_nary_op_insert_pieces): Adjust.
5136         (vn_nary_op_insert): Likewise.
5137         (vn_nary_op_insert_stmt): Likewise.
5138         (vn_phi_insert): Adjust, chain the inserted hash element at
5139         last_inserted_phi.
5140         (process_scc): Remove clearing and copying the optimistic
5141         table.  Instead remove elements inserted during an optimistic
5142         iteration from the single table we maintain.
5143         (init_scc_vn): Adjust.
5144         (free_scc_vn): Likewise.
5145         (sccvn_dom_walker::record_cond): Likewise.
5146         (sccvn_dom_walker::after_dom_children): Likewise.
5148 2018-07-19  Martin Sebor  <msebor@redhat.com>
5150         PR tree-optimization/84047
5151         PR tree-optimization/83776
5152         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
5153         (check_array_bounds): Call it.
5155 2018-07-19  Martin Sebor  <msebor@redhat.com>
5157         * align.h (align_flags): Use member initialization.
5159 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
5161         * Makefile.in (OBJS): Add optinfo.o.
5162         * coretypes.h (class symtab_node): New forward decl.
5163         (struct cgraph_node): New forward decl.
5164         (class varpool_node): New forward decl.
5165         * dump-context.h: New file.
5166         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
5167         "tree-pass.h".
5168         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
5169         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
5170         (set_alt_dump_file): Likewise.
5171         (dump_context::~dump_context): New dtor.
5172         (dump_gimple_stmt): Move implementation to...
5173         (dump_context::dump_gimple_stmt): ...this new member function.
5174         Add the stmt to any pending optinfo, creating one if need be.
5175         (dump_gimple_stmt_loc): Move implementation to...
5176         (dump_context::dump_gimple_stmt_loc): ...this new member function.
5177         Start a new optinfo and add the stmt to it.
5178         (dump_gimple_expr): Move implementation to...
5179         (dump_context::dump_gimple_expr): ...this new member function.
5180         Add the stmt to any pending optinfo, creating one if need be.
5181         (dump_gimple_expr_loc): Move implementation to...
5182         (dump_context::dump_gimple_expr_loc): ...this new member function.
5183         Start a new optinfo and add the stmt to it.
5184         (dump_generic_expr): Move implementation to...
5185         (dump_context::dump_generic_expr): ...this new member function.
5186         Add the tree to any pending optinfo, creating one if need be.
5187         (dump_generic_expr_loc): Move implementation to...
5188         (dump_context::dump_generic_expr_loc): ...this new member
5189         function.  Add the tree to any pending optinfo, creating one if
5190         need be.
5191         (dump_printf): Move implementation to...
5192         (dump_context::dump_printf_va): ...this new member function.  Add
5193         the text to any pending optinfo, creating one if need be.
5194         (dump_printf_loc): Move implementation to...
5195         (dump_context::dump_printf_loc_va): ...this new member function.
5196         Start a new optinfo and add the stmt to it.
5197         (dump_dec): Move implementation to...
5198         (dump_context::dump_dec): ...this new member function.  Add the
5199         value to any pending optinfo, creating one if need be.
5200         (dump_context::dump_symtab_node): New member function.
5201         (dump_context::get_scope_depth): New member function.
5202         (dump_context::begin_scope): New member function.
5203         (dump_context::end_scope): New member function.
5204         (dump_context::ensure_pending_optinfo): New member function.
5205         (dump_context::begin_next_optinfo): New member function.
5206         (dump_context::end_any_optinfo): New member function.
5207         (dump_context::s_current): New global.
5208         (dump_context::s_default): New global.
5209         (dump_scope_depth): Delete global.
5210         (dumpfile_ensure_any_optinfo_are_flushed): New function.
5211         (dump_symtab_node): New function.
5212         (get_dump_scope_depth): Reimplement in terms of dump_context.
5213         (dump_begin_scope): Likewise.
5214         (dump_end_scope): Likewise.
5215         (selftest::temp_dump_context::temp_dump_context): New ctor.
5216         (selftest::temp_dump_context::~temp_dump_context): New dtor.
5217         (selftest::verify_item): New function.
5218         (ASSERT_IS_TEXT): New macro.
5219         (ASSERT_IS_TREE): New macro.
5220         (ASSERT_IS_GIMPLE): New macro.
5221         (selftest::test_capture_of_dump_calls): New test.
5222         (selftest::dumpfile_c_tests): Call it.
5223         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
5224         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
5225         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
5226         descriptive comment.
5227         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
5228         (dump_node, dump_bb): Move these unrelated decls.
5229         (class dump_manager): Add leading comment.
5230         * optinfo.cc: New file.
5231         * optinfo.h: New file.
5233 2018-07-19  Michael Collison  <michael.collison@arm.com>
5234             Richard Henderson <rth@redhat.com>
5236         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
5237         (subti): Handle op1 zero.
5238         (subvti4, usub4ti4): New.
5239         (*sub<GPI>3_compare1_imm): New.
5240         (sub<GPI>3_carryinCV): New.
5241         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
5242         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
5244 2018-07-19  Michael Collison  <michael.collison@arm.com>
5245             Richard Henderson <rth@redhat.com>
5247         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
5248         (addti3): Create simpler code if low part is already known to be 0.
5249         (addvti4, uaddvti4): New.
5250         (*add<GPI>3_compareC_cconly_imm): New.
5251         (*add<GPI>3_compareC_cconly): New.
5252         (*add<GPI>3_compareC_imm): New.
5253         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
5254         handle constants within this pattern..
5255         (*add<GPI>3_compareV_cconly_imm): New.
5256         (*add<GPI>3_compareV_cconly): New.
5257         (*add<GPI>3_compareV_imm): New.
5258         (add<GPI>3_compareV): New.
5259         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
5260         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
5261         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
5262         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
5263         with 'comparison' operator.
5264         (*add<GPI>3_compareV_cconly_imm): Ditto.
5265         (*add<GPI>3_compareV_cconly): Ditto.
5266         (*add<GPI>3_compareV_imm): Ditto.
5267         (add<GPI>3_compareV): Ditto.
5268         (add<mode>3_carryinC): Ditto.
5269         (*add<mode>3_carryinC_zero): Ditto.
5270         (*add<mode>3_carryinC): Ditto.
5271         (add<mode>3_carryinV): Ditto.
5272         (*add<mode>3_carryinV_zero): Ditto.
5273         (*add<mode>3_carryinV): Ditto.
5275 2018-07-19  Michael Collison  <michael.collison@arm.com>
5276             Richard Henderson <rth@redhat.com>
5278         * config/aarch64/aarch64-modes.def (CC_V): New.
5279         * config/aarch64/aarch64-protos.h
5280         (aarch64_addti_scratch_regs): Declare
5281         (aarch64_subvti_scratch_regs): Declare.
5282         (aarch64_expand_subvti): Declare.
5283         (aarch64_gen_unlikely_cbranch): Declare
5284         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
5285         for signed overflow using CC_Vmode.
5286         (aarch64_get_condition_code_1): Handle CC_Vmode.
5287         (aarch64_gen_unlikely_cbranch): New function.
5288         (aarch64_addti_scratch_regs): New function.
5289         (aarch64_subvti_scratch_regs): New function.
5290         (aarch64_expand_subvti): New function.
5292 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5294         * config/aarch64/aarch64-option-extensions.def: New entry for profile
5295         extension.
5296         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
5297         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
5298         extension.
5300 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5302         PR target/83009
5303         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5304         address check not strict.
5306 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
5308         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
5309         Umq with Umn.
5310         (store_pair_lanes<mode>): Likewise.
5311         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
5312         enum value 'ADDR_QUERY_LDP_STP_N'.
5313         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
5314         (aarch64_print_address_internal): Add declaration.
5315         (aarch64_print_ldpstp_address): Remove.
5316         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
5317         (aarch64_print_operand): Change printing of 'y'.
5318         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
5319         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
5320         'true' rather than '1'.
5321         * config/aarch64/constraints.md (Uml): Likewise.
5322         (Uml): Rename to Umn.
5323         (Umq): Remove.
5325 2018-07-19  Richard Biener  <rguenther@suse.de>
5327         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
5328         a trailing array.
5329         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
5330         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
5331         (vn_reference_hasher): Likewise.
5332         (struct vn_tables_s): Remove obstack and alloc-pool members.
5333         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
5334         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
5335         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
5336         (vn_reference_insert_pieces): Likewise.
5337         (alloc_vn_nary_op_noinit): Adjust.
5338         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
5339         (vn_phi_eq): Adjust.
5340         (shared_lookup_phiargs): Remove.
5341         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
5342         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
5343         (visit_reference_op_call): Likewise.
5344         (copy_nary, copy_phi, copy_reference): Remove.
5345         (process_scc): Rewind the obstack when iterating.  Do not
5346         copy the elements to valid_info but just move them from one
5347         hashtable to the other.
5348         (allocate_vn_table): Adjust.
5349         (free_vn_table): Likewise.
5350         (init_scc_vn): Likewise.
5351         (free_scc_vn): Likewise.
5353 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
5355         PR target/86560
5356         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
5357         indirect_return as function type attribute.
5358         (ix86_attribute_table): Change indirect_return to function
5359         type attribute.
5360         * doc/extend.texi: Update indirect_return attribute.
5362 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
5364         * wide-int.h (widest2_int): New.
5365         * gimple-fold.c (arith_overflowed_p): Use it.
5366         * tree.h (widest2_int_cst): New.
5367         * tree-vrp.c (wide_int_binop_overflow): Rename from
5368         vrp_int_const_binop.
5369         Rewrite to work on trees.
5370         (extract_range_from_multiplicative_op_1): Abstract code to...
5371         (wide_int_range_min_max): ...here.
5372         (wide_int_range_cross_product): ...and here.
5373         (extract_range_from_binary_expr_1): Abstract overflow code to...
5374         (wide_int_range_mult_wrapping): ...here.
5375         * tree-vrp.h (wide_int_range_cross_product): New.
5376         (wide_int_range_mult_wrapping): New.
5378 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
5379             Julia Koval  <julia.koval@intel.com>
5381         * config/i386/x86-tune-costs.h (skylake_memcpy,
5382         skylake_memset): Replace rep_prefix with unrolling for size 512.
5384 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
5386         PR middle-end/86544
5387         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
5388         comparision with EQ_EXPR in last stmt.
5390 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5392         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
5393         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
5394         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
5395         previously known as "PowerPC AltiVec Built-in Functions".  Move
5396         some material to new subsubsections "PowerPC AltiVec Built-in
5397         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
5398         ISA 2.07".
5399         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
5400         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
5401         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
5402         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
5404 2018-07-18  Richard Biener  <rguenther@suse.de>
5406         PR tree-optimization/86557
5407         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
5408         EXACT_DIV_EXPR.
5410 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
5412         * config/s390/s390.c (s390_function_profiler): Generate CFI.
5414 2018-07-17  Jeff Law  <law@redhat.com>
5416         * config/arm/arm.c (get_label_padding): Update for recent
5417         changes to label_to_alignment.
5419         PR tree-optimization/86010
5420         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
5422         * config/mips/mips.c (vr4130_align_insns): Update for recent
5423         changes to label_to_alignment.
5425         * config/frv/frv.c (frv_label_align): Update for recent changes
5426         to label_to_alignment.
5428         * config/nios2/nios2.c (nios2_label_align): Update for recent
5429         changes which dropped ALIGN_LABELS_LOG.
5431 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
5433         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
5434         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
5436 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
5438         * config/arc/arc.c (arc_label_align): Use align_labels instead of
5439         deprecated align_labels_log.
5441 2018-07-17  Richard Biener  <rguenther@suse.de>
5443         PR lto/86456
5444         * dwarf2out.c (init_sections_and_labels): Always generate
5445         a debug_line_str_section for early LTO debug.
5446         (dwarf2out_finish): Reset debug_line_str_hash output early.
5447         Bump counter for extra dwarf5 .debug_loc labels to not conflict
5448         with fat LTO part.
5449         (dwarf2out_early_finish): Output debug_line_str.
5451 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
5453         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
5454         index register on z196 or later.
5456 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
5458         * config/s390/s390.c (s390_default_align): Set default function
5459         alignment to 16.
5460         (s390_override_options_after_change): Call s390_default align.
5461         (s390_option_override_internal): Call s390_default_align.
5462         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
5464 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
5466         PR middle-end/86542
5467         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
5468         to _looptemp_ clauses, other than the first two.
5470 2018-07-17  Martin Liska  <mliska@suse.cz>
5472         * opts.c: Do not enable OPT_falign_* for -Os.
5474 2018-07-17  Martin Liska  <mliska@suse.cz>
5476         * align.h (MAX_CODE_ALIGN): New.
5477         (MAX_CODE_ALIGN_VALUE): New.
5478         * common/config/i386/i386-common.c (ix86_handle_option):
5479         (MAX_CODE_ALIGN): Moved to align.h.
5480         * final.c (MAX_CODE_ALIGN): Likewise.
5481         * opts.c (parse_and_check_align_values):
5482         (MAX_CODE_ALIGN): Likewise.
5483         (MAX_CODE_ALIGN_VALUE): Likewise.
5485 2018-07-17  Martin Liska  <mliska@suse.cz>
5487         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
5488         in order to fulfil coding style.
5489         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
5490         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5491         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
5492         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
5493         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
5494         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
5495         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
5496         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
5497         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
5499 2018-07-17  Martin Liska  <mliska@suse.cz>
5501         * align.h: New file.
5502         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
5503         directly.
5504         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
5505         align_flags of label_to_alignment.
5506         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
5507         align_flags class.
5508         * config/m68k/m68k.c: Do not use removed align_labels_value and
5509         align_loops_value.
5510         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
5511         (LOOP_ALIGN): Likewise.
5512         (LABEL_ALIGN): Likewise.
5513         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5514         Remove not used macro.
5515         (rs6000_loop_align): Change return type to align_flags.
5516         (rs6000_loop_align_max_skip): Remove.
5517         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
5518         Change return type to align_flags.
5519         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
5520         Remove not used macro.
5521         (rs6000_loop_align):  Change return type to align_flags.
5522         (rs6000_loop_align_max_skip): Remove.
5523         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
5524         * config/rx/rx-protos.h (rx_align_for_label): Make it
5525         static function.
5526         * config/rx/rx.c (rx_align_for_label): Change return type
5527         to align_flags.
5528         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
5529         macro definitions.
5530         into align_flags class.
5531         (LABEL_ALIGN): Likewise.
5532         (LOOP_ALIGN): Likewise.
5533         * config/s390/s390.c (s390_label_align): Use align_flags
5534         class member.
5535         (s390_asm_output_function_label): Likewise.
5536         * config/sh/sh.c (sh_override_options_after_change):
5537         Use align_flags class directly without macros.
5538         (find_barrier): Likewise.
5539         (barrier_align): Likewise.
5540         (sh_loop_align): Likewise.
5541         * config/spu/spu.c (spu_option_override):
5542         Use align_flags_tuple::get_value instead of removed macros.
5543         (spu_sched_init): Likewise.
5544         * config/spu/spu.h (GTY): Likewise.
5545         * config/visium/visium.c (visium_option_override):
5546         Set "8" as default secondary alignment.
5547         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
5548         in order to guarantee secondary alignment of 8.
5549         * coretypes.h: Include align.h header file.
5550         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
5551         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
5552         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
5553         * doc/tm.texi.in: Likewise.
5554         * final.c (struct label_alignment): Remove not used structure.
5555         (LABEL_ALIGN): Change type to align_flags.
5556         (LOOP_ALIGN): Likewise.
5557         (JUMP_ALIGN): Likewise.
5558         (default_loop_align_max_skip): Remove.
5559         (default_label_align_max_skip): Likewise.
5560         (default_jump_align_max_skip): Likewise.
5561         (default_label_align_after_barrier_max_skip):
5562         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
5563         (LABEL_TO_MAX_SKIP): Remove.
5564         (label_to_alignment): Return align_flags type instead of integer.
5565         (label_to_max_skip): Remove.
5566         (align_fuzz): Use align_flags type.
5567         (compute_alignments): Use align_flags type and use align_flags::max
5568         to combine multiple alignments.
5569         (grow_label_align): Grow vec instead of C array.
5570         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
5571         (shorten_branches):  Use align_flags type and use align_flags::max
5572         to combine multiple alignments.
5573         (final_scan_insn_1): Remove usage of secondary alignment that comes
5574         from label alignment, but instead use proper secondary alignment
5575         which is computed in grow_label_align.
5576         * flags.h (struct align_flags_tuple): Move to align.h.
5577         (struct align_flags): Likewise.
5578         (state_align_loops): Rename to align_loops.
5579         (state_align_jumps): Rename to align_jumps.
5580         (state_align_labels): Rename to align_labels.
5581         (state_align_functions): Rename to align_functions.
5582         (align_loops_log): Remove.
5583         (align_jumps_log): Remove.
5584         (align_labels_log): Remove.
5585         (align_functions_log): Remove.
5586         (align_loops_max_skip): Remove.
5587         (align_jumps_max_skip): Remove.
5588         (align_labels_max_skip): Remove.
5589         (align_functions_max_skip): Remove.
5590         (align_loops_value): Remove.
5591         (align_jumps_value): Remove.
5592         (align_labels_value): Remove.
5593         (align_functions_value): Remove.
5594         * output.h (label_to_alignment): Change return type to align_flags.
5595         (label_to_max_skip): Remove.
5596         * target.def: Remove loop_align_max_skip, label_align_max_skip,
5597         jump_align_max_skip macros.
5598         * targhooks.h (default_loop_align_max_skip): Remove.
5599         (default_label_align_max_skip): Likewise.
5600         (default_jump_align_max_skip): Likewise.
5601         (default_label_align_after_barrier_max_skip): Remove.
5602         * toplev.c (read_log_maxskip): Use ::normalize function.
5603         (parse_N_M): Remove not used argument and also call ::normalize.
5604         (parse_alignment_opts): Do not pass unused arguments.
5605         * varasm.c (assemble_start_function): Use directly align_functions
5606         instead of removed macros.
5607         * system.h: Do not poison removed macros.
5609 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
5611         PR middle-end/86539
5612         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
5613         and cond temporaries don't have reference type if iterator has
5614         pointer type.  For init use &for_pre_body instead of pre_p if
5615         for_pre_body is non-empty.
5617 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
5619         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
5620         double-double modes to SFmode directly directly.
5621         (trunc<mode>sf2_fprs): Delete.
5623 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
5625         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
5626         for conversions between IFmode and the decimal floating point modes.
5627         (init_float128_ieee): Use the correct names for conversions between
5628         KFmode and the decimal floating point modes.
5630 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
5632         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
5633         for the conversions between TDmode and IFmode.
5634         (init_float128_ieee): Use more correct names for the conversions
5635         between TDmode and KFmode.
5637 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
5639         PR tree-optimization/86526
5640         * builtins.c (expand_builtin_memcmp): Formatting fixes.
5641         (inline_expand_builtin_string_cmp): Likewise.
5642         (inline_string_cmp): Likewise.  Use c_readstr instead of
5643         builtin_memcpy_read_str.  Add unit_mode temporary.
5645 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5647         PR middle-end/86528
5648         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
5649         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
5651 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5653         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
5654         Alphabetize prototypes of built-in functions, separating out
5655         built-in functions that are listed in this section but should be
5656         described elsewhere.
5658 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
5660         PR target/86511
5661         * expmed.c (emit_store_flag): Do not emit setcc followed by a
5662         conditional move when trapping comparison was split to a
5663         non-trapping one (and vice versa).
5665 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
5667         * config/s390/s390.c (s390_function_profiler): Generate nops
5668         instead of profiler call sequences.
5669         * config/s390/s390.opt: Add the new option.
5671 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
5673         * config/s390/s390.c (s390_function_profiler): Generate
5674         __mcount_loc section.
5675         * config/s390/s390.opt: Add the new option.
5677 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
5679         * common.opt: Add the new warning.
5680         * config/s390/s390.c (s390_function_profiler): Emit "brasl
5681         %r0,__fentry__" when -mfentry is specified.
5682         (s390_option_override_internal): Disallow -mfentry for 31-bit
5683         CPUs.
5684         * config/s390/s390.opt: Add the new option.
5686 2018-07-16  Richard Biener  <rguenther@suse.de>
5688         PR lto/86523
5689         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
5690         for function-local FUNCTION_DECL and RESULT_DECL immediately.
5692 2018-07-16  Martin Liska  <mliska@suse.cz>
5694         PR ipa/86529
5695         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
5696         to ::get_create.
5698 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
5700         * config/arc/arcHS.md: Update ARCHS scheduling rules.
5702 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
5704         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
5705         for ARCHS4x.
5706         * config/arc/arc-cpus.def (hs4x): New cpu.
5707         (hs4xd): Likewise.
5708         * config/arc/arc-tables.opt: Regenerate.
5709         * config/arc/arc.c (arc_sched_issue_rate): New function.
5710         (TARGET_SCHED_ISSUE_RATE): Define.
5711         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
5712         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
5713         fpu_cvt.
5714         (attr tune): Add ARCHS4x tune values.
5715         (attr tune_dspmpy): Define.
5716         (*tst): Correct instruction type.
5717         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
5718         * config/arc/arcHS4x.md: New file.
5719         * config/arc/fpu.md: Update instruction type attributes.
5720         * config/arc/t-multilib: Regenerate.
5722 2018-07-16  Tom de Vries  <tdevries@suse.de>
5724         PR debug/86455
5725         * var-tracking.c (vt_initialize): Fix pre_dec handling.
5727 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
5729         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
5730         early clobber.
5732 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
5734         PR tree-optimization/86514
5735         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
5736         conversion to a boolean type from a type with greater precision.
5738 2018-07-16  Tom de Vries  <tdevries@suse.de>
5740         * var-tracking.c (vt_initialize): Print adjusted insn slim if
5741         dump_flags request TDF_SLIM.
5743 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
5745         * fold-const.c (int_const_binop_1): Abstract...
5746         (wide_int_binop): ...wide int code here.
5747         (poly_int_binop): ...poly int code here.
5748         Abstract the rest of int_const_binop_1 into int_const_binop.
5749         * fold-const.h (wide_int_binop): New.
5750         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
5751         Remove useless PLUS/MINUS_EXPR case.
5752         (zero_nonzero_bits_from_vr): Move wide int code...
5753         (zero_nonzero_bits_from_bounds): ...here.
5754         (extract_range_from_binary_expr_1): Move mask optimization code...
5755         (range_easy_mask_min_max): ...here.
5756         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
5757         (range_easy_mask_min_max): New.
5759 2018-07-15  Jeff Law  <law@redhat.com>
5761         PR target/85993
5762         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
5763         block.
5765 2018-07-14  Jim Wilson  <jimw@sifive.com>
5767         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
5769 2018-07-14  Paul Koning  <ni1d@arrl.net>
5771         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
5773 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
5775         * lto-streamer-out.c (copy_function_or_variable): Dump info about
5776         copying section.
5778 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
5779             Steve Munroe  <munroesj52@gmail.com>
5781         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
5782         (_mm_andnot_si128): Likewise.
5783         (_mm_or_si128): Likewise.
5784         (_mm_xor_si128): Likewise.
5786 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
5788         PR middle-end/78809
5789         * builtins.c (expand_builtin_memcmp): Inline the calls first
5790         when result_eq is false.
5791         (expand_builtin_strcmp): Inline the calls first.
5792         (expand_builtin_strncmp): Likewise.
5793         (inline_string_cmp): New routine. Expand a string compare
5794         call by using a sequence of char comparison.
5795         (inline_expand_builtin_string_cmp): New routine. Inline expansion
5796         a call to str(n)cmp/memcmp.
5797         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
5798         New option.
5799         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
5801 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
5803         * config/arm/driver-arm.c: Include arm-native.h.
5804         (host_detect_local_cpu): Use auto-generated data tables.
5805         (vendors, arm_cpu_table): Delete.  Move part information to ...
5806         * config/arm/arm-cpus.in: ... here.
5807         * config/arm/parsecpu.awk (gen_native): New function.
5808         (vendor, part): New CPU fields.
5809         (END): Add support for building the native CPU detection tables.
5810         * config/arm/t-arm (arm-native.h): Add build rule.
5811         (driver-arm.o): Add dependency on arm-native.h.
5813 2018-07-13  Richard Biener  <rguenther@suse.de>
5815         PR middle-end/85974
5816         * match.pd (addr1 - addr2): Allow either of the operand to
5817         have a conversion.
5819 2018-07-13  Tom de Vries  <tdevries@suse.de>
5821         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
5822         in remap_ssa_name.
5824 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
5826         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
5827         arrays instead of numbered variables.
5829 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
5831         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
5832         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
5834 2018-07-13  Richard Biener  <rguenther@suse.de>
5836         PR debug/86452
5837         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
5838         instead of get_context_die.
5840 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
5841             Richard Biener  <rguenther@suse.de>
5843         PR middle-end/86489
5844         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
5845         that the loop latch destination where phi is defined.
5847 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
5849         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
5850         (riscv_expand_epilogue): Add assertion to check interrupt mode.
5851         (riscv_set_current_function): Extract getting interrupt type to new
5852         function.
5853         (riscv_get_interrupt_type): New function.
5854         (riscv_merge_decl_attributes): New function, checking interrupt type is
5855         same.
5856         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
5858 2018-07-12  Paul Koning  <ni1d@arrl.net>
5860         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
5861         directive.
5863 2018-07-12  Paul Koning  <ni1d@arrl.net>
5865         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
5866         zero reference, add doloop_end instead.
5867         * doc/md.texi (decrement_and_branch_until_zero): Remove.
5868         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
5869         detail for doloop_end.
5871 2018-07-12  Martin Sebor  <msebor@redhat.com>
5873         PR c/86453
5874         * attribs.c (decl_attributes): Reject conflicting attributes before
5875         calling attribute handlers.
5877 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
5879         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
5880          parameter.
5881         (gcc::dump_manager::get_dump_file_name): likewise.
5882         (dump_begin): Likewise.
5883         * dumpfile.h (dump_begin): Update prototype.
5884         (gcc::dump_manager::get_dump_file_name,
5885         gcc::dump_manager::get_dump_file_name): Update prototype.
5887 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
5889         * internal-fn.h (vectorizable_internal_fn_p): New function.
5890         * tree-vect-slp.c (compatible_calls_p): Likewise.
5891         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
5892         to internal functions.
5893         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
5895 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
5897         * fold-const.h (inverse_conditions_p): Declare.
5898         * fold-const.c (inverse_conditions_p): New function.
5899         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
5900         that test the inverse condition of a conditional internal function.
5901         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
5902         * internal-fn.c (internal_fn_mask_index): Handle conditional
5903         internal functions.
5904         (vectorized_internal_fn_supported_p): New function.
5905         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
5906         (any_pred_load_store): Replace with...
5907         (need_to_predicate): ...this new variable.
5908         (redundant_ssa_names): New variable.
5909         (ifcvt_can_use_mask_load_store): Move initial checks to...
5910         (ifcvt_can_predicate): ...this new function.  Handle tree codes
5911         for which a conditional internal function exists.
5912         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
5913         instead of ifcvt_can_use_mask_load_store.  Update after variable
5914         name change.
5915         (predicate_load_or_store): New function, split out from
5916         predicate_mem_writes.
5917         (check_redundant_cond_expr): New function.
5918         (value_available_p): Likewise.
5919         (predicate_rhs_code): Likewise.
5920         (predicate_mem_writes): Rename to...
5921         (predicate_statements): ...this.  Use predicate_load_or_store
5922         and predicate_rhs_code.
5923         (combine_blocks, tree_if_conversion): Update after above name changes.
5924         (ifcvt_local_dce): Handle redundant_ssa_names.
5925         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
5926         general conditional functions.
5927         * tree-vect-stmts.c (vectorizable_call): Likewise.
5929 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
5930             Alan Hayward  <alan.hayward@arm.com>
5931             David Sherwood  <david.sherwood@arm.com>
5933         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
5934         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
5935         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
5936         plus and minus and convert them into IFN_COND_FMA-based sequences.
5937         (convert_mult_to_fma): Handle conditional plus and minus.
5939 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
5941         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
5942         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
5943         (cond_fnms_optab): New optabs.
5944         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
5945         internal functions.
5946         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
5947         * internal-fn.h (get_conditional_internal_fn): Declare.
5948         (get_unconditional_internal_fn): Likewise.
5949         * internal-fn.c (cond_ternary_direct): New macro.
5950         (expand_cond_ternary_optab_fn): Likewise.
5951         (direct_cond_ternary_optab_supported_p): Likewise.
5952         (FOR_EACH_COND_FN_PAIR): Likewise.
5953         (get_conditional_internal_fn): New function.
5954         (get_unconditional_internal_fn): Likewise.
5955         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
5956         (gimple_match_op::gimple_match_op): Add a new overload for 5
5957         operands.
5958         (gimple_match_op::set_op): Likewise.
5959         (gimple_resimplify5): Declare.
5960         * genmatch.c (decision_tree::gen): Generate simplifications for
5961         5 operands.
5962         * gimple-match-head.c (gimple_simplify): Define an overload for
5963         5 operands.  Handle calls with 5 arguments in the top-level overload.
5964         (convert_conditional_op): Handle conversions from unconditional
5965         internal functions to conditional ones.
5966         (gimple_resimplify5): New function.
5967         (build_call_internal): Pass a fifth operand.
5968         (maybe_push_res_to_seq): Likewise.
5969         (try_conditional_simplification): Try converting conditional
5970         internal functions to unconditional internal functions.
5971         Handle 3-operand unconditional forms.
5972         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
5973         Define ternary equivalents of the current rules for binary conditional
5974         internal functions.
5975         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
5976         ternary operations.
5977         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
5978         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
5979         (optab): Handle them.
5980         (SVE_COND_FP_TERNARY): New int iterator.
5981         (sve_fmla_op, sve_fmad_op): New int attributes.
5982         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
5983         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
5984         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
5986 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
5988         * target.def (preferred_else_value): New target hook.
5989         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
5990         * doc/tm.texi: Regenerate.
5991         * targhooks.h (default_preferred_else_value): Declare.
5992         * targhooks.c (default_preferred_else_value): New function.
5993         * internal-fn.h (conditional_internal_fn_code): Declare.
5994         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
5995         (get_conditional_internal_fn): Use it.
5996         (conditional_internal_fn_code): New function.
5997         * gimple-match.h (gimple_match_cond): New struct.
5998         (gimple_match_op): Add a cond member function.
5999         (gimple_match_op::gimple_match_op): Update all forms to take a
6000         gimple_match_cond.
6001         * genmatch.c (expr::gen_transform): Use the same condition as res_op
6002         for the suboperation, but don't specify a particular else_value.
6003         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
6004         (visit_nary_op, visit_reference_op_load): Pass
6005         gimple_match_cond::UNCOND to the gimple_match_op constructor.
6006         * gimple-match-head.c: Include tree-eh.h
6007         (convert_conditional_op): New function.
6008         (maybe_resimplify_conditional_op): Likewise.
6009         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
6010         (gimple_resimplify2): Likewise.
6011         (gimple_resimplify3): Likewise.
6012         (gimple_resimplify4): Likewise.
6013         (maybe_push_res_to_seq): Return null for conditional operations.
6014         (try_conditional_simplification): New function.
6015         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
6016         constructor.
6017         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
6018         IFN_COND_* call.
6019         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
6020         function.
6021         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
6023 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
6025         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
6026         DECL_FCONTEXT
6027         (hash_tree): Do not hash DECL_FCONTEXT
6028         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
6029         Do not stream DECL_FCONTEXT.
6030         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
6031         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
6033 2018-07-12  Richard Biener  <rguenther@suse.de>
6035         PR debug/86462
6036         * dwarf2out.c (gen_block_die): Only output blocks when they have
6037         at least one !DECL_IGNORED_P variable.
6039 2018-07-12  Richard Biener  <rguenther@suse.de>
6041         PR target/84829
6042         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
6043         Remove -mieee-fp handling.
6045 2018-07-12  Richard Biener  <rguenther@suse.de>
6047         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
6048         left-over from last patch.
6050 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
6052         PR tree-optimization/86492
6053         * gimple-ssa-store-merging.c
6054         (imm_store_chain_info::coalesce_immediate_stores): Call
6055         check_no_overlap even for the merge_overlapping case.  Formatting fix.
6057 2018-07-12  Richard Biener  <rguenther@suse.de>
6059         PR middle-end/86479
6060         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
6061         move possibly trapping operations into the conditional.
6063 2018-07-12  Richard Biener  <rguenther@suse.de>
6065         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
6066         (vn_lookup_simplify_result): Remove recursion limit applied
6067         here.
6068         (vn_nary_build_or_lookup_1): Adjust.
6069         (try_to_simplify): Likewise.
6070         * gimple-match-head.c (gimple_resimplify1): Instead apply one
6071         here.
6072         (gimple_resimplify2): Likewise.
6073         (gimple_resimplify3): Likewise.
6074         (gimple_resimplify4): Likewise.
6076 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
6078         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
6079         Use __mmask64 type instead of __mmask8 for __M argument.
6080         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
6081         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
6082         __U argument.
6083         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
6084         __mmask16 for __M argument.
6085         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
6086         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
6087         to __mmask16 instead of __mmask8.
6088         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
6089         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
6090         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
6091         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
6092         instead of __mmask16 for __U argument.
6093         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
6094         __mmask16 instead of __mmask8 for __U argument.
6095         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
6096         __U argument.
6097         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
6098         __mmask16.
6099         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
6100         argument.
6101         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
6102         __U argument.
6103         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
6104         __mmask16.
6105         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
6106         of __mmask16.
6107         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
6108         __U argument.
6109         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
6110         __U argument.
6111         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
6112         __U argument.
6113         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
6114         __U argument.
6115         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
6116         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
6117         return type as well as __M argument type and all casts from __mmask8
6118         to __mmask32.
6119         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
6120         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
6121         return type as well as __M argument type and all casts from __mmask8
6122         to __mmask16.
6123         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
6124         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
6125         return type as well as __M argument type and all casts from __mmask8
6126         to __mmask32.
6127         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
6128         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
6129         return type as well as __M argument type and all casts from __mmask8
6130         to __mmask16.
6131         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
6132         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
6133         __mmask16.
6135 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
6137         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
6138         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
6139         for __U argument.
6141 2018-07-11  Paul Koning  <ni1d@arrl.net>
6143         * doc/md.texi (define_subst): Document how multiple occurrences of
6144         the same argument in the replacement pattern are handled.
6146 2018-07-11  Paul Koning  <ni1d@arrl.net>
6148         * doc/extend.texi (Common Variable Attributes): Move "mode" into
6149         alphabetical order.
6150         (Common Type Attributes): Add "mode" attribute.
6152 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
6154         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
6155         stream DECL_ORIGINAL_TYPE.
6156         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
6157         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
6158         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
6159         Do not walk original type.
6160         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
6161         external decls.
6162         (write_ts_decl_non_common_tree_pointers): Do not stream
6163         DECL_ORIGINAL_TYPE
6164         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
6165         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
6167 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
6169         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
6170         thread twice from the same starting edge.
6172 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
6174         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
6175         * gimple.c (gimple_call_nonnull_result_p): ...here...
6176         (gimple_call_nonnull_arg): ...and here.
6177         * gimple.h (gimple_call_nonnull_result_p): New.
6178         (gimple_call_nonnull_arg): New.
6180 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
6182         * config/arm/arm-cpus.in: Move information from fpu field of each
6183         cpu definition to the isa field.
6184         * config/arm/parsecpu.awk (fpu): Delete match rule.
6185         (gen_comm_data): Don't add bits from the CPU's FPU entry.
6187 2018-07-11  Richard Biener  <rguenther@suse.de>
6189         PR debug/86457
6190         * dwarf2out.c (init_sections_and_labels): Use
6191         output_asm_line_debug_info consistently.
6192         (dwarf2out_early_finish): Likewise.
6193         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
6194         type units.
6196 2018-07-11  Richard Biener  <rguenther@suse.de>
6198         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
6199         Rework father_bb setting in a way to avoid propagating constants
6200         multiple times on a loop body.
6202 2018-07-10  Mark Wielaard  <mark@klomp.org>
6204         PR debug/86459
6205         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
6207 2018-07-10  Richard Biener  <rguenther@suse.de>
6209         * hash-map.h (hash_map::iterator::operator*): Return
6210         references to key and value.
6212 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
6214         PR c++/86443
6215         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
6216         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
6217         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
6218         (gimplify_omp_for): For composite loops, move outer
6219         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
6220         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
6221         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
6222         TREE_LIST for both the original class iterator and the "last" helper
6223         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
6224         loop, remember has_decl_expr from outer composite loops for the
6225         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
6227 2018-07-09  Martin Sebor  <msebor@redhat.com>
6229         PR middle-end/77357
6230         PR middle-end/86428
6231         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
6232         accessing implicitly initialized array elements.
6233         * expr.c (string_constant): Handle string initializers of
6234         character arrays within aggregates.
6235         * gimple-fold.c (fold_array_ctor_reference): Add argument.
6236         Store element offset.  As a special case, handle zero size.
6237         (fold_nonarray_ctor_reference): Same.
6238         (fold_ctor_reference): Add argument.  Store subobject offset.
6239         * gimple-fold.h (fold_ctor_reference): Add argument.
6241 2018-07-09  Paul Koning  <ni1d@arrl.net>
6243         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
6244         (pdp11_insn_cost): New function.
6245         (pdp11_md_asm_adjust): New function.
6246         (TARGET_INVALID_WITHIN_DOLOOP): Define.
6247         (pdp11_rtx_costs): Update to match machine better.
6248         (output_addr_const_pdp11): Correct format mismatch warnings.
6249         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
6250         * config/pdp11/pdp11.md: General change to add base_cost and/or
6251         length attributes for use by new pdp11_insn_cost function.
6252         (MIN_BRANCH): Correct definition.
6253         (MIN_SOB): Ditto.
6254         (doloop_end): Use standard pattern name for looping pattern.
6255         (doloop_end_nocc): New.
6256         (movsf): Add another constraint alternative.
6257         (zero_extendqihi2): Add constraint alternatives for not in place
6258         extend.
6259         (zero_extendhisi2): Remove.
6260         (shift patterns): Add CC handling variants.
6261         (bswaphi2): New.
6262         (bswapsi2): New.
6263         (rothi3): New.
6264         (define_peephole2): New peephole to recognize mov that sets CC for
6265         subsequent test.
6267 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6269         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
6270         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
6271         wi::add.
6273 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
6275         PR c/86420
6276         * real.c (real_nextafter): Return true if result is denormal.
6278 2018-07-09  Martin Liska  <mliska@suse.cz>
6280         * common.opt: Add back wrongly removed attribute.
6282 2018-07-09  Richard Biener  <rguenther@suse.de>
6284         PR debug/86413
6285         * dwarf2out.c (gen_block_die): For an early generated DIE
6286         always output high/low PC attributes.
6288 2018-07-09  Tom de Vries  <tdevries@suse.de>
6290         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
6291         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
6292         onto VAR_DECL with abstract origin.
6294 2018-07-07  Jim Wilson  <jimw@sifive.com>
6296         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
6298 2018-07-07  Tom de Vries  <tdevries@suse.de>
6300         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
6302 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
6304         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
6305         overflow_type.
6306         (combine_bound): Use wide-int overflow calculation instead of
6307         rolling our own.
6308         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
6309         overflow_type.
6310         * fold-const.c (int_const_binop_2): Same.
6311         (extract_muldiv_1): Same.
6312         (fold_div_compare): Same.
6313         (fold_abs_const): Same.
6314         * match.pd: Same.
6315         * poly-int.h (add): Same.
6316         (sub): Same.
6317         (neg): Same.
6318         (mul): Same.
6319         * predict.c (predict_iv_comparison): Same.
6320         * profile-count.c (slow_safe_scale_64bit): Same.
6321         * simplify-rtx.c (simplify_const_binary_operation): Same.
6322         * tree-chrec.c (tree_fold_binomial): Same.
6323         * tree-data-ref.c (split_constant_offset_1): Same.
6324         * tree-if-conv.c (idx_within_array_bound): Same.
6325         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
6326         * tree-ssa-phiopt.c (minmax_replacement): Same.
6327         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
6328         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
6329         * vr-values.c (vr_values::adjust_range_with_scev): Same.
6330         * wide-int.cc (wi::add_large): Same.
6331         (wi::mul_internal): Same.
6332         (wi::sub_large): Same.
6333         (wi::divmod_internal): Same.
6334         * wide-int.h: Change overflow type to overflow_type for neg, add,
6335         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
6336         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
6337         mul_internal, divmod_internal.
6338         (overflow_type): New enum.
6339         (accumulate_overflow): New.
6341 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
6343         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
6344         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
6346 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
6348         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
6349         argument is checked for zero before entering loop, avoid checking again.
6351 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
6353         * gimplify.h (generic_expr_could_trap_p): Set as global function.
6354         * gimplify.h (generic_expr_could_trap_p): Likwise.
6355         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
6357 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
6359         PR tree-optimization/86401
6360         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
6361         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
6362         (fold_bit_and_mask): ... here.  New helper function for match.pd.
6363         * fold-const.h (fold_bit_and_mask): Declare.
6364         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
6366 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
6368         PR target/86324
6369         * target.def (translate_mode_attribute): New hook.
6370         * targhooks.h (default_translate_mode_attribute): Declare.
6371         * targhooks.c (default_translate_mode_attribute): New function.
6372         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
6373         * doc/tm.texi: Regenerate.
6374         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
6375         (rs6000_translate_mode_attribute): New function.
6377 2018-07-06  Paul Koning  <ni1d@arrl.net>
6379         * doc/md.texi (define_split): Document DONE and FAIL.
6380         (define_peephole2): Ditto.
6382 2018-07-05  Jeff Law  <law@redhat.com>
6384         PR tree-optimization/86010
6385         * tree-ssa-dse.c (compute_trims): More aggressively trim at
6386         both the head and tail of mem* and str* calls.
6388 2018-07-05  Jim Wilson  <jimw@sifive.com>
6390         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
6392 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
6394         * config/aarch64/aarch64-simd.md: correct flags text for
6395         MIN_EXPR replacement.
6397 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
6399         * configure: Regenerated.
6401 2018-07-05  Carl Love  <cel@us.ibm.com>
6403         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
6404         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
6405         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
6406         VSX_BUILTIN_DOUBLEL_V4SF.
6408 2018-07-05  Martin Sebor  <msebor@redhat.com>
6410         PR c++/86400
6411         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
6412         than its domain to compute its the upper bound of a char array.
6414 2018-07-05  Nathan Sidwell  <nathan@acm.org>
6416         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
6417         * doc/cpp.texi: Update comment.
6418         * doc/tm.texi: Rebuilt.
6419         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
6420         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
6421         * doc/extend.texi (Backwards Compatibility): Clarify it is system
6422         headers affected by extern "C".
6423         * system.h: Poison NO_IMPLICIT_EXTERN_C.
6424         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
6425         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
6426         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
6427         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
6428         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
6429         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
6430         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
6431         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
6432         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
6433         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
6434         config/sparc/sp64-elf.h, config/spu/spu.h,
6435         config/stormy16/stormy16.h, config/v850/v850.h,
6436         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
6437         define NO_IMPLICIT_EXTERN_C.
6438         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
6440 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
6442         PR target/84711
6443         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
6444         instead of GET_MODE_SIZE when comparing Units.
6446 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
6448         PR target/84711
6449         * rtlanal.c (set_noop_p): Constrain on mode change,
6450         include hard-reg-set.h
6452 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
6454         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
6456 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
6458         Revert
6459         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
6461         PR sanitizer/84250
6462         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6463         libasan.
6464         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6466 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
6468         PR sanitizer/84250
6469         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
6470         libasan.
6471         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
6473 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
6475         PR middle-end/86380
6476         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
6478 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
6480         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
6481         neg_*_op* variables.
6483 2018-07-04  Martin Liska  <mliska@suse.cz>
6485         * tree-switch-conversion.c: Define
6486         max_ratio_for_speed and max_ratio_for_size constants.
6488 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
6489             Martin Liska  <mliska@suse.cz>
6491         PR middle-end/66240
6492         PR target/45996
6493         PR c/84100
6494         * common.opt: Rename align options with 'str_' prefix.
6495         * common/config/i386/i386-common.c (set_malign_value): New
6496         function.
6497         (ix86_handle_option): Use it to set -falign-* options/
6498         * config/aarch64/aarch64-protos.h (struct tune_params): Change
6499         type from int to string.
6500         * config/aarch64/aarch64.c: Update default values from int
6501         to string.
6502         * config/alpha/alpha.c (alpha_override_options_after_change):
6503         Likewise.
6504         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
6505         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6506         max skip conditionally.
6507         * config/i386/freebsd.h (SUBALIGN_LOG): New.
6508         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6509         max skip conditionally.
6510         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6511         max skip conditionally.
6512         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
6513         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6514         max skip conditionally.
6515         * config/i386/i386.c (struct ptt): Change type from int to
6516         string.
6517         (ix86_default_align): Set default values.
6518         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
6519         max skip conditionally.
6520         * config/i386/iamcu.h (SUBALIGN_LOG): New.
6521         (ASM_OUTPUT_MAX_SKIP_ALIGN):
6522         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
6523         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6524         max skip conditionally.
6525         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
6526         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
6527         * config/i386/x86-64.h (SUBALIGN_LOG): New.
6528         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
6529         max skip conditionally.
6530         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6531         * config/ia64/ia64.c (ia64_option_override): Set default values
6532         for alignment options.
6533         * config/m68k/m68k.c: Handle new str_align_* options.
6534         * config/mips/mips.c (mips_set_compression_mode): Change
6535         type of constants.
6536         (mips_option_override): Set default values for options.
6537         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
6538         Likewise.
6539         * config/rs6000/rs6000.c (rs6000_option_override_internal):
6540         Likewise.
6541         * config/rx/rx.c (rx_option_override): Likewise.
6542         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
6543         (LABEL_ALIGN): Use align_labels_log.
6544         (LOOP_ALIGN): Use align_loops_align.
6545         * config/s390/s390.c (s390_asm_output_function_label): Use new
6546         macros.
6547         * config/sh/sh.c (sh_override_options_after_change):
6548         Change type of constants.
6549         * config/spu/spu.c (spu_sched_init): Likewise.
6550         * config/sparc/sparc.c (sparc_option_override): Set default
6551         values for options.
6552         * config/visium/visium.c (visium_option_override): Likewise.
6553         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
6554         emit p2align format with last argument if it's not needed.
6555         * doc/invoke.texi: Document extended format of -falign-*.
6556         * final.c: Use align_labels alignment.
6557         * flags.h (struct target_flag_state): Change type to use
6558         align_flags.
6559         (struct align_flags_tuple): New.
6560         (struct align_flags): Likewise.
6561         (align_loops_log): Redefine macro to use new types.
6562         (align_loops_max_skip): Redefine macro to use new types.
6563         (align_jumps_log): Redefine macro to use new types.
6564         (align_jumps_max_skip): Redefine macro to use new types.
6565         (align_labels_log): Redefine macro to use new types.
6566         (align_labels_max_skip): Redefine macro to use new types.
6567         (align_functions_log): Redefine macro to use new types.
6568         (align_loops): Redefine macro to use new types.
6569         (align_jumps): Redefine macro to use new types.
6570         (align_labels): Redefine macro to use new types.
6571         (align_functions): Redefine macro to use new types.
6572         (align_functions_max_skip): Redefine macro to use new types.
6573         (align_loops_value): New macro.
6574         (align_jumps_value): New macro.
6575         (align_labels_value): New macro.
6576         (align_functions_value): New macro.
6577         * function.c (invoke_set_current_function_hook): Propagate
6578         alignment values from flags to global variables default in
6579         topleev.h.
6580         * ipa-icf.c (sem_function::equals_wpa): Use
6581         cl_optimization_option_eq instead of memcmp.
6582         * lto-streamer.h (cl_optimization_stream_out): Support streaming
6583         of string types.
6584         (cl_optimization_stream_in): Likewise.
6585         * optc-save-gen.awk: Support strings in cl_optimization.
6586         * opth-gen.awk: Likewise.
6587         * opts.c (finish_options): Remove error checking of invalid
6588         value ranges.
6589         (MAX_CODE_ALIGN): Remove.
6590         (MAX_CODE_ALIGN_VALUE): Likewise.
6591         (parse_and_check_align_values): New function.
6592         (check_alignment_argument): Likewise.
6593         (common_handle_option): Use check_alignment_argument.
6594         * opts.h (parse_and_check_align_values): Declare.
6595         * toplev.c (init_alignments): Remove.
6596         (read_log_maxskip): New.
6597         (parse_N_M): Likewise.
6598         (parse_alignment_opts): Likewise.
6599         (backend_init_target): Remove usage of init_alignments.
6600         * toplev.h (parse_alignment_opts): Declare.
6601         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
6602         argument.
6603         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
6604         * tree.c (cl_option_hasher::equal): New.
6605         * varasm.c: Use new global macros.
6607 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
6609         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
6610         Use a simpler align directive also if MAXSKIP = ALIGN-1.
6611         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6612         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6613         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6614         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
6615         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
6616         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
6617         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
6618         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6619         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6620         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6621         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
6623 2018-07-04  Martin Liska  <mliska@suse.cz>
6624             Jonathan Wakely  <jwakely@redhat.com>
6626         * coverage.c: Use correct type.
6627         * doc/invoke.texi: Language correction.
6629 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
6631         PR target/85620
6632         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
6633         ENDBRANCH for non-tail call which may return via indirect branch.
6634         * doc/extend.texi: Document indirect_return attribute.
6636 2018-07-03  Martin Sebor  <msebor@redhat.com>
6638         PR tree-optimization/86274
6639         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
6640         precondition.
6641         (format_floating): Correct handling of infinities and NaNs.
6643 2018-07-03  Martin Sebor  <msebor@redhat.com>
6645         * print-tree.c (print_real_cst): New function.
6646         (print_node_brief): Call it.
6647         (print_node): Ditto.
6649 2018-07-03  Jeff Law  <law@redhat.com>
6651         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
6652         into a single pattern.
6654         * config/h8300/h8300.md (ors code_iterator): New.
6655         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
6656         a single pattern and single splitter.
6657         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
6658         (iorqi3_1, xorqi3_1): Likewise.
6659         (iorqi3, xorqi3 expanders): Similarly.
6661         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
6662         (movmd_internal) into a single pattern using the P mode iterator.
6663         (movmd splitters): Similarly.
6664         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
6665         (movsd splitters): Similarly.
6667         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
6668         ADDB, ADDW and ADDL into a single ADD attribute which selects the
6669         right table based on the size of the operand.
6670         * config/h8300/h8300.md (length_table): Corresponding changes. All
6671         references to "addb", "addw" and "addl" changed to "add".
6672         (btst patterns): Merge two variants into a single pattern.
6673         (tstqi, tsthi): Likewise.
6674         (addhi3_incdec, addsi3_incdec): Likewise.
6675         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
6676         (mulhi3, mulsi3): Likewise.
6677         (udivhi3, udivsi3): Likewise.
6678         (divhi3, divsi3): Likewise.
6679         (andorqi3, andorhi3, andorsi3): Likewise.
6681 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
6683         PR target/85694
6684         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
6685         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
6687 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6689         PR tree-optimization/85694
6690         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
6691         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
6692         UNSPEC_URHADD.
6693         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
6694         (<u>avg<mode>3_ceil): New patterns.
6696 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
6698         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
6699         scan-tree-dump directive.
6700         * gcc.dg/vect/slp-perm-2.c: Likewise.
6701         * gcc.dg/vect/slp-perm-3.c: Likewise.
6702         * gcc.dg/vect/slp-perm-5.c: Likewise.
6703         * gcc.dg/vect/slp-perm-6.c: Likewise.
6704         * gcc.dg/vect/slp-perm-7.c: Likewise.
6705         * gcc.dg/vect/slp-perm-8.c: Likewise.
6707 2018-07-03  Marek Polacek  <polacek@redhat.com>
6709         PR middle-end/86202
6710         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
6712 2018-07-03  Richard Biener  <rguenther@suse.de>
6714         PR ipa/86389
6715         * tree-ssa-structalias.c (find_func_clobbers): Properly
6716         handle indirect calls.
6718 2018-07-03  Jeff Law  <law@redhat.com>
6720         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
6721         (shifts): New code iterator.
6722         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
6723         expander.  Fix HImode handling on H8/SX.
6724         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
6725         (subqi3, subhi3, subsi3 expanders): Likewise.
6726         (andqi3, andhi3, andsi3 expanders): Likewise.
6727         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
6728         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
6729         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
6730         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
6731         (zero_extendqihi2, zero_extendqisi2): Likewise.
6732         (extendqihi2, extendqisi2): Likewise.
6733         (rotlqi3, rotlhi3, rotlsi3): Likewise.
6734         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
6735         (rotlqi3_1, rotlhi3_1): Likewise.
6736         (logicalhi3_sn, logicalsi3_sn): Likewise.
6737         (logicalhi3, logicalsi3): Likewise.
6739 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6741         * tree-vect-patterns.c (vect_recog_rotate_pattern)
6742         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
6743         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
6744         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
6745         type to append_pattern_def_seq instead of creating a stmt_vec_info
6746         directly.
6747         (build_mask_conversion): Likewise.  Remove vinfo argument.
6748         (vect_add_conversion_to_patterm): Likewise, renaming to...
6749         (vect_add_conversion_to_pattern): ...this.
6750         (vect_recog_mask_conversion_pattern): Update call to
6751         build_mask_conversion.  Pass the vector type to
6752         append_pattern_def_seq here too.
6753         (vect_recog_gather_scatter_pattern): Update call to
6754         vect_add_conversion_to_pattern.
6756 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6758         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
6759         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
6760         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
6761         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
6762         STMT_VINFO_PATTERN_DEF_SEQ to null here.
6763         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
6764         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
6765         append_pattern_def_seq instead of new_pattern_def_seq.
6766         (vect_recog_divmod_pattern): Do both of the above.
6767         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
6768         is null.
6770 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6772         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
6773         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
6774         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
6775         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
6776         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
6777         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
6778         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
6779         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
6780         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
6781         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
6782         parameter with a single stmt_vec_info.
6783         (vect_recog_func_ptr): Likewise.
6784         (vect_recog_gather_scatter_pattern): Likewise, folding in...
6785         (vect_try_gather_scatter_pattern): ...this.
6786         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
6787         the stmt_vec_info of the statement to be matched.  Don't clear
6788         STMT_VINFO_RELATED_STMT.
6789         (vect_pattern_recog): Update call accordingly.
6791 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6793         PR tree-optimization/85694
6794         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
6795         (uavgM3_ceil): Document new optabs.
6796         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
6797         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
6798         functions.
6799         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
6800         (savg_ceil_optab): New optabs.
6801         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
6802         (vect_vect_recog_func_ptrs): Add it.
6803         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
6804         constant directly from the associated lhs.
6806 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6808         * tree-vect-patterns.c (vect_split_statement): New function.
6809         (vect_convert_input): Use it to try to split an existing cast.
6811 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6813         * poly-int.h (print_hex): New function.
6814         * dumpfile.h (dump_dec, dump_hex): Declare.
6815         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
6816         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
6817         min_input_precision, operation_precision and operation_sign.
6818         * tree-vect-patterns.c (vect_get_range_info): New function.
6819         (vect_same_loop_or_bb_p, vect_single_imm_use)
6820         (vect_operation_fits_smaller_type): Delete.
6821         (vect_look_through_possible_promotion): Add an optional
6822         single_use_p parameter.
6823         (vect_recog_over_widening_pattern): Rewrite to use new
6824         stmt_vec_info infomration.  Handle one operation at a time.
6825         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
6826         (vect_truncatable_operation_p, vect_set_operation_type)
6827         (vect_set_min_input_precision): New functions.
6828         (vect_determine_min_output_precision_1): Likewise.
6829         (vect_determine_min_output_precision): Likewise.
6830         (vect_determine_precisions_from_range): Likewise.
6831         (vect_determine_precisions_from_users): Likewise.
6832         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
6833         (vect_vect_recog_func_ptrs): Put over_widening first.
6834         Add cast_forwprop.
6835         (vect_pattern_recog): Call vect_determine_precisions.
6837 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
6839         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
6840         statements that have been replaced by further pattern statements.
6841         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
6843 2018-07-03  Richard Biener  <rguenther@suse.de>
6845         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
6846         always set *dt.  Dump vectype in vectype overload.
6847         * dumpfile.h (dump_gimple_expr): New function.
6848         (dump_gimple_expr_loc): Likewise.
6849         * dumpfile.c (dump_gimple_expr): New function.
6850         (dump_gimple_expr_loc): Likewise.
6852 2018-07-02  Jeff Law  <law@redhat.com>
6854         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
6855         the H8/300, H8/300H and H8/S variants into a single pattern.
6856         (movhi_h8300, movqi_h8300hs): Similarly.
6857         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
6858         (QHI mode iterator): New.
6860         * config/h8300/h8300.md: Remove trailing whitespace.
6862 2018-07-02  Jim Wilson  <jimw@sifive.com>
6864         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
6865         instead of emit_insn for interrupt returns.
6866         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
6867         (riscv_sret, riscv_uret): Likewise.
6869 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
6871         * pretty-print.c (selftest::test_pp_format): Move save and restore
6872         of quotes to class auto_fix_quotes, and add an instance.
6873         * selftest.c: Include "intl.h".
6874         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
6875         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
6876         * selftest.h (selftest::auto_fix_quotes): New class.
6878 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
6880         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
6881         (aarch64_sve_prepare_conditional_op): Remove.
6882         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
6883         Allow aarch64_simd_reg_or_zero as select operand; remove
6884         the aarch64_sve_prepare_conditional_op call.
6885         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
6886         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6887         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
6888         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
6889         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
6890         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
6891         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
6892         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
6893         and a splitters to match all of the *_any patterns.
6894         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
6896         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
6897         (SVE_COND_FP_BINARY_REV): Remove.
6898         (sve_int_op_rev, sve_fp_op_rev): New.
6899         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
6900         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
6901         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
6902         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
6903         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
6904         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
6905         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
6906         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
6907         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
6909         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
6910         Remove match_dup 1 from the inner unspec.
6911         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
6913         * config/aarch64/aarch64.md (movprfx): New attr.
6914         (length): Default movprfx to 8.
6915         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
6916         (*madd<SVE_I>, *msub<SVE_I): Likewise.
6917         (*<su>mul<SVE_I>3_highpart): Likewise.
6918         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
6919         (*v<ASHIFT><SVE_I>3): Likewise.
6920         (*<su><MAXMIN><SVE_I>3): Likewise.
6921         (*<su><MAXMIN><SVE_F>3): Likewise.
6922         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
6923         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
6924         (*div<SVE_F>4): Likewise.
6926 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
6928         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
6929         in dump string.
6931 2018-07-02  Richard Biener  <rguenther@suse.de>
6933         PR tree-optimization/86363
6934         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
6935         memset argument refers to a non-variable address.
6937 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
6939         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
6940         {PLUS,MINUS}_EXPR code to...
6941         (adjust_symbolic_bound): ...here,
6942         (combine_bound): ...here,
6943         (set_value_range_with_overflow): ...and here.
6945 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
6947         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
6948         code...
6949         (extract_range_from_abs_expr): ...here.
6951 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
6953         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
6954         -fno-omit-frame-pointer when not optimizing.
6956 2018-07-02  Martin Liska  <mliska@suse.cz>
6958         PR ipa/86279
6959         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
6960         (propagate_nothrow): Likewise.
6962 2018-07-02  Martin Liska  <mliska@suse.cz>
6964         PR ipa/86323
6965         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
6967 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
6969         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
6970         function in r262149, changing "loc" param from source_location to
6971         const dump_location_t &.
6972         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
6973         declaration, as above.
6975 2018-07-01  Paul Koning  <ni1d@arrl.net>
6977         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
6978         -munit-asm, -mgnu-asm, -mdec-asm.
6979         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
6980         (pdp11_output_labelref): New.
6981         (pdp11_output_def): New.
6982         (pdp11_output_addr_vec_elt): New.
6983         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
6984         %# and %@ format codes.
6985         (pdp11_option_override): New.
6986         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
6987         (pdp11_output_ident): New.
6988         (pdp11_asm_named_section): New.
6989         (pdp11_asm_init_sections): New.
6990         (pdp11_file_start): New.
6991         (pdp11_file_end): New.
6992         (output_ascii): Use .ascii/.asciz for -mdec-asm.
6993         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
6994         %o, like %c but octal.
6995         (pdp11_option_override): New.
6996         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
6997         -mdec-asm.
6998         (DATA_SECTION_ASM_OP): Ditto.
6999         (READONLY_DATA_SECTION_ASM_OP): New.
7000         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
7001         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
7002         (ASM_OUTPUT_LABELREF): Ditto.
7003         (ASM_OUTPUT_DEF): Ditto.
7004         (ASM_OUTPUT_EXTERNAL): New.
7005         (ASM_OUTPUT_SOURCE_FILENAME): New.
7006         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
7007         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
7008         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
7009         %# and %@ format codes.
7010         * config/pdp11/pdp11.opt (mgnu-asm): New.
7011         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
7012         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
7013         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
7015 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
7017         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
7018         dereferencing path[] beyond its length.
7019         (debug_path): New.
7020         (debug_all_paths): New.
7021         (rewire_first_differing_edge): New.
7022         (adjust_paths_after_duplication): New.
7023         (duplicate_thread_path): Call adjust_paths_after_duplication.
7024         Add new argument.
7025         (thread_through_all_blocks): Add new argument to
7026         duplicate_thread_path.
7028 2018-06-30  Jim Wilson  <jimw@sifive.com>
7030         * config/riscv/predicates.md (p2m1_shift_operand): New.
7031         (high_mask_shift_operand): New.
7032         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
7033         pattern using p2m1_shift_operand.
7034         (lshsi3_zero_extend_3+2): New combiner pattern using
7035         high_mask_shift_operand.
7037 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
7039         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
7040         split out from...
7041         (vect_recog_rotate_pattern): ...here.
7042         (vect_convert_input): Try to insert casts of invariants in the
7043         preheader.
7044         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
7045         preheader to be empty.
7047 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
7049         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
7050         vector type.  If given, install it in the new statement's
7051         STMT_VINFO_VECTYPE.
7052         (vect_element_precision): New function.
7053         (vect_unpromoted_value): New struct.
7054         (vect_unpromoted_value::vect_unpromoted_value): New function.
7055         (vect_unpromoted_value::set_op): Likewise.
7056         (vect_look_through_possible_promotion): Likewise.
7057         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
7058         (vect_widened_op_tree, vect_convert_input): Likewise.
7059         (vect_convert_inputs, vect_convert_output): Likewise.
7060         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
7061         to handle the optional cast of the multiplication result and
7062         vect_widened_op_tree to detect the widened multiplication itself.
7063         Do not require the input and output of promotion casts to have
7064         the same sign, but base the signedness of the operation on the
7065         input rather than the result.  If the pattern includes two
7066         promotions, check that those promotions have the same sign.
7067         Do not restrict the MULT_EXPR handling to a double-width result;
7068         handle quadruple-width results and wider.  Use vect_convert_inputs
7069         to convert the inputs to the common type.
7070         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
7071         to handle the optional cast of the ABS result.  Also allow a sign
7072         change or a sign extension between the ABS and MINUS.
7073         Use vect_widened_op_tree to detect the widened subtraction and use
7074         vect_convert_inputs to convert the inputs to the common type.
7075         (vect_handle_widen_op_by_const): Delete.
7076         (vect_recog_widen_op_pattern): New function.
7077         (vect_recog_widen_mult_pattern): Use it.
7078         (vect_recog_widen_shift_pattern): Likewise.
7079         (vect_recog_widen_sum_pattern): Use
7080         vect_look_through_possible_promotion to handle the promoted
7081         PLUS_EXPR operand.
7083 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
7085         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
7086         the containing gimple_seq *.
7087         * gimple-iterator.h (gsi_for_stmt): Declare it.
7088         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
7089         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
7090         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
7091         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
7092         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
7093         checks.
7094         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
7095         split out from...
7096         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
7097         statement being replaced is part of an existing pattern
7098         definition sequence, inserting the new pattern statements before
7099         the original one.
7100         (vect_pattern_recog_1): Don't return a bool.  If the statement
7101         is already part of a pattern, instead apply pattern matching
7102         to the pattern definition statements.  Don't clear the
7103         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
7104         (vect_pattern_recog): Don't break after the first match;
7105         continue processing the pattern definition statements instead.
7106         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
7108 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
7110         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
7111         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
7112         (vect_recog_widen_sum_pattern): Use it.
7114 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
7116         * tree-vect-loop.c (vectorizable_reduction): Assert that the
7117         phi is not a pattern statement and has not been replaced by
7118         a pattern statement.
7119         * tree-vect-patterns.c (type_conversion_p): Don't check
7120         STMT_VINFO_IN_PATTERN_P.
7121         (vect_recog_vector_vector_shift_pattern): Likewise.
7122         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
7123         the pattern statement rather than the original statement; check
7124         directly for a WIDEN_MULT_EXPR here.
7125         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
7126         vect_is_simple_use to return the pattern statement rather
7127         than the original statement; use is_pattern_stmt_p to check
7128         for such a pattern statement.
7129         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
7130         to return the pattern statement rather than the original statement;
7131         don't do the same transformation here.
7132         (vect_is_simple_use): If the defining statement has been replaced
7133         by a pattern statement, return the pattern statement instead.
7134         Remove the corresponding (local) transformation from the vectype
7135         overload.
7137 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
7139         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
7140         end and default to null.
7141         * tree-vect-loop.c (vect_create_epilog_for_reduction)
7142         (vectorizable_reduction): Update calls accordingly, dropping the
7143         gimple ** argument if the passed-back statement isn't needed.
7144         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
7145         (vect_recog_rotate_pattern): Likewise.
7146         (vect_recog_mask_conversion_pattern): Likewise.
7147         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
7148         (vect_mask_constant_operand_p): Likewise.
7149         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
7150         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
7151         (get_group_load_store_type, get_load_store_type): Likewise.
7152         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
7153         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
7154         (vectorizable_conversion, vectorizable_assignment): Likewise.
7155         (vectorizable_shift, vectorizable_operation): Likewise.
7156         (vectorizable_store, vect_is_simple_cond): Likewise.
7157         (vectorizable_condition, vectorizable_comparison): Likewise.
7158         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
7159         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
7160         and move it to the end.  Cope with null def_stmt_outs.
7162 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7164         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
7166 2018-06-29  Jeff Law  <law@redhat.com>
7168         * config/v850/v850.c (v850_legitimate_address_p): Handle large
7169         displacements for TARGET_V850E2V3 and newer.
7170         (TARGET_LRA_P): Remove.  Defaults to LRA now.
7171         * config/v850/v850.md (sign23byte_load): Remove.
7172         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
7173         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
7175 2018-06-29  Martin Liska  <mliska@suse.cz>
7177         PR lto/85759
7178         * coverage.c (coverage_init): Mangle full path name.
7179         * doc/invoke.texi: Document the change.
7180         * gcov-io.c (mangle_path): New.
7181         * gcov-io.h (mangle_path): Likewise.
7182         * gcov.c (mangle_name): Use mangle_path for path mangling.
7184 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7186         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
7187         if starting source register is not even.
7189 2018-06-29  Martin Liska  <mliska@suse.cz>
7191         PR tree-optimization/86263
7192         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
7193         Make edge redirection.
7195 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
7197         * dumpfile.c (dump_loc): Add indentation based on scope depth.
7198         (dump_scope_depth): New variable.
7199         (get_dump_scope_depth): New function.
7200         (dump_begin_scope): New function.
7201         (dump_end_scope): New function.
7202         * dumpfile.h (get_dump_scope_depth): New declaration.
7203         (dump_begin_scope): New declaration.
7204         (dump_end_scope): New declaration.
7205         (class auto_dump_scope): New class.
7206         (AUTO_DUMP_SCOPE): New macro.
7207         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
7208         AUTO_DUMP_SCOPE.
7210 2018-06-29  Richard Biener  <rguenther@suse.de>
7212         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
7213         compute_all_dependences succeeds.
7214         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
7215         exceed --param loop-max-datarefs-for-datadeps.
7217 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
7219         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
7221 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
7223         PR target/86348
7224         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
7225         alternative 0 in preferred_for_speed attribute.
7227 2018-06-28  Paul Koning  <ni1d@arrl.net>
7229         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
7230         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
7231         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
7232         * config/pdp11/pdp11.md: Correct "length" attribute calculation
7233         for shift insn patterns.
7235 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
7237         * cgraph.c (cgraph_node::get_body): Replace assignments to
7238         "dump_file" with calls to set_dump_file.
7239         * dumpfile.c (alt_dump_file): Make static, and group with...
7240         (alt_flags): ...this definition.
7241         (dumps_are_enabled): New variable.
7242         (refresh_dumps_are_enabled): New function.
7243         (set_dump_file): New function.
7244         (set_alt_dump_file): New function.
7245         (gcc::dump_manager::dump_start): Replace assignments to
7246         "dump_file" and "alt_dump_file" with calls to set_dump_file and
7247         set_alt_dump_file.
7248         (gcc::dump_manager::dump_finish): Likewise.
7249         * dumpfile.h (alt_dump_file): Delete decl.
7250         (dumps_are_enabled): New variable decl.
7251         (set_dump_file): New function decl.
7252         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
7253         global.
7254         * tree-nested.c (lower_nested_functions): Replace assignments to
7255         "dump_file" with calls to set_dump_file.
7257 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
7259         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
7260         goto_locus of each outgoing edge of each basic block.
7262 2018-06-28  Richard Biener  <rguenther@suse.de>
7264         * dwarf2out.c (decl_scope_table): Remove.
7265         (push_decl_scope): Likewise.
7266         (pop_decl_scope): Likewise.
7267         (gen_type_die_for_member): Do not call push/pop_decl_scope.
7268         (gen_struct_or_union_type_die): Likewise.
7269         (gen_tagged_type_die): Likewise.
7270         (dwarf2out_init): Do not initialize decl_scope_table.
7271         (dwarf2out_c_finalize): Do not free it.
7273 2018-06-28  Richard Biener  <rguenther@suse.de>
7275         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
7276         deciding whether to not re-use a DIE.
7278 2018-06-28  Richard Biener  <rguenther@suse.de>
7280         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
7281         DW_AT_abstract_origin attribute.
7283 2018-06-28  Martin Liska  <mliska@suse.cz>
7285         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
7286         Use newly introduced constants.
7287         * tree-switch-conversion.h (struct jump_table_cluster):
7288         Define max_ratio_for_size and max_ratio_for_speed.
7290 2018-06-28  Martin Liska  <mliska@suse.cz>
7292         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7293         Add new checking assert to catch invalid state.
7294         (jump_table_cluster::can_be_handled): Handle single case
7295         clusters.
7296         (jump_table_cluster::is_beneficial): Bail out for such case.
7297         (bit_test_cluster::find_bit_tests):
7298         Add new checking assert to catch invalid state.
7299         (bit_test_cluster::can_be_handled): Handle single case
7300         clusters.
7301         (bit_test_cluster::is_beneficial): Bail out for such case.
7302         (switch_decision_tree::analyze_switch_statement):
7303         Fix comment.
7305 2018-06-28  Martin Liska  <mliska@suse.cz>
7307         * common.opt: Introduce -completion option.
7308         * gcc.c (driver_handle_option): Handle it.
7309         (driver::main): Print completions if completion
7310         is set.
7311         * opt-suggestions.c (option_proposer::get_completions):
7312         New function.
7313         (option_proposer::suggest_completion): Likewise.
7314         (option_proposer::find_param_completions): Likewise.
7315         (verify_autocompletions): Likewise.
7316         (test_completion_valid_options): Likewise.
7317         (test_completion_valid_params): Likewise.
7318         (in_completion_p): Likewise.
7319         (empty_completion_p): Likewise.
7320         (test_completion_partial_match): Likewise.
7321         (test_completion_garbage): Likewise.
7322         (opt_proposer_c_tests): Likewise.
7323         * opt-suggestions.h: Declare new functions.
7324         * opts.c (common_handle_option): Handle OPT__completion_.
7325         * selftest-run-tests.c (selftest::run_tests): Add
7326         opt_proposer_c_tests.
7327         * selftest.c (assert_str_startswith): New.
7328         * selftest.h (assert_str_startswith): Likewise.
7329         (opt_proposer_c_tests): New.
7330         (ASSERT_STR_STARTSWITH): Likewise.
7332 2018-06-28  Martin Liska  <mliska@suse.cz>
7334         * Makefile.in: Add opt-suggestions.o.
7335         * gcc-main.c: Include opt-suggestions.h.
7336         * gcc.c (driver::driver): Likewise.
7337         (driver::~driver): Remove m_option_suggestions.
7338         (driver::build_option_suggestions): Moved to option_proposer.
7339         (driver::suggest_option): Likewise.
7340         (driver::handle_unrecognized_options): Use option_proposer.
7341         * gcc.h (class driver): Add new memver m_option_proposer.
7342         * opt-suggestions.c: New file.
7343         * opt-suggestions.h: New file.
7345 2018-06-28  Martin Liska  <mliska@suse.cz>
7347         * vec.h (class auto_string_vec): New (moved from auto_argvec).
7348         (auto_string_vec::~auto_string_vec): Likewise.
7350 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
7352         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
7353         prevent_decl_creation_for_types fields up and add reset_location field.
7354         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
7355         statement if id->reset_location is true.
7356         (copy_edges_for_bb): Do not set goto_locus on the new edges if
7357         id->reset_location is true.
7358         (copy_phis_for_bb): Force input_location on the arguments if
7359         id->reset_location is true.
7360         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
7361         is set on the function to be inlined.
7363 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
7365         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
7367 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
7369         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
7370         registers for Pmode.
7371         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
7372         hard registers for the clobbered pseudo.
7374 2018-06-27  Paul Koning  <ni1d@arrl.net>
7376         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
7377         mutually exclusive options.
7378         * config/pdp11/constraints.md (h): New constraint.
7379         (O): Update definition to match shift code generation.
7380         (D): New constraint.
7381         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
7382         (CCFP): Remove.
7383         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
7384         function.
7385         (output_jump): Change arguments.
7386         (pdp11_fixed_cc_regs): New function.
7387         (pdp11_cc_mode): Ditto.
7388         (pdp11_expand_shift): Ditto.
7389         (pdp11_assemble_shift): Ditto.
7390         (pdp11_small_shift): Ditto.
7391         (pdp11_branch_cost): Remove.
7392         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
7393         from output.
7394         (pdp11_register_move_cost): Update for CC registers.
7395         (pdp11_rtx_costs): Add case for LSHIFTRT.
7396         (pdp11_output_jump): Add CCNZ mode conditional branches.
7397         (notice_update_cc_on_set): Remove.
7398         (pdp11_cc_mode): New function.
7399         (simple_memory_operand): Correct pre/post decrement case.
7400         (no_side_effect_operand): New function.
7401         (pdp11_regno_reg_class): Add CC_REGS class.
7402         (pdp11_fixed_cc_regs): New function.
7403         (pdp11_small_shift): New function.
7404         (pdp11_expand_shift): New function to expand shift insns.
7405         (pdp11_assemble_shift): New function to output shifts.
7406         (pdp11_branch_cost): Remove.
7407         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
7408         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
7409         (WCHAR_TYPE): Ditto.
7410         (PTRDIFF_TYPE): Ditto.
7411         (ADJUST_INSN_LENGTH): New macro.
7412         (FIXED_REGISTERS): Add CC registers.
7413         (CALL_USED_REGISTERS): Ditto.
7414         (reg_class): Ditto.
7415         (REG_CLASS_NAMES): Ditto.
7416         (REG_CLASS_CONTENTS): Ditto.
7417         (SELECT_CC_MODE): Use new function.
7418         (TARGET_FLAGS_REGNUM): New macro.
7419         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
7420         (cc0_reg_rtx): Remove.
7421         (CC_STATUS_MDEP): Remove.
7422         (CC_STATUS_MDEFP_INIT): Remove.
7423         (CC_IN_FPU): Remove.
7424         (NOTICE_UPDATE_CC): Remove.
7425         (REGISTER_NAMES): Add CC registers.
7426         (BRANCH_COST): Change to constant 1.
7427         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
7428         handling.
7429         * config/pdp11/pdp11.opt (mbcopy): Remove.
7430         (mbcopy-builtin): Remove.
7431         (mbranch-cheap): Remove.
7432         (mbranch-expensive): Remove.
7433         * config/pdp11/predicates.md (expand_shift_operand): Update to
7434         match shift code generation.
7435         (ccnz_operator): New predicate.
7436         * doc/invoke.texi (PDP-11 Options): Remove deleted options
7437         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
7438         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
7439         exclusive options.
7440         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
7441         description of O constraint.
7443 2018-06-27  Jeff Law  <law@redhat.com>
7444             Austin Law  <austinklaw@gmail.com>
7446         * config/v850/v850.md (addsi3_set_flags): New pattern.
7447         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
7448         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
7449         (zero_extendhisi2_v850_set_flags): Likewise.
7450         (zero_extendqisi2_v850_set_flags): Likewise.
7451         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
7452         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
7453         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
7455         * config/v850/v850-protos.h (notice_update_cc): Remove.
7456         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
7457         (v850_print_operand): Handle 'D' and "d".
7458         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
7459         Add handling of arithmetic/logical operations compared against zero.
7460         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
7461         Do not look at v850_compare_op, instead get mode from last argument.
7462         (v850_gen_compare): Remove
7463         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
7464         after reload for prologue insns.
7465         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
7466         patterns.
7467         (construct_save_jarl): Likewise.
7468         (TARGET_FLAGS_REGNUM): Define.
7469         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
7470         (NOTICE_UPDATE_CC): Remove.
7471         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
7472         than cc0.  Conditionalize on reload_completed.
7473         (cmpsi_insn, setfcc_insn): Likewise.
7474         (tst1 splitter): Turn into define_and_split which sets the flags
7475         after reload.
7476         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
7477         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
7478         (cstoresf4, cstoredf4): Clobber the flags.
7479         (cmpsi, cmpsf, cmpdf): Remove expanders.
7480         (setf_insn): Remove pattern.
7481         (addsi3): Turn into define_and_split which clobbers the flags after
7482         reload and a suitable pattern (addsi3_clobber_flags) for use after
7483         reload.
7484         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
7485         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
7486         (ashrsi3, ashrsi3_v850e2): Likewise.
7487         (bins): Clobber the flags.
7488         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
7489         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
7490         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
7491         (call_value_internal_short, call_value_internal_long): Likewise.
7492         (callt_save_interrupt, callt_return_interrupt): Likewise.
7493         (save_interrupt, return_interrupt): Likewise.
7494         (callt_save_all_interrupt, save_all_interrupt): Likewise.
7495         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
7496         (restore_all_interrupt, _restore_all_interrupt): Likewise.
7497         (All FP comparisons): Only allow after reload has completed.
7498         (trfsr): Likewise.
7499         (divh, divhu): Tweak output template.
7500         (branch_z_normal, branch_z_invert): Remove
7501         (branch_nz_normal, branch_nz_invert): Likewise.
7502         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
7504         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
7505         * config/v850/v850.c (notice_update_cc): Remove.
7506         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
7507         (CC_NO_CARRY): Likewise.
7508         (NOTICE_UPDATE_CC): Define to nothing.
7509         * config/v850/v850.md: Remove block comment on cc0 handling
7510         Remove "cc" attribute from all patterns.  Remove cc_status handling
7511         from all patterns.  Minor formatting fixes.
7513 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7515         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
7516         (cortex-a76.cortex-a55): Likewise.
7517         * config/aarch64/aarch64-tune.md: Regenerate.
7518         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
7519         cortex-a76.cortex-a55.
7521 2018-06-27  Jeff Law  <law@redhat.com>
7523         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
7524         (MULTILIB_DIRNAMES): Similarly.
7526 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
7528         * gimple.h (gimple_return_retbnd): Delete.
7529         (gimple_return_set_retbnd): Likewise.
7530         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
7531         gimple_return_set_retbnd.
7532         * gimple-pretty-print.c (dump_gimple_return): Remove call to
7533         gimple_return_retbnd and adjust.
7534         * tree-inline.h (struct copy_body_data): Remove retbnd field.
7535         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
7536         Explicitly return NULL in a couple more cases.  Move assertion
7537         on debug statements and remove unreachable code.
7538         (reset_debug_binding): Do not test id->retbnd.
7539         (expand_call_inline): Do not set it.
7541 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
7543         * configure.ac: Add --disable-gcov option.
7544         * configure: Regenerate.
7545         * Makefile.in: Honour @enable_gcov@.
7546         * doc/install.texi: Document --disable-gcov.
7548 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7550         * config/arm/arm-cpus.in (cortex-a76): New entry.
7551         (cortex-a76.cortex-a55): Likewise.
7552         * config/arm/arm-tables.opt: Regenerate.
7553         * config/arm/arm-tune.md: Likewise.
7554         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
7555         * doc/invoke.texi (ARM Options): Document cortex-a76 and
7556         cortex-a76.cortex-a55.
7558 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
7560         PR target/85769
7561         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
7563 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
7565         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
7566         comment.
7567         (EPILOGUE_USES): Likewise.
7569 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
7571         * tree-inline.c (remap_location): New function extracted from...
7572         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
7573         (copy_phis_for_bb): ...here.  Call remap_location.
7574         (copy_cfg_body): Adjust call to copy_edges_for_bb.
7576 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
7578         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
7579         unaligned vsx for 16B memset.
7581 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
7583         PR target/86285
7584         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
7585         ieee128_float_type_node to long_double_type_node unless
7586         TARGET_LONG_DOUBLE_128 is set.
7588 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
7590         * cfgloop.c (get_loop_location): Convert return type from
7591         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
7592         by implicit construction from rtx_insn *, and using
7593         dump_user_location_t::from_function_decl for the fallback case.
7594         * cfgloop.h (get_loop_location): Convert return type from
7595         location_t to dump_user_location_t.
7596         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
7597         dump_printf_loc to pass in a dump_location_t rather than a
7598         location_t, via the gimple stmt.
7599         * coverage.c (get_coverage_counts): Update calls to
7600         dump_printf_loc to pass in dump_location_t rather than a
7601         location_t.
7602         * doc/optinfo.texi (Dump types): Convert example of
7603         dump_printf_loc from taking "locus" to taking "insn".  Update
7604         description of the "_loc" calls to cover dump_location_t.
7605         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
7606         "selftest.h".
7607         (dump_user_location_t::dump_user_location_t): New constructors,
7608         from gimple *stmt and rtx_insn *.
7609         (dump_user_location_t::from_function_decl): New function.
7610         (dump_loc): Make static.
7611         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
7612         const dump_location_t &.
7613         (dump_generic_expr_loc): Delete.
7614         (dump_printf_loc): Convert param "loc" from location_t to
7615         const dump_location_t &.
7616         (selftest::test_impl_location): New function.
7617         (selftest::dumpfile_c_tests): New function.
7618         * dumpfile.h: Include "profile-count.h".
7619         (class dump_user_location_t): New class.
7620         (struct dump_impl_location_t): New struct.
7621         (class dump_location_t): New class.
7622         (dump_printf_loc): Convert 2nd param from source_location to
7623         const dump_location_t &.
7624         (dump_generic_expr_loc): Delete.
7625         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
7626         const dump_location_t &.
7627         * gimple-fold.c (fold_gimple_assign): Update call to
7628         dump_printf_loc to pass in a dump_location_t rather than a
7629         location_t, via the gimple stmt.
7630         (gimple_fold_call): Likewise.
7631         * gimple-loop-interchange.cc
7632         (loop_cand::analyze_iloop_reduction_var): Update for change to
7633         check_reduction_path.
7634         (tree_loop_interchange::interchange): Update for change to
7635         find_loop_location.
7636         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
7637         change in return-type of find_loop_location.
7638         (graphite_regenerate_ast_isl): Likewise.
7639         * graphite-optimize-isl.c (optimize_isl): Likewise.
7640         * graphite.c (graphite_transform_loops): Likewise.
7641         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
7642         pass in a dump_location_t rather than a location_t, via the
7643         gimple stmt.
7644         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
7645         * ipa.c (walk_polymorphic_call_targets): Likewise.
7646         * loop-unroll.c (report_unroll): Convert "locus" param from
7647         location_t to dump_location_t.
7648         (decide_unrolling): Update for change to get_loop_location's
7649         return type.
7650         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
7651         location_t to dump_user_location_t.
7652         (grid_find_single_omp_among_assignments_1): Updates calls to
7653         dump_printf_loc to pass in a dump_location_t rather than a
7654         location_t, via the gimple stmt.
7655         (grid_parallel_clauses_gridifiable): Convert "tloc" from
7656         location_t to dump_location_t.  Updates calls to dump_printf_loc
7657         to pass in a dump_location_t rather than a location_t, via the
7658         gimple stmt.
7659         (grid_inner_loop_gridifiable_p): Likewise.
7660         (grid_dist_follows_simple_pattern): Likewise.
7661         (grid_gfor_follows_tiling_pattern): Likewise.
7662         (grid_target_follows_gridifiable_pattern): Likewise.
7663         (grid_attempt_target_gridification): Convert initialization
7664         of local "grid" from memset to zero-initialization; FIXME: does
7665         this require C++11?  Update call to dump_printf_loc to pass in a
7666         optinfo_location rather than a location_t, via the gimple stmt.
7667         * profile.c (read_profile_edge_counts): Updates call to
7668         dump_printf_loc to pass in a dump_location_t rather than a
7669         location_t
7670         (compute_branch_probabilities): Likewise.
7671         * selftest-run-tests.c (selftest::run_tests): Call
7672         dumpfile_c_tests.
7673         * selftest.h (dumpfile_c_tests): New decl.
7674         * tree-loop-distribution.c (pass_loop_distribution::execute):
7675         Update for change in return type of find_loop_location.
7676         * tree-parloops.c (parallelize_loops): Likewise.
7677         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
7678         "locus" from location_t to dump_user_location_t.
7679         (canonicalize_loop_induction_variables): Likewise.
7680         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
7681         for change in return type of find_loop_location.
7682         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
7683         to dump_printf_loc to pass in a dump_location_t rather than a
7684         location_t, via the stmt.
7685         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
7686         Likewise.
7687         * tree-vect-loop-manip.c (find_loop_location): Convert return
7688         type from source_location to dump_user_location_t.
7689         (vect_do_peeling): Update for above change.
7690         (vect_loop_versioning): Update for change in type of
7691         vect_location.
7692         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
7693         from location_t to dump_user_location_t.
7694         (vect_estimate_min_profitable_iters): Update for change in type
7695         of vect_location.
7696         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
7697         location_t to dump_location_t.
7698         (vect_slp_bb): Update for change in type of vect_location.
7699         * tree-vectorizer.c (vect_location): Convert from source_location
7700         to dump_user_location_t.
7701         (try_vectorize_loop_1): Update for change in vect_location's type.
7702         (vectorize_loops): Likewise.
7703         (increase_alignment): Likewise.
7704         * tree-vectorizer.h (vect_location): Convert from source_location
7705         to dump_user_location_t.
7706         (find_loop_location): Convert return type from source_location to
7707         dump_user_location_t.
7708         (check_reduction_path): Convert 1st param from location_t to
7709         dump_user_location_t.
7710         * value-prof.c (check_counter): Update call to dump_printf_loc to
7711         pass in a dump_user_location_t rather than a location_t; update
7712         call to error_at for change in type of "locus".
7713         (check_ic_target): Update call to dump_printf_loc to
7714         pass in a dump_user_location_t rather than a location_t, via the
7715         call_stmt.
7717 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
7719         * config/s390/s390.h (enum processor_flags): Do not use
7720         default tune parameter when -march was specified.
7722 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
7724         PR target/86314
7725         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
7726         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
7727         operands.
7729 2018-06-26  Richard Biener  <rguenther@suse.de>
7731         PR tree-optimization/86287
7732         PR bootstrap/86316
7733         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
7734         (vect_analyze_loop): Initialize n_stmts.
7736 2018-06-26  Richard Biener  <rguenther@suse.de>
7738         PR middle-end/86271
7739         * fold-const.c (fold_convertible_p): Pointer extension
7740         isn't valid.
7742 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
7744         PR debug/86064
7745         * dwarf2out.c (loc_list_has_views): Adjust comments.
7746         (dw_loc_list): Split single cross-partition range with
7747         nonzero locview.
7749 2018-06-25  Jeff Law  <law@redhat.com>
7751         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
7752         on -mbig-switch by default.
7754         * config/v850/predicates.md (const_float_1_operand): Fix match_code
7755         test.
7756         (const_float_0_operand): Remove unused predicate.
7757         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
7758         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
7759         (recipsf2): New expander.  Original pattern now called
7760         (recipsf2_insn).
7761         (recipdf2, recipdf2_insn): Similarly.
7762         (rsqrtsf2, rsqrtsf2_insn): Similarly
7763         (rsqrtdf2, rsqrtdf2_insn): Similarly
7765 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
7767         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
7768         Simplify logic for FreeBSD (twice).
7770 2018-06-25  Martin Sebor  <msebor@redhat.com>
7772         PR tree-optimization/86204
7773         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
7774         a strnlen result if it's less than the length of the string.
7776 2018-06-25  Martin Sebor  <msebor@redhat.com>
7778         PR tree-optimization/85700
7779         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
7780         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
7781         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
7783 2018-06-25  Martin Sebor  <msebor@redhat.com>
7785         * doc/extend.texi (Zero-length arrays): Update and clarify.
7787 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
7789         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
7790         added IEEE/IBM long double multilib support on PowerPC little
7791         endian Linux systems.
7792         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
7793         (MULTILIB_DEFAULTS): Likewise.
7794         * config/rs6000/rs6000.c (rs6000_option_override_internal):
7795         Likewise.
7796         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
7797         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
7798         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
7800 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
7802         PR middle-end/86311
7803         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
7804         (REORDER_45): Likewise.
7806 2018-06-25  Jeff Law  <law@redhat.com>
7808         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
7809         dividend to 32 bits.  Adjust length.
7810         (udivmodhi4): Cleanup output template.  Fix length.
7812 2018-06-25  Carl Love  <cel@us.ibm.com>
7814         * config/rs6000/vsx.md: Change word selector to prefered location.
7816 2018-06-25  Richard Biener  <rguenther@suse.de>
7818         PR tree-optimization/86304
7819         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
7820         epilogue-if-converted loops as well.
7822 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
7824         * lto-section-out.c (lto_begin_section): Do not print section
7825         name for noaddr and unnumbered dumps.
7827 2018-06-25  Richard Biener  <rguenther@suse.de>
7829         * tree-vectorizer.h (struct vec_info_shared): New structure
7830         with parts split out from struct vec_info and loop_nest from
7831         struct _loop_vec_info.
7832         (struct vec_info): Adjust accordingly.
7833         (struct _loop_vec_info): Likewise.
7834         (LOOP_VINFO_LOOP_NEST): Adjust.
7835         (LOOP_VINFO_DATAREFS): Likewise.
7836         (LOOP_VINFO_DDRS): Likewise.
7837         (struct _bb_vec_info): Likewise.
7838         (BB_VINFO_DATAREFS): Likewise.
7839         (BB_VINFO_DDRS): Likewise.
7840         (struct _stmt_vec_info): Add dr_aux member.
7841         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
7842         (DR_MISALIGNMENT_UNINITIALIZED): New.
7843         (set_dr_misalignment): Adjust.
7844         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
7845         (vect_analyze_loop): Adjust prototype.
7846         (vect_analyze_loop_form): Likewise.
7847         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
7848         Compute dependences lazily.
7849         (vect_record_base_alignments): Use shared datarefs/ddrs.
7850         (vect_verify_datarefs_alignment): Likewise.
7851         (vect_analyze_data_refs_alignment): Likewise.
7852         (vect_analyze_data_ref_accesses): Likewise.
7853         (vect_analyze_data_refs): Likewise.
7854         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
7855         constructor parameter for shared part.
7856         (vect_analyze_loop_form): Pass in shared part and adjust.
7857         (vect_analyze_loop_2): Pass in storage for the number of
7858         stmts.  Move loop nest finding to the caller.  Compute
7859         datarefs lazily.
7860         (vect_analyze_loop): Pass in shared part.
7861         (vect_transform_loop): Verify shared datarefs are unchanged.
7862         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
7863         constructor parameter for shared part.
7864         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
7865         (vect_slp_bb): Verify shared datarefs are unchanged before
7866         transform.
7867         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
7868         change.
7869         (new_stmt_vec_info): Initialize DR_AUX misalignment to
7870         DR_MISALIGNMENT_UNINITIALIZED.
7871         * tree-vectorizer.c (vec_info::vec_info): Add constructor
7872         parameter for shared part.
7873         (vec_info::~vec_info): Adjust.
7874         (vec_info_shared::vec_info_shared): New.
7875         (vec_info_shared::~vec_info_shared): Likewise.
7876         (vec_info_shared::save_datarefs): Likewise.
7877         (vec_info_shared::check_datarefs): Likewise.
7878         (try_vectorize_loop_1): Construct shared part live for analyses
7879         of a single loop for multiple vector sizes.
7880         * tree-parloops.c (gather_scalar_reductions): Adjust.
7882 2018-06-25  Richard Biener  <rguenther@suse.de>
7884         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
7885         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
7886         (vect_analyze_data_refs): Remove similar code from here and
7887         simplify accordingly.
7889 2018-06-25  Richard Biener  <rguenther@suse.de>
7891         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
7892         for reverse storage order accesses rather than asserting
7893         they cannot happen here.
7895 2018-06-25  Tom de Vries  <tdevries@suse.de>
7897         PR debug/86257
7898         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
7899         Use data16 instead of .byte for insn prefix.
7901 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
7903         PR C++/86082
7904         * parser.c (make_char_string_pack): Pass this literal chars
7905         through cpp_interpret_string.
7906         (cp_parser_userdef_numeric_literal): Check the result of
7907         make_char_string_pack.
7909 2018-06-24  Maya Rashish  <coypu@sdf.org>
7911         * ginclude/stddef.h: Simplify conditions around avoiding
7912         re-definition of __size_t.
7914 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
7916         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
7917         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
7919 2018-06-22  Maya Rashish  <coypu@sdf.org>
7921         * doc/invoke.texi (mno-fancy-math-387): Update for changes
7922         made to OpenBSD and NetBSD through the years.
7924 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7926         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
7927         behavior of vec_pack (vector double, vector double) to match
7928         behavior of vec_float2 (vector double, vector double).
7930 2018-06-22  Olivier Hainque  <hainque@adacore.com>
7932         * gimplify.c (gimplify_function_tree): Prevent creation
7933         of a trampoline for the address of the current function
7934         passed to entry/exit instrumentation hooks.
7936 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
7938         PR target/86222
7939         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
7940         correctly.
7942 2018-06-22  Martin Liska  <mliska@suse.cz>
7944         PR tree-optimization/86263
7945         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
7946         Bail out if is_enabled is false.
7947         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
7948         New declaration.
7949         (jump_table_cluster::is_enabled): New function.
7951 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
7953         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
7954         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
7955         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
7956         (lto_input_ts_binfo_tree_pointers): Likewise.
7957         * tree-streamer-out.c (streamer_write_tree_bitfields,
7958         write_ts_binfo_tree_pointers): Likewise.
7959         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
7961 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
7963         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
7965 2018-06-22  Martin Liska  <mliska@suse.cz>
7967         * symbol-summary.h (get): Make it pure and inline move
7968         functionality from ::get function.
7969         (get): Remove and inline into ::get and ::get_create.
7970         (get_create): Move code from ::get function.
7972 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7974         PR target/85994
7975         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
7976         -x assembler-with-cpp.
7978 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7980         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
7981         _FILE_OFFSET_BITS=64 for C++.
7983 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
7985         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
7986         conversion insn that shows up when pr85657-3.c is compiled using
7987         IEEE 128-bit long double.
7988         (neg<mode>2_internal): Use the correct mode to check whether the
7989         mode is IBM extended.
7990         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
7991         multiply and divide external functions from being created more
7992         than once.
7994 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
7996         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
7997         functions.
7998         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
7999         the edge can be forwarded.
8000         (cfg_layout_merge_blocks): Likewise.
8002 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
8004         * except.c (finish_eh_generation): Commit edge insertions only after
8005         the EH edges have been redirected from post-landing to landing pads.
8007 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
8009         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
8010         create_tmp_var_for to create the FRAME decl.
8011         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
8013 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
8015         * tree-inline.c (copy_edges_for_bb): Minor tweak.
8016         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
8017         debug statement when resetting its value.
8018         (expand_call_inline): Copy the locus of the call onto the assignment
8019         of the return value, if any.  Use local variable in more cases.
8021 2018-06-21  Martin Liska  <mliska@suse.cz>
8023         * ipa-pure-const.c (propagate_nothrow): Use
8024         funct_state_summaries->get.
8025         (dump_malloc_lattice): Likewise.
8026         (propagate_malloc): Likewise.
8028 2018-06-21  Richard Biener  <rguenther@suse.de>
8030         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
8031         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
8032         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
8033         comment.
8034         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
8035         BLOCK_ABSTRACT_ORIGIN unconditionally.
8037 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
8039         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
8040         deleting it.
8041         * ipa-reference.c (ipa_reference_c_finalize): Delete
8042         ipa_ref_opt_sum_summaries and set it to NULL.
8044 2018-06-21  Tom de Vries  <tdevries@suse.de>
8046         PR tree-optimization/85859
8047         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
8048         test with comment from bb_no_side_effects_p.
8050 2018-06-21  Richard Biener  <rguenther@suse.de>
8052         PR tree-optimization/86232
8053         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
8054         max for constant niter.
8056 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8058         * config/aarch64/aarch64-simd.md
8059         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
8061 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
8063         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
8064         Make opernads of the unspec commutative.
8066 2018-06-21  Richard Biener  <rguenther@suse.de>
8068         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
8069         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
8070         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
8071         (vect_analyze_data_ref_dependence): Re-order checks to deal with
8072         NULL DR_STEP.
8073         (vect_record_base_alignments): Do not record base alignment
8074         for gathers or scatters.
8075         (vect_compute_data_ref_alignment): Drop return value that is always
8076         true.  Bail out early for gathers or scatters.
8077         (vect_enhance_data_refs_alignment): Bail out early for gathers
8078         or scatters.
8079         (vect_find_same_alignment_drs): Likewise.
8080         (vect_analyze_data_refs_alignment): Remove dead code.
8081         (vect_slp_analyze_and_verify_node_alignment): Likewise.
8082         (vect_analyze_data_refs): For possible gathers or scatters do
8083         not create an alternate DR, just check their possible validity
8084         and mark them.  Adjust DECL_NONALIASED handling to not rely
8085         on DR_BASE_ADDRESS.
8086         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
8087         update inits of gathers or scatters.
8088         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
8089         Also copy gather/scatter flag to pattern vinfo.
8091 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8093         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
8094         behavior of vec_packsu (vector unsigned long long, vector unsigned
8095         long long) to match behavior of vec_packs with same signature.
8097 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
8098             Thomas Schwinge <thomas@codesourcery.com>
8099             Cesar Philippidis  <cesar@codesourcery.com>
8101         * gimplify.c (gimplify_scan_omp_clauses): Add support for
8102         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8103         (gimplify_adjust_omp_clauses): Likewise.
8104         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
8105         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
8106         (gimplify_omp_target_update): Update handling of acc update and
8107         enter/exit data.
8108         * omp-low.c (install_var_field): Remove unused parameter
8109         base_pointers_restrict.
8110         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
8111         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
8112         FINALIZE}
8113         (omp_target_base_pointers_restrict_p): Delete.
8114         (scan_omp_target): Update call to scan_sharing_clauses.
8115         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
8116         FINALIZE}.
8117         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
8118         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
8119         (convert_local_omp_clauses): Likewise.
8120         * tree-pretty-print.c (dump_omp_clause): Likewise.
8121         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
8122         FINALIZE}.
8123         (omp_clause_code_name): Likewise.
8125 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
8127         PR debug/86194
8128         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
8129         be narrowed.
8131         PR tree-optimization/86231
8132         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
8133         anti-range don't overwrite *vr0min before using it to compute *vr0max.
8135 2018-06-20  Tom de Vries  <tdevries@suse.de>
8137         PR tree-optimization/86097
8138         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
8139         iv type if signedness of iv type is not the same as that of *nit.
8141 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
8143         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
8144         EDGE_EH edges, verify they are all EDGE_EH.
8146 2018-06-20  Maya Rashish  <coypu@sdf.org>
8148         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
8150 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8152         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
8153         * config/aarch64/aarch64.c (xgene1_tunings): Add
8154         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
8155         (aarch64_mode_valid_for_sched_fusion_p):
8156         Allow 16-byte modes.
8157         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
8158         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
8159         128-bit modes.
8160         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
8161         New pattern.
8162         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
8163         * config/aarch64/iterators.md (VQ2): New mode iterator.
8165 2018-06-20  Martin Liska  <mliska@suse.cz>
8167         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
8168         Change default ratio from 10 to 8.
8170 2018-06-20  Martin Liska  <mliska@suse.cz>
8172         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
8173         New.
8174         (bit_test_cluster::find_bit_tests): Likewise.
8175         (switch_decision_tree::analyze_switch_statement): Find clusters.
8176         * tree-switch-conversion.h (struct jump_table_cluster): Document
8177         hierarchy.
8179 2018-06-20  Martin Liska  <mliska@suse.cz>
8181         * tree-switch-conversion.c (switch_conversion::collect):
8182         Record m_uniq property.
8183         (switch_conversion::expand): Bail out for special conditions.
8184         (group_cluster::~group_cluster): New.
8185         (group_cluster::group_cluster): Likewise.
8186         (group_cluster::dump): Likewise.
8187         (jump_table_cluster::emit): New.
8188         (switch_decision_tree::fix_phi_operands_for_edges): New.
8189         (struct case_node): Remove struct.
8190         (jump_table_cluster::can_be_handled): New.
8191         (case_values_threshold): Moved to header.
8192         (reset_out_edges_aux): Likewise.
8193         (jump_table_cluster::is_beneficial): New.
8194         (bit_test_cluster::can_be_handled): Likewise.
8195         (add_case_node): Remove.
8196         (bit_test_cluster::is_beneficial): New.
8197         (case_bit_test::cmp): New.
8198         (bit_test_cluster::emit): New.
8199         (expand_switch_as_decision_tree_p): Remove.
8200         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
8201         (fix_phi_operands_for_edge): Likewise.
8202         (switch_decision_tree::analyze_switch_statement): New.
8203         (compute_cases_per_edge): Move ...
8204         (switch_decision_tree::compute_cases_per_edge): ... here.
8205         (try_switch_expansion): Likewise.
8206         (switch_decision_tree::try_switch_expansion): Likewise.
8207         (record_phi_operand_mapping): Likewise.
8208         (switch_decision_tree::record_phi_operand_mapping): Likewise.
8209         (emit_case_decision_tree): Likewise.
8210         (switch_decision_tree::emit): Likewise.
8211         (balance_case_nodes): Likewise.
8212         (switch_decision_tree::balance_case_nodes): Likewise.
8213         (dump_case_nodes): Likewise.
8214         (switch_decision_tree::dump_case_nodes): Likewise.
8215         (emit_jump): Likewise.
8216         (switch_decision_tree::emit_jump): Likewise.
8217         (emit_cmp_and_jump_insns): Likewise.
8218         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
8219         (emit_case_nodes): Likewise.
8220         (switch_decision_tree::emit_case_nodes): Likewise.
8221         (conditional_probability): Remove.
8222         * tree-switch-conversion.h (enum cluster_type): New.
8223         (PRINT_CASE): New.
8224         (struct cluster): Likewise.
8225         (cluster::cluster): Likewise.
8226         (struct simple_cluster): Likewise.
8227         (simple_cluster::simple_cluster): Likewise.
8228         (struct group_cluster): Likewise.
8229         (struct jump_table_cluster): Likewise.
8230         (struct bit_test_cluster): Likewise.
8231         (struct min_cluster_item): Likewise.
8232         (struct case_tree_node): Likewise.
8233         (case_tree_node::case_tree_node): Likewise.
8234         (jump_table_cluster::case_values_threshold): Likewise.
8235         (struct case_bit_test): Likewise.
8236         (struct switch_decision_tree): Likewise.
8237         (struct switch_conversion): Likewise.
8238         (switch_decision_tree::reset_out_edges_aux): Likewise.
8240 2018-06-20  Martin Liska  <mliska@suse.cz>
8242         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
8243         (hoist_edge_and_branch_if_true): Likewise.
8244         (expand_switch_using_bit_tests_p): Likewise.
8245         (struct case_bit_test): Likewise.
8246         (case_bit_test_cmp): Likewise.
8247         (emit_case_bit_tests): Likewise.
8248         (switch_conversion::switch_conversion): New class.
8249         (struct switch_conv_info): Remove old struct.
8250         (collect_switch_conv_info): More to ...
8251         (switch_conversion::collect): ... this.
8252         (check_range): Likewise.
8253         (switch_conversion::check_range): Likewise.
8254         (check_all_empty_except_final): Likewise.
8255         (switch_conversion::check_all_empty_except_final): Likewise.
8256         (check_final_bb): Likewise.
8257         (switch_conversion::check_final_bb): Likewise.
8258         (create_temp_arrays): Likewise.
8259         (switch_conversion::create_temp_arrays): Likewise.
8260         (free_temp_arrays): Likewise.
8261         (gather_default_values): Likewise.
8262         (switch_conversion::gather_default_values): Likewise.
8263         (build_constructors): Likewise.
8264         (switch_conversion::build_constructors): Likewise.
8265         (constructor_contains_same_values_p): Likewise.
8266         (switch_conversion::contains_same_values_p): Likewise.
8267         (array_value_type): Likewise.
8268         (switch_conversion::array_value_type): Likewise.
8269         (build_one_array): Likewise.
8270         (switch_conversion::build_one_array): Likewise.
8271         (build_arrays): Likewise.
8272         (switch_conversion::build_arrays): Likewise.
8273         (gen_def_assigns): Likewise.
8274         (switch_conversion::gen_def_assigns): Likewise.
8275         (prune_bbs): Likewise.
8276         (switch_conversion::prune_bbs): Likewise.
8277         (fix_phi_nodes): Likewise.
8278         (switch_conversion::fix_phi_nodes): Likewise.
8279         (gen_inbound_check): Likewise.
8280         (switch_conversion::gen_inbound_check): Likewise.
8281         (process_switch): Use the newly created class.
8282         (switch_conversion::expand): New.
8283         (switch_conversion::~switch_conversion): New.
8284         * tree-switch-conversion.h: New file.
8286 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8288         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
8289         tree-vect-patterns.c.
8290         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
8291         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
8292         (vect_recog_sad_pattern): Likewise.
8293         (vect_recog_widen_sum_pattern): Likewise.
8294         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
8295         (vect_recog_widen_shift_pattern): Remove the type_in argument.
8296         (vect_recog_rotate_pattern): Likewise.
8297         (vect_recog_mult_pattern): Likewise.
8298         (vect_recog_vector_vector_shift_pattern): Likewise.
8299         (vect_recog_divmod_pattern): Likewise.
8300         (vect_recog_mixed_size_cond_pattern): Likewise.
8301         (vect_recog_bool_pattern): Likewise.
8302         (vect_recog_mask_conversion_pattern): Likewise.
8303         (vect_try_gather_scatter_pattern): Likewise.
8304         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
8305         (vect_recog_over_widening_pattern): Likewise.
8306         (vect_recog_gather_scatter_pattern): Likewise.
8307         (vect_recog_func_ptr): Move from tree-vectorizer.h
8308         (vect_vect_recog_func_ptrs): Move further down the file.
8309         (vect_recog_func): Likewise.  Remove the third argument.
8310         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
8311         (vect_pattern_recog_1): Expect the pattern function to do any
8312         necessary target tests.  Also expect it to provide a vector type.
8313         Remove the type_in handling.
8315 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8317         * tree-vect-patterns.c (vect_pattern_detected): New function.
8318         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
8319         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
8320         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
8321         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
8322         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
8323         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
8324         (vect_recog_mask_conversion_pattern)
8325         (vect_try_gather_scatter_pattern): Likewise.
8327 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8329         * tree-vect-patterns.c (vect_get_internal_def): New function.
8330         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
8331         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
8332         (search_type_for_mask_1): Use it.
8334 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8336         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8337         redundant WIDEN_SUM_EXPR handling.
8338         (vect_recog_sad_pattern): Likewise.
8340 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8342         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
8343         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
8344         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
8345         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
8346         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
8348 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8350         * tree-vect-stmts.c (vectorizable_call): Make sure that we
8351         use the stmt_vec_info of the original bb statement for the
8352         new zero assignment, even if the call is part of a pattern.
8354 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8356         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
8357         that the sequence is attached to the original statement rather
8358         than the pattern statement.
8359         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
8360         PATTERN_DEF_SEQ from the original statement rather than
8361         the main pattern statement.
8362         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
8363         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
8364         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
8366 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
8368         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
8369         definition statements before the early exit for statements that aren't
8370         live or relevant.
8371         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
8372         split out from...
8373         (vect_transform_loop): ...here.  Process pattern definition
8374         statements without first checking whether the main pattern
8375         statement is live or relevant.
8377 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
8379         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
8380         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
8382 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
8384         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
8385         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
8386         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
8387         (expand_block_compare): Change select_block_compare_mode call.
8388         (expand_strncmp_align_check): Use new functions, fix comment.
8389         (emit_final_str_compare_gpr): New function.
8390         (expand_strn_compare): Refactor and clean up code.
8391         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
8393 2018-06-19  Tony Reix  <tony.reix@atos.com>
8394             Damien Bergamini  <damien.bergamini@atos.com>
8395             David Edelsohn  <dje.gcc@gmail.com>
8397         * collect2.c (static_obj): New variable.
8398         (static_libs): New variable.
8399         (is_in_list): Uncomment declaration.
8400         (main): Track AIX libraries linked statically.
8401         (is_in_list): Uncomment definition.
8402         (scan_prog_file): Don't add AIX shared libraries initializer
8403         to constructor list if linking statically.
8405 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
8407         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
8408         constant.
8409         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
8411 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
8413         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
8414         blocks.
8416 2018-06-19  Martin Liska  <mliska@suse.cz>
8418         * config/i386/i386.c (ix86_can_inline_p): Do not use
8419         ipa_fn_summaries::get_create.
8420         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
8421         get.
8422         (devirtualization_time_bonus): Likewise.
8423         (ipcp_propagate_stage): Likewise.
8424         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
8425         (edge_set_predicate): Likewise.
8426         (evaluate_conditions_for_known_args): Likewise.
8427         (evaluate_properties_for_edge): Likewise.
8428         (ipa_call_summary::reset): Tranform to ...
8429         (ipa_call_summary::~ipa_call_summary): ... this.
8430         (ipa_fn_summary::reset): Transform to ...
8431         (ipa_fn_summary::~ipa_fn_summary): ... this.
8432         (ipa_fn_summary_t::remove): Rename to ...
8433         (ipa_fn_summary_t::remove_callees): ... this.
8434         (ipa_fn_summary_t::duplicate): Use placement new
8435         instead of memory copy.
8436         (ipa_call_summary_t::duplicate): Likewise.
8437         (ipa_call_summary_t::remove): Remove.
8438         (dump_ipa_call_summary): Change get_create to get.
8439         (ipa_dump_fn_summary): Dump only when summary exists.
8440         (analyze_function_body): Use symbol_summary::get instead
8441         of get_create.
8442         (compute_fn_summary): Likewise.
8443         (estimate_edge_devirt_benefit): Likewise.
8444         (estimate_edge_size_and_time): Likewise.
8445         (inline_update_callee_summaries): Likewise.
8446         (remap_edge_change_prob): Likewise.
8447         (remap_edge_summaries): Likewise.
8448         (ipa_merge_fn_summary_after_inlining): Likewise.
8449         (write_ipa_call_summary): Likewise.
8450         (ipa_fn_summary_write): Likewise.
8451         (ipa_free_fn_summary): Likewise.
8452         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
8453         (struct ipa_call_summary): Likewise.
8454         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
8455         of get_create.
8456         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
8457         (estimate_size_after_inlining): Likewise.
8458         (estimate_growth): Likewise.
8459         (growth_likely_positive): Likewise.
8460         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
8461         (inline_call): Likewise.
8462         * ipa-inline.c (caller_growth_limits): Likewise.
8463         (can_inline_edge_p): Likewise.
8464         (can_inline_edge_by_limits_p): Likewise.
8465         (compute_uninlined_call_time): Likewise.
8466         (compute_inlined_call_time): Likewise.
8467         (want_inline_small_function_p): Likewise.
8468         (edge_badness): Likewise.
8469         (update_caller_keys): Likewise.
8470         (update_callee_keys): Likewise.
8471         (inline_small_functions): Likewise.
8472         (inline_to_all_callers_1): Likewise.
8473         (dump_overall_stats): Likewise.
8474         (early_inline_small_functions): Likewise.
8475         (early_inliner): Likewise.
8476         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
8477         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
8478         * ipa-pure-const.c (malloc_candidate_p): Likewise.
8479         * ipa-split.c (execute_split_functions): Likewise.
8480         * symbol-summary.h: Likewise.
8481         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
8483 2018-06-19  Richard Biener  <rguenther@suse.de>
8485         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
8486         (vectorize_loops): ... here.  Fix dbgcnt handling.
8487         (try_vectorize_loop): Wrap try_vectorize_loop_1.
8489 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
8491         PR target/86197
8492         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
8493         ieee128 argument takes up only one (vector) register, not two (floating
8494         point) registers.
8496 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
8498         * gimplify.c (gimplify_init_constructor): Really never clear for an
8499         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
8501 2018-06-19  Richard Biener  <rguenther@suse.de>
8503         PR tree-optimization/86179
8504         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
8505         after failed recognition.
8507 2018-06-18  Martin Sebor  <msebor@redhat.com>
8509         PR middle-end/85602
8510         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
8511         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
8512         Handle integer subtraction.
8513         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
8514         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
8516 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
8518         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
8519         param from rtx to rtx_insn *.
8520         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
8521         param.
8522         (frv_ifcvt_modify_insn): Likwise.
8523         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
8524         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
8525         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
8526         as_a <rtx_insn *> cast to local "unprotected_region" once
8527         it's been established that it's not NULL or pc_rtx.
8528         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
8529         param "sethi" from rtx to rtx_insn *.
8530         (nds32_group_float_insns): Likewise for param "insn".
8531         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
8532         param.
8533         (vax_output_int_subtract): Likewise.
8534         * config/vax/vax.c (vax_output_int_add): Likewise for param
8535         "insn".
8536         (vax_output_int_subtract): Likewise.
8537         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
8538         (emit_pattern_after): Likewise for param "after".
8539         (emit_insn_after): Likewise.
8540         (emit_jump_insn_after): Likewise.
8541         (emit_call_insn_after): Likewise.
8542         (emit_debug_insn_after): Likewise.
8543         (emit_pattern_before): Likewise for param "before".
8544         (emit_insn_before): Likewise.
8545         (emit_jump_insn_before): Likewise.
8546         * final.c (get_insn_template): Likewise for param "insn", removing
8547         a cast.
8548         * output.h (get_insn_template): Likewise for 2nd param.
8549         * rtl.h (emit_insn_before): Likewise.
8550         (emit_jump_insn_before): Likewise.
8551         (emit_debug_insn_before_noloc): Likewise.
8552         (emit_insn_after): Likewise.
8553         (emit_jump_insn_after): Likewise.
8554         (emit_call_insn_after): Likewise.
8555         (emit_debug_insn_after): Likewise.
8556         (set_insn_deleted): Likewise for param.
8558 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
8560         PR target/85358
8561         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
8562         floating point modes, so that IFmode is numerically greater than
8563         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
8564         to declare the ordering.  This prevents IFmode from being
8565         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
8566         machine.  Include rs6000-modes.h to share the fractional values
8567         between genmodes* and the rest of the compiler.
8568         (IFmode): Likewise.
8569         (KFmode): Likewise.
8570         (TFmode): Likewise.
8571         * config/rs6000/rs6000-modes.h: New file.
8572         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
8573         meaning of rs6000_long_double_size so that 126..128 selects an
8574         appropriate 128-bit floating point type.
8575         (rs6000_option_override_internal): Likewise.
8576         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
8577         (TARGET_LONG_DOUBLE_128): Change the meaning of
8578         rs6000_long_double_size so that 126..128 selects an appropriate
8579         128-bit floating point type.
8580         (LONG_DOUBLE_TYPE_SIZE): Update comment.
8581         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
8582         source and destination to match the standard usage.
8583         (truncifkf2): Likewise.
8584         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
8585         ISA 2.07 to use an explicit clobber, instead of passing in a
8586         temporary.
8587         (copysign<mode>3_soft): Likewise.
8589 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
8591         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
8592         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
8593         (vect_slp_analyze_instance_dependence): Likewise.
8594         (vect_enhance_data_refs_alignment): Likewise.
8595         (vect_analyze_data_refs_alignment): Likewise.
8596         (vect_slp_analyze_and_verify_instance_alignment
8597         (vect_analyze_data_ref_accesses): Likewise.
8598         (vect_prune_runtime_alias_test_list): Likewise.
8599         (vect_analyze_data_refs): Likewise.
8600         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
8601         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
8602         (vect_analyze_scalar_cycles_1): Likewise.
8603         (vect_get_loop_niters): Likewise.
8604         (vect_analyze_loop_form_1): Likewise.
8605         (vect_update_vf_for_slp): Likewise.
8606         (vect_analyze_loop_operations): Likewise.
8607         (vect_analyze_loop): Likewise.
8608         (vectorizable_induction): Likewise.
8609         (vect_transform_loop): Likewise.
8610         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
8611         * tree-vect-slp.c (vect_analyze_slp): Likewise.
8612         (vect_make_slp_decision): Likewise.
8613         (vect_detect_hybrid_slp): Likewise.
8614         (vect_slp_analyze_operations): Likewise.
8615         (vect_slp_bb): Likewise.
8616         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
8617         (vectorizable_bswap): Likewise.
8618         (vectorizable_call): Likewise.
8619         (vectorizable_simd_clone_call): Likewise.
8620         (vectorizable_conversion): Likewise.
8621         (vectorizable_assignment): Likewise.
8622         (vectorizable_shift): Likewise.
8623         (vectorizable_operation): Likewise.
8624         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
8626 2018-06-18  Martin Sebor  <msebor@redhat.com>
8628         PR tree-optimization/81384
8629         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
8630         * builtins.c (expand_builtin_strnlen): New function.
8631         (expand_builtin): Call it.
8632         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
8633         * builtins.def (BUILT_IN_STRNLEN): New.
8634         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
8635         Warn for bounds in excess of maximum object size.
8636         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
8637         single-value ranges.  Handle strnlen.
8638         (handle_builtin_strlen): Handle strnlen.
8639         (strlen_check_and_optimize_stmt): Same.
8640         * doc/extend.texi (Other Builtins): Document strnlen.
8642 2018-06-18  Maya Rashish  <coypu@sdf.org>
8644         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
8645         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
8646         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
8648         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
8649         here to ...
8650         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
8652 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
8654         * tree.c (escaped_string::escape): Replace cast to char * by
8655         const_cast<char *> (unescaped).
8657 2018-06-18  Nick Clifton  <nickc@redhat.com>
8659         PR 84195
8660         * tree.c (escaped_string): New class.  Converts an unescaped
8661         string into its escaped equivalent.
8662         (warn_deprecated_use): Use the new class to convert the
8663         deprecation message, if present.
8664         (test_escaped_strings): New self test.
8665         (test_c_tests): Add test_escaped_strings.
8666         * doc/extend.texi (deprecated): Add a note that the
8667         deprecation message is affected by the -fmessage-length
8668         option, and that control characters will be escaped.
8669         (#pragma GCC error): Document this pragma.
8670         (#pragma GCC warning): Likewise.
8671         * doc/invoke.texi (-fmessage-length): Document this option's
8672         effect on the #warning and #error preprocessor directives and
8673         the deprecated attribute.
8675 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
8677         * tree.c (decl_value_expr_lookup): Revert latest change.
8678         (decl_value_expr_insert): Likewise.
8680 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
8682         * gimplify.c (nonlocal_vlas): Delete.
8683         (nonlocal_vla_vars): Likewise.
8684         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
8685         referenced VLAs.
8686         (gimplify_body): Do not create and destroy nonlocal_vlas.
8687         * tree-nested.c: Include diagnostic.h.
8688         (use_pointer_in_frame): Tweak.
8689         (lookup_field_for_decl): Add assertion and declare the transformation.
8690         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
8691         internal error when the reference is in a wrong context.  Do not
8692         create a debug decl by default.
8693         (note_nonlocal_block_vlas): Delete.
8694         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
8695         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
8696         create a debug decl by default.
8697         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
8698         call is in a wrong context.
8699         (fixup_vla_decls): New function.
8700         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
8701         debug variables were created.
8702         * tree.c (decl_value_expr_lookup): Add checking assertion.
8703         (decl_value_expr_insert): Likewise.
8705 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
8707         PR middle-end/82479
8708         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
8709         * tree-scalar-evolution.c (interpret_expr): Likewise.
8710         (expression_expensive_p): Likewise.
8711         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
8712         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
8713         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
8714         (ssa_defined_by_minus_one_stmt_p): New.
8716 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
8718         PR middle-end/64946
8719         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
8720         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
8721         * dojump.c (do_jump): Likewise.
8722         * expr.c (expand_expr_real_2): Check operand type's sign.
8723         * fold-const.c (const_unop): Handle ABSU_EXPR.
8724         (fold_abs_const): Likewise.
8725         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
8726         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
8727         (strip_sign_op_1): Likesise.
8728         * match.pd: Add new pattern to generate ABSU_EXPR.
8729         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
8730         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
8731         * tree-eh.c (operation_could_trap_helper_p): Likewise.
8732         * tree-inline.c (estimate_operator_cost): Likewise.
8733         * tree-pretty-print.c (dump_generic_node): Likewise.
8734         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
8735         * tree.def (ABSU_EXPR): New.
8737 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
8739         PR middle-end/86095
8740         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
8741         documented as preserved for backward compatibility only.
8742         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
8744         PR rtl-optimization/86108
8745         * bb-reorder.c (create_forwarder_block): Renamed to ...
8746         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
8747         jump from new landing pad to the second part.
8748         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
8749         Adjust callers.
8751 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
8753         PR middle-end/85878
8754         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
8755         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
8756         Only call store_expr for halves if the mode is the same.
8758         PR middle-end/86123
8759         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
8760         Fix up comment formatting.
8762 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8764         * typed-splay-tree.h (typed_splay_tree::remove): New function.
8765         (typed_splay_tree::closure,
8766         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
8767         (typed_splay_tree::typed_splay_tree,
8768         typed_splay_tree::operator =): Declared private.
8769         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
8770         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
8771         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
8772         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
8773         typed_splay_tree::splay_tree_splay,
8774         typed_splay_tree::splay_tree_foreach_helper,
8775         typed_splay_tree::splay_tree_insert,
8776         typed_splay_tree::splay_tree_remove,
8777         typed_splay_tree::splay_tree_lookup,
8778         typed_splay_tree::splay_tree_predecessor,
8779         typed_splay_tree::splay_tree_successor,
8780         typed_splay_tree::splay_tree_min,
8781         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
8782         (typed_splay_tree::root, typed_splay_tree::comp,
8783         typed_splay_tree::delete_key,
8784         typed_splay_tree::delete_value): New data members.
8785         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
8786         typed_splay_tree::remove.
8788 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
8790         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
8791         -mginv and -mno-ginv to the assembler.
8792         * config/mips/mips.opt (-mcrc): New option.
8793         (-mginv): Likewise.
8794         * doc/invoke.text (-mcrc): Document.
8795         (-mginv): Likewise.
8797 2018-06-15  Nick Clifton  <nickc@redhat.com>
8799         PR 84195
8800         * tree.c (escaped_string): New class.  Converts an unescaped
8801         string into its escaped equivalent.
8802         (warn_deprecated_use): Use the new class to convert the
8803         deprecation message, if present.
8804         (test_escaped_strings): New self test.
8805         (test_c_tests): Add test_escaped_strings.
8806         * doc/extend.texi (deprecated): Add a note that the
8807         deprecation message is affected by the -fmessage-length
8808         option, and that control characters will be escaped.
8809         (#pragma GCC error): Document this pragma.
8810         (#pragma GCC warning): Likewise.
8811         * doc/invoke.texi (-fmessage-length): Document this option's
8812         effect on the #warning and #error preprocessor directives and
8813         the deprecated attribute.
8815 2018-06-15  Richard Biener  <rguenther@suse.de>
8817         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
8818         here, also noting vector size used.
8819         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
8820         size used in MSG_OPTIMIZED_LOCATIONS dump.
8821         (pass_slp_vectorize::execute): Adjust.
8823 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
8825         PR target/85968
8826         * config/arc/arc.c (arc_return_address_register): Fix
8827         if-condition.
8829 2018-06-15  Richard Biener  <rguenther@suse.de>
8831         PR middle-end/86159
8832         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
8833         leave useless conversion stripping to force_gimple_operand_gsi.
8834         (gimplify_build2): Likewise.
8835         (gimplify_build1): Likewise.
8837 2018-06-15  Richard Biener  <rguenther@suse.de>
8839         PR middle-end/86076
8840         * tree-cfg.c (move_stmt_op): unshare invariant addresses
8841         before adjusting their block.
8843 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
8845         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
8846         multilibs for *-*-rtems*.
8847         * config/riscv/t-rtems: New file.
8849 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
8851         PR middle-end/86122
8852         * match.pd ((A +- CST1) +- CST2): Punt if last resort
8853         unsigned_type_for returns NULL.
8855         PR target/85945
8856         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
8857         subregs of multi-word pseudos unless the float mode has word size.
8859 2018-06-14  Richard Biener  <rguenther@suse.de>
8861         PR middle-end/86139
8862         * tree-vect-generic.c (build_word_mode_vector_type): Remove
8863         duplicate and harmful type_hash_canon.
8864         * tree.c (type_hash_canon): Assert we didn't find ourselves.
8866 2018-06-14  Richard Biener  <rguenther@suse.de>
8868         PR ipa/86124
8869         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
8870         NULL cgraph_node.
8872 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
8874         * config/rtems.h (STDINT_LONG32): Define.
8876 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
8877             Prachi Godbole  <prachi.godbole@imgtec.com>
8879         * config/mips/mips-cpus.def: Define P6600.
8880         * config/mips/mips-tables.opt: Regenerate.
8881         * config/mips/mips.c (mips_ucbranch_type): New enum.
8882         (mips_rtx_cost_data): Add support for P6600.
8883         (mips_issue_rate): Likewise.
8884         (mips_multipass_dfa_lookahead): Likewise.
8885         (mips_avoid_hazard): Likewise.
8886         (mips_reorg_process_insns): Likewise.
8887         (mips_classify_branch_p6600): New function.
8888         * config/mips/mips.h (TUNE_P6600): New define.
8889         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
8890         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
8891         * config/mips/mips.md: Include p6600.md.
8892         (processor): Add p6600.
8893         * config/mips/p6600.md: New file.
8894         * doc/invoke.texi: Add p6600 to supported architectures.
8896 2018-06-13  Martin Sebor  <msebor@redhat.com>
8898         PR tree-optimization/86114
8899         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
8900         of integer types.
8901         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
8903 2018-06-13  Richard Biener  <rguenther@suse.de>
8905         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
8906         Properly set vector type of the intermediate stmt.
8907         * tree-vect-stmts.c (vectorizable_operation): The destination
8908         var always has vectype_out type.
8910 2018-06-13  Jeff Law  <law@redhat.com>
8912         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
8913         integer 0 for argument to print_rtl_with_bb.
8914         (rl78_reorg): Likewise.
8916 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
8918         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
8919         from rtx to rtx_insn *.
8920         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
8921         "label".
8922         (add_sched_insns_for_speculation): Likewise for local "target",
8923         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8924         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
8925         from rtx_insn ** to rtx_code_label **.
8926         (reorg_emit_nops): Likewise.
8927         (c6x_reorg): Likewise for local "call_labels".
8928         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
8929         rtx to rtx_insn *.
8930         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
8931         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
8932         the loops over LABEL_REFS.
8933         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
8934         braf_label.
8935         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
8936         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
8937         (split_branches): Strengthen local "olabel" from rtx to
8938         rtx_insn *, adding a safe_as_a cast.
8939         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
8940         to "rtx_insn *".
8941         (add_insn_after): Likewise for first two params.
8942         (add_insn_before): Likewise.
8943         (remove_insn): Likewise for param.
8944         (emit_pattern_before_noloc): Likewise for second and third params.
8945         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
8946         (emit_call_insn_before_noloc): Likewise.
8947         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
8948         to "rtx_insn *".
8949         (emit_barrier_before): Likewise.
8950         (emit_label_before): Strengthen "label" param from "rtx" to
8951         "rtx_code_label *".  Strengthen "before" param from "rtx" to
8952         "rtx_insn *".
8953         (emit_insn_after_1): Strengthen "after" param from "rtx" to
8954         "rtx_insn *".
8955         (emit_pattern_after_noloc): Likewise.
8956         (emit_insn_after_noloc): Likewise.
8957         (emit_jump_insn_after_noloc): Likewise.
8958         (emit_call_insn_after_noloc): Likewise.
8959         (emit_debug_insn_after_noloc): Likewise.
8960         (emit_barrier_after): Likewise.
8961         (emit_label_after): Likewise for both params.
8962         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
8963         "loc" param from "int" to "location_t".
8964         (emit_insn_after_setloc): Likewise.
8965         (emit_jump_insn_after_setloc): Likewise.
8966         (emit_call_insn_after_setloc): Likewise.
8967         (emit_debug_insn_after_setloc): Likewise.
8968         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
8969         "loc" param from "int" to "location_t".
8970         (emit_pattern_before): Convert NULL_RTX to NULL.
8971         (emit_insn_before_setloc): Convert "loc" param from "int" to
8972         "location_t".
8973         (emit_jump_insn_before_setloc): Likewise.
8974         (emit_call_insn_before_setloc): Likewise.
8975         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
8976         rtx_insn *.  Convert "loc" param from "int" to "location_t".
8977         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
8978         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
8979         Convert 3rd param from "int" to "location_t".
8980         (emit_barrier_before, emit_barrier_after, next_real_insn):
8981         Strengthen param from rtx to rtx_insn *.
8982         (emit_label_before): Strengthen 1st param from "rtx" to
8983         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
8984         "rtx_insn *".
8985         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
8986         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
8987         Strengthen 2nd param from "rtx" to "rtx_insn *".
8988         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
8989         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
8990         Likewise. Convert 3rd param from "int" to "location_t".
8991         (emit_label_after): Strengthen 1st param from "rtx" to
8992         "rtx_code_label *".
8993         (next_real_insn, remove_insn): Strengthen param from "rtx" to
8994         "rtx_insn *".
8995         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
8996         from "rtx" to "rtx_insn *".
8998 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
9000         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
9001         bodies streamed in with -Q.
9002         * dumpfile.c (dump_files): Add lto-stream-out dump file.
9003         * dumpfile.h (tree_dump_index): Add lto_stream_out.
9004         * gimple-streamer-out.c: Include gimple-pretty-print.h
9005         (output_bb): Dump stmts streamed.
9006         * lto-section-out.c: Include print-tree.h
9007         (lto_begin_section): Dump sections created.
9008         (lto_output_decl_index): Dump decl encoded.
9009         * lto-streamer-out.c: Include print-tree.h
9010         (create_output_block): Dump output block created.
9011         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
9012         (output_function): Dump function output.
9013         (output_constructor): Dump constructor streamed.
9014         (write_global_stream): Output indexes encoded.
9015         (produce_asm_for_decls): Dump streams encoded.
9016         * lto-streamer.c (streamer_dump_file): New global var.
9017         * lto-streamer.h (streamer_dump_file): Declare.
9018         * passes.c (ipa_write_summaries): Initialize streamer dump.
9019         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
9020         in.
9022 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
9024         PR target/86048
9025         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
9026         offsets for register save directives.  Emit a second batch of save
9027         directives, if need be, when the function accesses prior frames.
9029 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9031         * config/arc/fpu.md (fmasf4): Force operand to register.
9032         (fnmasf4): Likewise.
9034 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9036         * config/arc/arc-protos.h (arc_pad_return): Remove.
9037         * config/arc/arc.c (machine_function): Remove force_short_suffix
9038         and size_reason.
9039         (arc_print_operand): Adjust printing of '&'.
9040         (arc_verify_short): Remove conditional printing of short suffix.
9041         (arc_final_prescan_insn): Remove reference to size_reason.
9042         (pad_return): New function.
9043         (arc_reorg): Call pad_return.
9044         (arc_pad_return): Remove.
9045         (arc_init_machine_status): Remove reference to force_short_suffix.
9046         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
9047         (attr length): When attribute iscompact is true force to 2
9048         regardless; in the case of maybe check if we want to force the
9049         instruction to have 4 bytes length.
9050         (nopv): Change it to generate 4 byte long nop as well.
9051         (blockage): New pattern.
9052         (simple_return): Remove call to arc_pad_return.
9053         (p_return_i): Likewise.
9055 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9057         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
9059 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9061         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
9062         ARC cores.
9064 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9066         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
9067         for ARC700 and ARCv2.
9069 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
9071         PR target/86076
9072         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
9073         operands[2] instead of operands[1].
9076 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
9078         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
9079         case, check whether the outer register overlaps an unallocatable
9080         register, not just whether it fits the required class.
9082 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
9084         * poly-int.h (can_div_trunc_p): Add new overload in which all values
9085         are poly_ints.
9086         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
9087         (memrefs_conflict_p): Likewise.
9088         (init_alias_analysis): Likewise.
9089         * cfgexpand.c (expand_debug_expr): Likewise.
9090         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
9091         * cse.c (fold_rtx): Likewise.
9092         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
9093         * expr.c (emit_block_move_hints): Likewise.
9094         (clear_storage_hints, push_block, emit_push_insn): Likewise.
9095         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
9096         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
9097         (emit_group_store): Likewise.
9098         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
9099         to read the PRE/POST_MODIFY increment.
9100         * calls.c (store_one_arg): Use strip_offset.
9101         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
9102         poly_int_rtx_p.
9103         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
9104         by a VEC_SELECT.
9105         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
9106         (simplify_binary_operation_1): Extend CONST_INT handling to
9107         poly_int_rtx_p.
9108         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
9109         than a HOST_WIDE_INT.
9110         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
9111         poly_int64.
9112         (adjust_mems, add_stores): Update accodingly.
9113         (vt_canonicalize_addr): Track polynomial offsets.
9114         (emit_note_insn_var_location): Likewise.
9115         (vt_add_function_parameter): Likewise.
9116         (vt_initialize): Likewise.
9118 2018-06-12  Jeff Law  <law@redhat.com>
9120         * config.gcc (alpha*-*-freebsd*): Remove.
9121         * config/alpha/freebsd.h: Remove.
9123 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
9125         PR other/69968
9126         * spellcheck-tree.c (levenshtein_distance): Rename to...
9127         (get_edit_distance): ...this, and update for underlying renaming.
9128         * spellcheck-tree.h (levenshtein_distance): Rename to...
9129         (get_edit_distance): ...this.
9130         * spellcheck.c (levenshtein_distance): Rename to...
9131         (get_edit_distance): ...this.  Convert from Levenshtein distance
9132         to Damerau-Levenshtein distance by supporting transpositions of
9133         adjacent characters.  Rename "v1" to "v_next" and "v0" to
9134         "v_one_ago".
9135         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
9136         (selftest::test_edit_distance_unit_test_oneway): ...this, and
9137         update for underlying renaming.
9138         (selftest::levenshtein_distance_unit_test): Rename to...
9139         (selftest::test_get_edit_distance_unit): ...this, and update for
9140         underlying renaming.
9141         (selftest::test_find_closest_string): Add example from PR 69968
9142         where transposition helps
9143         (selftest::test_metric_conditions): Update for renaming.
9144         (selftest::test_metric_conditions): Likewise.
9145         (selftest::spellcheck_c_tests): Likewise.
9146         * spellcheck.h (levenshtein_distance): Rename both overloads to...
9147         (get_edit_distance): ...this.
9148         (best_match::consider): Update for renaming.
9150 2018-06-12  Martin Sebor  <msebor@redhat.com>
9152         PR tree-optimization/85259
9153         * builtins.c (compute_objsize): Handle constant offsets.
9154         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
9155         true iff a warning has been issued.
9156         * gimple.h (gimple_nonartificial_location): New function.
9157         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
9158         gimple_nonartificial_location and handle -Wno-system-headers.
9159         (handle_builtin_stxncpy): Same.
9161 2018-06-12  Martin Sebor  <msebor@redhat.com>
9163         PR c/85931
9164         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
9166 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
9168         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
9169         BUILTIN_VEC_XST entries for pointer to double and long long.
9171 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
9173         PR target/85990
9174         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9175         Update comments.
9176         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
9177         Likewise.
9179 2018-06-12  Martin Liska  <mliska@suse.cz>
9181         * doc/options.texi: Document IntegerRange.
9183 2018-06-12  Martin Liska  <mliska@suse.cz>
9185         * config/i386/i386.opt: Make MPX-related options as Deprecated.
9186         * opt-functions.awk: Handle Deprecated flag.
9187         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
9188         and report error.
9189         (read_cmdline_option): Report warning for a deprecated option.
9190         * opts.h (struct cl_option): Add new field cl_deprecated.
9191         (CL_ERR_DEPRECATED): New.
9193 2018-06-12  Martin Liska  <mliska@suse.cz>
9195         * doc/options.texi: Document Deprecated option flag.
9197 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9199         * config/arc/arc-arch.h (arc_extras): New enum.
9200         (arc_cpu_t):Add field extra.
9201         (arc_cpu_types): Consider the extras.
9202         * config/arc/arc-cpus.def: Add extras info.
9203         * config/arc/arc-opts.h (processor_type): Consider extra field.
9204         * config/arc/arc.c (arc_override_options): Handle extra field.
9206 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
9208         * config/arc/arc-arch.h: Update ARC_OPTX macro.
9209         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
9210         field.
9211         * config/arc/arc.c (arc_init): Update pic warning.
9212         (irq_range): Update irq range parsing warnings.
9213         (arc_override_options): Update various warning messages.
9214         (arc_handle_aux_attribute): Likewise.
9216 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
9218         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
9220 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
9222         * doc/sourcebuild.texi: Document usage of line number 0 in verify
9223         compiler messages directives.
9225 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
9227         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
9228         * config/mips/mips-tables.opt: Regenerate.
9229         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
9230         mips64r6.
9231         * doc/invoke.texi: Document -march=i6500.
9233 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
9235         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
9236         (i6400_gpmul): Add cpu_unit.
9237         (i6400_gpdiv): Likewise.
9238         (i6400_msa_add_d): Update reservations.
9239         (i6400_msa_int_add) Likewise.
9240         (i6400_msa_short_logic3) Likewise.
9241         (i6400_msa_short_logic2) Likewise.
9242         (i6400_msa_short_logic) Likewise.
9243         (i6400_msa_move) Likewise.
9244         (i6400_msa_cmp) Likewise.
9245         (i6400_msa_short_float2) Likewise.
9246         (i6400_msa_div_d) Likewise.
9247         (i6400_msa_long_logic1) Likewise.
9248         (i6400_msa_long_logic2) Likewise.
9249         (i6400_msa_mult) Likewise.
9250         (i6400_msa_long_float2) Likewise.
9251         (i6400_msa_long_float4) Likewise.
9252         (i6400_msa_long_float5) Likewise.
9253         (i6400_msa_long_float8) Likewise.
9254         (i6400_fpu_fadd): Include frint type.
9255         (i6400_fpu_store): New define_insn_reservation.
9256         (i6400_fpu_load): Likewise.
9257         (i6400_fpu_move): Likewise.
9258         (i6400_fpu_fcmp): Likewise.
9259         (i6400_fpu_fmadd): Likewise.
9260         (i6400_int_mult): Include imul3nc type and update reservation.
9261         (i6400_int_div): Include idiv3 type and update reservation.
9262         (i6400_int_load): Update to check type not move_type.
9263         (i6400_int_store): Likewise.
9264         (i6400_int_prefetch): Set zero latency.
9266 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
9268         * gcc.c: Document new %@{...} sequence.
9269         (LINK_COMMAND_SPEC): Use it for the -L switches.
9270         (cpp_unique_options): Use it for the -I switches.
9271         (at_file_argbuf): New global variable.
9272         (in_at_file): Likewise.
9273         (alloc_args): Create at_file_argbuf.
9274         (clear_args): Truncate at_file_argbuf.
9275         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
9276         (open_at_file): New function.
9277         (close_at_file): Likewise.
9278         (create_at_file): Delete.
9279         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
9280         <'o'>: Likewise.
9281         <'@'>: New case.
9282         (validate_switches_from_spec): Deal with %@{...} sequence.
9283         (validate_switches): Likewise.
9284         (driver::finalize): Call clear_args.
9286 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
9288         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
9290 2018-06-11  Martin Sebor  <msebor@redhat.com>
9292         * doc/invoke.texi (-Wall): List -Wc++17-compat.
9293         (Wno-class-memaccess): Add @opindex.
9294         (Wno-templates, Wno-multiple-inheritance): Same.
9295         (Wno-virtual-inheritance, Wno-namespaces): Same.
9296         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
9297         (Wno-format-overflow, Wno-format-truncation): Same.
9298         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
9299         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
9300         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
9301         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
9302         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
9303         (Wno-misspelled-isr): Same.
9305 2018-06-11  Martin Sebor  <msebor@redhat.com>
9307         * PR tree-optimization/86083
9308         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
9310 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
9312         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
9314 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
9316         PR target/85755
9317         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
9318         on the correct operand.
9319         (*movdi_internal64): Ditto.
9321 2018-06-11  Martin Liska  <mliska@suse.cz>
9323         PR tree-optimization/86089
9324         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
9326 2018-06-11  Julia Koval  <julia.koval@intel.com>
9328         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
9329         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
9330         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
9332 2018-06-11  Olivier Hainque  <hainque@adacore.com>
9334         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
9335         for Ada with strict dwarf2.
9337 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
9339         PR target/85755
9340         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
9341         addresses.
9343 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
9345         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
9347 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
9349         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
9350         TARGET_ELF.
9352 2018-06-08  Martin Liska  <mliska@suse.cz>
9354         * tree-cfg.h (debug_function): Fix argument type to match
9355         implementation.
9357 2018-06-08  Martin Liska  <mliska@suse.cz>
9359         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
9360         Remove usage of MPX-related (and removed) fields.
9361         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
9363 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
9365         * cfg.c (debug): Use TDF_NONE rather than 0.
9366         * cfghooks.c (debug): Likewise.
9367         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
9368         (struct dump_option_value_info): Convert to...
9369         (struct kv_pair): ...this template type.
9370         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
9371         rather than 0.
9372         (optinfo_verbosity_options): Likewise.
9373         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
9374         OPTGROUP_NONE.
9375         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
9376         than int for "optgroup_flags" param.
9377         (dump_generic_expr_loc): Use dump_flags_t rather than int for
9378         "dump_kind" param.
9379         (dump_dec): Likewise.
9380         (dump_finish): Use TDF_NONE rather than 0.
9381         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
9382         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
9383         than 0.  Update for change to option_ptr.
9384         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
9385         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
9386         0.  Update for changes to optinfo_verbosity_options and
9387         optgroup_options.
9388         (opt_info_switch_p): Convert optgroup_flags from int to
9389         optgroup_flags_t.
9390         (dump_basic_block): Use dump_flags_t rather than int
9391         for "dump_kind" param.
9392         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
9393         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
9394         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
9395         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
9396         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
9397         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
9398         TDF_NONE): Convert from macros to...
9399         (enum dump_flag): ...this new enum.
9400         (dump_flags_t): Update to use enum.
9401         (operator|, operator&, operator~, operator|=, operator&=):
9402         Implement for dump_flags_t.
9403         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
9404         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
9405         Convert from macros to...
9406         (enum optgroup_flag): ...this new enum.
9407         (optgroup_flags_t): New typedef.
9408         (operator|, operator|=): Implement for optgroup_flags_t.
9409         (struct dump_file_info): Convert field "alt_flags" to
9410         dump_flags_t.  Convert field "optgroup_flags" to
9411         optgroup_flags_t.
9412         (dump_basic_block): Use dump_flags_t rather than int for param.
9413         (dump_generic_expr_loc): Likewise.
9414         (dump_dec): Likewise.
9415         (dump_register): Convert param "optgroup_flags" to
9416         optgroup_flags_t.
9417         (opt_info_enable_passes): Likewise.
9418         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
9419         than 0.
9420         * gimple-pretty-print.c (debug): Likewise.
9421         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
9422         (merged_store_group::apply_stores): Likewise.
9423         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
9424         * gimple.c (verify_gimple_pp): Likewise.
9425         * graphite-poly.c (print_pbb_body): Likewise.
9426         * passes.c (pass_manager::register_one_dump_file): Convert
9427         local "optgroup_flags" to optgroup_flags_t.
9428         * print-tree.c (print_node): Use TDF_NONE rather than 0.
9429         (debug): Likewise.
9430         (debug_body): Likewise.
9431         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
9432         to optgroup_flags_t.
9433         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
9434         than 0.
9435         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
9436         (convert_mult_to_fma): Likewise.
9437         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
9438         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
9439         * tree-vect-data-refs.c (dump_lower_bound): Convert param
9440         "dump_kind" to dump_flags_t.
9442 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
9444         * config/rs6000/rs6000.c (min, max): Delete.
9446 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
9448         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
9449         -mabi=spe and -mabi=no-spe.
9451 2018-06-08  Martin Liska  <mliska@suse.cz>
9453         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
9454         where we expect an existing summary.
9456 2018-06-08  Martin Liska  <mliska@suse.cz>
9458         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
9459         * ipa-inline.h (estimate_edge_growth): Likewise.
9461 2018-06-08  Martin Liska  <mliska@suse.cz>
9463         * cgraph.c (function_version_hasher::hash): Use
9464         cgraph_node::get_uid ().
9465         (function_version_hasher::equal):
9466         * cgraph.h (cgraph_node::get_uid): New method.
9467         * ipa-inline.c (update_caller_keys): Use
9468         cgraph_node::get_uid ().
9469         (update_callee_keys): Likewise.
9470         * ipa-utils.c (searchc): Likewise.
9471         (ipa_reduced_postorder): Likewise.
9472         * lto-cgraph.c (input_node): Likewise.
9473         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
9474         * symbol-summary.h (symtab_insertion): Likewise.
9475         (symtab_removal): Likewise.
9476         (symtab_duplication): Likewise.
9477         * tree-pretty-print.c (dump_function_header): Likewise.
9478         * tree-sra.c (convert_callers_for_node): Likewise.
9480 2018-06-08  Martin Liska  <mliska@suse.cz>
9482         * cgraph.c (symbol_table::create_edge): Always assign a new
9483         unique number.
9484         (symbol_table::free_edge): Do not recycle numbers.
9485         * cgraph.h (cgraph_edge::get): New method.
9486         * symbol-summary.h (symtab_removal): Use it.
9487         (symtab_duplication): Likewise.
9488         (call_summary::hashable_uid): Remove.
9490 2018-06-08  Martin Liska  <mliska@suse.cz>
9492         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
9493         (initialize_growth_caches): Remove.
9494         (free_growth_caches): Likewise.
9495         (do_estimate_edge_time): Use edge_growth_cache.
9496         (do_estimate_edge_size): Likewise.
9497         (do_estimate_edge_hints): Likewise.
9498         * ipa-inline.c (reset_edge_caches): Likewise.
9499         (recursive_inlining): Likewise.
9500         (inline_small_functions): Likewise.
9501         * ipa-inline.h (initialize_growth_caches): Remove.
9502         (estimate_edge_size): Likewise.
9503         (estimate_edge_time): Likewise.
9504         (estimate_edge_hints): Likewise.
9505         (reset_edge_growth_cache): Likewise.
9506         * symbol-summary.h (call_summary::remove): New method.
9508 2018-06-08  Martin Liska  <mliska@suse.cz>
9510         * ipa-cp.c (class edge_clone_summary): New summary.
9511         (grow_edge_clone_vectors): Remove.
9512         (ipcp_edge_duplication_hook): Remove.
9513         (class edge_clone_summary_t): New call_summary class.
9514         (ipcp_edge_removal_hook): Remove.
9515         (edge_clone_summary_t::duplicate): New function.
9516         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
9517         (create_specialized_node): Likewise.
9518         (ipcp_driver): Initialize edge_clone_summaries and do not
9519         register hooks.
9521 2018-06-08  Martin Liska  <mliska@suse.cz>
9523         * symbol-summary.h (get): New function.
9524         (call_summary::m_initialize_when_cloning): New class member.
9526 2018-06-08  Martin Liska  <mliska@suse.cz>
9528         * cgraph.c (cgraph_node::remove): Do not recycle uid.
9529         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
9530         (symbol_table::allocate_cgraph_symbol): Do not set uid.
9531         * passes.c (uid_hash_t): Record removed_nodes by their uids.
9532         (remove_cgraph_node_from_order): Use the removed_nodes set.
9533         (do_per_function_toporder): Likwise.
9534         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
9535         instead of summary_uid.
9536         (symtab_removal): Likewise.
9537         (symtab_duplication): Likewise.
9539 2018-06-08  Martin Liska  <mliska@suse.cz>
9541         * ipa-cp.c (ipcp_store_bits_results): Use
9542         ipcp_transformation_sum.
9543         (ipcp_store_vr_results): Likewise.
9544         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
9545         to ...
9546         (ipcp_transformation_initialize): ... this.
9547         (ipa_set_node_agg_value_chain):
9548         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
9549         (write_ipcp_transformation_info): Likewise.
9550         (read_ipcp_transformation_info): Likewise.
9551         (ipcp_update_bits): Likewise.
9552         (ipcp_update_vr): Likewise.
9553         (ipcp_transform_function): Likewise.
9554         * ipa-prop.h: Rename ipcp_transformation_summary to
9555         ipcp_transformation.
9556         (class ipcp_transformation_t): New function summary.
9557         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
9558         (ipa_get_agg_replacements_for_node): Likewise.
9560 2018-06-08  Martin Liska  <mliska@suse.cz>
9562         * ipa-pure-const.c (struct funct_state_d): Do it class instead
9563         of struct.
9564         (class funct_state_summary_t): New function_summary class.
9565         (has_function_state): Remove.
9566         (get_function_state): Likewise.
9567         (set_function_state): Likewise.
9568         (add_new_function): Likewise.
9569         (funct_state_summary_t::insert): New function.
9570         (duplicate_node_data): Remove.
9571         (remove_node_data): Remove.
9572         (funct_state_summary_t::duplicate): New function.
9573         (register_hooks): Create new funct_state_summaries.
9574         (pure_const_generate_summary): Use it.
9575         (pure_const_write_summary): Likewise.
9576         (pure_const_read_summary): Likewise.
9577         (propagate_pure_const): Likewise.
9578         (propagate_nothrow): Likewise.
9579         (dump_malloc_lattice): Likewise.
9580         (propagate_malloc): Likewise.
9581         (execute): Do not register hooks, just remove summary
9582         instead.
9583         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
9584         constructor.
9586 2018-06-08  Martin Liska  <mliska@suse.cz>
9588         * ipa-reference.c (remove_node_data): Remove.
9589         (duplicate_node_data): Likewise.
9590         (class ipa_ref_var_info_summary_t): New class.
9591         (class ipa_ref_opt_summary_t): Likewise.
9592         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
9593         (get_reference_optimization_summary): Use
9594         ipa_ref_opt_sum_summaries.
9595         (set_reference_vars_info): Remove.
9596         (set_reference_optimization_summary): Likewise.
9597         (ipa_init): Create summaries.
9598         (init_function_info): Use function summary.
9599         (ipa_ref_opt_summary_t::duplicate): New function.
9600         (ipa_ref_opt_summary_t::remove): New function.
9601         (get_read_write_all_from_node): Fix GNU coding style.
9602         (propagate): Use function summary.
9603         (write_node_summary_p): Fix GNU coding style.
9604         (stream_out_bitmap): Likewise.
9605         (ipa_reference_read_optimization_summary): Use function summary.
9606         (ipa_reference_c_finalize): Do not release hooks.
9608 2018-06-08  Martin Liska  <mliska@suse.cz>
9610         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
9611         (analyze_function_body): Extract multiple calls of get_create.
9612         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9613         * ipa-inline.c (recursive_inlining): Use ::get method.
9614         * ipa-inline.h (estimate_edge_growth): Likewise.
9616 2018-06-08  Martin Liska  <mliska@suse.cz>
9618         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
9619         HSA_INVALID.
9620         (hsa_function_summary::hsa_function_summary): Use the new enum
9621         value.
9622         (hsa_gpu_implementation_p): Use hsa_summaries::get.
9623         * hsa-gen.c (hsa_get_host_function): Likewise.
9624         (get_brig_function_name): Likewise.
9625         * ipa-hsa.c (process_hsa_functions): Likewise.
9626         (ipa_hsa_write_summary): Likewise.
9627         * symbol-summary.h (symtab_duplication): Use ::get function/
9628         (get): New function.
9630 2018-06-08  Martin Liska  <mliska@suse.cz>
9632         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
9633         of get.
9634         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
9635         (hsa_register_kernel): Likewise.
9636         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
9637         * hsa-gen.c (hsa_get_host_function): Likewise.
9638         (get_brig_function_name): Likewise.
9639         (generate_hsa): Likewise.
9640         (pass_gen_hsail::execute): Likewise.
9641         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
9642         (devirtualization_time_bonus): Likewise.
9643         (ipcp_propagate_stage): Likewise.
9644         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
9645         (edge_set_predicate): Likewise.
9646         (evaluate_conditions_for_known_args): Likewise.
9647         (evaluate_properties_for_edge): Likewise.
9648         (ipa_fn_summary::reset): Likewise.
9649         (ipa_fn_summary_t::duplicate): Likewise.
9650         (dump_ipa_call_summary): Likewise.
9651         (ipa_dump_fn_summary): Likewise.
9652         (analyze_function_body): Likewise.
9653         (compute_fn_summary): Likewise.
9654         (estimate_edge_devirt_benefit): Likewise.
9655         (estimate_edge_size_and_time): Likewise.
9656         (estimate_calls_size_and_time): Likewise.
9657         (estimate_node_size_and_time): Likewise.
9658         (inline_update_callee_summaries): Likewise.
9659         (remap_edge_change_prob): Likewise.
9660         (remap_edge_summaries): Likewise.
9661         (ipa_merge_fn_summary_after_inlining): Likewise.
9662         (ipa_update_overall_fn_summary): Likewise.
9663         (read_ipa_call_summary): Likewise.
9664         (inline_read_section): Likewise.
9665         (write_ipa_call_summary): Likewise.
9666         (ipa_fn_summary_write): Likewise.
9667         (ipa_free_fn_summary): Likewise.
9668         * ipa-hsa.c (process_hsa_functions): Likewise.
9669         (ipa_hsa_write_summary): Likewise.
9670         (ipa_hsa_read_section): Likewise.
9671         * ipa-icf.c (sem_function::merge): Likewise.
9672         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
9673         (do_estimate_edge_time): Likewise.
9674         (estimate_size_after_inlining): Likewise.
9675         (estimate_growth): Likewise.
9676         (growth_likely_positive): Likewise.
9677         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
9678         (inline_call): Likewise.
9679         * ipa-inline.c (caller_growth_limits): Likewise.
9680         (can_inline_edge_p): Likewise.
9681         (can_inline_edge_by_limits_p): Likewise.
9682         (compute_uninlined_call_time): Likewise.
9683         (compute_inlined_call_time): Likewise.
9684         (want_inline_small_function_p): Likewise.
9685         (edge_badness): Likewise.
9686         (update_caller_keys): Likewise.
9687         (update_callee_keys): Likewise.
9688         (recursive_inlining): Likewise.
9689         (inline_small_functions): Likewise.
9690         (inline_to_all_callers_1): Likewise.
9691         (dump_overall_stats): Likewise.
9692         (early_inline_small_functions): Likewise.
9693         (early_inliner): Likewise.
9694         * ipa-inline.h (estimate_edge_growth): Likewise.
9695         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
9696         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
9697         * ipa-prop.h (IPA_NODE_REF): Likewise.
9698         (IPA_EDGE_REF): Likewise.
9699         * ipa-pure-const.c (malloc_candidate_p): Likewise.
9700         (propagate_malloc): Likewise.
9701         * ipa-split.c (execute_split_functions): Likewise.
9702         * symbol-summary.h: Rename get to get_create.
9703         (get): Likewise.
9704         (get_create): Likewise.
9705         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
9707 2018-06-08  Martin Liska  <mliska@suse.cz>
9709         * symbol-summary.h (release): Move definition out of class
9710         declaration.
9711         (symtab_removal): Likewise.
9712         (symtab_duplication): Likewise.
9714 2018-06-08  Martin Liska  <mliska@suse.cz>
9716         * symbol-summary.h (function_summary): Move constructor
9717         implementation out of class declaration.
9718         (release): Likewise.
9719         (symtab_insertion): Likewise.
9720         (symtab_removal): Likewise.
9721         (symtab_duplication): Likewise.
9722         (get): Likewise.
9724 2018-06-08  Martin Liska  <mliska@suse.cz>
9726         * Makefile.in: Remove support for MPX (macros, related functions,
9727         fields in cgraph_node, ...).
9728         * builtin-types.def (BT_BND): Likewise.
9729         (BT_FN_BND_CONST_PTR): Likewise.
9730         (BT_FN_CONST_PTR_BND): Likewise.
9731         (BT_FN_VOID_PTR_BND): Likewise.
9732         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
9733         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
9734         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
9735         (expand_builtin_mempcpy_with_bounds): Likewise.
9736         (expand_builtin_memset_with_bounds): Likewise.
9737         (expand_builtin_memset_args): Likewise.
9738         (std_expand_builtin_va_start): Likewise.
9739         (expand_builtin): Likewise.
9740         (expand_builtin_with_bounds): Likewise.
9741         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
9742         (DEF_LIB_BUILTIN_CHKP): Likewise.
9743         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
9744         (DEF_CHKP_BUILTIN): Likewise.
9745         (BUILT_IN_MEMCPY): Likewise.
9746         (BUILT_IN_MEMMOVE): Likewise.
9747         (BUILT_IN_MEMPCPY): Likewise.
9748         (BUILT_IN_MEMSET): Likewise.
9749         (BUILT_IN_STPCPY): Likewise.
9750         (BUILT_IN_STRCAT): Likewise.
9751         (BUILT_IN_STRCHR): Likewise.
9752         (BUILT_IN_STRCPY): Likewise.
9753         (BUILT_IN_STRLEN): Likewise.
9754         (BUILT_IN_MEMCPY_CHK): Likewise.
9755         (BUILT_IN_MEMMOVE_CHK): Likewise.
9756         (BUILT_IN_MEMPCPY_CHK): Likewise.
9757         (BUILT_IN_MEMSET_CHK): Likewise.
9758         (BUILT_IN_STPCPY_CHK): Likewise.
9759         (BUILT_IN_STRCAT_CHK): Likewise.
9760         (BUILT_IN_STRCPY_CHK): Likewise.
9761         * calls.c (store_bounds): Likewise.
9762         (emit_call_1): Likewise.
9763         (special_function_p): Likewise.
9764         (maybe_warn_nonstring_arg): Likewise.
9765         (initialize_argument_information): Likewise.
9766         (finalize_must_preallocate): Likewise.
9767         (compute_argument_addresses): Likewise.
9768         (expand_call): Likewise.
9769         * cfgexpand.c (expand_call_stmt): Likewise.
9770         (expand_return): Likewise.
9771         (expand_gimple_stmt_1): Likewise.
9772         (pass_expand::execute): Likewise.
9773         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
9774         (cgraph_node::remove): Likewise.
9775         (cgraph_node::dump): Likewise.
9776         (cgraph_node::verify_node): Likewise.
9777         * cgraph.h (chkp_function_instrumented_p): Likewise.
9778         (symtab_node::get_alias_target): Likewise.
9779         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
9780         (cgraph_local_p): Likewise.
9781         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
9782         (cgraph_edge::rebuild_references): Likewise.
9783         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
9784         (walk_polymorphic_call_targets): Likewise.
9785         (cgraph_node::expand_thunk): Likewise.
9786         (symbol_table::output_weakrefs): Likewise.
9787         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
9788         (ix86_handle_option): Likewise.
9789         * config/i386/constraints.md: Likewise.
9790         * config/i386/i386-builtin-types.def (BND): Likewise.
9791         (VOID): Likewise.
9792         (PVOID): Likewise.
9793         (ULONG): Likewise.
9794         * config/i386/i386-builtin.def (BDESC_END): Likewise.
9795         (BDESC_FIRST): Likewise.
9796         (BDESC): Likewise.
9797         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
9798         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
9799         * config/i386/i386.c (enum reg_class): Likewise.
9800         (ix86_target_string): Likewise.
9801         (ix86_option_override_internal): Likewise.
9802         (ix86_conditional_register_usage): Likewise.
9803         (ix86_valid_target_attribute_inner_p): Likewise.
9804         (ix86_set_indirect_branch_type): Likewise.
9805         (ix86_set_current_function): Likewise.
9806         (ix86_function_arg_regno_p): Likewise.
9807         (init_cumulative_args): Likewise.
9808         (ix86_function_arg_advance): Likewise.
9809         (ix86_function_arg): Likewise.
9810         (ix86_pass_by_reference): Likewise.
9811         (ix86_function_value_regno_p): Likewise.
9812         (ix86_function_value_1): Likewise.
9813         (ix86_function_value_bounds): Likewise.
9814         (ix86_return_in_memory): Likewise.
9815         (ix86_setup_incoming_vararg_bounds): Likewise.
9816         (ix86_va_start): Likewise.
9817         (indirect_thunk_need_prefix): Likewise.
9818         (print_reg): Likewise.
9819         (ix86_print_operand): Likewise.
9820         (ix86_expand_call): Likewise.
9821         (ix86_output_function_return): Likewise.
9822         (reg_encoded_number): Likewise.
9823         (BDESC_VERIFYS): Likewise.
9824         (ix86_init_mpx_builtins): Likewise.
9825         (ix86_init_builtins): Likewise.
9826         (ix86_emit_cmove): Likewise.
9827         (ix86_emit_move_max): Likewise.
9828         (ix86_expand_builtin): Likewise.
9829         (ix86_builtin_mpx_function): Likewise.
9830         (ix86_get_arg_address_for_bt): Likewise.
9831         (ix86_load_bounds): Likewise.
9832         (ix86_store_bounds): Likewise.
9833         (ix86_load_returned_bounds): Likewise.
9834         (ix86_store_returned_bounds): Likewise.
9835         (ix86_class_likely_spilled_p): Likewise.
9836         (ix86_hard_regno_mode_ok): Likewise.
9837         (x86_order_regs_for_local_alloc): Likewise.
9838         (ix86_mitigate_rop): Likewise.
9839         (ix86_bnd_prefixed_insn_p): Likewise.
9840         (ix86_mpx_bound_mode): Likewise.
9841         (ix86_make_bounds_constant): Likewise.
9842         (ix86_initialize_bounds): Likewise.
9843         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
9844         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
9845         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
9846         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
9847         (TARGET_CHKP_BOUND_MODE): Likewise.
9848         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
9849         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
9850         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
9851         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
9852         * config/i386/i386.h (TARGET_MPX): Likewise.
9853         (TARGET_MPX_P): Likewise.
9854         (VALID_BND_REG_MODE): Likewise.
9855         (FIRST_BND_REG): Likewise.
9856         (LAST_BND_REG): Likewise.
9857         (enum reg_class): Likewise.
9858         (BND_REG_P): Likewise.
9859         (BND_REGNO_P): Likewise.
9860         (BNDmode): Likewise.
9861         (ADJUST_INSN_LENGTH): Likewise.
9862         * config/i386/i386.md: Likewise.
9863         * config/i386/i386.opt: Likewise.
9864         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
9865         (defined): Likewise.
9866         (LINK_MPX): Likewise.
9867         (MPX_SPEC): Likewise.
9868         (LIBMPX_SPEC): Likewise.
9869         (LIBMPXWRAPPERS_SPEC): Likewise.
9870         (CHKP_SPEC): Likewise.
9871         * config/i386/predicates.md: Likewise.
9872         * dbxout.c (dbxout_type): Likewise.
9873         * doc/extend.texi: Likewise.
9874         * doc/invoke.texi: Likewise.
9875         * doc/md.texi: Likewise.
9876         * doc/tm.texi: Likewise.
9877         * doc/tm.texi.in: Likewise.
9878         * dwarf2out.c (is_base_type): Likewise.
9879         (gen_formal_types_die): Likewise.
9880         (gen_subprogram_die): Likewise.
9881         (gen_type_die_with_usage): Likewise.
9882         (gen_decl_die): Likewise.
9883         (dwarf2out_late_global_decl): Likewise.
9884         * expr.c (expand_assignment): Likewise.
9885         (emit_storent_insn): Likewise.
9886         (store_expr_with_bounds): Likewise.
9887         (store_expr): Likewise.
9888         (expand_expr_real_1): Likewise.
9889         * expr.h (store_expr_with_bounds): Likewise.
9890         * function.c (use_register_for_decl): Likewise.
9891         (struct bounds_parm_data): Likewise.
9892         (assign_parms_augmented_arg_list): Likewise.
9893         (assign_parm_find_entry_rtl): Likewise.
9894         (assign_parm_is_stack_parm): Likewise.
9895         (assign_parm_load_bounds): Likewise.
9896         (assign_bounds): Likewise.
9897         (assign_parms): Likewise.
9898         (expand_function_start): Likewise.
9899         * gcc.c (CHKP_SPEC): Likewise.
9900         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
9901         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
9902         (wrestrict_dom_walker::check_call): Likewise.
9903         * gimple.c (gimple_build_call_from_tree): Likewise.
9904         * gimple.h (enum gf_mask): Likewise.
9905         (gimple_call_with_bounds_p): Likewise.
9906         (gimple_call_set_with_bounds): Likewise.
9907         * gimplify.c (gimplify_init_constructor): Likewise.
9908         * ipa-cp.c (initialize_node_lattices): Likewise.
9909         (propagate_constants_across_call): Likewise.
9910         (find_more_scalar_values_for_callers_subset): Likewise.
9911         * ipa-hsa.c (process_hsa_functions): Likewise.
9912         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
9913         * ipa-icf.c (sem_function::merge): Likewise.
9914         * ipa-inline.c (early_inliner): Likewise.
9915         * ipa-pure-const.c (warn_function_noreturn): Likewise.
9916         (warn_function_cold): Likewise.
9917         (propagate_pure_const): Likewise.
9918         * ipa-ref.h (enum GTY): Likewise.
9919         * ipa-split.c (find_retbnd): Likewise.
9920         (consider_split): Likewise.
9921         (split_function): Likewise.
9922         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
9923         * ipa.c (walk_polymorphic_call_targets): Likewise.
9924         (symbol_table::remove_unreachable_nodes): Likewise.
9925         (process_references): Likewise.
9926         (cgraph_build_static_cdtor_1): Likewise.
9927         * lto-cgraph.c (lto_output_node): Likewise.
9928         (output_refs): Likewise.
9929         (compute_ltrans_boundary): Likewise.
9930         (input_overwrite_node): Likewise.
9931         (input_node): Likewise.
9932         (input_cgraph_1): Likewise.
9933         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
9934         * passes.c (pass_manager::execute_early_local_passes): Likewise.
9935         (class pass_chkp_instrumentation_passes): Likewise.
9936         (make_pass_chkp_instrumentation_passes): Likewise.
9937         * passes.def: Likewise.
9938         * rtl.h (struct GTY): Likewise.
9939         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
9940         * stor-layout.c (layout_type): Likewise.
9941         * symtab.c: Likewise.
9942         * target.def: Likewise.
9943         * targhooks.c (default_chkp_bound_type): Likewise.
9944         (default_chkp_bound_mode): Likewise.
9945         (default_builtin_chkp_function): Likewise.
9946         (default_chkp_function_value_bounds): Likewise.
9947         (default_chkp_make_bounds_constant): Likewise.
9948         (default_chkp_initialize_bounds): Likewise.
9949         * targhooks.h (default_chkp_bound_type): Likewise.
9950         (default_chkp_bound_mode): Likewise.
9951         (default_builtin_chkp_function): Likewise.
9952         (default_chkp_function_value_bounds): Likewise.
9953         (default_chkp_make_bounds_constant): Likewise.
9954         (default_chkp_initialize_bounds): Likewise.
9955         * toplev.c (compile_file): Likewise.
9956         (process_options): Likewise.
9957         * tree-core.h (DEF_BUILTIN): Likewise.
9958         (DEF_BUILTIN_CHKP): Likewise.
9959         * tree-inline.c (declare_return_variable): Likewise.
9960         (remap_gimple_stmt): Likewise.
9961         (copy_bb): Likewise.
9962         (initialize_inlined_parameters): Likewise.
9963         (expand_call_inline): Likewise.
9964         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
9965         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
9966         (make_pass_ipa_chkp_produce_thunks): Likewise.
9967         (make_pass_chkp): Likewise.
9968         (make_pass_chkp_opt): Likewise.
9969         (make_pass_chkp_instrumentation_passes): Likewise.
9970         * tree-pretty-print.c (dump_generic_node): Likewise.
9971         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
9972         * tree-ssa-dce.c (propagate_necessity): Likewise.
9973         (eliminate_unnecessary_stmts): Likewise.
9974         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
9975         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
9976         * tree-ssa-sccvn.h: Likewise.
9977         * tree-ssa-strlen.c (get_string_length): Likewise.
9978         (valid_builtin_call): Likewise.
9979         (adjust_last_stmt): Likewise.
9980         (handle_builtin_strchr): Likewise.
9981         (handle_builtin_strcpy): Likewise.
9982         (handle_builtin_stxncpy): Likewise.
9983         (handle_builtin_memcpy): Likewise.
9984         (handle_builtin_strcat): Likewise.
9985         (strlen_check_and_optimize_stmt): Likewise.
9986         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
9987         * tree-streamer-in.c: Likewise.
9988         * tree-streamer.c (record_common_node): Likewise.
9989         * tree.c (tree_code_size): Likewise.
9990         (wide_int_to_tree_1): Likewise.
9991         (type_contains_placeholder_1): Likewise.
9992         (build_common_tree_nodes): Likewise.
9993         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
9994         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
9995         (POINTER_BOUNDS_P): Likewise.
9996         (BOUNDED_TYPE_P): Likewise.
9997         (BOUNDED_P): Likewise.
9998         (CALL_WITH_BOUNDS_P): Likewise.
9999         (pointer_bounds_type_node): Likewise.
10000         * value-prof.c (gimple_ic): Likewise.
10001         * var-tracking.c (vt_add_function_parameters): Likewise.
10002         * varasm.c (make_decl_rtl): Likewise.
10003         (assemble_start_function): Likewise.
10004         (output_constant): Likewise.
10005         (maybe_assemble_visibility): Likewise.
10006         * varpool.c (ctor_for_folding): Likewise.
10007         * chkp-builtins.def: Remove.
10008         * ipa-chkp.c: Remove.
10009         * ipa-chkp.h: Remove.
10010         * rtl-chkp.c: Remove.
10011         * rtl-chkp.h: Remove.
10012         * tree-chkp-opt.c: Remove.
10013         * tree-chkp.c: Remove.
10014         * tree-chkp.h: Remove.
10016 2018-06-07  Carl Love  <cel@us.ibm.com>
10018         * config/rs6000/vsx.md (vextract_fp_from_shorth,
10019         vextract_fp_from_shortl): Add BE support.
10021 2018-06-07  Paul Koning  <ni1d@arrl.net>
10023         * compare-elim.c (try_merge_compare): Don't merge compare if
10024         address contains a side effect.
10025         (try_eliminate_compare): Likewise.
10027 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
10029         * config.gcc: Support "tremont".
10030         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
10031         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
10032         PROCESSOR_TREMONT.
10033         * config/i386/i386.c (m_TREMONT): Define.
10034         (processor_target_table): Add "tremont".
10035         (PTA_TREMONT): Define.
10036         (ix86_lea_outperforms): Add TARGET_TREMONT.
10037         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
10038         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
10039         and M_INTEL_GOLDMONT_PLUS.
10040         (fold_builtin_cpu): Add "tremont".
10041         (ix86_add_stmt_cost): Add TARGET_TREMONT.
10042         (ix86_option_override_internal): Add "tremont".
10043         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
10044         (processor_type): Add PROCESSOR_TREMONT.
10045         * config/i386/x86-tune.def: Add m_TREMONT.
10046         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
10048 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
10050         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
10051         symbol defined for msp430i* devices to be lower case.
10053 2018-06-07  Richard Biener  <rguenther@suse.de>
10055         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
10056         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
10057         Properly wrap signed arithmetic if overflow wraps.
10059 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
10061         PR tree-optimization/69615
10062         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
10063         of a cast from a same precision integral SSA_NAME in a bb dominated
10064         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
10065         cast to utype if rhs2 has already a compatible type.
10067 2018-06-07  Richard Biener  <rguenther@suse.de>
10069         PR tree-optimization/85935
10070         * graphite-scop-detection.c (find_params_in_bb): Analyze
10071         condition operands with respect to the correct loop.  Assert
10072         the analysis doesn't fail.
10074 2018-06-04  Carl Love  <cel@us.ibm.com>
10076         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
10077         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
10078         as it is slightly cheaper.
10079         (first_match_or_eos_index_<mode>):
10080         Calculate index using natural element order.
10081         (first_match_index_<mode>):
10082         Calculate index using natural element order.
10083         (first_match_or_eos_index_<mode>):
10084         Calculate index using natural order.
10085         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
10086         for BE and LE modes.
10087         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
10088         P9V_BUILTIN_VCLZLSBB_V16QI.
10089         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
10090         specific.
10092 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10094         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
10095         indentation and line wrap for many prototypes.  Add missing
10096         @smallexample directives around block of prototypes for vec_xl and
10097         vec_xst.
10099 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
10101         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
10102         track if we pass or return IEEE 128-bit floating point.
10103         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
10104         C++ mangling that is compatible with GCC 8.1.
10105         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
10106         (init_cumulative_args): Note if we pass or return IEEE 128-bit
10107         floating point types.
10108         (rs6000_function_arg_advance_1): Likewise.
10109         (rs6000_mangle_type): Optionally generate mangled names that match
10110         what GCC 8.1 generated for IEEE 128-bit floating point types.
10111         (rs6000_globalize_decl_name): If we have an external function that
10112         passes or returns IEEE 128-bit types, generate a weak reference
10113         from the mangled name used in GCC 8.1 to the current mangled
10114         name.
10115         (rs6000_init_builtins): Make __ibm128 use the long double type if
10116         long double is IBM extended double.  Make __float128 use the long
10117         double type if long double is IEEE 128-bit.
10119         PR target/85657
10120         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
10121         macro for __ibm128 built-in functions.
10122         (PACK_IF): Add __ibm128 pack/unpack functions.
10123         (UNPACK_IF): Likewise.
10124         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
10125         enable long double built-in functions if long double is IEEE
10126         128-bit floating point.
10127         (rs6000_invalid_builtin): Update long double built-in function
10128         error message.
10129         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
10130         functions, adjust the built-in function to use the long double
10131         built-in function if __ibm128 and long double are the same type.
10132         * doc/extend.texi (PowerPC builtins): Update documention for
10133         __builtin_{,un}pack_longdouble.  Add documentation for
10134         __builtin_{,un}pack_ibm128.
10136 2018-06-06  Jim Wilson  <jimw@sifive.com>
10138         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
10139         (struct machine_function): New field interrupt_mode.
10140         (riscv_handle_type_attribute): New function.  Add forward declaration.
10141         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
10142         (riscv_expand_epilogue): Check interrupt_mode field.
10143         (riscv_set_current_function): Check interrupt attribute args and
10144         set interrupt_mode field.
10145         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
10146         (riscv_sret, riscv_uret): New.
10147         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
10148         new arguments to interrupt attribute.
10150 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
10152         PR target/63177
10153         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
10154         Don't handle -mcpu=power8 if -mpower9-vector is also used.
10156 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10158         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
10159         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
10160         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
10161         several redundant entries.
10163 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
10165         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
10166         type from "rtx" to "rtx_insn *".
10167         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
10168         for local "call_insn", removing cast.
10169         (ix86_expand_call): Likewise, introducing a "call_insn" local.
10171 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
10173         PR tree-optimization/86066
10174         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
10175         for BIT_INSERT_EXPR stores.
10177 2018-06-06  Richard Biener  <rguenther@suse.de>
10179         PR tree-optimization/86062
10180         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
10181         component refs ontop
10182         of to be offsetted base.
10184 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
10186         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
10187         to be static and remove check on interrupt attribute name.
10189 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10191         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10192         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
10194 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
10196         PR target/79924
10197         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
10198         second argument.
10199         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
10200         Remove second argument, change how error is called.
10201         (aarch64_layout_arg): Remove second argument from
10202         aarch64_err_no_fpadvsimd call.
10203         (aarch64_init_cumulative_args): Ditto.
10204         (aarch64_gimplify_va_arg_expr): Ditto.
10205         * config/aarch64/aarch64.md (mov<mode>): Ditto.
10207 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
10209         * config/i386/i386.md (simple_return_indirect_internal): New expander.
10210         (*simple_return_indirect_internal<mode>): Rename from
10211         simple_return_indirect_internal.  Use W mode iterator.
10212         (rstorssp): New expander.
10213         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
10214         (clrssbsy): New expander.
10215         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
10217 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
10219         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
10220         __typeof__.
10221         (cmse_check_pointed_object): Likewise.
10223 2018-06-05  Martin Liska  <mliska@suse.cz>
10225         PR gcov-profile/47618
10226         * doc/invoke.texi: Document how -fprofile-dir format
10227         is extended.
10229 2018-06-05  Richard Biener  <rguenther@suse.de>
10231         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
10232         removal pretend DOM info isn't available so we do not update
10233         it and only remove edges, not dominated blocks.  Actually free
10234         DOM info in case we removed something.  Remove unreachable blocks.
10235         (mfb_keep_latches): Work with either DOM info or marked backedges.
10236         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
10237         first.  Mark backedges if DOM info isn't available.
10238         (Re-)compute DOM info after cleanup_control_flow_pre.
10240 2018-06-05  Richard Biener  <rguenther@suse.de>
10242         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
10243         (locus_discrim_hasher::hash): Adjust.
10244         (locus_discrim_hasher::equal): Likewise.
10245         (next_discriminator_for_locus): Work on line directly.
10246         (same_line_p): Pass in expanded locus1 as well.
10247         (assign_discriminators): Avoid redundant location expansions.
10249 2018-06-05  Richard Biener  <rguenther@suse.de>
10251         PR tree-optimization/86046
10252         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
10253         if required after clearing TREE_ADDRESSABLE.
10255 2018-06-05  Richard Biener  <rguenther@suse.de>
10257         PR tree-optimization/86047
10258         * tree-ssa-loop.c (for_each_index): Glob handling of all
10259         decls and constants and really handle all of them.
10261 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10263         PR target/81497
10264         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
10265         qualifier_void_pointer and qualifier_const_void_pointer.
10266         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
10267         (arm_init_builtins): Handle the above.
10268         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
10269         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
10270         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
10271         void intrinsics.
10273 2018-06-05  Martin Liska  <mliska@suse.cz>
10275         * auto-profile.c (read_autofdo_file): Do not use
10276         gcov_ctr_summary struct.
10277         (afdo_callsite_hot_enough_for_early_inline): Likewise.
10278         * coverage.c (struct counts_entry): Likewise.
10279         (read_counts_file): Read just single summary entry.
10280         (get_coverage_counts): Use gcov_summary struct.
10281         * coverage.h (get_coverage_counts): Likewise.
10282         * gcov-dump.c (dump_working_sets): Likewise.
10283         (tag_summary): Dump just single summary.
10284         * gcov-io.c (gcov_write_summary): Write just histogram
10285         summary.
10286         (gcov_read_summary): Read just single summary.
10287         (compute_working_sets): Use gcov_summary struct.
10288         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
10289         of GCOV_COUNTERS_SUMMABLE.
10290         (GCOV_COUNTERS_SUMMABLE): Remove.
10291         (GCOV_FIRST_VALUE_COUNTER): Replace with
10292         GCOV_COUNTER_V_INTERVAL.
10293         (struct gcov_ctr_summary): Remove.
10294         (struct gcov_summary): Directly use fields of former
10295         gcov_ctr_summary.
10296         (compute_working_sets): Use gcov_summary struct.
10297         * gcov.c (read_count_file): Do not use ctrs fields.
10298         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
10299         struct.
10300         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
10301         struct.
10302         * profile.c: Likewise.
10303         * profile.h: Likewise.
10305 2018-06-05  Martin Liska  <mliska@suse.cz>
10307         PR gcov-profile/84846
10308         * gcov.c (output_lines): Print working directory only
10309         in intermediate format.
10311 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
10313         * config/s390/s390-builtin-types.def: Add void function type.
10314         * config/s390/s390-builtins.def: Use the function type for the
10315         tbeginc builtin.
10317 2018-06-04  Jim Wilson  <jimw@sifive.com>
10319         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
10320         to int.
10321         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
10322         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
10323         handle EH_RETURN_DATA_REGNO registers properly.
10324         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
10325         (riscv_expand_epilogue): Update comment.  Change argument name and
10326         type.  Update code to use new name and type.  Pass new args to
10327         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
10328         EXCEPTION_RETURN.
10329         * config/riscv/riscv.md (NORMAL_RETURN): New.
10330         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
10331         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
10332         (eh_return): Call gen_eh_return_internal and emit barrier.
10333         (eh_return_internal): Call riscv_expand_epilogue.
10335 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
10337         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
10338         bit_insertion field and declare can_be_merged_into method.
10339         (merged_store_group::can_be_merged_into): New method.
10340         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
10341         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
10342         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
10344 2018-06-04  Richard Biener  <rguenther@suse.de>
10346         PR tree-optimization/85955
10347         * builtins.c (fold_builtin_sincos): Convert pointers to
10348         destination to appropriate type before dereferencing.
10350 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
10352         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
10354 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
10356         * expr.c (expand_expr_real_1): Force the operand into memory if
10357         its TYPE_MODE is BLKmode and if there is no integer mode for
10358         the number of bits being extracted.
10360 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
10362         PR target/85832
10363         PR target/86036
10364         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
10365         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
10367 2018-06-04  Richard Biener  <rguenther@suse.de>
10369         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
10370         (cleanup_tree_cfg_noloop): ... single caller.  Do
10371         start_recording_case_labels later.
10373 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
10375         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
10376         to _IMMINTRIN_H_INCLUDED.
10377         * config/i386/pconfigintrin.h: Ditto.
10378         * config/i386/waitpkgintrin.h: Ditto.
10379         * config/i386/immintrin.h: Add includes for sgxintrin.h,
10380         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
10381         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
10382         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
10383         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
10384         waitpkgintrin.h and cldemoteintrin.h.
10386 2018-06-04  Richard Biener  <rguenther@suse.de>
10388         PR tree-optimization/86038
10389         * tracer.c (find_best_successor): Check probability for
10390         being initialized, bail out if not.
10392 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
10394         PR target/86003
10395         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
10396         of bits to ignore when comparing architectures.
10398 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
10400         PR tree-optimization/69615
10401         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
10402         maximum or minimum of the type, try to merge it also as if
10403         range1 is + [-, x - 1] or + [x + 1, -].
10405         PR c++/86025
10406         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
10408 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
10410         PR tree-optimization/86034
10411         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
10412         the unsigned bitfield type in a bit insertion sequence if it does not
10413         have a larger precision than the bitfield size.
10414         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
10416 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
10418         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
10420 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
10422         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
10423         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
10424         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
10425         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
10427 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
10429         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
10430         Disable -fdelete-null-pointer-checks for ELF toolchain.
10432 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
10433             Kito Cheng  <kito.cheng@gmail.com>
10435         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
10436         (nds32le-*-*, nds32be-*-*): Integrate checking process.
10437         (nds32*-*-*): Add glibc and uclibc conditions.
10438         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
10439         (TARGET_EXCEPT_UNWIND_INFO): Define.
10440         * config/nds32/elf.h: New file.
10441         * config/nds32/linux.h: New file.
10442         * config/nds32/nds32-elf.opt: New file.
10443         * config/nds32/nds32-linux.opt: New file.
10444         * config/nds32/nds32-fp-as-gp.c
10445         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
10446         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
10447         TARGET_LINUX_ABI.
10448         (nds32_asm_file_end): Ditto.
10449         (nds32_print_operand): Ditto.
10450         (nds32_insert_attributes): Ditto.
10451         (nds32_init_libfuncs): New function.
10452         (TARGET_HAVE_TLS): Define.
10453         (TARGET_INIT_LIBFUNCS): Define.
10454         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
10455         spec content.
10456         (TARGET_ELF): Apply different mcmodel setting.
10457         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
10458         been migrated into elf.h and linux.h files.
10459         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
10460         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
10461         (mcmodel): The content has been migrated into nds32-elf.opt and
10462         nds32-linux.opt files.
10463         * config/nds32/t-elf: New file.
10464         * config/nds32/t-linux: New file.
10466 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
10467             Shiva Chen  <shiva0217@gmail.com>
10469         * config/nds32/constants.md (unspec_volatile_element): Add
10470         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
10471         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
10472         optimization.
10473         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
10474         (make_pass_nds32_fp_as_gp): Declare.
10475         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
10476         optmization pass.
10477         (nds32_asm_function_end_prologue): Remove unused asm output.
10478         (nds32_asm_function_begin_epilogue): Remove unused asm output.
10479         (nds32_asm_file_start): Output necessary fp_as_gp information.
10480         (nds32_option_override): Adjust register usage.
10481         (nds32_expand_prologue): Consider fp_as_gp situation.
10482         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
10483         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
10484         (epilogue): Ditto.
10485         (return): Ditto.
10486         (simple_return): Ditto.
10487         (omit_fp_begin): Output special directive for fp_as_gp.
10488         (omit_fp_end): Output special directive for fp_as_gp.
10489         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
10490         mforbid-fp-as-gp): New options.
10492 2018-06-01  Mark Wielaard  <mark@klomp.org>
10494         * dwarf2out.c (dwarf2out_finish): Remove generation of
10495         DW_AT_loclists_base.
10497 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
10499         * gimple-ssa-store-merging.c: Include gimple-fold.h.
10500         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
10501         (struct merged_store_group): Add bit_insertion field.
10502         (dump_char_array): Use standard hexadecimal format.
10503         (merged_store_group::merged_store_group): Set bit_insertion to false.
10504         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
10505         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
10506         also print the mask in the dump file.
10507         (pass_store_merging::gate): Minor tweak.
10508         (imm_store_chain_info::coalesce_immediate): Fix wrong association
10509         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
10510         stores with INTEGER_CST stores.
10511         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
10512         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
10513         and use it throughout.  Generate bit insertion sequences if need be.
10514         (pass_store_merging::process_store): Remove redundant condition.
10515         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
10517 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
10519         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
10520         the 128-bit floating point types.  Fix function comment.
10522 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10524         * config/aarch64/aarch64-simd.md
10525         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
10526         mnemonics.
10527         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
10528         mnemonics.
10530 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
10532         PR tree-optimization/85989
10533         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
10534         variable.
10535         (backprop::intersect_uses): Check it when deciding whether this
10536         is a backedge reference.
10537         (backprop::process_block): Add each phi to m_visited_phis
10538         after visiting it, then clear it at the end.
10540 2018-06-01  Richard Biener  <rguenther@suse.de>
10542         * tree-vectorizer.h (vect_dr_stmt): New function.
10543         (vect_get_load_cost): Adjust.
10544         (vect_get_store_cost): Likewise.
10545         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
10546         Use vect_dr_stmt instead of DR_SMTT.
10547         (vect_record_base_alignments): Likewise.
10548         (vect_calculate_target_alignment): Likewise.
10549         (vect_compute_data_ref_alignment): Likewise and make static.
10550         (vect_update_misalignment_for_peel): Likewise.
10551         (vect_verify_datarefs_alignment): Likewise.
10552         (vector_alignment_reachable_p): Likewise.
10553         (vect_get_data_access_cost): Likewise.  Pass down
10554         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
10555         (vect_get_peeling_costs_all_drs): Likewise.
10556         (vect_peeling_hash_get_lowest_cost): Likewise.
10557         (vect_enhance_data_refs_alignment): Likewise.
10558         (vect_find_same_alignment_drs): Likewise.
10559         (vect_analyze_data_refs_alignment): Likewise.
10560         (vect_analyze_group_access_1): Likewise.
10561         (vect_analyze_group_access): Likewise.
10562         (vect_analyze_data_ref_access): Likewise.
10563         (vect_analyze_data_ref_accesses): Likewise.
10564         (vect_vfa_segment_size): Likewise.
10565         (vect_small_gap_p): Likewise.
10566         (vectorizable_with_step_bound_p): Likewise.
10567         (vect_prune_runtime_alias_test_list): Likewise.
10568         (vect_analyze_data_refs): Likewise.
10569         (vect_supportable_dr_alignment): Likewise.
10570         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10571         (vect_gen_prolog_loop_niters): Likewise.
10572         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10573         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
10574         modify DR_STMT.
10575         (vect_recog_mask_conversion_pattern): Likewise.
10576         (vect_try_gather_scatter_pattern): Likewise.
10577         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
10578         to vect_get_store_cost.
10579         (vect_get_store_cost): Get stmt_info instead of DR.
10580         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
10581         (vect_get_load_cost): Get stmt_info instead of DR.
10583 2018-06-01  Richard Biener  <rguenther@suse.de>
10585         PR middle-end/86017
10586         * gimple-fold.c (var_decl_component_p): Also allow offsetted
10587         vars wrapped in MEM_REFs.
10589 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
10591         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10592         Fix subreg tests so that we only return a choice between
10593         GENERAL_REGS and FP_REGS if the original classes included both.
10595 2018-06-01  Richard Biener  <rguenther@suse.de>
10597         PR ipa/85960
10598         * tree-ssa-structalias.c (get_function_part_constraint):
10599         Handle NULL fi->decl.
10600         (find_func_aliases_for_call): Properly handle indirect
10601         fi from direct call.
10602         (find_func_clobbers): Likewise.
10603         (ipa_pta_execute): Likewise.
10604         (create_variable_info_for): For functions that are ifunc_resolver
10605         resolve to a varinfo that contains the result of the resolver call.
10606         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
10607         aliases.
10609 2018-05-31  Michael Collison  <michael.collison@arm.com>
10611         * config/aarch64/aarch64.md:
10612         (*fix_to_zero_extenddfdi2): New pattern.
10613         * gcc.target/aarch64/fix_extend1.c: New testcase.
10615 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
10617         PR middle-end/78809
10618         PR middle-end/83026
10619         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
10620         and BUILT_IN_STRNCMP_EQ.
10621         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
10622         BUILT_IN_STRNCMP_EQ.
10623         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
10624         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10625         (gimple_fold_builtin): Likewise.
10626         * tree-ssa-strlen.c (compute_string_length): New function.
10627         (determine_min_obsize): New function.
10628         (handle_builtin_string_cmp): New function to handle calls to
10629         string compare functions.
10630         (strlen_optimize_stmt): Add handling to builtin string compare
10631         calls.
10632         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
10633         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
10634         * tree.c (build_common_builtin_nodes): Add new defines of
10635         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
10637 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
10639         PR target/85984
10640         * bb-reorder.c (pass_partition_blocks::gate): Return false for
10641         functions with naked attribute.
10643 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
10645         * config/i386/sse.md (avx_vec_concat<mode>):
10646         Substitute concat_tg_mode mode attribute with xtg_mode.
10647         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
10648         (concat_tg_mode): Remove mode attribute.
10650 2018-05-31  Martin Sebor  <msebor@redhat.com>
10652         PR c/82063
10653         * calls.c (alloc_max_size): Correct a logic error/typo.
10654         Treat excessive arguments as infinite.  Warn for invalid arguments.
10655         * doc/invoke.texi (-Walloc-size-larger-than): Update.
10657 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
10659         PR target/85829
10660         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
10661         and movx for Haswell.
10663 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
10664             Cesar Philippidis  <cesar@codesourcery.com>
10666         PR middle-end/85879
10667         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
10668         when emitting error on private/firstprivate reductions.
10669         * omp-low.c (lower_omp_target): Avoid reference-type processing
10670         on pointers for firstprivate clause.
10672 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
10674         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
10675         (st1x2): Likewise.
10676         (st1x3): Likewise.
10677         * config/aarch64/aarch64-simd.md
10678         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
10679         (aarch64_ld1_x3_<mode>): Likewise
10680         (aarch64_st1x2<VALLDIF:mode>): Likewise
10681         (aarch64_st1_x2_<mode>): Likewise
10682         (aarch64_st1x3<VALLDIF:mode>): Likewise
10683         (aarch64_st1_x3_<mode>): Likewise
10684         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
10685         (vld1_s8_x3): Likewise.
10686         (vld1_u16_x3): Likewise.
10687         (vld1_s16_x3): Likewise.
10688         (vld1_u32_x3): Likewise.
10689         (vld1_s32_x3): Likewise.
10690         (vld1_u64_x3): Likewise.
10691         (vld1_s64_x3): Likewise.
10692         (vld1_f16_x3): Likewise.
10693         (vld1_f32_x3): Likewise.
10694         (vld1_f64_x3): Likewise.
10695         (vld1_p8_x3): Likewise.
10696         (vld1_p16_x3): Likewise.
10697         (vld1_p64_x3): Likewise.
10698         (vld1q_u8_x3): Likewise.
10699         (vld1q_s8_x3): Likewise.
10700         (vld1q_u16_x3): Likewise.
10701         (vld1q_s16_x3): Likewise.
10702         (vld1q_u32_x3): Likewise.
10703         (vld1q_s32_x3): Likewise.
10704         (vld1q_u64_x3): Likewise.
10705         (vld1q_s64_x3): Likewise.
10706         (vld1q_f16_x3): Likewise.
10707         (vld1q_f32_x3): Likewise.
10708         (vld1q_f64_x3): Likewise.
10709         (vld1q_p8_x3): Likewise.
10710         (vld1q_p16_x3): Likewise.
10711         (vld1q_p64_x3): Likewise.
10712         (vst1_s64_x2): Likewise.
10713         (vst1_u64_x2): Likewise.
10714         (vst1_f64_x2): Likewise.
10715         (vst1_s8_x2): Likewise.
10716         (vst1_p8_x2): Likewise.
10717         (vst1_s16_x2): Likewise.
10718         (vst1_p16_x2): Likewise.
10719         (vst1_s32_x2): Likewise.
10720         (vst1_u8_x2): Likewise.
10721         (vst1_u16_x2): Likewise.
10722         (vst1_u32_x2): Likewise.
10723         (vst1_f16_x2): Likewise.
10724         (vst1_f32_x2): Likewise.
10725         (vst1_p64_x2): Likewise.
10726         (vst1q_s8_x2): Likewise.
10727         (vst1q_p8_x2): Likewise.
10728         (vst1q_s16_x2): Likewise.
10729         (vst1q_p16_x2): Likewise.
10730         (vst1q_s32_x2): Likewise.
10731         (vst1q_s64_x2): Likewise.
10732         (vst1q_u8_x2): Likewise.
10733         (vst1q_u16_x2): Likewise.
10734         (vst1q_u32_x2): Likewise.
10735         (vst1q_u64_x2): Likewise.
10736         (vst1q_f16_x2): Likewise.
10737         (vst1q_f32_x2): Likewise.
10738         (vst1q_f64_x2): Likewise.
10739         (vst1q_p64_x2): Likewise.
10740         (vst1_s64_x3): Likewise.
10741         (vst1_u64_x3): Likewise.
10742         (vst1_f64_x3): Likewise.
10743         (vst1_s8_x3): Likewise.
10744         (vst1_p8_x3): Likewise.
10745         (vst1_s16_x3): Likewise.
10746         (vst1_p16_x3): Likewise.
10747         (vst1_s32_x3): Likewise.
10748         (vst1_u8_x3): Likewise.
10749         (vst1_u16_x3): Likewise.
10750         (vst1_u32_x3): Likewise.
10751         (vst1_f16_x3): Likewise.
10752         (vst1_f32_x3): Likewise.
10753         (vst1_p64_x3): Likewise.
10754         (vst1q_s8_x3): Likewise.
10755         (vst1q_p8_x3): Likewise.
10756         (vst1q_s16_x3): Likewise.
10757         (vst1q_p16_x3): Likewise.
10758         (vst1q_s32_x3): Likewise.
10759         (vst1q_s64_x3): Likewise.
10760         (vst1q_u8_x3): Likewise.
10761         (vst1q_u16_x3): Likewise.
10762         (vst1q_u32_x3): Likewise.
10763         (vst1q_u64_x3): Likewise.
10764         (vst1q_f16_x3): Likewise.
10765         (vst1q_f32_x3): Likewise.
10766         (vst1q_f64_x3): Likewise.
10767         (vst1q_p64_x3): Likewise.
10769 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
10771         * config/msp430/msp430.c (msp430_output_labelref): Prepend
10772         user_label_prefix to name.
10774         * tree-core.h: Update comment about the format of NAME string
10775         passed to handler in attribute_spec.
10777         * config/msp430/msp430.md: Remove erroneous subreg expression from
10778         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
10779         zero_extend{q,h}isi2.
10781 2018-05-30  Borislav Petkov  <bp@suse.de>
10783         * doc/extend.texi: Document some architecture specific
10784         constraints and sort entries.
10786 2018-05-30  Martin Sebor  <msebor@redhat.com>
10788         PR middle-end/85369
10789         * builtins.c (expand_builtin_stpcpy_1): New function.
10790         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
10791         only if the former succeeds.
10793 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
10795         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
10796         in saphira.
10798 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
10800         * doc/invoke.texi (-flinker-output): Document
10802 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
10804         * passes.c (ipa_write_summaries): Only modify statements if body
10805         is in memory.
10806         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
10807         incrementally linking.
10808         (ipa_passes): Likewise.
10809         * lto-cgraph.c (lto_output_node): When incrementally linking do not
10810         pass down resolution info.
10811         * common.opt (flag_incremental_link): Update info.
10812         * gcc.c (plugin specs): Turn flinker-output=* to
10813         -plugin-opt=-linker-output-known
10814         * toplev.c (compile_file): Also cut compilation when doing incremental
10815         link.
10816         * flag-types. (enum lto_partition_model): Add
10817         LTO_LINKER_OUTPUT_NOLTOREL.
10818         (invoke.texi): Add -flinker-output docs.
10819         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
10820         link same way as WPA; do not stream in dead initializers.
10822         * dwarf2out.c (dwarf2out_die_ref_for_decl,
10823         darf2out_register_external_decl): Support incremental link.
10825 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
10827         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
10829 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
10831         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
10832         it down to simple_object_copy_lto_debug_sections.
10833         (run_gcc): Determine incremental LTO link time and configure
10834         lto1 into non-wpa mode, disable renaming of debug sections.
10836 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10838         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
10839         descriptions of various incorrectly documented functions.
10841 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
10843         Revert:
10844         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10845         address check not strict.
10847 2018-05-30  Richard Biener  <rguenther@suse.de>
10849         PR tree-optimization/85964
10850         * tracer.c (better_p): Drop initialized count check, we only
10851         call the function with initialized counts now.
10852         (find_best_successor): Do find a best edge if one
10853         has uninitialized count.
10854         (find_best_predecessor): Likewise.  Do BB frequency check only
10855         if count is initialized.
10857 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
10859         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
10860         (aarch64_ldrstr_offset_compare): New.
10861         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
10862         load/store orderings.
10863         (aarch64_gen_adjusted_ldpstp): Likewise.
10865 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
10867         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
10868         Check for subset of GENERAL_REGS and FP_REGS.
10869         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
10870         r=w alternative.
10872 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
10874         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
10875         and wi::to_poly_offset.  Add the current offset and then check
10876         whether the sum fits, rather than using an unchecked addition of
10877         a checked term.  Check for a shwi rather than a uhwi.
10878         * expr.c (get_bit_range): Use tree_to_poly_uint64.
10879         (store_constructor): Use poly_int_tree_p.
10880         (expand_expr_real_1): Likewise.
10881         * function.c (assign_temp): Likewise.
10882         * fold-const.c (const_binop): Use poly_int_tree_p and
10883         wi::to_poly_offset.
10884         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
10885         division.
10886         * ipa-icf-gimple.c (func_checker::compare_operand): Use
10887         to_poly_offset for MEM offsets.
10888         * ipa-icf.c (sem_variable::equals): Likewise.
10889         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
10890         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
10891         wi::to_poly_offset for BIT_FIELD_REF offsets.
10892         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
10893         wi::to_poly_offset.
10894         * var-tracking.c (emit_note_insn_var_location): Use
10895         tree_to_poly_uint64.
10897 2018-05-29  Jim Wilson  <jimw@sifive.com>
10899         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
10901 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
10903         PR target/85950
10904         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
10905         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
10906         sequence.
10907         (sse4_1_round<mode>2): Use nonimmediate_operand
10908         for operand 1 predicate.
10910 2018-05-29  Martin Sebor  <msebor@redhat.com>
10911             Richard Biener  <rguenther@suse.de>
10913         PR testsuite/85888
10914         * calls.c (get_size_range): Call determine_value_range instead
10915         of get_value_range..
10916         * tree-vrp.h (determine_value_range): Declared new function.
10917         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
10919 2018-05-29  Richard Biener  <rguenther@suse.de>
10921         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
10922         sure to use non-pattern stmts for get_earlier_stmt arguments.
10923         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
10924         called on pattern stmts.
10925         (get_later_stmt): Likewise.
10927 2018-05-29  Martin Liska  <mliska@suse.cz>
10929         PR gcov-profile/85759
10930         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
10931         env variables.
10933 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
10935         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
10936         VEC_UNPACK_*_EXPR.
10937         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
10938         VEC_PACK_*_EXPR.
10940         PR target/85918
10941         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10942         VEC_PACK_FLOAT_EXPR): New tree codes.
10943         * tree-pretty-print.c (op_code_prio): Handle
10944         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10945         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10946         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10947         * tree-inline.c (estimate_operator_cost): Likewise.
10948         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
10949         * fold-const.c (const_binop): Likewise.
10950         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
10951         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
10952         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
10953         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
10954         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
10955         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
10956         * expr.c (expand_expr_real_2): Likewise.
10957         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
10958         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
10959         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
10960         optabs.
10961         * optabs.c (expand_widen_pattern_expr): For
10962         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
10963         sign from result type rather than operand's type.
10964         (expand_binop_directly): For vec_packu_float_optab and
10965         vec_packs_float_optab allow result type to be different from operand's
10966         type.
10967         * optabs-tree.c (optab_for_tree_code): Handle
10968         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10969         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
10970         * tree-vect-generic.c (expand_vector_operations_1):  Handle
10971         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
10972         VEC_PACK_FLOAT_EXPR.
10973         * tree-vect-stmts.c (supportable_widening_operation): Handle
10974         FIX_TRUNC_EXPR.
10975         (supportable_narrowing_operation): Handle FLOAT_EXPR.
10976         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
10977         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
10978         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
10979         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
10980         mode attributes.
10981         (vec_pack<floatprefix>_float_<mode>): New expander.
10982         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
10983         attributes.
10984         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
10985         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
10986         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
10987         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
10988         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
10989         Document.
10990         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
10991         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
10992         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
10993         VEC_PACK_FLOAT_EXPR): Document.
10995 2018-05-29  Richard Biener  <rguenther@suse.de>
10997         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
10998         member.
10999         (stmt_vec_info_vec): Make pointer.
11000         (init_stmt_vec_info_vec): Remove.
11001         (free_stmt_vec_info_vec): Likewise.
11002         (set_stmt_vec_info_vec): New function.
11003         (free_stmt_vec_infos): Likewise.
11004         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
11005         (set_vinfo_for_stmt): Likewise.
11006         (get_earlier_stmt): Likewise.
11007         (get_later_stmt): Likewise.
11008         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
11009         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
11010         (vec_info::~vec_info): Free stmt_vec_infos.
11011         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
11012         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
11013         (pass_slp_vectorize::execute): Likewise.
11014         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
11015         (free_stmt_vec_info_vec): Likewise.
11016         (set_stmt_vec_info_vec): New function.
11017         (free_stmt_vec_infos): Likewise.
11018         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
11019         the global stmt_vec_info_vec.
11020         * tree-parloops.c (gather_scalar_reductions): Use
11021         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
11022         vector.
11024 2018-05-29  Richard Biener  <rguenther@suse.de>
11026         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
11028 2018-05-29  Martin Liska  <mliska@suse.cz>
11029             David Malcolm  <dmalcolm@redhat.com>
11031         * vec.c (test_reverse): New.
11032         (vec_c_tests): Add new test.
11033         * vec.h (vl_ptr>::reverse): New function.
11035 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
11037         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
11039         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
11040         and later.
11042 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11044         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
11046 2018-05-28  Richard Biener  <rguenther@suse.de>
11048         PR tree-optimization/85933
11049         * tree-vect-data-refs.c (vect_record_base_alignments): Only
11050         look at stmts marked as vectorizable.
11052 2018-05-28  Richard Biener  <rguenther@suse.de>
11054         PR tree-optimization/85934
11055         * tree-vect-generic.c (expand_vector_operations_1): Hoist
11056         vector boolean check before scalar optimization.
11058 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
11060         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
11061         for armv5te.
11063 2018-05-28  Mark Wielaard  <mark@klomp.org>
11065         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
11066         if it is an expression containing a minus sign.
11068 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
11070         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
11072 2018-05-27  Paul Koning  <ni1d@arrl.net>
11074         * config/pdp11/pdp11.md (truncsihi2): Remove.
11076 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
11077             Chung-Ju Wu  <jasonwucj@gmail.com>
11079         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
11080         implementation.
11081         (unaligned_store_dw): Ditto.
11082         * config/nds32/nds32-memory-manipulation.c
11083         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
11084         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
11085         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
11086         (emit_setmem_word_loop): Rename to ...
11087         (emit_setmem_doubleword_loop): ... this.
11088         (nds32_gen_dup_4_byte_to_word_value): New function.
11089         (nds32_gen_dup_8_byte_to_double_word_value): New function.
11090         (nds32_expand_setmem_loop): Refine implementation.
11091         (nds32_expand_setmem_loop_v3m): Ditto.
11092         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
11093         pattern.
11095 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
11097         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
11099 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
11101         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
11102         (nds32_init_machine_status): Initialize machine->attr_naked_p and
11103         machine->attr_no_prologue_p.
11104         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
11105         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
11106         (nds32_expand_epilogue): Consider attr_naked_p.
11107         (nds32_expand_epilogue_v3pop): Likewise.
11108         (nds32_can_use_return_insn): Likewise.
11109         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
11110         attr_no_prologue_p fields.
11111         * config/nds32/nds32.opt (mret-in-naked-func): New option.
11113 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
11115         PR target/85918
11116         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
11117         attributes.
11118         * config/i386/sse.md
11119         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
11120         Rename to ...
11121         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
11122         ... this.
11123         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
11124         Rename to ...
11125         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
11126         ... this.
11127         (*<floatsuffix>floatv2div2sf2): Rename to ...
11128         (*float<floatunssuffix>v2div2sf2): ... this.
11129         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
11130         (float<floatunssuffix>v2div2sf2_mask): ... this.
11131         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
11132         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
11133         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
11134         to ...
11135         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
11136         ... this.
11137         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11138         Rename to ...
11139         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
11140         ... this.
11141         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11142         Rename to ...
11143         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
11144         ... this.
11145         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
11146         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
11147         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
11148         gen_ufix_truncv8dfv8si2.
11149         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
11150         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
11151         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
11152         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
11153         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
11154         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
11155         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
11156         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
11158 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
11160         PR target/85900
11161         PR target/85345
11162         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
11164 2018-05-25  Jim Wilson  <jimw@sifive.com>
11166         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
11167         * config/riscv/riscv.c (struct machine_function): Add
11168         interrupt_handler_p and attribute_checked_p fields.
11169         (riscv_attribute_table): Add interrupt.
11170         (riscv_interrupt_type_p): New.
11171         (riscv_save_reg_p): Save extra regs for interrupt handler.
11172         (riscv_use_save_libcall): Return false  for interrupt handler.
11173         (riscv_first_stack_step): Add forward declaration.
11174         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
11175         for interrupt handler with large frame.  Use it for saved reg list.
11176         (riscv_expand_prologue): Move flag_stack_usage_info support to
11177         eliminate duplication.
11178         (riscv_expand_epilogue): Generate mret for interrupt handler.
11179         (riscv_epilogue_uses): New.
11180         (riscv_can_use_return_insn): Return false for interrupt handler.
11181         (riscv_function_ok_for_sibcall): Likewise.
11182         (riscv_set_current_function): Add interrupt handler support.
11183         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
11184         * config/riscv/riscv.md (UNSPECV_MRET): New.
11185         (GP_REGNUM): New.
11186         (riscv_frflags, riscv_fsflags): Use tab after opcode.
11187         (riscv_mret): New.
11188         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
11190 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
11192         PR tree-optimization/85712
11193         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
11194         this candidate has already been replaced in-situ by a copy.
11196 2018-05-25  Jason Merrill  <jason@redhat.com>
11198         PR c++/80485 - inline function non-zero address.
11199         * symtab.c (nonzero_address): Check DECL_COMDAT.
11201 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
11203         PR target/83628
11204         * config/alpha/alpha.md (ashlsi3): New insn pattern.
11205         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
11206         extension of SImode operation.  Use const123_operand predicate.
11207         (*saddsi_1): Remove.
11208         (*saddl_se_1): Ditto.
11209         (*ssubsi_1): Ditto.
11210         (*ssubl_se_1): Ditto.
11211         * config/alpha/predicates.md (const123_operand): New predicate.
11212         * config/alpha/constraints.md (P): Use IN_RANGE.
11214 2018-05-25  Richard Biener  <rguenther@suse.de>
11216         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
11217         defaulted to true.
11218         (ref_maybe_used_by_stmt_p): Likewise.
11219         (stmt_may_clobber_ref_p): Likewise.
11220         (stmt_may_clobber_ref_p_1): Likewise.
11221         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
11222         and pass it along.
11223         (ref_maybe_used_by_stmt_p): Likewise.
11224         (stmt_may_clobber_ref_p): Likewise.
11225         (stmt_may_clobber_ref_p_1): Likewise.
11226         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
11227         the alias oracle to disambiguate DRs with stmts DR analysis
11228         couldn't handle.
11229         (vect_analyze_data_refs): Do not give up on not analyzable
11230         DRs for BB vectorization.  Remove code truncating the dataref
11231         vector.
11233 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
11235         PR target/85832
11236         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
11237         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
11238         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
11240 2018-05-25  Richard Biener  <rguenther@suse.de>
11242         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
11243         function, combining stmt data ref gathering and fatal analysis
11244         parts.
11245         (vect_analyze_data_refs): Remove now redudnant code and simplify.
11246         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
11247         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
11248         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
11249         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
11251 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
11253         PR tree-optimization/85720
11254         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
11255         SCC if all partitions are builtins.
11256         (version_loop_by_alias_check): New parameter.  Generate cancelable
11257         runtime alias check if all partitions are builtins.
11258         (distribute_loop): Update call to above function.
11260 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
11262         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
11263         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
11264         (parm_default_def_partition_arg): Ditto.
11265         (set_parm_default_def_partition): Ditto.
11266         (get_parm_default_def_partitions): Ditto and make it static.
11267         (get_undefined_value_partitions): Ditto and make it static.
11268         (remove_ssa_form): Refactor call to init_var_map here.
11269         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
11270         computation for loop region.
11271         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
11272         (register_default_def): Delete.
11273         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
11274         (parm_default_def_partition_arg): Ditto.
11275         (set_parm_default_def_partition): Ditto.
11276         (get_parm_default_def_partitions): Ditto and make it static.
11277         (get_undefined_value_partitions): Ditto and make it static.
11278         (coalesce_with_default, coalesce_with_default): Update comment.
11279         (create_coalesce_list_for_region): New func factored out from
11280         create_outofssa_var_map.
11281         (populate_coalesce_list_for_outofssa): New func factored out from
11282         create_outofssa_var_map and coalesce_ssa_name.
11283         (create_outofssa_var_map): Delete.
11284         (coalesce_ssa_name): Refactor to support live range computation.
11285         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
11286         (get_parm_default_def_partitions): Delete.
11287         (get_undefined_value_partitions): Ditto.
11288         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
11289         computation for loop region.
11290         (new_tree_live_info, loe_visit_block): Ditto.
11291         (live_worklist, set_var_live_on_entry): Ditto.
11292         (calculate_live_on_exit, verify_live_on_entry): Ditto.
11293         * tree-ssa-live.h (struct _var_map): New fields.
11294         (init_var_map): Change decl.
11295         (region_contains_p): New.
11297 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
11299         * tree-ssa-live.h (live_merge_and_clear): Delete.
11301 2018-05-25  Richard Biener  <rguenther@suse.de>
11303         PR c++/85912
11304         * tree-dump.c (dequeue_and_dump): Remove access to removed
11305         operand 2 of a SWITCH_EXPR.
11307 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
11309         * doc/sourcebuild.texi (vect_double_cond_arith): Include
11310         multiplication and division.
11311         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
11312         (cond_udiv@var{m}, cond_umod@var{m}): Document.
11313         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
11314         (cond_udiv_optab, cond_umod_optab): New optabs.
11315         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
11316         (IFN_COND_RDIV): New internal functions.
11317         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
11318         TRUNC_MOD_EXPR and RDIV_EXPR.
11319         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
11320         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
11321         New unspecs.
11322         (SVE_INT_BINARY): Include mult.
11323         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
11324         (optab, sve_int_op): Handle mult.
11325         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
11326         UNSPEC_COND_DIV.
11327         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
11328         for SVE_INT_BINARY_SD.
11330 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
11332         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
11333         (optab, sve_int_op): Handle div and udiv.
11334         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
11335         for SVE_INT_BINARY_SD.
11336         (*<optab><mode>3): New insn for the same.
11338 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
11340         * tree-vect-patterns.c: Include predict.h.
11341         (vect_recog_divmod_pattern): Restrict check for division support
11342         to when optimizing for size.
11344 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
11346         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
11347         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
11348         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
11349         (gimple_match_op::set_op): Likewise.
11350         (gimple_resimplify4): Declare.
11351         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
11352         (expr::gen_transform): Likewise.
11353         (decision_tree::gen): Generate a simplification routine for 4 operands.
11354         * gimple-match-head.c (gimple_simplify): Add an overload for
11355         4 operands.  In the top-level function, handle up to 4 call
11356         arguments and call gimple_resimplify4.
11357         (gimple_resimplify4): New function.
11358         (build_call_internal): Pass a fourth operand.
11359         (maybe_push_to_seq): Likewise.
11360         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
11361         Fold VEC_COND_EXPRs of an operation and a default value into
11362         an IFN_COND_* function if possible.
11363         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
11364         New unspecs.
11365         (SVE_COND_FP_BINARY): Include them.
11366         (optab, sve_fp_op): Handle them.
11367         (SVE_INT_BINARY_REV): New code iterator.
11368         (SVE_COND_FP_BINARY_REV): New int iterator.
11369         (commutative): New int attribute.
11370         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
11371         Declare.
11372         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
11373         function.
11374         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
11375         (*cond_<optab><mode>): New patterns for reversed operands.
11377 2018-05-25  Richard Biener  <rguenther@suse.de>
11379         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
11380         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
11381         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
11382         (STMT_VINFO_GROUPED_ACCESS): Adjust.
11383         * tree-vect-data-refs.c (everywhere): Adjust users.
11384         * tree-vect-loop.c (everywhere): Likewise.
11385         * tree-vect-slp.c (everywhere): Likewise.
11386         * tree-vect-stmts.c (everywhere): Likewise.
11387         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
11389 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11391         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
11392         Rename to...
11393         (gcc_cv_as_section_exclude): ... this.
11394         Try Solaris as #exclude syntax.
11395         * configure: Regenerate.
11396         * config.in: Regenerate.
11397         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
11398         SECTION_EXCLUDE.
11399         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
11400         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
11402         * varasm.c (default_elf_asm_named_section): Don't check if
11403         HAVE_GAS_SECTION_EXCLUDE is defined.
11405 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
11407         * doc/md.texi: Update the documentation of the cond_* optabs
11408         to mention the new final operand.  Fix GET_MODE_NUNITS call.
11409         Describe the scalar case too.
11410         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
11411         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
11412         instead of 2.
11413         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
11414         (get_conditional_internal_fn): Update comment.
11415         * tree-vect-loop.c (vectorizable_reduction): Pass the original
11416         accumulator value as a final argument to conditional functions.
11417         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
11418         a define_expand and add an "else" operand.  Assert for now that
11419         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
11420         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
11421         (*cond_<optab><mode>): New patterns.
11422         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
11423         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
11424         (UNSPEC_COND_EOR): Delete.
11425         (optab): Remove associated mappings.
11426         (SVE_INT_BINARY): New code iterator.
11427         (sve_int_op): Remove int attribute and add "minus" to the code
11428         attribute.
11429         (SVE_COND_INT_OP): Delete.
11430         (SVE_COND_FP_OP): Rename to...
11431         (SVE_COND_FP_BINARY): ...this.
11433 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
11435         * optabs.c (can_reuse_operands_p): New function.
11436         (maybe_legitimize_operands): Try to reuse the results for
11437         earlier operands.
11439 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
11441         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
11442         Add {q} suffix to insn mnemonic.
11444 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
11446         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
11447         (msp430_warn_func_return): New.
11449 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
11451         * fold-const.c (tree_nonzero_bits): New function.
11452         * fold-const.h (tree_nonzero_bits): Likewise.
11453         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
11454         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
11456 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
11458         PR target/85900
11459         PR target/85345
11460         * varasm.c (assemble_alias): Check ifunc_resolver only on
11461         FUNCTION_DECL.
11463 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
11465         PR target/85903
11466         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
11467         when memory input operand is handled.
11469 2018-05-24  Luis Machado  <luis.machado@linaro.org>
11471         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
11472         global.
11473         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
11475 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
11477         * match.pd: Delay FMA folds until after vectorization.
11479 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
11481         PR target/83009
11482         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11483         address check not strict.
11485 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
11487         * gimple-match.h (gimple_match_op): New class.
11488         (mprts_hook): Replace parameters with a gimple_match_op *.
11489         (maybe_build_generic_op): Likewise.
11490         (gimple_simplified_result_is_gimple_val): Replace parameters with
11491         a const gimple_match_op *.
11492         (gimple_simplify): Replace code_helper * and tree * parameters with
11493         a gimple_match_op * parameter.
11494         (gimple_resimplify1): Replace code_helper *, tree and tree *
11495         parameters with a gimple_match_op * parameter.
11496         (gimple_resimplify2): Likewise.
11497         (gimple_resimplify3): Likewise.
11498         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
11499         parameters with a gimple_match_op * parameter.
11500         * gimple-match-head.c (gimple_simplify): Change prototypes of
11501         auto-generated functions to take a gimple_match_op * instead of
11502         separate code_helper * and tree * parameters.  Make the same
11503         change in the top-level overload and update calls to the
11504         gimple_resimplify routines.  Update calls to the auto-generated
11505         functions and to maybe_push_res_to_seq in the publicly-facing
11506         operation-specific gimple_simplify overloads.
11507         (gimple_match_op::MAX_NUM_OPS): Define.
11508         (gimple_resimplify1): Replace rcode and ops with a single res_op
11509         parameter.  Update call to gimple_simplify.
11510         (gimple_resimplify2): Likewise.
11511         (gimple_resimplify3): Likewise.
11512         (mprts_hook): Replace parameters with a gimple_match_op *.
11513         (maybe_build_generic_op): Likewise.
11514         (build_call_internal): Replace type, nargs and ops with
11515         a gimple_match_op *.
11516         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
11517         with a single gimple_match_op *.  Update calls to mprts_hook,
11518         build_call_internal and gimple_simplified_result_is_gimple_val.
11519         Factor out code that is common to the tree_code and combined_fn cases.
11520         * genmatch.c (expr::gen_transform): Replace tem_code and
11521         tem_ops with a gimple_match_op called tem_op.  Update calls
11522         to the gimple_resimplify functions and maybe_push_res_to_seq.
11523         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
11524         res_ops.  Update call to the gimple_resimplify functions.
11525         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
11526         (decision_tree::gen): Make the functions take a gimple_match_op *
11527         called res_op instead of separate res_code and res_ops parameters.
11528         Update call accordingly.
11529         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
11530         and ops with a single res_op parameter.  Update calls to
11531         maybe_build_generic_op and maybe_push_res_to_seq.
11532         (fold_stmt_1): Update calls to gimple_simplify and
11533         replace_stmt_with_simplification.
11534         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
11535         and gimple_simplified_result_is_gimple_val.
11536         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
11537         gimple_simplify.
11538         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
11539         with a gimple_match_op *.
11540         (vn_nary_build_or_lookup): Likewise.  Update call to
11541         vn_nary_build_or_lookup_1.
11542         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
11543         gimple_match_op *.  Update calls to the gimple_resimplify routines
11544         and to gimple_simplified_result_is_gimple_val.
11545         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
11546         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
11547         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
11548         (visit_nary_op): Likewise.
11549         (visit_reference_op_load): Likewise.
11551 2018-05-23  Luis Machado  <luis.machado@linaro.org>
11553         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
11554         modifier for printing the step amount.
11556 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
11558         PR target/78849
11559         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
11560         types.
11562 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
11564         * doc/sourcebuild.texi (Endianness): New subsubsection.
11566 2018-05-23  Luis Machado  <luis.machado@linaro.org>
11568         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11569         <prefetch_dynamic_strides>: New const bool field.
11570         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11571         prefetch_dynamic_strides.
11572         (exynosm1_prefetch_tune): Likewise.
11573         (thunderxt88_prefetch_tune): Likewise.
11574         (thunderx_prefetch_tune): Likewise.
11575         (thunderx2t99_prefetch_tune): Likewise.
11576         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
11577         false.
11578         (aarch64_override_options_internal): Update to set
11579         PARAM_PREFETCH_DYNAMIC_STRIDES.
11580         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
11581         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
11582         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
11583         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
11584         prefetch-dynamic-strides setting.
11586 2018-05-23  Luis Machado  <luis.machado@linaro.org>
11588         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
11589         <minimum_stride>: New const int field.
11590         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
11591         minimum_stride field defaulting to -1.
11592         (exynosm1_prefetch_tune): Likewise.
11593         (thunderxt88_prefetch_tune): Likewise.
11594         (thunderx_prefetch_tune): Likewise.
11595         (thunderx2t99_prefetch_tune): Likewise.
11596         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
11597         <default_opt_level>: Set to 3.
11598         (aarch64_override_options_internal): Update to set
11599         PARAM_PREFETCH_MINIMUM_STRIDE.
11600         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
11601         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
11602         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
11603         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
11604         stride is constant and is below the minimum stride threshold.
11606 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11608         * config/arm/arm-cpus.in (mode26): Delete.
11609         (armv4): Delete mode26 reference.
11610         * config/arm/arm.c (arm_configure_build_target): Delete use of
11611         isa_bit_mode26.
11613 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
11615         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
11616         New insn pattern.
11617         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
11618         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
11619         for non-SSE modes.
11620         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
11621         (floatunsdidf2): Ditto.
11623 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
11625         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
11626         (fixuns_trunc<mode>si2_avx512f): Ditto.
11627         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
11628         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
11629         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
11631 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
11633         PR rtl-optimization/79985
11634         * df-scan.c (df_insn_refs_collect): Remove special case for
11635         global registers and asm statements.
11637 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
11639         * extend.texi (Global Register Variables): Rewrite the bullet list.
11640         Note that the register is available for allocation. Note that access
11641         via inline asm must use constraints. Add note about async-signal
11642         handlers. Remove paragraph about automagic register selection.
11644 2018-05-23  Richard Biener  <rguenther@suse.de>
11646         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
11647         of fixed offset from memset VN.
11649 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
11651         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
11652         first_interp field.
11653         (alloc_cand_and_find_basis): Initialize first_interp field.
11654         (slsr_process_mul): Modify first_interp field.
11655         (slsr_process_add): Likewise.
11656         (slsr_process_cast): Modify first_interp field for each new
11657         interpretation.
11658         (slsr_process_copy): Likewise.
11659         (dump_candidate): Dump first_interp field.
11660         (replace_mult_candidate): Process all interpretations, not just
11661         subsequent ones.
11662         (replace_rhs_if_not_dup): Likewise.
11663         (replace_one_candidate): Likewise.
11665 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
11667         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
11668         Add new boolean.
11669         (aarch64_needs_frame_chain): New function.
11670         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
11672 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
11674         PR target/84882
11675         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
11676         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
11677         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
11678         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
11679         as true for strict-align.
11680         (aarch64_can_inline_p): Perform checks even when callee has no
11681         attributes to check for strict alignment.
11682         * doc/extend.texi (AArch64 Function Attributes): Document
11683         no-strict-align.
11684         * doc/invoke.texi: (AArch64 Options): Likewise.
11686 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
11688         PR tree-optimization/85853
11689         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
11690         the handling of the root of the node to...
11691         (vect_slp_analyze_node_operations_1): ...this new function,
11692         and run the whole thing with the child nodes' def types
11693         set according to their SLP node's def type.
11695 2018-05-23  Richard Biener  <rguenther@suse.de>
11697         PR middle-end/85874
11698         * tree-data-ref.c (create_runtime_alias_checks): Defer
11699         and ignore overflow warnings.
11701 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
11703         PR tree-optimization/85822
11704         * tree-vrp.c (is_masked_range_test): Fix handling of negative
11705         constants.
11707 2018-05-23  Richard Biener  <rguenther@suse.de>
11709         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
11710         memset constants via native_interpret_expr.
11712 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
11714         PR target/85345
11715         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
11716         attribute.
11717         (cgraph_node::create_alias): Likewise.
11718         (cgraph_node::get_availability): Check ifunc_resolver instead
11719         of looking up ifunc attribute.
11720         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
11721         * varasm.c (do_assemble_alias): Likewise.
11722         (assemble_alias): Likewise.
11723         (default_binds_local_p_3): Likewise.
11724         * cgraph.h (cgraph_node): Add ifunc_resolver.
11725         (cgraph_node::only_called_directly_or_aliased_p): Return false
11726         for IFUNC resolver.
11727         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
11728         attribute.
11729         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
11730         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
11731         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
11732         instead of looking up ifunc attribute.
11734 2018-05-22  Luis Machado  <luis.machado@linaro.org>
11736         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
11738 2018-05-22  Martin Sebor  <msebor@redhat.com>
11740         PR middle-end/85359
11741         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
11742         only when expasion succeeds.
11743         (expand_builtin_strcmp): Same.
11744         (expand_builtin_strncmp): Same.
11746 2018-05-22  Martin Sebor  <msebor@redhat.com>
11748         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
11750 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
11751             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11753         * config/aarch64/aarch64-ldpstp.md: Replace uses of
11754         aarch64_mem_pair_operand with memory_operand and delete operand swapping
11755         code.
11756         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11757         Add check for legitimate_address.
11758         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
11759         (aarch64_swap_ldrstr_operands): New.
11760         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
11761         Define prototype.
11763 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
11764             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11766         * config/aarch64/aarch64.md: New patterns to generate stp
11767         and ldp.
11768         (store_pair_sw, store_pair_dw): New patterns to generate stp for
11769         single words and double words.
11770         (load_pair_sw, load_pair_dw): Likewise.
11771         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
11772         Delete.
11773         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
11774         Delete.
11775         * config/aarch64/aarch64-ldpstp.md: Modify peephole
11776         for different mode ldpstp and add peephole for merged zero stores.
11777         Likewise for loads.
11778         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
11779         Add size check.
11780         (aarch64_gen_store_pair): Rename calls to match new patterns.
11781         (aarch64_gen_load_pair): Rename calls to match new patterns.
11782         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
11783         (load_pair<DREG:mode><DREG2:mode>): ... This.
11784         (store_pair<mode>): Rename to...
11785         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
11786         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
11787         New mode iterators.
11788         (V_INT_EQUIV): Handle SImode.
11789         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
11790         New predicate.
11792 2018-05-22  Martin Sebor  <msebor@redhat.com>
11794         PR c/85623
11795         * calls.c (maybe_warn_nonstring_arg): Use string length to set
11796         or ajust the presumed bound on an operation to avoid unnecessary
11797         warnings.
11799 2018-05-22  Martin Sebor  <msebor@redhat.com>
11801         PR tree-optimization/85826
11802         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
11803         assuming that a DECL necesarily has a constant size.
11805 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
11807         PR middle-end/85862
11808         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
11810 2018-05-22  Richard Biener  <rguenther@suse.de>
11812         PR tree-optimization/85834
11813         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
11814         non-constant and non-zero memset arguments.
11816 2018-05-22  Martin Liska  <mliska@suse.cz>
11818         PR ipa/85607
11819         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
11821 2018-05-22  Richard Biener  <rguenther@suse.de>
11823         PR tree-optimization/85863
11824         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
11825         comparisons when vectype is specified.
11826         (vectorizable_condition): Do not specify vectype for
11827         vect_is_simple_cond when SLP vectorizing.
11829 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
11831         PR target/85657
11832         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
11833         define __ibm128 as long double.
11834         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
11835         as a distinct type when IEEE 128-bit support is enabled.
11836         (init_float128_ieee): Fix up conversions between IFmode and IEEE
11837         128-bit types to use the correct functions.
11838         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
11839         convert between 128-bit floating point types that have different
11840         modes but the same representation, instead of using gen_lowpart to
11841         makean alias.
11842         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
11843         KFmode.
11844         (IFKF_reg): New attributes to give the register constraints for
11845         IFmode and KFmode.
11846         (extend<mode>tf2_internal): New insns to mark an explicit
11847         conversion between 128-bit floating point types that have a
11848         different mode but share the same representation.
11850 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
11852         PR tree-optimization/85814
11853         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
11854         a null return from get_strinfo when unsharing the next
11855         strinfo in the chain.
11857 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
11859         PR gcc/84923
11860         * varasm.c (weak_finish): Clean up weak_decls.
11862 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11864         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
11865         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
11866         UNSPEC_UADALP values.
11867         * config/aarch64/iterators.md (ABAL): New int iterator.
11868         (ABDL2): Likewise.
11869         (ADALP): Likewise.
11870         (sur): Add mappings for the above.
11871         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
11872         New define_insn.
11873         (aarch64_<sur>abal<mode>_4): Likewise.
11874         (aarch64_<sur>adalp<mode>_3): Likewise.
11875         (<sur>sadv16qi): New define_expand.
11877 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
11879         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
11880         (*movdf_internal): Ditto.
11881         (*rcpsf2_sse): Ditto.
11882         (*rsqrtsf2_sse): Ditto.
11883         (*sqrt<mode>2_sse): Ditto.
11885 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
11887         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
11888         eor3q<mode>4.
11889         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
11890         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
11891         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
11892         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
11893         vbcaxq_s64): New.
11894         * config/aarch64/arm_neon.h: Likewise.
11895         * config/aarch64/iterators.md (VQ_I): New.
11897 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
11899         * config.gcc: Add arc/t-multilib-linux to tmake_file for
11900         arc*-*-linux*.
11901         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
11902         MULTILIB_DIRNAMES
11904 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
11906         * config/nds32/constraints.md (S): New constraint.
11907         * config/nds32/nds32.md (call_internal): Use constraint S.
11908         (call_value_internal): Likewise.
11909         (sibcall_internal): Likewise.
11910         (sibcall_value_internal): Likewise.
11912 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
11913             Chung-Ju Wu  <jasonwucj@gmail.com>
11915         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
11916         into consideration.
11918 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
11919             Chung-Ju Wu  <jasonwucj@gmail.com>
11921         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
11922         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
11923         (nds32_rtx_costs_impl): Simplify.
11924         (nds32_address_cost_impl): Simplify.
11925         (nds32_init_rtx_costs): New function.
11926         (nds32_rtx_costs_speed_prefer): Likewise.
11927         (nds32_rtx_costs_size_prefer): Likewise.
11928         (nds32_address_cost_speed_prefer): Likewise.
11929         (nds32_address_cost_speed_fwprop): Likewise.
11930         (nds32_address_cost_size_prefer): Likewise.
11931         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
11932         * config/nds32/nds32.c (nds32_option_override): Use
11933         nds32_init_rtx_costs function.
11935 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
11937         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
11938         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
11939         (TARGET_PIPELINE_N8): Likewise.
11940         (TARGET_PIPELINE_N10): Likewise.
11941         (TARGET_PIPELINE_N13): Likewise.
11942         (TARGET_PIPELINE_GRAYWOLF): Likewise.
11944 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
11946         * config/nds32/nds32-fpu.md: Update copyright year.
11948 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
11950         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
11952 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
11954         * config/nds32/nds32.c
11955         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
11956         * config/nds32/nds32.opt (minline-asm-r15): New option.
11958 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
11960         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
11961         MASK_HW_ABS.
11962         * config/nds32/nds32.md (abssi2): New pattern.
11964 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
11966         * config/i386/i386.md (rex64namesuffix): New mode attribute.
11967         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
11968         Merge insn pattern from sse_cvtsi2ss<round_name> and
11969         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
11970         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
11971         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
11972         using SWI48 mode iterator.
11973         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
11974         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
11975         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
11976         pattern from sse_cvttss2si<round_saeonly_name>
11977         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
11978         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
11979         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
11980         using SWI48 mode iterator.
11981         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
11982         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
11983         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
11984         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
11985         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
11986         using SWI48 mode iterator.
11987         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
11988         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
11989         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
11990         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
11991         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
11992         SWI48 mode iterator.
11993         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
11994         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
11995         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
11996         pattern from sse_cvttsd2si<round_saeonly_name>
11997         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
11999 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
12001         * config/nds32/nds32-md-auxiliary.c
12002         (nds32_valid_smw_lwm_base_p): Refine.
12003         (nds32_output_smw_single_word): Refine.
12004         (nds32_output_smw_double_word): New.
12005         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
12007 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
12009         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
12010         (nds32_output_stack_pop): Refine.
12011         (nds32_expand_unaligned_load): Refine.
12012         (nds32_expand_unaligned_store): Refine.
12014 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
12015             Chung-Ju Wu  <jasonwucj@gmail.com>
12017         * config/nds32/constants.md: Add TP_REGNUM constant.
12018         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
12019         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
12020         UNSPEC_ADD32.
12021         * config/nds32/nds32-doubleword.md: Consider flag_pic.
12022         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
12023         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
12024         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
12025         and PIC code generation.
12026         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
12027         code generation.
12028         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
12029         optimization.
12030         * config/nds32/nds32.md: Support TLS and PIC.
12031         * config/nds32/nds32.c: Support TLS and PIC.
12032         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
12033         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
12034         predicate.
12036 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
12038         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
12039         mode with E_ prefix.
12041 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
12042             Chung-Ju Wu  <jasonwucj@gmail.com>
12044         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
12045         * config/nds32/nds32-md-auxiliary.c
12046         (symbolic_reference_mentioned_p): New.
12047         (nds32_legitimize_ict_address): New.
12048         (nds32_expand_ict_move): New.
12049         (nds32_indirect_call_referenced_p): New.
12050         (nds32_symbol_binds_local_p): Delete.
12051         (nds32_long_call_p): Modify.
12052         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
12053         * config/nds32/nds32-protos.h
12054         (symbolic_reference_mentioned_p): Declare.
12055         (nds32_legitimize_ict_address): Declare.
12056         (nds32_expand_ict_move): Declare.
12057         (nds32_indirect_call_referenced_p): Declare.
12058         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
12059         (nds32_relax_group): Use nds32_ict_const_p as condition.
12060         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
12061         (nds32_asm_file_start): Output ict_model directive in asm code.
12062         (nds32_legitimate_address_p): Consider indirect call.
12063         (nds32_print_operand): Consider indirect call.
12064         (nds32_print_operand_address): Consider indirect call.
12065         (nds32_insert_attributes): Handle "indirect_call" attribute.
12066         (TARGET_LEGITIMATE_ADDRESS_P): Define.
12067         (TARGET_LEGITIMATE_CONSTANT_P): Define.
12068         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
12069         (TARGET_DELEGITIMIZE_ADDRESS): Define.
12070         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
12071         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
12072         (TARGET_ICT_MODEL_SMALL): Define.
12073         (TARGET_ICT_MODEL_LARGE): Define.
12074         * config/nds32/nds32.md (movsi): Consider ict model.
12075         (call, call_value): Consider ict model.
12076         (sibcall, sibcall_value): Consider ict model.
12077         * config/nds32/nds32.opt (mict-model): New option.
12078         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
12079         model.
12081 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
12082             Monk Chiang  <sh.chiang04@gmail.com>
12083             Jim Wilson <jimw@sifive.com>
12085         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
12086         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
12087         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
12088         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
12089         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
12090         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
12091         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
12092         compute save_libcall_adjustment properly.
12093         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
12094         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
12095         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
12096         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
12097         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
12098         (ABI_SPEC): Handle mabi=ilp32e.
12099         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
12100         (RVE): Add RVE mask.
12101         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
12102         <-march>: Add rv32e as an example.
12104 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
12106         PR c++/82899
12107         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
12108         (intra_create_variable_infos): Handle C++ constructors.
12110 2018-05-18  Martin Liska  <mliska@suse.cz>
12112         * passes.def: Remove a redundant pass.
12114 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
12116         PR bootstrap/85838
12117         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
12119 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12121         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
12122         (ARMv4): Update.
12123         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
12124         (ARMv6m): Update.
12125         (armv2, armv2a, armv3, armv3m): Delete architectures.
12126         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
12127         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
12128         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
12129         Delete cpus.
12130         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
12131         (*mulsidi3adddi): Likewise.
12132         (mulsidi3): Likewise.
12133         (*mulsidi3_nov6): Likewise.
12134         (umulsidi3): Likewise.
12135         (umulsidi3_nov6): Likewise.
12136         (umaddsidi4): Likewise.
12137         (*umulsidi3adddi): Likewise.
12138         (smulsi3_highpart): Likewise.
12139         (*smulsi3_highpart_nov6): Likewise.
12140         (umulsi3_highpart): Likewise.
12141         (*umulsi3_highpart_nov6): Likewise.
12142         * config/arm/arm.h (arm_arch3m): Delete.
12143         * config/arm/arm.c (arm_arch3m): Delete.
12144         (arm_option_override_internal): Update armv3-related comment.
12145         (arm_configure_build_target): Delete use of isa_bit_mode32.
12146         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
12147         (arm_rtx_costs_internal): Delete check of arm_arch3m.
12148         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
12149         (mulsa3): Likewise.
12150         (mulusa3): Likewise.
12151         * config/arm/arm-protos.h (arm_arch3m): Delete.
12152         * config/arm/arm-tables.opt: Regenerate.
12153         * config/arm/arm-tune.md: Likewise.
12154         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
12155         deleted architectures.
12157 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12159         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
12160         (armv5t, armv5te): New features.
12161         (ARMv5, ARMv5e): Delete fgroups.
12162         (ARMv5t, ARMv5te): Adjust for above changes.
12163         (ARMv6m): Likewise.
12164         (armv5, armv5e): Delete arches.
12165         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
12166         arm_arch5.
12167         (*call_reg_arm): Likewise.
12168         (*call_value_reg_armv5): Likewise.
12169         (*call_value_reg_arm): Likewise.
12170         (*call_symbol): Likewise.
12171         (*call_value_symbol): Likewise.
12172         (*sibcall_insn): Likewise.
12173         (*sibcall_value_insn): Likewise.
12174         (clzsi2): Likewise.
12175         (prefetch): Likewise.
12176         (define_split and define_peephole2 dependent on arm_arch5):
12177         Likewise.
12178         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
12179         arm_arch5e.
12180         (TARGET_ARM_QBIT): Likewise.
12181         (TARGET_DSP_MULTIPLY): Likewise.
12182         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
12183         (arm_arch5, arm_arch5e): Delete.
12184         (arm_arch5t, arm_arch5te): Declare.
12185         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
12186         (arm_arch5t): Declare.
12187         (arm_option_reconfigure_globals): Update for the above.
12188         (arm_options_perform_arch_sanity_checks): Update comment, replace
12189         use of arm_arch5 with arm_arch5t.
12190         (use_return_insn): Likewise.
12191         (arm_emit_call_insn): Likewise.
12192         (output_return_instruction): Likewise.
12193         (arm_final_prescan_insn): Likewise.
12194         (arm_coproc_builtin_available): Likewise.
12195         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
12196         arm_arch5e with arm_arch5t and arm_arch5te.
12197         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
12198         (arm_arch5t, arm_arch5te): Declare.
12199         * config/arm/arm-tables.opt: Regenerate.
12200         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
12201         * config/arm/t-multilib: Likewise.
12202         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
12203         instead of arm_arch5.
12204         (*call_reg_thumb1): Likewise.
12205         (*call_value_reg_thumb1_v5): Likewise.
12206         (*call_value_reg_thumb1): Likewise.
12207         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
12208         unreachable path.
12209         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
12211 2018-05-18  Martin Liska  <mliska@suse.cz>
12213         PR gcov-profile/84846
12214         * doc/gcov.texi: Document -t option of gcov tool.
12216 2018-05-18  Martin Liska  <mliska@suse.cz>
12218         PR gcov-profile/84846
12219         * gcov.c (print_usage): Add new -t option.
12220         (process_args): Handle the option.
12221         (generate_results): Use stdout as output when requested by
12222         the option.
12224 2018-05-18  Martin Liska  <mliska@suse.cz>
12226         PR gcov-profile/84846
12227         * coverage.c (coverage_init): Write PWD to .gcno file.
12228         * doc/gcov.texi: Document how working directory is printed.
12229         * gcov-dump.c (dump_gcov_file): Print PWD.
12230         * gcov.c (output_intermediate_file): Likewise.
12231         (read_graph_file): Read PWD string.
12232         (output_lines): Print PWD.
12234 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12236         PR middle-end/85817
12237         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
12238         for retval and return false if all args to phi are zero.
12240 2018-05-18  Richard Biener  <rguenther@suse.de>
12242         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
12243         method.
12244         (evrp_dom_walker::before_dom_children): Call it.
12246 2018-05-18  Richard Biener  <rguenther@suse.de>
12248         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
12249         results when processing array refs with variable index.
12251 2018-05-18  Toon Moene  <toon@moene.org>
12253         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
12254         directly after that of -floop-interchange. Indicate that both
12255         options are enabled by default when specifying -O3.
12257 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12259         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
12260         iterator.  Delete separate integer-mode vec_set<mode> expander.
12261         (aarch64_simd_vec_setv2di): Delete.
12262         (vec_setv2di): Delete.
12263         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
12264         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
12265         the "w, r" alternative.
12267 2018-05-18  Martin Liska  <mliska@suse.cz>
12269         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
12270         * tree-pass.h (make_pass_lower_switch_O0): New function.
12271         * tree-switch-conversion.c (node_has_low_bound): Remove.
12272         (node_has_high_bound): Likewise.
12273         (node_is_bounded): Likewise.
12274         (class pass_lower_switch): Make it a template type and create
12275         two instances.
12276         (pass_lower_switch::execute): Add template argument.
12277         (make_pass_lower_switch): New function.
12278         (make_pass_lower_switch_O0): New function.
12279         (do_jump_if_equal): Remove.
12280         (emit_case_nodes): Simplify to just handle all 3 cases and leave
12281         all the hard work to tree optimization passes.
12283 2018-05-18  Martin Liska  <mliska@suse.cz>
12285         * dbgcnt.c (limit_low): Renamed from limit.
12286         (limit_high): New variable.
12287         (dbg_cnt_is_enabled): Check for upper limit.
12288         (dbg_cnt): Adjust dumping.
12289         (dbg_cnt_set_limit_by_index): Add new argument for high
12290         value.
12291         (dbg_cnt_set_limit_by_name): Likewise.
12292         (dbg_cnt_process_single_pair): Parse new format.
12293         (dbg_cnt_process_opt): Use strtok.
12294         (dbg_cnt_list_all_counters): Remove 'value' and add
12295         'limit_high'.
12296         * doc/invoke.texi: Document changes.
12298 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
12300         * doc/sourcebuild.texi (scalar_all_fma): Document.
12301         * tree.def (FMA_EXPR): Delete.
12302         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
12303         * internal-fn.c (ternary_direct): New macro.
12304         (expand_ternary_optab_fn): Likewise.
12305         (direct_ternary_optab_supported_p): Likewise.
12306         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
12307         * builtins.c (fold_builtin_fma): Delete.
12308         (fold_builtin_3): Don't call it.
12309         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
12310         * expr.c (expand_expr_real_2): Likewise.
12311         * fold-const.c (operand_equal_p): Likewise.
12312         (fold_ternary_loc): Likewise.
12313         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
12314         * gimple.c (DEFTREECODE): Likewise.
12315         * gimplify.c (gimplify_expr): Likewise.
12316         * optabs-tree.c (optab_for_tree_code): Likewise.
12317         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
12318         * tree-eh.c (operation_could_trap_p): Likewise.
12319         (stmt_could_throw_1_p): Likewise.
12320         * tree-inline.c (estimate_operator_cost): Likewise.
12321         * tree-pretty-print.c (dump_generic_node): Likewise.
12322         (op_code_prio): Likewise.
12323         * tree-ssa-loop-im.c (stmt_cost): Likewise.
12324         * tree-ssa-operands.c (get_expr_operands): Likewise.
12325         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
12326         * fold-const-call.h (fold_fma): Delete.
12327         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
12328         CFN_FNMA and CFN_FNMS.
12329         (fold_fma): Delete.
12330         * genmatch.c (combined_fn): New enum.
12331         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
12332         (commutative_op): New function.
12333         (commutate): Use it.  Handle more than 2 operands.
12334         (dt_operand::gen_gimple_expr): Use commutative_op.
12335         (parser::parse_expr): Allow :c to be used with non-binary
12336         operators if the commutative operand is known.
12337         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
12338         CFN_FMS, CFN_FNMA and CFN_FNMS.
12339         (backprop::process_assign_use): Remove FMA_EXPR handling.
12340         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
12341         (gen_hsa_fma): New function.
12342         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
12343         IFN_FNMA and IFN_FNMS.
12344         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
12345         * gimple-fold.h (follow_all_ssa_edges): Declare.
12346         * gimple-fold.c (follow_all_ssa_edges): New function.
12347         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
12348         gimple_build interface and use follow_all_ssa_edges to fold the result.
12349         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
12350         instead of checking for optabs directly.
12351         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
12352         rather than FMA_EXPRs.
12353         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
12354         call to IFN_FMA instead of an FMA_EXPR.
12356 2018-05-17  Jim Wilson  <jimw@sifive.com>
12358         * expr.c (do_tablejump): When converting index to Pmode, if we have a
12359         sign extended promoted subreg, and the range does not have the sign bit
12360         set, then do a sign extend.
12362         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
12363         test, check for sign extended subreg and/or constant operands, and
12364         do a sign extend in that case.
12366 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
12368         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
12369         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
12370         Add untyped.
12371         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
12372         Change logics_shift_reg to logics_shift_imm.
12373         (thunderx2t99_fp_loadpair_basic): Delete.
12374         (thunderx2t99_fp_storepair_basic): Delete.
12375         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
12376         (thunderx2t99_asimd_polynomial): Delete.
12377         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
12378         and neon_fp_mul_d_scalar_q.
12379         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
12380         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
12381         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
12382         (thunderx2t99_asimd_lut): Add missing tbl types.
12383         (thunderx2t99_asimd_ext): Delete.
12384         (thunderx2t99_asimd_load1_1_mult): Delete.
12385         (thunderx2t99_asimd_load1_2_mult): Delete.
12386         (thunderx2t99_asimd_load1_ldp): New.
12387         (thunderx2t99_asimd_load1): New.
12388         (thunderx2t99_asimd_load2): Add missing *load2* types.
12389         (thunderx2t99_asimd_load3): New.
12390         (thunderx2t99_asimd_load4): New.
12391         (thunderx2t99_asimd_store1_1_mult): Delete.
12392         (thunderx2t99_asimd_store1_2_mult): Delete.
12393         (thunderx2t99_asimd_store2_mult): Delete.
12394         (thunderx2t99_asimd_store2_onelane): Delete.
12395         (thunderx2t99_asimd_store_stp): New.
12396         (thunderx2t99_asimd_store1): New.
12397         (thunderx2t99_asimd_store2): New.
12398         (thunderx2t99_asimd_store3): New.
12399         (thunderx2t99_asimd_store4): New.
12401 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
12403         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
12404         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
12406 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
12407             Segher Boessenkool  <segher@kernel.crashing.org>
12409         PR target/85698
12410         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
12411         operand.
12413 2018-05-17  Richard Biener  <rguenther@suse.de>
12415         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
12416         for pruning loop and prune defs feeding only already visited PHIs.
12418 2018-05-17  Richard Biener  <rguenther@suse.de>
12420         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
12422 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
12423             Richard Biener  <rguenther@suse.de>
12425         PR tree-optimization/85793
12426         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
12427         for VMAT_ELEMENTWISE.
12429 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
12431         * internal-fn.h (lookup_internal_fn): Declare
12432         * internal-fn.c (lookup_internal_fn): New function.
12433         * gimple.c (gimple_build_call_from_tree): Handle calls to
12434         internal functions.
12435         * gimple-pretty-print.c (dump_gimple_call): Print "." before
12436         internal function names.
12437         * tree-pretty-print.c (dump_generic_node): Likewise.
12438         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
12440 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
12442         * gimple-fold.h (gimple_build): Make the function forms take
12443         combined_fn rather than built_in_function.
12444         (gimple_simplify): Likewise.
12445         * gimple-match-head.c (gimple_simplify): Likewise.
12446         * gimple-fold.c (gimple_build): Likewise.
12447         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
12448         rather than gimple_build_call_internal.
12449         (get_initial_defs_for_reduction): Likewise.
12450         (vect_create_epilog_for_reduction): Likewise.
12451         (vectorizable_live_operation): Likewise.
12453 2018-05-17  Martin Liska  <mliska@suse.cz>
12455         * gimple-ssa-sprintf.c (format_directive): Do not use
12456         space in between 'G_' and '('.
12458 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
12460         PR target/85323
12461         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
12462         even if the mask is not all ones.
12464         PR target/85323
12465         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
12466         vector.
12467         (ix86_gimple_fold_builtin): Likewise.
12469         PR target/85323
12470         * config/i386/i386.c: Include tree-vector-builder.h.
12471         (ix86_vector_shift_count): New function.
12472         (ix86_fold_builtin): Fold shift builtins by scalar count.
12473         (ix86_gimple_fold_builtin): Likewise.
12475         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
12476         _mm512_setzero): New intrinsics.
12478 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
12479             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12481         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
12482         code generation for cases where splatting a value is not useful.
12483         * simplify-rtx.c (simplify_ternary_operation): Simplify
12484         vec_merge across a vec_duplicate and a paradoxical subreg forming
12485         a vector mode to a vec_concat.
12487 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
12489         * config.gcc: Support "goldmont-plus".
12490         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12491         "goldmont-plus".
12492         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12493         PROCESSOR_GOLDMONT_PLUS.
12494         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
12495         (processor_target_table): Add "goldmont-plus".
12496         (PTA_GOLDMONT_PLUS): Define.
12497         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
12498         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
12499         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
12500         (fold_builtin_cpu): Add "goldmont-plus".
12501         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
12502         (ix86_option_override_internal): Add "goldmont-plus".
12503         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
12504         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
12505         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
12506         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
12508 2018-05-17  Richard Biener  <rguenther@suse.de>
12510         PR tree-optimization/85757
12511         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
12512         remove defs that only feed that PHI from further processing.
12514 2018-05-16  Jim Wilson  <jimw@sifive.com>
12516         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
12517         asterisk to name.
12518         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
12520 2018-05-16  Mark Wielaard  <mark@klomp.org>
12522         * dwarf2out.c (count_index_strings): New function.
12523         (output_indirect_strings): Call count_index_strings and generate
12524         header for dwarf_version >= 5.
12526 2018-05-16  Mark Wielaard  <mark@klomp.org>
12528         * dwarf2out.c (dwarf_FORM): New function.
12529         (set_indirect_string): Use dwarf_FORM.
12530         (reset_indirect_string): Likewise.
12531         (size_of_die): Likewise.
12532         (value_format): Likewise.
12533         (output_die): Likewise.
12534         (add_skeleton_AT_string): Likewise.
12535         (output_macinfo_op): Likewise.
12536         (index_string): Likewise.
12537         (output_index_string_offset): Likewise.
12538         (output_index_string): Likewise.
12539         (count_index_strings): Likewise.
12541 2018-05-16  Carl Love  <cel@us.ibm.com>
12543         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12544         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
12546 2018-05-16  Martin Jambor  <mjambor@suse.cz>
12548         * ipa-prop.c (ipa_free_all_edge_args): Remove.
12549         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
12551 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
12553         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
12554         (fnma<mode>4): Likewise.
12555         (fms<mode>4): Likewise.
12556         (fnms<mode>4): Likewise.
12557         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
12558         (aarch64_fnma<mode>4): Likewise.
12559         (aarch64_fms<mode>4): Likewise.
12560         (aarch64_fnms<mode>4): Likewise.
12561         (aarch64_fnmadd<mode>4): Likewise.
12563 2018-05-16  Jason Merrill  <jason@redhat.com>
12565         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
12567 2018-05-16  Richard Biener  <rguenther@suse.de>
12569         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
12570         (dump_stmt_cost): Declare.
12571         (add_stmt_cost): Dump cost we add.
12572         (add_stmt_costs): New function.
12573         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
12574         No longer exported.
12575         (vect_analyze_stmt): Adjust prototype.
12576         (vectorizable_condition): Likewise.
12577         (vectorizable_live_operation): Likewise.
12578         (vectorizable_reduction): Likewise.
12579         (vectorizable_induction): Likewise.
12580         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
12581         cost vector to pass to vectorizable_ and record afterwards.
12582         (vect_model_reduction_cost): Take cost vector argument and adjust.
12583         (vect_model_induction_cost): Likewise.
12584         (vectorizable_reduction): Likewise.
12585         (vectorizable_induction): Likewise.
12586         (vectorizable_live_operation): Likewise.
12587         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
12588         SLP_TREE_NUMBER_OF_VEC_STMTS.
12589         (vect_analyze_slp_cost_1): Remove.
12590         (vect_analyze_slp_cost): Likewise.
12591         (vect_slp_analyze_node_operations): Take visited args and
12592         a target cost vector.  Avoid processing already visited stmt sets.
12593         (vect_slp_analyze_operations): Use a local cost vector to gather
12594         costs and register those of non-discarded instances.
12595         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
12596         (vect_schedule_slp_instance): Remove copying of
12597         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
12598         zero.
12599         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
12600         adding cost.  Record cost entry location.
12601         (vect_prologue_cost_for_slp_op): Function to compute cost of
12602         a constant or invariant generated for SLP vect in the prologue,
12603         split out from vect_analyze_slp_cost_1.
12604         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
12605         (vect_model_promotion_demotion_cost): Likewise.
12606         (vect_model_store_cost): Likewise, make static.
12607         (vect_model_load_cost): Likewise.
12608         (vectorizable_bswap): Add cost vector arg and adjust.
12609         (vectorizable_call): Likewise.
12610         (vectorizable_simd_clone_call): Likewise.
12611         (vectorizable_conversion): Likewise.
12612         (vectorizable_assignment): Likewise.
12613         (vectorizable_shift): Likewise.
12614         (vectorizable_operation): Likewise.
12615         (vectorizable_store): Likewise.
12616         (vectorizable_load): Likewise.
12617         (vectorizable_condition): Likewise.
12618         (vectorizable_comparison): Likewise.
12619         (can_vectorize_live_stmts): Likewise.
12620         (vect_analyze_stmt): Likewise.
12621         (vect_transform_stmt): Adjust calls to vectorizable_*.
12622         * tree-vectorizer.c: Include gimple-pretty-print.h.
12623         (dump_stmt_cost): New function.
12625 2018-05-16  Richard Biener  <rguenther@suse.de>
12627         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
12628         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
12629         * tree-ssa-dse.c: Include tree-ssa-loop.h.
12630         (check_name): New callback.
12631         (dse_classify_store): Track cycles via a visited bitmap of PHI
12632         defs and simplify handling of in-loop and across loop dead stores
12633         and properly fail for loop-variant refs.  Handle byte-tracking with
12634         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
12635         limiting the walk.
12637 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
12639         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
12640         (vect_get_mask_type_for_stmt): Likewise.
12641         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
12642         split out from...
12643         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
12644         to determine the statement's vector type and the vector type that
12645         should be used for calculating nunits.  Deal with cases in which
12646         the type has to be deferred.
12647         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
12648         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
12649         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
12650         (vect_determine_vf_for_stmt): New functions, split out from...
12651         (vect_determine_vectorization_factor): ...here.
12652         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
12653         (vect_get_mask_type_for_stmt): New functions, split out from
12654         vect_determine_vectorization_factor.
12656 2018-05-16  Richard Biener  <rguenther@suse.de>
12658         * tree-cfg.c (verify_gimple_assign_ternary): Properly
12659         verify the [VEC_]COND_EXPR embedded comparison.
12661 2018-05-15  Martin Sebor  <msebor@redhat.com>
12663         PR tree-optimization/85753
12664         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
12665         RECORD_TYPE in addition to ARRAY_TYPE.
12667 2018-05-15  Martin Sebor  <msebor@redhat.com>
12669         PR middle-end/85643
12670         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
12672 2018-05-15  Richard Biener  <rguenther@suse.de>
12674         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
12675         add by_clobber_p one.  Change algorithm to collect all defs
12676         representing uses we need to walk and try reducing them to
12677         a single one before failing.
12678         (dse_dom_walker::dse_optimize_stmt): Adjust.
12680 2018-05-13  Mark Wielaard  <mark@klomp.org>
12682         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
12683         (size_of_loc_descr): Likewise.
12684         (output_loc_operands): Likewise.
12685         (output_loc_operands_raw): Likewise.
12686         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
12687         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
12688         (hash_loc_operands): Likewise.
12689         (compare_loc_operands): Likewise.
12691 2018-05-14  Mark Wielaard  <mark@klomp.org>
12693         * dwarf2out.c (count_index_addrs): New function.
12694         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
12696 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12698         PR tree-optimization/83648
12699         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
12700         return value as malloc candidate.
12702 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
12704         PR ipa/85734
12705         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
12706         param as true in call to suggest_attribute.
12708 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
12710         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
12711         -mreadonly-in-sdata.
12713 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12715         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
12716         New pattern.
12717         (aarch64_crypto_aesd_fused): Likewise.
12719 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
12721         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
12722         (movsi_aarch64): Likewise.
12723         (load_pairsi): Likewise.
12724         (load_pairdi): Likewise.
12725         (store_pairsi): Likewise.
12726         (store_pairdi): Likewise.
12727         (load_pairsf): Likewise.
12728         (load_pairdf): Likewise.
12729         (store_pairsf): Likewise.
12730         (store_pairdf): Likewise.
12731         (zero_extend): Likewise.
12732         (trunc): Swap alternatives.
12733         (fcvt_target): Add '?' to prefer w over r.
12735 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
12737         PR target/85756
12738         * config/i386/i386.md: Disallow non-commutative arithmetics in
12739         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
12740         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
12741         in the peephole2 before it.
12743 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
12745         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
12746         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
12747         (ix86_handle_option): Handle -mcldemote.
12748         * config.gcc: New header.
12749         * config/i386/cldemoteintrin.h: New file.
12750         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
12751         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
12752         -mcldemote.
12753         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12754         OPTION_MASK_ISA_CLDEMOTE.
12755         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
12756         (ix86_valid_target_attribute_inner_p): Ditto.
12757         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
12758         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
12759         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
12760         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
12761         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
12762         (cldemote): New.
12763         * config/i386/i386.opt: Add -mcldemote.
12764         * config/i386/x86intrin.h: New header.
12765         * doc/invoke.texi: Add -mcldemote.
12767 2018-05-14  Richard Biener  <rguenther@suse.de>
12769         * doc/match-and-simplify.texi: Adjust :s documentation.
12771 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
12773         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
12774         intended memcpy size.
12775         (REORDER_45): Likewise.
12777 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
12779         * sort.cc: New file.
12780         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
12781         * vec.c (qsort_chk): Use gcc_qsort.
12782         * Makefile.in (OBJS-libcommon): Add sort.o.
12783         (build/sort.o): New target.  Use it...
12784         (BUILD_RTL): ... here, and...
12785         (build/gencfn-macros): ... here, and...
12786         (build/genmatch): ... here.
12788 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
12789             Chung-Ju Wu  <jasonwucj@gmail.com>
12791         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
12792         * config/nds32/nds32-graywolf.md: New file.
12793         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
12794         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
12795         pipeline.
12796         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
12797         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
12798         * config/nds32/nds32.md (pipeline_model): Add graywolf.
12799         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
12800         * config/nds32/pipelines.md: Include n15 settings.
12802 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
12803             Chung-Ju Wu  <jasonwucj@gmail.com>
12805         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
12806         * config/nds32/nds32-n13.md: New file.
12807         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
12808         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
12809         pipeline.
12810         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
12811         * config/nds32/nds32.md (pipeline_model): Add n13.
12812         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
12813         * config/nds32/pipelines.md: Include n13 settings.
12815 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
12816             Chung-Ju Wu  <jasonwucj@gmail.com>
12818         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
12819         * config/nds32/nds32-n10.md: New file.
12820         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
12821         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
12822         pipeline.
12823         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
12824         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
12825         * config/nds32/nds32.md (pipeline_model): Add n10.
12826         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
12827         * config/nds32/pipelines.md: Include n10 settings.
12829 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
12830             Kito Cheng  <kito.cheng@gmail.com>
12831             Chung-Ju Wu  <jasonwucj@gmail.com>
12833         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
12834         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
12835         Add enum values for DSP extension instructions.
12836         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
12837         New constraints.
12838         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
12839         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
12840         New code iterators.
12841         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
12842         * config/nds32/nds32-dspext.md: New file for DSP implementation.
12843         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
12844         * config/nds32/nds32-intrinsic.md: Likewise.
12845         * config/nds32/nds32_intrinsic.h: Likewise.
12846         * config/nds32/nds32-md-auxiliary.c: Likewise.
12847         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
12848         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
12849         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
12850         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
12851         * config/nds32/nds32-protos.h: New declarations for DSP extension.
12852         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
12853         TYPE_DMAC in switch statement.
12854         * config/nds32/nds32.c: New checking and implementation for DSP
12855         extension instructions.
12856         * config/nds32/nds32.h: Likewise.
12857         * config/nds32/nds32.md: Likewise.
12858         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
12859         * config/nds32/predicates.md: Implement new predicates for DSP
12860         extension.
12862 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
12864         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
12865         Reformat alternatives and attributes so it is easier to identify
12866         which constraints/attributes go with which instruction.
12867         (mov<mode>_hardfloat32, FMOVE64): Likewise.
12868         (mov<mode>_softfloat32, FMOVE64): Likewise.
12869         (mov<mode>_hardfloat64, FMOVE64): Likewise.
12870         (mov<mode>_softfloat64, FMOVE64): Likewise.
12872 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12874         * doc/extend.texi (PowerPC Built-in Functions): Rename this
12875         subsection.
12876         (Basic PowerPC Built-in Functions): The new name of the
12877         subsection previously known as "PowerPC Built-in Functions".
12878         (Basic PowerPC Built-in Functions Available on all Configurations):
12879         New subsubsection.
12880         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
12881         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
12882         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
12883         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
12885 2018-05-11  Martin Jambor  <mjambor@suse.cz>
12887         PR ipa/85655
12888         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
12889         single const.
12891 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
12893         PR target/85733
12894         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
12896 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
12898         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
12899         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
12900         (ix86_handle_option): Handle -mwaitpkg.
12901         * config.gcc: New header.
12902         * config/i386/cpuid.h (bit_WAITPKG): New bit.
12903         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
12904         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
12905         function type.
12906         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12907         OPTION_MASK_ISA_WAITPKG.
12908         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
12909         (ix86_option_override_internal): Add PTA_WAITPKG.
12910         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
12911         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
12912         IX86_BUILTIN_TPAUSE.
12913         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
12914         __builtin_ia32_umwait and __builtin_ia32_tpause.
12915         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
12916         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
12917         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
12918         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
12919         UNSPECV_TPAUSE): New.
12920         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
12921         * config/i386/i386.opt: Add -mwaitpkg.
12922         * config/i386/waitpkgintrin.h: New file.
12923         * config/i386/x86intrin.h: New header.
12924         * doc/invoke.texi: Add -mwaitpkg.
12926 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
12928         PR target/85606
12929         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
12930         equivalent.
12931         (cortex-m0): Use armv6s-m isa.
12932         (cortex-m0plus): Likewise.
12933         (cortex-m1): Likewise.
12934         (cortex-m0.small-multiply): Likewise.
12935         (cortex-m0plus.small-multiply): Likewise.
12936         (cortex-m1.small-multiply): Likewise.
12938 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
12939             Jakub Jelinek  <jakub@redhat.com>
12941         PR tree-optimization/85692
12942         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
12943         source permute as well.
12945 2018-05-11  Martin Liska  <mliska@suse.cz>
12947         PR sanitizer/85556
12948         * doc/extend.texi: Document LLVM style format for no_sanitize
12949         attribute.
12951 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
12953         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
12954         mode_supports_vsx_dform_quad to mode_supports_dq_form.
12955         (mode_supports_vsx_dform_quad): Likewise.
12956         (mode_supports_vmx_dform): Move these functions to be next to the
12957         other mode_supports functions.
12958         (mode_supports_dq_form): Likewise.
12959         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
12960         mode_supports_dq_form.
12961         (reg_offset_addressing_ok_p): Likewise.
12962         (offsettable_ok_by_alignment): Likewise.
12963         (rs6000_legitimate_offset_address_p): Likewise.
12964         (legitimate_lo_sum_address_p): Likewise.
12965         (rs6000_legitimize_address): Likewise.
12966         (rs6000_legitimize_reload_address): Likewise.
12967         (rs6000_secondary_reload_inner): Likewise.
12968         (rs6000_preferred_reload_class): Likewise.
12969         (rs6000_output_move_128bit): Likewise.
12971 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
12973         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
12974         Generate SImode target register for null target.
12975         <case IX86_BUILTIN_XGETBV>: Ditto.
12976         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
12977         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
12979 2018-05-10  Carl Love  <cel@us.ibm.com>
12981         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
12982         dcbtt and dcbtstt if operands[2] is 0.
12984 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
12986         PR target/85693
12987         * config/i386/sse.md (usadv64qi): New expander.
12989 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
12991         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
12992         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
12993         -maltivec=be support.
12994         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
12995         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
12996         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
12997         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
12998         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
12999         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
13000         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
13001         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
13002         altivec_vsumsws): Adjust.
13003         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
13004         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
13005         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
13006         support.
13007         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
13008         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
13009         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
13010         (altivec_lve<VI_char>x): Delete expand.
13011         (*altivec_lve<VI_char>x_internal): Rename to...
13012         (altivec_lve<VI_char>x): ... this.
13013         (altivec_lvxl_<mode>): Delete expand.
13014         (*altivec_lvxl_<mode>_internal): Rename to ...
13015         (altivec_lvxl_<mode>): ... this.
13016         (altivec_stvxl_<mode>): Delete expand.
13017         (*altivec_stvxl_<mode>_internal): Rename to ...
13018         (altivec_stvxl_<mode>): ... this.
13019         (altivec_stve<VI_char>x): Delete expand.
13020         (*altivec_stve<VI_char>x_internal): Rename to ...
13021         (altivec_stve<VI_char>x): ... this.
13022         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
13023         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
13024         reduc_plus_scal_<mode>): Adjust.
13025         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
13026         comment.
13027         (rs6000_cpu_cpp_builtins): Adjust.
13028         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
13029         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
13030         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
13031         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
13032         -maltivec=be support.
13033         (rs6000_split_vec_extract_var): Adjust.
13034         (rs6000_split_v4si_init): Adjust.
13035         (swap_selector_for_mode): Delete.
13036         (altivec_expand_lvx_be, altivec_expand_stvx_be,
13037         altivec_expand_stvex_be): Delete.
13038         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
13039         -maltivec=be support.
13040         (rs6000_gimple_fold_builtin): Ditto.
13041         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
13042         Adjust.
13043         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
13044         (TARGET_DIRECT_MOVE_64BIT): Adjust.
13045         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
13046         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
13047         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
13048         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
13049         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
13050         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
13051         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
13052         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
13053         anonymous split): Adjust.
13054         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
13055         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
13057 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
13059         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
13060         when --with-gxx-include-dir is also specified.
13061         * configure: Regenerate.
13063 2018-05-09  Jim Wilson  <jimw@sifive.com>
13065         PR target/84797
13066         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
13067         * config/riscv/t-withmultilib: New.
13068         * config/riscv/withmultilib.h: New.
13069         * doc/install.texi: Document RISC-V --with-multilib-list support.
13071 2018-05-09  Richard Biener  <rguenther@suse.de>
13073         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
13074         vector.
13075         (vect_bb_vectorization_profitable_p): Adjust.  Compute
13076         actual scalar cost using the cost vector and the add_stmt_cost
13077         machinery.
13079 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
13081         PR rtl-optimization/85645
13082         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
13083         in the REG_CFA_REGISTER note for LR, don't leave it empty.
13085 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
13087         PR rtl-optimization/85645
13088         * shrink-wrap.c (spread_components): Return a boolean saying if
13089         anything was changed.
13090         (try_shrink_wrapping_separate): Iterate spread_components until
13091         nothing changes anymore.
13093 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
13095         PR rtl-optimization/85645
13096         * regrename.c (build_def_use): Also kill the chains that include the
13097         destination of a REG_CFA_REGISTER note.
13099 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
13101         PR rtl-optimization/85645
13102         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
13103         insn that has a REG_CFA_REGISTER note.
13105 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
13107         * cfgexpand.c (expand_clobber): New function.
13108         (expand_gimple_stmt_1): Use it.
13109         * tree-vect-stmts.c (vect_clobber_variable): New function,
13110         split out from...
13111         (vectorizable_simd_clone_call): ...here.
13112         (vectorizable_store): Emit a clobber either side of an
13113         IFN_STORE_LANES sequence.
13114         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
13116 2018-05-09  Tom de Vries  <tom@codesourcery.com>
13118         PR target/85626
13119         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
13120         (define_insn "trap_if_false"): Add exit after trap.
13122 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
13124         PR rtl-optimization/85638
13125         * bb-reorder.c: Include common/common-target.h.
13126         (create_forwarder_block): New function extracted from...
13127         (fix_up_crossing_landing_pad): ...here.  Rename into...
13128         (dw2_fix_up_crossing_landing_pad): ...this.
13129         (sjlj_fix_up_crossing_landing_pad): New function.
13130         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
13131         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
13132         from both partitions and exit the loop after one iteration.
13134 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13136         Revert:
13137         * doc/extend.texi (PowerPC Built-in Functions): Rename this
13138         subsection.
13139         (Basic PowerPC Built-in Functions): The new name of the
13140         subsection previously known as "PowerPC Built-in Functions".
13141         (Basic PowerPC Built-in Functions Available on all Configurations):
13142         New subsubsection.
13143         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13144         subsubsection.
13145         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13146         subsubsection.
13147         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13148         subsubsection.
13149         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13150         subsubsection.
13152 2018-05-08  Jim Wilson  <jimw@sifive.com>
13154         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
13155         (LD_EMUL_SUFFIX): New.
13156         (LINK_SPEC): Use it.
13158 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13160         * doc/extend.texi (PowerPC Built-in Functions): Rename this
13161         subsection.
13162         (Basic PowerPC Built-in Functions): The new name of the
13163         subsection previously known as "PowerPC Built-in Functions".
13164         (Basic PowerPC Built-in Functions Available on all Configurations):
13165         New subsubsection.
13166         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
13167         subsubsection.
13168         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
13169         subsubsection.
13170         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
13171         subsubsection.
13172         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
13173         subsubsection.
13175 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
13177         PR target/85683
13178         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
13179         after cmpelim optimization.
13181 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
13183         * config.gcc: Support "goldmont".
13184         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
13185         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
13186         PROCESSOR_GOLDMONT.
13187         * config/i386/i386.c (m_GOLDMONT): Define.
13188         (processor_target_table): Add "goldmont".
13189         (PTA_GOLDMONT): Define.
13190         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
13191         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
13192         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
13193         (fold_builtin_cpu): Add "goldmont".
13194         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
13195         (ix86_option_override_internal): Add "goldmont".
13196         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
13197         (processor_type): Add PROCESSOR_GOLDMONT.
13198         * config/i386/i386.md: Add CPU "glm".
13199         * config/i386/glm.md: New file.
13200         * config/i386/x86-tune.def: Add m_GOLDMONT.
13201         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
13203 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
13205         PR target/85572
13206         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
13207         E_V4DImode.
13208         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
13209         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
13210         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
13212         PR target/85317
13213         * config/i386/i386.c (ix86_fold_builtin): Handle
13214         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
13216         PR target/85480
13217         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
13218         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
13220 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
13222         PR target/85658
13223         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
13224         (check_arch): Likewise.
13225         (check_fpu): Return the result rather than printing it.
13226         (end arch): Fix operator precedence.
13227         (end cpu): Likewise.
13228         (END): Print the result from check_fpu.
13230 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
13231             Alan Hayward  <alan.hayward@arm.com>
13232             David Sherwood  <david.sherwood@arm.com>
13234         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
13235         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
13236         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
13237         (*fcmuo<mode>_and): New patterns.
13239 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
13241         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
13242         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
13243         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
13244         (cmp_op, sve_imm_con): New code attributes.
13245         (SVE_COND_INT_CMP, imm_con): Delete.
13246         (cmp_op): Remove above unspecs from int attribute.
13247         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
13248         to...
13249         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
13250         comparison-specific unspecs.
13251         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
13252         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
13253         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
13254         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
13255         (*vec_fcm<cmp_op><mode>): Rename to...
13256         (*fcm<cmp_op><mode>): ...this and adjust likewise.
13257         (*vec_fcmuo<mode>): Rename to...
13258         (*fcmuo<mode>): ...this and adjust likewise.
13259         (*pred_fcm<cmp_op><mode>): New pattern.
13260         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
13261         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
13262         functions.
13263         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
13264         and UNORDERED.
13265         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
13266         (aarch64_emit_sve_predicated_cond): New function.
13267         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
13268         (aarch64_emit_unspec_cond_or): Replace with...
13269         (aarch64_emit_sve_or_conds): ...this new function.  Use
13270         aarch64_emit_sve_ptrue_op for the individual comparisons and
13271         aarch64_emit_binop to OR them together.
13272         (aarch64_emit_inverted_unspec_cond): Replace with...
13273         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
13274         aarch64_emit_sve_ptrue_op for the comparison and
13275         aarch64_emit_unop to invert the result.
13276         (aarch64_expand_sve_vec_cmp_float): Update after the above
13277         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
13279 2018-05-07  Nathan Sidwell  <nathan@acm.org>
13281         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
13282         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
13283         (Backwards Compatibility): Likewise.
13285 2018-05-07  Luis Machado  <luis.machado@linaro.org>
13287         PR bootstrap/85681
13288         Revert:
13289         2018-05-07  Luis Machado  <luis.machado@linaro.org>
13291         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13292         <prefetch_dynamic_strides>: New const bool field.
13293         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13294         prefetch_dynamic_strides.
13295         (exynosm1_prefetch_tune): Likewise.
13296         (thunderxt88_prefetch_tune): Likewise.
13297         (thunderx_prefetch_tune): Likewise.
13298         (thunderx2t99_prefetch_tune): Likewise.
13299         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13300         to false.
13301         (aarch64_override_options_internal): Update to set
13302         PARAM_PREFETCH_DYNAMIC_STRIDES.
13303         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13304         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13305         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13306         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13307         prefetch-dynamic-strides setting.
13309         2018-05-07  Luis Machado  <luis.machado@linaro.org>
13311         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13312         <minimum_stride>: New const int field.
13313         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13314         minimum_stride field.
13315         (exynosm1_prefetch_tune): Likewise.
13316         (thunderxt88_prefetch_tune): Likewise.
13317         (thunderx_prefetch_tune): Likewise.
13318         (thunderx2t99_prefetch_tune): Likewise.
13319         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13320         (aarch64_override_options_internal): Update to set
13321         PARAM_PREFETCH_MINIMUM_STRIDE.
13322         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13323         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13324         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13325         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13326         stride is constant and is below the minimum stride threshold.
13328 2018-05-07  Luis Machado  <luis.machado@linaro.org>
13330         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
13331         to 512.
13333 2018-05-07  Luis Machado  <luis.machado@linaro.org>
13335         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13336         <prefetch_dynamic_strides>: New const bool field.
13337         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13338         prefetch_dynamic_strides.
13339         (exynosm1_prefetch_tune): Likewise.
13340         (thunderxt88_prefetch_tune): Likewise.
13341         (thunderx_prefetch_tune): Likewise.
13342         (thunderx2t99_prefetch_tune): Likewise.
13343         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
13344         to false.
13345         (aarch64_override_options_internal): Update to set
13346         PARAM_PREFETCH_DYNAMIC_STRIDES.
13347         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13348         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13349         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13350         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13351         prefetch-dynamic-strides setting.
13353 2018-05-07  Luis Machado  <luis.machado@linaro.org>
13355         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13356         <minimum_stride>: New const int field.
13357         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13358         minimum_stride field.
13359         (exynosm1_prefetch_tune): Likewise.
13360         (thunderxt88_prefetch_tune): Likewise.
13361         (thunderx_prefetch_tune): Likewise.
13362         (thunderx2t99_prefetch_tune): Likewise.
13363         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
13364         (aarch64_override_options_internal): Update to set
13365         PARAM_PREFETCH_MINIMUM_STRIDE.
13366         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13367         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13368         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13369         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13370         stride is constant and is below the minimum stride threshold.
13372 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
13374         PR c++/85659
13375         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
13376         the type is addressable.  Don't force op into register if it has
13377         BLKmode.
13379 2018-05-05  Roland McGrath  <mcgrathr@google.com>
13381         PR other/77609
13382         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
13383         any section for which we don't know a specific type it should have,
13384         regardless of name.  Previously this was done only for the exact
13385         names ".init_array", ".fini_array", and ".preinit_array".
13386         (default_elf_asm_named_section): Add comment about
13387         relationship with default_section_type_flags and SECTION_NOTYPE.
13388         (get_section): Don't consider it a type conflict if one side has
13389         SECTION_NOTYPE and the other doesn't, as long as neither has the
13390         SECTION_BSS et al used in the default_section_type_flags logic.
13392 2018-05-05  Tom de Vries  <tom@codesourcery.com>
13394         PR target/85653
13395         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
13396         (workaround_barsyncs): New function.
13397         (nvptx_reorg): Use workaround_barsyncs.
13398         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
13399         (define_expand "nvptx_membar_cta"): New define_expand.
13400         (define_insn "*nvptx_membar_cta"): New insn.
13402 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
13404         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
13405         To improve optimization opportunities.
13406         * builtin-types.def: The new needed builtin types for the above.
13408 2018-05-04  Richard Biener  <rguenther@suse.de>
13410         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
13411         * gimple-ssa-store-merging.c
13412         (imm_store_chain_info::output_merged_store): Remove redundant create,
13413         release split_store vector contents on failure.
13414         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
13415         scalar stmt vector on cache hit.
13417 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
13419         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
13420         Xilinx FP support.
13421         * config.gcc (powerpc-xilinx-eabi*): Remove.
13422         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
13423         support.
13424         (fusion_addis_mem_combo_load): Ditto.
13425         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
13426         FP support.
13427         (rs6000_cpu_cpp_builtins): Ditto.
13428         * config/rs6000/rs6000-linux.c
13429         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
13430         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
13431         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
13432         support.
13433         (rs6000_setup_reg_addr_masks): Ditto.
13434         (rs6000_init_hard_regno_mode_ok): Ditto.
13435         (rs6000_option_override_internal): Ditto.
13436         (legitimate_lo_sum_address_p): Ditto.
13437         (rs6000_legitimize_address): Ditto.
13438         (rs6000_legitimize_reload_address): Ditto.
13439         (rs6000_legitimate_address_p): Ditto.
13440         (abi_v4_pass_in_fpr): Ditto.
13441         (setup_incoming_varargs): Ditto.
13442         (rs6000_gimplify_va_arg): Ditto.
13443         (rs6000_split_multireg_move): Ditto.
13444         (rs6000_savres_strategy): Ditto.
13445         (rs6000_emit_prologue_components): Ditto.
13446         (rs6000_emit_epilogue_components): Ditto.
13447         (rs6000_emit_prologue): Ditto.
13448         (rs6000_emit_epilogue): Ditto.
13449         (rs6000_elf_file_end): Ditto.
13450         (rs6000_function_value): Ditto.
13451         (rs6000_libcall_value): Ditto.
13452         * config/rs6000/rs6000.h: Ditto.
13453         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
13454         (TARGET_MINMAX): ... this.  New.
13455         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
13456         * config/rs6000/rs6000.md: Remove Xilinx FP support.
13457         (*movsi_internal1_single): Delete.
13458         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
13459         mfpu=, mxilinx-fpu): Delete.
13460         * config/rs6000/singlefp.h: Delete.
13461         * config/rs6000/sysv4.h: Remove Xilinx FP support.
13462         * config/rs6000/t-rs6000: Ditto.
13463         * config/rs6000/t-xilinx: Delete.
13464         * config/rs6000/titan.md: Adjust for fp_type removal.
13465         * config/rs6000/vsx.md: Remove Xilinx FP support.
13466         (VStype_simple): Delete.
13467         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
13468         * config/rs6000/xfpu.h: Delete.
13469         * config/rs6000/xfpu.md: Delete.
13470         * config/rs6000/xilinx.h: Delete.
13471         * config/rs6000/xilinx.opt: Delete.
13472         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
13473         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
13475 2018-05-04  Tom de Vries  <tom@codesourcery.com>
13477         PR libgomp/85639
13478         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
13479         if ignore == 0.
13481 2018-05-04  Richard Biener  <rguenther@suse.de>
13483         PR middle-end/85627
13484         * tree-complex.c (update_complex_assignment): We are always in SSA form.
13485         (expand_complex_div_wide): Likewise.
13486         (expand_complex_operations_1): Likewise.
13487         (expand_complex_libcall): Preserve EH info of the original stmt.
13488         (tree_lower_complex): Handle removed blocks.
13489         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
13490         on complex multiplication and division libcall builtins.
13492 2018-05-04  Richard Biener  <rguenther@suse.de>
13494         PR middle-end/85574
13495         * fold-const.c (negate_expr_p): Restrict negation of operand
13496         zero of a division to when we know that can happen without
13497         overflow.
13498         (fold_negate_expr_1): Likewise.
13500 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
13502         PR libstdc++/85466
13503         * real.h (real_nextafter): Declare.
13504         * real.c (real_nextafter): New function.
13505         * fold-const-call.c (fold_const_nextafter): New function.
13506         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
13507         CASE_CFN_NEXTTOWARD.
13508         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
13509         even when arg1_mode is different from arg0_mode.
13511 2018-05-03  Nathan Sidwell  <nathan@acm.org>
13513         * doc/extend.texi (Deprecated Features): Remove
13514         -ffriend-injection.
13515         (Backwards Compatibility): Likewise.
13516         * doc/invoke.texi (C++ Language Options): Likewise.
13517         (C++ Dialect Options): Likewise.
13519 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
13521         PR target/85530
13522         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
13523         _mm512_mask_mullox_epi64): New intrinsics.
13525 2018-05-03  Tom de Vries  <tom@codesourcery.com>
13527         PR testsuite/85106
13528         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13529         dump files): Add offload-tree.
13531 2018-05-03  Richard Biener  <rguenther@suse.de>
13533         PR tree-optimization/85615
13534         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
13535         to loops not nested in BBs loop father to avoid creating multi-entry
13536         loops.
13538 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13540         PR tree-optimization/70291
13541         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
13542         arguments.  Change return type to tree.  Emit libcall as a new
13543         statement rather than replacing existing one when inplace_p is true.
13544         (expand_complex_multiplication_components): New function.
13545         (expand_complex_multiplication): Expand floating-point complex
13546         multiplication using the above.
13547         (expand_complex_division): Rename inner_type parameter to type.
13548         Update expand_complex_libcall call-site.
13549         (expand_complex_operations_1): Update expand_complex_multiplication
13550         and expand_complex_division call-sites.
13552 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
13554         PR target/85582
13555         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13556         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13557         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
13558         the highest significant bit of the shift count mask is clear.  In
13559         check whether and[sq]i3 is needed verify that all significant bits
13560         of the shift count other than the highest are set.
13562 2018-05-02  Tom de Vries  <tom@codesourcery.com>
13564         PR libgomp/82428
13565         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
13566         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
13567         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
13568         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
13569         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
13570         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
13571         __builtin_goacc_parlevel_size.
13573 2018-05-02  Richard Biener  <rguenther@suse.de>
13575         PR tree-optimization/85597
13576         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
13577         do not use split vect_get_vec_defs call but call vect_get_slp_defs
13578         directly.
13580 2018-05-02  Tom de Vries  <tom@codesourcery.com>
13582         PR testsuite/85106
13583         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13584         dump files): Add ltrans-tree.
13586 2018-05-02  Tom de Vries  <tom@codesourcery.com>
13588         PR testsuite/85106
13589         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
13590         dump files): Add wpa-ipa.
13592 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
13594         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
13595         powerpc*-*-linux*paired* target.
13596         * config/rs6000/750cl.h: Delete.
13597         * config/rs6000/paired.h: Delete.
13598         * config/rs6000/paired.md: Delete.
13599         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
13600         float support.
13601         * config/rs6000/rs6000-builtin.def: Remove paired float support.
13602         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
13603         comment.  Remove paired float support.
13604         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
13605         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
13606         VECTOR_PAIRED.
13607         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
13608         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
13609         declarations.
13610         * config/rs6000/rs6000.c: Remove paired float support.
13611         (paired_expand_vector_init, paired_expand_vector_move,
13612         paired_emit_vector_compare, paired_emit_vector_cond_expr,
13613         (paired_expand_lv_builtin, paired_expand_stv_builtin,
13614         paired_expand_builtin, paired_expand_predicate_builtin,
13615         paired_init_builtins): Delete.
13616         * config/rs6000/rs6000.h: Remove paired float support.
13617         * config/rs6000/rs6000.md: Remove paired float support.
13618         (move_from_CR_ov_bit): Delete.
13619         * config/rs6000/rs6000.opt (mpaired): Delete.
13620         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
13621         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
13623 2018-05-02  Richard Biener  <rguenther@suse.de>
13625         PR middle-end/85567
13626         * gimplify.c (gimplify_save_expr): When in SSA form allow
13627         SAVE_EXPRs to compute to SSA vars.
13629 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
13631         PR target/85582
13632         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
13633         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
13634         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
13635         clobber operands[2], instead use a new pseudo.  Formatting fixes.
13637 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
13639         PR tree-optimization/85586
13640         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
13641         exit early for statements in the same group if the accesses are
13642         not strided.
13644 2018-05-02  Tom de Vries  <tom@codesourcery.com>
13646         PR lto/85451
13647         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
13648         error message.
13650 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
13652         PR tree-optimization/85143
13653         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
13655 2018-05-01  Tom de Vries  <tom@codesourcery.com>
13657         PR lto/85451
13658         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
13659         not found" error message.
13661 2018-05-01  Tom de Vries  <tom@codesourcery.com>
13663         PR other/83786
13664         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
13665         * vec.c (test_ordered_remove_if): New function.
13666         (vec_c_tests): Call test_ordered_remove_if.
13667         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
13668         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
13669         * tree-vect-patterns.c (vect_pattern_recog_1): Use
13670         VEC_ORDERED_REMOVE_IF.
13672 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
13674         PR tree-optimization/82665
13675         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
13676         pointer subtraction where arguments come from a memchr call.
13678 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
13680         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
13681         --push-state --as-needed and --pop-state instead of --as-needed and
13682         --no-as-needed if ld supports it.
13683         * configure: Regenerated.
13685         PR web/85578
13686         * doc/install.texi2html: Replace _002d with - and _002a with * in
13687         generated html files using sed.
13689 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
13691         PR c++/85523
13692         * gcc-rich-location.c (blank_line_before_p): New function.
13693         (use_new_line): New function.
13694         (gcc_rich_location::add_fixit_insert_formatted): New function.
13695         * gcc-rich-location.h
13696         (gcc_rich_location::add_fixit_insert_formatted): New function.
13698 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
13700         * selftest.c (assert_streq): Rename "expected" and "actual" to
13701         "val1" and "val2".  Extend NULL-handling to cover both inputs
13702         symmetrically, while still requiring both to be non-NULL for a pass.
13703         * selftest.h (assert_streq): Rename "expected" and "actual" to
13704         "val1" and "val2".
13705         (ASSERT_EQ): Likewise.
13706         (ASSERT_EQ_AT): Likewise.
13707         (ASSERT_KNOWN_EQ): Likewise.
13708         (ASSERT_KNOWN_EQ_AT): Likewise.
13709         (ASSERT_NE): Likewise.
13710         (ASSERT_MAYBE_NE): Likewise.
13711         (ASSERT_MAYBE_NE_AT): Likewise.
13712         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
13713         the assertion to pass.
13714         (ASSERT_STREQ_AT): Likewise.
13716 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
13718         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
13719         interaction with -pie.
13721 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
13723         * selftest.h: Fix alphabetization of per-source-file selftest
13724         declarations.
13726 2018-04-30  Jason Merrill  <jason@redhat.com>
13728         PR c++/61982 - dead stores to destroyed objects.
13729         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
13730         of clobber.
13732 2018-04-30  Jason Merrill  <jason@redhat.com>
13734         * tree.c (build_clobber): New.
13735         * tree.h: Declare it.
13736         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
13738 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
13740         * diagnostic-show-locus.c (layout::layout): Update for
13741         location_get_source_line returning a char_span.
13742         (struct char_span): Move to input.h.
13743         (struct correction): Update for fields in char_span becoming
13744         private.
13745         (struct source_line): Update for location_get_source_line
13746         returning a char_span.
13747         (layout::print_line): Likewise.
13748         * edit-context.c (edited_file::print_content): Likewise.
13749         (edited_file::print_diff_hunk): Likewise.
13750         (edited_file::print_run_of_changed_lines): Likewise.
13751         (edited_file::get_num_lines): Likewise.
13752         (edited_line::edited_line): Likewise.
13753         * final.c (asm_show_source): Likewise.
13754         * input.c (location_get_source_line): Convert return type
13755         from const char * to char_span, losing the final "line_len"
13756         param.
13757         (dump_location_info): Update for the above.
13758         (get_substring_ranges_for_loc): Likewise.  Use a char_span
13759         when handling the literal within the line.
13760         (test_reading_source_line): Update for location_get_source_line
13761         returning a char_span.
13762         * input.h (class char_span): Move here from
13763         diagnostic-show-locus.c, converting from a struct to a class.
13764         Make data members private.
13765         (char_span::operator bool): New.
13766         (char_span::length): New.
13767         (char_span::get_buffer): New.
13768         (char_span::operator[]): New.
13769         (char_span::subspan): Make const.
13770         (char_span::xstrdup): New.
13771         (location_get_source_line): Convert return type from const char *
13772         to char_span, losing the final "line_size" param.
13774 2018-04-30  Jan Hubicka  <jh@suse.cz>
13776         * lto-wrapper.c (ltrans_priorities): New static var.
13777         (cmp_priority): New.
13778         (run_gcc): Read priorities and if doing parallel build order
13779         the Makefile by them.
13781 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
13783         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
13785 2018-04-30  Richard Biener  <rguenther@suse.de>
13787         * tree-cfg.c (verify_address): Remove base argument, add
13788         flag whether to check TREE_ADDRESSABLE and do that.
13789         (verify_expr): Remove.
13790         (verify_types_in_gimple_reference): Add pieces from verify_expr.
13791         (verify_gimple_assign_single): Likewise.
13792         (verify_gimple_switch): Likewise.
13793         (verify_expr_location_1): Dereference tp once.  Add (disabled)
13794         piece from verify_expr.
13795         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
13797 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
13799         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
13801 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
13803         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
13804         (small_data_pattern): Likewise.
13805         (arc_rewrite_small_data): Likewise.
13806         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
13807         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
13808         (get_symbol_alignment): New function.
13809         (legitimate_small_data_address_p): Likewise.
13810         (legitimate_scaled_address): Update, call
13811         legitimate_small_data_address_p.
13812         (output_sdata): New static variable.
13813         (arc_print_operand): Update how we handle small data operands.
13814         (arc_print_operand_address): Likewise.
13815         (arc_legitimate_address_p): Update, use
13816         legitimate_small_data_address_p.
13817         (arc_rewrite_small_data_p): Remove.
13818         (arc_rewrite_small_data_1): Likewise.
13819         (arc_rewrite_small_data): Likewise.
13820         (small_data_pattern): Likewise.
13821         (compact_sda_memory_operand): Update to use
13822         legitimate_small_data_address_p and get_symbol_alignment.
13823         (prepare_move_operands): Don't rewite sdata pattern.
13824         (prepare_extend_operands): Remove.
13825         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
13826         pattern.
13827         (zero_extendqisi2): Likewise.
13828         (zero_extendhisi2): Likewise.
13829         (extendqihi2): Likewise.
13830         (extendqisi2): Likewise.
13831         (extendhisi2): Likewise.
13832         (addsi3): Likewise.
13833         (subsi3): Likewise.
13834         (andsi3): Likewise.
13835         * config/arc/constraints.md (Usd): Change it to memory constraint.
13837 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
13839         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
13840         as source of std instructions.
13841         * config/arc/arc.md (movsi_insn): Update pattern predicate to
13842         allow 6-bit constants as source for store instructions.
13843         (movdi_insn): Update instruction pattern to allow 6-bit constants
13844         as source for store instructions.
13846 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
13848         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
13850 2018-04-30  Nathan Sidwell  <nathan@acm.org>
13851             Sandra Loosemore <sandra@codesourcery.com>
13853         * dumpfile.c (dump_open): Allow '-' for stdout.
13854         * doc/invoke.texi (Developer Options): Document dump filename
13855         determination early.  Document stdin/stdout selection.
13857 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
13859         Microblaze Target: PIC data text relative
13861         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
13862         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
13863         Add declaration.
13864         * config/microblaze/microblaze.h (microblaze_constant_address_p):
13865         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
13866         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
13867         New addressing mode for data-text relative position indepenedent code.
13868         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
13869         'ADDRESS_SYMBOLIC_TXT_REL'.
13870         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
13871         (microblaze_legitimate_pic_operand): Exclude function calls from
13872         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
13873         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
13874         addresses cases.
13875         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13876         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
13877         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
13878         for 'address + offset'.
13879         (microblaze_expand_prologue): Add new function prologue call for
13880         'r20' assignation.
13881         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
13882         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
13883         table in case of TARGET_PIC_DATA_TEXT_REL.
13884         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
13885         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
13886         Add new macros 'UNSPEC_TEXT',
13887         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
13888         + exclude function calls from 'UNSPEC_PLT' in case of data text
13889         relative mode.
13890         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13891         new target hook for generating address diff vector tables in case of
13892         flag_pic.
13893         * doc/tm.texi : Regenerate.
13894         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
13895         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
13896         of addr diff vector generation.
13897         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
13898         target hook definition.
13899         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
13900         Add default function for generate_pic_addr_diff_vec -> flag_pic.
13901         * doc/invoke.texi (Add new pic option): Add new microblaze pic
13902         option for data text relative.
13904 2018-04-30  Richard Biener  <rguenther@suse.de>
13906         * tree-chrec.h (evolution_function_is_constant_p): Remove
13907         redundant check.
13908         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
13910 2018-04-30  Richard Biener  <rguenther@suse.de>
13912         PR bootstrap/85571
13913         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
13915 2018-04-30  Richard Biener  <rguenther@suse.de>
13917         PR tree-optimization/28364
13918         PR tree-optimization/85275
13919         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
13920         copying first exit test.
13922 2018-04-28  Mark Wielaard  <mark@klomp.org>
13924         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
13925         dwarf_version >= 5.
13926         (dwarf_AT): Handle DW_AT_addr_base.
13927         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
13929 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
13931         PR target/84431
13932         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
13933         (*ashl<dwi>3_doubleword_mask_1): Ditto.
13934         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
13935         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
13937 2018-04-28  Richard Biener  <rguenther@suse.de>
13939         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
13940         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
13941         to reflect use.  Only add interesting stmts.
13943 2018-04-27  Martin Jambor  <mjambor@suse.cz>
13945         PR ipa/85549
13946         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
13947         the jump function allows for passing through aggregate values.
13949 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
13951         * input.h (in_system_header_at): Convert from macro to inline
13952         function.
13953         (from_macro_expansion_at): Likewise.
13954         (from_macro_definition_at): Likewise.
13956 2018-04-27  Jeff Law  <law@redhat.com>
13958         * config.gcc: Mark tile* targets as deprecated/obsolete.
13960 2018-04-27  Richard Biener  <rguenther@suse.de>
13962         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
13963         fix for ILP32.
13965 2018-04-27  Richard Biener  <rguenther@suse.de>
13967         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
13969 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
13971         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
13972         with Yd constraint. Set "preferred_for_speed" attribute from
13973         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
13974         with Yd constraint.
13975         (*movdi_internal): Ditto.
13976         (movti_interunit splitters): Remove
13977         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
13978         (movdi_interunit splitters): Ditto.
13979         * config/i386/constraints.md (Ye): Remove.
13980         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
13982 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13984         PR target/85512
13985         * config/aarch64/constraints.md (Usg): Limit to 31.
13986         (Usj): Limit to 63.
13988 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
13990         PR tree-optimization/85529
13991         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
13992         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
13993         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
13994         zero extension or masking of the MSB bit.
13995         (optimize_range_tests): Add FIRST_BB argument, pass it through
13996         to optimize_range_tests_var_bound.
13997         (maybe_optimize_range_tests, reassociate_bb): Adjust
13998         optimize_range_tests callers.
14000 2018-04-26  Richard Biener  <rguenther@suse.de>
14001             Jakub Jelinek  <jakub@redhat.com>
14003         * cgraph.h (symbol_table): Just declare debug method here.
14004         * symtab.c (symbol_table::debug): Define.
14006 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
14008         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
14010 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
14012         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
14013         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
14014         (*movdi_internal): Substitute Yi and Yj constraint with x
14015         and Ym and Yn constraint with y constraint.  Update "isa"
14016         attribute and set "preferred_for_speed" attribute from
14017         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
14018         (*movsi_internal): Ditto.
14019         (*movdf_internal): Ditto.
14020         (*movsf_internal): Ditto.
14021         (*zero_extendsidi2): Ditto.
14022         * config/i386/sse.md (vec_set<mode>_0): Ditto.
14023         (sse2_loadld): Ditto.
14024         (*vec_extract<ssevecmodelower>_0): Ditto.
14025         (*vec_extractv4si_0_zext_sse4): Ditto.
14026         (vec_concatv2di): Ditto.
14027         (*vec_dup<mode>): Ditto.
14028         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
14029         * config/i386/constraints.md (Yi): Remove.
14030         (Yj): Remove.
14031         (Ym): Remove.
14032         (Yn): Remove.
14034 2018-04-26  Nathan Sidwell  <nathan@acm.org>
14036         * dumpfile.c (dump_open): New.
14037         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
14038         (dump_finish): Detect stdio/stderr by value not name.
14040 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
14042         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
14044 2018-04-26  Tom de Vries  <tom@codesourcery.com>
14046         PR target/84952
14047         * config/nvptx/nvptx.c (verify_neutering_jumps)
14048         (verify_neutering_labels): New function
14049         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
14051 2018-04-26  Tom de Vries  <tom@codesourcery.com>
14053         PR target/84025
14054         * config/nvptx/nvptx.c (needs_neutering_p): New function.
14055         (nvptx_single): Use needs_neutering_p to skip over insns that do not
14056         need neutering.
14058 2018-04-26  Richard Biener <rguenther@suse.de>
14059             Tom de Vries  <tom@codesourcery.com>
14061         PR lto/85422
14062         * lto-streamer-out.c (output_function): Fixup loops if required to match
14063         discovery done in the reader.
14065 2018-04-26  Richard Biener  <rguenther@suse.de>
14067         PR tree-optimization/85116
14068         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
14069         have a loop exit from the single latch predecessor.  Remove
14070         case of header with just condition.
14071         (ch_base::copy_headers): Exclude infinite loops from any
14072         processing.
14073         (pass_ch::execute): Record exits.
14075 2018-04-26  Richard Biener  <rguenther@suse.de>
14077         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
14078         prologue cost vector and pass it to vect_get_load_cost.
14079         (vect_get_peeling_costs_all_drs): Likewise.
14080         (vect_peeling_hash_get_lowest_cost): Likewise.
14081         (vect_enhance_data_refs_alignment): Likewise.
14083 2018-04-26  Richard Biener  <rguenther@suse.de>
14085         PR middle-end/85450
14086         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
14087         checking of integer<->pointer conversions.
14088         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
14089         sign-/zero-extending pointer types.
14090         (expand_omp_for_static_chunk): Likewise.
14092 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
14093             Jean Lee  <xiaoyur347@gmail.com>
14095         * config/mips/mips.c (mips_asan_shadow_offset): New function.
14096         (TARGET_ASAN_SHADOW_OFFSET): Define.
14097         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
14098         true for -fsanitize=address.
14100 2018-04-25  Mark Wielaard  <mark@klomp.org>
14102         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
14103         shorter ones.
14105 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
14107         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
14108         than "alu", remove explicit "memory" and "imm_disp" attributes.
14109         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
14111         PR middle-end/85414
14112         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
14113         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
14114         gen_lowpart_no_emit.
14116 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
14118         PR target/85473
14119         * config/i386/i386.c (ix86_expand_builtin): Change memory
14120         operand to XI, extend p0 to Pmode.
14121         * config/i386/i386.md: Change unspec volatile and operand
14122         1 mode to XI, change operand 0 mode to P.
14124 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
14126         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
14127         GET_MODE_MASK before any checking.
14128         (nds32_can_use_bset_p): Likewise.
14129         (nds32_can_use_btgl_p): Likewise.
14131 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
14133         * config/nds32/nds32-doubleword.md: New define_split pattern for
14134         illegal register number.
14136 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
14138         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
14140 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
14142         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
14144 2018-04-25  Richard Biener  <rguenther@suse.de>
14146         * lto-streamer.h (LTO_major_version): Bump to 8.
14148 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
14150         * BASE-VER: Set to 9.0.0.
14152 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
14154         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
14155         in __abskf2 and __powikf2.
14157 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14159         PR target/85512
14160         * config/aarch64/constraints.md (Usg, Usj): New constraints.
14161         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
14162         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
14163         Use the above on operand 2.  Reindent.
14164         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
14166 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
14168         PR target/85485
14169         * common/config/i386/i386-common.c (ix86_handle_option): Don't
14170         handle OPT_mcet.
14171         * config/i386/i386.opt (mcet): Removed.
14172         * doc/install.texi: Remove -mcet documentation.
14173         * doc/invoke.texi: Likewise.
14175 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
14177         PR target/85485
14178         * doc/install.texi: Remove -mcet from bootstrap-cet.
14180 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
14182         PR target/85511
14183         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
14184         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
14185         if TARGET_64BIT.
14187         PR target/85503
14188         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
14189         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
14190         containing a CONST_VECTOR.
14192 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
14194         * doc/install.texi: Update newlib dependency for nvptx.
14196 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
14198         PR target/85508
14199         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
14200         instead of INTVAL when shifting x left.
14202 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
14204         PR tree-optimization/85478
14205         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
14206         vect_grouped_store_supported for single element vectors.
14208 2018-04-24  Richard Biener  <rguenther@suse.de>
14210         PR target/85491
14211         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
14212         load cost increase to the case of non-constant step.
14214 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
14216         PR target/84828
14217         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
14218         destination if any_malformed_asm.
14220 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
14222         PR middle-end/85496
14223         * expr.c (store_field): In the bitfield case, if the value comes from
14224         a function call and is returned in registers by means of a PARALLEL,
14225         do not change the mode of the temporary unless BLKmode and VOIDmode.
14227 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
14229         PR rtl-optimization/85423
14230         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
14231         dependencies to debug insns when the previous insn is non-debug.
14233 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
14235         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
14236         enums into a single definition.
14237         (fls): Fix predicates and printing.
14238         (seti): Likewise.
14240 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
14242         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
14243         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
14244         and short u6 immediate.
14245         (check_if_valid_sleep_operand): Remove.
14246         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
14248 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
14250         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
14251         flag_always_save_lp condition.
14252         * config/nds32/nds32.opt (malways-save-lp): New option.
14254 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
14256         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
14257         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
14258         * config/nds32/nds32.h
14259         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
14260         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
14262 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
14264         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
14265         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
14267 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
14268             Chung-Ju Wu  <jasonwucj@gmail.com>
14270         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
14271         Declare.
14272         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
14273         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
14275 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
14277         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
14279 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
14281         * config/nds32/nds32-protos.h (nds32_data_alignment,
14282         nds32_local_alignment): Declare.
14283         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
14284         nds32_local_alignment): New functions.
14285         (TARGET_CONSTANT_ALIGNMENT): Define.
14286         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
14288 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
14290         * config/nds32/nds32.c
14291         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
14292         (TARGET_MODES_TIEABLE_P): Likewise.
14294 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
14296         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
14297         level Ofast and Og.
14299 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
14300             Chung-Ju Wu  <jasonwucj@gmail.com>
14302         * config/nds32/constants.md (unspec_volatile_element): Add enum values
14303         for unaligned access.
14304         * config/nds32/nds32-intrinsic.c: Implementation of expanding
14305         unaligned access.
14306         * config/nds32/nds32-intrinsic.md: Likewise.
14307         * config/nds32/nds32_intrinsic.h: Likewise.
14308         * config/nds32/nds32.h (nds32_builtins): Likewise.
14309         * config/nds32/nds32.opt (munaligned-access): New option.
14310         * config/nds32/nds32.c (nds32_asm_file_start): Display
14311         flag_unaligned_access status.
14313 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
14315         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
14316         -mno-relax is present.
14317         * config/riscv/linux.h (LINK_SPEC): Ditto.
14319 2018-04-20  Martin Sebor  <msebor@redhat.com>
14321         PR c/85365
14322         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
14323         for null pointers.
14324         (gimple_fold_builtin_stxcpy_chk): Same.
14325         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
14327 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
14329         PR target/85456
14330         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
14331         __powikf2 when long double is IEEE 128-bit.
14333 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
14335         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
14336         step to make sure stack always aligned.
14338 2018-04-20  Carl Love  <cel@us.ibm.com>
14340         PR target/83402
14341         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
14342         size check for arg0.
14344 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
14345             Tom de Vries  <tom@codesourcery.com>
14347         PR target/85445
14348         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
14349         Emit insns for calls too.
14350         (nvptx_find_par): Always look for worker-level predecessor insn.
14351         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
14352         calls.
14353         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
14354         (nvptx_process_pars): Propagate frames for calls.
14356 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
14358         PR target/85469
14359         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
14360         Removed.
14361         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
14362         (ix86_handle_option): Don't handle OPT_mibt.
14363         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
14364         __SHSTK__.
14365         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
14366         has_ibt and ibt.
14367         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
14368         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
14369         (ix86_target_macros): Define __CET__ with flag_cf_protection
14370         for -fcf-protection.
14371         * config/i386/i386.c (isa2_opts): Remove -mibt.
14372         * config/i386/i386.h (TARGET_IBT): Removed.
14373         (TARGET_IBT_P): Likewise.
14374         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
14375         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
14376         * config/i386/i386.opt (mcet): Update help message.
14377         (mshstk): Likewise.
14378         (mibt): Removed.
14379         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
14380         -mcet as an alias for -mshstk.
14382 2018-04-20  Richard Biener <rguenther@suse.de>
14384         PR middle-end/85475
14385         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
14386         complexity by forcing a single use of the multiply operand.
14388 2018-04-20  Martin Jambor  <mjambor@suse.cz>
14390         ipa/85449
14391         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
14392         recursion dependency to only apply to non-clones.
14394 2018-04-20  Martin Jambor  <mjambor@suse.cz>
14396         ipa/85447
14397         * ipa-cp.c (create_specialized_node): Check that clones of
14398         self-recursive edges exist during IPA-CP.
14400 2018-04-19  Toon Moene  <toon@moene.org>
14402         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
14403         by -O3.
14405 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
14407         PR tree-optimization/85467
14408         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
14409         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
14410         VECTOR_CST element to type.
14412 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
14414         PR target/85397
14415         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
14416         * config/i386/i386.md (builtin_setjmp_setup): Removed.
14417         (builtin_longjmp): Likewise.
14418         (save_stack_nonlocal): New pattern.
14419         (restore_stack_nonlocal): Likewise.
14421 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
14423         PR target/85404
14424         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14425         Replace ASM_OUTPUT_LABEL with fprintf.
14427 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
14429         PR target/85417
14430         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
14431         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
14432         * config/i386/i386-c.c (ix86_target_macros_internal): Also
14433         define __IBT__ and __SHSTK__ for -fcf-protection.
14434         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
14435         TARGET_IBT.
14436         (ix86_trampoline_init): Likewise.
14437         (x86_output_mi_thunk): Likewise.
14438         (ix86_notrack_prefixed_insn_p): Likewise.
14439         (ix86_option_override_internal): Don't disallow -fcf-protection.
14440         * config/i386/i386.md (rdssp<mode>): Also enable for
14441         -fcf-protection.
14442         (incssp<mode>): Likewise.
14443         (nop_endbr): Likewise.
14444         * config/i386/i386.opt (mcet): Change help message to built-in
14445         functions only.
14446         (mibt): Likewise.
14447         (mshstk): Likewise.
14448         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
14449         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
14450         enable CET built-in functions.
14452 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
14454         * common/config/i386/i386-common.c
14455         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
14456         OPTION_MASK_ISA_MOVDIRI_UNSET,
14457         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
14458         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
14459         * config.gcc (movdirintrin.h): New header.
14460         * config/i386/cpuid.h (bit_MOVDIRI,
14461         bit_MOVDIR64B): New bits.
14462         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
14463         and -mmvodir64b.
14464         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
14465         (VOID, PVOID, PCVOID)): New function types.
14466         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
14467         __builtin_ia32_directstoreu_u64,
14468         __builtin_ia32_movdir64b): New builtins.
14469         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
14470         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
14471         and -mmovdiri.
14472         (ix86_valid_target_attribute_inner_p): Ditto.
14473         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
14474         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
14475         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
14476         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
14477         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
14478         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
14479         (movdiri<mode>, movdir64b_<mode>): New.
14480         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
14481         * config/i386/immintrin.h: Include movdirintrin.h.
14482         * config/i386/movdirintrin.h: New file.
14483         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
14485 2018-04-19  Richard Biener  <rguenther@suse.de>
14487         PR middle-end/85455
14488         * cfg.c (clear_bb_flags): When loop state says we have
14489         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
14491 2018-04-19  Richard Biener  <rguenther@suse.de>
14493         PR tree-optimization/84737
14494         * tree-vect-data-refs.c (vect_copy_ref_info): New function
14495         copying restrict info.
14496         (vect_setup_realignment): Use it.
14497         * tree-vectorizer.h (vect_copy_ref_info): Declare.
14498         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
14499         the first DR to all generated stores.
14500         (vectorizable_load): Likewise for loads.
14502 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
14504         PR tree-optimization/85446
14505         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
14506         the integral and pointer types to have the same precision.
14508         * doc/install.texi: Document --disable-cet being the default and
14509         --enable-cet=auto.
14511 2018-04-18  Martin Liska  <mliska@suse.cz>
14513         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
14514         style.
14516 2018-04-18  Martin Liska  <mliska@suse.cz>
14518         Revert
14519         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
14521         PR ipa/83983
14522         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
14523         arguments if they are comparable.
14525 2018-04-18  Martin Liska  <mliska@suse.cz>
14527         Revert
14528         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
14530         PR lto/84805
14531         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
14532         incomplete types.
14534 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
14536         PR target/85388
14537         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
14538         ENDBR after calling __morestack.
14540 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
14542         PR jit/85384
14543         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
14544         by using gcc_base_ver to generate a gcc_driver_version, and use
14545         it when generating GCC_DRIVER_NAME.
14546         * configure: Regenerate.
14548 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
14550         PR target/81084
14551         * config.gcc: Obsolete powerpc*-*-*spe*.
14553 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
14555         PR debug/84637
14556         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
14557         (stabstr_D): Change type of unum from unsigned int to
14558         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
14559         type.
14561 2018-04-17  Jim Wilson  <jimw@sifive.com>
14563         PR 84856
14564         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
14565         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
14566         Set arg_pointer_offset after using pretend_args_size.
14568 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
14570         PR rtl-optimization/85431
14571         * dse.c (record_store): Ignore zero width stores.
14573         PR sanitizer/85230
14574         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
14575         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
14576         __builtin_stack_restore rather than after it.
14577         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
14578         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
14579         argument instead of virtual_dynamic_stack_rtx.
14581 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14583         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
14584         New prototype.
14585         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
14586         Add note to error message to explain internal mapping of overloaded
14587         built-in function name to non-overloaded built-in function name.
14588         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
14589         function.
14591 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
14593         PR target/85424
14594         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
14595         where the inputs overlap with the output.
14597 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
14599         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
14600         (=v, v) alternative and explicit "memory" attribute.
14601         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
14602         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14603         attributes.
14604         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
14605         "sselog1" type instead of "sselog".
14606         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
14607         "sselog".  Remove explicit "memory" attribute.
14608         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
14609         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14610         attributes.
14611         (vec_extract_hi_v32hi): Merge all alternatives into one, use
14612         "sselog1" type instead of "sselog".  Remove explicit "memory"
14613         attribute.
14614         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
14615         use "sselog1" type instead of "sselog".  Remove explicit "memory"
14616         attribute.
14617         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
14618         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
14619         attributes.
14620         (vec_extract_hi_v64qi): Merge all alternatives into one, use
14621         "sselog1" type instead of "sselog".  Remove explicit "memory"
14622         attribute.
14623         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
14624         use "sselog1" type instead of "sselog".  Remove explicit "memory"
14625         attribute.
14627         PR target/85430
14628         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
14630         PR middle-end/85414
14631         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
14632         on a SUBREG.
14634 2018-04-17  Martin Jambor  <mjambor@suse.cz>
14636         PR ipa/85421
14637         * ipa-cp.c (create_specialized_node): Call
14638         expand_all_artificial_thunks if necessary.
14640 2018-04-17  Martin Liska  <mliska@suse.cz>
14642         PR lto/85405
14643         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
14644         in message, remote space in between '_G' and '('.
14646 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
14648         PR target/85281
14649         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
14650         avx512f_vmcmp<mode>3<round_saeonly_name>,
14651         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
14652         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
14653         avx512f_rndscale<mode><round_saeonly_name>,
14654         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
14655         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
14656         Use %<iptr>2 instead of %2 for -masm=intel.
14657         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
14658         avx512f_vcvttss2usi<round_saeonly_name>,
14659         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
14660         -masm=intel.
14661         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
14662         avx512f_vcvttsd2usi<round_saeonly_name>,
14663         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
14664         Use %q1 instead of %1 for -masm=intel.
14665         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
14666         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
14667         of %3 for -masm=intel.
14668         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
14669         -masm=intel.
14670         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
14671         -masm=intel.
14672         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
14673         -masm=intel.
14674         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
14675         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
14676         %g1.
14677         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
14678         -masm=intel.
14679         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
14680         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
14681         %g1 and one with %0 and %1.
14682         (avx512er_vmrcp28<mode><round_saeonly_name>,
14683         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
14684         %1 for -masm=intel.
14685         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
14686         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
14687         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
14688         of %0 and %{%4%} for -masm=intel.
14689         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
14690         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
14691         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
14692         order of %0 and %{%5%}%{z%} for -masm=intel.
14694 2018-04-17  Jan Hubicka  <jh@suse.cz>
14696         PR lto/85405
14697         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
14699 2018-04-17  Martin Liska  <mliska@suse.cz>
14701         PR ipa/85329
14702         * multiple_target.c (create_dispatcher_calls): Set apostrophes
14703         for target_clone error message.  Make default implementation
14704         clone to be a local declaration.
14705         (separate_attrs): Add new argument and check for an empty
14706         string.
14707         (expand_target_clones): Handle it.
14708         (ipa_target_clone): Make redirection just for target_clones
14709         functions.
14711 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
14712             Tom de Vries  <tom@codesourcery.com>
14714         PR middle-end/84955
14715         * omp-expand.c (expand_oacc_for): Add dummy false branch for
14716         tiled basic blocks without omp continue statements.
14718 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
14720         PR target/83660
14721         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
14722         vec_extract expression as having side effects to make sure it gets
14723         a cleanup point.
14725 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
14727         PR target/85403
14728         * config/i386/i386.c (get_builtin_code_for_version): Check
14729         error_mark_node.
14731 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
14733         PR target/84331
14734         * config.gcc: Support "skylake".
14735         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14736         PROCESSOR_SKYLAKE.
14737         * config/i386/i386.c (m_SKYLAKE): Define.
14738         (processor_target_table): Add "skylake".
14739         (ix86_option_override_internal): Add "skylake".
14740         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
14741         PROCESSOR_CANNONLAKE.
14742         (get_builtin_code_for_version): Fix priority for
14743         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
14744         PROCESSOR_SKYLAKE-AVX512.
14745         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
14746         (processor_type): Add PROCESSOR_SKYLAKE.
14748 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
14749             Jason Merrill  <jason@redhat.com>
14751         PR c++/85112
14752         * convert.c (convert_to_integer_1): Use direct recursion for
14753         enumeral types and types with a precision less than the number
14754         of bits in their mode.
14756 2018-04-16  Julia Koval  <julia.koval@intel.com>
14758         PR target/84413
14759         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
14760         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
14762 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
14764         PR target/85293
14765         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
14766         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
14767         and -mno-direct-move.
14769 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
14771         PR target/83402
14772         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
14773         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
14774         Ensure negative shifts result in {0}.
14776 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
14778         PR rtl-optimization/79916
14779         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
14780         regs (if any) to define how to gnerate SD moves when LRA is in
14781         progress.
14783 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
14785         PR rtl-optimization/85393
14786         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
14787         * except.c (expand_dw2_landing_pad_for_region): Make static.
14788         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
14789         a label and unconditional jump to old_bb, rather than
14790         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
14791         basic block.
14793         PR rtl-optimization/85376
14794         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
14795         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
14796         instead of a specific value.
14798 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
14799             Bin Cheng  <bin.cheng@arm.com>
14801         PR tree-optimization/82965
14802         PR tree-optimization/83991
14803         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
14804         by_profile_only parameter.
14805         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
14806         information if the loop was predicted to iterate too many times.
14807         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
14809 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
14811         PR lto/71991
14812         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
14813         always inline.
14815 2018-04-13  Martin Liska  <mliska@suse.cz>
14816             Jakub Jelinek  <jakub@redhat.com>
14818         PR middle-end/81657
14819         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
14820         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
14821         * builtins.c (expand_builtin_memory_copy_args): Use
14822         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
14823         handle dest_addr == pc_rtx.
14825 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
14827         PR target/85291
14828         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
14829         asked to not generate direct moves.
14830         (fix_trunc<mode>si2_stfiwx): Similar.
14831         (fix_trunc<mode>si2_internal): Similar.
14833 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
14835         PR debug/83157
14836         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
14837         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
14838         lookup if dest in some wider mode is known to be const0_rtx and
14839         if so, record permanent equivalence for it to be ZERO_EXTEND of
14840         the narrower mode destination.
14842 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
14844         * lto-streamer-out.c (output_function): Revert 259346.
14845         * omp-expand.c (expand_oacc_for): Likewise.
14847 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
14849         PR rtl-optimization/85354
14850         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
14851         * sel-sched.c (sel_global_init): ... here.
14853 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
14855         PR target/85238
14856         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
14857         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
14858         mode for PE-COFF targets.
14859         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
14860         (i386_pe_asm_lto_end): Likewise.
14861         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
14862         (TARGET_ASM_LTO_END): Likewise.
14863         * config/i386/winnt.c (saved_debug_info_level): New static variable.
14864         (i386_pe_asm_lto_start): New function.
14865         (i386_pe_asm_lto_end): Likewise.
14867 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
14868             Richard Biener  <rguenther@suse.de>
14870         PR middle-end/84955
14871         * lto-streamer-out.c (output_function): Fix CFG loop state before
14872         streaming out.
14873         * omp-expand.c (expand_oacc_for): Handle calls to internal
14874         functions like regular functions.
14876 2018-04-12  Richard Biener  <rguenther@suse.de>
14878         PR lto/85371
14879         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
14880         for the early LTO debug to properly generate references to it
14881         during DIE emission.  Do not re-use that for the skeleton for
14882         split-dwarf.
14883         (dwarf2out_early_finish): Likewise.
14885 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
14887         PR target/85328
14888         * config/i386/sse.md
14889         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
14890         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
14891         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
14892         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
14893         and output is a reg, avoid creating invalid lowpart subreg, but
14894         instead split into a 512-bit move.  Don't split if not AVX512VL,
14895         input is xmm16+ reg and output is a mem.
14896         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
14897         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
14898         xmm16+ reg and output is a mem.
14900 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
14902         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
14903         also for flag_dwarf2_cfi_asm.
14905 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
14907         PR rtl-optimization/85342
14908         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
14909         a bool scalar var inside of the loop instead.  Don't try to update
14910         recog_data.operand after failed apply_change_group.
14912 2018-04-12  Tom de Vries  <tom@codesourcery.com>
14914         PR target/85296
14915         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
14916         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
14917         array with flexible array member as array without given dimension.
14918         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
14919         argument for undefined param to true.
14921 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
14923         PR target/85321
14924         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
14925         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
14926         from PowerPC section.
14927         * config/rs6000/sysv4.opt (mcall-): Improve help text.
14928         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
14929         help text that is too long.
14930         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
14931         help text that is too long.
14932         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
14933         help text that is too long.
14935 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
14937         * config/alpha/alpha.md (stack_probe_internal): Rename
14938         from "probe_stack".  Update all callers.
14940 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
14942         PR rtl-optimization/84566
14943         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
14944         sched_macro_fuse_insns.
14946 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
14948         PR target/84301
14949         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
14950         (compute_block_dependences): ... from here.
14952 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
14954         PR tree-optimization/85331
14955         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
14956         from int to HOST_WIDE_INT.
14958 2018-04-11  Martin Jambor  <mjambor@suse.cz>
14960         PR ipa/84149
14961         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
14962         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
14963         not the same as the source val.
14964         (cgraph_edge_brings_value_p): New parameter.
14965         (gather_edges_for_value): Pass destination value to
14966         cgraph_edge_brings_value_p.
14967         (perhaps_add_new_callers): Likewise.
14968         (get_info_about_necessary_edges): Likewise and exclude values brought
14969         only by self-recursive edges.
14970         (create_specialized_node): Redirect only clones of self-calling edges.
14971         (+self_recursive_pass_through_p): New function.
14972         (find_more_scalar_values_for_callers_subset): Use it.
14973         (find_aggregate_values_for_callers_subset): Likewise.
14974         (known_aggs_to_agg_replacement_list): Removed.
14975         (decide_whether_version_node): Re-calculate known constants for all
14976         remaining context clones.
14978 2018-04-11  Richard Biener  <rguenther@suse.de>
14980         PR lto/85339
14981         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
14982         from early DWARF output.
14983         (dwarf2out_early_finish): Output line info unconditionally into
14984         early DWARF and add reference to it.
14986 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
14988         PR target/85281
14989         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
14990         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
14991         other than V2DFmode using iptr mode attribute.
14992         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
14994 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
14996         PR rtl-optimization/84659
14997         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
14999 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
15001         PR debug/85302
15002         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
15003         SIZEP is NULL.
15004         (output_loc_list): Pass address of a dummy size variable even in the
15005         locview handling loop.
15006         (index_location_lists): Add comment on why skip_loc_list_entry can't
15007         call size_of_locs.
15009 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
15011         PR target/85261
15012         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
15013         into register.
15015 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
15017         PR target/85321
15018         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
15019         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
15020         and -mstring-compare-inline-limit.
15022 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
15024         PR target/85287
15025         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
15026         for stack clash protection in a register whenever we need it to be in
15027         a register.
15029 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
15031         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
15032         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
15034 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
15036         PR target/85321
15037         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
15038         the help text.
15039         (mlong-double-): Ditto.
15040         * config/rs6000/sysv4.opt (msdata=): Ditto.
15041         (mtls-size=): Ditto.
15043 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15045         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
15046         erroneous entries for
15047         "vector int vec_ldl (int, long int *)", and
15048         "vector unsigned int vec_ldl (int, unsigned long int *)".
15049         Add comments and entries for
15050         "vector bool char vec_ldl (int, bool char *)",
15051         "vector bool short vec_ldl (int, bool short *)",
15052         "vector bool int vec_ldl (int, bool int *)",
15053         "vector bool long long vec_ldl (int, bool long long *)",
15054         "vector pixel vec_ldl (int, pixel *)",
15055         "vector long long vec_ldl (int, long long *)",
15056         "vector unsigned long long vec_ldl (int, unsigned long long *)".
15057         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
15058         type tree bool_long_long_type_node and correct definition of
15059         bool_V2DI_type_node to make reference to this new type tree.
15060         (rs6000_mangle_type): Replace erroneous reference to
15061         bool_long_type_node with bool_long_long_type_node.
15062         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
15063         comments to emphasize sign distinctions for char and int types and
15064         replace RS6000_BTI_bool_long constant with
15065         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
15066         use of RS6000_BTI_pixel.
15067         (bool_long_type_node): Remove this macro definition.
15068         (bool_long_long_type_node): New macro definition
15070 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
15072         PR rtl-optimization/85300
15073         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
15074         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
15075         simplify_unary_operation fails.
15077 2018-04-10  Martin Liska  <mliska@suse.cz>
15079         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
15080         cgraph_edge and ipa_ref.
15082 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
15084         PR target/85177
15085         PR target/85255
15086         * config/i386/sse.md
15087         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
15088         computation of the VEC_MERGE selector from mask.
15089         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
15090         Fix decoding of the VEC_MERGE selector into mask.
15092 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
15094         PR tree-optimization/85286
15095         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
15097 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
15099         * final.c (final_1): Set insn_last_address as well as
15100         insn_current_address.
15102 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15104         PR target/85173
15105         * explow.c (emit_stack_probe): Call validize_mem on memory location
15106         before passing it to gen_probe_stack.  Create address operand and
15107         legitimize it for the probe_stack_address case.
15109 2018-04-09  Jan Hubicka  <jh@suse.cz>
15111         PR lto/85078
15112         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
15113         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
15114         * tree.c (free_lang_data_in_type): Fix handling of binfos;
15115         walk basetypes.
15116         (free_lang_data): Rebuild type inheritance graph.
15118 2018-04-09  Martin Sebor  <msebor@redhat.com>
15120         * invoke.texi (-finline-small-functions): Mention other optimization
15121         options.
15122         (-findirect-inlining, -fpartial-inlining): Same.
15123         (-finline-functions-called-once): Same.
15124         (-freorder-blocks-and-partition): Same.
15126 2018-04-09  Jan Hubicka  <jh@suse.cz>
15128         PR rtl/84058
15129         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
15130         jumps; choose last target that matches the criteria (i.e.
15131         no partition changes for non-crossing jumps).
15132         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
15133         support for redirecting crossing jumps to non-crossing.
15135 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
15137         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
15138         also for naked functions.
15140 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
15142         * config/arc/arc.md (add_shift): New pattern.
15143         (add_shift2): Likewise.
15144         (sub_shift): Likewise.
15145         (sub_shift_cmp0_noout): Likewise.
15146         (compare_si_ashiftsi): Likewise.
15147         (xbfu_cmp0_noout): New combine pattern.
15148         (xbfu_cmp0"): Likewise.
15149         (movsi_set_cc_insn): Place the predicable variant first.
15150         (commutative_binary_cmp0_noout): Remove clobber.
15151         (commutative_binary_cmp0): New pattern.
15152         (noncommutative_binary_cmp0): Likewise.
15153         (noncommutative_binary_cmp0_noout): Likewise.
15154         (noncommutative_binary_comparison_result_used): Removed.
15155         (rsub_cmp0): New pattern.
15156         (rsub_cmp0_noout): Likewise.
15157         (extzvsi): Changed, keep only meaningful variants.
15158         (SQH, SEZ): New iterators.
15159         (SQH_postfix): New mode attribute.
15160         (SEZ_prefix): New code attribute.
15161         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
15162         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
15163         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
15164         of numerical value.
15165         (noncommutative_operator): Check the availability of barrel
15166         shifter option.
15168 2018-04-09  Richard Biener  <rguenther@suse.de>
15170         PR tree-optimization/85284
15171         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
15172         Only use the niter constraining form of simple_iv when the exit
15173         is always executed.
15175 2018-04-09  Tom de Vries  <tom@codesourcery.com>
15177         PR target/84041
15178         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
15179         (define_expand "*memory_barrier"): New define_expand.
15180         (define_insn "memory_barrier"): New insn.
15182 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
15184         PR rtl-optimization/80463
15185         PR rtl-optimization/83972
15186         PR rtl-optimization/83480
15188         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
15189         correct producer for the insn.
15190         (tidy_control_flow): Fixup seqnos in case of debug insns.
15192 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
15194         PR rtl-optimization/83913
15196         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
15197         different sched-times when merging exprs.
15199 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
15201         PR rtl-optimization/83962
15203         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
15204         tidy_fallthru_edge and tidy_control_flow.
15206 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
15208         PR rtl-optimization/83530
15210         * sel-sched.c (force_next_insn): New global variable.
15211         (remove_insn_for_debug): When force_next_insn is true, also leave only
15212         next insn in the ready list.
15213         (sel_sched_region): When the region wasn't scheduled, make another pass
15214         over it with force_next_insn set to 1.
15216 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
15218         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
15219         into tm_file.
15220         * config/nds32/constants.md (unspec_volatile_element): Add enum values
15221         for interrupt control.
15222         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15223         functions for interrupt control.
15224         * config/nds32/nds32-intrinsic.md: Likewise.
15225         * config/nds32/nds32_intrinsic.h: Likewise.
15226         * config/nds32/nds32.h (nds32_builtins): Likewise.
15228 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
15230         * config/nds32/nds32.c (nds32_init_machine_status,
15231         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
15232         strict_aligned_p field.
15233         (nds32_expand_to_rtl_hook): New function.
15234         (TARGET_EXPAND_TO_RTL_HOOK): Define.
15235         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
15237 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
15238             Chung-Ju Wu  <jasonwucj@gmail.com>
15240         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
15241         * config/nds32/nds32-n7.md: New file.
15242         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
15243         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
15244         pipeline.
15245         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
15246         * config/nds32/nds32.md (pipeline_model): Add n7.
15247         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
15248         * config/nds32/pipelines.md: Include n7 settings.
15250 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
15251             Chung-Ju Wu  <jasonwucj@gmail.com>
15253         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
15254         * config/nds32/nds32-e8.md: New file.
15255         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
15256         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
15257         pipeline.
15258         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
15259         * config/nds32/nds32.md (pipeline_model): Add e8.
15260         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
15261         * config/nds32/pipelines.md: Include e8 settings.
15263 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
15264             Chung-Ju Wu  <jasonwucj@gmail.com>
15266         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
15267         * config/nds32/nds32-n8.md: New file.
15268         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
15269         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
15270         pipeline.
15271         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
15272         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
15273         * config/nds32/nds32.md (pipeline_model): Add n8.
15274         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
15275         * config/nds32/pipelines.md: Include n8 settings.
15277 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
15278             Chung-Ju Wu  <jasonwucj@gmail.com>
15280         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
15281         * config/nds32/nds32-n9-2r1w.md: New file.
15282         * config/nds32/nds32-n9-3r2w.md: New file.
15283         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
15284         nds32_register_ports): New or modify for cpu n9.
15285         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
15286         pipeline.
15287         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
15288         * config/nds32/nds32-utils.c: New file.
15289         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
15290         TARGET_MUL_SLOW): Define.
15291         * config/nds32/nds32.md (pipeline_model): New attribute.
15292         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
15293         New options that support cpu n9.
15294         * config/nds32/pipelines.md: Include n9 settings.
15295         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
15297 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
15299         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
15300         information if necessary.
15301         (output_cond_branch_compare_zero): Likewise.
15302         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
15303         (nds32_target_alignment): Refine for alignment.
15304         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
15305         (FUNCTION_BOUNDARY): Modify.
15306         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
15307         align case.
15308         * config/nds32/nds32.opt (malways-align, malign-functions): New.
15310 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
15312         * config/nds32/constants.md (unspec_volatile_element): Add values for
15313         TLB operation and data prefetch.
15314         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
15315         functions for TLB operation and data prefetch.
15316         * config/nds32/nds32-intrinsic.md: Likewise.
15317         * config/nds32/nds32_intrinsic.h: Likewise.
15318         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
15319         (nds32_print_operand): Likewise.
15320         * config/nds32/nds32.h (nds32_builtins): Likewise.
15322 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
15323         Andrew Pinski <pinsika@gcc.gnu.org>
15325         PR middle-end/82976
15326         * match.pd: Use constant_boolean_node of correct type instead of
15327         boolean_true_node or boolean_false_node for simplifying
15328         pointer comparisons to zero.
15330 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
15332         PR tree-optimization/80021
15333         * tree.c (verify_type_variant): Make error call in verify_variant_match
15334         translatable and remove final full stop.
15336 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
15338         * config/nds32/constants.md (unspec_volatile_element): Add
15339         UNSPEC_VOLATILE_EH_RETURN.
15340         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
15341         nds32_output_stack_pop): Support dwarf exception handling process.
15342         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
15343         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
15344         exception handling process.
15345         (nds32_compute_stack_frame): Likewise.
15346         (nds32_return_addr_rtx): Likewise.
15347         (nds32_initial_elimination_offset): Likewise.
15348         (nds32_expand_prologue): Likewise.
15349         (nds32_expand_epilogue): Likewise.
15350         (nds32_dynamic_chain_address): New function.
15351         * config/nds32/nds32.h (machine_function): Add fields for dwarf
15352         exception handling.
15353         (DYNAMIC_CHAIN_ADDRESS): Define.
15354         (EH_RETURN_DATA_REGNO): Define.
15355         (EH_RETURN_STACKADJ_RTX): Define.
15356         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
15357         patterns for dwarf exception handling.
15359 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
15361         * config/nds32/nds32.h: Clean up obsolete macros.
15363 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
15365         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15366         Add enum values for particular instructions.
15367         * config/nds32/nds32-intrinsic.c: Implementation of expanding
15368         particular intrinsic functions.
15369         * config/nds32/nds32-intrinsic.md: Likewise.
15370         * config/nds32/nds32_intrinsic.h: Likewise.
15371         * config/nds32/nds32.h (nds32_builtins): Likewise.
15372         * config/nds32/nds32.md (type): Add pbsad and pbsada.
15373         (btst, ave): New patterns for particular instructions.
15375 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
15377         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15378         Add enum values for atomic load/store and memory sync.
15379         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
15380         and memory sync.
15381         * config/nds32/nds32-intrinsic.md: Likewise.
15382         * config/nds32/nds32_intrinsic.h: Likewise.
15383         * config/nds32/nds32.h (nds32_builtins): Likewise.
15385 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
15387         PR tree-optimization/85257
15388         * fold-const.c (native_encode_vector): If not all elts could fit
15389         and off is -1, return 0 rather than offset.
15390         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
15391         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
15392         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
15393         adjust buffer in native_interpret_expr call.
15395 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
15397         * config/nds32/constants.md (unspec_volatile_element): Add cache
15398         control enum values.
15399         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
15400         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
15401         * config/nds32/nds32.c (nds32_cctl_names): New.
15402         (nds32_print_operand): Handle cache control register names.
15403         * config/nds32/nds32.h (nds32_builtins): New enum values.
15404         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
15405         macros.
15406         * config/nds32/nds32.md (type): Add mmu.
15407         * config/nds32/pipelines.md (simple_insn): Add mmu.
15409 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
15411         * config/nds32/nds32.md (type): Remove call.
15412         * config/nds32/pipelines.md (simple_insn): Likewise.
15414 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
15416         * config/nds32/constants.md (unspec_volatile_element): Add
15417         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
15418         UNSPEC_VOLATILE_FMFCFG.
15419         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
15420         description for fmfcfg and fmfcsr.
15421         (bdesc_1arg): Add fmtcsr.
15422         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
15423         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
15424         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
15425         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
15426         unspec_fmfcfg): New patterns.
15427         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
15428         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
15429         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
15430         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
15431         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
15432         __nds32__fmfcfg): Define.
15434 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
15436         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
15437         intrinsic register names.
15438         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
15439         intrinsic register enum values and macros.
15441 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
15443         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
15444         for load/store addressing form.
15445         (nds32_print_operand_address): Likewise.
15447 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
15449         PR target/85196
15450         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
15451         based on LABEL_REF.  Remove useless assertion.
15452         (pic_address_needs_scratch): Fix formatting.
15453         (sparc_legitimize_pic_address): Minor tweaks.
15454         (sparc_delegitimize_address): Adjust assertion accordingly.
15455         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
15456         into symbolic_operand.
15457         (movsi_high_pic_label_ref): Likewise.
15458         (movsi_lo_sum_pic_label_ref): Likewise.
15459         (movdi_pic_label_ref): Likewise.
15460         (movdi_high_pic_label_ref): Likewise.
15461         (movdi_lo_sum_pic_label_ref): Likewise.
15463 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
15465         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
15466         custom LIB_SPEC setup.
15468 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
15469             Kito Cheng  <kito.cheng@gmail.com>
15471         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
15472         * config/riscv/freebsd.h: New.
15474 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
15476         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
15477         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
15478         file.
15480 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
15481             Kito Cheng  <kito.cheng@gmail.com>
15483         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
15484         nds32_output_call, nds32_symbol_binds_local_p): New functions.
15485         * config/nds32/nds32-protos.h (nds32_output_call,
15486         nds32_output_return): Declare.
15487         * config/nds32/nds32.md: Refine all the call and return patterns.
15489 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
15491         PR debug/85252
15492         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
15493         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
15495         PR rtl-optimization/84872
15496         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
15497         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
15498         EDGE_CROSSING edge.
15500 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
15502         * expr.c (copy_blkmode_to_reg): Revert 254862.
15503         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
15505 2018-04-06  Richard Biener  <rguenther@suse.de>
15507         PR middle-end/85244
15508         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
15509         after seeing a component reference with an adjacent field.  Treat
15510         refs to arrays at struct end of external decls similar to
15511         refs to unconstrained commons.
15513 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
15515         PR sanitizer/85213
15516         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
15517         look through SAVE_EXPRs with non-side-effects argument.  Adjust
15518         recursive calls.
15519         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
15520         save_p here.
15522 2018-04-06  Richard Biener  <rguenther@suse.de>
15524         PR middle-end/85180
15525         * alias.c (find_base_term): New wrapper around find_base_term
15526         unwinding CSELIB_VAL_PTR changes.
15527         (find_base_term): Do not restore CSELIB_VAL_PTR during the
15528         recursion.
15530 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
15532         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
15533         instructions.
15534         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
15535         constant definitions.
15536         ("nop"): lr 0,0 -> nopr r0
15537         ("nop_lr0", "nop_lr1"): New insn definitions.
15539 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
15541         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
15542         NDS32_V3PUSH_AVAILABLE_P macro.
15544 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
15545             Chung-Ju Wu  <jasonwucj@gmail.com>
15547         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
15548         (nds32*-*-*): Add float and fpu_config into supported_defaults.
15549         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
15550         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
15551         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
15552         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
15553         * config/nds32/constraints.md: New constraints and checking for hard
15554         float configuration.
15555         * config/nds32/iterators.md: New mode iterator and attribute for hard
15556         float configuration.
15557         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
15558         patterns.
15559         * config/nds32/nds32-fpu.md: New file.
15560         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
15561         deal with hard float code generation.
15562         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
15563         ARCH_V3S.
15564         (abi_type, float_reg_number): New enum type.
15565         * config/nds32/nds32-predicates.c: New predicates for hard float.
15566         * config/nds32/nds32-protos.h: Declare functions for hard float.
15567         * config/nds32/nds32.c: Implementation for hard float configuration.
15568         * config/nds32/nds32.h: Definitions for hard float configuration.
15569         * config/nds32/nds32.md: Include hard float machine description and
15570         modify patterns for hard float configuration.
15571         * config/nds32/nds32.opt: New options for hard float configuration.
15572         * config/nds32/predicates.md: New predicates for hard float
15573         configuration.
15575 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
15577         * common/config/nds32/nds32-common.c
15578         (nds32_option_optimization_table): Enable -mreleax-hint by default.
15580 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
15582         PR middle-end/85195
15583         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
15584         CONSTRUCTOR_ELT (ctor, ...)->value.
15586 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
15588         PR target/85193
15589         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
15591 2018-04-05  Tom de Vries  <tom@codesourcery.com>
15593         PR target/85204
15594         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
15595         cond jump.
15597 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
15598             Kito Cheng  <kito.cheng@gmail.com>
15600         * config/nds32/constraints.md (U33): Fine-tune checking condition.
15601         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
15602         * config/nds32/nds32.h (nds32_16bit_address_type): Add
15603         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
15605 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
15606             Kito Cheng  <kito.cheng@gmail.com>
15608         * config/nds32/constraints.md (Ufe): New memory constraint.
15609         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
15610         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
15611         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
15612         operands.
15613         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
15614         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
15616 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15618         * config/nds32/nds32.md: Use optimize_size in the condition for
15619         alu-shift instructions.
15621 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15623         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
15625 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15627         * config/nds32/nds32.md (negsi2): Refine pattern.
15629 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
15630             Chung-Ju Wu  <jasonwucj@gmail.com>
15632         * config/nds32/iterators.md (shift_rotate): New code iterator.
15633         (shift): New code attribute.
15634         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
15635         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
15636         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
15637         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
15638         bit-wise operations.
15639         (andsi3, *andsi3): Ditto.
15640         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
15641         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
15642         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
15643         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
15644         nds32_ior_operand, nds32_xor_operand): New predicates.
15646 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15648         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
15649         (addsi3, subsi3): ... this.
15651 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15653         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
15655 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15657         * config/nds32/nds32.md: Adjust indention.
15659 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
15661         * config/nds32/nds32.md (feature): New attribute.
15663 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
15665         * config/nds32/nds32.md (subtype): New attribute.
15667 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
15669         PR target/85203
15670         * config/arm/arm-builtins.c (arm_expand_builtin): Change
15671         expansion to perform a bitwise AND of the argument followed by a
15672         boolean negation of the result.
15674 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
15676         PR rtl-optimization/84878
15677         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
15678         the basic block.  Assert the use reference is not artificial and that
15679         it has an associated insn.
15681 2018-04-04  Michael Matz  <matz@suse.de>
15683         * builtins.c (compute_objsize): Pass correct operand
15684         to array_at_struct_end_p.
15686 2018-04-04  Richard Biener  <rguenther@suse.de>
15688         PR lto/85176
15689         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
15690         from contexts for DINFO_LEVEL_TERSE and below.
15692 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
15694         * config/nds32/nds32-doubleword.md (move_<mode>): Require
15695         resiter_operand condition.
15696         * config/nds32/nds32.md (*move<mode>): Ditto.
15698 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
15699             Monk Chiang  <sh.chiang04@gmail.com>
15701         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
15703 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
15705         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
15707 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
15708             Kito Cheng  <kito.cheng@gmail.com>
15710         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
15711         nds32_cond_code_str, output_cond_branch,
15712         output_cond_branch_compare_zero, nds32_expand_cbranch,
15713         nds32_expand_cstore, nds32_expand_movcc,
15714         nds32_output_cbranchsi4_equality_zero,
15715         nds32_output_cbranchsi4_equality_reg,
15716         nds32_output_cbranchsi4_equality_reg_or_const_int,
15717         nds32_output_cbranchsi4_greater_less_zero: New functions.
15718         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
15719         nds32_expand_cstore, nds32_expand_movcc,
15720         nds32_output_cbranchsi4_equality_zero,
15721         nds32_output_cbranchsi4_equality_reg,
15722         nds32_output_cbranchsi4_equality_reg_or_const_int,
15723         nds32_output_cbranchsi4_greater_less_zero): Declare.
15724         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
15725         nds32_rimm11s_operand): New predicates.
15726         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
15727         * config/nds32/nds32.md: Rewrite all the branch and conditional move
15728         patterns.
15730 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
15732         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
15733         * config/nds32/nds32.md: Ditto.
15734         * config/nds32/pipelines.md: Ditto.
15736 2018-04-04  Richard Biener  <rguenther@suse.de>
15738         PR tree-optimization/85168
15739         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
15740         propagating abnormals.
15742 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
15744         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
15746 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
15747             Kito Cheng  <kito.cheng@gmail.com>
15749         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
15750         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
15751         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
15752         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
15753         * config/nds32/nds32.md (sibcall_internal): New.
15754         (sibcall_register): Remove.
15755         (sibcall_immediate): Remove.
15756         (sibcall_value_internal): New.
15757         (sibcall_value_register): Remove.
15758         (sibcall_value_immediate): Remove.
15759         * config/nds32/predicates.md (nds32_general_register_operand): New.
15760         (nds32_call_address_operand): New.
15762 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
15764         PR rtl-optimization/85167
15765         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
15766         bb_defs if *split_p, instead preinitialize it to NULL.
15768         PR tree-optimization/85156
15769         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
15770         evaluating the argument multiple times.
15772 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
15774         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
15775         than vector.
15776         (_mm_cvtpd_ps): Likewise.
15777         (_mm_cvttpd_epi32): Likewise.
15778         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
15779         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
15780         vector, pixel, and bool following altivec.h include.
15782 2018-04-03  Martin Sebor  <msebor@redhat.com>
15784         * doc/extend.texi (Common Function Attributes): Clarify.
15785         (const attribute): Likewise.
15786         (pure attribute): Likewise.
15788 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
15790         PR target/85169
15791         * config/i386/i386.c (ix86_expand_vector_set): Use
15792         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
15794 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
15796         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
15797         instructions when changing rounding bits to preserve precision bits
15798         in the x87 control word.
15800 2018-04-03  Martin Liska  <mliska@suse.cz>
15802         PR tree-optimization/82491
15803         * rtl.h (strip_offset_and_add): Replace += suboffset with
15804         poly_uint64 () + suboffset.
15806 2018-03-29  Martin Liska  <mliska@suse.cz>
15807             Martin Jambor  <mjambor@suse.cz>
15809         PR ipa/84947
15810         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
15811         param_type is not an integral or pointer type.
15813 2018-04-03  Richard Biener  <rguenther@suse.de>
15815         * sese.h (recompute_all_dominators): Remove.
15817 2018-04-02  Martin Sebor  <msebor@redhat.com>
15819         * doc/invoke.texi (-Wrestrict): Fix typos.
15821 2018-04-02  Jim Wilson  <jimw@sifive.com>
15823         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
15824         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
15825         (<optab>di3, <optab>si3_extend): Likewise.
15826         (<optab>si3_mask, <optab>si3_mask_1): New.
15827         (<optab>di3_mask, <optab>di3_mask_1): New.
15828         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
15829         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
15830         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
15832 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
15834         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
15835         example.
15837 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
15839         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
15840         (nds32_canonicalize_comparison): New function.
15842 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
15843             Kito Cheng  <kito.cheng@gmail.com>
15844             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
15846         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
15847         * config/nds32/constants.md (unspec_volatile_element): Add
15848         UNSPEC_VOLATILE_RELAX_GROUP.
15849         * config/nds32/nds32-relax-opt.c: New file.
15850         * config/nds32/nds32-predicates.c
15851         (nds32_symbol_load_store_p): New function.
15852         * config/nds32/nds32-protos.h
15853         (nds32_symbol_load_store_p): Declare function.
15854         (make_pass_nds32_relax_opt): Declare new rtl pass function.
15855         * config/nds32/nds32.c
15856         (nds32_register_pass): New function to register pass.
15857         (nds32_register_passes): New function to register passes.
15858         * config/nds32/nds32.md (relax_group): New pattern.
15859         * config/nds32/nds32.opt (mrelax-hint): New option.
15860         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
15862 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
15864         * config/nds32/t-nds32: Modify files dependency.
15866 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
15868         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
15869         (PROFILE_HOOK): Define its implementation.
15871 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
15873         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
15874         type and 32-bit size.
15876 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
15878         PR middle-end/85090
15879         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
15880         (V_128_256): New mode iterator.
15881         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
15882         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
15883         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
15884         of V.
15885         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
15886         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
15888 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
15890         PR target/83315
15891         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
15892         NaN inputs correctly.
15894 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
15896         PR target/80546
15897         * config/rs6000/vsx.md (??r): New mode attribute.
15898         (*vsx_mov<mode>_64bit): Use it.
15899         (*vsx_mov<mode>_32bit): Likewise.
15901 2018-03-30  Martin Sebor  <msebor@redhat.com>
15903         PR tree-optimization/84818
15904         * builtins.c (check_access): Use warning_n.
15906 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
15908         PR target/83822
15909         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
15910         condition.
15911         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
15912         condition.
15914 2018-03-30  Julia Koval  <julia.koval@intel.com>
15916         PR target/84413
15917         * x86-tune.def (movx, partial_reg_dependency): Enable for
15918         m_SKYLAKE_AVX512.
15920 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
15922         PR inline-asm/84985
15923         * lra-constraints.c (process_alt_operands): Move setting
15924         this_alternative_matches below.
15926 2018-03-29  Martin Liska  <mliska@suse.cz>
15928         PR lto/84995.
15929         * doc/invoke.texi: Document how LTO works with debug info.
15930         Describe auto-load support of binutils.  Mention 'x86-64'
15931         as valid option value of -march option.
15933 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
15935         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
15937         PR c/85094
15938         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
15939         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
15940         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
15941         checking.
15943 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
15945         PR target/84912
15946         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
15947         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
15948         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
15949         for RS6000_BTM_POWERPC64.
15950         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
15951         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
15952         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
15953         definition.
15954         (DIVDE): Use it.
15955         (DIVDEU): Likewise.
15957 2018-03-28  Carl Love  <cel@us.ibm.com>
15959         Revert
15960         2017-09-27  Carl Love  <cel@us.ibm.com>
15962         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
15963         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
15964         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
15965         fctiw instruction.
15967 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15969         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
15970         instead of __vector bool.
15971         (_mm_max_pu8): Likewise.
15972         (_mm_min_pi16): Likewise.
15974 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
15976         PR target/84912
15977         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
15978         (DIVWEUO): Likewise.
15979         (DIVDEO): Likewise.
15980         (DIVDEUO): Likewise.
15981         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
15982         DIVWEUO and DIVDEUO.
15983         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
15984         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
15985         (div_extend): Likewise.
15986         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
15987         builtin function.
15988         (__builtin_divweuo): Likewise.
15989         (__builtin_divdeo): Likewise.
15990         (__builtin_divdeuo): Likewise.
15992 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
15994         PR target/85095
15995         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
15996         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
15998         PR tree-optimization/82004
15999         * gimple-match-head.c (optimize_pow_to_exp): New function.
16000         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
16001         Don't fold to exp if optimize_pow_to_exp is false.
16003 2018-03-28  Martin Liska  <mliska@suse.cz>
16005         PR other/84819
16006         * calls.c (initialize_argument_information): Fix trailing space.
16007         * common.opt: Fix typo and provide better explanation for
16008         -fsanitize-coverage option.
16009         * config/i386/i386.opt: Fix typo.
16011 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
16012             Martin Liska  <mliska@suse.cz>
16014         PR sanitizer/85081
16015         * gimplify.c (asan_poison_variable): Don't do the check for
16016         gimplify_omp_ctxp here.
16017         (gimplify_decl_expr): Do it here.
16018         (gimplify_target_expr): Likewise.
16020 2018-03-28  Martin Liska  <mliska@suse.cz>
16022         PR target/84988
16023         * config/i386/i386.c (ix86_function_arg_advance): Do not call
16024         chkp_type_bounds_count if MPX is not enabled.
16026 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
16028         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
16030 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
16032         PR target/84914
16033         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
16034         function to create the function decl for complex long double
16035         multiply and divide for -mabi=ieeelongdouble.
16036         (init_float128_ieee): Call it.
16038 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
16040         PR target/85044
16041         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
16042         -fcf-protection=branch -mibt.
16043         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
16045 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
16047         PR target/81863
16048         * config/arm/arm.c (arm_valid_symbolic_address): Handle
16049         arm_word_relocations.
16051 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
16053         PR target/85056
16054         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
16055         extern array declarations.
16057 2018-03-27  Richard Biener  <rguenther@suse.de>
16059         PR middle-end/84067
16060         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
16061         explicit single_use checks.
16063 2018-03-27  Richard Biener  <rguenther@suse.de>
16065         PR tree-optimization/85082
16066         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
16067         Valueize the VUSE.
16069 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
16071         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
16072         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
16073         Turn on fasynchronous-unwind-tables and funwind-tables.
16075 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
16077         PR target/85073
16078         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
16079         (*bmi_blsr_<mode>_ccz): Ditto.
16081 2018-03-26  Tom de Vries  <tom@codesourcery.com>
16083         PR tree-optimization/85063
16084         * omp-general.c (offloading_function_p): New function.  Factor out
16085         of ...
16086         * omp-offload.c (pass_omp_target_link::gate): ... here.
16087         * omp-general.h (offloading_function_p): Declare.
16088         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
16089         with attribute omp declare target for offloading functions.
16091 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
16093         PR tree-optimization/84005
16094         * tree-data-ref.h (get_base_for_alignment): Declare.
16095         * tree-data-ref.c (get_base_for_alignment_1): New function.
16096         (get_base_for_alignment): Likewise.
16097         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
16098         get_base_for_alignment to find a suitable base object, instead
16099         of always using drb->base_address.
16101 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
16103         PR inline-asm/85022
16104         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
16105         known size by default.
16107 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
16109         PR inline-asm/85030
16110         * lra-constraints.c (process_alt_operands): Don't match BLKmode
16111         and non BLKmode operands.
16113 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16115         PR target/85026
16116         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
16117         Clean up attributes.
16119 2018-03-23  Richard Biener  <rguenther@suse.de>
16121         PR debug/85020
16122         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
16123         we are going to emit early debug for LTO.
16125 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
16127         PR inline-asm/85034
16128         * function.c (match_asm_constraints_1): Don't optimize if input
16129         doesn't satisfy general_operand predicate for output's mode.
16131         PR inline-asm/85022
16132         * alias.c (write_dependence_p): Don't require for x_canonicalized
16133         non-VOIDmode if x has VOIDmode.
16135         PR sanitizer/85029
16136         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
16137         just don't try to optimize it rather than assert it never happens.
16139 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16141         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
16142         macro expansions for definition of ST_INTERNAL_<mode> and
16143         LD_INTERNAL_<mode> builtins.
16144         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
16145         Remove prototype.
16146         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
16147         function.
16148         (altivec_expand_st_builtin): Likewise.
16149         (altivec_expand_builtin): Remove calls to deleted functions.
16150         (rs6000_address_for_altivec): Delete this function.
16151         * config/rs6000/vector.md: Remove expands for
16152         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
16154 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
16156         PR target/84826
16157         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
16158         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
16159         re-computing once computed.
16160         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
16161         (arm_init_machine_status): Initialize
16162         machine->static_chain_stack_bytes.
16164 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16166         PR target/84760
16167         * doc/extend.texi: Add four new prototypes for vec_ld.
16168         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
16169         definitions for more logical presentation.
16170         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
16171         entries for V1TI variants of __builtin_altivec_ld builtin.
16172         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
16173         handling of V1TI variant of LVX icode pattern.
16174         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
16175         (rs6000_gimple_fold_builtin): Likewise.
16176         (altivec_init_builtins): Add code to define
16177         __builtin_altivec_lvx_v1ti function.
16179 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
16181         PR inline-asm/84941
16182         * function.c (match_asm_constraints_1): Don't do the optimization
16183         if input isn't a REG, SUBREG, MEM or constant.
16185 2018-03-22  Tom de Vries  <tom@codesourcery.com>
16187         PR tree-optimization/84956
16188         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
16189         bb_has_abnormal_pred.
16191 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
16193         PR sanitizer/85018
16194         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
16195         DECL_INITIAL (decl) to decl at the end.
16196         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
16197         adjust the comment.
16199 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
16201         * doc/extend.texi (__builtin_tgmath): Document when complex
16202         integer types are treated as _Complex _Float64.
16204 2018-03-21  Tom de Vries  <tom@codesourcery.com>
16206         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
16208 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
16210         PR tree-optimization/84960
16211         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
16212         if it is ENTRY block, move them into single succ of ENTRY in that case.
16214 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
16216         PR tree-optimization/84811
16217         * poly-int.h (poly_span_traits): Remove the T3 parameter and
16218         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
16219         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
16220         (known_subrange_p): Update accordingly.  Cast each value involved
16221         in the size comparison, rather than casting the result of the
16222         subtraction.
16224 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
16226         PR tree-optimization/84982
16227         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
16228         by flipping the least significant bit rather than all bits from
16229         bitpos to bitpos + bitsize - 1.
16231 2018-03-21  Nathan Sidwell  <nathan@acm.org>
16233         * doc/extend.texi (Deprecated Features): Remove mention of
16234         long-deleted deprecations.
16236 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16238         PR jit/84288
16239         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
16240         * configure: Regenerate.
16242 2018-03-21  Tom de Vries  <tom@codesourcery.com>
16244         PR tree-optimization/83126
16245         * tree-parloops.c (num_phis): New function.
16246         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
16248 2018-03-21  Nathan Sidwell  <nathan@acm.org>
16250         * doc/extend.texi (Deprecated Features): Update deprecated flags,
16251         mention anon-struct/union members and trailing attributes.
16253 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
16255         PR tree-optimization/84969
16256         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
16257         builtin memset partitions if they set different rhs values.
16259 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
16261         PR rtl-optimization/84989
16262         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
16263         VEC_DUPLICATE with scalar result mode.
16265 2018-03-21  Martin Liska  <mliska@suse.cz>
16267         PR ipa/84963
16268         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
16269         not intended return statement.
16271 2018-03-21  Martin Liska  <mliska@suse.cz>
16273         PR target/84988
16274         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
16275         (chkp_find_bound_slots_1): Limit number of iterations.
16277 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
16279         PR target/84838
16280         * Minor grammar fixes for x86 options.
16282 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
16284         PR debug/84875
16285         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
16286         holding REG_CFA_RESTORE notes, instead turn them into a USE.
16288 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
16290         PR target/83789
16291         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
16292         (altivec_lvx_<mode>_1op): Likewise.
16293         (altivec_stvx_<mode>_2op): Likewise.
16294         (altivec_stvx_<mode>_1op): Likewise.
16295         (altivec_lvx_<VM2:mode>): New define_expand.
16296         (altivec_stvx_<VM2:mode>): Likewise.
16297         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
16298         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16299         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
16300         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
16301         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
16302         (rs6000_gen_lvx): Likewise.
16303         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
16304         (altivec_expand_stv_builtin): Likewise.
16305         (altivec_expand_builtin): Likewise.
16306         * config/rs6000/vector.md: Likewise.
16308 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16310         PR target/82518
16311         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
16312         BYTES_BIG_ENDIAN.
16314 2018-03-20  Richard Biener  <rguenther@suse.de>
16316         PR target/84986
16317         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
16318         sign-conversions as zero, fall back to standard scalar_stmt
16319         cost for the rest.
16321 2018-03-20  Martin Liska  <mliska@suse.cz>
16323         PR ipa/84825
16324         * predict.c (rebuild_frequencies): Handle case when we have
16325         PROFILE_ABSENT, but flag_guess_branch_prob is false.
16327 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
16329         PR target/84990
16330         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
16331         flag_section_anchors.
16332         * varasm.c (use_blocks_for_decl_p): Remove hack for
16333         dw2_force_const_mem.
16335         PR target/84845
16336         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
16337         to ...
16338         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
16339         be created, use lowpart_subreg of operands[0] rather than operands[0]
16340         itself.
16341         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
16342         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
16343         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
16344         and n constraint instead of aarch64_shift_imm_di and Usd.
16345         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
16346         (*aarch64_<optab>_reg_minus<mode>3): ... this.
16348 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
16350         PR target/82989
16351         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
16352         to favor GPR over NEON registers.
16353         (<shift>di3_neon): Likewise.
16355 2018-03-20  Tom de Vries  <tom@codesourcery.com>
16357         PR target/84952
16358         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
16359         (nvptx_process_pars): Emit bar.sync asap and alap.
16361 2018-03-20  Tom de Vries  <tom@codesourcery.com>
16363         PR target/84954
16364         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
16365         seen_label if seen_label is already set.
16367 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
16369         PR target/84945
16370         * config/i386/i386.c (fold_builtin_cpu): For features above 31
16371         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
16372         Use 1U instead of 1.  Formatting fixes.
16374         PR c/84953
16375         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
16376         instead of TREE_TYPE (s1) for the return value.
16378 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
16380         PR tree-optimization/84946
16381         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
16382         bitsize + bitsize in poly_uint64 rather than poly_int64.
16384         PR sanitizer/78651
16385         * dwarf2asm.c: Include fold-const.c.
16386         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
16387         of decl rather than decl itself.
16389         PR rtl-optimization/84643
16390         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
16392 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
16394         PR sanitizer/78651
16395         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
16396         calling assemble_variable.
16398 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
16400         PR target/81647
16401         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
16402         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
16404 2018-03-19  Jim Wilson  <jimw@sifive.com>
16406         PR bootstrap/84856
16407         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
16408         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
16409         (riscv_first_stack_step): Likewise.
16410         (riscv_option_override): Use STACK_BOUNDARY instead of
16411         MIN_STACK_BOUNDARY.
16412         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
16413         MIN_STACK_BOUNDARY.
16414         (BIGGEST_ALIGNMENT): Set to 128.
16415         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
16416         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
16417         STACK_BOUNDARY.
16419 2018-03-19  Richard Biener  <rguenther@suse.de>
16421         PR tree-optimization/84933
16422         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
16423         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
16425 2018-03-19  Richard Biener  <rguenther@suse.de>
16427         PR tree-optimization/84859
16428         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
16429         (cond_if_else_store_replacement): Perform sinking operation on
16430         single-store BBs regardless of MAX_STORES_TO_SINK setting.
16431         Generalize what a BB with a single eligible store is.
16433 2018-03-19  Richard Biener  <rguenther@suse.de>
16435         PR tree-optimization/84929
16436         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
16437         chrec_is_positive against non-chrec arg.
16439 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
16441         PR target/84711
16442         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
16444 2018-03-18  Martin Liska  <mliska@suse.cz>
16446         PR rtl-optimization/84635
16447         * regrename.c (build_def_use): Use matches_mode only when
16448         matches >= 0.
16450 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
16452         PR tree-optimization/84913
16453         * tree-vect-loop.c (vectorizable_reduction): Don't try to
16454         vectorize chains of COND_EXPRs.
16456 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
16458         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
16460 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
16462         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
16464 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
16466         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
16468 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
16469             Kito Cheng  <kito.cheng@gmail.com>
16471         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
16472         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
16473         (nds32_adjust_reg_alloc_order): New function.
16474         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
16476 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
16478         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
16479         nds32_print_operand, nds32_print_operand_address): Use
16480         HOST_WIDE_INT_PRINT_DEC instead.
16482 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
16484         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
16486 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
16488         PR target/84902
16489         * config/i386/i386.c (initial_ix86_tune_features,
16490         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
16491         unsigned long long.
16492         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
16493         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
16494         rather than 1u << ix86_tune.  Formatting fix.
16495         (ix86_option_override_internal): Change ix86_arch_mask from
16496         unsigned int to unsigned HOST_WIDE_INT, initialize to
16497         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
16498         (ix86_function_specific_restore): Likewise.
16500 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
16502         PR target/84899
16503         * postreload.c (reload_combine_recognize_pattern): Perform
16504         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
16505         truncate_int_for_mode the result for the destination's mode.
16507         PR c/84909
16508         * hsa-gen.c (mem_type_for_type): Fix comment typo.
16509         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
16510         Likewise.
16511         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
16512         Likewise.
16514 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
16516         PR target/84876
16517         * lra-assigns.c (lra_split_hard_reg_for): Don't use
16518         regno_allocno_class_array and sorted_pseudos.
16519         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
16520         insns where regno is used.
16522 2018-03-16  Martin Liska  <mliska@suse.cz>
16524         PR ipa/84833
16525         * multiple_target.c (create_dispatcher_calls): Redirect
16526         reference in the symbol table.
16528 2018-03-16  Martin Liska  <mliska@suse.cz>
16530         PR ipa/84722
16531         * multiple_target.c (create_dispatcher_calls): Redirect also
16532         an alias.
16534 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
16536         PR c++/79937
16537         PR c++/82410
16538         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
16539         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
16540         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
16542 2018-03-16  Julia Koval  <julia.koval@intel.com>
16544         * doc/invoke.texi (Skylake Server): Add CLWB.
16545         Cannonlake): Remove CLWB.
16547 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
16549         PR tree-optimization/84841
16550         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
16551         1 << 3.
16552         (FLOAT_ONE_CONST_TYPE): Define.
16553         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
16554         (sort_by_operand_rank): Put entries with higher constant_type last
16555         rather than first to match comments.
16557 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
16559         * config/nios2/nios2.md (movsi_internal): Fix thinko in
16560         split predicate.
16562 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
16564         PR c++/79085
16565         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
16566         check and use address of target always.
16568 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
16570         PR target/84574
16571         * config/i386/i386.c (indirect_thunk_needed): Update comments.
16572         (indirect_thunk_bnd_needed): Likewise.
16573         (indirect_thunks_used): Likewise.
16574         (indirect_thunks_bnd_used): Likewise.
16575         (indirect_return_needed): New.
16576         (indirect_return_bnd_needed): Likewise.
16577         (output_indirect_thunk_function): Add a bool argument for
16578         function return.
16579         (output_indirect_thunk_function): Don't generate alias for
16580         function return thunk.
16581         (ix86_code_end): Call output_indirect_thunk_function to generate
16582         function return thunks.
16583         (ix86_output_function_return): Set indirect_return_bnd_needed
16584         and indirect_return_needed instead of indirect_thunk_bnd_needed
16585         and indirect_thunk_needed.
16587 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
16589         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
16590         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
16591         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
16593 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
16594             Paul Hua <paul.hua.gm@gmail.com>
16596         PR c/84852
16597         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
16599 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
16601         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
16602         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
16603         resp. SFmode cases.
16605 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
16607         PR target/84711
16608         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
16609         instead of GET_MODE_SIZE when comparing Units.
16611 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
16613         PR target/68256
16614         * varasm.c (hash_section): Return an unchangeble hash value
16615         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
16616         Return !aarch64_can_use_per_function_literal_pools_p ().
16618 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
16620         PR target/84860
16621         * optabs.c (emit_conditional_move): Pass address of cmode's copy
16622         rather than address of cmode as last argument to prepare_cmp_insn.
16624 2018-03-15  Julia Koval  <julia.koval@intel.com>
16626         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
16627         F_AVX512VNNI, F_AVX512BITALG): New.
16629 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
16631         PR target/83451
16632         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
16633         insn for floating-point loads and stores.
16635 2018-03-14  Carl Love  <cel@us.ibm.com>
16637         * config/rs6000/rs6000-c.c: Add macro definitions for
16638         ALTIVEC_BUILTIN_VEC_PERMXOR.
16639         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
16640         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
16641         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
16642         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
16643         UNSPEC_VPERMXOR.
16644         * config/doc/extend.texi: Add prototypes for vec_permxor.
16646 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
16648         PR c/84852
16649         * diagnostic-show-locus.c (class layout_point): Convert m_line
16650         from int to linenum_type.
16651         (line_span::comparator): Use linenum "compare" function when
16652         comparing line numbers.
16653         (test_line_span): New function.
16654         (layout_range::contains_point): Convert param "row" from int to
16655         linenum_type.
16656         (layout_range::intersects_line_p): Likewise.
16657         (layout::will_show_line_p): Likewise.
16658         (layout::print_source_line): Likewise.
16659         (layout::should_print_annotation_line_p): Likewise.
16660         (layout::print_annotation_line): Likewise.
16661         (layout::print_leading_fixits): Likewise.
16662         (layout::annotation_line_showed_range_p): Likewise.
16663         (struct line_corrections): Likewise for field m_row.
16664         (line_corrections::line_corrections): Likewise for param "row".
16665         (layout::print_trailing_fixits): Likewise.
16666         (layout::get_state_at_point): Likewise.
16667         (layout::get_x_bound_for_row): Likewise.
16668         (layout::print_line): Likewise.
16669         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
16670         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
16671         * input.c (selftest::test_linenum_comparisons): New function.
16672         (selftest::input_c_tests): Call it.
16673         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
16674         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
16675         * selftest.h (ASSERT_GT): New macro.
16676         (ASSERT_GT_AT): New macro.
16677         (ASSERT_LT): New macro.
16678         (ASSERT_LT_AT): New macro.
16680 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
16682         PR rtl-optimization/84780
16683         * combine.c (distribute_links): Don't make a link based on pc_rtx.
16685 2018-03-14  Martin Liska  <mliska@suse.cz>
16687         * tree.c (record_node_allocation_statistics): Use
16688         get_stats_node_kind.
16689         (get_stats_node_kind): New function extracted from
16690         record_node_allocation_statistics.
16691         (free_node): Use get_stats_node_kind.
16693 2018-03-14  Richard Biener  <rguenther@suse.de>
16695         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
16696         that the value-set of ANTIC_IN doesn't grow.
16698         Revert
16699         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
16700         member.
16701         (BB_VISITED_WITH_VISITED_SUCCS): New define.
16702         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
16704 2018-03-14  Julia Koval  <julia.koval@intel.com>
16706         * config.gcc (icelake-client, icelake-server): New.
16707         (icelake): Remove.
16708         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
16709         (initial_ix86_arch_features): Ditto.
16710         (PTA_SKYLAKE): Add SGX.
16711         (PTA_ICELAKE): Remove.
16712         (PTA_ICELAKE_CLIENT): New.
16713         (PTA_ICELAKE_SERVER): New.
16714         (ix86_option_override_internal): Split up icelake on icelake client and
16715         icelake server.
16716         (get_builtin_code_for_version): Ditto.
16717         (fold_builtin_cpu): Ditto.
16718         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
16719         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
16720         * config/i386/i386.h (processor_type): Ditto.
16721         * doc/invoke.texi: Ditto.
16723 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
16725         PR sanitizer/83392
16726         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
16727         INTEGER_CST offset, add it together with bitpos / 8 and
16728         sign extend based on POINTER_SIZE.
16730         PR target/84844
16731         Revert
16732         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
16734         PR target/78090
16735         * config/i386/constraints.md (Yc): New register constraint.
16736         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
16737         Use Yc constraint for alternative 2 of operand 0.  Remove
16738         preferred_for_speed attribute.
16740 2018-03-14  Richard Biener  <rguenther@suse.de>
16742         PR tree-optimization/84830
16743         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
16744         with the old one to avoid oscillations.
16746 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
16748         PR target/83712
16749         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
16750         pseudos.
16751         (assign_by_spills): Return a flag of reload assignment failure.
16752         Do not process the reload assignment failures.  Do not spill other
16753         reload pseudos if they has the same reg class.  Update n if
16754         necessary.
16755         (lra_assign): Add a return arg.  Set up from the result of
16756         assign_by_spills call.
16757         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16758         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
16759         usage_insns if it is not NULL.
16760         (spill_hard_reg_in_range): New function.
16761         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
16762         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
16763         function prototypes.
16764         (lra_assign): Change prototype.
16765         * lra.c (lra): Add code to deal with fails by splitting hard reg
16766         live ranges.
16768 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
16770         * config/riscv/riscv.opt (mrelax): New option.
16771         * config/riscv/riscv.c (riscv_file_start): Emit ".option
16772         "norelax" when riscv_mrelax is disabled.
16773         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
16775 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
16777         PR target/84743
16778         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
16779         reassociation for int modes.
16781 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
16783         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
16784         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
16785         for big-endian.
16786         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
16787         * config/aarch64/aarch64-sve.md
16788         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
16789         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
16790         (*extend<mode><Vwide>2): Rename to...
16791         (aarch64_sve_extend<mode><Vwide>2): ...this.
16792         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
16793         renaming the old pattern to...
16794         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
16795         unsigned packs.
16796         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
16797         define_expand, renaming the old pattern to...
16798         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
16799         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
16800         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
16801         account when deciding which SVE instruction the optab should use.
16802         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
16804 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
16806         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
16807         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
16808         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
16809         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
16810         (tlsdesc_small_<mode>): Turn a define_expand and use
16811         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
16812         (tlsdesc_small_advsimd_<mode>): ...this.
16813         (tlsdesc_small_sve_<mode>): New pattern.
16815 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
16817         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
16818         (UNSPEC_UMUL_HIGHPART): New constants.
16819         (MUL_HIGHPART): New int iteraor.
16820         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
16821         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
16822         define_expand.
16823         (*<su>mul<mode>3_highpart): New define_insn.
16825 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
16827         PR lto/84805
16828         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
16829         incomplete types.
16831 2018-03-13  Martin Liska  <mliska@suse.cz>
16833         PR ipa/84658.
16834         * (sem_item_optimizer::sem_item_optimizer): Initialize new
16835         vector.
16836         (sem_item_optimizer::~sem_item_optimizer): Release it.
16837         (sem_item_optimizer::merge_classes): Register variable aliases.
16838         (sem_item_optimizer::fixup_pt_set): New function.
16839         (sem_item_optimizer::fixup_points_to_sets): Likewise.
16840         * ipa-icf.h: Declare new variables and functions.
16842 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
16844         PR middle-end/84834
16845         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
16846         integer_pow2p@2 and test integer_pow2p in condition.
16847         (A < 0 ? C : 0): Similarly for @1.
16849         PR middle-end/84831
16850         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
16851         characters starting at p contain '\0' character, don't look beyond
16852         that.
16854         PR target/84827
16855         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
16856         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
16858         PR target/84828
16859         * reg-stack.c (change_stack): Change update_end var from int to
16860         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
16861         also call set_block_for_insn on the newly added insns and rescan.
16863         PR target/84786
16864         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
16865         on the last operand.
16867         PR c++/84704
16868         * tree.c (stabilize_reference_1): Return save_expr (e) for
16869         STATEMENT_LIST even if it doesn't have side-effects.
16871 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
16873         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
16875 2018-03-12  Renlin Li  <renlin.li@arm.com>
16877         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
16878         aarch64_output_scalar_simd_mov_immediate.
16880 2018-03-12  Martin Sebor  <msebor@redhat.com>
16882         PR tree-optimization/83456
16883         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
16884         for perfectly overlapping calls to memcpy.
16885         (gimple_fold_builtin_memory_chk): Same.
16886         (gimple_fold_builtin_strcpy): Handle no-warning.
16887         (gimple_fold_builtin_stxcpy_chk): Same.
16888         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
16890 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
16892         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
16893         parameter.  Use it for SFmode.
16894         (rs6000_function_arg_advance_1): Adjust.
16895         (rs6000_function_arg): Adjust.
16896         (rs6000_gimplify_va_arg): Pass false for that new parameter.
16898 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
16900         PR rtl-optimization/84169
16901         PR rtl-optimization/84780
16902         * combine.c (can_combine_p): Check for a 2-insn combination whether
16903         the destination register is used between the two insns, too.
16905 2018-03-12  Richard Biener  <rguenther@suse.de>
16907         PR tree-optimization/84803
16908         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
16909         for refs DR analysis didn't process.
16911 2018-03-12  Richard Biener  <rguenther@suse.de>
16913         PR tree-optimization/84777
16914         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
16915         force-vectorize loops ignore whether we are optimizing for size.
16917 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
16919         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
16920         (TARGET_MD_ASM_ADJUST): Define.
16922 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
16923             Kito Cheng  <kito.cheng@gmail.com>
16924             Chung-Ju Wu  <jasonwucj@gmail.com>
16926         * config/nds32/nds32.c (nds32_compute_stack_frame,
16927         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
16928         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
16929         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
16930         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
16931         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
16932         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
16933         * config/nds32/nds32.md (prologue, epilogue): Use macro
16934         NDS32_V3PUSH_AVAILABLE_P to do checking.
16936 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
16938         PR debug/58150
16939         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
16940         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
16941         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
16942         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
16943         addition of most attributes on !orig_type_die or the attribute not
16944         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
16946 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
16947             Chung-Ju Wu  <jasonwucj@gmail.com>
16949         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
16950         __NDS32_VH__ macro.
16951         * config/nds32/nds32.opt (mvh): New option.
16953 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
16954             Chung-Ju Wu  <jasonwucj@gmail.com>
16956         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
16957         function.
16958         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
16959         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
16960         definition.
16962 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
16963             Chung-Ju Wu  <jasonwucj@gmail.com>
16965         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
16966         function.
16967         * config/nds32/nds32-multiple.md (strlensi): New pattern.
16968         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
16970 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
16971             Kito Cheng  <kito.cheng@gmail.com>
16972             Chung-Ju Wu  <jasonwucj@gmail.com>
16974         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
16975         UNSPEC_FFMISM and UNSPEC_FLMISM.
16976         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
16977         for ffb, ffmism and flmism.
16978         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
16979         (unspec_ffmism): Ditto.
16980         (unspec_flmism): Ditto.
16981         (nds32_expand_builtin_impl): Check if string extension is available.
16982         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
16983         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
16985 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
16987         Reverting patch:
16988         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
16990         PR target/83712
16991         * lra-assigns.c (assign_by_spills): Return a flag of reload
16992         assignment failure.  Do not process the reload assignment
16993         failures.  Do not spill other reload pseudos if they has the same
16994         reg class.
16995         (lra_assign): Add a return arg.  Set up from the result of
16996         assign_by_spills call.
16997         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
16998         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
16999         usage_insns if it is not NULL.
17000         (spill_hard_reg_in_range): New function.
17001         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17002         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17003         function prototypes.
17004         (lra_assign): Change prototype.
17005         * lra.c (lra): Add code to deal with fails by splitting hard reg
17006         live ranges.
17008 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
17010         PR target/84807
17011         * config/i386/i386.opt: Replace Enforcment with Enforcement.
17013 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
17015         PR debug/84620
17016         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
17017         (dw_val_node): Add val_symbolic_view.
17018         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
17019         (symview_upper_bound): New.
17020         (new_line_info_table): Initialize symviews_since_reset.
17021         (dwarf2out_source_line): Count symviews_since_reset and set
17022         symview_upper_bound.
17023         (dw_val_equal_p): Handle symview.
17024         (add_AT_symview): New.
17025         (print_dw_val): Handle symview.
17026         (attr_checksum, attr_checksum_ordered): Likewise.
17027         (same_dw_val_p, size_of_die): Likewise.
17028         (value_format, output_die): Likewise.
17029         (add_high_low_attributes): Use add_AT_symview for entry_view.
17030         (dwarf2out_finish): Reset symview_upper_bound, clear
17031         zero_view_p.
17033 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
17035         PR target/83969
17036         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
17037         Add strict argument and use it.
17038         (rs6000_split_multireg_move): Update for new strict argument.
17039         (mem_operand_gpr): Disallow all non-offsettable addresses.
17040         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
17042 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
17044         PR target/84772
17045         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
17046         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
17047         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
17049         PR c++/84767
17050         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
17051         decl, use remap_type if we want to use the type.
17053 2018-03-09  Martin Sebor  <msebor@redhat.com>
17055         PR tree-optimization/84526
17056         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
17057         Remove dead code.
17058         (builtin_access::generic_overlap): Be prepared to handle non-array
17059         base objects.
17061 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
17063         PR rtl-optimization/84682
17064         * lra-constraints.c (process_address_1): Check is_address flag
17065         for address constraints.
17066         (process_alt_operands): Likewise.
17067         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
17068         preprocess_constraints.
17069         * recog.h (preprocess_constraints): Add oploc parameter.
17070         Adjust callers.
17071         * recog.c (preprocess_constraints): Test address_operand for
17072         CT_ADDRESS constraints.
17074 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
17076         PR target/83712
17077         * lra-assigns.c (assign_by_spills): Return a flag of reload
17078         assignment failure.  Do not process the reload assignment
17079         failures.  Do not spill other reload pseudos if they has the same
17080         reg class.
17081         (lra_assign): Add a return arg.  Set up from the result of
17082         assign_by_spills call.
17083         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
17084         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
17085         usage_insns if it is not NULL.
17086         (spill_hard_reg_in_range): New function.
17087         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
17088         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
17089         function prototypes.
17090         (lra_assign): Change prototype.
17091         * lra.c (lra): Add code to deal with fails by splitting hard reg
17092         live ranges.
17094 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17096         PR target/83193
17097         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
17098         Accept complain bool parameter.  Only emit errors if it is true.
17099         (arm_parse_cpu_option_name): Likewise.
17100         (arm_target_thumb_only): Adjust callers of the above.
17101         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
17102         prototype to take a default true bool parameter.
17103         (arm_parse_arch_option_name): Likewise.
17105 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
17106             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
17108         PR jit/64089
17109         PR jit/84288
17110         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
17111         * configure: Regenerate.
17112         * configure.ac ("linker --version-script option"): New.
17113         ("linker soname option"): New.
17115 2018-03-09  Richard Biener  <rguenther@suse.de>
17117         PR tree-optimization/84775
17118         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
17119         immediate uses of predicate stmts and mark them modified.
17121         Revert
17122         PR tree-optimization/84178
17123         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17124         to caller.
17125         (version_loop_for_if_conversion): Delay update_ssa call.
17126         (tree_if_conversion): Delay update_ssa until after predicate
17127         insertion.
17129 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
17131         PR target/84763
17132         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
17133         when the function accesses prior frames.
17135 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
17137         PR debug/84456
17138         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
17139         gen_llsym, otherwise call maybe_gen_llsym.
17141         PR inline-asm/84742
17142         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
17143         has ',' character inside of it.
17145 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17147         PR target/84748
17148         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
17149         as clobbering CC_REGNUM.
17151 2018-03-08  Richard Biener  <rguenther@suse.de>
17153         PR middle-end/84552
17154         * tree-scalar-evolution.c: Include tree-into-ssa.h.
17155         (follow_copies_to_constant): Do not follow SSA names registered
17156         for update.
17158 2018-03-08  Richard Biener  <rguenther@suse.de>
17160         PR tree-optimization/84178
17161         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
17162         to caller.
17163         (version_loop_for_if_conversion): Delay update_ssa call.
17164         (tree_if_conversion): Delay update_ssa until after predicate
17165         insertion.
17167 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
17169         PR tree-optimization/84178
17170         * tree-if-conv.c (release_bb_predicate): Remove the
17171         the assertion that the stmts have NULL use_ops.
17172         Discard the statements, asserting that they haven't
17173         yet been added to a BB.
17175 2018-03-08  Richard Biener  <rguenther@suse.de>
17177         PR tree-optimization/84746
17178         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
17179         (phi_translate): Pass in destination ANTIC_OUT set.
17180         (phi_translate_1): Likewise.  For a simplified result lookup
17181         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
17182         (phi_translate_set): Adjust.
17183         (do_pre_regular_insertion): Likewise.
17184         (do_pre_partial_partial_insertion): Likewise.
17186 2018-03-08  Martin Liska  <mliska@suse.cz>
17188         PR gcov-profile/84735
17189         * doc/gcov.texi: Document usage of profile files.
17190         * gcov-io.h: Document changes in the format.
17192 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
17194         PR debug/84404
17195         PR debug/84408
17196         * dwarf2out.c (struct dw_line_info_table): Update comments for
17197         view == -1.
17198         (FORCE_RESET_NEXT_VIEW): New.
17199         (FORCE_RESETTING_VIEW_P): New.
17200         (RESETTING_VIEW_P): Check for -1 too.
17201         (ZERO_VIEW_P): Likewise.
17202         (new_line_info_table): Force-reset next view.
17203         (dwarf2out_begin_function): Likewise.
17204         (dwarf2out_source_line): Simplify zero_view_p initialization.
17205         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
17206         view directly.  Omit view when omitting .loc at line 0.
17208 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
17210         PR tree-optimization/84740
17211         * tree-switch-conversion.c (process_switch): Call build_constructors
17212         only if info.phi_count is non-zero.
17214         PR tree-optimization/84739
17215         * tree-tailcall.c (find_tail_calls): Check call arguments against
17216         DECL_ARGUMENTS (current_function_decl) rather than
17217         DECL_ARGUMENTS (func) when checking for tail recursion.
17219 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
17221         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
17222         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
17223         Volker Reichelt's entry and add entries for people that perform
17224         GCC fuzzy testing and report numerous bugs.
17226 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
17228         PR target/82411
17229         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
17230         readonly data in sdata, if that is disabled.
17231         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
17232         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
17233         -mreadonly-in-sdata option.
17235 2018-03-07  Martin Sebor  <msebor@redhat.com>
17237         PR tree-optimization/84468
17238         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
17239         basic block when looking for nul assignment.
17241 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
17243         PR target/84277
17244         * except.h (output_function_exception_table): Adjust prototype.
17245         * except.c (output_function_exception_table): Remove FNNAME parameter
17246         and add SECTION parameter.  Ouput one part of the table at a time.
17247         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
17248         the first part of the exception table and emit unwind directives.
17249         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
17250         (i386_pe_seh_cold_init): Likewise.
17251         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
17252         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
17253         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
17254         (ix86_output_call_insn): Emit a nop in one more case for SEH.
17255         * config/i386/winnt.c: Include except.h.
17256         (struct seh_frame_state): Add reg_offset, after_prologue and
17257         in_cold_section fields.
17258         (i386_pe_seh_end_prologue): Set seh->after_prologue.
17259         (i386_pe_seh_cold_init): New function.
17260         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
17261         to seh->in_cold_section.
17262         (seh_emit_push): Record the offset of the push.
17263         (seh_emit_save): Record the offet of the save.
17264         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
17265         Test seh->after_prologue to disregard the epilogue.
17266         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
17267         (i386_pe_end_cold_function): New function.
17269 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
17271         PR fortran/84565
17272         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
17273         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
17275         PR c++/84704
17276         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
17277         on tmp_var.
17278         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
17279         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
17281         PR middle-end/84723
17282         * multiple_target.c: Include tree-inline.h and intl.h.
17283         (expand_target_clones): Diagnose and fail if node->definition and
17284         !tree_versionable_function_p (node->decl).
17286 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
17288         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
17289         sprint_ul.
17290         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
17291         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
17292         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
17294 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
17296         PR target/84710
17297         * combine.c (try_combine): Use reg_or_subregno instead of handling
17298         just paradoxical SUBREGs and REGs.
17300 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
17302         * config/arc/arc.c (arc_finalize_pic): Remove function.
17303         (arc_must_save_register): We use single base PIC register, remove
17304         checks to save/restore the PIC register.
17305         (arc_expand_prologue): Likewise.
17306         * config/arc/arc-protos.h (arc_set_default_type_attributes):
17307         Remove.
17308         (arc_verify_short): Likewise.
17309         (arc_attr_type): Likewise.
17310         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
17311         (walk_stores): Likewise.
17312         (arc_address_cost): Make it static.
17313         (arc_verify_short): Likewise.
17314         (branch_dest): Likewise.
17315         (arc_attr_type): Likewise.
17316         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
17317         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
17318         (arc_final_prescan_insn): Remove inserting the nops due to
17319         hardware hazards.  It is done in reorg step.
17320         (insn_length_variant_t): Remove.
17321         (insn_length_parameters_t): Likewise.
17322         (arc_insn_length_parameters): Likewise.
17323         (arc_get_insn_variants): Likewise.
17324         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
17326 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
17328         PR inline-asm/84683
17329         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
17330         assertion failure.
17332         PR tree-optimization/84687
17333         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
17334         on new_node->decl.
17335         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
17337 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17339         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
17340         Rename to ppc_speculation_barrier.
17341         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
17342         __builtin_ppc_speculation_barrier.
17344 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
17346         PR target/84700
17347         * combine.c (combine_simplify_rtx): Don't try to simplify if
17348         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
17349         are equal to x.
17351 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
17353         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
17354         to 32 bytes when compiling for POWER9.
17356 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
17358         PR target/84564
17359         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
17360         regparm >= 3 with no arg reg available also for calls with
17361         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
17363         PR target/84524
17364         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
17365         orig,vex.
17366         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
17368 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
17370         PR target/84264
17371         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
17373 2018-03-05  Richard Biener  <rguenther@suse.de>
17375         PR tree-optimization/84486
17376         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
17377         When inserting a __builtin_assume_aligned call set the LHS
17378         SSA name alignment info accordingly.
17380 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
17382         PR tree-optimization/84114
17383         * config/aarch64/aarch64.c (aarch64_reassociation_width)
17384         Avoid reassociation of FLOAT_MODE addition.
17386 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
17388         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
17389         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
17390         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
17391         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
17392         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
17393         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
17394         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
17395         and -mwbnoinvd.
17396         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
17397         __builtin_ia32_wbinvd): New builtins.
17398         (SPECIAL_ARGS2): New.
17399         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
17400         (SPECIAL_ARGS2): New.
17401         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
17402         (ix86_valid_target_attribute_inner_p): Ditto.
17403         (ix86_init_mmx_sse_builtins): Add special_args2.
17404         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
17405         TARGET_WBNOINVD_P): New.
17406         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
17407         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
17408         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
17409         * config/i386/immintrin.h (_wbinvd): New intrinsic.
17410         * config/i386/pconfigintrin.h: New file.
17411         * config/i386/wbnoinvdintrin.h: Ditto.
17412         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
17413         wbnoinvdintrin.h.
17414         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
17416 2018-03-05  Richard Biener  <rguenther@suse.de>
17418         PR tree-optimization/84670
17419         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
17420         member.
17421         (BB_VISITED_WITH_VISITED_SUCCS): New define.
17422         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
17423         (compute_antic_aux): Only assert the number of values in ANTIC_IN
17424         doesn't grow if all successors (recursively) were visited at least
17425         once.
17427 2018-03-05  Richard Biener  <rguenther@suse.de>
17429         PR tree-optimization/84650
17430         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
17431         if executed in the loop pipeline.
17433 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
17435         * doc/configfiles.texi (Configuration Files): Move info about
17436         conditionalizing $target-protos.h to...
17437         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
17438         differs from $target-protos.h.
17440 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
17441             Chung-Ju Wu  <jasonwucj@gmail.com>
17443         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
17444         * config/nds32/nds32-multiple.md (setmemsi): Define.
17445         * config/nds32/nds32-memory-manipulation.c
17446         (nds32_gen_dup_4_byte_to_word_value): New.
17447         (emit_setmem_word_loop): New.
17448         (emit_setmem_byte_loop): New.
17449         (nds32_expand_setmem_loop): New.
17450         (nds32_expand_setmem_loop_v3m): New.
17451         (nds32_expand_setmem_unroll): New.
17452         (nds32_expand_setmem): New.
17454 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
17455             Chung-Ju Wu  <jasonwucj@gmail.com>
17457         * config/nds32/nds32-memory-manipulation.c
17458         (nds32_emit_load_store): New.
17459         (nds32_emit_post_inc_load_store): New.
17460         (nds32_emit_mem_move): New.
17461         (nds32_emit_mem_move_block): New.
17462         (nds32_expand_movmemsi_loop_unknown_size): New.
17463         (nds32_expand_movmemsi_loop_known_size): New.
17464         (nds32_expand_movmemsi_loop): New.
17465         (nds32_expand_movmemsi_unroll): New.
17466         (nds32_expand_movmemqi): Rename ...
17467         (nds32_expand_movmemsi): ... to this.
17468         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
17469         (movmemsi): ... to this.
17470         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
17471         (nds32_expand_movmemsi): ... to this.
17473 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
17474             Monk Chiang  <sh.chiang04@gmail.com>
17475             Chung-Ju Wu  <jasonwucj@gmail.com>
17477         * config/nds32/nds32-protos.h
17478         (nds32_expand_load_multiple): New arguments.
17479         (nds32_expand_store_multiple): Ditto.
17480         (nds32_valid_multiple_load_store): Rename ...
17481         (nds32_valid_multiple_load_store_p): ... to this.
17482         * config/nds32/nds32-memory-manipulation.c
17483         (nds32_expand_load_multiple): Refine implementation.
17484         (nds32_expand_store_multiple): Ditto.
17485         * config/nds32/nds32-multiple.md
17486         (load_multiple): Update nds32_expand_load_multiple interface.
17487         (store_multiple): Update nds32_expand_store_multiple interface.
17488         * config/nds32/nds32-predicates.c
17489         (nds32_valid_multiple_load_store): Rename ...
17490         (nds32_valid_multiple_load_store_p): ... to this and refine
17491         implementation.
17492         * config/nds32/predicates.md
17493         (nds32_load_multiple_and_update_address_operation): New predicate.
17494         (nds32_store_multiple_and_update_address_operation): New predicate.
17496 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
17497             Chung-Ju Wu  <jasonwucj@gmail.com>
17499         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
17500         (combo): New attribute.
17501         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
17503 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
17505         * config/nds32/nds32.opt: Change -mcmodel= default value.
17507 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
17508             Monk Chiang  <sh.chiang04@gmail.com>
17509             Chung-Ju Wu  <jasonwucj@gmail.com>
17511         * config/nds32/constants.md (unspec_element): New enum.
17512         * config/nds32/constraints.md (Umw): New constraint.
17513         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
17514         * config/nds32/nds32-intrinsic.md: Likewise.
17515         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
17516         (nds32_valid_smw_lwm_base_p): New.
17517         (nds32_output_smw_single_word): New.
17518         (nds32_output_lmw_single_word): New.
17519         (nds32_expand_unaligned_load): New.
17520         (nds32_expand_unaligned_store): New.
17521         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
17522         (nds32_output_smw_single_word): Declare.
17523         (nds32_output_lmw_single_word): Declare.
17524         (nds32_expand_unaligned_load): Declare.
17525         (nds32_expand_unaligned_store): Declare.
17526         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
17527         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
17528         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
17529         NDS32_BUILTIN_UASTORE_DW.
17530         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
17531         predicate.
17533 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
17534             Kito Cheng  <kito.cheng@gmail.com>
17535             Chung-Ju Wu  <jasonwucj@gmail.com>
17537         * config/nds32/nds32-intrinsic.c
17538         (nds32_expand_builtin_null_ftype_reg): Delete.
17539         (nds32_expand_builtin_reg_ftype_imm): Ditto.
17540         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
17541         (nds32_read_argument): New.
17542         (nds32_legitimize_target): Ditto.
17543         (nds32_legitimize_argument): Ditto.
17544         (nds32_check_constant_argument): Ditto.
17545         (nds32_expand_unop_builtin): Ditto.
17546         (nds32_expand_unopimm_builtin): Ditto.
17547         (nds32_expand_binop_builtin): Ditto.
17548         (nds32_builtin_decl_impl): Ditto.
17549         (builtin_description): Ditto.
17550         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
17551         (nds32_init_builtins_impl): Ditto.
17552         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
17553         (nds32_builtin_decl): New.
17554         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
17555         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
17557 2018-03-02  Jeff Law  <law@redhat.com>
17559         * reorg.c (stop_search_p): Handle DEBUG_INSN.
17560         (redundant_insn, fill_simple_delay_slots): Likewise.
17561         (fill_slots_from_thread): Likewise.
17562         * resource.c (mark_referenced_resources): Likewise.
17563         (mark_set_resources, find_dead_or_set_registers): Likewise.
17565 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
17567         * substring-locations.h (format_warning_va): Formatting fix for
17568         ATTRIBUTE_GCC_DIAG.
17569         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
17570         argument.
17571         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
17572         * substring-locations.c: Include intl.h.
17573         (format_warning_va): Turned into small wrapper around
17574         format_warning_n_va, renamed to ...
17575         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
17576         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
17577         use ngettext.
17578         (format_warning_at_substring_n): New function.
17579         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
17580         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
17581         format_warning_at_substring with just a shorter name instead of
17582         const function pointer.
17583         (fmtwarn_n): New function.
17584         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
17585         appropriate, get rid of all the fmtstr temporaries, move conditionals
17586         with G_() wrapped string literals directly into fmtwarn arguments,
17587         cast dir.len to (int), formatting fixes.
17589 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
17591         * doc/invoke.texi: Remove "Cilk Plus" references.
17593 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
17594             Richard Biener  <rguenther@suse.de>
17596         PR ipa/84628
17597         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
17598         for error or warning attributes if CALL_FROM_THUNK_P is set.
17599         Formatting fixes.
17601 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
17603         PR target/56540
17604         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
17605         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
17607         PR target/56540
17608         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
17609         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
17611         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
17612         instead of -1U in last predictors element's probability member.
17614 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
17616         PR ipa/83983
17617         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
17618         arguments if they are comparable.
17620 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
17622         PR tree-optimization/84634
17623         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
17624         masks and masked_loop_p with a single loop_masks, making sure it's
17625         null for bb vectorization.
17627 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
17629         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
17630         (vect_analyze_data_ref_access): Use loop->safe_len rather than
17631         loop->force_vectorize to check whether there is no alias.
17633 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
17635         PR target/84614
17636         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
17637         prototypes.
17638         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
17639         comments.
17640         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
17641         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
17642         instead of a loop around prev_real_insn.
17643         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
17644         prev_real_insn.
17646         PR inline-asm/84625
17647         * config/i386/i386.c (ix86_print_operand): Use conditional
17648         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
17649         zero vector.
17651 2018-03-02  Richard Biener  <rguenther@suse.de>
17653         PR tree-optimization/84427
17654         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
17655         (bitmap_set_subtract_values): Rewrite to handle multiple
17656         exprs per value.
17657         (clean): Likewise.
17658         (prune_clobbered_mems): Likewise.
17659         (phi_translate): Take edge instead of pred/phiblock.
17660         (phi_translate_1): Likewise.
17661         (phi_translate_set): Likewise.  Insert all translated
17662         exprs for a value into the set, keeping possibly multiple
17663         expressions per value.
17664         (compute_antic_aux): Adjust for phi_translate changes.
17665         When intersecting union the expressions and prune those
17666         not in the final value set, keeping possibly multiple
17667         expressions per value.  Do not use value-insertion
17668         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
17669         all expressions.  Add verification that the value-sets
17670         only shrink during iteration.
17671         (compute_partial_antic_aux): Adjust for the phi_translate changes.
17672         (do_pre_regular_insertion): Likewise.
17673         (do_pre_partial_partial_insertion): Likewise.
17675 2018-03-02  Richard Biener  <rguenther@suse.de>
17677         PR target/82005
17678         * config/darwin.c (saved_debug_info_level): New static global.
17679         (darwin_asm_lto_start): Disable debug info generation for LTO out.
17680         (darwin_asm_lto_end): Restore debug info generation settings.
17682 2018-03-01  Martin Liska  <mliska@suse.cz>
17684         PR sanitizer/82484
17685         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
17686         volatile arguments.
17688 2018-03-01  Richard Biener  <rguenther@suse.de>
17690         PR debug/84645
17691         * dwarf2out.c (gen_variable_die): Properly handle late VLA
17692         type annotation with LTO when debug was disabled at compile-time.
17694 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
17696         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
17697         XINT with INTVAL.
17698         (mips_final_postscan_insn): Likewise.
17700 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
17702         PR rtl-optimization/84528
17703         * alias.c (init_alias_target): Add commentary.
17704         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
17705         a unique base value if the frame pointer is not eliminated
17706         to the stack pointer.
17708 2018-03-01  Tom de Vries  <tom@codesourcery.com>
17710         PR rtl-optimization/83327
17711         * lra-int.h (hard_regs_spilled_into): Declare.
17712         * lra.c (hard_regs_spilled_into): Define.
17713         (init_reg_info): Init hard_regs_spilled_into.
17714         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
17715         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
17716         (process_bb_lives): Handle hard_regs_spilled_into.
17717         (lra_create_live_ranges_1): Before doing liveness propagation, clear
17718         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
17720 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
17722         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
17723         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
17724         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
17725         * config/rs6000/aix72.h: New file.
17727 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
17729         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
17730         instead of warning_at with conditional singular and plural messages
17731         where possible.
17733         PR target/52991
17734         * stor-layout.c (update_alignment_for_field): For
17735         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
17736         && !DECL_PACKED (field), do the alignment update, just use
17737         only desired_align instead of MAX (type_align, desired_align)
17738         as the alignment.
17739         (place_field): Don't do known_align < desired_align handling
17740         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
17741         is non-NULL, instead do it after rli->prev_field handling and
17742         only if not within a bitfield word.  For DECL_PACKED (field)
17743         use type_align of BITS_PER_UNIT.
17745 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
17747         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
17748         superfluous parentheses and trailing spaces.
17750 2018-02-28  Richard Biener  <rguenther@suse.de>
17752         PR tree-optimization/84584
17753         * graphite-scop-detection.c (scop_detection::add_scop): Discard
17754         SCoPs with fake exit edge.
17756 2018-02-28  Martin Liska  <mliska@suse.cz>
17758         PR testsuite/84597
17759         * timevar.c (timer::print): Fix format to properly print 100%
17760         values.
17762 2018-02-28  Richard Biener  <rguenther@suse.de>
17764         PR middle-end/84607
17765         * genmatch.c (capture_info::walk_match): Do not mark
17766         captured expressions without operands as expr_p given
17767         they act more like predicates and should be subject to
17768         "lost tail" side-effect preserving.
17770 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
17772         PR rtl-optimization/81611
17773         * auto-inc-dec.c (attempt_change): Move dead note from
17774         mem_insn if it's the next use of regno
17775         (find_address): Take address use of reg holding
17776         non-incremented value.  Add parm to limit search to the named
17777         reg only.
17778         (merge_in_block): Attempt to use a mem insn that is the next
17779         use of the original regno.
17781 2018-02-27  Martin Sebor  <msebor@redhat.com>
17783         PR c++/83871
17784         * doc/invoke.texi (-Wmissing-attributes): New option.
17785         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
17787 2018-02-27  Martin Sebor  <msebor@redhat.com>
17789         PR translation/84207
17790         * diagnostic-core.h (warning_n, error_n, inform_n): Change
17791         n argument to unsigned HOST_WIDE_INT.
17792         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
17793         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
17794         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
17795         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
17797 2018-02-27  Richard Biener  <rguenther@suse.de>
17799         PR tree-optimization/84512
17800         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
17801         Do not use the estimate returned from record_stmt_cost for
17802         the scalar iteration cost but sum properly using add_stmt_cost.
17804 2018-02-27  Richard Biener  <rguenther@suse.de>
17806         PR tree-optimization/84466
17807         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
17808         Adjust last change to less strictly validate use operands.
17810 2018-02-27  Martin Liska  <mliska@suse.cz>
17812         PR gcov-profile/84548
17813         * gcov.c (process_file): Allow partial overlap and consider it
17814         also as group functions.
17815         (output_lines): Properly calculate range of lines for a group.
17817 2018-02-27  Martin Liska  <mliska@suse.cz>
17819         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
17820         'ggc' suffixes.  Change first column width.
17821         (timer::print): Fix formatting of the column.
17823 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
17825         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
17826         preserve inline entry blocks for the sake of debug inline
17827         entry point markers alone.
17828         (remove_unused_locals): Suggest in comments a better place to
17829         force the preservation of inline entry blocks that are
17830         otherwise unused, but do not preserve them.
17832 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
17834         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
17836 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
17838         PR target/84039
17839         * config/i386/constraints.md (Bs): Replace
17840         ix86_indirect_branch_register with
17841         TARGET_INDIRECT_BRANCH_REGISTER.
17842         (Bw): Likewise.
17843         * config/i386/i386.md (indirect_jump): Likewise.
17844         (tablejump): Likewise.
17845         (*sibcall_memory): Likewise.
17846         (*sibcall_value_memory): Likewise.
17847         Peepholes of indirect call and jump via memory: Likewise.
17848         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
17849         (*sibcall_value_GOT_32): Likewise.
17850         * config/i386/predicates.md (indirect_branch_operand): Likewise.
17851         (GOT_memory_operand): Likewise.
17852         (call_insn_operand): Likewise.
17853         (sibcall_insn_operand): Likewise.
17854         (GOT32_symbol_operand): Likewise.
17855         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
17857 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
17859         PR rtl-optimization/83496
17860         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
17861         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
17862         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
17863         redundant insn, if any.
17864         (relax_delay_slots): Likewise.
17865         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
17867 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
17869         PR tree-optimization/83965
17870         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
17871         that grouped statements are part of a reduction chain.  Return
17872         true if the statement is not marked as a reduction itself but
17873         is part of a group.
17874         (vect_recog_dot_prod_pattern): Don't check whether the statement
17875         is part of a group here.
17876         (vect_recog_sad_pattern): Likewise.
17877         (vect_recog_widen_sum_pattern): Likewise.
17879 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
17881         PR debug/84545
17882         * final.c (rest_of_clean_state): Also look for calls inside sequences.
17884 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
17886         PR target/84530
17887         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
17888         the bool argument.
17889         (ix86_output_indirect_function_return): New prototype.
17890         (ix86_split_simple_return_pop_internal): Likewise.
17891         * config/i386/i386.c (indirect_return_via_cx): New.
17892         (indirect_return_via_cx_bnd): Likewise.
17893         (indirect_thunk_name): Handle return va CX_REG.
17894         (output_indirect_thunk_function): Create alias for
17895         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
17896         (ix86_output_indirect_jmp): Remove the bool argument.
17897         (ix86_output_indirect_function_return): New function.
17898         (ix86_split_simple_return_pop_internal): Likewise.
17899         * config/i386/i386.md (*indirect_jump): Don't pass false
17900         to ix86_output_indirect_jmp.
17901         (*tablejump_1): Likewise.
17902         (simple_return_pop_internal): Change it to define_insn_and_split.
17903         Call ix86_split_simple_return_pop_internal to split it for
17904         -mfunction-return=.
17905         (simple_return_indirect_internal): Call
17906         ix86_output_indirect_function_return instead of
17907         ix86_output_indirect_jmp.
17909 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
17911         PR bootstrap/84405
17912         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
17913         memset and value initialization afterwards.
17915 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
17917         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
17919 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
17921         PR target/84521
17922         * common/config/aarch64/aarch64-common.c
17923         (aarch_option_optimization_table[]): Switch
17924         off fomit-frame-pointer
17926 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
17927             Chung-Ju Wu  <jasonwucj@gmail.com>
17929         * config/nds32/nds32-multiple.md (load_multiple): Disallow
17930         volatile memory.
17931         (store_multiple): Ditto.
17933 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
17935         * config.gcc: Add --with-cpu support for nds32 target.
17936         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
17937         * config/nds32/nds32.opt: Add -mcpu= option.
17939 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
17941         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
17942         isel=yes): Warn for these deprecated options.
17944 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
17946         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
17947         ISA_2_5_MASKS_EMBEDDED.
17949 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
17951         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
17952         p->max as pointers rather than using iterative_hash_expr.
17954 2018-02-23  Carl Love  <cel@us.ibm.com>
17956         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
17957         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
17958         BU_P8V_OVERLOAD_2.
17959         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
17960         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
17961         P8V_BUILTIN_VEC_VUNSIGNED2.
17963 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
17965         PR target/81572
17966         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
17967         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
17968         LRA_UNKNOWN_ALT.
17969         * lra-constraints.c (curr_insn_transform): Set up
17970         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
17971         LRA_UNKNOWN_ALT.
17972         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
17973         * lra-eliminations.c (spill_pseudos): Ditto.
17974         (process_insn_for_elimination): Ditto.
17975         * lra-lives.c (reg_early_clobber_p): Use the new macros.
17976         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
17977         LRA_NON_CLOBBERED_ALT.
17979 2018-02-22  Martin Sebor  <msebor@redhat.com>
17981         PR tree-optimization/84480
17982         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
17983         to maybe_diag_stxncpy_trunc.  Call it.
17984         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
17985         from gimple_fold_builtin_strcpy.  Print inlining stack.
17986         (handle_builtin_stxncpy): Print inlining stack.
17987         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
17989 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
17991         PR target/84176
17992         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
17993         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
17994         and -fcheck-pointer-bounds are used together.
17995         (indirect_thunk_prefix): New enum.
17996         (indirect_thunk_need_prefix): New function.
17997         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
17998         "_nt" instead of "_bnd" for NOTRACK prefix.
17999         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
18000         (output_indirect_thunk_function): Likewise.
18001         (): Likewise.
18002         (ix86_code_end): Update output_indirect_thunk_function calls.
18003         (ix86_output_indirect_branch_via_reg): Replace
18004         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
18005         (ix86_output_indirect_branch_via_push): Likewise.
18006         (ix86_output_function_return): Likewise.
18007         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
18008         incompatible with -fcf-protection=branch and
18009         -fcheck-pointer-bounds.
18011 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
18013         PR target/83335
18014         * config/aarch64/aarch64.c (aarch64_print_address_internal):
18015         Change gcc_assert call to output_operand_lossage.
18017 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
18019         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
18021 2018-02-22  DJ Delorie  <dj@redhat.com>
18022             Sebastian Perta  <sebastian.perta@renesas.com>
18023             Oleg Endo  <olegendo@gcc.gnu.org>
18025         * config/rx/rx.c (rx_rtx_costs): New function.
18026         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
18028 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
18030         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
18032 2018-02-22  Martin Liska  <mliska@suse.cz>
18034         PR driver/83193
18035         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
18036         Add "native" as a possible value.
18038 2018-02-22  Martin Liska  <mliska@suse.cz>
18040         PR driver/83193
18041         * config/i386/i386.c (ix86_option_override_internal):
18042         Add "native" as a possible value for -march and -mtune.
18044 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
18046         PR target/84502
18047         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
18048         to all type variants.
18050         PR tree-optimization/84503
18051         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
18052         width as info->bitpos + info->bitsize - start.
18053         (merged_store_group::merge_overlapping): Simplify width computation.
18054         (check_no_overlap): New function.
18055         (imm_store_chain_info::try_coalesce_bswap): Compute expected
18056         start + width and last_order of the group, fail if check_no_overlap
18057         fails.
18058         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
18059         to group if check_no_overlap fails.
18061 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
18063         * config/rs6000/altivec.md: Delete contraint arguments to
18064         define_expand, define_split, and define_peephole2, and in
18065         define_insn_and_split if always unused.
18066         * config/rs6000/darwin.md: Ditto.
18067         * config/rs6000/dfp.md: Ditto.
18068         * config/rs6000/rs6000.md: Ditto.
18069         * config/rs6000/sync.md: Ditto.
18070         * config/rs6000/vector.md: Ditto.
18071         * config/rs6000/vsx.md: Ditto.
18073 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
18075         * config/rs6000/altivec.md: Write output control strings as braced
18076         blocks instead of double-quoted strings.
18077         * config/rs6000/darwin.md: Ditto.
18078         * config/rs6000/rs6000.md: Ditto.
18079         * config/rs6000/vector.md: Ditto.
18080         * config/rs6000/vsx.md: Ditto.
18082 2018-02-21  Jason Merrill  <jason@redhat.com>
18084         PR c++/84314 - ICE with templates and fastcall attribute.
18085         * attribs.c (build_type_attribute_qual_variant): Remove assert.
18087 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
18089         * ipa-cp.c (determine_versionability): Fix comment typos.
18091 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
18093         PR c/84229
18094         * ipa-cp.c (determine_versionability): Do not version functions caling
18095         va_arg_pack.
18097 2018-02-21  Martin Liska  <mliska@suse.cz>
18099         PR driver/83193
18100         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
18101         Add "native" as a possible value.
18102         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
18103         the macro when native cpu detection is available.
18105 2018-02-21  Martin Liska  <mliska@suse.cz>
18107         PR driver/83193
18108         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
18109         Add "native" as a possible value.
18110         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
18111         when native cpu detection is available.
18113 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
18114             Martin Sebor  <msebor@redhat.com>
18116         PR tree-optimization/84478
18117         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
18118         false.
18119         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
18120         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
18121         support which is conservatively correct, for 2 only stay conservative
18122         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
18123         argument to the 2 argument get_range_strlen, adjust 6 arg
18124         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
18125         false.
18126         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
18127         (gimple_fold_builtin_strlen): Pass true as last argument to
18128         get_range_strlen.
18130 2018-02-20  Martin Sebor  <msebor@redhat.com>
18132         PR middle-end/84095
18133         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
18134         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
18135         (builtin_memref::builtin_memref): Factor out parts into
18136         set_base_and_offset and call it.
18138 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
18140         PR middle-end/84406
18141         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
18142         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
18143         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
18144         search at the associated MODE_INT.
18146 2018-02-20  Jeff Law  <law@redhat.com>
18148         PR middle-end/82123
18149         PR tree-optimization/81592
18150         PR middle-end/79257
18151         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
18152         for range data rather than using global data.
18153         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
18154         range data rather than using global data.
18155         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
18156         pass it to children as needed.
18157         (struct directive::fmtresult): Similarly.
18158         (struct directive::set_width): Similarly.
18159         (struct directive::set_precision): Similarly.
18160         (format_integer, format_directive, parse_directive): Similarly.
18161         (format_none): Accept unnamed vr_values parameter.
18162         (format_percent, format_floating, format_character): Similarly.
18163         (format_string, format_plain): Similarly.
18164         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
18165         the EVRP range analyzer for range data rather than using global data.
18166         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
18167         gimple-ssa-evrp-analyze.h
18168         (class sprintf_dom_walker): Add after_dom_children member function.
18169         Add evrp_range_analyzer member.
18170         (sprintf_dom_walker::before_dom_children): Call into the EVRP
18171         range analyzer as needed.
18172         (sprintf_dom_walker::after_dom_children): New member function.
18173         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
18174         if not optimizing.
18175         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
18176         (evrp_range_analyzer::pop_to_marker): Likewise.
18178 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
18180         PR tree-optimization/84419
18181         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
18182         with the required type if its current type is compatible but
18183         different.
18185 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
18187         PR middle-end/82004
18188         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
18189         after vectorization.
18191 2018-02-20  Martin Liska  <mliska@suse.cz>
18193         PR driver/83193
18194         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
18195         possible values if we don't have a hint.
18197 2018-02-20  Martin Liska  <mliska@suse.cz>
18199         PR c/84310
18200         PR target/79747
18201         * final.c (shorten_branches): Build align_tab array with one
18202         more element.
18203         * opts.c (finish_options): Add alignment option limit check.
18204         (MAX_CODE_ALIGN): Likewise.
18205         (MAX_CODE_ALIGN_VALUE): Likewise.
18206         * doc/invoke.texi: Document maximum allowed option value for
18207         all -falign-* options.
18209 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
18211         PR target/84146
18212         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
18213         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
18214         * var-tracking.c (emit_note_insn_var_location): Remove all references
18215         to NOTE_INSN_CALL_ARG_LOCATION.
18216         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
18217         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
18218         Use copy_rtx_if_shared.
18219         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
18220         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
18221         (dwarf2out_var_location): Remove handling of
18222         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
18223         on call_insn.
18224         * final.c (final_scan_insn): Remove all references to
18225         NOTE_INSN_CALL_ARG_LOCATION.
18226         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
18227         before dumping final insns.
18228         * except.c (emit_note_eh_region_end): Remove all references to
18229         NOTE_INSN_CALL_ARG_LOCATION.
18230         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
18231         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
18232         * config/arc/arc.c (hwloop_optimize): Likewise.
18233         * config/arm/arm.c (create_fix_barrier): Likewise.
18234         * config/s390/s390.c (s390_chunkify_start): Likewise.
18235         * config/sh/sh.c (find_barrier): Likewise.
18236         * config/i386/i386.c (rest_of_insert_endbranch,
18237         ix86_seh_fixup_eh_fallthru): Likewise.
18238         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
18239         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
18240         * config/frv/frv.c (frv_function_prologue): Likewise.
18241         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
18242         reg note.
18243         (note_outside_basic_block_p): Remove all references to
18244         NOTE_INSN_CALL_ARG_LOCATION.
18245         * gengtype.c (adjust_field_rtx_def): Likewise.
18246         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
18247         Likewise.
18248         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
18249         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
18251         PR c++/84444
18252         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
18253         is ADDR_EXPR.
18255         PR tree-optimization/84452
18256         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
18257         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
18258         is NULL.
18260 2018-02-19  Martin Liska  <mliska@suse.cz>
18262         PR sanitizer/82183
18263         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
18265 2018-02-19  Martin Liska  <mliska@suse.cz>
18266             Richard Sandiford  <richard.sandiford@linaro.org>
18268         PR tree-optimization/82491
18269         * gimple-fold.c (get_base_constructor): Make earlier bail out
18270         to prevent ubsan.
18272 2018-02-19  Carl Love  <cel@us.ibm.com>
18274         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
18275         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
18276         BU_P8V_OVERLOAD_1.
18277         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
18278         P8V_BUILTIN_VEC_NEG.
18280 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
18282         * config/rl78/rl78.md (movdf): New define expand.
18284 2018-02-19  Martin Liska  <mliska@suse.cz>
18286         PR other/80589
18287         * doc/invoke.texi: Fix typo.
18288         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
18290 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
18292         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
18293         handle rs6000_single_float and rs6000_double_float specially for
18294         e500 family CPUs.
18296 2018-02-16  Jeff Law  <law@redhat.com>
18298         * config/rx/rx.c (add_pop_cfi_notes): New function.;
18299         (pop_regs): Use it.
18301 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
18303         PR ipa/84425
18304         * ipa-inline.c (inline_small_functions): Fix a typo.
18306 2018-02-16  Nathan Sidwell  <nathan@acm.org>
18308         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
18310 2018-02-16  Carl Love  <cel@us.ibm.com>
18312         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
18313         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
18314         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
18315         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
18316         expansion to P8V_BUILTIN_VEC_FLOAT2.
18318 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
18320         PR rtl-optimization/70023
18321         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
18322         src_regno into account.
18324 2018-02-16  Carl Love  <cel@us.ibm.com>
18326         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
18327         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
18328         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
18329         * config/rs6000/rs6000.c: Remove case statements for
18330         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
18331         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
18332         and P9V_BUILTIN_VEC_VINSERT4B.
18333         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
18334         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
18335         * config/rs6000/vsx.md:
18336         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
18337         vec_insert4b.
18339 2018-02-16  Carl Love  <cel@us.ibm.com>
18341         * config/rs6000/altivec.h: Add builtin names vec_extract4b
18342         vec_insert4b.
18343         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
18344         definitions.
18345         * config/rs6000/rs6000-c.c: Add the definitions for
18346         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
18347         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
18348         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
18349         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
18350         definition for insert4b and define insn *insert3b_internal.
18351         * doc/extend.texi: Add documentation for vec_extract4b.
18353 2018-02-16  Nathan Sidwell  <nathan@acm.org>
18355         * doc/extend.texi (Backwards Compatibility): Mention friend
18356         injection.  Note for-scope is deprecated.
18357         * doc/invoke.texi (-ffriend-injection): Deprecate.
18359 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
18361         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
18362         that moved to I2, also allow destinations that are a paradoxical
18363         subreg (instead of a normal reg).
18365 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
18367         PR target/83831
18368         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
18369         to QImode.
18371 2018-02-16  Richard Biener  <rguenther@suse.de>
18373         PR tree-optimization/84037
18374         PR tree-optimization/84016
18375         PR target/82862
18376         * config/i386/i386.c (ix86_builtin_vectorization_cost):
18377         Adjust vec_construct for the fact we need additional higher latency
18378         128bit inserts for AVX256 and AVX512 vector builds.
18379         (ix86_add_stmt_cost): Scale vector construction cost for
18380         elementwise loads.
18382 2018-02-16  Richard Biener  <rguenther@suse.de>
18384         PR tree-optimization/84417
18385         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
18386         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
18387         (non_rewritable_lvalue_p): Likewise, use poly-ints.
18389 2018-02-16  Martin Liska  <mliska@suse.cz>
18391         PR sanitizer/84307
18392         * internal-fn.def (ASAN_CHECK): Set proper flags.
18393         (ASAN_MARK): Likewise.
18395 2018-02-16  Julia Koval  <julia.koval@intel.com>
18397         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
18398         from PTA_CANNONLAKE.
18400 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
18402         PR target/84272
18403         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
18404         Use ++iter rather than iter++ for std::list iterators.
18405         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
18406         defer deleting them until all nodes in the forest are processed.  Do
18407         free even leaf nodes.  Change to_process into auto_vec.
18409         PR bootstrap/84405
18410         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
18411         * vec.h (vec_default_construct): Use memset instead of placement new
18412         if BROKEN_VALUE_INITIALIZATION is defined.
18413         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
18414         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
18415         is defined.
18417         PR rtl-optimization/83723
18418         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
18419         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
18420         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
18421         recursive calls.
18422         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
18423         callers.
18424         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
18426 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
18428         PR rtl-optimization/81443
18429         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
18430         from inner REGs to paradoxical SUBREGs.
18432 2018-02-16  Richard Biener  <rguenther@suse.de>
18434         PR tree-optimization/84399
18435         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
18436         For operands we can analyze at their definition make sure we can
18437         analyze them at each use as well.
18439 2018-02-16  Richard Biener  <rguenther@suse.de>
18441         PR tree-optimization/84190
18442         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
18443         volatile accesses if the decl isn't volatile.
18445 2018-02-15  Jason Merrill  <jason@redhat.com>
18447         PR c++/84314 - ICE with templates and fastcall attribute.
18448         * attribs.c (build_type_attribute_qual_variant): Don't clobber
18449         TYPE_CANONICAL on an existing type.
18451 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
18453         PR tree-optimization/84383
18454         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
18455         dstoff nor call operand_equal_p if dstbase is NULL.
18457         PR tree-optimization/84334
18458         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
18459         also a CONSTANT_CLASS_P, punt.
18461 2018-02-14  Jim Wilson  <jimw@sifive.com>
18463         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
18464         first SMALL_OPERAND check.  New local min_second_step.  Move assert
18465         to where locals are set.  Add TARGET_RVC support.
18466         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
18468 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
18470         * doc/invoke.texi: Correct -Wformat-overflow code sample.
18472 2018-02-14  Martin Sebor  <msebor@redhat.com>
18474         PR tree-optimization/83698
18475         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
18476         arrays constrain the offset range to their bounds.
18477         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
18478         (builtin_access::overlap): Avoid setting the size of overlap if it's
18479         already been set.
18480         (maybe_diag_overlap): Also consider arrays when deciding what values
18481         of offsets to include in diagnostics.
18483 2018-02-14  Martin Sebor  <msebor@redhat.com>
18485         PR c/84108
18486         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
18487         that correspond to the kind of a declaration.
18489 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
18491         PR target/83984
18492         * config/pa/pa.md: Load address of PIC label using the linkage table
18493         if the label is nonlocal.
18495 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18497         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
18498         warning message if user requests -maltivec=be.
18499         * doc/invoke.texi: Document deprecation of -maltivec=be.
18501 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
18503         PR target/84220
18504         * config/rs6000/rs6000-c.c: Update definitions for
18505         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
18506         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
18508 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
18510         PR target/84239
18511         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
18512         add _get_ssp intrinsics. Remove argument from
18513         __builtin_ia32_rdssp[d|q].
18514         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
18515         * config/i386/i386-builtin.def: Remove argument from
18516         __builtin_ia32_rdssp[d|q].
18517         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
18518         ix86_expand_special_args_builtin for _rdssp[d|q].
18519         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
18520         Clear register before usage.
18521         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
18522         Add documentation for new _get_ssp and _inc_ssp intrinsics.
18524 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
18526         PR tree-optimization/84357
18527         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
18528         operand 1 of an ARRAY_REF too.
18530 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
18532         PR target/83831
18533         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
18534         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18535         declarations.
18536         (set_of_reg): New struct.
18537         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
18538         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
18539         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
18540         functions.
18541         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
18542         Split into bitclr, bitset, bitinvert patterns if appropriate.
18543         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
18544         use rx_fuse_in_memory_bitop.
18545         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
18546         to named insn, correct maximum insn length.
18548 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
18550         PR target/79242
18551         * machmode.def: Define a complex mode for PARTIAL_INT.
18552         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
18553         MODE_PARTIAL_INT.
18554         * doc/rtl.texi: Document CSPImode.
18555         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
18556         handling.
18557         (msp430_hard_regno_nregs_with_padding): Likewise.
18559 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
18561         PR target/84279
18562         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
18564 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
18566         PR rtl-optimization/84169
18567         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
18568         we generated a parallel as new i3 and we split that to new i2 and i3
18569         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
18570         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
18571         those to i2, not i1.  Partially rewrite this scan code.
18573 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
18575         PR c/82210
18576         * stor-layout.c (place_field): For variable length fields, adjust
18577         offset_align afterwards not just based on the field's alignment,
18578         but also on the size.
18580         PR middle-end/84309
18581         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
18582         of exps and logs in the use_exp2 case.
18584 2018-02-13  Jeff Law  <law@redhat.com>
18586         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
18587         entry for "vector".
18589         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
18590         ARGS as unused.
18592 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
18594         PR debug/84342
18595         PR debug/84319
18596         * common.opt (gas-loc-support, gas-locview-support): New.
18597         (ginline-points, ginternal-reset-location-views): New.
18598         * doc/invoke.texi: Document them.  Use @itemx where intended.
18599         (gvariable-location-views): Adjust.
18600         * target.def (reset_location_view): New.
18601         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
18602         (TARGET_RESET_LOCATION_VIEW): New.
18603         * doc/tm.texi: Rebuilt.
18604         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
18605         (dwarf2out_default_as_locview_support): New.
18606         (output_asm_line_debug_info): Use option variables.
18607         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
18608         (output_loc_list): Likewise.
18609         (add_high_low_attributes): Check option variables.
18610         Don't output entry view attribute in strict mode.
18611         (gen_inlined_subroutine_die): Check option variables.
18612         (dwarf2out_inline_entry): Likewise.
18613         (init_sections_and_labels): Likewise.
18614         (dwarf2out_early_finish): Likewise.
18615         (maybe_reset_location_view): New, from...
18616         (dwarf2out_var_location): ... here.  Call it.
18617         * debug.h (dwarf2out_default_as_loc_support): Declare.
18618         (dwarf2out_default_as_locview_support): Declare.
18619         * hooks.c (hook_int_rtx_insn_0): New.
18620         * hooks.h (hook_int_rtx_insn_0): Declare.
18621         * toplev.c (process_options): Take -gas-loc-support and
18622         -gas-locview-support from dwarf2out.  Enable
18623         -gvariable-location-views by default only with locview
18624         assembler support.  Enable -ginternal-reset-location-views by
18625         default only if the target defines the corresponding hook.
18626         Enable -ginline-points by default if location views are
18627         enabled; force it disabled if statement frontiers are
18628         disabled.
18629         * tree-inline.c (expand_call_inline): Check option variables.
18630         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
18632 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
18634         PR tree-optimization/84321
18635         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
18636         handling.  Also check whether the anti-range contains any values
18637         that satisfy the mask; switch to a VR_RANGE if not.
18639 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
18641         PR sanitizer/84340
18642         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
18644 2018-02-13  Martin Jambor  <mjambor@suse.cz>
18646         PR c++/83990
18647         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
18648         of call statements, also set location of a load to a temporary.
18650 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
18652         * config/rl78/rl78.c (add_vector_labels): New function.
18653         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
18654         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
18655         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
18656         which checks that no arguments are passed.
18657         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
18658         * doc/extend.texi: Documentation for the new attribute.
18660 2018-02-13  Andreas Schwab  <schwab@suse.de>
18662         * config/riscv/linux.h (CPP_SPEC): Define.
18664 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
18666         PR target/84335
18667         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
18668         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
18669         OPTION_MASK_ISA_AES as first argument to def_builtin_const
18670         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
18671         instead of OPTION_MASK_ISA_PCLMUL as first argument to
18672         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
18673         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
18674         temporarily for AES and PCLMUL builtins.
18676         PR tree-optimization/84339
18677         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
18678         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
18679         Formatting fixes.
18681         PR middle-end/84309
18682         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
18683         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
18684         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
18685         inline function.
18686         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
18687         inline function.
18688         * omp-simd-clone.h: New file.
18689         * omp-simd-clone.c: Include omp-simd-clone.h.
18690         (expand_simd_clones): No longer static.
18691         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
18692         cgraph.h and omp-simd-clone.h.
18693         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
18694         (vect_recog_widen_shift_pattern): Formatting fix.
18695         (vect_pattern_recog_1): Don't check optab for calls.
18697         PR target/84336
18698         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
18699         operands[2] into a REG before using gen_lowpart on it.
18701 2018-02-12  Jeff Law  <law@redhat.com>
18703         PR target/83760
18704         * config/sh/sh.c (find_barrier): Consider a sibling call
18705         a barrier as well.
18707         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
18708         successfully back substituting a reg.
18710 2018-02-12  Richard Biener  <rguenther@suse.de>
18712         PR tree-optimization/84037
18713         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
18714         parameter, move visited init to caller.
18715         (vect_slp_analyze_operations): Separate cost from validity
18716         check, initialize visited once for all instances.
18717         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
18718         for all instances.
18719         * tree-vect-stmts.c (vect_model_simple_cost): Make early
18720         out an assert.
18721         (vect_model_promotion_demotion_cost): Likewise.
18722         (vectorizable_bswap): Guard cost modeling with !slp_node
18723         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
18724         SLP stmts.
18725         (vectorizable_call): Likewise.
18726         (vectorizable_conversion): Likewise.
18727         (vectorizable_assignment): Likewise.
18728         (vectorizable_shift): Likewise.
18729         (vectorizable_operation): Likewise.
18730         (vectorizable_store): Likewise.
18731         (vectorizable_load): Likewise.
18732         (vectorizable_condition): Likewise.
18733         (vectorizable_comparison): Likewise.
18735 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
18737         PR sanitizer/84307
18738         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
18739         (ASAN_MARK): Fix fnspec to account for return value, change pointer
18740         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
18742 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
18744         PR middle-end/83665
18745         * params.def (inline-min-speedup): Increase from 8 to 15.
18746         (max-inline-insns-auto): Decrease from 40 to 30.
18747         * ipa-split.c (consider_split): Add some buffer for function to
18748         be considered inlining candidate.
18749         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
18750         default values.
18752 2018-02-12  Richard Biener  <rguenther@suse.de>
18754         PR tree-optimization/84037
18755         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
18756         matched stmts if we cannot swap the non-matched ones.
18758 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
18760         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
18761         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
18762         _mm_maskz_scalef_round_ss): New intrinsics.
18763         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
18764         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
18765         __builtin_ia32_scalefss_round): Remove.
18766         (__builtin_ia32_scalefsd_mask_round,
18767         __builtin_ia32_scalefss_mask_round): New intrinsics.
18768         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
18769         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
18770         ((match_operand:VF_128 2 "<round_nimm_predicate>"
18771         "<round_constraint>")): Changed to ...
18772         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
18773         "<round_scalar_constraint>")): ... this.
18774         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
18775         %0, %1, %2<round_op3>}"): Changed to ...
18776         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
18777         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
18778         %2<round_scalar_mask_op3>}"): ... this.
18779         * config/i386/subst.md (round_scalar_nimm_predicate): New.
18781 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
18783         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
18784         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
18785         (_mm_maskz_sqrt_round_ss): New intrinsics.
18786         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
18787         (__builtin_ia32_sqrtsd_mask_round)
18788         (__builtin_ia32_sqrtss_mask_round): New builtins.
18789         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
18790         (__builtin_ia32_sqrtss_round): Remove.
18791         (__builtin_ia32_sqrtsd_mask_round)
18792         (__builtin_ia32_sqrtss_mask_round): New builtins.
18793         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
18794         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
18795         ((match_operand:VF_128 1 "vector_operand"
18796         "xBm,<round_constraint>")): Changed to ...
18797         ((match_operand:VF_128 1 "vector_operand"
18798         "xBm,<round_scalar_constraint>")): ... this.
18799         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
18800         %0, %2, %<iptr>1<round_op3>}): Changed to ...
18801         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
18802         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
18803         %<iptr>1<round_scalar_mask_op3>}): ... this.
18804         ((set_attr "prefix" "<round_prefix>")): Changed to ...
18805         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
18807 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
18809         PR target/84266
18810         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
18811         Cast vec_cmpeq result to correct type.
18812         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
18813         Cast vec_cmpgt result to correct type.
18815 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
18817         * final.c (final_scan_insn_1): Renamed from...
18818         (final_scan_insn): ... this.  New wrapper, to recover
18819         seen from the outermost call in recursive ones.
18820         * config/sparc/sparc.c (output_return): Drop seen from call.
18821         (output_sibcall): Likewise.
18822         * config/visium/visium.c (output_branch): Likewise.
18824 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
18826         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
18827         function label.
18829 2018-02-10  Alan Modra  <amodra@gmail.com>
18831         PR target/84300
18832         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
18833         Specify LR as an input.
18835 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
18837         PR sanitizer/83987
18838         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
18839         remove_member_access_dummy_vars): New functions.
18840         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
18841         lower_omp_1, execute_lower_omp): Use them.
18843         PR rtl-optimization/84308
18844         * shrink-wrap.c (spread_components): Release todo vector.
18846 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
18848         PR rtl-optimization/57193
18849         * ira-color.c (struct allocno_color_data): Add member
18850         conflict_allocno_hard_prefs.
18851         (update_conflict_allocno_hard_prefs): New.
18852         (bucket_allocno_compare_func): Add a preference based on
18853         conflict_allocno_hard_prefs.
18854         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
18855         (color_allocnos): Remove a dead code.  Initiate
18856         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
18858 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
18860         PR target/84226
18861         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
18862         constraint from =wa to wa.  Avoid a subreg on the output operand,
18863         instead use a pseudo and subreg it in a move.
18864         (p9_xxbrd_<mode>): Changed to ...
18865         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
18866         (p9_xxbrd_v2df): New expander.
18867         (p9_xxbrw_<mode>): Changed to ...
18868         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
18869         (p9_xxbrw_v4sf): New expander.
18871 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
18873         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
18875 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
18877         PR target/83926
18878         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
18879         multiply in 32-bit mode.
18880         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
18881         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
18882         mode.
18884 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
18886         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
18887         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
18888         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
18889         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
18891 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
18893         PR lto/84213
18894         * dwarf2out.c (is_trivial_indirect_ref): New function.
18895         (dwarf2out_late_global_decl): Do not generate a location
18896         attribute for variables that have a non-trivial DECL_VALUE_EXPR
18897         and that are not defined in the current unit.
18899 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
18901         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
18902         instead of a libcall for UNORDERED.
18904 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
18906         PR target/82641
18907         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
18908         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
18910 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
18912         PR target/PR84295
18913         * config/s390/s390.c (s390_set_current_function): Invoke
18914         s390_indirect_branch_settings also if fndecl didn't change.
18916 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
18918         * config/rs6000/rs6000.md (blockage): Set length to zero.
18920 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
18922         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
18924 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
18926         PR sanitizer/84285
18927         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
18928         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
18929         -static-lib*san.
18931         PR debug/84252
18932         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
18933         PARALLEL incoming that failed vt_get_decl_and_offset check.
18935         PR middle-end/84237
18936         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
18937         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
18938         TREE_READONLY bit.
18939         (get_variable_section): For decls in named .bss* sections pass true as
18940         second argument to bss_initializer_p.
18942 2018-02-09  Marek Polacek  <polacek@redhat.com>
18943             Jakub Jelinek  <jakub@redhat.com>
18945         PR c++/83659
18946         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
18947         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
18948         Sync some changes from cxx_fold_indirect_ref.
18950 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
18952         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
18953         markers.
18954         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
18955         (BLOCK_INLINE_ENTRY_LABEL): New.
18956         (dwarf2out_var_location): Disregard inline entry markers.
18957         (inline_entry_data): New struct.
18958         (inline_entry_data_hasher): New hashtable type.
18959         (inline_entry_data_hasher::hash): New.
18960         (inline_entry_data_hasher::equal): New.
18961         (inline_entry_data_table): New variable.
18962         (add_high_low_attributes): Add DW_AT_entry_pc and
18963         DW_AT_GNU_entry_view attributes if a pending entry is found
18964         in inline_entry_data_table.  Add old entry_pc attribute only
18965         if debug nonbinding markers are disabled.
18966         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
18967         markers are enabled.
18968         (block_within_block_p, dwarf2out_inline_entry): New.
18969         (dwarf2out_finish): Check that no entries remained in
18970         inline_entry_data_table.
18971         * final.c (reemit_insn_block_notes): Handle inline entry notes.
18972         (final_scan_insn, notice_source_line): Likewise.
18973         (rest_of_clean_state): Skip inline entry markers.
18974         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
18975         markers.
18976         * gimple.c (gimple_build_debug_inline_entry): New.
18977         * gimple.h (enum gimple_debug_subcode): Add
18978         GIMPLE_DEBUG_INLINE_ENTRY.
18979         (gimple_build_debug_inline_entry): Declare.
18980         (gimple_debug_inline_entry_p): New.
18981         (gimple_debug_nonbind_marker_p): Adjust.
18982         * insn-notes.def (INLINE_ENTRY): New.
18983         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
18984         inline entry marker notes.
18985         (print_insn): Likewise.
18986         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
18987         (INSN_DEBUG_MARKER_KIND): Likewise.
18988         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
18989         * tree-inline.c (expand_call_inline): Build and insert
18990         debug_inline_entry stmt.
18991         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
18992         inline entry blocks early, if nonbind markers are enabled.
18993         (dump_scope_block): Dump fragment info.
18994         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
18995         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
18996         (gimple_build_debug_inline_entry): New.
18997         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
18998         Enable/disable inline entry points too.
18999         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
19000         (DEBUG_INSN): Describe inline entry markers.
19002         * common.opt (gvariable-location-views): New.
19003         (gvariable-location-views=incompat5): New.
19004         * config.in: Rebuilt.
19005         * configure: Rebuilt.
19006         * configure.ac: Test assembler for view support.
19007         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
19008         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
19009         * dwarf2out.c (var_loc_view): New typedef.
19010         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
19011         (dwarf2out_locviews_in_attribute): New.
19012         (dwarf2out_locviews_in_loclist): New.
19013         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
19014         (enum dw_line_info_opcode): Add LI_adv_address.
19015         (struct dw_line_info_table): Add view.
19016         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
19017         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
19018         (zero_view_p): New variable.
19019         (ZERO_VIEW_P): New macro.
19020         (output_asm_line_debug_info): New.
19021         (struct var_loc_node): Add view.
19022         (add_AT_view_list, AT_loc_list): New.
19023         (add_var_loc_to_decl): Add view param.  Test it against last.
19024         (new_loc_list): Add view params.  Record them.
19025         (AT_loc_list_ptr): Handle loc and view lists.
19026         (view_list_to_loc_list_val_node): New.
19027         (print_dw_val): Handle dw_val_class_view_list.
19028         (size_of_die): Likewise.
19029         (value_format): Likewise.
19030         (loc_list_has_views): New.
19031         (gen_llsym): Set vl_symbol too.
19032         (maybe_gen_llsym, skip_loc_list_entry): New.
19033         (dwarf2out_maybe_output_loclist_view_pair): New.
19034         (output_loc_list): Output view list or entries too.
19035         (output_view_list_offset): New.
19036         (output_die): Handle dw_val_class_view_list.
19037         (output_dwarf_version): New.
19038         (output_compilation_unit_header): Use it.
19039         (output_skeleton_debug_sections): Likewise.
19040         (output_rnglists, output_line_info): Likewise.
19041         (output_pubnames, output_aranges): Update version comments.
19042         (output_one_line_info_table): Output view numbers in asm comments.
19043         (dw_loc_list): Determine current endview, pass it to new_loc_list.
19044         Call maybe_gen_llsym.
19045         (loc_list_from_tree_1): Adjust.
19046         (add_AT_location_description): Create view list attribute if
19047         needed, check it's absent otherwise.
19048         (convert_cfa_to_fb_loc_list): Adjust.
19049         (maybe_emit_file): Call output_asm_line_debug_info for test.
19050         (dwarf2out_var_location): Reset views as needed.  Precompute
19051         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
19052         attribute.  Set view.
19053         (new_line_info_table): Reset next view.
19054         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
19055         (dwarf2out_source_line): Likewise.  Output view resets and labels to
19056         the assembler, or select appropriate line info opcodes.
19057         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
19058         (optimize_string_length): Catch it.  Adjust.
19059         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
19060         dw_val_class_view_list, and remove it if no longer needed.
19061         (hash_loc_list): Hash view numbers.
19062         (loc_list_hasher::equal): Compare them.
19063         (optimize_location_lists): Check whether a view list symbol is
19064         needed, and whether the locview attribute is present, and
19065         whether they match.  Remove the locview attribute if no longer
19066         needed.
19067         (index_location_lists): Call skip_loc_list_entry for test.
19068         (dwarf2out_finish): Call output_asm_line_debug_info for test.
19069         Use output_dwarf_version.
19070         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
19071         (struct dw_val_node): Add val_view_list.
19072         * final.c (SEEN_NEXT_VIEW): New.
19073         (set_next_view_needed): New.
19074         (clear_next_view_needed): New.
19075         (maybe_output_next_view): New.
19076         (final_start_function): Rename to...
19077         (final_start_function_1): ... this.  Take pointer to FIRST,
19078         add SEEN parameter.  Emit param bindings in the initial view.
19079         (final_start_function): Reintroduce SEEN-less interface.
19080         (final): Rename to...
19081         (final_1): ... this.  Take SEEN parameter.  Output final pending
19082         next view at the end.
19083         (final): Reintroduce seen-less interface.
19084         (final_scan_insn): Output pending next view before switching
19085         sections or ending a block.  Mark the next view as needed when
19086         outputting variable locations.  Notify debug backend of section
19087         changes, and of location view changes.
19088         (rest_of_handle_final): Adjust.
19089         * toplev.c (process_options): Autodetect value for debug variable
19090         location views option.  Warn on incompat5 without -gdwarf-5.
19091         * doc/invoke.texi (gvariable-location-views): New.
19092         (gvariable-location-views=incompat5): New.
19093         (gno-variable-location-views): New.
19095 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
19097         PR tree-optimization/84136
19098         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
19099         that the result of find_edge is non-NULL.
19101 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
19103         PR target/83008
19104         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
19105         storing integer register in SImode.  Fix cost of 256 and 512
19106         byte aligned SSE register store.
19108 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
19110         * config/i386/i386.c (ix86_multiplication_cost): Fix
19111         multiplication cost for TARGET_AVX512DQ.
19113 2018-02-08  Marek Polacek  <polacek@redhat.com>
19115         PR tree-optimization/84238
19116         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
19117         get_range_strlen.
19119 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
19121         PR tree-optimization/84265
19122         * tree-vect-stmts.c (vectorizable_store): Don't treat
19123         VMAT_CONTIGUOUS accesses as grouped.
19124         (vectorizable_load): Likewise.
19126 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
19128         PR tree-optimization/81635
19129         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
19130         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
19131         (test_round_for_mask): New functions.
19132         (wide_int_cc_tests): Call test_round_for_mask.
19133         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
19134         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
19135         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
19136         range returned by get_range_info.
19138 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
19140         PR ipa/81360
19141         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
19142         * symtab.c: Include builtins.h
19143         (symtab_node::output_to_lto_symbol_table_p): Move here
19144         from lto-streamer-out.c:output_symbol_p.
19145         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
19146         (output_symbol_p): Move all logic to symtab.c
19147         (produce_symtab): Update.
19149 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
19151         * config/s390/s390-opts.h (enum indirect_branch): Define.
19152         * config/s390/s390-protos.h (s390_return_addr_from_memory)
19153         (s390_indirect_branch_via_thunk)
19154         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
19155         (enum s390_indirect_branch_type): Define.
19156         * config/s390/s390.c (struct s390_frame_layout, struct
19157         machine_function): Remove.
19158         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
19159         (indirect_branch_table_label_no, indirect_branch_table_name):
19160         Define variables.
19161         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
19162         (enum s390_indirect_branch_option): Define.
19163         (s390_return_addr_from_memory): New function.
19164         (s390_handle_string_attribute): New function.
19165         (s390_attribute_table): Add new attribute handler.
19166         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
19167         (s390_indirect_branch_via_thunk): New function.
19168         (s390_indirect_branch_via_inline_thunk): New function.
19169         (s390_function_ok_for_sibcall): When jumping via thunk disallow
19170         sibling call optimization for non z10 compiles.
19171         (s390_emit_call): Force indirect branch target to be a single
19172         register.  Add r1 clobber for non-z10 compiles.
19173         (s390_emit_epilogue): Emit return jump via return_use expander.
19174         (s390_reorg): Handle JUMP_INSNs as execute targets.
19175         (s390_option_override_internal): Perform validity checks for the
19176         new command line options.
19177         (s390_indirect_branch_attrvalue): New function.
19178         (s390_indirect_branch_settings): New function.
19179         (s390_set_current_function): Invoke s390_indirect_branch_settings.
19180         (s390_output_indirect_thunk_function):  New function.
19181         (s390_code_end): Implement target hook.
19182         (s390_case_values_threshold): Implement target hook.
19183         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
19184         macros.
19185         * config/s390/s390.h (struct s390_frame_layout)
19186         (struct machine_function): Move here from s390.c.
19187         (TARGET_INDIRECT_BRANCH_NOBP_RET)
19188         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
19189         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
19190         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
19191         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
19192         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
19193         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
19194         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
19195         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
19196         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
19197         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
19198         (mnemonic attribute): Add values which aren't recognized
19199         automatically.
19200         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
19201         pattern for branch conversion.  Fix mnemonic attribute.
19202         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
19203         indirect branch via thunk if requested.
19204         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
19205         ("*indirect_jump"): Disable for branch conversion using out of
19206         line thunks.
19207         ("indirect_jump_via_thunk<mode>_z10")
19208         ("indirect_jump_via_thunk<mode>")
19209         ("indirect_jump_via_inlinethunk<mode>_z10")
19210         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
19211         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
19212         ("casesi_jump_via_inlinethunk<mode>_z10")
19213         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
19214         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
19215         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
19216         ("*indirect2_jump"): Disable for branch conversion.
19217         ("casesi_jump"): Turn into expander and expand patterns for branch
19218         conversion.
19219         ("return_use"): New expander.
19220         ("*return"): Emit return via thunk and rename it to ...
19221         ("*return<mode>"): ... this one.
19222         * config/s390/s390.opt: Add new options and and enum for the
19223         option values.
19225 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
19227         * lra-constraints.c (match_reload): Unconditionally use
19228         gen_lowpart_SUBREG, rather than selecting between that
19229         and equivalent gen_rtx_SUBREG code.
19231 2018-02-08  Richard Biener  <rguenther@suse.de>
19233         PR tree-optimization/84233
19234         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
19235         changed flag instead of boguously re-using phi_inserted.
19237 2018-02-08  Martin Jambor  <mjambor@suse.cz>
19239         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
19240         static local variables.
19242 2018-02-08  Richard Biener  <rguenther@suse.de>
19244         PR tree-optimization/84278
19245         * tree-vect-stmts.c (vectorizable_store): When looking for
19246         smaller vector types to perform grouped strided loads/stores
19247         make sure the mode is supported by the target.
19248         (vectorizable_load): Likewise.
19250 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
19252         * config/aarch64/aarch64.c (aarch64_components_for_bb):
19253         Increase LDP/STP opportunities by adding adjacent callee-saves.
19255 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
19257         PR rtl-optimization/84068
19258         PR rtl-optimization/83459
19259         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
19261 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
19263         PR tree-optimization/84224
19264         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
19265         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
19266         non-zero arguments.
19268 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
19270         PR target/84113
19271         * config/rs6000/altivec.md (*restore_world): Remove LR use.
19272         * config/rs6000/predicates.md (restore_world_operation): Adjust op
19273         count, remove one USE.
19275 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
19277         * doc/install.texi (Configuration): Document the
19278         --with-long-double-format={ibm,ieee} PowerPC configuration
19279         options.
19281         PR target/84154
19282         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
19283         Convert from define_expand to be define_insn_and_split.  Rework
19284         float/double/_Float128 conversions to QI/HI/SImode to work with
19285         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
19286         conversions to QI/HImode types did a store and then a load to
19287         truncate the value.  For conversions to VSX registers, don't split
19288         the insn, instead emit the code directly.  Use the code iterator
19289         any_fix to combine signed and unsigned conversions.
19290         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
19291         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
19292         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19293         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
19294         (fix_<mode>di2_hw): Likewise.
19295         (fixuns_<mode>di2_hw): Likewise.
19296         (fix_<mode>si2_hw): Likewise.
19297         (fixuns_<mode>si2_hw): Likewise.
19298         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
19299         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
19300         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
19301         fix<uns>_trunc<SFDF:mode>si2_p8.
19302         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
19303         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
19304         (fix<uns>_<mode>_mem): Likewise.
19305         (fctiw<u>z_<mode>_mem): Likewise.
19306         (fix<uns>_<mode>_mem): Likewise.
19307         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
19308         the register allocator from doing a direct move to the GPRs to do
19309         a store, and instead use the ISA 3.0 store byte/half-word from
19310         vector register instruction.  For IEEE 128-bit floating point,
19311         also optimize stores of 32-bit ints.
19312         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
19314 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
19316         * genextract.c (push_pathstr_operand): New function to support
19317         [a-zA-Z].
19318         (walk_rtx): Call push_pathstr_operand.
19319         (print_path): Support [a-zA-Z].
19321 2018-02-07  Richard Biener  <rguenther@suse.de>
19323         PR tree-optimization/84037
19324         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
19325         (cse_and_gimplify_to_preheader): Declare.
19326         (vect_get_place_in_interleaving_chain): Likewise.
19327         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
19328         ivexpr_map.
19329         (_loop_vec_info::~_loop_vec_info): Delete it.
19330         (cse_and_gimplify_to_preheader): New function.
19331         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
19332         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
19333         (vectorizable_load): Likewise.  For grouped stores always base
19334         the IV on the first element.
19335         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
19336         condition before gimplifying.
19338 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
19340         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
19341         *DIV_EXPR and *MOD_EXPR.
19343 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
19345         PR target/84248
19346         * config/i386/i386.c (ix86_option_override_internal): Mask out
19347         the CF_SET bit when checking -fcf-protection.
19349 2018-02-07  Tom de Vries  <tom@codesourcery.com>
19351         PR libgomp/84217
19352         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
19353         enough.
19355 2018-02-07  Richard Biener  <rguenther@suse.de>
19357         PR tree-optimization/84204
19358         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
19359         this place.
19361         PR tree-optimization/84205
19362         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
19363         special-case isl_ast_op_zdiv_r.
19365         PR tree-optimization/84223
19366         * graphite-scop-detection.c (gather_bbs::before_dom_children):
19367         Only add conditions from within the region.
19368         (gather_bbs::after_dom_children): Adjust.
19370 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
19372         PR target/84209
19373         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
19374         * config/avr/avr.md: Only post-reload split REG-REG moves if
19375         either register is GENERAL_REG_P.
19377 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
19379         PR tree-optimization/84235
19380         * tree-ssa-scopedtables.c
19381         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
19382         if the subtraction is performed in floating point type where NaNs are
19383         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
19384         build 1.  Formatting fix.
19386 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
19388         PR target/84146
19389         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
19390         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
19391         and skip it regardless of bb boundaries.  Use CALL_P macro,
19392         don't test INSN_P (insn) together with CALL_P or JUMP_P check
19393         unnecessarily, formatting fix.
19395 2018-02-06  Michael Collison  <michael.collison@arm.com>
19397         * config/arm/thumb2.md:
19398         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
19399         (*thumb_mov_notscc): Ditto.
19401 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
19403         PR target/84154
19404         * config/rs6000/rs6000.md (su code attribute): Use "u" for
19405         unsigned_fix, not "s".
19407 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19409         * configure.ac (gcc_fn_eh_frame_ro): New function.
19410         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
19411         correct .eh_frame permissions.
19412         * configure: Regenerate.
19414 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
19416         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
19417         irrelevant options.
19419 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19421         * config/rs6000/rs6000.c (rs6000_option_override_internal):
19422         Display warning message for -mno-speculate-indirect-jumps.
19424 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
19426         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
19427         Undocumented.
19428         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
19430 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
19432         PR tree-optimization/84225
19433         * tree-eh.c (find_trapping_overflow): Only call
19434         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
19436 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
19438         PR target/84145
19439         * config/i386/i386.c: Reimplement the check of possible options
19440         -mibt/-mshstk conbination. Change error messages.
19441         * doc/invoke.texi: Fix a typo: remove extra '='.
19443 2018-02-06  Marek Polacek  <polacek@redhat.com>
19445         PR tree-optimization/84228
19446         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
19448 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
19450         PR target/82641
19451         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
19452         emitted arch directives.
19453         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
19454         __ARM_FEATURE_COPROC before changing architectures.
19456 2018-02-06  Richard Biener  <rguenther@suse.de>
19458         * config/i386/i386.c (print_reg): Fix typo.
19459         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
19461 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
19463         * configure: Regenerate.
19465 2018-02-05  Martin Sebor  <msebor@redhat.com>
19467         PR tree-optimization/83369
19468         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
19469         inlining context.
19471 2018-02-05  Martin Liska  <mliska@suse.cz>
19473         * doc/invoke.texi: Cherry-pick upstream r323995.
19475 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
19477         * ira.c (ira_init_register_move_cost): Adjust comment.
19479 2018-02-05  Martin Liska  <mliska@suse.cz>
19481         PR gcov-profile/84137
19482         * doc/gcov.texi: Fix typo in documentation.
19484 2018-02-05  Martin Liska  <mliska@suse.cz>
19486         PR gcov-profile/83879
19487         * doc/gcov.texi: Document necessity of --dynamic-list-data when
19488         using dlopen functionality.
19490 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
19492         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
19493         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
19494         _mm_maskz_range_ss, _mm_mask_range_round_ss,
19495         _mm_maskz_range_round_ss): New intrinsics.
19496         (__builtin_ia32_rangesd128_round)
19497         (__builtin_ia32_rangess128_round): Remove.
19498         (__builtin_ia32_rangesd128_mask_round,
19499         __builtin_ia32_rangess128_mask_round): New builtins.
19500         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
19501         __builtin_ia32_rangess128_round): Remove.
19502         (__builtin_ia32_rangesd128_mask_round,
19503         __builtin_ia32_rangess128_mask_round): New builtins.
19504         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
19505         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
19506         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
19507         "<round_saeonly_constraint>")): Changed to ...
19508         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
19509         "<round_saeonly_scalar_constraint>")): ... this.
19510         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
19511         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
19512         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
19513         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
19514         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
19516 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
19518         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
19519         options.
19520         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
19521         Remove all values except native, 8540 and 8548.
19523 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
19525         * config/i386/i386.c (ix86_output_function_return): Pass
19526         INVALID_REGNUM, instead of -1, as invalid register number to
19527         indirect_thunk_name and output_indirect_thunk.
19529 2018-02-02  Julia Koval  <julia.koval@intel.com>
19531         * config.gcc: Add -march=icelake.
19532         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
19533         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
19534         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
19535         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
19536         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
19537         (processor_target_table): Add icelake.
19538         (ix86_option_override_internal): Handle new PTAs.
19539         (get_builtin_code_for_version): Handle icelake.
19540         (M_INTEL_COREI7_ICELAKE): New.
19541         (fold_builtin_cpu): Handle icelake.
19542         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
19543         * doc/invoke.texi: Add -march=icelake.
19545 2018-02-02  Julia Koval  <julia.koval@intel.com>
19547         * config/i386/i386.c (ix86_option_override_internal): Change flags type
19548         to wide_int_bitmask.
19549         * wide-int-bitmask.h: New.
19551 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
19553         PR target/84066
19554         * config/i386/i386.md: Replace Pmode with word_mode in
19555         builtin_setjmp_setup and builtin_longjmp to support x32.
19557 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
19559         PR target/56010
19560         PR target/83743
19561         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
19562         #include "opts.h".
19563         (rs6000_supported_cpu_names): New static variable.
19564         (linux_cpu_translation_table): Likewise.
19565         (elf_platform) <cpu>: Define new static variable and use it.
19566         Translate kernel AT_PLATFORM name to canonical name if needed.
19567         Error if platform name is unknown.
19569 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
19571         PR target/84089
19572         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
19574 2018-02-01  Jeff Law  <law@redhat.com>
19576         PR target/84128
19577         * config/i386/i386.c (release_scratch_register_on_entry): Add new
19578         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
19579         the scratch if RELEASE_VIA_POP is false.
19580         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
19581         If we have to save a temporary register, decrement SIZE appropriately.
19582         Pass new arguments to release_scratch_register_on_entry.
19583         (ix86_adjust_stack_and_probe): Likewise.
19584         (ix86_emit_probe_stack_range): Pass new arguments to
19585         release_scratch_register_on_entry.
19587 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
19589         PR rtl-optimization/84157
19590         * combine.c (change_zero_ext): Use REG_P predicate in
19591         front of HARD_REGISTER_P predicate.
19593 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
19595         * config/avr/avr.c (avr_option_override): Move disabling of
19596         -fdelete-null-pointer-checks to...
19597         * common/config/avr/avr-common.c (avr_option_optimization_table):
19598         ...here.
19600 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19602         PR tree-optimization/81635
19603         * tree-data-ref.c (split_constant_offset_1): For types that
19604         wrap on overflow, try to use range info to prove that wrapping
19605         cannot occur.
19607 2018-02-01  Renlin Li  <renlin.li@arm.com>
19609         PR target/83370
19610         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
19611         TAILCALL_ADDR_REGS.
19612         (aarch64_register_move_cost): Likewise.
19613         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
19614         TAILCALL_ADDR_REGS.
19615         (REG_CLASS_NAMES): Likewise.
19616         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
19617         TAILCALL_ADDR_REGS. Remove IP registers.
19618         * config/aarch64/aarch64.md (Ucs): Update register constraint.
19620 2018-02-01  Richard Biener  <rguenther@suse.de>
19622         * domwalk.h (dom_walker::dom_walker): Add additional constructor
19623         for specifying RPO order and allow NULL for that.
19624         * domwalk.c (dom_walker::dom_walker): Likewise.
19625         (dom_walker::walk): Handle NULL RPO order.
19626         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
19627         in RPO order.
19628         (rewrite_update_dom_walker): Likewise.
19629         (mark_def_dom_walker): Likewise.
19631 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19633         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
19634         (aarch64_maybe_expand_sve_subreg_move): Declare.
19635         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
19636         * config/aarch64/predicates.md (aarch64_any_register_operand): New
19637         predicate.
19638         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
19639         that are semantically a reverse operation.
19640         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
19641         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
19642         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
19643         functions.
19644         (aarch64_can_change_mode_class): For big-endian, forbid changes
19645         between two SVE modes if they have different element sizes.
19647 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19649         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
19650         the TImode handling for big-endian targets.
19652 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19654         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
19655         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
19656         not just bytes.
19657         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
19658         Remove BSWAP handing for big-endian targets and use the form of
19659         LD1RQ appropariate for the mode.
19661 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19663         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
19664         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
19665         duplicated element.
19667 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
19669         PR tearget/83845
19670         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
19671         check for operands that need to go through aarch64_sve_reload_be.
19673 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
19675         PR tree-optimization/81661
19676         PR tree-optimization/84117
19677         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
19678         * tree-eh.c: Include gimplify.h.
19679         (find_trapping_overflow, replace_trapping_overflow,
19680         rewrite_to_non_trapping_overflow): New functions.
19681         * tree-vect-loop.c: Include tree-eh.h.
19682         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
19683         * tree-data-ref.c: Include tree-eh.h.
19684         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
19686 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
19688         PR rtl-optimization/84123
19689         * combine.c (change_zero_ext): Check if hard register satisfies
19690         can_change_dest_mode before calling gen_lowpart_SUBREG.
19692 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
19694         PR target/82444
19695         * ira.c (ira_init_register_move_cost): Remove assert.
19697 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
19699         PR rtl-optimization/84071
19700         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
19701         * doc/tm.texi: Regenerate.
19703 2018-01-31  Richard Biener  <rguenther@suse.de>
19705         PR tree-optimization/84132
19706         * tree-data-ref.c (analyze_miv_subscript): Properly
19707         check whether evolution_function_is_affine_multivariate_p
19708         before calling gcd_of_steps_may_divide_p.
19710 2018-01-31  Julia Koval  <julia.koval@intel.com>
19712         PR target/83618
19713         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
19714         * config/i386/i386.md (rdpid_rex64) New.
19715         (rdpid): Make 32bit only.
19717 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
19719         PR lto/84105
19720         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
19721         an IDENTIFIER_NODE for FUNCTION_TYPE's.
19723 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
19725         Revert
19726         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
19728         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
19730 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
19732         PR rtl-optimization/84071
19733         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
19734         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
19736 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
19738         * config/arc/arc.c (arc_handle_aux_attribute): New function.
19739         (arc_attribute_table): Add 'aux' attribute.
19740         (arc_in_small_data_p): Consider aux like variables.
19741         (arc_is_aux_reg_p): New function.
19742         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
19743         (arc_get_aux_arg): New function.
19744         (prepare_move_operands): Handle aux-register access.
19745         (arc_handle_aux_attribute): New function.
19746         * doc/extend.texi (ARC Variable attributes): Add subsection.
19748 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
19750         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
19751         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
19752         (arc_attribute_table): Add 'uncached' attribute.
19753         (arc_print_operand): Print '.di' flag for uncached memory
19754         accesses.
19755         (arc_in_small_data_p): Do not consider for small data the uncached
19756         types.
19757         (arc_is_uncached_mem_p): New function.
19758         * config/arc/predicates.md (compact_store_memory_operand): Check
19759         for uncached memory accesses.
19760         (nonvol_nonimm_operand): Likewise.
19761         * doc/extend.texi (ARC Type Attribute): New subsection.
19763 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
19765         PR c/84100
19766         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
19767         falign-loops=): Add Optimization flag.
19769 2018-01-30  Jeff Law  <law@redhat.com>
19771         PR target/84064
19772         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
19773         INT_REGISTERS_SAVED.  Check it prior to calling
19774         get_scratch_register_on_entry.
19775         (ix86_adjust_stack_and_probe): Similarly.
19776         (ix86_emit_probe_stack_range): Similarly.
19777         (ix86_expand_prologue): Corresponding changes.
19779 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19781         PR target/40411
19782         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
19783         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
19785 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
19787         PR target/84112
19788         * lra-constraints.c (curr_insn_transform): Process AND in the
19789         address.
19791 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
19793         PR rtl-optimization/83986
19794         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
19795         dependence against last_pending_memory_flush in addition to
19796         pending_jump_insns.
19798 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
19800         PR tree-optimization/81611
19801         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
19802         copies.
19804 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
19806         PR target/83758
19807         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
19808         a reg rtx.
19810 2018-01-30  Richard Biener  <rguenther@suse.de>
19811             Jakub Jelinek  <jakub@redhat.com>
19813         PR tree-optimization/84111
19814         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
19815         inner loops added during recursion, as they don't have up-to-date
19816         SSA form.
19818 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
19820         PR ipa/81360
19821         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
19822         (can_inline_edge_by_limits_p): ... here.
19823         (can_early_inline_edge_p, check_callers,
19824         update_caller_keys, update_callee_keys, recursive_inlining,
19825         add_new_edges_to_heap, speculation_useful_p,
19826         inline_small_functions,
19827         inline_small_functions, flatten_function,
19828         inline_to_all_callers_1): Update.
19830 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
19832         * profile-count.c (profile_count::combine_with_ipa_count): Handle
19833         zeros correctly.
19835 2018-01-30  Richard Biener  <rguenther@suse.de>
19837         PR tree-optimization/83008
19838         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
19839         invariant and constant vector uses in stmts when they need
19840         more than one stmt.
19842 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19844         PR bootstrap/84017
19845         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
19846         * configure: Regenerate.
19848 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
19850         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
19851         pattern.
19852         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
19853         Use gen_rtx_REG rather than gen_lowpart.
19855 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
19857         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
19858         rather than 0 when creating partial subregs.
19860 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
19862         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
19863         of usage.
19865 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
19867         PR target/81550
19868         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
19869         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
19870         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
19871         flags.  This restores the settings used before the 2017-07-24.
19872         Turning off pre increment/decrement/modify allows IVOPTS to
19873         optimize DF/SF loops where the index is an int.
19875 2018-01-29  Richard Biener  <rguenther@suse.de>
19876             Kelvin Nilsen  <kelvin@gcc.gnu.org>
19878         PR bootstrap/80867
19879         * tree-vect-stmts.c (vectorizable_call): Don't call
19880         targetm.vectorize_builtin_md_vectorized_function if callee is
19881         NULL.
19883 2018-01-22  Carl Love  <cel@us.ibm.com>
19885         * doc/extend.tex: Fix typo in second arg in
19886         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
19888 2018-01-29  Richard Biener  <rguenther@suse.de>
19890         PR tree-optimization/84086
19891         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
19892         (flush_ssaname_freelist): When SSA names were released reset
19893         the SCEV hash table.
19895 2018-01-29  Richard Biener  <rguenther@suse.de>
19897         PR tree-optimization/84057
19898         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
19899         removed paths when removing edges.
19901 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
19903         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
19904         -mfunction-return=@var{choice}.
19906 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
19908         PR diagnostic/84034
19909         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
19910         Handle CR like TAB.
19911         (layout::print_source_line): Likewise.
19912         (test_get_line_width_without_trailing_whitespace): Add test cases.
19914 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
19916         PR middle-end/84040
19917         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
19918         debug insns.
19920 2018-01-26  Jim Wilson  <jimw@sifive.com>
19922         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
19924         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
19925         specified.
19927 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19929         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
19930         and CMP + SUB-immediate -> SUBS.
19932 2018-01-26  Martin Sebor  <msebor@redhat.com>
19934         PR tree-optimization/83896
19935         * tree-ssa-strlen.c (get_string_len): Rename...
19936         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
19937         Avoid assuming length is constant.
19938         (handle_char_store): Use HOST_WIDE_INT for string length.
19940 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
19942         PR target/81763
19943         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
19944         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
19946 2018-01-26  Richard Biener  <rguenther@suse.de>
19948         PR rtl-optimization/84003
19949         * dse.c (record_store): Only record redundant stores when
19950         the earlier store aliases at least all accesses the later one does.
19952 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
19954         PR rtl-optimization/83985
19955         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
19956         REG_CFA_RESTORE insns.
19957         (delete_unmarked_insns): Don't ignore separate shrink wrapping
19958         REG_CFA_RESTORE insns here.
19960         PR c/83989
19961         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
19962         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
19964 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
19966         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
19967         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
19968         (arc_init): Likewise.
19969         (arc_override_options): Likewise.
19970         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
19971         value.
19972         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
19973         support.
19974         * config/arc/arc.h (TARGET_DBNZ): Define.
19975         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
19976         properly set the tune attribute.
19977         (dbnz): Use TARGET_DBNZ guard.
19978         * config/arc/arc.opt (mtune): Add core3 option.
19980 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
19982         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
19983         recognize new pic like addresses.
19984         (arc_delegitimize_address): Clean up.
19986 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
19988         * config/arc/arc-arches.def: Option mrf16 valid for all
19989         architectures.
19990         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
19991         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
19992         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
19993         * config/arc/arc-tables.opt: Regenerate.
19994         * config/arc/arc.c (arc_conditional_register_usage): Handle
19995         reduced register file case.
19996         (arc_file_start): Set must have build attributes.
19997         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
19998         mrf16 option value.
19999         * config/arc/arc.opt (mrf16): Add new option.
20000         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
20001         * config/arc/genmultilib.awk: Handle new mrf16 option.
20002         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
20003         * config/arc/t-multilib: Regenerate.
20004         * doc/invoke.texi (ARC Options): Document mrf16 option.
20006 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
20008         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
20009         * config/arc/arc.c (arc_handle_secure_attribute): New function.
20010         (arc_attribute_table): Add 'secure_call' attribute.
20011         (arc_print_operand): Print secure call operand.
20012         (arc_function_ok_for_sibcall): Don't optimize tail calls when
20013         secure.
20014         (arc_is_secure_call_p): New function.  * config/arc/arc.md
20015         (call_i): Add support for sjli instruction.
20016         (call_value_i): Likewise.
20017         * config/arc/constraints.md (Csc): New constraint.
20019 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
20020             John Eric Martin  <John.Martin@emmicro-us.com>
20022         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
20023         * config/arc/arc.c (_arc_jli_section): New struct.
20024         (arc_jli_section): New type.
20025         (rc_jli_sections): New static variable.
20026         (arc_handle_jli_attribute): New function.
20027         (arc_attribute_table): Add jli_always and jli_fixed attribute.
20028         (arc_file_end): New function.
20029         (TARGET_ASM_FILE_END): Define.
20030         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
20031         (arc_add_jli_section): New function.
20032         (jli_call_scan): Likewise.
20033         (arc_reorg): Call jli_call_scan.
20034         (arc_output_addsi): Remove 'S' from printing asm operand.
20035         (arc_is_jli_call_p): New function.
20036         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
20037         operand.
20038         (movhi_insn): Likewise.
20039         (movsi_insn): Likewise.
20040         (movsi_set_cc_insn): Likewise.
20041         (loadqi_update): Likewise.
20042         (load_zeroextendqisi_update): Likewise.
20043         (load_signextendqisi_update): Likewise.
20044         (loadhi_update): Likewise.
20045         (load_zeroextendhisi_update): Likewise.
20046         (load_signextendhisi_update): Likewise.
20047         (loadsi_update): Likewise.
20048         (loadsf_update): Likewise.
20049         (movsicc_insn): Likewise.
20050         (bset_insn): Likewise.
20051         (bxor_insn): Likewise.
20052         (bclr_insn): Likewise.
20053         (bmsk_insn): Likewise.
20054         (bicsi3_insn): Likewise.
20055         (cmpsi_cc_c_insn): Likewise.
20056         (movsi_ne): Likewise.
20057         (movsi_cond_exec): Likewise.
20058         (clrsbsi2): Likewise.
20059         (norm_f): Likewise.
20060         (normw): Likewise.
20061         (swap): Likewise.
20062         (divaw): Likewise.
20063         (flag): Likewise.
20064         (sr): Likewise.
20065         (kflag): Likewise.
20066         (ffs): Likewise.
20067         (ffs_f): Likewise.
20068         (fls): Likewise.
20069         (call_i): Remove 'S' asm letter, add jli instruction.
20070         (call_value_i): Likewise.
20071         * config/arc/arc.op (mjli-always): New option.
20072         * config/arc/constraints.md (Cji): New constraint.
20073         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
20074         operand.
20075         (subsf3_fpx): Likewise.
20076         (mulsf3_fpx): Likewise.
20077         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
20078         asm operand.
20079         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
20080         function attrbutes.
20081         * doc/invoke.texi (ARC): Document mjli-always option.
20083 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
20085         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
20086         avoid addition with 0 and use incw and decw where possible.
20088 2018-01-26  Richard Biener  <rguenther@suse.de>
20090         PR tree-optimization/81082
20091         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
20092         association if it requires casting to unsigned.
20093         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
20094         from fold_plusminus_mult_expr to catch important cases late when
20095         range info is available.
20097 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20099         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
20100         * configure.ac (hidden_linkonce): New test.
20101         * configure: Regenerate.
20102         * config.in: Regenerate.
20104 2018-01-26  Julia Koval  <julia.koval@intel.com>
20106         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
20107         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
20108         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
20109         _mm_mask_bitshuffle_epi64_mask): Fix type.
20110         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
20111         USI_FTYPE_V4DI_V4DI_USI): Remove.
20112         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
20113         __builtin_ia32_vpshufbitqmb256_mask,
20114         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
20115         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
20116         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
20118 2018-01-26  Alan Modra  <amodra@gmail.com>
20120         PR target/84033
20121         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
20122         UNSPEC_VBPERMQ.  Sort other unspecs.
20124 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
20126         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
20128 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
20130         PR middle-end/83055
20131         * predict.c (drop_profile): Do not push/pop cfun; update also
20132         node->count.
20133         (handle_missing_profiles): Fix logic looking for zero profiles.
20135 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
20137         PR middle-end/83977
20138         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
20139         on functions with #pragma omp declare simd or functions with simd
20140         attribute.
20141         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
20142         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
20143         Remove trailing \n from warning_at calls.
20145 2018-01-25  Tom de Vries  <tom@codesourcery.com>
20147         PR target/84028
20148         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20149         for neutered workers.
20151 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
20153         PR target/68467
20154         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
20155         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
20157 2018-01-24  Jeff Law  <law@redhat.com>
20159         PR target/83994
20160         * i386.c (get_probe_interval): Move to earlier point.
20161         (ix86_compute_frame_layout): If -fstack-clash-protection and
20162         the frame is larger than the probe interval, then use pushes
20163         to save registers rather than reg->mem moves.
20164         (ix86_expand_prologue): Remove conditional for int_registers_saved
20165         assertion.
20167 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
20169         PR target/84014
20170         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
20171         min/max for never referenced object.
20173 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
20175         PR middle-end/83977
20176         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
20177         here.
20178         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
20179         attributes from DECL_ATTRIBUTES (decl) without affecting
20180         DECL_ATTRIBUTES (current_function_decl).
20181         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
20182         functions with non-NULL DECL_ABSTRACT_ORIGIN.
20184 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
20186         PR tree-optimization/83979
20187         * fold-const.c (fold_comparison): Use constant_boolean_node
20188         instead of boolean_{true,false}_node.
20190 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
20192         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
20193         with zero counts.
20195 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20197         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20198         Simplify the clause that sets the length attribute.
20199         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20200         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
20201         clause that sets the length attribute.
20202         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20204 2018-01-24  Tom de Vries  <tom@codesourcery.com>
20206         PR target/83589
20207         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
20208         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
20209         Add strict parameter.
20210         (prevent_branch_around_nothing): Insert dummy insn between branch to
20211         label and label with no ptx insn inbetween.
20212         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
20214 2018-01-24  Tom de Vries  <tom@codesourcery.com>
20216         PR target/81352
20217         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
20218         for neutered threads in warp.
20219         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
20221 2018-01-24  Richard Biener  <rguenther@suse.de>
20223         PR tree-optimization/83176
20224         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
20225         operands.
20227 2018-01-24  Richard Biener  <rguenther@suse.de>
20229         PR tree-optimization/82819
20230         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
20231         code generating pluses that are no-ops in the target precision.
20233 2018-01-24  Richard Biener  <rguenther@suse.de>
20235         PR middle-end/84000
20236         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
20238 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
20240         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
20241         to merge probabilities.
20242         * predict.c (probably_never_executed): Also mark as cold functions
20243         with global 0 profile and guessed local profile.
20244         * profile-count.c (profile_probability::combine_with_count): New
20245         member function.
20246         * profile-count.h (profile_probability::operator*,
20247         profile_probability::operator*=, profile_probability::operator/,
20248         profile_probability::operator/=): Reduce precision to adjusted
20249         and set value to guessed on contradictory divisions.
20250         (profile_probability::combine_with_freq): Remove.
20251         (profile_probability::combine_wiht_count): Declare.
20252         (profile_count::force_nonzero):: Set to adjusted.
20253         (profile_count::probability_in):: Set quality to adjusted.
20254         * tree-ssa-tail-merge.c (replace_block_by): Use
20255         combine_with_count.
20257 2018-01-23  Andrew Waterman  <andrew@sifive.com>
20258             Jim Wilson  <jimw@sifive.com>
20260         * config/riscv/riscv.c (riscv_stack_boundary): New.
20261         (riscv_option_override): Set riscv_stack_boundary.  Handle
20262         riscv_preferred_stack_boundary_arg.
20263         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
20264         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
20265         (STACK_BOUNDARY): Set to riscv_stack_boundary.
20266         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
20267         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
20268         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
20270 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
20272         PR target/83905
20273         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
20274         of struct ix86_frame.
20275         (ix86_expand_epilogue): Likewise.  Add a local variable for
20276         the reg_save_offset field in struct ix86_frame.
20278 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
20280         PR tree-optimization/82604
20281         * tree-loop-distribution.c (enum partition_kind): New enum item
20282         PKIND_PARTIAL_MEMSET.
20283         (partition_builtin_p): Support above new enum item.
20284         (generate_code_for_partition): Ditto.
20285         (compute_access_range): Differentiate cases that equality can be
20286         proven at all loops, the innermost loops or no loops.
20287         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
20288         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
20289         (finalize_partitions, distribute_loop): Don't fuse partition of
20290         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
20291         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
20292         parloop is enabled.
20294 2018-01-23  Martin Liska  <mliska@suse.cz>
20296         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
20297         order to ignore the predictor.
20298         (PRED_POLYMORPHIC_CALL): Likewise.
20299         (PRED_RECURSIVE_CALL): Likewise.
20301 2018-01-23  Martin Liska  <mliska@suse.cz>
20303         * tree-profile.c (tree_profiling): Print function header to
20304         aware reader which function we are working on.
20305         * value-prof.c (gimple_find_values_to_profile): Do not print
20306         not interesting value histograms.
20308 2018-01-23  Martin Liska  <mliska@suse.cz>
20310         * profile-count.h (enum profile_quality): Add
20311         profile_uninitialized as the first value. Do not number values
20312         as they are zero based.
20313         (profile_count::verify): Update sanity check.
20314         (profile_probability::verify): Likewise.
20316 2018-01-23  Nathan Sidwell  <nathan@acm.org>
20318         * doc/invoke.texi (ffor-scope): Deprecate.
20320 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
20322         PR tree-optimization/83510
20323         * domwalk.c (set_all_edges_as_executable): New function.
20324         (dom_walker::dom_walker): Convert bool param
20325         "skip_unreachable_blocks" to enum reachability.  Move setup of
20326         edge flags to set_all_edges_as_executable and only do it when
20327         reachability is REACHABLE_BLOCKS.
20328         * domwalk.h (enum dom_walker::reachability): New enum.
20329         (dom_walker::dom_walker): Convert bool param
20330         "skip_unreachable_blocks" to enum reachability.
20331         (set_all_edges_as_executable): New decl.
20332         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
20333         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
20334         "reachability".
20335         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
20336         but converting true to REACHABLE_BLOCKS.
20337         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
20338         * tree-vrp.c
20339         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
20340         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
20341         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
20342         REACHABLE_BLOCKS.
20343         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
20344         if check_all_array_refs will be called.
20346 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
20348         * tree.c (selftest::test_location_wrappers): Add more test
20349         coverage.
20351 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
20353         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
20354         (selftest::test_bit_in_range): Likewise.
20356 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
20358         PR testsuite/83888
20359         * doc/sourcebuild.texi (vect_float): Say that the selector
20360         only describes the situation when -funsafe-math-optimizations is on.
20361         (vect_float_strict): Document.
20363 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
20365         PR tree-optimization/83965
20366         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
20367         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
20368         instead of checking only for a reduction.
20369         (vect_recog_widen_sum_pattern): Likewise.
20371 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
20373         * predict.c (probably_never_executed): Only use precise profile info.
20374         (compute_function_frequency): Skip after inlining hack since we now
20375         have quality checking.
20377 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
20379         * profile-count.h (profile_probability::very_unlikely,
20380         profile_probability::unlikely, profile_probability::even): Set
20381         precision to guessed.
20383 2018-01-23  Richard Biener  <rguenther@suse.de>
20385         PR tree-optimization/83963
20386         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
20387         Properly terminate dominator walk when crossing the exit edge not
20388         when visiting its source block.
20390 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
20392         PR c++/83918
20393         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
20394         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
20396 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
20398         PR tree-optimization/83957
20399         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
20400         semicolon after for body surrounded by braces.
20402         PR tree-optimization/83081
20403         * profile-count.h (profile_probability::split): New method.
20404         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
20405         Use profile_probability::split.
20406         (do_compare_rtx_and_jump): Fix adjustment of probabilities
20407         when splitting a single conditional jump into 2.
20409 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
20411         PR tree-optimization/69452
20412         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
20413         decl.
20415 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20417         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
20418         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
20419         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
20421 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20423         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
20424         declaration.
20425         * config/rl78/rl78.md (movdi): New define_expand.
20426         * config/rl78/rl78.c (rl78_split_movdi): New function.
20428 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
20430         PR target/83862
20431         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
20432         no longer used.
20433         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
20434         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
20435         128-bit to produce an UNSPEC move to get the double word with the
20436         signbit and then a shift directly to do signbit.
20437         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
20438         implementation with a new version that just does either a direct
20439         move or a regular move.  Move memory interface to separate insns.
20440         Move insns so they are next to the expander.
20441         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
20442         with signbit move.  Split big and little endian case.
20443         (signbit<mode>2_dm_mem_le): Likewise.
20444         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
20445         (signbit<mode>2_dm2): Likewise.
20447 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20449         * config/rl78/rl78.md (anddi3): New define_expand.
20451 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20453         * config/rl78/rl78.md (umindi3): New define_expand.
20455 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20457         * config/rl78/rl78.md (smindi3): New define_expand.
20459 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20461         * config/rl78/rl78.md (smaxdi3): New define_expand.
20463 2018-01-22  Carl Love  <cel@us.ibm.com>
20465         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
20466         LVX_V1TI): Add macro expansion.
20467         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
20468         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
20469         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
20470         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
20471         Change check to determine if the instruction is a byte reversing
20472         entry.  Fix typo in comment.
20473         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
20474         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
20475         Add def_builtin calls for new builtins.
20476         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
20477         Add define_insn expansion.
20479 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20481         * config/rl78/rl78.md (umaxdi3): New define_expand.
20483 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
20485         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
20486         for non-QImode registers.
20488 2018-01-22  Richard Biener  <rguenther@suse.de>
20490         PR tree-optimization/83963
20491         * graphite-scop-detection.c (scop_detection::get_sese): Delay
20492         including the loop exit block.
20493         (scop_detection::merge_sese): Likewise.
20494         (scop_detection::add_scop): Do it here instead.
20496 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20498         * doc/sourcebuild.texi (arm_softfloat): Document.
20500 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
20502         PR gcc/77734
20503         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
20504         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
20505         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
20507 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20508             David Edelsohn  <dje.gcc@gmail.com>
20510         PR target/83946
20511         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20512         Change "crset eq" to "crset 2".
20513         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20514         (*call_indirect_aix<mode>_nospec): Likewise.
20515         (*call_value_indirect_aix<mode>_nospec): Likewise.
20516         (*call_indirect_elfv2<mode>_nospec): Likewise.
20517         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
20518         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
20519         change assembly output from . to $.
20520         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20521         (indirect_jump<mode>_nospec): Change assembly output from . to $.
20522         (*tablejump<mode>_internal1_nospec): Likewise.
20524 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
20526         PR target/80870
20527         * config/sh/sh_optimize_sett_clrt.cc:
20528         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
20530 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
20532         PR tree-optimization/83940
20533         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
20534         offset_dt to vect_constant_def rather than vect_unknown_def_type.
20535         (vect_check_load_store_mask): Add a mask_dt_out parameter and
20536         use it to pass back the definition type.
20537         (vect_check_store_rhs): Likewise rhs_dt_out.
20538         (vect_build_gather_load_calls): Add a mask_dt argument and use
20539         it instead of a call to vect_is_simple_use.
20540         (vectorizable_store): Update calls to vect_check_load_store_mask
20541         and vect_check_store_rhs.  Use the dt returned by the latter instead
20542         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
20543         instead of calls to vect_is_simple_use.  Pass the scalar rather
20544         than the vector operand to vect_is_simple_use when handling
20545         second and subsequent copies of an rhs value.
20546         (vectorizable_load): Update calls to vect_check_load_store_mask
20547         and vect_build_gather_load_calls.  Use the cached mask_dt and
20548         gs_info.offset_dt instead of calls to vect_is_simple_use.
20550 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
20552         PR middle-end/83945
20553         * tree-emutls.c: Include gimplify.h.
20554         (lower_emutls_2): New function.
20555         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
20556         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
20557         it before further processing.
20559         PR target/83930
20560         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
20561         UINTVAL (trueop1) instead of INTVAL (op1).
20563 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
20565         PR debug/81570
20566         PR debug/83728
20567         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
20568         INCOMING_FRAME_SP_OFFSET if not defined.
20569         (scan_trace): Add ENTRY argument.  If true and
20570         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
20571         emit a note to adjust the CFA offset.
20572         (create_cfi_notes): Adjust scan_trace callers.
20573         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
20574         INCOMING_FRAME_SP_OFFSET in the CIE.
20575         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
20576         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
20577         Likewise.
20578         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
20579         * doc/tm.texi: Regenerated.
20581 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
20583         PR rtl-optimization/83147
20584         * lra-constraints.c (remove_inheritance_pseudos): Use
20585         lra_substitute_pseudo_within_insn.
20587 2018-01-19  Tom de Vries  <tom@codesourcery.com>
20588             Cesar Philippidis  <cesar@codesourcery.com>
20590         PR target/83920
20591         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
20593 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
20595         PR target/83790
20596         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
20597         spaces for function labels.
20599 2018-01-19  Martin Liska  <mliska@suse.cz>
20601         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
20602         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
20603         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
20604         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
20605         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
20606         (PRED_CONST_RETURN): Change from 69 to 65.
20607         (PRED_NULL_RETURN): Change from 91 to 71.
20608         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
20609         (PRED_LOOP_GUARD): Change from 66 to 73.
20611 2018-01-19  Martin Liska  <mliska@suse.cz>
20613         * predict.c (predict_insn_def): Add new assert.
20614         (struct branch_predictor): Change type to signed integer.
20615         (test_prediction_value_range): Amend test to cover
20616         PROB_UNINITIALIZED.
20617         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
20618         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
20619         (PRED_LOOP_ITERATIONS_MAX): Likewise.
20620         (PRED_LOOP_IV_COMPARE): Likewise.
20621         * predict.h (PROB_UNINITIALIZED): Define new constant.
20623 2018-01-19  Martin Liska  <mliska@suse.cz>
20625         * predict.c (dump_prediction): Add new format for
20626         analyze_brprob.py script which is enabled with -details
20627         suboption.
20628         * profile-count.h (precise_p): New function.
20630 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
20632         PR tree-optimization/83922
20633         * tree-vect-loop.c (vect_verify_full_masking): Return false if
20634         there are no statements that need masking.
20635         (vect_active_double_reduction_p): New function.
20636         (vect_analyze_loop_operations): Use it when handling phis that
20637         are not in the loop header.
20639 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
20641         PR tree-optimization/83914
20642         * tree-vect-loop.c (vectorizable_induction): Don't convert
20643         init_expr or apply the peeling adjustment for inductions
20644         that are nested within the vectorized loop.
20646 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20648         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
20649         instead of NEG.
20651 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
20653         PR sanitizer/81715
20654         PR testsuite/83882
20655         * function.h (gimplify_parameters): Add gimple_seq * argument.
20656         * function.c: Include gimple.h and options.h.
20657         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
20658         for the added local temporaries if needed.
20659         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
20660         if there are any parameter cleanups, wrap whole body into a
20661         try/finally with the cleanups.
20663 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
20665         PR target/82964
20666         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
20667         Use GET_MODE_CLASS for scalar floating point.
20669 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
20671         PR ipa/82256
20672         patch by PaX Team
20673         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
20674         Fix call of call_cgraph_insertion_hooks.
20676 2018-01-18  Martin Sebor  <msebor@redhat.com>
20678         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
20680 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
20682         PR ipa/83619
20683         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
20684         frequencies.
20686 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
20688         PR other/70268
20689         * common.opt: (-ffile-prefix-map): New option.
20690         * opts.c (common_handle_option): Defer it.
20691         * opts-global.c (handle_common_deferred_options): Handle it.
20692         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
20693         * file-prefix-map.h: New file.
20694         (remap_debug_filename, add_debug_prefix_map): ...here.
20695         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
20696         * final.c (debug_prefix_map, add_debug_prefix_map
20697         remap_debug_filename): Move to...
20698         * file-prefix-map.c: New file.
20699         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
20700         generalize, get rid of alloca(), use strrchr() instead of strchr().
20701         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
20702         Implement in terms of add_prefix_map().
20703         (remap_macro_filename, remap_debug_filename): Implement in term of
20704         remap_filename().
20705         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
20706         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
20707         * dbxout.c: Include file-prefix-map.h.
20708         * varasm.c: Likewise.
20709         * vmsdbgout.c: Likewise.
20710         * xcoffout.c: Likewise.
20711         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
20712         * doc/cppopts.texi (-fmacro-prefix-map): Document.
20713         * doc/invoke.texi (-ffile-prefix-map): Document.
20714         (-fdebug-prefix-map): Update description.
20716 2018-01-18  Martin Liska  <mliska@suse.cz>
20718         * config/i386/i386.c (indirect_thunk_name): Document that also
20719         lfence is emitted.
20720         (output_indirect_thunk): Document why both instructions
20721         (pause and lfence) are generated.
20723 2018-01-18  Richard Biener  <rguenther@suse.de>
20725         PR tree-optimization/83887
20726         * graphite-scop-detection.c
20727         (scop_detection::get_nearest_dom_with_single_entry): Remove.
20728         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
20729         (scop_detection::merge_sese): Re-implement with a flood-fill
20730         algorithm that properly finds a SESE region if it exists.
20732 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
20734         PR c/61240
20735         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
20736         pointer_diff optimizations use view_convert instead of convert.
20738 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20740         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
20741         Generate different code for -mno-speculate-indirect-jumps.
20742         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
20743         (*call_indirect_aix<mode>): Disable for
20744         -mno-speculate-indirect-jumps.
20745         (*call_indirect_aix<mode>_nospec): New define_insn.
20746         (*call_value_indirect_aix<mode>): Disable for
20747         -mno-speculate-indirect-jumps.
20748         (*call_value_indirect_aix<mode>_nospec): New define_insn.
20749         (*sibcall_nonlocal_sysv<mode>): Generate different code for
20750         -mno-speculate-indirect-jumps.
20751         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
20753 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
20755         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
20756         long double type, set the flags for noting the default long double
20757         type, even if we don't pass or return a long double type.
20759 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
20761         PR ipa/83051
20762         * ipa-inline.c (flatten_function): Do not overwrite final inlining
20763         failure.
20765 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
20767         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
20768         support for merge[hl].
20769         (fold_mergehl_helper): New helper function.
20770         (tree-vector-builder.h): New #include for tree_vector_builder usage.
20771         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
20772         (altivec_vmrglw_direct): Add xxmrglw insn.
20774 2018-01-17  Andrew Waterman  <andrew@sifive.com>
20776         * config/riscv/riscv.c (riscv_conditional_register_usage): If
20777         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
20779 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
20781         PR lto/83121
20782         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
20783         call the lto_location_cache before reading the
20784         DECL_SOURCE_LOCATION of the types.
20786 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
20787             Richard Sandiford  <richard.sandiford@linaro.org>
20789         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
20790         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
20791         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
20792         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
20793         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
20794         Add declaration.
20795         * config/aarch64/constraints.md (aarch64_movti_operand):
20796         Limit immediates.
20797         * config/aarch64/predicates.md (Uti): Add new constraint.
20799 2018-01-17  Carl Love  <cel@us.ibm.com>
20801         * config/rs6000/vsx.md (define_expand xl_len_r,
20802         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
20803         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
20804         lxvll.
20805         (define_expand, define_insn): Move the shift left from  the
20806         define_insn to the define_expand for lxvl and stxvl instructions.
20807         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
20808         and XL_LEN_R definitions to PURE.
20810 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
20812         * config/i386/i386.c (indirect_thunk_name): Declare regno
20813         as unsigned int.  Compare regno with INVALID_REGNUM.
20814         (output_indirect_thunk): Ditto.
20815         (output_indirect_thunk_function): Ditto.
20816         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
20817         in the call to output_indirect_thunk_function.
20819 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
20821         PR middle-end/83884
20822         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
20823         rather than the size of inner_type to determine the stack slot size
20824         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
20826 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
20828         PR target/83546
20829         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
20830         to PTA_SILVERMONT.
20832 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
20834         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
20835         endian Linux systems to optionally enable multilibs for selecting
20836         the long double type if the user configured an explicit type.
20837         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
20838         have no long double multilibs if not defined.
20839         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
20840         warn if the user used -mabi={ieee,ibm}longdouble and we built
20841         multilibs for long double.
20842         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
20843         appropriate multilib option.
20844         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
20845         multilib options.
20846         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
20847         for building long double multilibs.
20848         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
20850 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
20852         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
20853         copies.
20855         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
20856         64 bits.
20857         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
20858         128 bits.
20860         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
20861         variables.
20863         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
20864         return value.
20866 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
20868         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
20869         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
20871 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20873         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
20874         different rtl trees depending on TARGET_64BIT.
20875         (rs6000_gen_lvx): Likewise.
20877 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
20879         * config/visium/visium.md (nop): Tweak comment.
20880         (hazard_nop): Likewise.
20882 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20884         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
20885         -mspeculate-indirect-jumps.
20886         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
20887         for -mno-speculate-indirect-jumps.
20888         (*call_indirect_elfv2<mode>_nospec): New define_insn.
20889         (*call_value_indirect_elfv2<mode>): Disable for
20890         -mno-speculate-indirect-jumps.
20891         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
20892         (indirect_jump): Emit different RTL for
20893         -mno-speculate-indirect-jumps.
20894         (*indirect_jump<mode>): Disable for
20895         -mno-speculate-indirect-jumps.
20896         (*indirect_jump<mode>_nospec): New define_insn.
20897         (tablejump): Emit different RTL for
20898         -mno-speculate-indirect-jumps.
20899         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
20900         (tablejumpsi_nospec): New define_expand.
20901         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
20902         (tablejumpdi_nospec): New define_expand.
20903         (*tablejump<mode>_internal1): Disable for
20904         -mno-speculate-indirect-jumps.
20905         (*tablejump<mode>_internal1_nospec): New define_insn.
20906         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
20907         option.
20909 2018-01-16  Artyom Skrobov tyomitch@gmail.com
20911         * caller-save.c (insert_save): Drop unnecessary parameter.  All
20912         callers updated.
20914 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
20915             Richard Biener  <rguenth@suse.de>
20917         PR libgomp/83590
20918         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
20919         return early, inline manually is_gimple_sizepos.  Make sure if we
20920         call gimplify_expr we don't end up with a gimple constant.
20921         * tree.c (variably_modified_type_p): Don't return true for
20922         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
20923         * gimplify.h (is_gimple_sizepos): Remove.
20925 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
20927         PR tree-optimization/83857
20928         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
20929         vectorizable_live_operation for pure SLP statements.
20930         (vectorizable_live_operation): Handle PHIs.
20932 2018-01-16  Richard Biener  <rguenther@suse.de>
20934         PR tree-optimization/83867
20935         * tree-vect-stmts.c (vect_transform_stmt): Precompute
20936         nested_in_vect_loop_p since the scalar stmt may get invalidated.
20938 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
20940         PR c/83844
20941         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
20942         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
20943         If off is not INTEGER_CST, issue a may not be aligned warning
20944         rather than isn't aligned.  Use isn%'t rather than isn't.
20945         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
20946         into MULT_EXPR.
20947         <case MULT_EXPR>: Improve the case when bottom and one of the
20948         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
20949         operand, in that case check if the other operand is multiple of
20950         bottom divided by the INTEGER_CST operand.
20952 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
20954         PR target/83858
20955         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
20956         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
20957         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
20958         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
20959         * config/pa/pa.c (pa_function_arg_advance): Likewise.
20960         (pa_function_arg, pa_arg_partial_bytes): Likewise.
20961         (pa_function_arg_size): New function.
20963 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
20965         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
20966         in a separate statement.
20968 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
20970         PR tree-optimization/83847
20971         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
20972         group gathers and scatters.
20974 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
20976         PR rtl-optimization/86620
20977         * params.def (max-sched-ready-insns): Bump minimum value to 1.
20979         PR rtl-optimization/83213
20980         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
20981         to last if both are JUMP_INSNs.
20983         PR tree-optimization/83843
20984         * gimple-ssa-store-merging.c
20985         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
20986         store_immediate_info for bswap/nop orig_stores.
20988 2018-01-15  Andrew Waterman  <andrew@sifive.com>
20990         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
20991         !TARGET_MUL.
20992         <UDIV>: Increase cost if !TARGET_DIV.
20994 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
20996         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
20997         (define_attr "cr_logical_3op"): New.
20998         (cceq_ior_compare): Adjust.
20999         (cceq_ior_compare_complement): Adjust.
21000         (*cceq_rev_compare): Adjust.
21001         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
21002         (is_cracked_insn): Adjust.
21003         (insn_must_be_first_in_group): Adjust.
21004         * config/rs6000/40x.md: Adjust.
21005         * config/rs6000/440.md: Adjust.
21006         * config/rs6000/476.md: Adjust.
21007         * config/rs6000/601.md: Adjust.
21008         * config/rs6000/603.md: Adjust.
21009         * config/rs6000/6xx.md: Adjust.
21010         * config/rs6000/7450.md: Adjust.
21011         * config/rs6000/7xx.md: Adjust.
21012         * config/rs6000/8540.md: Adjust.
21013         * config/rs6000/cell.md: Adjust.
21014         * config/rs6000/e300c2c3.md: Adjust.
21015         * config/rs6000/e500mc.md: Adjust.
21016         * config/rs6000/e500mc64.md: Adjust.
21017         * config/rs6000/e5500.md: Adjust.
21018         * config/rs6000/e6500.md: Adjust.
21019         * config/rs6000/mpc.md: Adjust.
21020         * config/rs6000/power4.md: Adjust.
21021         * config/rs6000/power5.md: Adjust.
21022         * config/rs6000/power6.md: Adjust.
21023         * config/rs6000/power7.md: Adjust.
21024         * config/rs6000/power8.md: Adjust.
21025         * config/rs6000/power9.md: Adjust.
21026         * config/rs6000/rs64.md: Adjust.
21027         * config/rs6000/titan.md: Adjust.
21029 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
21031         * config/i386/predicates.md (indirect_branch_operand): Rewrite
21032         ix86_indirect_branch_register logic.
21034 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
21036         * config/i386/constraints.md (Bs): Update
21037         ix86_indirect_branch_register check.  Don't check
21038         ix86_indirect_branch_register with GOT_memory_operand.
21039         (Bw): Likewise.
21040         * config/i386/predicates.md (GOT_memory_operand): Don't check
21041         ix86_indirect_branch_register here.
21042         (GOT32_symbol_operand): Likewise.
21044 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
21046         * config/i386/predicates.md (constant_call_address_operand):
21047         Rewrite ix86_indirect_branch_register logic.
21048         (sibcall_insn_operand): Likewise.
21050 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
21052         * config/i386/constraints.md (Bs): Replace
21053         ix86_indirect_branch_thunk_register with
21054         ix86_indirect_branch_register.
21055         (Bw): Likewise.
21056         * config/i386/i386.md (indirect_jump): Likewise.
21057         (tablejump): Likewise.
21058         (*sibcall_memory): Likewise.
21059         (*sibcall_value_memory): Likewise.
21060         Peepholes of indirect call and jump via memory: Likewise.
21061         * config/i386/i386.opt: Likewise.
21062         * config/i386/predicates.md (indirect_branch_operand): Likewise.
21063         (GOT_memory_operand): Likewise.
21064         (call_insn_operand): Likewise.
21065         (sibcall_insn_operand): Likewise.
21066         (GOT32_symbol_operand): Likewise.
21068 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
21070         PR middle-end/83837
21071         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
21072         type rather than type addr's type points to.
21073         (expand_omp_atomic_mutex): Likewise.
21074         (expand_omp_atomic): Likewise.
21076 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
21078         PR target/83839
21079         * config/i386/i386.c (output_indirect_thunk_function): Use
21080         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
21081         for  __x86_return_thunk.
21083 2018-01-15  Richard Biener  <rguenther@suse.de>
21085         PR middle-end/83850
21086         * expmed.c (extract_bit_field_1): Fix typo.
21088 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21090         PR target/83687
21091         * config/arm/iterators.md (VF): New mode iterator.
21092         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
21093         Remove integer-related logic from pattern.
21094         (neon_vabd<mode>_3): Likewise.
21096 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
21098         PR middle-end/82694
21099         * common.opt (fstrict-overflow): No longer an alias.
21100         (fwrapv-pointer): New option.
21101         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
21102         also for pointer types based on flag_wrapv_pointer.
21103         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
21104         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
21105         opts->x_flag_wrapv got set.
21106         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
21107         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
21108         POINTER_TYPE_OVERFLOW_UNDEFINED.
21109         * match.pd: Likewise in address comparison pattern.
21110         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
21112 2018-01-15  Richard Biener  <rguenther@suse.de>
21114         PR lto/83804
21115         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
21116         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
21117         Reset type names to their identifier if their TYPE_DECL doesn't
21118         have linkage (and thus is used for ODR and devirt).
21119         (save_debug_info_for_decl): Remove.
21120         (save_debug_info_for_type): Likewise.
21121         (add_tree_to_fld_list): Adjust.
21122         * tree-pretty-print.c (dump_generic_node): Make dumping of
21123         type names more robust.
21125 2018-01-15  Richard Biener  <rguenther@suse.de>
21127         * BASE-VER: Bump to 8.0.1.
21129 2018-01-14  Martin Sebor  <msebor@redhat.com>
21131         PR other/83508
21132         * builtins.c (check_access): Avoid warning when the no-warning bit
21133         is set.
21135 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
21137         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
21138         * ira-color (allocno_hard_regs_compare): Likewise.
21140 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
21142         PR target/83013
21143         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
21144         Use .pushsection/.popsection.
21146 2018-01-14  Martin Sebor  <msebor@redhat.com>
21148         PR c++/81327
21149         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
21151 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
21153         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
21154         entry from extra_headers.
21155         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
21156         extra_headers, make the list bitwise identical to the i?86-*-* one.
21158 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
21160         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
21161         -mcmodel=large with -mindirect-branch=thunk,
21162         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
21163         -mfunction-return=thunk-extern.
21164         * doc/invoke.texi: Document -mcmodel=large is incompatible with
21165         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
21166         -mfunction-return=thunk and -mfunction-return=thunk-extern.
21168 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
21170         * config/i386/i386.c (print_reg): Print the name of the full
21171         integer register without '%'.
21172         (ix86_print_operand): Handle 'V'.
21173         * doc/extend.texi: Document 'V' modifier.
21175 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
21177         * config/i386/constraints.md (Bs): Disallow memory operand for
21178         -mindirect-branch-register.
21179         (Bw): Likewise.
21180         * config/i386/predicates.md (indirect_branch_operand): Likewise.
21181         (GOT_memory_operand): Likewise.
21182         (call_insn_operand): Likewise.
21183         (sibcall_insn_operand): Likewise.
21184         (GOT32_symbol_operand): Likewise.
21185         * config/i386/i386.md (indirect_jump): Call convert_memory_address
21186         for -mindirect-branch-register.
21187         (tablejump): Likewise.
21188         (*sibcall_memory): Likewise.
21189         (*sibcall_value_memory): Likewise.
21190         Disallow peepholes of indirect call and jump via memory for
21191         -mindirect-branch-register.
21192         (*call_pop): Replace m with Bw.
21193         (*call_value_pop): Likewise.
21194         (*sibcall_pop_memory): Replace m with Bs.
21195         * config/i386/i386.opt (mindirect-branch-register): New option.
21196         * doc/invoke.texi: Document -mindirect-branch-register option.
21198 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
21200         * config/i386/i386-protos.h (ix86_output_function_return): New.
21201         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
21202         set function_return_type.
21203         (indirect_thunk_name): Add ret_p to indicate thunk for function
21204         return.
21205         (output_indirect_thunk_function): Pass false to
21206         indirect_thunk_name.
21207         (ix86_output_indirect_branch_via_reg): Likewise.
21208         (ix86_output_indirect_branch_via_push): Likewise.
21209         (output_indirect_thunk_function): Create alias for function
21210         return thunk if regno < 0.
21211         (ix86_output_function_return): New function.
21212         (ix86_handle_fndecl_attribute): Handle function_return.
21213         (ix86_attribute_table): Add function_return.
21214         * config/i386/i386.h (machine_function): Add
21215         function_return_type.
21216         * config/i386/i386.md (simple_return_internal): Use
21217         ix86_output_function_return.
21218         (simple_return_internal_long): Likewise.
21219         * config/i386/i386.opt (mfunction-return=): New option.
21220         (indirect_branch): Mention -mfunction-return=.
21221         * doc/extend.texi: Document function_return function attribute.
21222         * doc/invoke.texi: Document -mfunction-return= option.
21224 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
21226         * config/i386/i386-opts.h (indirect_branch): New.
21227         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
21228         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
21229         with local indirect jump when converting indirect call and jump.
21230         (ix86_set_indirect_branch_type): New.
21231         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
21232         (indirectlabelno): New.
21233         (indirect_thunk_needed): Likewise.
21234         (indirect_thunk_bnd_needed): Likewise.
21235         (indirect_thunks_used): Likewise.
21236         (indirect_thunks_bnd_used): Likewise.
21237         (INDIRECT_LABEL): Likewise.
21238         (indirect_thunk_name): Likewise.
21239         (output_indirect_thunk): Likewise.
21240         (output_indirect_thunk_function): Likewise.
21241         (ix86_output_indirect_branch_via_reg): Likewise.
21242         (ix86_output_indirect_branch_via_push): Likewise.
21243         (ix86_output_indirect_branch): Likewise.
21244         (ix86_output_indirect_jmp): Likewise.
21245         (ix86_code_end): Call output_indirect_thunk_function if needed.
21246         (ix86_output_call_insn): Call ix86_output_indirect_branch if
21247         needed.
21248         (ix86_handle_fndecl_attribute): Handle indirect_branch.
21249         (ix86_attribute_table): Add indirect_branch.
21250         * config/i386/i386.h (machine_function): Add indirect_branch_type
21251         and has_local_indirect_jump.
21252         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
21253         to true.
21254         (tablejump): Likewise.
21255         (*indirect_jump): Use ix86_output_indirect_jmp.
21256         (*tablejump_1): Likewise.
21257         (simple_return_indirect_internal): Likewise.
21258         * config/i386/i386.opt (mindirect-branch=): New option.
21259         (indirect_branch): New.
21260         (keep): Likewise.
21261         (thunk): Likewise.
21262         (thunk-inline): Likewise.
21263         (thunk-extern): Likewise.
21264         * doc/extend.texi: Document indirect_branch function attribute.
21265         * doc/invoke.texi: Document -mindirect-branch= option.
21267 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
21269         PR ipa/83051
21270         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
21272 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
21274         * ipa-inline.c (want_inline_small_function_p): Return false if
21275         inlining has already failed with CIF_FINAL_ERROR.
21276         (update_caller_keys): Call want_inline_small_function_p before
21277         can_inline_edge_p.
21278         (update_callee_keys): Likewise.
21280 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
21282         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
21283         New function.
21284         (rs6000_quadword_masked_address_p): Likewise.
21285         (quad_aligned_load_p): Likewise.
21286         (quad_aligned_store_p): Likewise.
21287         (const_load_sequence_p): Add comment to describe the outer-most loop.
21288         (mimic_memory_attributes_and_flags): New function.
21289         (rs6000_gen_stvx): Likewise.
21290         (replace_swapped_aligned_store): Likewise.
21291         (rs6000_gen_lvx): Likewise.
21292         (replace_swapped_aligned_load): Likewise.
21293         (replace_swapped_load_constant): Capitalize argument name in
21294         comment describing this function.
21295         (rs6000_analyze_swaps): Add a third pass to search for vector loads
21296         and stores that access quad-word aligned addresses and replace
21297         with stvx or lvx instructions when appropriate.
21298         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
21299         New function prototype.
21300         (rs6000_quadword_masked_address_p): Likewise.
21301         (rs6000_gen_lvx): Likewise.
21302         (rs6000_gen_stvx): Likewise.
21303         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
21304         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
21305         when memory address is aligned.
21306         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
21307         this split to select lvx instruction when memory address is aligned.
21308         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
21309         instruction when memory address is aligned.
21310         (*vsx_le_perm_load_v16qi): Likewise.
21311         (four unnamed splitters): Modify to select the stvx instruction
21312         when memory is aligned.
21314 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
21316         * predict.c (determine_unlikely_bbs): Handle correctly BBs
21317         which appears in the queue multiple times.
21319 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21320             Alan Hayward  <alan.hayward@arm.com>
21321             David Sherwood  <david.sherwood@arm.com>
21323         * tree-vectorizer.h (vec_lower_bound): New structure.
21324         (_loop_vec_info): Add check_nonzero and lower_bounds.
21325         (LOOP_VINFO_CHECK_NONZERO): New macro.
21326         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
21327         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
21328         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
21329         fields.  Make seg_len the distance travelled, not including the
21330         access size.
21331         (dr_direction_indicator): Declare.
21332         (dr_zero_step_indicator): Likewise.
21333         (dr_known_forward_stride_p): Likewise.
21334         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
21335         tree-ssanames.h.
21336         (runtime_alias_check_p): Allow runtime alias checks with
21337         variable strides.
21338         (operator ==): Compare access_size and align.
21339         (prune_runtime_alias_test_list): Rework for new distinction between
21340         the access_size and seg_len.
21341         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
21342         segment lengths.
21343         (get_segment_min_max): New function.
21344         (create_intersect_range_checks): Use it.
21345         (dr_step_indicator): New function.
21346         (dr_direction_indicator): Likewise.
21347         (dr_zero_step_indicator): Likewise.
21348         (dr_known_forward_stride_p): Likewise.
21349         * tree-loop-distribution.c (data_ref_segment_size): Return
21350         DR_STEP * (niters - 1).
21351         (compute_alias_check_pairs): Update call to the dr_with_seg_len
21352         constructor.
21353         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
21354         (vect_preserves_scalar_order_p): New function, split out from...
21355         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
21356         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
21357         (vect_vfa_access_size): New function.
21358         (vect_vfa_align): Likewise.
21359         (vect_compile_time_alias): Take access_size_a and access_b arguments.
21360         (dump_lower_bound): New function.
21361         (vect_check_lower_bound): Likewise.
21362         (vect_small_gap_p): Likewise.
21363         (vectorizable_with_step_bound_p): Likewise.
21364         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
21365         depencies if the vectorization factor is 1.  Convert the checks
21366         for nonzero steps into checks on the bounds of DR_STEP.  Try using
21367         a bunds check for variable steps if the minimum required step is
21368         relatively small. Update calls to the dr_with_seg_len
21369         constructor and to vect_compile_time_alias.
21370         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
21371         function.
21372         (vect_loop_versioning): Call it.
21373         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
21374         when retrying.
21375         (vect_estimate_min_profitable_iters): Account for any bounds checks.
21377 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21378             Alan Hayward  <alan.hayward@arm.com>
21379             David Sherwood  <david.sherwood@arm.com>
21381         * doc/sourcebuild.texi (vect_scatter_store): Document.
21382         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
21383         optabs.
21384         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
21385         Document.
21386         * genopinit.c (main): Add supports_vec_scatter_store and
21387         supports_vec_scatter_store_cached to target_optabs.
21388         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
21389         IFN_MASK_SCATTER_STORE.
21390         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
21391         functions.
21392         * internal-fn.h (internal_store_fn_p): Declare.
21393         (internal_fn_stored_value_index): Likewise.
21394         * internal-fn.c (scatter_store_direct): New macro.
21395         (expand_scatter_store_optab_fn): New function.
21396         (direct_scatter_store_optab_supported_p): New macro.
21397         (internal_store_fn_p): New function.
21398         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
21399         IFN_MASK_SCATTER_STORE.
21400         (internal_fn_mask_index): Likewise.
21401         (internal_fn_stored_value_index): New function.
21402         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
21403         for scatter stores.
21404         * optabs-query.h (supports_vec_scatter_store_p): Declare.
21405         * optabs-query.c (supports_vec_scatter_store_p): New function.
21406         * tree-vectorizer.h (vect_get_store_rhs): Declare.
21407         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
21408         true for scatter stores.
21409         (vect_gather_scatter_fn_p): Handle scatter stores too.
21410         (vect_check_gather_scatter): Consider using scatter stores if
21411         supports_vec_scatter_store_p.
21412         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
21413         scatter stores too.
21414         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21415         internal_fn_stored_value_index.
21416         (check_load_store_masking): Handle scatter stores too.
21417         (vect_get_store_rhs): Make public.
21418         (vectorizable_call): Use internal_store_fn_p.
21419         (vectorizable_store): Handle scatter store internal functions.
21420         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
21421         when deciding whether the end of the group has been reached.
21422         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
21423         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
21424         (mask_scatter_store<mode>): New insns.
21426 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21427             Alan Hayward  <alan.hayward@arm.com>
21428             David Sherwood  <david.sherwood@arm.com>
21430         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
21431         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
21432         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
21433         function.
21434         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
21435         Use vect_truncate_gather_scatter_offset if we can't treat the
21436         operation as a normal gather load or scatter store.
21437         (get_group_load_store_type): Take the gather_scatter_info
21438         as argument.  Try using a gather load or scatter store for
21439         single-element groups.
21440         (get_load_store_type): Update calls to get_group_load_store_type
21441         and vect_use_strided_gather_scatters_p.
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_create_data_ref_ptr): Take an extra
21448         optional tree argument.
21449         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
21450         null target hooks.
21451         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
21452         but continue to use the current value as a fallback.
21453         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
21454         to compare the updates.
21455         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
21456         (get_load_store_type): Use it when handling a strided access.
21457         (vect_get_strided_load_store_ops): New function.
21458         (vect_get_data_ptr_increment): Likewise.
21459         (vectorizable_load): Handle strided gather loads.  Always pass
21460         a step to vect_create_data_ref_ptr and bump_vector_ptr.
21462 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21463             Alan Hayward  <alan.hayward@arm.com>
21464             David Sherwood  <david.sherwood@arm.com>
21466         * doc/md.texi (gather_load@var{m}): Document.
21467         (mask_gather_load@var{m}): Likewise.
21468         * genopinit.c (main): Add supports_vec_gather_load and
21469         supports_vec_gather_load_cached to target_optabs.
21470         * optabs-tree.c (init_tree_optimization_optabs): Use
21471         ggc_cleared_alloc to allocate target_optabs.
21472         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
21473         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
21474         functions.
21475         * internal-fn.h (internal_load_fn_p): Declare.
21476         (internal_gather_scatter_fn_p): Likewise.
21477         (internal_fn_mask_index): Likewise.
21478         (internal_gather_scatter_fn_supported_p): Likewise.
21479         * internal-fn.c (gather_load_direct): New macro.
21480         (expand_gather_load_optab_fn): New function.
21481         (direct_gather_load_optab_supported_p): New macro.
21482         (direct_internal_fn_optab): New function.
21483         (internal_load_fn_p): Likewise.
21484         (internal_gather_scatter_fn_p): Likewise.
21485         (internal_fn_mask_index): Likewise.
21486         (internal_gather_scatter_fn_supported_p): Likewise.
21487         * optabs-query.c (supports_at_least_one_mode_p): New function.
21488         (supports_vec_gather_load_p): Likewise.
21489         * optabs-query.h (supports_vec_gather_load_p): Declare.
21490         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
21491         and memory_type field.
21492         (NUM_PATTERNS): Bump to 15.
21493         * tree-vect-data-refs.c: Include internal-fn.h.
21494         (vect_gather_scatter_fn_p): New function.
21495         (vect_describe_gather_scatter_call): Likewise.
21496         (vect_check_gather_scatter): Try using internal functions for
21497         gather loads.  Recognize existing calls to a gather load function.
21498         (vect_analyze_data_refs): Consider using gather loads if
21499         supports_vec_gather_load_p.
21500         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
21501         (vect_get_gather_scatter_offset_type): Likewise.
21502         (vect_convert_mask_for_vectype): Likewise.
21503         (vect_add_conversion_to_patterm): Likewise.
21504         (vect_try_gather_scatter_pattern): Likewise.
21505         (vect_recog_gather_scatter_pattern): New pattern recognizer.
21506         (vect_vect_recog_func_ptrs): Add it.
21507         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
21508         internal_fn_mask_index and internal_gather_scatter_fn_p.
21509         (check_load_store_masking): Take the gather_scatter_info as an
21510         argument and handle gather loads.
21511         (vect_get_gather_scatter_ops): New function.
21512         (vectorizable_call): Check internal_load_fn_p.
21513         (vectorizable_load): Likewise.  Handle gather load internal
21514         functions.
21515         (vectorizable_store): Update call to check_load_store_masking.
21516         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
21517         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
21518         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
21519         (aarch64_gather_scale_operand_d): New predicates.
21520         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
21521         (mask_gather_load<mode>): New insns.
21523 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21524             Alan Hayward  <alan.hayward@arm.com>
21525             David Sherwood  <david.sherwood@arm.com>
21527         * optabs.def (fold_left_plus_optab): New optab.
21528         * doc/md.texi (fold_left_plus_@var{m}): Document.
21529         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
21530         * internal-fn.c (fold_left_direct): Define.
21531         (expand_fold_left_optab_fn): Likewise.
21532         (direct_fold_left_optab_supported_p): Likewise.
21533         * fold-const-call.c (fold_const_fold_left): New function.
21534         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
21535         * tree-parloops.c (valid_reduction_p): New function.
21536         (gather_scalar_reductions): Use it.
21537         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
21538         (vect_finish_replace_stmt): Declare.
21539         * tree-vect-loop.c (fold_left_reduction_fn): New function.
21540         (needs_fold_left_reduction_p): New function, split out from...
21541         (vect_is_simple_reduction): ...here.  Accept reductions that
21542         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
21543         (vect_force_simple_reduction): Also store the reduction type in
21544         the assignment's STMT_VINFO_REDUC_TYPE.
21545         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
21546         (merge_with_identity): New function.
21547         (vect_expand_fold_left): Likewise.
21548         (vectorize_fold_left_reduction): Likewise.
21549         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
21550         scalar phi in place for it.  Check for target support and reject
21551         cases that would reassociate the operation.  Defer the transform
21552         phase to vectorize_fold_left_reduction.
21553         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
21554         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
21555         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
21557 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21559         * tree-if-conv.c (predicate_mem_writes): Remove redundant
21560         call to ifc_temp_var.
21562 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21563             Alan Hayward  <alan.hayward@arm.com>
21564             David Sherwood  <david.sherwood@arm.com>
21566         * target.def (legitimize_address_displacement): Take the original
21567         offset as a poly_int.
21568         * targhooks.h (default_legitimize_address_displacement): Update
21569         accordingly.
21570         * targhooks.c (default_legitimize_address_displacement): Likewise.
21571         * doc/tm.texi: Regenerate.
21572         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
21573         as an argument, moving assert of ad->disp == ad->disp_term to...
21574         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
21575         Try calling targetm.legitimize_address_displacement before expanding
21576         the address rather than afterwards, and adjust for the new interface.
21577         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
21578         Match the new hook interface.  Handle SVE addresses.
21579         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
21580         new hook interface.
21582 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21584         * Makefile.in (OBJS): Add early-remat.o.
21585         * target.def (select_early_remat_modes): New hook.
21586         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
21587         * doc/tm.texi: Regenerate.
21588         * targhooks.h (default_select_early_remat_modes): Declare.
21589         * targhooks.c (default_select_early_remat_modes): New function.
21590         * timevar.def (TV_EARLY_REMAT): New timevar.
21591         * passes.def (pass_early_remat): New pass.
21592         * tree-pass.h (make_pass_early_remat): Declare.
21593         * early-remat.c: New file.
21594         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
21595         function.
21596         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
21598 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21599             Alan Hayward  <alan.hayward@arm.com>
21600             David Sherwood  <david.sherwood@arm.com>
21602         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
21603         vfm1 with a bound_epilog parameter.
21604         (vect_do_peeling): Update calls accordingly, and move the prologue
21605         call earlier in the function.  Treat the base bound_epilog as 0 for
21606         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
21607         this base when peeling for gaps.
21608         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
21609         with fully-masked loops.
21610         (vect_estimate_min_profitable_iters): Handle the single peeled
21611         iteration in that case.
21613 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21614             Alan Hayward  <alan.hayward@arm.com>
21615             David Sherwood  <david.sherwood@arm.com>
21617         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
21618         single-element interleaving even if the size is not a power of 2.
21619         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
21620         accesses for single-element interleaving if the group size is
21621         not a power of 2.
21623 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21624             Alan Hayward  <alan.hayward@arm.com>
21625             David Sherwood  <david.sherwood@arm.com>
21627         * doc/md.texi (fold_extract_last_@var{m}): Document.
21628         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
21629         * optabs.def (fold_extract_last_optab): New optab.
21630         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
21631         * internal-fn.c (fold_extract_direct): New macro.
21632         (expand_fold_extract_optab_fn): Likewise.
21633         (direct_fold_extract_optab_supported_p): Likewise.
21634         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
21635         * tree-vect-loop.c (vect_model_reduction_cost): Handle
21636         EXTRACT_LAST_REDUCTION.
21637         (get_initial_def_for_reduction): Do not create an initial vector
21638         for EXTRACT_LAST_REDUCTION reductions.
21639         (vectorizable_reduction): Leave the scalar phi in place for
21640         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
21641         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
21642         epilogue code for EXTRACT_LAST_REDUCTION and defer the
21643         transform phase to vectorizable_condition.
21644         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
21645         split out from...
21646         (vect_finish_stmt_generation): ...here.
21647         (vect_finish_replace_stmt): New function.
21648         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
21649         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
21650         pattern.
21651         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
21653 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21654             Alan Hayward  <alan.hayward@arm.com>
21655             David Sherwood  <david.sherwood@arm.com>
21657         * doc/md.texi (extract_last_@var{m}): Document.
21658         * optabs.def (extract_last_optab): New optab.
21659         * internal-fn.def (EXTRACT_LAST): New internal function.
21660         * internal-fn.c (cond_unary_direct): New macro.
21661         (expand_cond_unary_optab_fn): Likewise.
21662         (direct_cond_unary_optab_supported_p): Likewise.
21663         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
21664         loops using EXTRACT_LAST.
21665         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
21666         (extract_last_<mode>): ...this optab.
21667         (vec_extract<mode><Vel>): Update accordingly.
21669 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21670             Alan Hayward  <alan.hayward@arm.com>
21671             David Sherwood  <david.sherwood@arm.com>
21673         * target.def (empty_mask_is_expensive): New hook.
21674         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
21675         * doc/tm.texi: Regenerate.
21676         * targhooks.h (default_empty_mask_is_expensive): Declare.
21677         * targhooks.c (default_empty_mask_is_expensive): New function.
21678         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
21679         if the target says that empty masks are expensive.
21680         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
21681         New function.
21682         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
21684 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21685             Alan Hayward  <alan.hayward@arm.com>
21686             David Sherwood  <david.sherwood@arm.com>
21688         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
21689         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
21690         (vect_use_loop_mask_for_alignment_p): New function.
21691         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
21692         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
21693         niters_skip argument.  Make sure that the first niters_skip elements
21694         of the first iteration are inactive.
21695         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
21696         Update call to vect_set_loop_masks_directly.
21697         (get_misalign_in_elems): New function, split out from...
21698         (vect_gen_prolog_loop_niters): ...here.
21699         (vect_update_init_of_dr): Take a code argument that specifies whether
21700         the adjustment should be added or subtracted.
21701         (vect_update_init_of_drs): Likewise.
21702         (vect_prepare_for_masked_peels): New function.
21703         (vect_do_peeling): Skip prologue peeling if we're using a mask
21704         instead.  Update call to vect_update_inits_of_drs.
21705         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21706         mask_skip_niters.
21707         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
21708         alignment.  Do not include the number of peeled iterations in
21709         the minimum threshold in that case.
21710         (vectorizable_induction): Adjust the start value down by
21711         LOOP_VINFO_MASK_SKIP_NITERS iterations.
21712         (vect_transform_loop): Call vect_prepare_for_masked_peels.
21713         Take the number of skipped iterations into account when calculating
21714         the loop bounds.
21715         * tree-vect-stmts.c (vect_gen_while_not): New function.
21717 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21718             Alan Hayward  <alan.hayward@arm.com>
21719             David Sherwood  <david.sherwood@arm.com>
21721         * doc/sourcebuild.texi (vect_fully_masked): Document.
21722         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
21723         default value to 0.
21724         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
21725         split out from...
21726         (vect_analyze_loop_2): ...here. Don't check the vectorization
21727         factor against the number of loop iterations if the loop is
21728         fully-masked.
21730 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21731             Alan Hayward  <alan.hayward@arm.com>
21732             David Sherwood  <david.sherwood@arm.com>
21734         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
21735         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
21736         (dump_groups): Update accordingly.
21737         (iv_use::mem_type): New member variable.
21738         (address_p): New function.
21739         (record_use): Add a mem_type argument and initialize the new
21740         mem_type field.
21741         (record_group_use): Add a mem_type argument.  Use address_p.
21742         Remove obsolete null checks of base_object.  Update call to record_use.
21743         (find_interesting_uses_op): Update call to record_group_use.
21744         (find_interesting_uses_cond): Likewise.
21745         (find_interesting_uses_address): Likewise.
21746         (get_mem_type_for_internal_fn): New function.
21747         (find_address_like_use): Likewise.
21748         (find_interesting_uses_stmt): Try find_address_like_use before
21749         calling find_interesting_uses_op.
21750         (addr_offset_valid_p): Use the iv mem_type field as the type
21751         of the addressed memory.
21752         (add_autoinc_candidates): Likewise.
21753         (get_address_cost): Likewise.
21754         (split_small_address_groups_p): Use address_p.
21755         (split_address_groups): Likewise.
21756         (add_iv_candidate_for_use): Likewise.
21757         (autoinc_possible_for_pair): Likewise.
21758         (rewrite_groups): Likewise.
21759         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
21760         (determine_group_iv_cost): Update after split of USE_ADDRESS.
21761         (get_alias_ptr_type_for_ptr_address): New function.
21762         (rewrite_use_address): Rewrite address uses in calls that were
21763         identified by find_address_like_use.
21765 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21766             Alan Hayward  <alan.hayward@arm.com>
21767             David Sherwood  <david.sherwood@arm.com>
21769         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
21770         TARGET_MEM_REFs.
21771         * gimple-expr.h (is_gimple_addressable: Likewise.
21772         * gimple-expr.c (is_gimple_address): Likewise.
21773         * internal-fn.c (expand_call_mem_ref): New function.
21774         (expand_mask_load_optab_fn): Use it.
21775         (expand_mask_store_optab_fn): Likewise.
21777 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21778             Alan Hayward  <alan.hayward@arm.com>
21779             David Sherwood  <david.sherwood@arm.com>
21781         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
21782         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
21783         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
21784         (cond_umax@var{mode}): Document.
21785         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
21786         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
21787         (cond_umin_optab, cond_umax_optab): New optabs.
21788         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
21789         (COND_IOR, COND_XOR): New internal functions.
21790         * internal-fn.h (get_conditional_internal_fn): Declare.
21791         * internal-fn.c (cond_binary_direct): New macro.
21792         (expand_cond_binary_optab_fn): Likewise.
21793         (direct_cond_binary_optab_supported_p): Likewise.
21794         (get_conditional_internal_fn): New function.
21795         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
21796         Cope with reduction statements that are vectorized as calls rather
21797         than assignments.
21798         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
21799         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
21800         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
21801         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
21802         (UNSPEC_COND_EOR): New unspecs.
21803         (optab): Add mappings for them.
21804         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
21805         (sve_int_op, sve_fp_op): New int attributes.
21807 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21808             Alan Hayward  <alan.hayward@arm.com>
21809             David Sherwood  <david.sherwood@arm.com>
21811         * optabs.def (while_ult_optab): New optab.
21812         * doc/md.texi (while_ult@var{m}@var{n}): Document.
21813         * internal-fn.def (WHILE_ULT): New internal function.
21814         * internal-fn.h (direct_internal_fn_supported_p): New override
21815         that takes two types as argument.
21816         * internal-fn.c (while_direct): New macro.
21817         (expand_while_optab_fn): New function.
21818         (convert_optab_supported_p): Likewise.
21819         (direct_while_optab_supported_p): New macro.
21820         * wide-int.h (wi::udiv_ceil): New function.
21821         * tree-vectorizer.h (rgroup_masks): New structure.
21822         (vec_loop_masks): New typedef.
21823         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
21824         and fully_masked_p.
21825         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
21826         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
21827         (vect_max_vf): New function.
21828         (slpeel_make_loop_iterate_ntimes): Delete.
21829         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
21830         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
21831         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
21832         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
21833         internal-fn.h, stor-layout.h and optabs-query.h.
21834         (vect_set_loop_mask): New function.
21835         (add_preheader_seq): Likewise.
21836         (add_header_seq): Likewise.
21837         (interleave_supported_p): Likewise.
21838         (vect_maybe_permute_loop_masks): Likewise.
21839         (vect_set_loop_masks_directly): Likewise.
21840         (vect_set_loop_condition_masked): Likewise.
21841         (vect_set_loop_condition_unmasked): New function, split out from
21842         slpeel_make_loop_iterate_ntimes.
21843         (slpeel_make_loop_iterate_ntimes): Rename to..
21844         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
21845         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
21846         (vect_do_peeling): Update call accordingly.
21847         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
21848         loops.
21849         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21850         mask_compare_type, can_fully_mask_p and fully_masked_p.
21851         (release_vec_loop_masks): New function.
21852         (_loop_vec_info): Use it to free the loop masks.
21853         (can_produce_all_loop_masks_p): New function.
21854         (vect_get_max_nscalars_per_iter): Likewise.
21855         (vect_verify_full_masking): Likewise.
21856         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
21857         retries, and free the mask rgroups before retrying.  Check loop-wide
21858         reasons for disallowing fully-masked loops.  Make the final decision
21859         about whether use a fully-masked loop or not.
21860         (vect_estimate_min_profitable_iters): Do not assume that peeling
21861         for the number of iterations will be needed for fully-masked loops.
21862         (vectorizable_reduction): Disable fully-masked loops.
21863         (vectorizable_live_operation): Likewise.
21864         (vect_halve_mask_nunits): New function.
21865         (vect_double_mask_nunits): Likewise.
21866         (vect_record_loop_mask): Likewise.
21867         (vect_get_loop_mask): Likewise.
21868         (vect_transform_loop): Handle the case in which the final loop
21869         iteration might handle a partial vector.  Call vect_set_loop_condition
21870         instead of slpeel_make_loop_iterate_ntimes.
21871         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
21872         (check_load_store_masking): New function.
21873         (prepare_load_store_mask): Likewise.
21874         (vectorizable_store): Handle fully-masked loops.
21875         (vectorizable_load): Likewise.
21876         (supportable_widening_operation): Use vect_halve_mask_nunits for
21877         booleans.
21878         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
21879         (vect_gen_while): New function.
21880         * config/aarch64/aarch64.md (umax<mode>3): New expander.
21881         (aarch64_uqdec<mode>): New insn.
21883 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21884             Alan Hayward  <alan.hayward@arm.com>
21885             David Sherwood  <david.sherwood@arm.com>
21887         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
21888         (reduc_xor_scal_optab): New optabs.
21889         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
21890         (reduc_xor_scal_@var{m}): Document.
21891         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
21892         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
21893         internal functions.
21894         * fold-const-call.c (fold_const_call): Handle them.
21895         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
21896         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
21897         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
21898         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
21899         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
21900         (UNSPEC_XORV): New unspecs.
21901         (optab): Add entries for them.
21902         (BITWISEV): New int iterator.
21903         (bit_reduc_op): New int attributes.
21905 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21906             Alan Hayward  <alan.hayward@arm.com>
21907             David Sherwood  <david.sherwood@arm.com>
21909         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
21910         * internal-fn.def (VEC_SHL_INSERT): New internal function.
21911         * optabs.def (vec_shl_insert_optab): New optab.
21912         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
21913         (duplicate_and_interleave): Likewise.
21914         * tree-vect-loop.c: Include internal-fn.h.
21915         (neutral_op_for_slp_reduction): New function, split out from
21916         get_initial_defs_for_reduction.
21917         (get_initial_def_for_reduction): Handle option 2 for variable-length
21918         vectors by loading the neutral value into a vector and then shifting
21919         the initial value into element 0.
21920         (get_initial_defs_for_reduction): Replace the code argument with
21921         the neutral value calculated by neutral_op_for_slp_reduction.
21922         Use gimple_build_vector for constant-length vectors.
21923         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
21924         but the first group_size elements have a neutral value.
21925         Use duplicate_and_interleave otherwise.
21926         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
21927         Update call to get_initial_defs_for_reduction.  Handle SLP
21928         reductions for variable-length vectors by creating one vector
21929         result for each scalar result, with the elements associated
21930         with other scalar results stubbed out with the neutral value.
21931         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
21932         Require IFN_VEC_SHL_INSERT for double reductions on
21933         variable-length vectors, or SLP reductions that have
21934         a neutral value.  Require can_duplicate_and_interleave_p
21935         support for variable-length unchained SLP reductions if there
21936         is no neutral value, such as for MIN/MAX reductions.  Also require
21937         the number of vector elements to be a multiple of the number of
21938         SLP statements when doing variable-length unchained SLP reductions.
21939         Update call to vect_create_epilog_for_reduction.
21940         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
21941         and remove initial values.
21942         (duplicate_and_interleave): Make public.
21943         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
21944         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
21946 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21947             Alan Hayward  <alan.hayward@arm.com>
21948             David Sherwood  <david.sherwood@arm.com>
21950         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
21951         (can_duplicate_and_interleave_p): New function.
21952         (vect_get_and_check_slp_defs): Take the vector of statements
21953         rather than just the current one.  Remove excess parentheses.
21954         Restriction rejectinon of vect_constant_def and vect_external_def
21955         for variable-length vectors to boolean types, or types for which
21956         can_duplicate_and_interleave_p is false.
21957         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
21958         (duplicate_and_interleave): New function.
21959         (vect_get_constant_vectors): Use gimple_build_vector for
21960         constant-length vectors and suitable variable-length constant
21961         vectors.  Use duplicate_and_interleave for other variable-length
21962         vectors.  Don't defer the update when inserting new statements.
21964 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21965             Alan Hayward  <alan.hayward@arm.com>
21966             David Sherwood  <david.sherwood@arm.com>
21968         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
21969         min_profitable_iters doesn't go negative.
21971 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
21972             Alan Hayward  <alan.hayward@arm.com>
21973             David Sherwood  <david.sherwood@arm.com>
21975         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
21976         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
21977         * optabs.def (vec_mask_load_lanes_optab): New optab.
21978         (vec_mask_store_lanes_optab): Likewise.
21979         * internal-fn.def (MASK_LOAD_LANES): New internal function.
21980         (MASK_STORE_LANES): Likewise.
21981         * internal-fn.c (mask_load_lanes_direct): New macro.
21982         (mask_store_lanes_direct): Likewise.
21983         (expand_mask_load_optab_fn): Handle masked operations.
21984         (expand_mask_load_lanes_optab_fn): New macro.
21985         (expand_mask_store_optab_fn): Handle masked operations.
21986         (expand_mask_store_lanes_optab_fn): New macro.
21987         (direct_mask_load_lanes_optab_supported_p): Likewise.
21988         (direct_mask_store_lanes_optab_supported_p): Likewise.
21989         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
21990         parameter.
21991         (vect_load_lanes_supported): Likewise.
21992         * tree-vect-data-refs.c (strip_conversion): New function.
21993         (can_group_stmts_p): Likewise.
21994         (vect_analyze_data_ref_accesses): Use it instead of checking
21995         for a pair of assignments.
21996         (vect_store_lanes_supported): Take a masked_p parameter.
21997         (vect_load_lanes_supported): Likewise.
21998         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
21999         vect_store_lanes_supported and vect_load_lanes_supported.
22000         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
22001         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
22002         parameter.  Don't allow gaps for masked accesses.
22003         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
22004         and vect_load_lanes_supported.
22005         (get_load_store_type): Take a masked_p parameter and update
22006         call to get_group_load_store_type.
22007         (vectorizable_store): Update call to get_load_store_type.
22008         Handle IFN_MASK_STORE_LANES.
22009         (vectorizable_load): Update call to get_load_store_type.
22010         Handle IFN_MASK_LOAD_LANES.
22012 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22013             Alan Hayward  <alan.hayward@arm.com>
22014             David Sherwood  <david.sherwood@arm.com>
22016         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
22017         modes for SVE.
22018         * config/aarch64/aarch64-protos.h
22019         (aarch64_sve_struct_memory_operand_p): Declare.
22020         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
22021         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
22022         (VPRED, vpred): Handle SVE structure modes.
22023         * config/aarch64/constraints.md (Utx): New constraint.
22024         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
22025         (aarch64_sve_struct_nonimmediate_operand): New predicates.
22026         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
22027         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
22028         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
22029         structure modes.  Split into pieces after RA.
22030         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
22031         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
22032         New patterns.
22033         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
22034         SVE structure modes.
22035         (aarch64_classify_address): Likewise.
22036         (sizetochar): Move earlier in file.
22037         (aarch64_print_operand): Handle SVE register lists.
22038         (aarch64_array_mode): New function.
22039         (aarch64_sve_struct_memory_operand_p): Likewise.
22040         (TARGET_ARRAY_MODE): Redefine.
22042 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22043             Alan Hayward  <alan.hayward@arm.com>
22044             David Sherwood  <david.sherwood@arm.com>
22046         * target.def (array_mode): New target hook.
22047         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
22048         * doc/tm.texi: Regenerate.
22049         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
22050         * hooks.c (hook_optmode_mode_uhwi_none): New function.
22051         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
22052         targetm.array_mode.
22053         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
22054         type sizes.
22056 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22057             Alan Hayward  <alan.hayward@arm.com>
22058             David Sherwood  <david.sherwood@arm.com>
22060         * fold-const.c (fold_binary_loc): Check the argument types
22061         rather than the result type when testing for a vector operation.
22063 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22065         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
22066         * doc/tm.texi: Regenerate.
22068 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22069             Alan Hayward  <alan.hayward@arm.com>
22070             David Sherwood  <david.sherwood@arm.com>
22072         * doc/invoke.texi (-msve-vector-bits=): Document new option.
22073         (sve): Document new AArch64 extension.
22074         * doc/md.texi (w): Extend the description of the AArch64
22075         constraint to include SVE vectors.
22076         (Upl, Upa): Document new AArch64 predicate constraints.
22077         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
22078         enum.
22079         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
22080         (msve-vector-bits=): New option.
22081         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
22082         SVE when these are disabled.
22083         (sve): New extension.
22084         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
22085         modes.  Adjust their number of units based on aarch64_sve_vg.
22086         (MAX_BITSIZE_MODE_ANY_MODE): Define.
22087         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
22088         aarch64_addr_query_type.
22089         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
22090         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
22091         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
22092         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
22093         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
22094         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
22095         (aarch64_simd_imm_zero_p): Delete.
22096         (aarch64_check_zero_based_sve_index_immediate): Declare.
22097         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22098         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22099         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22100         (aarch64_sve_float_mul_immediate_p): Likewise.
22101         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22102         rather than an rtx.
22103         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
22104         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
22105         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
22106         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
22107         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
22108         (aarch64_regmode_natural_size): Likewise.
22109         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
22110         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
22111         left one place.
22112         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
22113         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
22114         for VG and the SVE predicate registers.
22115         (V_ALIASES): Add a "z"-prefixed alias.
22116         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
22117         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
22118         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
22119         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
22120         (REG_CLASS_NAMES): Add entries for them.
22121         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
22122         and the predicate registers.
22123         (aarch64_sve_vg): Declare.
22124         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
22125         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
22126         (REGMODE_NATURAL_SIZE): Define.
22127         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
22128         SVE macros.
22129         * config/aarch64/aarch64.c: Include cfgrtl.h.
22130         (simd_immediate_info): Add a constructor for series vectors,
22131         and an associated step field.
22132         (aarch64_sve_vg): New variable.
22133         (aarch64_dbx_register_number): Handle VG and the predicate registers.
22134         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
22135         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
22136         (VEC_ANY_DATA, VEC_STRUCT): New constants.
22137         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
22138         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
22139         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
22140         (aarch64_get_mask_mode): New functions.
22141         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
22142         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
22143         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
22144         predicate modes and predicate registers.  Explicitly restrict
22145         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
22146         to store a vector mode if it is recognized by
22147         aarch64_classify_vector_mode.
22148         (aarch64_regmode_natural_size): New function.
22149         (aarch64_hard_regno_caller_save_mode): Return the original mode
22150         for predicates.
22151         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
22152         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
22153         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
22154         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
22155         functions.
22156         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
22157         does not overlap dest if the function is frame-related.  Handle
22158         SVE constants.
22159         (aarch64_split_add_offset): New function.
22160         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
22161         them aarch64_add_offset.
22162         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
22163         and update call to aarch64_sub_sp.
22164         (aarch64_add_cfa_expression): New function.
22165         (aarch64_expand_prologue): Pass extra temporary registers to the
22166         functions above.  Handle the case in which we need to emit new
22167         DW_CFA_expressions for registers that were originally saved
22168         relative to the stack pointer, but now have to be expressed
22169         relative to the frame pointer.
22170         (aarch64_output_mi_thunk): Pass extra temporary registers to the
22171         functions above.
22172         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
22173         IP0 and IP1 values for SVE frames.
22174         (aarch64_expand_vec_series): New function.
22175         (aarch64_expand_sve_widened_duplicate): Likewise.
22176         (aarch64_expand_sve_const_vector): Likewise.
22177         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
22178         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
22179         into the register, rather than emitting a SET directly.
22180         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
22181         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
22182         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
22183         (offset_9bit_signed_scaled_p): New functions.
22184         (aarch64_replicate_bitmask_imm): New function.
22185         (aarch64_bitmask_imm): Use it.
22186         (aarch64_cannot_force_const_mem): Reject expressions involving
22187         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
22188         (aarch64_classify_index): Handle SVE indices, by requiring
22189         a plain register index with a scale that matches the element size.
22190         (aarch64_classify_address): Handle SVE addresses.  Assert that
22191         the mode of the address is VOIDmode or an integer mode.
22192         Update call to aarch64_classify_symbol.
22193         (aarch64_classify_symbolic_expression): Update call to
22194         aarch64_classify_symbol.
22195         (aarch64_const_vec_all_in_range_p): New function.
22196         (aarch64_print_vector_float_operand): Likewise.
22197         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
22198         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
22199         and the FP immediates 1.0 and 0.5.
22200         (aarch64_print_address_internal): Handle SVE addresses.
22201         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
22202         (aarch64_regno_regclass): Handle predicate registers.
22203         (aarch64_secondary_reload): Handle big-endian reloads of SVE
22204         data modes.
22205         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
22206         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
22207         (aarch64_convert_sve_vector_bits): New function.
22208         (aarch64_override_options): Use it to handle -msve-vector-bits=.
22209         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
22210         rather than an rtx.
22211         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
22212         Handle SVE vector and predicate modes.  Accept VL-based constants
22213         that need only one temporary register, and VL offsets that require
22214         no temporary registers.
22215         (aarch64_conditional_register_usage): Mark the predicate registers
22216         as fixed if SVE isn't available.
22217         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
22218         Return true for SVE vector and predicate modes.
22219         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
22220         rather than an unsigned int.  Handle SVE modes.
22221         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
22222         SVE modes.
22223         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
22224         if SVE is enabled.
22225         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
22226         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
22227         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
22228         (aarch64_sve_float_mul_immediate_p): New functions.
22229         (aarch64_sve_valid_immediate): New function.
22230         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
22231         Explicitly reject structure modes.  Check for INDEX constants.
22232         Handle PTRUE and PFALSE constants.
22233         (aarch64_check_zero_based_sve_index_immediate): New function.
22234         (aarch64_simd_imm_zero_p): Delete.
22235         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
22236         vector modes.  Accept constants in the range of CNT[BHWD].
22237         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
22238         ask for an Advanced SIMD mode.
22239         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
22240         (aarch64_simd_vector_alignment): Handle SVE predicates.
22241         (aarch64_vectorize_preferred_vector_alignment): New function.
22242         (aarch64_simd_vector_alignment_reachable): Use it instead of
22243         the vector size.
22244         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
22245         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
22246         functions.
22247         (MAX_VECT_LEN): Delete.
22248         (expand_vec_perm_d): Add a vec_flags field.
22249         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
22250         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
22251         (aarch64_evpc_ext): Don't apply a big-endian lane correction
22252         for SVE modes.
22253         (aarch64_evpc_rev): Rename to...
22254         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
22255         (aarch64_evpc_rev_global): New function.
22256         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
22257         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
22258         MAX_VECT_LEN.
22259         (aarch64_evpc_sve_tbl): New function.
22260         (aarch64_expand_vec_perm_const_1): Update after rename of
22261         aarch64_evpc_rev.  Handle SVE permutes too, trying
22262         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
22263         than aarch64_evpc_tbl.
22264         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
22265         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
22266         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
22267         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
22268         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
22269         (aarch64_expand_sve_vcond): New functions.
22270         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
22271         of aarch64_vector_mode_p.
22272         (aarch64_dwarf_poly_indeterminate_value): New function.
22273         (aarch64_compute_pressure_classes): Likewise.
22274         (aarch64_can_change_mode_class): Likewise.
22275         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
22276         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
22277         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
22278         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
22279         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
22280         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
22281         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
22282         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
22283         constraints.
22284         (Dn, Dl, Dr): Accept const as well as const_vector.
22285         (Dz): Likewise.  Compare against CONST0_RTX.
22286         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
22287         of "vector" where appropriate.
22288         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
22289         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
22290         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
22291         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
22292         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
22293         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
22294         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
22295         (v_int_equiv): Extend to SVE modes.
22296         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
22297         mode attributes.
22298         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
22299         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
22300         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
22301         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
22302         (SVE_COND_FP_CMP): New int iterators.
22303         (perm_hilo): Handle the new unpack unspecs.
22304         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
22305         attributes.
22306         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
22307         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
22308         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
22309         (aarch64_equality_operator, aarch64_constant_vector_operand)
22310         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
22311         (aarch64_sve_nonimmediate_operand): Likewise.
22312         (aarch64_sve_general_operand): Likewise.
22313         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
22314         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
22315         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
22316         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
22317         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
22318         (aarch64_sve_float_arith_immediate): Likewise.
22319         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
22320         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
22321         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
22322         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
22323         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
22324         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
22325         (aarch64_sve_float_arith_operand): Likewise.
22326         (aarch64_sve_float_arith_with_sub_operand): Likewise.
22327         (aarch64_sve_float_mul_operand): Likewise.
22328         (aarch64_sve_vec_perm_operand): Likewise.
22329         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
22330         (aarch64_mov_operand): Accept const_poly_int and const_vector.
22331         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
22332         as well as const_vector.
22333         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
22334         in file.  Use CONST0_RTX and CONSTM1_RTX.
22335         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
22336         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
22337         Use aarch64_simd_imm_zero.
22338         * config/aarch64/aarch64-sve.md: New file.
22339         * config/aarch64/aarch64.md: Include it.
22340         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
22341         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
22342         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
22343         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
22344         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
22345         (sve): New attribute.
22346         (enabled): Disable instructions with the sve attribute unless
22347         TARGET_SVE.
22348         (movqi, movhi): Pass CONST_POLY_INT operaneds through
22349         aarch64_expand_mov_immediate.
22350         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
22351         CNT[BHSD] immediates.
22352         (movti): Split CONST_POLY_INT moves into two halves.
22353         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
22354         Split additions that need a temporary here if the destination
22355         is the stack pointer.
22356         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
22357         (*add<mode>3_poly_1): New instruction.
22358         (set_clobber_cc): New expander.
22360 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22362         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
22363         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
22364         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
22365         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
22366         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
22367         Change innermode from fixed_mode_size to machine_mode.
22368         (simplify_subreg): Update call accordingly.  Handle a constant-sized
22369         subreg of a variable-length CONST_VECTOR.
22371 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
22372             Alan Hayward  <alan.hayward@arm.com>
22373             David Sherwood  <david.sherwood@arm.com>
22375         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
22376         (add_offset_to_base): New function, split out from...
22377         (create_mem_ref): ...here.  When handling a scale other than 1,
22378         check first whether the address is valid without the offset.
22379         Add it into the base if so, leaving the index and scale as-is.
22381 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
22383         PR c++/83778
22384         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
22385         fold_for_warn before checking if arg2 is INTEGER_CST.
22387 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
22389         * config/rs6000/predicates.md (load_multiple_operation): Delete.
22390         (store_multiple_operation): Delete.
22391         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
22392         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
22393         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
22394         guarded by TARGET_STRING.
22395         (rs6000_output_load_multiple): Delete.
22396         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
22397         OPTION_MASK_STRING / TARGET_STRING handling.
22398         (print_operand) <'N', 'O'>: Add comment that these are unused now.
22399         (const rs6000_opt_masks) <"string">: Change mask to 0.
22400         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
22401         (MASK_STRING): Delete.
22402         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
22403         parts.  Simplify.
22404         (load_multiple): Delete.
22405         (*ldmsi8): Delete.
22406         (*ldmsi7): Delete.
22407         (*ldmsi6): Delete.
22408         (*ldmsi5): Delete.
22409         (*ldmsi4): Delete.
22410         (*ldmsi3): Delete.
22411         (store_multiple): Delete.
22412         (*stmsi8): Delete.
22413         (*stmsi7): Delete.
22414         (*stmsi6): Delete.
22415         (*stmsi5): Delete.
22416         (*stmsi4): Delete.
22417         (*stmsi3): Delete.
22418         (movmemsi_8reg): Delete.
22419         (corresponding unnamed define_insn): Delete.
22420         (movmemsi_6reg): Delete.
22421         (corresponding unnamed define_insn): Delete.
22422         (movmemsi_4reg): Delete.
22423         (corresponding unnamed define_insn): Delete.
22424         (movmemsi_2reg): Delete.
22425         (corresponding unnamed define_insn): Delete.
22426         (movmemsi_1reg): Delete.
22427         (corresponding unnamed define_insn): Delete.
22428         * config/rs6000/rs6000.opt (mno-string): New.
22429         (mstring): Replace by deprecation warning stub.
22430         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
22432 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
22434         * regrename.c (regrename_do_replace): If replacing the same
22435         reg multiple times, try to reuse last created gen_raw_REG.
22437         PR debug/81155
22438         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
22439         main to workaround a bug in GDB.
22441 2018-01-12  Tom de Vries  <tom@codesourcery.com>
22443         PR target/83737
22444         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
22446 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
22448         PR rtl-optimization/80481
22449         * ira-color.c (get_cap_member): New function.
22450         (allocnos_conflict_by_live_ranges_p): Use it.
22451         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
22452         (setup_slot_coalesced_allocno_live_ranges): Ditto.
22454 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
22456         PR target/83628
22457         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
22458         (*saddl_se_1): Ditto.
22459         (*ssubsi_1): Ditto.
22460         (*ssubl_se_1): Ditto.
22462 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
22464         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
22465         rather than wi::to_widest for DR_INITs.
22466         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
22467         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
22468         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
22469         INTEGER_CSTs.
22470         (vect_analyze_group_access_1): Note that here.
22472 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
22474         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
22475         polynomial type sizes.
22477 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
22479         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
22480         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
22481         (gimple_add_tmp_var): Likewise.
22483 2018-01-12  Martin Liska  <mliska@suse.cz>
22485         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
22486         (gimple_alloc_sizes): Likewise.
22487         (dump_gimple_statistics): Use PRIu64 in printf format.
22488         * gimple.h: Change uint64_t to int.
22490 2018-01-12  Martin Liska  <mliska@suse.cz>
22492         * tree-core.h: Use uint64_t instead of int.
22493         * tree.c (tree_node_counts): Likewise.
22494         (tree_node_sizes): Likewise.
22495         (dump_tree_statistics): Use PRIu64 in printf format.
22497 2018-01-12  Martin Liska  <mliska@suse.cz>
22499         * Makefile.in: As qsort_chk is implemented in vec.c, add
22500         vec.o to linkage of gencfn-macros.
22501         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
22502         passing the info to record_node_allocation_statistics.
22503         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
22504         and pass the info.
22505         * ggc-common.c (struct ggc_usage): Add operator== and use
22506         it in operator< and compare function.
22507         * mem-stats.h (struct mem_usage): Likewise.
22508         * vec.c (struct vec_usage): Remove operator< and compare
22509         function. Can be simply inherited.
22511 2018-01-12  Martin Jambor  <mjambor@suse.cz>
22513         PR target/81616
22514         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
22515         * tree-ssa-math-opts.c: Include domwalk.h.
22516         (convert_mult_to_fma_1): New function.
22517         (fma_transformation_info): New type.
22518         (fma_deferring_state): Likewise.
22519         (cancel_fma_deferring): New function.
22520         (result_of_phi): Likewise.
22521         (last_fma_candidate_feeds_initial_phi): Likewise.
22522         (convert_mult_to_fma): Added deferring logic, split actual
22523         transformation to convert_mult_to_fma_1.
22524         (math_opts_dom_walker): New type.
22525         (math_opts_dom_walker::after_dom_children): New method, body moved
22526         here from pass_optimize_widening_mul::execute, added deferring logic
22527         bits.
22528         (pass_optimize_widening_mul::execute): Moved most of code to
22529         math_opts_dom_walker::after_dom_children.
22530         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
22531         * config/i386/i386.c (ix86_option_override_internal): Added
22532         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
22534 2018-01-12  Richard Biener  <rguenther@suse.de>
22536         PR debug/83157
22537         * dwarf2out.c (gen_variable_die): Do not reset old_die for
22538         inline instance vars.
22540 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
22542         PR target/81819
22543         * config/rx/rx.c (rx_is_restricted_memory_address):
22544         Handle SUBREG case.
22546 2018-01-12  Richard Biener  <rguenther@suse.de>
22548         PR tree-optimization/80846
22549         * target.def (split_reduction): New target hook.
22550         * targhooks.c (default_split_reduction): New function.
22551         * targhooks.h (default_split_reduction): Declare.
22552         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
22553         target requests first reduce vectors by combining low and high
22554         parts.
22555         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
22556         (get_vectype_for_scalar_type_and_size): Export.
22557         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
22558         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
22559         * doc/tm.texi: Regenerate.
22560         * config/i386/i386.c (ix86_split_reduction): Implement
22561         TARGET_VECTORIZE_SPLIT_REDUCTION.
22563 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
22565         PR target/83368
22566         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
22567         in PIC mode except for TARGET_VXWORKS_RTP.
22568         * config/sparc/sparc.c: Include cfgrtl.h.
22569         (TARGET_INIT_PIC_REG): Define.
22570         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
22571         (sparc_pic_register_p): New predicate.
22572         (sparc_legitimate_address_p): Use it.
22573         (sparc_legitimize_pic_address): Likewise.
22574         (sparc_delegitimize_address): Likewise.
22575         (sparc_mode_dependent_address_p): Likewise.
22576         (gen_load_pcrel_sym): Remove 4th parameter.
22577         (load_got_register): Adjust call to above.  Remove obsolete stuff.
22578         (sparc_expand_prologue): Do not call load_got_register here.
22579         (sparc_flat_expand_prologue): Likewise.
22580         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
22581         (sparc_use_pseudo_pic_reg): New function.
22582         (sparc_init_pic_reg): Likewise.
22583         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
22584         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
22586 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
22588         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
22589         Add item for branch_cost.
22591 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
22593         PR rtl-optimization/83565
22594         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
22595         not extend the result to a larger mode for rotate operations.
22596         (num_sign_bit_copies1): Likewise.
22598 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22600         PR target/40411
22601         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
22602         -symbolic.
22603         Use values-Xc.o for -pedantic.
22604         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
22606 2018-01-12  Martin Liska  <mliska@suse.cz>
22608         PR ipa/83054
22609         * ipa-devirt.c (final_warning_record::grow_type_warnings):
22610         New function.
22611         (possible_polymorphic_call_targets): Use it.
22612         (ipa_devirt): Likewise.
22614 2018-01-12  Martin Liska  <mliska@suse.cz>
22616         * profile-count.h (enum profile_quality): Use 0 as invalid
22617         enum value of profile_quality.
22619 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
22621         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
22622         -mext-string options.
22624 2018-01-12  Richard Biener  <rguenther@suse.de>
22626         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
22627         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
22628         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
22629         Likewise.
22630         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
22632 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
22634         * configure.ac (--with-long-double-format): Add support for the
22635         configuration option to change the default long double format on
22636         PowerPC systems.
22637         * config.gcc (powerpc*-linux*-*): Likewise.
22638         * configure: Regenerate.
22639         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
22640         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
22641         used without modification.
22643 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22645         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
22646         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
22647         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
22648         MISC_BUILTIN_SPEC_BARRIER.
22649         (rs6000_init_builtins): Likewise.
22650         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
22651         enum value.
22652         (speculation_barrier): New define_insn.
22653         * doc/extend.texi: Document __builtin_speculation_barrier.
22655 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
22657         PR target/83203
22658         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
22659         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
22660         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
22661         iterators.
22662         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
22663         integral modes instead of "ss" and "sd".
22664         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
22665         vectors with 32-bit and 64-bit elements.
22666         (vecdupssescalarmodesuffix): New mode attribute.
22667         (vec_dup<mode>): Use it.
22669 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
22671         PR target/83330
22672         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
22673         frame if argument is passed on stack.
22675 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
22677         PR target/82682
22678         * ree.c (combine_reaching_defs): Optimize also
22679         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
22680         reg2=any_extend(exp); reg1=reg2;, formatting fix.
22682 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
22684         PR middle-end/83189
22685         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
22687 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
22689         PR middle-end/83718
22690         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
22691         after they are computed.
22693 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
22695         PR tree-optimization/83695
22696         * gimple-loop-linterchange.cc
22697         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
22698         reset cached scev information after interchange.
22699         (pass_linterchange::execute): Remove call to scev_reset_htab.
22701 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22703         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
22704         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
22705         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
22706         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
22707         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
22708         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
22709         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
22710         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
22711         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
22712         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
22713         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
22714         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
22715         (V_lane_reg): Likewise.
22716         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
22717         New define_expand.
22718         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
22719         (vfmal_lane_low<mode>_intrinsic,
22720         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
22721         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
22722         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
22723         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
22724         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
22725         vfmsl_lane_high<mode>_intrinsic): New define_insns.
22727 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22729         * config/arm/arm-cpus.in (fp16fml): New feature.
22730         (ALL_SIMD): Add fp16fml.
22731         (armv8.2-a): Add fp16fml as an option.
22732         (armv8.3-a): Likewise.
22733         (armv8.4-a): Add fp16fml as part of fp16.
22734         * config/arm/arm.h (TARGET_FP16FML): Define.
22735         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
22736         when appropriate.
22737         * config/arm/arm-modes.def (V2HF): Define.
22738         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
22739         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
22740         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
22741         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
22742         vfmsl_low, vfmsl_high): New set of builtins.
22743         * config/arm/iterators.md (PLUSMINUS): New code iterator.
22744         (vfml_op): New code attribute.
22745         (VFMLHALVES): New int iterator.
22746         (VFML, VFMLSEL): New mode attributes.
22747         (V_reg): Define mapping for V2HF.
22748         (V_hi, V_lo): New mode attributes.
22749         (VF_constraint): Likewise.
22750         (vfml_half, vfml_half_selector): New int attributes.
22751         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
22752         define_expand.
22753         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
22754         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
22755         New define_insn.
22756         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
22757         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
22758         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
22759         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
22760         documentation.
22761         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
22762         Document new effective target and option set.
22764 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22766         * config/arm/arm-cpus.in (armv8_4): New feature.
22767         (ARMv8_4a): New fgroup.
22768         (armv8.4-a): New arch.
22769         * config/arm/arm-tables.opt: Regenerate.
22770         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
22771         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
22772         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
22773         Add matching rules for -march=armv8.4-a and extensions.
22774         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
22776 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
22778         PR target/81821
22779         * config/rx/rx.md (BW): New mode attribute.
22780         (sync_lock_test_and_setsi): Add mode suffix to insn output.
22782 2018-01-11  Richard Biener  <rguenther@suse.de>
22784         PR tree-optimization/83435
22785         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
22786         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
22787         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
22789 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22790             Alan Hayward  <alan.hayward@arm.com>
22791             David Sherwood  <david.sherwood@arm.com>
22793         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
22794         field.
22795         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
22796         (aarch64_print_address_internal): Use it to check for a zero offset.
22798 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22799             Alan Hayward  <alan.hayward@arm.com>
22800             David Sherwood  <david.sherwood@arm.com>
22802         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
22803         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
22804         Return a poly_int64 rather than a HOST_WIDE_INT.
22805         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
22806         rather than a HOST_WIDE_INT.
22807         * config/aarch64/aarch64.h (aarch64_frame): Protect with
22808         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
22809         hard_fp_offset, frame_size, initial_adjust, callee_offset and
22810         final_offset from HOST_WIDE_INT to poly_int64.
22811         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
22812         to_constant when getting the number of units in an Advanced SIMD
22813         mode.
22814         (aarch64_builtin_vectorized_function): Check for a constant number
22815         of units.
22816         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
22817         GET_MODE_SIZE.
22818         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
22819         attribute instead of GET_MODE_NUNITS.
22820         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
22821         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
22822         GET_MODE_SIZE for fixed-size registers.
22823         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
22824         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
22825         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
22826         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
22827         (aarch64_print_operand, aarch64_print_address_internal)
22828         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
22829         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
22830         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
22831         Handle polynomial GET_MODE_SIZE.
22832         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
22833         wider than SImode without modification.
22834         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
22835         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
22836         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
22837         passing and returning SVE modes.
22838         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
22839         rather than GEN_INT.
22840         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
22841         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
22842         (aarch64_allocate_and_probe_stack_space): Likewise.
22843         (aarch64_layout_frame): Cope with polynomial offsets.
22844         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
22845         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
22846         polynomial offsets.
22847         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
22848         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
22849         poly_int64 rather than a HOST_WIDE_INT.
22850         (aarch64_get_separate_components, aarch64_process_components)
22851         (aarch64_expand_prologue, aarch64_expand_epilogue)
22852         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
22853         (aarch64_anchor_offset): New function, split out from...
22854         (aarch64_legitimize_address): ...here.
22855         (aarch64_builtin_vectorization_cost): Handle polynomial
22856         TYPE_VECTOR_SUBPARTS.
22857         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
22858         GET_MODE_NUNITS.
22859         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
22860         number of elements from the PARALLEL rather than the mode.
22861         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
22862         rather than GET_MODE_BITSIZE.
22863         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
22864         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
22865         (aarch64_expand_vec_perm_const_1): Handle polynomial
22866         d->perm.length () and d->perm elements.
22867         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
22868         Apply to_constant to d->perm elements.
22869         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
22870         polynomial CONST_VECTOR_NUNITS.
22871         (aarch64_move_pointer): Take amount as a poly_int64 rather
22872         than an int.
22873         (aarch64_progress_pointer): Avoid temporary variable.
22874         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
22875         the mode attribute instead of GET_MODE.
22877 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22878             Alan Hayward  <alan.hayward@arm.com>
22879             David Sherwood  <david.sherwood@arm.com>
22881         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
22882         x exists before using it.
22883         (aarch64_add_constant_internal): Rename to...
22884         (aarch64_add_offset_1): ...this.  Replace regnum with separate
22885         src and dest rtxes.  Handle the case in which they're different,
22886         including when the offset is zero.  Replace scratchreg with an rtx.
22887         Use 2 additions if there is no spare register into which we can
22888         move a 16-bit constant.
22889         (aarch64_add_constant): Delete.
22890         (aarch64_add_offset): Replace reg with separate src and dest
22891         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
22892         Use aarch64_add_offset_1.
22893         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
22894         an rtx rather than an int.  Take the delta as a poly_int64
22895         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
22896         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
22897         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
22898         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
22899         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
22900         and aarch64_add_sp.
22901         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
22902         aarch64_add_constant.
22904 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22906         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
22907         Use scalar_float_mode.
22909 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22911         * config/aarch64/aarch64-simd.md
22912         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
22913         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
22914         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
22915         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
22916         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
22917         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
22918         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
22919         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
22920         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
22921         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
22923 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
22925         PR target/83514
22926         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
22927         targ_options->x_arm_arch_string is non NULL.
22929 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
22931         * config/aarch64/aarch64.h
22932         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
22934 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
22936         PR target/82096
22937         * expmed.c (emit_store_flag_force): Swap if const op0
22938         and change VOIDmode to mode of op0.
22940 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
22942         PR rtl-optimization/83761
22943         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
22944         than bytes to mode_for_size.
22946 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
22948         PR middle-end/83189
22949         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
22950         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
22951         profile.
22953 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
22955         PR middle-end/83575
22956         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
22957         when in layout mode.
22958         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
22959         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
22960         partition fixup.
22962 2018-01-10  Michael Collison  <michael.collison@arm.com>
22964         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
22965         * config/aarch64/aarch64-option-extension.def: Add
22966         AARCH64_OPT_EXTENSION of 'fp16fml'.
22967         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
22968         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
22969         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
22970         * config/aarch64/constraints.md (Ui7): New constraint.
22971         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
22972         (VFMLA_SEL_W): Ditto.
22973         (f16quad): Ditto.
22974         (f16mac1): Ditto.
22975         (VFMLA16_LOW): New int iterator.
22976         (VFMLA16_HIGH): Ditto.
22977         (UNSPEC_FMLAL): New unspec.
22978         (UNSPEC_FMLSL): Ditto.
22979         (UNSPEC_FMLAL2): Ditto.
22980         (UNSPEC_FMLSL2): Ditto.
22981         (f16mac): New code attribute.
22982         * config/aarch64/aarch64-simd-builtins.def
22983         (aarch64_fmlal_lowv2sf): Ditto.
22984         (aarch64_fmlsl_lowv2sf): Ditto.
22985         (aarch64_fmlalq_lowv4sf): Ditto.
22986         (aarch64_fmlslq_lowv4sf): Ditto.
22987         (aarch64_fmlal_highv2sf): Ditto.
22988         (aarch64_fmlsl_highv2sf): Ditto.
22989         (aarch64_fmlalq_highv4sf): Ditto.
22990         (aarch64_fmlslq_highv4sf): Ditto.
22991         (aarch64_fmlal_lane_lowv2sf): Ditto.
22992         (aarch64_fmlsl_lane_lowv2sf): Ditto.
22993         (aarch64_fmlal_laneq_lowv2sf): Ditto.
22994         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
22995         (aarch64_fmlalq_lane_lowv4sf): Ditto.
22996         (aarch64_fmlsl_lane_lowv4sf): Ditto.
22997         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
22998         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
22999         (aarch64_fmlal_lane_highv2sf): Ditto.
23000         (aarch64_fmlsl_lane_highv2sf): Ditto.
23001         (aarch64_fmlal_laneq_highv2sf): Ditto.
23002         (aarch64_fmlsl_laneq_highv2sf): Ditto.
23003         (aarch64_fmlalq_lane_highv4sf): Ditto.
23004         (aarch64_fmlsl_lane_highv4sf): Ditto.
23005         (aarch64_fmlalq_laneq_highv4sf): Ditto.
23006         (aarch64_fmlsl_laneq_highv4sf): Ditto.
23007         * config/aarch64/aarch64-simd.md:
23008         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
23009         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
23010         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
23011         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
23012         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
23013         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
23014         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
23015         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
23016         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
23017         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
23018         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
23019         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
23020         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
23021         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
23022         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
23023         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
23024         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
23025         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
23026         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
23027         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
23028         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
23029         (vfmlsl_low_u32): Ditto.
23030         (vfmlalq_low_u32): Ditto.
23031         (vfmlslq_low_u32): Ditto.
23032         (vfmlal_high_u32): Ditto.
23033         (vfmlsl_high_u32): Ditto.
23034         (vfmlalq_high_u32): Ditto.
23035         (vfmlslq_high_u32): Ditto.
23036         (vfmlal_lane_low_u32): Ditto.
23037         (vfmlsl_lane_low_u32): Ditto.
23038         (vfmlal_laneq_low_u32): Ditto.
23039         (vfmlsl_laneq_low_u32): Ditto.
23040         (vfmlalq_lane_low_u32): Ditto.
23041         (vfmlslq_lane_low_u32): Ditto.
23042         (vfmlalq_laneq_low_u32): Ditto.
23043         (vfmlslq_laneq_low_u32): Ditto.
23044         (vfmlal_lane_high_u32): Ditto.
23045         (vfmlsl_lane_high_u32): Ditto.
23046         (vfmlal_laneq_high_u32): Ditto.
23047         (vfmlsl_laneq_high_u32): Ditto.
23048         (vfmlalq_lane_high_u32): Ditto.
23049         (vfmlslq_lane_high_u32): Ditto.
23050         (vfmlalq_laneq_high_u32): Ditto.
23051         (vfmlslq_laneq_high_u32): Ditto.
23052         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
23053         (AARCH64_FL_FOR_ARCH8_4): New.
23054         (AARCH64_ISA_F16FML): New ISA flag.
23055         (TARGET_F16FML): New feature flag for fp16fml.
23056         (doc/invoke.texi): Document new fp16fml option.
23058 2018-01-10  Michael Collison  <michael.collison@arm.com>
23060         * config/aarch64/aarch64-builtins.c:
23061         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
23062         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23063         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
23064         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
23065         (AARCH64_ISA_SHA3): New ISA flag.
23066         (TARGET_SHA3): New feature flag for sha3.
23067         * config/aarch64/iterators.md (sha512_op): New int attribute.
23068         (CRYPTO_SHA512): New int iterator.
23069         (UNSPEC_SHA512H): New unspec.
23070         (UNSPEC_SHA512H2): Ditto.
23071         (UNSPEC_SHA512SU0): Ditto.
23072         (UNSPEC_SHA512SU1): Ditto.
23073         * config/aarch64/aarch64-simd-builtins.def
23074         (aarch64_crypto_sha512hqv2di): New builtin.
23075         (aarch64_crypto_sha512h2qv2di): Ditto.
23076         (aarch64_crypto_sha512su0qv2di): Ditto.
23077         (aarch64_crypto_sha512su1qv2di): Ditto.
23078         (aarch64_eor3qv8hi): Ditto.
23079         (aarch64_rax1qv2di): Ditto.
23080         (aarch64_xarqv2di): Ditto.
23081         (aarch64_bcaxqv8hi): Ditto.
23082         * config/aarch64/aarch64-simd.md:
23083         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
23084         (aarch64_crypto_sha512su0qv2di): Ditto.
23085         (aarch64_crypto_sha512su1qv2di): Ditto.
23086         (aarch64_eor3qv8hi): Ditto.
23087         (aarch64_rax1qv2di): Ditto.
23088         (aarch64_xarqv2di): Ditto.
23089         (aarch64_bcaxqv8hi): Ditto.
23090         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
23091         (vsha512h2q_u64): Ditto.
23092         (vsha512su0q_u64): Ditto.
23093         (vsha512su1q_u64): Ditto.
23094         (veor3q_u16): Ditto.
23095         (vrax1q_u64): Ditto.
23096         (vxarq_u64): Ditto.
23097         (vbcaxq_u16): Ditto.
23098         * config/arm/types.md (crypto_sha512): New type attribute.
23099         (crypto_sha3): Ditto.
23100         (doc/invoke.texi): Document new sha3 option.
23102 2018-01-10  Michael Collison  <michael.collison@arm.com>
23104         * config/aarch64/aarch64-builtins.c:
23105         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
23106         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23107         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
23108         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
23109         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
23110         (AARCH64_ISA_SM4): New ISA flag.
23111         (TARGET_SM4): New feature flag for sm4.
23112         * config/aarch64/aarch64-simd-builtins.def
23113         (aarch64_sm3ss1qv4si): Ditto.
23114         (aarch64_sm3tt1aq4si): Ditto.
23115         (aarch64_sm3tt1bq4si): Ditto.
23116         (aarch64_sm3tt2aq4si): Ditto.
23117         (aarch64_sm3tt2bq4si): Ditto.
23118         (aarch64_sm3partw1qv4si): Ditto.
23119         (aarch64_sm3partw2qv4si): Ditto.
23120         (aarch64_sm4eqv4si): Ditto.
23121         (aarch64_sm4ekeyqv4si): Ditto.
23122         * config/aarch64/aarch64-simd.md:
23123         (aarch64_sm3ss1qv4si): Ditto.
23124         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
23125         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
23126         (aarch64_sm4eqv4si): Ditto.
23127         (aarch64_sm4ekeyqv4si): Ditto.
23128         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
23129         (sm3part_op): Ditto.
23130         (CRYPTO_SM3TT): Ditto.
23131         (CRYPTO_SM3PART): Ditto.
23132         (UNSPEC_SM3SS1): New unspec.
23133         (UNSPEC_SM3TT1A): Ditto.
23134         (UNSPEC_SM3TT1B): Ditto.
23135         (UNSPEC_SM3TT2A): Ditto.
23136         (UNSPEC_SM3TT2B): Ditto.
23137         (UNSPEC_SM3PARTW1): Ditto.
23138         (UNSPEC_SM3PARTW2): Ditto.
23139         (UNSPEC_SM4E): Ditto.
23140         (UNSPEC_SM4EKEY): Ditto.
23141         * config/aarch64/constraints.md (Ui2): New constraint.
23142         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
23143         * config/arm/types.md (crypto_sm3): New type attribute.
23144         (crypto_sm4): Ditto.
23145         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
23146         (vsm3tt1aq_u32): Ditto.
23147         (vsm3tt1bq_u32): Ditto.
23148         (vsm3tt2aq_u32): Ditto.
23149         (vsm3tt2bq_u32): Ditto.
23150         (vsm3partw1q_u32): Ditto.
23151         (vsm3partw2q_u32): Ditto.
23152         (vsm4eq_u32): Ditto.
23153         (vsm4ekeyq_u32): Ditto.
23154         (doc/invoke.texi): Document new sm4 option.
23156 2018-01-10  Michael Collison  <michael.collison@arm.com>
23158         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
23159         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
23160         (AARCH64_FL_FOR_ARCH8_4): New.
23161         (AARCH64_FL_V8_4): New flag.
23162         (doc/invoke.texi): Document new armv8.4-a option.
23164 2018-01-10  Michael Collison  <michael.collison@arm.com>
23166         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
23167         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
23168         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
23169         * config/aarch64/aarch64-option-extension.def: Add
23170         AARCH64_OPT_EXTENSION of 'sha2'.
23171         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
23172         (crypto): Disable sha2 and aes if crypto disabled.
23173         (crypto): Enable aes and sha2 if enabled.
23174         (simd): Disable sha2 and aes if simd disabled.
23175         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
23176         New flags.
23177         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
23178         (TARGET_SHA2): New feature flag for sha2.
23179         (TARGET_AES): New feature flag for aes.
23180         * config/aarch64/aarch64-simd.md:
23181         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
23182         conditional on TARGET_AES.
23183         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
23184         (aarch64_crypto_sha1hsi): Make pattern conditional
23185         on TARGET_SHA2.
23186         (aarch64_crypto_sha1hv4si): Ditto.
23187         (aarch64_be_crypto_sha1hv4si): Ditto.
23188         (aarch64_crypto_sha1su1v4si): Ditto.
23189         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
23190         (aarch64_crypto_sha1su0v4si): Ditto.
23191         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
23192         (aarch64_crypto_sha256su0v4si): Ditto.
23193         (aarch64_crypto_sha256su1v4si): Ditto.
23194         (doc/invoke.texi): Document new aes and sha2 options.
23196 2018-01-10  Martin Sebor  <msebor@redhat.com>
23198         PR tree-optimization/83781
23199         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
23200         as string arrays.
23202 2018-01-11  Martin Sebor  <msebor@gmail.com>
23203             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
23205         PR tree-optimization/83501
23206         PR tree-optimization/81703
23208         * tree-ssa-strlen.c (get_string_cst): Rename...
23209         (get_string_len): ...to this.  Handle global constants.
23210         (handle_char_store): Adjust.
23212 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
23213             Jim Wilson  <jimw@sifive.com>
23215         * config/riscv/riscv-protos.h (riscv_output_return): New.
23216         * config/riscv/riscv.c (struct machine_function): New naked_p field.
23217         (riscv_attribute_table, riscv_output_return),
23218         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
23219         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
23220         (riscv_compute_frame_info): Only compute frame->mask if not a naked
23221         function.
23222         (riscv_expand_prologue): Add early return for naked function.
23223         (riscv_expand_epilogue): Likewise.
23224         (riscv_function_ok_for_sibcall): Return false for naked function.
23225         (riscv_set_current_function): New.
23226         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
23227         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
23228         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
23229         * doc/extend.texi (RISC-V Function Attributes): New.
23231 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
23233         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
23234         check for 128-bit long double before checking TCmode.
23235         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
23236         128-bit long doubles before checking TFmode or TCmode.
23237         (FLOAT128_IBM_P): Likewise.
23239 2018-01-10  Martin Sebor  <msebor@redhat.com>
23241         PR tree-optimization/83671
23242         * builtins.c (c_strlen): Unconditionally return zero for the empty
23243         string.
23244         Use -Warray-bounds for warnings.
23245         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
23246         for non-constant array indices with COMPONENT_REF, arrays of
23247         arrays, and pointers to arrays.
23248         (gimple_fold_builtin_strlen): Determine and set length range for
23249         non-constant character arrays.
23251 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
23253         PR middle-end/81897
23254         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
23255         empty blocks.
23257 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
23259         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
23261 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
23263         PR target/83399
23264         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
23265         VECTOR_MEM_ALTIVEC_OR_VSX_P.
23266         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
23267         indexed_or_indirect_operand predicate.
23268         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
23269         (*vsx_le_perm_load_v8hi): Likewise.
23270         (*vsx_le_perm_load_v16qi): Likewise.
23271         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
23272         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
23273         (*vsx_le_perm_store_v8hi): Likewise.
23274         (*vsx_le_perm_store_v16qi): Likewise.
23275         (eight unnamed splitters): Likewise.
23277 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
23279         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
23280         * config/rs6000/emmintrin.h: Likewise.
23281         * config/rs6000/mmintrin.h: Likewise.
23282         * config/rs6000/xmmintrin.h: Likewise.
23284 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
23286         PR c++/43486
23287         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
23288         "public_flag".
23289         * tree.c (tree_nop_conversion): Return true for location wrapper
23290         nodes.
23291         (maybe_wrap_with_location): New function.
23292         (selftest::check_strip_nops): New function.
23293         (selftest::test_location_wrappers): New function.
23294         (selftest::tree_c_tests): Call it.
23295         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
23296         (maybe_wrap_with_location): New decl.
23297         (EXPR_LOCATION_WRAPPER_P): New macro.
23298         (location_wrapper_p): New inline function.
23299         (tree_strip_any_location_wrapper): New inline function.
23301 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
23303         PR target/83735
23304         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
23305         stack_realign_offset for the largest alignment of stack slot
23306         actually used.
23307         (ix86_find_max_used_stack_alignment): New function.
23308         (ix86_finalize_stack_frame_flags): Use it.  Set
23309         max_used_stack_alignment if we don't realign stack.
23310         * config/i386/i386.h (machine_function): Add
23311         max_used_stack_alignment.
23313 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
23315         * config/arm/arm.opt (-mbranch-cost): New option.
23316         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
23317         account.
23319 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
23321         PR target/83629
23322         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
23323         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
23325 2018-01-10  Richard Biener  <rguenther@suse.de>
23327         PR debug/83765
23328         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
23329         early out so it also covers the case where we have a non-NULL
23330         origin.
23332 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
23334         PR tree-optimization/83753
23335         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
23336         for non-strided grouped accesses if the number of elements is 1.
23338 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
23340         PR target/81616
23341         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
23342         * i386.h (TARGET_USE_GATHER): Define.
23343         * x86-tune.def (X86_TUNE_USE_GATHER): New.
23345 2018-01-10  Martin Liska  <mliska@suse.cz>
23347         PR bootstrap/82831
23348         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
23349         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
23350         partitioning.
23351         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
23352         CLEANUP_NO_PARTITIONING is not set.
23354 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
23356         * doc/rtl.texi: Remove documentation of (const ...) wrappers
23357         for vectors, as a partial revert of r254296.
23358         * rtl.h (const_vec_p): Delete.
23359         (const_vec_duplicate_p): Don't test for vector CONSTs.
23360         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
23361         * expmed.c (make_tree): Likewise.
23363         Revert:
23364         * common.md (E, F): Use CONSTANT_P instead of checking for
23365         CONST_VECTOR.
23366         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
23367         checking for CONST_VECTOR.
23369 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
23371         PR middle-end/83575
23372         * predict.c (force_edge_cold): Handle in more sane way edges
23373         with no prediction.
23375 2018-01-09  Carl Love  <cel@us.ibm.com>
23377         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
23378         V4SI, V4SF types.
23379         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
23380         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
23381         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
23382         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
23383         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
23384         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
23385         * config/rs6000/rs6000-protos.h: Add extern defition for
23386         rs6000_generate_float2_double_code.
23387         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
23388         function.
23389         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
23390         (float2_v2df): Add define_expand.
23392 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
23394         PR target/83628
23395         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
23396         op_mode in the force_to_mode call.
23398 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
23400         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
23401         instead of checking each element individually.
23402         (aarch64_evpc_uzp): Likewise.
23403         (aarch64_evpc_zip): Likewise.
23404         (aarch64_evpc_ext): Likewise.
23405         (aarch64_evpc_rev): Likewise.
23406         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
23407         instead of checking each element individually.  Return true without
23408         generating rtl if
23409         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
23410         whether all selected elements come from the same input, instead of
23411         checking each element individually.  Remove calls to gen_rtx_REG,
23412         start_sequence and end_sequence and instead assert that no rtl is
23413         generated.
23415 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
23417         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
23418         order of HIGH and CONST checks.
23420 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
23422         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
23423         if the destination isn't an SSA_NAME.
23425 2018-01-09  Richard Biener  <rguenther@suse.de>
23427         PR tree-optimization/83668
23428         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
23429         move prologue...
23430         (canonicalize_loop_form): ... here, renamed from ...
23431         (canonicalize_loop_closed_ssa_form): ... this and amended to
23432         swap successor edges for loop exit blocks to make us use
23433         the RPO order we need for initial schedule generation.
23435 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
23437         PR tree-optimization/64811
23438         * match.pd: When optimizing comparisons with Inf, avoid
23439         introducing or losing exceptions from comparisons with NaN.
23441 2018-01-09  Martin Liska  <mliska@suse.cz>
23443         PR sanitizer/82517
23444         * asan.c (shadow_mem_size): Add gcc_assert.
23446 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
23448         Don't save registers in main().
23450         PR target/83738
23451         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
23452         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
23453         * config/avr/avr.c (avr_set_current_function): Don't error if
23454         naked, OS_task or OS_main are specified at the same time.
23455         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
23456         OS_main.
23457         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
23458         attribute.
23459         * common/config/avr/avr-common.c (avr_option_optimization_table):
23460         Switch on -mmain-is-OS_task for optimizing compilations.
23462 2018-01-09  Richard Biener  <rguenther@suse.de>
23464         PR tree-optimization/83572
23465         * graphite.c: Include cfganal.h.
23466         (graphite_transform_loops): Connect infinite loops to exit
23467         and remove fake edges at the end.
23469 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
23471         * ipa-inline.c (edge_badness): Revert accidental checkin.
23473 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
23475         PR ipa/80763
23476         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
23477         symbols; not inline clones.
23479 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
23481         PR target/83507
23482         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
23483         hard registers.  Formatting fixes.
23485         PR preprocessor/83722
23486         * gcc.c (try_generate_repro): Pass
23487         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
23488         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
23489         do_report_bug.
23491 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
23492             Kito Cheng  <kito.cheng@gmail.com>
23494         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
23495         (riscv_leaf_function_p): Delete.
23496         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
23498 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23500         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
23501         function.
23502         (do_ifelse): New function.
23503         (do_isel): New function.
23504         (do_sub3): New function.
23505         (do_add3): New function.
23506         (do_load_mask_compare): New function.
23507         (do_overlap_load_compare): New function.
23508         (expand_compare_loop): New function.
23509         (expand_block_compare): Call expand_compare_loop() when appropriate.
23510         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
23511         option description.
23512         (-mblock-compare-inline-loop-limit): New option.
23514 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23516         PR target/83677
23517         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
23518         Reverse order of second and third operands in first alternative.
23519         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
23520         of first and second elements in UNSPEC_VPERMR vector.
23521         (altivec_expand_vec_perm_le): Likewise.
23523 2018-01-08  Jeff Law  <law@redhat.com>
23525         PR rtl-optimizatin/81308
23526         * tree-switch-conversion.c (cfg_altered): New file scoped static.
23527         (process_switch): If group_case_labels makes a change, then set
23528         cfg_altered.
23529         (pass_convert_switch::execute): If a switch is converted, then
23530         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
23532         PR rtl-optimization/81308
23533         * recog.c (split_all_insns): Conditionally cleanup the CFG after
23534         splitting insns.
23536 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
23538         PR target/83663 - Revert r255946
23539         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
23540         generation for cases where splatting a value is not useful.
23541         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
23542         across a vec_duplicate and a paradoxical subreg forming a vector
23543         mode to a vec_concat.
23545 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23547         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
23548         -march=armv8.3-a variants.
23549         * config/arm/t-multilib: Likewise.
23550         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
23552 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23554         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
23555         to generate rtl.
23556         (cceq_ior_compare_complement): Give it a name so I can use it, and
23557         change boolean_or_operator predicate to boolean_operator so it can
23558         be used to generate a crand.
23559         (eqne): New code iterator.
23560         (bd/bd_neg): New code_attrs.
23561         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
23562         a single define_insn.
23563         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
23564         decrement (bdnzt/bdnzf/bdzt/bdzf).
23565         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
23566         with the new names of the branch decrement patterns, and added the
23567         names of the branch decrement conditional patterns.
23569 2018-01-08  Richard Biener  <rguenther@suse.de>
23571         PR tree-optimization/83563
23572         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
23573         cache.
23575 2018-01-08  Richard Biener  <rguenther@suse.de>
23577         PR middle-end/83713
23578         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
23580 2018-01-08  Richard Biener  <rguenther@suse.de>
23582         PR tree-optimization/83685
23583         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
23584         references to abnormals.
23586 2018-01-08  Richard Biener  <rguenther@suse.de>
23588         PR lto/83719
23589         * dwarf2out.c (output_indirect_strings): Handle empty
23590         skeleton_debug_str_hash.
23591         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
23593 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
23595         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
23596         (emit_store_direct): Likewise.
23597         (arc_trampoline_adjust_address): Likewise.
23598         (arc_asm_trampoline_template): New function.
23599         (arc_initialize_trampoline): Use asm_trampoline_template.
23600         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
23601         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
23602         * config/arc/arc.md (flush_icache): Delete pattern.
23604 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
23606         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
23607         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
23608         munaligned-access.
23610 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
23612         PR target/83681
23613         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
23614         by not USED_FOR_TARGET.
23615         (make_pass_resolve_sw_modes): Likewise.
23617 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
23619         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
23620         USED_FOR_TARGET.
23622 2018-01-08  Richard Biener  <rguenther@suse.de>
23624         PR middle-end/83580
23625         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
23627 2018-01-08  Richard Biener  <rguenther@suse.de>
23629         PR middle-end/83517
23630         * match.pd ((t * 2) / 2) -> t): Add missing :c.
23632 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
23634         PR middle-end/81897
23635         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
23636         basic blocks with a small number of successors.
23637         (convert_control_dep_chain_into_preds): Improve handling of
23638         forwarder blocks.
23639         (dump_predicates): Split apart into...
23640         (dump_pred_chain): ...here...
23641         (dump_pred_info): ...and here.
23642         (can_one_predicate_be_invalidated_p): Add debugging printfs.
23643         (can_chain_union_be_invalidated_p): Improve check for invalidation
23644         of paths.
23645         (uninit_uses_cannot_happen): Avoid unnecessary if
23646         convert_control_dep_chain_into_preds yielded nothing.
23648 2018-01-06  Martin Sebor  <msebor@redhat.com>
23650         PR tree-optimization/83640
23651         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
23652         subtracting negative offset from size.
23653         (builtin_access::overlap): Adjust offset bounds of the access to fall
23654         within the size of the object if possible.
23656 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
23658         PR rtl-optimization/83699
23659         * expmed.c (extract_bit_field_1): Restrict the vector usage of
23660         extract_bit_field_as_subreg to cases in which the extracted
23661         value is also a vector.
23663         * lra-constraints.c (process_alt_operands): Test for the equivalence
23664         substitutions when detecting a possible reload cycle.
23666 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
23668         PR debug/83480
23669         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
23670         by default if flag_selective_schedling{,2}.  Formatting fixes.
23672         PR rtl-optimization/83682
23673         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
23674         if it has non-VECTOR_MODE element mode.
23675         (vec_duplicate_p): Likewise.
23677         PR middle-end/83694
23678         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
23679         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
23681 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
23683         PR target/83604
23684         * config/i386/i386-builtin.def
23685         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
23686         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
23687         Require also OPTION_MASK_ISA_AVX512F in addition to
23688         OPTION_MASK_ISA_GFNI.
23689         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
23690         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
23691         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
23692         to OPTION_MASK_ISA_GFNI.
23693         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
23694         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
23695         OPTION_MASK_ISA_AVX512BW.
23696         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
23697         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
23698         addition to OPTION_MASK_ISA_GFNI.
23699         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
23700         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
23701         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
23702         to OPTION_MASK_ISA_GFNI.
23703         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
23704         a requirement for all ISAs rather than any of them with a few
23705         exceptions.
23706         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
23707         processing.
23708         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
23709         bitmasks to be enabled with 3 exceptions, instead of requiring any
23710         enabled ISA with lots of exceptions.
23711         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
23712         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
23713         Change avx512bw in isa attribute to avx512f.
23714         * config/i386/sgxintrin.h: Add license boilerplate.
23715         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
23716         to __AVX512F__ and __AVX512VL to __AVX512VL__.
23717         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
23718         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
23719         defined.
23720         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
23721         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
23722         temporarily sse2 rather than sse if not enabled already.
23724         PR target/83604
23725         * config/i386/sse.md (VI248_VLBW): Rename to ...
23726         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
23727         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
23728         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
23729         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
23730         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
23731         mode iterator instead of VI248_VLBW.
23733 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
23735         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
23736         (record_modified): Skip clobbers; add debug output.
23737         (param_change_prob): Use sreal frequencies.
23739 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
23741         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
23742         punt for user-aligned variables.
23744 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
23746         * tree-chrec.c (chrec_contains_symbols): Return true for
23747         POLY_INT_CST.
23749 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
23751         PR target/82439
23752         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
23753         of (x|y) == x for BICS pattern.
23755 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
23757         PR tree-optimization/83605
23758         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
23759         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
23760         can throw.
23762 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
23764         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
23765         * config/epiphany/rtems.h: New file.
23767 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
23768             Uros Bizjak  <ubizjak@gmail.com>
23770         PR target/83554
23771         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
23772         QIreg_operand instead of register_operand predicate.
23773         * config/i386/i386.c (ix86_rop_should_change_byte_p,
23774         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
23775         comments instead of -fmitigate[-_]rop.
23777 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
23779         PR bootstrap/81926
23780         * cgraphunit.c (symbol_table::compile): Switch to text_section
23781         before calling assembly_start debug hook.
23782         * run-rtl-passes.c (run_rtl_passes): Likewise.
23783         Include output.h.
23785 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23787         * tree-vrp.c (extract_range_from_binary_expr_1): Check
23788         range_int_cst_p rather than !symbolic_range_p before calling
23789         extract_range_from_multiplicative_op_1.
23791 2018-01-04  Jeff Law  <law@redhat.com>
23793         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
23794         redundant test in assertion.
23796 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23798         * doc/rtl.texi: Document machine_mode wrapper classes.
23800 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23802         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
23803         using tree_to_uhwi.
23805 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23807         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
23808         the VEC_PERM_EXPR fold to fail.
23810 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
23812         PR debug/83585
23813         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
23814         to switched_sections.
23816 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23818         PR target/83680
23819         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
23820         test for d.testing.
23822 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
23824         PR target/83387
23825         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
23826         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
23828 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
23830         PR debug/83666
23831         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
23832         is BLKmode and bitpos not zero or mode change is needed.
23834 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
23836         PR target/83675
23837         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
23838         TARGET_VIS2.
23840 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
23842         PR target/83628
23843         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
23844         instead of MULT rtx.  Update all corresponding splitters.
23845         (*saddl_se): Ditto.
23846         (*ssub<modesuffix>): Ditto.
23847         (*ssubl_se): Ditto.
23848         (*cmp_sadd_di): Update split patterns.
23849         (*cmp_sadd_si): Ditto.
23850         (*cmp_sadd_sidi): Ditto.
23851         (*cmp_ssub_di): Ditto.
23852         (*cmp_ssub_si): Ditto.
23853         (*cmp_ssub_sidi): Ditto.
23854         * config/alpha/predicates.md (const23_operand): New predicate.
23855         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
23856         Look for ASHIFT, not MULT inner operand.
23857         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
23859 2018-01-04  Martin Liska  <mliska@suse.cz>
23861         PR gcov-profile/83669
23862         * gcov.c (output_intermediate_file): Add version to intermediate
23863         gcov file.
23864         * doc/gcov.texi: Document new field 'version' in intermediate
23865         file format. Fix location of '-k' option of gcov command.
23867 2018-01-04  Martin Liska  <mliska@suse.cz>
23869         PR ipa/82352
23870         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
23872 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
23874         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
23876 2018-01-03  Martin Sebor  <msebor@redhat.com>
23878         PR tree-optimization/83655
23879         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
23880         checking calls with invalid arguments.
23882 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23884         * tree-vect-stmts.c (vect_get_store_rhs): New function.
23885         (vectorizable_mask_load_store): Delete.
23886         (vectorizable_call): Return false for masked loads and stores.
23887         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
23888         instead of gimple_assign_rhs1.
23889         (vectorizable_load): Handle IFN_MASK_LOAD.
23890         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
23892 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23894         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
23895         split out from..,
23896         (vectorizable_mask_load_store): ...here.
23897         (vectorizable_load): ...and here.
23899 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23901         * tree-vect-stmts.c (vect_build_all_ones_mask)
23902         (vect_build_zero_merge_argument): New functions, split out from...
23903         (vectorizable_load): ...here.
23905 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23907         * tree-vect-stmts.c (vect_check_store_rhs): New function,
23908         split out from...
23909         (vectorizable_mask_load_store): ...here.
23910         (vectorizable_store): ...and here.
23912 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23914         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
23915         split out from...
23916         (vectorizable_mask_load_store): ...here.
23918 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23920         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
23921         (vect_model_store_cost): Take a vec_load_store_type instead of a
23922         vect_def_type.
23923         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
23924         (vect_model_store_cost): Take a vec_load_store_type instead of a
23925         vect_def_type.
23926         (vectorizable_mask_load_store): Update accordingly.
23927         (vectorizable_store): Likewise.
23928         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
23930 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23932         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
23933         IFN_MASK_LOAD calls here rather than...
23934         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
23936 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23937             Alan Hayward  <alan.hayward@arm.com>
23938             David Sherwood  <david.sherwood@arm.com>
23940         * expmed.c (extract_bit_field_1): For vector extracts,
23941         fall back to extract_bit_field_as_subreg if vec_extract
23942         isn't available.
23944 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23945             Alan Hayward  <alan.hayward@arm.com>
23946             David Sherwood  <david.sherwood@arm.com>
23948         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
23949         they are variable or constant sized.
23950         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
23951         slots for constant-sized data.
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         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
23958         handling COND_EXPRs with boolean comparisons, try to find a better
23959         basis for the mask type than the boolean itself.
23961 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23963         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
23964         is calculated and how it can be overridden.
23965         * genmodes.c (max_bitsize_mode_any_mode): New variable.
23966         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
23967         if defined.
23968         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
23969         if nonzero.
23971 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
23972             Alan Hayward  <alan.hayward@arm.com>
23973             David Sherwood  <david.sherwood@arm.com>
23975         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
23976         Remove the mode argument.
23977         (aarch64_simd_valid_immediate): Remove the mode and inverse
23978         arguments.
23979         * config/aarch64/iterators.md (bitsize): New iterator.
23980         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
23981         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
23982         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
23983         aarch64_simd_valid_immediate.
23984         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
23985         (aarch64_reg_or_bic_imm): Likewise.
23986         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
23987         with an insn_type enum and msl with a modifier_type enum.
23988         Replace element_width with a scalar_mode.  Change the shift
23989         to unsigned int.  Add constructors for scalar_float_mode and
23990         scalar_int_mode elements.
23991         (aarch64_vect_float_const_representable_p): Delete.
23992         (aarch64_can_const_movi_rtx_p)
23993         (aarch64_simd_scalar_immediate_valid_for_move)
23994         (aarch64_simd_make_constant): Update call to
23995         aarch64_simd_valid_immediate.
23996         (aarch64_advsimd_valid_immediate_hs): New function.
23997         (aarch64_advsimd_valid_immediate): Likewise.
23998         (aarch64_simd_valid_immediate): Remove mode and inverse
23999         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
24000         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
24001         and aarch64_float_const_representable_p on the result.
24002         (aarch64_output_simd_mov_immediate): Remove mode argument.
24003         Update call to aarch64_simd_valid_immediate and use of
24004         simd_immediate_info.
24005         (aarch64_output_scalar_simd_mov_immediate): Update call
24006         accordingly.
24008 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24009             Alan Hayward  <alan.hayward@arm.com>
24010             David Sherwood  <david.sherwood@arm.com>
24012         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
24013         (mode_nunits): Likewise CONST_MODE_NUNITS.
24014         * machmode.def (ADJUST_NUNITS): Document.
24015         * genmodes.c (mode_data::need_nunits_adj): New field.
24016         (blank_mode): Update accordingly.
24017         (adj_nunits): New variable.
24018         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
24019         parameter.
24020         (emit_mode_size_inline): Set need_bytesize_adj for all modes
24021         listed in adj_nunits.
24022         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
24023         listed in adj_nunits.  Don't emit case statements for such modes.
24024         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
24025         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
24026         nothing if adj_nunits is nonnull.
24027         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
24028         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
24029         (emit_mode_fbit): Update use of print_maybe_const_decl.
24030         (emit_move_size): Likewise.  Treat the array as non-const
24031         if adj_nunits.
24032         (emit_mode_adjustments): Handle adj_nunits.
24034 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24036         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
24037         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
24038         (VECTOR_MODES): Use it.
24039         (make_vector_modes): Take the prefix as an argument.
24041 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24042             Alan Hayward  <alan.hayward@arm.com>
24043             David Sherwood  <david.sherwood@arm.com>
24045         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
24046         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
24047         for MODE_VECTOR_BOOL.
24048         * machmode.def (VECTOR_BOOL_MODE): Document.
24049         * genmodes.c (VECTOR_BOOL_MODE): New macro.
24050         (make_vector_bool_mode): New function.
24051         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
24052         MODE_VECTOR_BOOL.
24053         * lto-streamer-in.c (lto_input_mode_table): Likewise.
24054         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
24055         Likewise.
24056         * stor-layout.c (int_mode_for_mode): Likewise.
24057         * tree.c (build_vector_type_for_mode): Likewise.
24058         * varasm.c (output_constant_pool_2): Likewise.
24059         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
24060         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
24061         for MODE_VECTOR_BOOL.
24062         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
24063         of mode class checks.
24064         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
24065         instead of a list of mode class checks.
24066         (expand_vector_scalar_condition): Likewise.
24067         (type_for_widest_vector_mode): Handle BImode as an inner mode.
24069 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24070             Alan Hayward  <alan.hayward@arm.com>
24071             David Sherwood  <david.sherwood@arm.com>
24073         * machmode.h (mode_size): Change from unsigned short to
24074         poly_uint16_pod.
24075         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
24076         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24077         or if measurement_type is not polynomial.
24078         (fixed_size_mode::includes_p): Check for constant-sized modes.
24079         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
24080         return a poly_uint16 rather than an unsigned short.
24081         (emit_mode_size): Change the type of mode_size from unsigned short
24082         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
24083         (emit_mode_adjustments): Cope with polynomial vector sizes.
24084         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24085         for GET_MODE_SIZE.
24086         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24087         for GET_MODE_SIZE.
24088         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
24089         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
24090         * caller-save.c (setup_save_areas): Likewise.
24091         (replace_reg_with_saved_mem): Likewise.
24092         * calls.c (emit_library_call_value_1): Likewise.
24093         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
24094         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
24095         (gen_lowpart_for_combine): Likewise.
24096         * convert.c (convert_to_integer_1): Likewise.
24097         * cse.c (equiv_constant, cse_insn): Likewise.
24098         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
24099         (cselib_subst_to_values): Likewise.
24100         * dce.c (word_dce_process_block): Likewise.
24101         * df-problems.c (df_word_lr_mark_ref): Likewise.
24102         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
24103         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
24104         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
24105         (rtl_for_decl_location): Likewise.
24106         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
24107         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
24108         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
24109         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
24110         (expand_expr_real_1): Likewise.
24111         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
24112         (pad_below): Likewise.
24113         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24114         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
24115         * ira.c (get_subreg_tracking_sizes): Likewise.
24116         * ira-build.c (ira_create_allocno_objects): Likewise.
24117         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
24118         (ira_sort_regnos_for_alter_reg): Likewise.
24119         * ira-costs.c (record_operand_costs): Likewise.
24120         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
24121         (resolve_simple_move): Likewise.
24122         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
24123         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
24124         (lra_constraints): Likewise.
24125         (CONST_POOL_OK_P): Reject variable-sized modes.
24126         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
24127         (add_pseudo_to_slot, lra_spill): Likewise.
24128         * omp-low.c (omp_clause_aligned_alignment): Likewise.
24129         * optabs-query.c (get_best_extraction_insn): Likewise.
24130         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24131         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
24132         (expand_mult_highpart, valid_multiword_target_p): Likewise.
24133         * recog.c (offsettable_address_addr_space_p): Likewise.
24134         * regcprop.c (maybe_mode_change): Likewise.
24135         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
24136         * regrename.c (build_def_use): Likewise.
24137         * regstat.c (dump_reg_info): Likewise.
24138         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
24139         (find_reloads, find_reloads_subreg_address): Likewise.
24140         * reload1.c (eliminate_regs_1): Likewise.
24141         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
24142         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
24143         (simplify_binary_operation_1, simplify_subreg): Likewise.
24144         * targhooks.c (default_function_arg_padding): Likewise.
24145         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
24146         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
24147         (verify_gimple_assign_ternary): Likewise.
24148         * tree-inline.c (estimate_move_cost): Likewise.
24149         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24150         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
24151         (get_address_cost_ainc): Likewise.
24152         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
24153         (vect_supportable_dr_alignment): Likewise.
24154         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24155         (vectorizable_reduction): Likewise.
24156         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
24157         (vectorizable_operation, vectorizable_load): Likewise.
24158         * tree.c (build_same_sized_truth_vector_type): Likewise.
24159         * valtrack.c (cleanup_auto_inc_dec): Likewise.
24160         * var-tracking.c (emit_note_insn_var_location): Likewise.
24161         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
24162         (ADDR_VEC_ALIGN): Likewise.
24164 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24165             Alan Hayward  <alan.hayward@arm.com>
24166             David Sherwood  <david.sherwood@arm.com>
24168         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
24169         unsigned short.
24170         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
24171         or if measurement_type is polynomial.
24172         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
24173         * combine.c (make_extraction): Likewise.
24174         * dse.c (find_shift_sequence): Likewise.
24175         * dwarf2out.c (mem_loc_descriptor): Likewise.
24176         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
24177         (extract_bit_field, extract_low_bits): Likewise.
24178         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
24179         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
24180         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
24181         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
24182         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
24183         * reload.c (find_reloads): Likewise.
24184         * reload1.c (alter_reg): Likewise.
24185         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
24186         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
24187         * tree-if-conv.c (predicate_mem_writes): Likewise.
24188         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
24189         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
24190         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
24191         * valtrack.c (dead_debug_insert_temp): Likewise.
24192         * varasm.c (mergeable_constant_section): Likewise.
24193         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
24195 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24196             Alan Hayward  <alan.hayward@arm.com>
24197             David Sherwood  <david.sherwood@arm.com>
24199         * expr.c (expand_assignment): Cope with polynomial mode sizes
24200         when assigning to a CONCAT.
24202 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24203             Alan Hayward  <alan.hayward@arm.com>
24204             David Sherwood  <david.sherwood@arm.com>
24206         * machmode.h (mode_precision): Change from unsigned short to
24207         poly_uint16_pod.
24208         (mode_to_precision): Return a poly_uint16 rather than an unsigned
24209         short.
24210         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
24211         or if measurement_type is not polynomial.
24212         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
24213         in which the mode is already known to be a scalar_int_mode.
24214         * genmodes.c (emit_mode_precision): Change the type of mode_precision
24215         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
24216         initializer.
24217         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24218         for GET_MODE_PRECISION.
24219         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24220         for GET_MODE_PRECISION.
24221         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
24222         as polynomial.
24223         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
24224         (expand_field_assignment, make_extraction): Likewise.
24225         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
24226         (get_last_value): Likewise.
24227         * convert.c (convert_to_integer_1): Likewise.
24228         * cse.c (cse_insn): Likewise.
24229         * expr.c (expand_expr_real_1): Likewise.
24230         * lra-constraints.c (simplify_operand_subreg): Likewise.
24231         * optabs-query.c (can_atomic_load_p): Likewise.
24232         * optabs.c (expand_atomic_load): Likewise.
24233         (expand_atomic_store): Likewise.
24234         * ree.c (combine_reaching_defs): Likewise.
24235         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
24236         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
24237         * tree.h (type_has_mode_precision_p): Likewise.
24238         * ubsan.c (instrument_si_overflow): Likewise.
24240 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24241             Alan Hayward  <alan.hayward@arm.com>
24242             David Sherwood  <david.sherwood@arm.com>
24244         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
24245         polynomial numbers of units.
24246         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
24247         (valid_vector_subparts_p): New function.
24248         (build_vector_type): Remove temporary shim and take the number
24249         of units as a poly_uint64 rather than an int.
24250         (build_opaque_vector_type): Take the number of units as a
24251         poly_uint64 rather than an int.
24252         * tree.c (build_vector_from_ctor): Handle polynomial
24253         TYPE_VECTOR_SUBPARTS.
24254         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
24255         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
24256         (build_vector_from_val): If the number of units is variable,
24257         use build_vec_duplicate_cst for constant operands and
24258         VEC_DUPLICATE_EXPR otherwise.
24259         (make_vector_type): Remove temporary is_constant ().
24260         (build_vector_type, build_opaque_vector_type): Take the number of
24261         units as a poly_uint64 rather than an int.
24262         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
24263         VECTOR_CST_NELTS.
24264         * cfgexpand.c (expand_debug_expr): Likewise.
24265         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
24266         (store_constructor, expand_expr_real_1): Likewise.
24267         (const_scalar_mask_from_tree): Likewise.
24268         * fold-const-call.c (fold_const_reduction): Likewise.
24269         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
24270         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
24271         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
24272         (fold_relational_const): Likewise.
24273         (native_interpret_vector): Likewise.  Change the size from an
24274         int to an unsigned int.
24275         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
24276         TYPE_VECTOR_SUBPARTS.
24277         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
24278         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
24279         duplicating a non-constant operand into a variable-length vector.
24280         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
24281         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
24282         * ipa-icf.c (sem_variable::equals): Likewise.
24283         * match.pd: Likewise.
24284         * omp-simd-clone.c (simd_clone_subparts): Likewise.
24285         * print-tree.c (print_node): Likewise.
24286         * stor-layout.c (layout_type): Likewise.
24287         * targhooks.c (default_builtin_vectorization_cost): Likewise.
24288         * tree-cfg.c (verify_gimple_comparison): Likewise.
24289         (verify_gimple_assign_binary): Likewise.
24290         (verify_gimple_assign_ternary): Likewise.
24291         (verify_gimple_assign_single): Likewise.
24292         * tree-pretty-print.c (dump_generic_node): Likewise.
24293         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
24294         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
24295         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
24296         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
24297         (vect_shift_permute_load_chain): Likewise.
24298         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
24299         (expand_vector_condition, optimize_vector_constructor): Likewise.
24300         (lower_vec_perm, get_compute_type): Likewise.
24301         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
24302         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
24303         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
24304         (vect_recog_mask_conversion_pattern): Likewise.
24305         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
24306         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
24307         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
24308         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
24309         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
24310         (vectorizable_shift, vectorizable_operation, vectorizable_store)
24311         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
24312         (supportable_widening_operation): Likewise.
24313         (supportable_narrowing_operation): Likewise.
24314         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
24315         Likewise.
24316         * varasm.c (output_constant): Likewise.
24318 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24319             Alan Hayward  <alan.hayward@arm.com>
24320             David Sherwood  <david.sherwood@arm.com>
24322         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
24323         so that both the length == 3 and length != 3 cases set up their
24324         own permute vectors.  Add comments explaining why we know the
24325         number of elements is constant.
24326         (vect_permute_load_chain): Likewise.
24328 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24329             Alan Hayward  <alan.hayward@arm.com>
24330             David Sherwood  <david.sherwood@arm.com>
24332         * machmode.h (mode_nunits): Change from unsigned char to
24333         poly_uint16_pod.
24334         (ONLY_FIXED_SIZE_MODES): New macro.
24335         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
24336         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
24337         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
24338         New typedefs.
24339         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
24340         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
24341         or if measurement_type is not polynomial.
24342         * genmodes.c (ZERO_COEFFS): New macro.
24343         (emit_mode_nunits_inline): Make mode_nunits_inline return a
24344         poly_uint16.
24345         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
24346         Use ZERO_COEFFS when emitting initializers.
24347         * data-streamer.h (bp_pack_poly_value): New function.
24348         (bp_unpack_poly_value): Likewise.
24349         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
24350         for GET_MODE_NUNITS.
24351         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
24352         for GET_MODE_NUNITS.
24353         * tree.c (make_vector_type): Remove temporary shim and make
24354         the real function take the number of units as a poly_uint64
24355         rather than an int.
24356         (build_vector_type_for_mode): Handle polynomial nunits.
24357         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
24358         * emit-rtl.c (const_vec_series_p_1): Likewise.
24359         (gen_rtx_CONST_VECTOR): Likewise.
24360         * fold-const.c (test_vec_duplicate_folding): Likewise.
24361         * genrecog.c (validate_pattern): Likewise.
24362         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
24363         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
24364         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
24365         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
24366         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
24367         * rtlanal.c (subreg_get_info): Likewise.
24368         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
24369         (vect_grouped_load_supported): Likewise.
24370         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
24371         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
24372         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
24373         (simplify_const_unary_operation, simplify_binary_operation_1)
24374         (simplify_const_binary_operation, simplify_ternary_operation)
24375         (test_vector_ops_duplicate, test_vector_ops): Likewise.
24376         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
24377         instead of CONST_VECTOR_NUNITS.
24378         * varasm.c (output_constant_pool_2): Likewise.
24379         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
24380         explicit-encoded elements in the XVEC for variable-length vectors.
24382 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24384         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
24386 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24387             Alan Hayward  <alan.hayward@arm.com>
24388             David Sherwood  <david.sherwood@arm.com>
24390         * coretypes.h (fixed_size_mode): Declare.
24391         (fixed_size_mode_pod): New typedef.
24392         * builtins.h (target_builtins::x_apply_args_mode)
24393         (target_builtins::x_apply_result_mode): Change type to
24394         fixed_size_mode_pod.
24395         * builtins.c (apply_args_size, apply_result_size, result_vector)
24396         (expand_builtin_apply_args_1, expand_builtin_apply)
24397         (expand_builtin_return): Update accordingly.
24399 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24401         * cse.c (hash_rtx_cb): Hash only the encoded elements.
24402         * cselib.c (cselib_hash_rtx): Likewise.
24403         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
24404         CONST_VECTOR encoding.
24406 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
24407             Jeff Law  <law@redhat.com>
24409         PR target/83641
24410         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
24411         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
24412         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
24413         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
24415         PR target/83641
24416         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
24417         explicitly probe *sp in a noreturn function if there were any callee
24418         register saves or frame pointer is needed.
24420 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
24422         PR debug/83621
24423         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
24424         BLKmode for ternary, binary or unary expressions.
24426         PR debug/83645
24427         * var-tracking.c (delete_vta_debug_insn): New inline function.
24428         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
24429         insns from get_insns () to NULL instead of each bb separately.
24430         Use delete_vta_debug_insn.  No longer static.
24431         (vt_debug_insns_local, variable_tracking_main_1): Adjust
24432         delete_vta_debug_insns callers.
24433         * rtl.h (delete_vta_debug_insns): Declare.
24434         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
24435         instead of variable_tracking_main.
24437 2018-01-03  Martin Sebor  <msebor@redhat.com>
24439         PR tree-optimization/83603
24440         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
24441         arguments past the endof the argument list in functions declared
24442         without a prototype.
24443         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
24444         Avoid checking when arguments are null.
24446 2018-01-03  Martin Sebor  <msebor@redhat.com>
24448         PR c/83559
24449         * doc/extend.texi (attribute const): Fix a typo.
24450         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
24451         issuing -Wsuggest-attribute for void functions.
24453 2018-01-03  Martin Sebor  <msebor@redhat.com>
24455         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
24456         offset_int::from instead of wide_int::to_shwi.
24457         (maybe_diag_overlap): Remove assertion.
24458         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
24459         * gimple-ssa-sprintf.c (format_directive): Same.
24460         (parse_directive): Same.
24461         (sprintf_dom_walker::compute_format_length): Same.
24462         (try_substitute_return_value): Same.
24464 2018-01-03  Jeff Law  <law@redhat.com>
24466         PR middle-end/83654
24467         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
24468         non-constant residual for zero at runtime and avoid probing in
24469         that case.  Reorganize code for trailing problem to mirror handling
24470         of the residual.
24472 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
24474         PR tree-optimization/83501
24475         * tree-ssa-strlen.c (get_string_cst): New.
24476         (handle_char_store): Call get_string_cst.
24478 2018-01-03  Martin Liska  <mliska@suse.cz>
24480         PR tree-optimization/83593
24481         * tree-ssa-strlen.c: Include tree-cfg.h.
24482         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
24483         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
24484         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
24485         to false.
24486         (strlen_dom_walker::before_dom_children): Call
24487         gimple_purge_dead_eh_edges. Dump tranformation with details
24488         dump flags.
24489         (strlen_dom_walker::before_dom_children): Update call by adding
24490         new argument cleanup_eh.
24491         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
24493 2018-01-03  Martin Liska  <mliska@suse.cz>
24495         PR ipa/83549
24496         * cif-code.def (VARIADIC_THUNK): New enum value.
24497         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
24498         thunks.
24500 2018-01-03  Jan Beulich  <jbeulich@suse.com>
24502         * sse.md (mov<mode>_internal): Tighten condition for when to use
24503         vmovdqu<ssescalarsize> for TI and OI modes.
24505 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
24507         Update copyright years.
24509 2018-01-03  Martin Liska  <mliska@suse.cz>
24511         PR ipa/83594
24512         * ipa-visibility.c (function_and_variable_visibility): Skip
24513         functions with noipa attribure.
24515 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
24517         * gcc.c (process_command): Update copyright notice dates.
24518         * gcov-dump.c (print_version): Ditto.
24519         * gcov.c (print_version): Ditto.
24520         * gcov-tool.c (print_version): Ditto.
24521         * gengtype.c (create_file): Ditto.
24522         * doc/cpp.texi: Bump @copying's copyright year.
24523         * doc/cppinternals.texi: Ditto.
24524         * doc/gcc.texi: Ditto.
24525         * doc/gccint.texi: Ditto.
24526         * doc/gcov.texi: Ditto.
24527         * doc/install.texi: Ditto.
24528         * doc/invoke.texi: Ditto.
24530 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24532         * vector-builder.h (vector_builder::m_full_nelts): Change from
24533         unsigned int to poly_uint64.
24534         (vector_builder::full_nelts): Update prototype accordingly.
24535         (vector_builder::new_vector): Likewise.
24536         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
24537         (vector_builder::operator ==): Likewise.
24538         (vector_builder::finalize): Likewise.
24539         * int-vector-builder.h (int_vector_builder::int_vector_builder):
24540         Take the number of elements as a poly_uint64 rather than an
24541         unsigned int.
24542         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
24543         from unsigned int to poly_uint64.
24544         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
24545         (vec_perm_indices::new_vector): Likewise.
24546         (vec_perm_indices::length): Likewise.
24547         (vec_perm_indices::nelts_per_input): Likewise.
24548         (vec_perm_indices::input_nelts): Likewise.
24549         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
24550         number of elements per input as a poly_uint64 rather than an
24551         unsigned int.  Use the original encoding for variable-length
24552         vectors, rather than clamping each individual element.
24553         For the second and subsequent elements in each pattern,
24554         clamp the step and base before clamping their sum.
24555         (vec_perm_indices::series_p): Handle polynomial element counts.
24556         (vec_perm_indices::all_in_range_p): Likewise.
24557         (vec_perm_indices_to_tree): Likewise.
24558         (vec_perm_indices_to_rtx): Likewise.
24559         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
24560         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
24561         (tree_vector_builder::new_binary_operation): Handle polynomial
24562         element counts.  Return false if we need to know the number
24563         of elements at compile time.
24564         * fold-const.c (fold_vec_perm): Punt if the number of elements
24565         isn't known at compile time.
24567 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24569         * vec-perm-indices.h (vec_perm_builder): Change element type
24570         from HOST_WIDE_INT to poly_int64.
24571         (vec_perm_indices::element_type): Update accordingly.
24572         (vec_perm_indices::clamp): Handle polynomial element_types.
24573         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
24574         (vec_perm_indices::all_in_range_p): Likewise.
24575         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
24576         than shwi trees.
24577         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
24578         polynomial vec_perm_indices element types.
24579         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
24580         * fold-const.c (fold_vec_perm): Likewise.
24581         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
24582         * tree-vect-generic.c (lower_vec_perm): Likewise.
24583         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
24584         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
24585         element type to HOST_WIDE_INT.
24587 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24588             Alan Hayward  <alan.hayward@arm.com>
24589             David Sherwood  <david.sherwood@arm.com>
24591         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
24592         rather than an int.  Use plus_constant.
24593         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
24594         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
24596 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24597             Alan Hayward  <alan.hayward@arm.com>
24598             David Sherwood  <david.sherwood@arm.com>
24600         * calls.c (emit_call_1, expand_call): Change struct_value_size from
24601         a HOST_WIDE_INT to a poly_int64.
24603 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24604             Alan Hayward  <alan.hayward@arm.com>
24605             David Sherwood  <david.sherwood@arm.com>
24607         * calls.c (load_register_parameters): Cope with polynomial
24608         mode sizes.  Require a constant size for BLKmode parameters
24609         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
24610         forces a parameter to be padded at the lsb end in order to
24611         fill a complete number of words, require the parameter size
24612         to be ordered wrt UNITS_PER_WORD.
24614 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24615             Alan Hayward  <alan.hayward@arm.com>
24616             David Sherwood  <david.sherwood@arm.com>
24618         * reload1.c (spill_stack_slot_width): Change element type
24619         from unsigned int to poly_uint64_pod.
24620         (alter_reg): Treat mode sizes as polynomial.
24622 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24623             Alan Hayward  <alan.hayward@arm.com>
24624             David Sherwood  <david.sherwood@arm.com>
24626         * reload.c (complex_word_subreg_p): New function.
24627         (reload_inner_reg_of_subreg, push_reload): Use it.
24629 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24630             Alan Hayward  <alan.hayward@arm.com>
24631             David Sherwood  <david.sherwood@arm.com>
24633         * lra-constraints.c (process_alt_operands): Reject matched
24634         operands whose sizes aren't ordered.
24635         (match_reload): Refer to this check here.
24637 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24638             Alan Hayward  <alan.hayward@arm.com>
24639             David Sherwood  <david.sherwood@arm.com>
24641         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
24642         that the mode size is in the set {1, 2, 4, 8, 16}.
24644 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24645             Alan Hayward  <alan.hayward@arm.com>
24646             David Sherwood  <david.sherwood@arm.com>
24648         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
24649         Use plus_constant instead of gen_rtx_PLUS.
24651 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24652             Alan Hayward  <alan.hayward@arm.com>
24653             David Sherwood  <david.sherwood@arm.com>
24655         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
24656         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
24657         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
24658         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
24659         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
24660         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
24661         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
24662         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
24663         * config/i386/i386.c (ix86_push_rounding): ...this new function.
24664         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
24665         a poly_int64.
24666         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
24667         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
24668         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
24669         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
24670         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
24671         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
24672         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
24673         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
24674         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
24675         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
24676         function.
24677         * expr.c (emit_move_resolve_push): Treat the input and result
24678         of PUSH_ROUNDING as a poly_int64.
24679         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
24680         (emit_push_insn): Likewise.
24681         * lra-eliminations.c (mark_not_eliminable): Likewise.
24682         * recog.c (push_operand): Likewise.
24683         * reload1.c (elimination_effects): Likewise.
24684         * rtlanal.c (nonzero_bits1): Likewise.
24685         * calls.c (store_one_arg): Likewise.  Require the padding to be
24686         known at compile time.
24688 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24689             Alan Hayward  <alan.hayward@arm.com>
24690             David Sherwood  <david.sherwood@arm.com>
24692         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
24693         Use plus_constant instead of gen_rtx_PLUS.
24695 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24696             Alan Hayward  <alan.hayward@arm.com>
24697             David Sherwood  <david.sherwood@arm.com>
24699         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
24700         rather than an int.
24702 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24703             Alan Hayward  <alan.hayward@arm.com>
24704             David Sherwood  <david.sherwood@arm.com>
24706         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
24707         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
24708         via stack temporaries.  Treat the mode size as polynomial too.
24710 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24711             Alan Hayward  <alan.hayward@arm.com>
24712             David Sherwood  <david.sherwood@arm.com>
24714         * expr.c (expand_expr_real_2): When handling conversions involving
24715         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
24716         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
24717         as a poly_uint64 too.
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         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
24725 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24726             Alan Hayward  <alan.hayward@arm.com>
24727             David Sherwood  <david.sherwood@arm.com>
24729         * combine.c (can_change_dest_mode): Handle polynomial
24730         REGMODE_NATURAL_SIZE.
24731         * expmed.c (store_bit_field_1): Likewise.
24732         * expr.c (store_constructor): Likewise.
24733         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
24734         and polynomial REGMODE_NATURAL_SIZE.
24735         (gen_lowpart_common): Likewise.
24736         * reginfo.c (record_subregs_of_mode): Likewise.
24737         * rtlanal.c (read_modify_subreg_p): Likewise.
24739 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24740             Alan Hayward  <alan.hayward@arm.com>
24741             David Sherwood  <david.sherwood@arm.com>
24743         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
24744         numbers of elements.
24746 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24747             Alan Hayward  <alan.hayward@arm.com>
24748             David Sherwood  <david.sherwood@arm.com>
24750         * match.pd: Cope with polynomial numbers of vector elements.
24752 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24753             Alan Hayward  <alan.hayward@arm.com>
24754             David Sherwood  <david.sherwood@arm.com>
24756         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
24757         in a POINTER_PLUS_EXPR.
24759 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24760             Alan Hayward  <alan.hayward@arm.com>
24761             David Sherwood  <david.sherwood@arm.com>
24763         * omp-simd-clone.c (simd_clone_subparts): New function.
24764         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
24765         (ipa_simd_modify_function_body): Likewise.
24767 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24768             Alan Hayward  <alan.hayward@arm.com>
24769             David Sherwood  <david.sherwood@arm.com>
24771         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
24772         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
24773         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
24774         (expand_vector_condition, vector_element): Likewise.
24775         (subparts_gt): New function.
24776         (get_compute_type): Use subparts_gt.
24777         (count_type_subparts): Delete.
24778         (expand_vector_operations_1): Use subparts_gt instead of
24779         count_type_subparts.
24781 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24782             Alan Hayward  <alan.hayward@arm.com>
24783             David Sherwood  <david.sherwood@arm.com>
24785         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
24786         (vect_compile_time_alias): ...this new function.  Do the calculation
24787         on poly_ints rather than trees.
24788         (vect_prune_runtime_alias_test_list): Update call accordingly.
24790 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24791             Alan Hayward  <alan.hayward@arm.com>
24792             David Sherwood  <david.sherwood@arm.com>
24794         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
24795         numbers of units.
24796         (vect_schedule_slp_instance): Likewise.
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-slp.c (vect_get_and_check_slp_defs): Reject
24803         constant and extern definitions for variable-length vectors.
24804         (vect_get_constant_vectors): Note that the number of units
24805         is known to be constant.
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-stmts.c (vectorizable_conversion): Treat the number
24812         of units as polynomial.  Choose between WIDE and NARROW based
24813         on multiple_p.
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-stmts.c (simd_clone_subparts): New function.
24820         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
24822 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24823             Alan Hayward  <alan.hayward@arm.com>
24824             David Sherwood  <david.sherwood@arm.com>
24826         * tree-vect-stmts.c (vectorizable_call): Treat the number of
24827         vectors as polynomial.  Use build_index_vector for
24828         IFN_GOMP_SIMD_LANE.
24830 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24831             Alan Hayward  <alan.hayward@arm.com>
24832             David Sherwood  <david.sherwood@arm.com>
24834         * tree-vect-stmts.c (get_load_store_type): Treat the number of
24835         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
24836         for variable-length vectors.
24837         (vectorizable_mask_load_store): Treat the number of units as
24838         polynomial, asserting that it is constant if the condition has
24839         already been enforced.
24840         (vectorizable_store, vectorizable_load): Likewise.
24842 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24843             Alan Hayward  <alan.hayward@arm.com>
24844             David Sherwood  <david.sherwood@arm.com>
24846         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
24847         of units as polynomial.  Punt if we can't tell at compile time
24848         which vector contains the final result.
24850 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24851             Alan Hayward  <alan.hayward@arm.com>
24852             David Sherwood  <david.sherwood@arm.com>
24854         * tree-vect-loop.c (vectorizable_induction): Treat the number
24855         of units as polynomial.  Punt on SLP inductions.  Use an integer
24856         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
24857         cast of such a series for variable-length floating-point
24858         reductions.
24860 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24861             Alan Hayward  <alan.hayward@arm.com>
24862             David Sherwood  <david.sherwood@arm.com>
24864         * tree.h (build_index_vector): Declare.
24865         * tree.c (build_index_vector): New function.
24866         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
24867         of units as polynomial, forcibly converting it to a constant if
24868         vectorizable_reduction has already enforced the condition.
24869         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
24870         to create a {1,2,3,...} vector.
24871         (vectorizable_reduction): Treat the number of units as polynomial.
24872         Choose vectype_in based on the largest scalar element size rather
24873         than the smallest number of units.  Enforce the restrictions
24874         relied on above.
24876 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24877             Alan Hayward  <alan.hayward@arm.com>
24878             David Sherwood  <david.sherwood@arm.com>
24880         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
24881         number of units as polynomial.
24883 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24884             Alan Hayward  <alan.hayward@arm.com>
24885             David Sherwood  <david.sherwood@arm.com>
24887         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
24888         * target.def (autovectorize_vector_sizes): Return the vector sizes
24889         by pointer, using vector_sizes rather than a bitmask.
24890         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
24891         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
24892         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
24893         Likewise.
24894         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
24895         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
24896         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
24897         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
24898         * omp-general.c (omp_max_vf): Likewise.
24899         * omp-low.c (omp_clause_aligned_alignment): Likewise.
24900         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
24901         * tree-vect-loop.c (vect_analyze_loop): Likewise.
24902         * tree-vect-slp.c (vect_slp_bb): Likewise.
24903         * doc/tm.texi: Regenerate.
24904         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
24905         to a poly_uint64.
24906         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
24907         the vector size as a poly_uint64 rather than an unsigned int.
24908         (current_vector_size): Change from an unsigned int to a poly_uint64.
24909         (get_vectype_for_scalar_type): Update accordingly.
24910         * tree.h (build_truth_vector_type): Take the size and number of
24911         units as a poly_uint64 rather than an unsigned int.
24912         (build_vector_type): Add a temporary overload that takes
24913         the number of units as a poly_uint64 rather than an unsigned int.
24914         * tree.c (make_vector_type): Likewise.
24915         (build_truth_vector_type): Take the number of units as a poly_uint64
24916         rather than an unsigned int.
24918 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24919             Alan Hayward  <alan.hayward@arm.com>
24920             David Sherwood  <david.sherwood@arm.com>
24922         * target.def (get_mask_mode): Take the number of units and length
24923         as poly_uint64s rather than unsigned ints.
24924         * targhooks.h (default_get_mask_mode): Update accordingly.
24925         * targhooks.c (default_get_mask_mode): Likewise.
24926         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
24927         * doc/tm.texi: Regenerate.
24929 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24930             Alan Hayward  <alan.hayward@arm.com>
24931             David Sherwood  <david.sherwood@arm.com>
24933         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
24934         * omp-general.c (omp_max_vf): Likewise.
24935         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
24936         (expand_omp_simd): Handle polynomial safelen.
24937         * omp-low.c (omplow_simd_context): Add a default constructor.
24938         (omplow_simd_context::max_vf): Change from int to poly_uint64.
24939         (lower_rec_simd_input_clauses): Update accordingly.
24940         (lower_rec_input_clauses): Likewise.
24942 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24943             Alan Hayward  <alan.hayward@arm.com>
24944             David Sherwood  <david.sherwood@arm.com>
24946         * tree-vectorizer.h (vect_nunits_for_cost): New function.
24947         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
24948         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
24949         (vect_analyze_slp_cost): Likewise.
24950         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
24951         (vect_model_load_cost): Likewise.
24953 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24954             Alan Hayward  <alan.hayward@arm.com>
24955             David Sherwood  <david.sherwood@arm.com>
24957         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
24958         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
24959         from an unsigned int * to a poly_uint64_pod *.
24960         (calculate_unrolling_factor): New function.
24961         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
24963 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
24964             Alan Hayward  <alan.hayward@arm.com>
24965             David Sherwood  <david.sherwood@arm.com>
24967         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
24968         from an unsigned int to a poly_uint64.
24969         (_loop_vec_info::slp_unrolling_factor): Likewise.
24970         (_loop_vec_info::vectorization_factor): Change from an int
24971         to a poly_uint64.
24972         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
24973         (vect_get_num_vectors): New function.
24974         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
24975         (vect_get_num_copies): Use vect_get_num_vectors.
24976         (vect_analyze_data_ref_dependences): Change max_vf from an int *
24977         to an unsigned int *.
24978         (vect_analyze_data_refs): Change min_vf from an int * to a
24979         poly_uint64 *.
24980         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
24981         than an unsigned HOST_WIDE_INT.
24982         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
24983         (vect_analyze_data_ref_dependence): Change max_vf from an int *
24984         to an unsigned int *.
24985         (vect_analyze_data_ref_dependences): Likewise.
24986         (vect_compute_data_ref_alignment): Handle polynomial vf.
24987         (vect_enhance_data_refs_alignment): Likewise.
24988         (vect_prune_runtime_alias_test_list): Likewise.
24989         (vect_shift_permute_load_chain): Likewise.
24990         (vect_supportable_dr_alignment): Likewise.
24991         (dependence_distance_ge_vf): Take the vectorization factor as a
24992         poly_uint64 rather than an unsigned HOST_WIDE_INT.
24993         (vect_analyze_data_refs): Change min_vf from an int * to a
24994         poly_uint64 *.
24995         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
24996         vfm1 as a poly_uint64 rather than an int.  Make the same change
24997         for the returned bound_scalar.
24998         (vect_gen_vector_loop_niters): Handle polynomial vf.
24999         (vect_do_peeling): Likewise.  Update call to
25000         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
25001         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
25002         be constant.
25003         * tree-vect-loop.c (vect_determine_vectorization_factor)
25004         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
25005         (vect_get_known_peeling_cost): Likewise.
25006         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
25007         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
25008         (vect_transform_loop): Likewise.  Use the lowest possible VF when
25009         updating the upper bounds of the loop.
25010         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
25011         rather than an int.
25012         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
25013         polynomial unroll factors.
25014         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
25015         (vect_make_slp_decision): Likewise.
25016         (vect_supported_load_permutation_p): Likewise, and polynomial
25017         vf too.
25018         (vect_analyze_slp_cost): Handle polynomial vf.
25019         (vect_slp_analyze_node_operations): Likewise.
25020         (vect_slp_analyze_bb_1): Likewise.
25021         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
25022         than an unsigned HOST_WIDE_INT.
25023         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
25024         (vectorizable_load): Handle polynomial vf.
25025         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
25026         a poly_uint64.
25027         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
25029 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25030             Alan Hayward  <alan.hayward@arm.com>
25031             David Sherwood  <david.sherwood@arm.com>
25033         * match.pd: Handle bit operations involving three constants
25034         and try to fold one pair.
25036 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
25038         * tree-vect-loop-manip.c: Include gimple-fold.h.
25039         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
25040         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
25041         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
25042         Add a path that uses a step of VF instead of 1, but disable it
25043         for now.
25044         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
25045         and niters_no_overflow parameters.  Update calls to
25046         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
25047         Create a new SSA name if the latter choses to use a ste other
25048         than zero, and return it via niters_vector_mult_vf_var.
25049         * tree-vect-loop.c (vect_transform_loop): Update calls to
25050         vect_do_peeling, vect_gen_vector_loop_niters and
25051         slpeel_make_loop_iterate_ntimes.
25052         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
25053         (vect_gen_vector_loop_niters): Update declarations after above changes.
25055 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
25057         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
25058         128-bit round to integer instructions.
25059         (ceil<mode>2): Likewise.
25060         (btrunc<mode>2): Likewise.
25061         (round<mode>2): Likewise.
25063 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
25065         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
25066         unaligned VSX load/store on P8/P9.
25067         (expand_block_clear): Allow the use of unaligned VSX
25068         load/store on P8/P9.
25070 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25072         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
25073         New function.
25074         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
25075         swap associated with both a load and a store.
25077 2018-01-02  Andrew Waterman  <andrew@sifive.com>
25079         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
25080         * config/riscv/riscv.md (clear_cache): Use it.
25082 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
25084         * web.c: Remove out-of-date comment.
25086 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25088         * expr.c (fixup_args_size_notes): Check that any existing
25089         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
25090         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
25091         (emit_single_push_insn): ...here.
25093 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25095         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
25096         (const_vector_encoded_nelts): New function.
25097         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
25098         (const_vector_int_elt, const_vector_elt): Declare.
25099         * emit-rtl.c (const_vector_int_elt_1): New function.
25100         (const_vector_elt): Likewise.
25101         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
25102         of CONST_VECTOR_ELT.
25104 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25106         * expr.c: Include rtx-vector-builder.h.
25107         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
25108         directly on the tree encoding.
25109         (const_vector_from_tree): Likewise.
25110         * optabs.c: Include rtx-vector-builder.h.
25111         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
25112         sequence of "u" values.
25113         * vec-perm-indices.c: Include rtx-vector-builder.h.
25114         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
25115         directly on the vec_perm_indices encoding.
25117 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25119         * doc/rtl.texi (const_vector): Describe new encoding scheme.
25120         * Makefile.in (OBJS): Add rtx-vector-builder.o.
25121         * rtx-vector-builder.h: New file.
25122         * rtx-vector-builder.c: Likewise.
25123         * rtl.h (rtx_def::u2): Add a const_vector field.
25124         (CONST_VECTOR_NPATTERNS): New macro.
25125         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
25126         (CONST_VECTOR_DUPLICATE_P): Likewise.
25127         (CONST_VECTOR_STEPPED_P): Likewise.
25128         (CONST_VECTOR_ENCODED_ELT): Likewise.
25129         (const_vec_duplicate_p): Check for a duplicated vector encoding.
25130         (unwrap_const_vec_duplicate): Likewise.
25131         (const_vec_series_p): Check for a non-duplicated vector encoding.
25132         Say that the function only returns true for integer vectors.
25133         * emit-rtl.c: Include rtx-vector-builder.h.
25134         (gen_const_vec_duplicate_1): Delete.
25135         (gen_const_vector): Call gen_const_vec_duplicate instead of
25136         gen_const_vec_duplicate_1.
25137         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
25138         (gen_const_vec_duplicate): Use rtx_vector_builder.
25139         (gen_const_vec_series): Likewise.
25140         (gen_rtx_CONST_VECTOR): Likewise.
25141         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
25142         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25143         Build a new vector rather than modifying a CONST_VECTOR in-place.
25144         (handle_special_swappables): Update call accordingly.
25145         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
25146         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
25147         Build a new vector rather than modifying a CONST_VECTOR in-place.
25148         (handle_special_swappables): Update call accordingly.
25150 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25152         * simplify-rtx.c (simplify_const_binary_operation): Use
25153         CONST_VECTOR_ELT instead of XVECEXP.
25155 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25157         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
25158         the selector elements to be different from the data elements
25159         if the selector is a VECTOR_CST.
25160         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
25161         ssizetype for the selector.
25163 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25165         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
25166         before testing each element individually.
25167         * tree-vect-generic.c (lower_vec_perm): Likewise.
25169 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25171         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
25172         * selftest-run-tests.c (selftest::run_tests): Call it.
25173         * vector-builder.h (vector_builder::operator ==): New function.
25174         (vector_builder::operator !=): Likewise.
25175         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
25176         (vec_perm_indices::all_from_input_p): New function.
25177         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
25178         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
25179         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
25180         instead of reading the VECTOR_CST directly.  Detect whether both
25181         vector inputs are the same before constructing the vec_perm_indices,
25182         and update the number of inputs argument accordingly.  Use the
25183         utility functions added above.  Only construct sel2 if we need to.
25185 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25187         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
25188         the broadcast of the low byte.
25189         (expand_mult_highpart): Use an explicit encoding for the permutes.
25190         * optabs-query.c (can_mult_highpart_p): Likewise.
25191         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
25192         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25193         (vectorizable_bswap): Likewise.
25194         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
25195         explicit encoding for the power-of-2 permutes.
25196         (vect_permute_store_chain): Likewise.
25197         (vect_grouped_load_supported): Likewise.
25198         (vect_permute_load_chain): Likewise.
25200 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25202         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
25203         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
25204         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
25205         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
25206         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
25207         (vect_gen_perm_mask_any): Likewise.
25209 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25211         * int-vector-builder.h: New file.
25212         * vec-perm-indices.h: Include int-vector-builder.h.
25213         (vec_perm_indices): Redefine as an int_vector_builder.
25214         (auto_vec_perm_indices): Delete.
25215         (vec_perm_builder): Redefine as a stand-alone class.
25216         (vec_perm_indices::vec_perm_indices): New function.
25217         (vec_perm_indices::clamp): Likewise.
25218         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
25219         (vec_perm_indices::new_vector): New function.
25220         (vec_perm_indices::new_expanded_vector): Update for new
25221         vec_perm_indices class.
25222         (vec_perm_indices::rotate_inputs): New function.
25223         (vec_perm_indices::all_in_range_p): Operate directly on the
25224         encoded form, without computing elided elements.
25225         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
25226         encoding.  Update for new vec_perm_indices class.
25227         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
25228         the given vec_perm_builder.
25229         (expand_vec_perm_var): Update vec_perm_builder constructor.
25230         (expand_mult_highpart): Use vec_perm_builder instead of
25231         auto_vec_perm_indices.
25232         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
25233         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
25234         or double series encoding as appropriate.
25235         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
25236         vec_perm_indices instead of auto_vec_perm_indices.
25237         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25238         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25239         (vect_permute_store_chain): Likewise.
25240         (vect_grouped_load_supported): Likewise.
25241         (vect_permute_load_chain): Likewise.
25242         (vect_shift_permute_load_chain): Likewise.
25243         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25244         (vect_transform_slp_perm_load): Likewise.
25245         (vect_schedule_slp_instance): Likewise.
25246         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25247         (vectorizable_mask_load_store): Likewise.
25248         (vectorizable_bswap): Likewise.
25249         (vectorizable_store): Likewise.
25250         (vectorizable_load): Likewise.
25251         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
25252         vec_perm_indices instead of auto_vec_perm_indices.  Use
25253         tree_to_vec_perm_builder to read the vector from a tree.
25254         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
25255         vec_perm_builder instead of a vec_perm_indices.
25256         (have_whole_vector_shift): Use vec_perm_builder and
25257         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
25258         truncation to calc_vec_perm_mask_for_shift.
25259         (vect_create_epilog_for_reduction): Likewise.
25260         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
25261         from auto_vec_perm_indices to vec_perm_indices.
25262         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25263         instead of changing individual elements.
25264         (aarch64_vectorize_vec_perm_const): Use new_vector to install
25265         the vector in d.perm.
25266         * config/arm/arm.c (expand_vec_perm_d::perm): Change
25267         from auto_vec_perm_indices to vec_perm_indices.
25268         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
25269         instead of changing individual elements.
25270         (arm_vectorize_vec_perm_const): Use new_vector to install
25271         the vector in d.perm.
25272         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
25273         Update vec_perm_builder constructor.
25274         (rs6000_expand_interleave): Likewise.
25275         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
25276         (rs6000_expand_interleave): Likewise.
25278 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25280         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
25281         to qimode could truncate the indices.
25282         * optabs.c (expand_vec_perm_var): Likewise.
25284 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25286         * Makefile.in (OBJS): Add vec-perm-indices.o.
25287         * vec-perm-indices.h: New file.
25288         * vec-perm-indices.c: Likewise.
25289         * target.h (vec_perm_indices): Replace with a forward class
25290         declaration.
25291         (auto_vec_perm_indices): Move to vec-perm-indices.h.
25292         * optabs.h: Include vec-perm-indices.h.
25293         (expand_vec_perm): Delete.
25294         (selector_fits_mode_p, expand_vec_perm_var): Declare.
25295         (expand_vec_perm_const): Declare.
25296         * target.def (vec_perm_const_ok): Replace with...
25297         (vec_perm_const): ...this new hook.
25298         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
25299         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
25300         * doc/tm.texi: Regenerate.
25301         * optabs.def (vec_perm_const): Delete.
25302         * doc/md.texi (vec_perm_const): Likewise.
25303         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
25304         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
25305         expand_vec_perm for constant permutation vectors.  Assert that
25306         the mode of variable permutation vectors is the integer equivalent
25307         of the mode that is being permuted.
25308         * optabs-query.h (selector_fits_mode_p): Declare.
25309         * optabs-query.c: Include vec-perm-indices.h.
25310         (selector_fits_mode_p): New function.
25311         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
25312         is defined, instead of checking whether the vec_perm_const_optab
25313         exists.  Use targetm.vectorize.vec_perm_const instead of
25314         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
25315         fit in the vector mode before using a variable permute.
25316         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
25317         vec_perm_indices instead of an rtx.
25318         (expand_vec_perm): Replace with...
25319         (expand_vec_perm_const): ...this new function.  Take the selector
25320         as a vec_perm_indices rather than an rtx.  Also take the mode of
25321         the selector.  Update call to shift_amt_for_vec_perm_mask.
25322         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
25323         Use vec_perm_indices::new_expanded_vector to expand the original
25324         selector into bytes.  Check whether the indices fit in the vector
25325         mode before using a variable permute.
25326         (expand_vec_perm_var): Make global.
25327         (expand_mult_highpart): Use expand_vec_perm_const.
25328         * fold-const.c: Includes vec-perm-indices.h.
25329         * tree-ssa-forwprop.c: Likewise.
25330         * tree-vect-data-refs.c: Likewise.
25331         * tree-vect-generic.c: Likewise.
25332         * tree-vect-loop.c: Likewise.
25333         * tree-vect-slp.c: Likewise.
25334         * tree-vect-stmts.c: Likewise.
25335         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
25336         Delete.
25337         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
25338         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
25339         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
25340         (aarch64_vectorize_vec_perm_const): ...this new function.
25341         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25342         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25343         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
25344         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
25345         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25346         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25347         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
25348         into...
25349         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
25350         check for NEON modes.
25351         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
25352         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
25353         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
25354         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
25355         into...
25356         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
25357         the old VEC_PERM_CONST conditions.
25358         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
25359         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
25360         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
25361         (ia64_vectorize_vec_perm_const_ok): Merge into...
25362         (ia64_vectorize_vec_perm_const): ...this new function.
25363         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
25364         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
25365         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
25366         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
25367         * config/mips/mips.c (mips_expand_vec_perm_const)
25368         (mips_vectorize_vec_perm_const_ok): Merge into...
25369         (mips_vectorize_vec_perm_const): ...this new function.
25370         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
25371         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
25372         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
25373         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
25374         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
25375         (rs6000_expand_vec_perm_const): Delete.
25376         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
25377         Delete.
25378         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25379         (altivec_expand_vec_perm_const_le): Take each operand individually.
25380         Operate on constant selectors rather than rtxes.
25381         (altivec_expand_vec_perm_const): Likewise.  Update call to
25382         altivec_expand_vec_perm_const_le.
25383         (rs6000_expand_vec_perm_const): Delete.
25384         (rs6000_vectorize_vec_perm_const_ok): Delete.
25385         (rs6000_vectorize_vec_perm_const): New function.
25386         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25387         an element count and rtx array.
25388         (rs6000_expand_extract_even): Update call accordingly.
25389         (rs6000_expand_interleave): Likewise.
25390         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
25391         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
25392         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
25393         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
25394         (rs6000_expand_vec_perm_const): Delete.
25395         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
25396         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25397         (altivec_expand_vec_perm_const_le): Take each operand individually.
25398         Operate on constant selectors rather than rtxes.
25399         (altivec_expand_vec_perm_const): Likewise.  Update call to
25400         altivec_expand_vec_perm_const_le.
25401         (rs6000_expand_vec_perm_const): Delete.
25402         (rs6000_vectorize_vec_perm_const_ok): Delete.
25403         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
25404         reference to the SPE evmerge intructions.
25405         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
25406         an element count and rtx array.
25407         (rs6000_expand_extract_even): Update call accordingly.
25408         (rs6000_expand_interleave): Likewise.
25409         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
25410         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
25411         new function.
25412         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
25414 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25416         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
25417         vector mode and that that mode matches the mode of the data
25418         being permuted.
25419         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
25420         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
25421         directly using expand_vec_perm_1 when forcing selectors into
25422         registers.
25423         (expand_vec_perm_var): New function, split out from expand_vec_perm.
25425 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25427         * optabs-query.h (can_vec_perm_p): Delete.
25428         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
25429         * optabs-query.c (can_vec_perm_p): Split into...
25430         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
25431         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
25432         particular selector is valid.
25433         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
25434         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
25435         (vect_grouped_load_supported): Likewise.
25436         (vect_shift_permute_load_chain): Likewise.
25437         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
25438         (vect_transform_slp_perm_load): Likewise.
25439         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
25440         (vectorizable_bswap): Likewise.
25441         (vect_gen_perm_mask_checked): Likewise.
25442         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
25443         implementations of variable permutation vectors into account
25444         when deciding which selector to use.
25445         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
25446         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
25447         with a false third argument.
25448         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
25449         to test whether the constant selector is valid and can_vec_perm_var_p
25450         to test whether a variable selector is valid.
25452 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25454         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
25455         * optabs-query.c (can_vec_perm_p): Likewise.
25456         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
25457         instead of vec_perm_indices.
25458         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
25459         (vect_gen_perm_mask_checked): Likewise,
25460         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
25461         (vect_gen_perm_mask_checked): Likewise,
25463 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
25465         * optabs-query.h (qimode_for_vec_perm): Declare.
25466         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
25467         (qimode_for_vec_perm): ...this new function.
25468         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
25470 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
25472         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
25473         does not have a conditional at the top.
25475 2018-01-02  Richard Biener  <rguenther@suse.de>
25477         * ipa-inline.c (big_speedup_p): Fix expression.
25479 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
25481         PR target/81616
25482         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
25483         for generic 4->6.
25485 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
25487         PR target/81616
25488         Generic tuning.
25489         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
25490         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
25491         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
25492         cond_taken_branch_cost 3->4.
25494 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
25496         PR tree-optimization/83581
25497         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
25498         TODO_cleanup_cfg if any changes have been made.
25500         PR middle-end/83608
25501         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
25502         convert_modes if target mode has the right side, but different mode
25503         class.
25505         PR middle-end/83609
25506         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
25507         last argument when extracting from CONCAT.  If either from_real or
25508         from_imag is NULL, use expansion through memory.  If result is not
25509         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
25510         the parts directly to inner mode, if even that fails, use expansion
25511         through memory.
25513         PR middle-end/83623
25514         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
25515         check for bswap in mode rather than HImode and use that in expand_unop
25516         too.
25518 Copyright (C) 2018 Free Software Foundation, Inc.
25520 Copying and distribution of this file, with or without modification,
25521 are permitted in any medium without royalty provided the copyright
25522 notice and this notice are preserved.