match_asm_constraints: Use copy_rtx where needed (PR88001)
[official-gcc.git] / gcc / ChangeLog
blob6222a3f74ef554ebff5f5a66a8a236344be0863e
1 2018-12-14  Segher Boessenkool  <segher@kernel.crashing.org>
3         PR rtl-optimization/88001
4         * function.c (match_asm_constraints_1): Don't invalidly share RTL.
6 2018-12-14  Bin Cheng  <bin.cheng@linux.alibaba.com>
8         * auto-profile.c (afdo_annotate_cfg): Call update_max_bb_count even
9         if autofdo counts are all zeros.
11 2018-12-14  Bin Cheng  <bin.cheng@linux.alibaba.com>
13         * auto-profile.c (afdo_indirect_call): Skip generating histogram
14         value for internal call.
16 2018-12-14  Bin Cheng  <bin.cheng@linux.alibaba.com>
18         * auto-profile.c (AFDO_EINFO): New macro.
19         (class edge_info): New class.
20         (is_edge_annotated, set_edge_annotated): Delete.
21         (afdo_propagate_edge, afdo_propagate_circuit, afdo_propagate): Remove
22         parameter.  Adjust edge count computation and annotation using class
23         edge_info.
24         (afdo_calculate_branch_prob, afdo_annotate_cfg): Likewise.
26 2018-12-13  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
28         * ipa-cp.c (print_all_lattices): Skip cp clones.
30         * ipa-cp.c: Fix various comment typos.
32 2018-12-13  Jakub Jelinek  <jakub@redhat.com>
34         PR tree-optimization/88444
35         * tree-inline.c (fold_marked_statements): Iterate up to
36         last_basic_block_for_fn rather than n_basic_blocks_for_fn.
38         PR rtl-optimization/88470
39         * cfgcleanup.c (outgoing_edges_match): If the function is
40         shrink-wrapped and bb1 ends with a JUMP_INSN with a single fake
41         edge to EXIT, return false.
43 2018-12-13  Martin Sebor  <msebor@redhat.com>
45         * doc/extend.texi: Consistently use @code for const and volatile
46         qualifiers, the true and false constants, and asm statements.
48 2018-12-13  Vladimir Makarov  <vmakarov@redhat.com>
50         PR rtl-optimization/88414
51         * lra-int.h (lra_asm_error_p): New.
52         * lra-assigns.c (lra_assign): Check lra_asm_error_p for checking
53         call crossed pseudo assignment correctness.
54         (lra_split_hard_reg_for): Set up lra_asm_error_p.
55         * lra-constraints.c (curr_insn_transform): Ditto.
56         * lra.c (lra_asm_error_p): New.
57         (lra): Reset lra_asm_error_p.
59 2018-12-13  Jakub Jelinek  <jakub@redhat.com>
61         PR rtl-optimization/88416
62         * valtrack.c (cleanup_auto_inc_dec): Handle pre/post-inc/dec/modify
63         even if !AUTO_INC_DEC.
65 2018-12-13  David Edelsohn  <dje.gcc@gmail.com>
67         * config/rs6000/rs6000.c (rs6000_function_arg): Ensure type is
68         non-NULL.
69         (rs6000_arg_partial_bytes): Same.
71 2018-12-13  Jason Merrill  <jason@redhat.com>
73         * gdbinit.in (pp): New macro.
74         (pbb): Remove.
76 2018-12-13  Jakub Jelinek  <jakub@redhat.com>
78         PR tree-optimization/88464
79         * tree-vect-stmts.c (vect_build_gather_load_calls): Handle INTEGER_TYPE
80         masktype if mask is non-NULL.
81         (vectorizable_load): Don't reject masked gather loads if masktype
82         in the decl is INTEGER_TYPE.
84 2018-12-13  Andreas Krebbel  <krebbel@linux.ibm.com>
86         * config/s390/s390-builtins.def (s390_vec_double_s64): Map to
87         s390_vec_double_s64 instead of s390_vcdgb.
88         (s390_vec_double_u64): Map to s390_vec_double_u64 instead of
89         s390_vcdlgb.
91 2018-12-13  Andreas Krebbel  <krebbel@linux.ibm.com>
93         * config/s390/vx-builtins.md ("vec_ctd_s64", "vec_ctd_u64")
94         ("vec_ctsl", "vec_ctul"): Replace 0 with VEC_NOINEXACT.
95         ("vec_double_s64", "vec_double_u64"): Replace 4 with VEC_INEXACT.
97 2018-12-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
99         * doc/invoke.texi (-msve-vector-bits): Clarify -msve-vector-bits=128
100         behavior.
102 2018-12-13  Wei Xiao  <wei3.xiao@intel.com>
104         * common/config/i386/i386-common.c (processor_names): Add cascadelake.
105         (processor_alias_table): Add cascadelake.
106         * config.gcc: Add -march=cascadelake.
107         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
108         cascadelake.
109         * config/i386/i386.c (Add m_CASCADELAKE): New.
110         (processor_cost_table): Add cascadelake.
111         (get_builtin_code_for_version): Handle cascadelake.
112         * config/i386/i386.h (TARGET_CASCADELAKE, PROCESSOR_CASCADELAKE): New.
113         (PTA_CASCADELAKE): Ditto.
114         * doc/invoke.texi: Add -march=cascadelake.
116 2018-12-13  Jakub Jelinek  <jakub@redhat.com>
118         PR target/88465
119         * config/i386/i386.md (*movdi_internal, *movsi_internal,
120         *movhi_internal, *movqi_internal): Add alternative(s) to load
121         0 or -1 into k registers using kxor or kxnoq instructions.
123         PR target/88461
124         * config/i386/sse.md (VI1248_AVX512VLBW, AVX512ZEXTMASK): New
125         mode iterators.
126         (<avx512>_testm<mode>3<mask_scalar_merge_name>,
127         <avx512>_testnm<mode>3<mask_scalar_merge_name>): Merge patterns
128         with VI12_AVX512VL and VI48_AVX512VL iterators into ones with
129         VI1248_AVX512VLBW iterator.
130         (*<avx512>_testm<VI1248_AVX512VLBW:mode>3_zext,
131         *<avx512>_testm<VI1248_AVX512VLBW:mode>3_zext_mask,
132         *<avx512>_testnm<VI1248_AVX512VLBW:mode>3_zext,
133         *<avx512>_testnm<VI1248_AVX512VLBW:mode>3_zext_mask): New
134         define_insns.
136         PR target/88461
137         * config/i386/i386.md (*zero_extendsidi2, zero_extend<mode>di2,
138         *zero_extend<mode>si2, *zero_extendqihi2): Add =*k, *km alternatives.
140 2018-12-12  Tom de Vries  <tdevries@suse.de>
141             Jakub Jelinek  <jakub@redhat.com>
143         * omp-builtins.def (BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
144         BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
145         BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
146         BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
147         BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
148         BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME): Fix up
149         function types - remove one argument.
151 2018-12-12  Martin Sebor  <msebor@redhat.com>
153         * doc/extend.texi (attribute copy): Fix typos.
155 2018-12-12  Martin Sebor  <msebor@redhat.com>
157         * doc/extend.texi (Function Attributes): Clarify C++ aspects.
158         (Variable Attributes): Same.
159         (Type Attributes): Same.
161 2018-12-12  Olivier Hainque  <hainque@adacore.com>
163         * config/aarch64/aarch64.c (aarch64_override_options): Once arch,
164         cpu and tune were validated, insert SUBTARGET_OVERRIDE_OPTIONS if
165         defined.
167 2018-12-12  Olivier Hainque  <hainque@adacore.com>
169         * config/aarch64/aarch64.c (PROBE_STACK_FIRST_REG) : Redefine as
170         R9_REGNUM instead of 9.
171         (PROBE_STACK_SECOND_REG): Redefine as R10_REGNUM instead of 10.
173 2018-12-12  Eric Botcazou  <ebotcazou@adacore.com>
175         PR target/86806
176         * config/sparc/sparc.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
177         (speculation_barrier): New instruction for V9.
179 2018-12-12 Segher Boessenkool  <segher@kernel.crashing.org>
180            Iain Sandoe  <iain@sandoe.co.uk>
182         PR target/88343
183         * config/rs6000/rs6000.c (save_reg_p): Do not save the picbase reg
184         unless it has been used.
185         (first_reg_to_save): Remove dead code.
187 2018-12-12  Iain Sandoe  <iain@sandoe.co.uk>
189         * config/rs6000/rs6000-protos.h (rs6000_call_darwin): New.
190         (rs6000_sibcall_darwin): New. (macho_call_template): Remove.
191         * config/rs6000/rs6000.c (get_prev_label): Forward declaration. 
192         (rs6000_call_template_1): Handle Darwin.
193         (macho_call_template): Remove.
194         (rs6000_call_sysv): Remove handling for Darwin.
195         (rs6000_call_darwin_1, rs6000_call_darwin): New
196         (rs6000_sibcall_darwin): New.
197         * config/rs6000/rs6000.md (define_expand “call”): Handle Darwin
198         with its own expander. (define_expand “call_value”): Likewise.
199         (define_expand “sibcall”): Likewise.
200         (define_expand “sibcall_value”): Likewise.
201         (call_nonlocal_sysv): Remove Darwin special-casing.
202         (call_value_nonlocal_sysv): Likewise.
204 2018-12-12  Iain Sandoe  <iain@sandoe.co.uk>
206         * config/rs6000/darwin.md (call_indirect_nonlocal_darwin64): Remove.
207         (call_nonlocal_darwin64): Remove.
208         (call_value_indirect_nonlocal_darwin64): Remove.
209         (call_value_nonlocal_darwin64): Remove.
210         * config/rs6000/rs6000.c (rs6000_call_template_1): Handle Darwin with
211         the same asm output as AIX/ELFv2.  (rs6000_call_sysv): Preserve the
212         CALL_LONG flag when needed for Darwin.
213         * config/rs6000/rs6000.md (define expand “call”): Expand Darwin as
214         per sysv.
215         (define_expand “call_value”): Likewise.
216         (define_expand “sibcall”): Likewise.
217         (define_expand “sibcall_value”): Likewise.
218         (call_indirect_nonlocal_sysv): Mark the clobber mode P.
219         (call_nonlocal_sysv): Likewise.
220         (call_nonlocal_sysv_secure): Likewise.
221         (call_value_indirect_nonlocal_sysv): Likewise.
222         (call_value_nonlocal_sysv): Likewise.
223         (call_value_nonlocal_sysv_secure): Likewise.
224         (call_local64): Mark the clobber DI.
225         (call_value_local64): Likewise.
227 2018-12-11  Jakub Jelinek  <jakub@redhat.com>
229         PR tree-optimization/88444
230         * tree-vrp.c (register_edge_assert_for_2): Only register assertions
231         for conversions if rhs1 is a SSA_NAME.
233 2018-12-11  Dimitar Dimitrov  <dimitar@dinux.eu>
235         * cfgexpand.c (asm_clobber_reg_is_valid): Also produce
236         error when stack pointer is clobbered.
237         (expand_asm_stmt): Refactor clobber check in separate function.
239 2018-12-11  Eric Botcazou  <ebotcazou@adacore.com>
241         * config/rs6000/vxworks.h (RS6000_STARTING_FRAME_OFFSET): Define,
242         accounting for STACK_BOUNDARY 128.
243         (STACK_DYNAMIC_OFFSET): Likewise.
245 2018-12-11  Jakub Jelinek  <jakub@redhat.com>
247         PR target/88425
248         * config/i386/i386.md (*x86_mov<SWI48:mode>cc_0_m1_neg_leu<SWI:mode>):
249         New define_insn_and_split.
251 2018-12-11  Richard Biener  <rguenther@suse.de>
253         PR middle-end/88448
254         PR middle-end/88415
255         * gimple.c (gimple_assign_set_rhs_with_ops): Revert previous
256         change.
257         * tree-complex.c (update_complex_assignment): Properly transfer
258         or clean EH info around gimple_assign_set_rhs_with_ops.
260 2018-12-11  Richard Earnshaw  <rearnsha@arm.com>
262         PR target/87369
263         * config/aarch64/iterators.md (sizem1): Add sizes for SFmode and DFmode.
264         (Vbtype): Add SFmode mapping.
265         * config/aarch64/aarch64.md (copysigndf3, copysignsf3): Delete.
266         (copysign<GPF:mode>3): New expand pattern.
267         (copysign<GPF:mode>3_insn): New insn pattern.
269 2018-12-11  Richard Biener  <rguenther@suse.de>
271         * ccmp.c (ccmp_candidate_p): Use GIMPLE API properly.
273 2018-12-11  Jakub Jelinek  <jakub@redhat.com>
275         PR lto/86004
276         * doc/sourcebuild.texi (lto_incremental): Document new effective
277         target.
279 2018-12-11  Segher Boessenkool  <segher@kernel.crashing.org>
281         PR target/88145
282         * config/rs6000/rs6000.c (rs6000_expand_zeroop_builtin): Use
283         rs6000_isa_flags instead of rs6000_isa_flags_explicit to decide
284         whether soft float is enabled.
285         (rs6000_expand_mtfsb_builtin): Ditto.
286         (rs6000_expand_set_fpscr_rn_builtin): Ditto.
287         (rs6000_expand_set_fpscr_drn_builtin): Ditto.
289 2018-12-10  Jeff Law  <law@redhat.com>
291         PR tree-optimization/80520
292         * gimple-ssa-split-paths.c (is_feasible_trace): Recognize half
293         diamonds that are likely if convertable.
295 2018-12-10  Martin Sebor  <msebor@redhat.com>
297         PR tree-optimization/86196
298         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
299         base size only of arrays.
301 2018-12-10  Segher Boessenkool  <segher@kernel.crashing.org>
303         * config.gcc (Obsolete configurations): Delete powerpc*-*-*spe*.
304         (Unsupported targets): Add powerpc*-*-*spe*.
305         (powerpc*-*-*spe*): Delete.
306         (powerpc-*-eabispe*): Delete.
307         (powerpc-*-rtems*spe*): Delete.
308         (powerpc*-*-linux*spe*): Delete.
309         (powerpc*-*-linux*): Do not handle the linux*spe* targets.
310         (powerpc-wrs-vxworks*spe): Delete.
311         (with_cpu setting code): Delete powerpc*-*-*spe* handling.
312         * config.host (target powerpc*-*-*spe*): Delete.
313         * doc/invoke.texi (PowerPC SPE Options): Delete.
314         (PowerPC SPE Options): Delete.
315         * config/powerpcspe: Delete.
317 2018-12-10  Uros Bizjak  <ubizjak@gmail.com>
319         PR target/88418
320         * config/i386/i386.c (ix86_expand_sse_cmp): For vector modes,
321         check operand 1 with vector_operand predicate.
322         (ix86_expand_sse_movcc): For vector modes, check op_true with
323         vector_operand, not nonimmediate_operand.
325 2018-12-10  Richard Biener  <rguenther@suse.de>
327         * tree-affine.c (tree_to_aff_combination): Remove unreachable
328         MEM_REF case.
329         (aff_combination_expand): Cache on SSA names, not possibly
330         on conversion trees.  Avoid expanding cases we do not handle.
332 2018-12-10  Richard Biener  <rguenther@suse.de>
334         PR tree-optimization/88427
335         * vr-values.c (vr_values::extract_range_from_phi_node):
336         Handle symbolic ranges conservatively when trying to drop
337         to Inf +- 1.
339 2018-12-10  Martin Jambor  <mjambor@suse.cz>
341         PR ipa/88214
342         * ipa-prop.c (determine_locally_known_aggregate_parts): Make sure
343         we check pointers against pointers.
345 2018-12-10  Richard Biener  <rguenther@suse.de>
347         PR middle-end/88415
348         * gimple.c (gimple_assign_set_rhs_with_ops): Transfer EH
349         info to a newly allocated stmt.
351 2018-12-10  Jerome Lambourg  <lambourg@adacore.com>
353         * config/vxworksae.h (TARGET_VXWORKS_HAVE_CTORS_DTORS): Define.
355 2018-12-10  Fredrik Nyström  <fredrik@lysator.liu.se>
357         PR bootstrap/65725
358         * config/sol2.h: Only use libgcc-unwind.map if
359         ENABLE_SHARED_LIBGCC.
361 2018-12-10  Bin Cheng  <bin.cheng@linux.alibaba.com>
363         * auto-profile.c (afdo_calculate_branch_prob): Convert profile_count
364         to afdo precision quality.
365         (afdo_callsite_hot_enough_for_early_inline): Likewise.
366         (afdo_annotate_cfg): Set profile_count for exit basic block.
368 2018-12-10  Bin Cheng  <bin.cheng@linux.alibaba.com>
370         * auto-profile.c (string_table::get_index_by_decl)
371         (function_instance::get_function_instance_by_decl): Avoid infinite
372         recursion by using DECL_FROM_INLINE.
374 2018-12-09  John David Anglin  <danglin@gcc.gnu.org>
376         * config.gcc (hppa*-*-linux*): Add pa/t-pa to tmake_file.  Define
377         d_target_objs.
378         * config/pa/pa-protos.h (pa_d_target_versions): New prototype.
379         * config/pa/pa.h (TARGET_D_CPU_VERSIONS): Define.
380         * config/pa/pa-d.c: New file.
381         * config/pa/t-pa: New file.
383 2018-12-08  Bin Cheng  <bin.cheng@linux.alibaba.com>
385         * ipa-cp.c (update_profiling_info): Call adjust_for_ipa_scaling for
386         zero profile count.
388 2018-12-08  Jakub Jelinek  <jakub@redhat.com>
390         PR fortran/88304
391         * tree-nested.c (convert_local_reference_stmt): Handle clobbers where
392         lhs is not a decl normally, don't call use_pointer_in_frame on that
393         lhs.
395 2018-12-08  Eric Botcazou  <ebotcazou@adacore.com>
397         PR rtl-optimization/88390
398         * dwarf2cfi.c (struct dw_cfi_row): Add window_save field.
399         (cfi_row_equal_p): Compare it.
400         (dwarf2out_frame_debug_cfa_window_save): Add FAKE parameter.
401         If FAKE is false, set window_save of the current row.
402         (dwarf2out_frame_debug) <REG_CFA_TOGGLE_RA_MANGLE>: Call above
403         function with FAKE parameter set to true.
404         <REG_CFA_WINDOW_SAVE>: Likewise but with FAKE parameter set to false.
405         (change_cfi_row): Emit a DW_CFA_GNU_window_save if necessary.
407 2018-12-07  Peter Bergner  <bergner@linux.ibm.com>
409         PR target/87496
410         * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
411         -mabi=ieeelongdouble and -mabi=ibmlongdouble without -mlong-double-128.
412         Do not error for -mabi=ibmlongdouble and no ISA 2.06 support.
413         * doc/invoke.texi: Document -mabi=ibmlongdouble and -mabi=ieeelongdouble
414         require -mlong-double-128.
416 2018-12-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
418         * config/aarch64/aarch64.c (aarch64_tuning_override_functions): Add
419         sve_width entry.
420         (aarch64_parse_sve_width_string): Define.
422 2018-12-07  Jeff Law  <law@redhat.com>
424         PR middle-end/87813
425         * gimple-ssa-evrp-analyze.h (class evrp_range_analyzer): Add
426         m_update_global_ranges member.  Add corresponding argument to ctor.
427         * gimple-ssa-evrp-analyze.c
428         (evrp_range_analyzer::evrp_range_analyzer): Add new argument and
429         initialize m_update_global_ranges.
430         (evrp_range_analyzer::set_ssa_range_info): Assert that we are
431         updating global ranges.
432         (evrp_range_analyzer::record_ranges_from_incoming_edge): Only
433         update global ranges if explicitly requested.
434         (evrp_range_analyzer::record_ranges_from_phis): Similarly.
435         (evrp_range_analyzer::record_ranges_from_stmt): Similarly.
436         * gimple-ssa-evrp.c (evrp_dom_walker): Pass new argument to
437         evrp_range_analyzer ctor.
438         * gimple-ssa-sprintf.c (sprintf_dom_walker): Similarly.
439         * tree-ssa-dom.c (dom_opt_dom_walker): Similarly.
441 2018-12-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
443         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum):
444         Add SVE_NOT_IMPLEMENTED value.
445         * config/aarch64/aarch64-protos.h (struct tune_params): Add sve_width
446         field.
447         * config/aarch64/aarch64.c (generic_tunings,cortexa35_tunings,
448         cortexa53_tunings, cortexa57_tunings, cortexa72_tunings,
449         cortexa73_tunings, exynosm1_tunings, thunderx_tunings,
450         thunderx_tunings, tsv110_tunings, xgene1_tunings, qdf24xx_tunings,
451         saphira_tunings, thunderx2t99_tunings, emag_tunings):
452         Specify sve_width.
453         (aarch64_estimated_poly_value): Define.
454         (TARGET_ESTIMATED_POLY_VALUE): Define.
456 2018-12-07  Paul A. Clarke  <pc@us.ibm.com>
458         PR target/88408
459         * config/rs6000/mmintrin.h (_mm_packs_pu16): Correctly use "__vector".
461 2018-12-07  Vladimir Makarov  <vmakarov@redhat.com>
463         PR rtl-optimization/88349
464         * ira-costs.c (record_operand_costs): Check bigger reg class on
465         NO_REGS.
467 2018-12-07  Richard Sandiford  <richard.sandiford@arm.com>
469         * config/aarch64/aarch64-sve.md (*mul<mode>3, *v<optab><mode>3):
470         Split the patterns after reload if we don't need the predicate
471         operand.
472         (*post_ra_mul<mode>3, *post_ra_v<optab><mode>3): New patterns.
474 2018-12-07  Richard Sandiford  <richard.sandiford@arm.com>
476         * config/aarch64/iterators.md (SVE_UNPRED_FP_BINARY): New code
477         iterator.
478         (sve_fp_op): Handle minus and mult.
479         * config/aarch64/aarch64-sve.md (*add<mode>3, *sub<mode>3)
480         (*mul<mode>3): Split the patterns after reload if we don't
481         need the predicate operand.
482         (*post_ra_<sve_fp_op><mode>3): New pattern.
484 2018-12-07  Bin Cheng  <bin.cheng@linux.alibaba.com>
486         * profile-count.h (profile_count::oeprator>=): Fix typo by inverting
487         return condition when *this is precise zero.
489 2018-12-07  Jakub Jelinek  <jakub@redhat.com>
491         PR target/85593
492         * final.c (rest_of_handle_final): Don't call collect_fn_hard_reg_usage
493         for functions with naked attribute.
495         PR c/88367
496         * tree-vrp.c (extract_range_from_binary_expr): For POINTER_PLUS_EXPR
497         with -fno-delete-null-pointer-checks, set_nonnull only if the pointer
498         is non-NULL and offset is known to have most significant bit clear.
499         * vr-values.c (vr_values::vrp_stmt_computes_nonzero): For ADDR_EXPR
500         of MEM_EXPR, return true if the MEM_EXPR has non-zero offset with
501         most significant bit clear.  If offset does have most significant bit
502         set and -fno-delete-null-pointer-checks, don't return true even if
503         the base pointer is non-NULL.
505 2018-12-06  Alexandre Oliva  <aoliva@redhat.com>
507         * cselib.c (cselib_record_sets): Skip strict low part sets
508         with NULL src_elt.
510 2018-12-06  Paul A. Clarke  <pc@us.ibm.com>
512         PR target/88316
513         * config/rs6000/smmintrin.h: New file.
514         * config.gcc: Add smmintrin.h to extra_headers for powerpc*-*-*.
516 2018-12-06  Paul A. Clarke  <pc@us.ibm.com>
518         PR target/88316
519         * config/rs6000/mmintrin.h (_mm_unpackhi_pi8): Fix for big-endian.
520         (_mm_unpacklo_pi8): Likewise.
521         (_mm_mulhi_pi16): Likewise.
522         (_mm_packs_pi16): Fix for big-endian. Use preferred API.
523         (_mm_packs_pi32): Likewise.
524         (_mm_packs_pu16): Likewise.
525         * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix for big-endian.
526         (_mm_cvtss_si64): Likewise.
527         (_mm_cvtpi32x2_ps): Likewise.
528         (_mm_shuffle_ps): Likewise.
529         (_mm_movemask_pi8): Likewise.
530         (_mm_mulhi_pu16): Likewise.
531         (_mm_sad_pu8): Likewise.
532         (_mm_sad_pu8): Likewise.
533         (_mm_cvtpu16_ps): Fix for big-endian. Use preferred API.
534         (_mm_cvtpu8_ps): Likewise.
535         (_mm_movemask_ps): Better #else case for big-endian (no functional
536         change).
537         (_mm_shuffle_pi16): Likewise.
538         * config/rs6000/emmintrin.h (_mm_movemask_pd): Fix for big-endian.
539         Better #else case for big-endian (no functional change).
540         (_mm_movemask_epi8): Likewise.
541         (_mm_shufflehi_epi16): Likewise.
542         (_mm_shufflelo_epi16): Likewise.
543         (_mm_shuffle_epi32): Likewise.
544         (_mm_mul_epu32): Fix for big-endian.
545         (_mm_bsrli_si128): Likewise.
546         (_mm_cvtps_pd): Better #else case for big endian.
547         (_mm_mulhi_epi16): Likewise.
548         (_mm_mul_epu32): Likewise.
549         (_mm_slli_si128): Likewise.
550         (_mm_sll_epi16): Likewise.
551         (_mm_sll_epi32): Likewise.
552         (_mm_sra_epi16): Likewise.
553         (_mm_sra_epi32): Likewise.
554         (_mm_srl_epi16): Likewise.
555         (_mm_srl_epi32): Likewise.
556         (_mm_mulhi_epu16): Likewise.
557         (_mm_sad_epu8): Likewise.
558         * config/rs6000/pmmintrin.h (_mm_hadd_ps): Fix for big-endian.
559         (_mm_sub_ps): Likewise.
560         * config/rs6000/mmintrin.h (_mm_cmpeq_pi8): Fix for 32-bit mode.
561         * gcc/config/rs6000/tmmintrin.h (_mm_alignr_epi8): Use ENDIAN
562         macros consistently (no functional changes).
563         (_mm_alignr_pi8): Likewise.
565 2018-12-06  Iain Sandoe  <iain@sandoe.co.uk>
567         PR c++/87380
568         * config/darwin.h (TARGET_WEAK_NOT_IN_ARCHIVE_TOC) Remove, use the
569         default.
570         * config/rs6000/darwin7.h (TARGET_WEAK_NOT_IN_ARCHIVE_TOC): New.
572 2018-12-06  Vladimir Makarov  <vmakarov@redhat.com>
574         PR target/88282
575         * ira.c (ira_init_register_move_cost): Use info from
576         hard_regno_mode_ok instead of contains_reg_of_mode.
577         * ira-costs.c (contains_reg_of_mode): Don't use cost from bigger
578         hard register class for some fixed hard registers.
580 2018-12-06  Segher Boessenkool  <segher@kernel.crashing.org>
582         * doc/extend.texi (Using Assembly Language with C): Document asm inline.
583         (Size of an asm): Fix typo.  Document asm inline.
584         * gimple-pretty-print.c (dump_gimple_asm): Handle asm inline.
585         * gimple.h (enum gf_mask): Add GF_ASM_INLINE.
586         (gimple_asm_set_volatile): Fix typo.
587         (gimple_asm_inline_p): New.
588         (gimple_asm_set_inline): New.
589         * gimplify.c (gimplify_asm_expr): Propagate the asm inline flag from
590         tree to gimple.
591         * ipa-icf-gimple.c (func_checker::compare_gimple_asm): Compare the
592         gimple_asm_inline_p flag, too.
593         * tree-core.h (tree_base): Document that protected_flag is ASM_INLINE_P
594         in an ASM_EXPR.
595         * tree-inline.c (estimate_num_insns): If gimple_asm_inline_p return
596         a minimum size for an asm.
597         * tree.h (ASM_INLINE_P): New.
599 2018-12-06  Segher Boessenkool  <segher@kernel.crashing.org>
601         PR inline-asm/55681
602         * doc/extend.texi (Basic Asm): Update grammar.
603         (Extended Asm): Update grammar.
605 2018-12-06  Iain Sandoe  <iain@sandoe.co.uk>
607         PR target/78444
608         * config/i386/darwin.h (STACK_BOUNDARY): Remove macro.
609         * config/i386/i386.c (ix86_compute_frame_layout): Ensure at least 128b
610         stack alignment in non-leaf functions.
612 2018-12-06  Jakub Jelinek  <jakub@redhat.com>
614         PR target/87598
615         * config/aarch64/aarch64.c (aarch64_print_address_internal): Don't
616         call output_operand_lossage on VOIDmode CONST_INTs.  After
617         output_operand_lossage do return false.
619 2018-12-06  Richard Biener  <rguenther@suse.de>
621         * df-problems.c (df_rd_local_compute): Use bitmap_release.
622         (df_live_free): Likewise.
623         (df_md_local_compute): Likewise.
624         (df_md_free): Release df_md_scratch bitmap.
625         * loop-invariant.c (calculate_loop_reg_pressure): Use
626         bitmap_release.
627         * sched-deps.c (true_dependency_cache, output_dependency_cache,
628         anti_dependency_cache, control_dependency_cache,
629         spec_dependency_cache): Use bitmap instead of bitmap_head *.
630         * sched-ebb.c (schedule_ebbs_init): Initialize non-GTY
631         dont_calc_deps as bitmap allocated from obstack not GC.
632         (schedule_ebbs_finish): Use bitmap_release.
633         * sched-rgn.c (schedule_insns): Initialize non-GTY
634         not_in_df as bitmap allocated from obstack not GC.
635         Use bitmap_release.
636         * sel-sched.c (_forced_ebb_heads): Remove premature optimization.
637         (sel_region_init): Allocate forced_ebb_heads.
638         (sel_region_finish): Free forced_ebb_heads.
640 2018-12-06  Richard Biener  <rguenther@suse.de>
642         * bitmap.c (bitmap_head::crashme): Define.
643         * bitmap.h (bitmap_head): Add constexpr default constructor
644         poisoning the obstack member.
645         (bitmap_head::crashme): Declare.
646         (bitmap_release): New function clearing a bitmap and poisoning
647         the obstack member.
648         * gengtype.c (main): Make it recognize CONSTEXPR.
649         * lra-constraints.c (lra_inheritance): Use bitmap_release
650         instead of bitmap_clear.
651         * ira.c (ira): Work around class-memaccess warning.
652         * regrename.c (create_new_chain): Likewise.
654 2018-12-06  Jakub Jelinek  <jakub@redhat.com>
656         PR tree-optimization/85726
657         * generic-match-head.c (optimize_successive_divisions_p): New function.
658         * gimple-match-head.c (optimize_successive_divisions_p): Likewise.
659         * match.pd: Don't combine successive divisions if they aren't exact
660         and optimize_successive_divisions_p is false.
662         PR fortran/88304
663         * tree-nested.c (convert_nonlocal_reference_stmt): Remove clobbers
664         for non-local automatic decls.
666 2018-12-05  David Edelsohn  <dje.gcc@gmail.com>
668         * config/rs6000/aix72.h (ASM_DEFAULT_SPEC): Match Power7 processor
669         default. 
671 2018-12-05  Uros Bizjak  <ubizjak@gmail.com>
673         * dwarf2out.c (field_byte_offset): Remove
674         #ifdef PCC_BITFIELD_TYPE_MATTERS check.
676 2018-12-05  Richard Biener  <rguenther@suse.de>
677             Martin Sebor  <msebor@redhat.com>
679         PR c/87028
680         * calls.c (get_attr_nonstring_decl): Avoid setting *REF to
681         SSA_NAME_VAR.
682         * gcc/gimple-low.c (lower_stmt): Fold builtin calls here.
683         * gimplify (maybe_fold_stmt): Avoid folding builtin calls.
685 2018-12-05  Iain Sandoe  <iain@sandoe.co.uk>
687         * configure.ac (gcc_cv_otool): Set.
688         * configure: Regenerate.
690 2018-12-05  Uros Bizjak  <ubizjak@gmail.com>
692         * config/i386/cygming.h (PCC_BITFIELD_TYPE_MATTERS): Remove.
693         (GROUP_BITFIELDS_BY_ALIGN): Ditto.
695 2018-12-05  Richard Sandiford  <richard.sandiford@arm.com>
697         PR tree-optimization/88064
698         * tree-vect-patterns.c (vect_convert_input): Convert the result of
699         an existing cast if it has the right width but the wrong sign.
700         Do not test the signedness of the required result when
701         considering whether to split an existing cast; instead split to
702         a type with the same signedness as the source of the cast, then
703         convert it to the opposite signedness where necessary.
704         (vect_recog_over_widening_pattern): Handle sign changes between
705         the final PLUS_EXPR and the RSHIFT_EXPR.
706         (vect_recog_average_pattern): Use an unsigned operation when
707         truncating an addition, subtraction or multiplication.  Cast the
708         result back to the "real" signedness before promoting.
710 2018-12-05  Richard Biener  <rguenther@suse.de>
712         PR tree-optimization/86637
713         * tree-vectorizer.c (pass_slp_vectorize::execute): Reset
714         vect_location at the end.
716 2018-12-05  Jakub Jelinek  <jakub@redhat.com>
718         PR tree-optimization/87360
719         * gimple-loop-jam.c (tree_loop_unroll_and_jam): On failure to analyze
720         data dependencies, don't return false, just continue.  Formatting
721         fixes.
722         (merge_loop_tree, bb_prevents_fusion_p, unroll_jam_possible_p,
723         fuse_loops): Formatting fixes.
725         PR sanitizer/88333
726         * cfgexpand.c (expand_stack_vars): If asan_vec is empty, start with
727         aligning frame offset to ASAN_RED_ZONE_SIZE bytes.
729 2018-12-05  Xianmiao Qu  <xianmiao_qu@c-sky.com>
731         * config.gcc (csky-*-linux-gnu*): Force .init_array support.
733 2018-12-05  Segher Boessenkool  <segher@kernel.crashing.org>
735         * config/rs6000/rs6000.c (rs6000_function_arg): Only do the special
736         aggregate handling on actual AIX, not on somewhat similar systems.
737         (rs6000_arg_partial_bytes): Ditto.
739 2018-12-04  Vladimir Makarov  <vmakarov@redhat.com>
741         PR rtl-optimization/88317
742         * lra-constraints.c (split_reg): Don't set up check_only_regs if
743         we are outside the inheritance pass.
745 2018-12-04  Jan Hubicka  <hubicka@ucw.cz>
747         * ipa-prop.c (jump_function_useful_p): New.
748         (ipa_read_node_info): Do not allocated useless jump functions.
750 2018-12-04  David Malcolm  <dmalcolm@redhat.com>
752         PR c/82967
753         * spellcheck.c (selftest::test_suggestions): Add another assertion.
755 2018-12-04  Martin Sebor  <msebor@redhat.com>
757         * doc/extend.texi (__builtin_has_attribute): Fix typo.
759 2018-12-04  Jakub Jelinek  <jakub@redhat.com>
761         PR target/88188
762         * config/rs6000/rs6000.c (ccr_bit): Return -1 instead of assertion
763         failures.
764         (print_operand): Use REG_P instead of GET_CODE == REG.
765         <case 'D'>: Also check CR_REGNO_P (REGNO (x)).
766         <case 't'>: Likewise.  Remove GET_MODE check.
767         * config/rs6000/rs6000.md (scc patterns): Assert ccr_bit didn't
768         return -1.
770 2018-12-04  Martin Sebor  <msebor@redhat.com>
772         * doc/extend.texi (attribute aligned): Expand.
774 2018-12-04  David Edelsohn  <dje.gcc@gmail.com>
776         PR target/61976
777         * config/rs6000/rs6000.c (rs6000_function_arg): Don't pass aggregates
778         in FPRs on AIX.
779         (rs6000_arg_partial_bytes): Same.
781 2018-12-04  Vladimir Makarov  <vmakarov@redhat.com>
783         PR target/88282
784         * ira-costs.c (exec): Try bigger class to use smaller register
785         move cost.
787 2018-12-04  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
789         PR ipa/88297
790         * ipa-cp.c (create_specialized_node): Track clone counters by
791         node assembler names.
792         (ipcp_driver): Change type of clone_num_suffixes key to const char*.
794 2018-12-04  Richard Biener  <rguenther@suse.de>
796         * tree-vect-loop.c (vect_transform_loop): Fix epilogue iterations
797         for epilogue vectorization.
799 2018-12-04  Richard Biener  <rguenther@suse.de>
801         PR tree-optimization/88301
802         * tree-vrp.c (register_edge_assert_for_2): Fix sign-conversion
803         issues in last commit.
805 2018-12-04  Richard Biener  <rguenther@suse.de>
807         PR tree-optimization/88315
808         * tree-vect-loop.c (get_initial_defs_for_reduction): Simplify
809         and fix initialization vector for SAD and DOT_PROD SLP reductions.
811 2018-12-03  Sandra Loosemore  <sandra@codesourcery.com>
813         PR c/59039
814         * doc/extend.texi (Nonlocal gotos): New section.
816 2018-12-03  Uros Bizjak  <ubizjak@gmail.com>
818         * config/i386/sse.md (vec_concatv2df): Change (v,xm,C)
819         alternative to (v,vm,c).
821 2018-12-03  Segher Boessenkool  <segher@kernel.crashing.org>
823         * gcc/config.gcc (Unsupported targets): Add powerpc*-*-linux*paired*.
824         (powerpc*-*-linux*): Don't handle it here.
826 2018-12-03  Jeff Law  <law@redhat.com>
828         * config/h8300/h8300.md (<code>qi3_1): Add gcc_unreachable to keep
829         warnings quiet.
831         * config/h8300/h8300.md (low byte masking peepholes): Only accept
832         nonimmediate_operand for the to-be-masked operand.
834 2018-12-03  Richard Biener  <rguenther@suse.de>
836         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
837         allow expected function-pointer cast re-instantiation.
839 2018-12-03  Ilya Leoshkevich  <iii@linux.ibm.com>
841         * common/config/s390/s390-common.c (s390_option_init_struct):
842         Use section anchors by default.
843         * config/s390/s390.c (s390_check_symref_alignment): Handle
844         anchors.
845         (TARGET_MAX_ANCHOR_OFFSET): Use short displacement.
846         * output.h (assemble_align): Pass `align' as unsigned int, so
847         that the value 0x80000000, which corresponds to `aligned(1 <<
848         28)', would pass the `align > BITS_PER_UNIT' check.
849         * varasm.c (assemble_align): Likewise.
851 2018-12-03  Julian Brown  <julian@codesourcery.com>
853         * tree-pretty-print.c (dump_omp_clause): Make default case
854         gcc_unreachable.
856 2018-12-03  Richard Biener  <rguenther@suse.de>
858         PR tree-optimization/88301
859         * tree-vrp.c (register_edge_assert_for_2): Handle conversions
860         that do not change the value by registering the same assert
861         for the operand.
863 2018-12-03  Richard Biener  <rguenther@suse.de>
865         * tree-vect-loop.c (vect_transform_loop): Properly compute
866         upper bound for the epilogue when doing epilogue vectorization.
868 2018-12-03  Ilya Leoshkevich  <iii@linux.ibm.com>
870         PR target/80080
871         * cfgcleanup.c (class pass_postreload_jump): New pass.
872         (pass_postreload_jump::execute): Likewise.
873         (make_pass_postreload_jump): Likewise.
874         * passes.def: Add pass_postreload_jump before
875         pass_postreload_cse.
876         * tree-pass.h (make_pass_postreload_jump): New pass.
878 2018-12-02  Uros Bizjak  <ubizjak@gmail.com>
880         * config/i386/i386.c (inline_memory_move_cost): Correctly
881         compute number of TFmode GPR moves.
883 2018-12-02  Jakub Jelinek  <jakub@redhat.com>
885         PR target/88278
886         * config/i386/sse.md (*vec_concatv4sf_0, *vec_concatv4si_0): New insns.
888 2018-12-02  Jeff Law  <law@redhat.com>
890         * config/h8300/h8300.md (call, call_value): Drop mode from
891         operand containing number of bytes pushed.
892         (call_insn, call_value_insn): Use mode iterator for number
893         of bytes pushed operand.  Make pattern name vary appropriately.
895 2018-12-02  Jan Hubicka  <jh@suse.cz>
897         * bb-reorer.c (find_rarely_executed_basic_blocks_and_crossin_edges):
898         trust precise profiles.
900 2018-12-02  Jakub Jelinek  <jakub@redhat.com>
902         * tree-nested.c (convert_nonlocal_omp_clauses,
903         convert_local_omp_clauses): Handle OMP_CLAUSE_IN_REDUCTION,
904         OMP_CLAUSE_TASK_REDUCTION and OMP_CLAUSE__SIMT_ clauses.
905         (convert_nonlocal_reference_stmt, convert_local_reference_stmt):
906         Convert clauses for GIMPLE_OMP_TASKGROUP.
908         * omp-low.c (check_omp_nesting_restrictions): Allow cancel or
909         cancellation point with taskgroup clause inside of taskloop.  Consider
910         a taskloop construct without nogroup clause as implicit taskgroup for
911         diagnostics if cancel/cancellation point with taskgroup clause is
912         closely nested inside of taskgroup region.
914         PR sanitizer/88291
915         * asan.c (asan_clear_shadow): Move assert that len is multiple of 4
916         to the start of the function.
917         (asan_emit_stack_protection): When emitting clearing sequence for
918         epilogue, align offset down to ASAN_RED_ZONE_SIZE granularity,
919         add last_size_aligned which is last_size padded to multiples of
920         ASAN_RED_ZONE_SIZE and emit asan_clear_shadow always on 4 byte
921         boundaries.
923 2018-12-01  Jakub Jelinek  <jakub@redhat.com>
925         PR sanitizer/88289
926         * asan.c (asan_redzone_buffer::flush_redzone_payload): Fix up
927         an off-by-one for BYTES_BIG_ENDIAN.
929         PR target/54589
930         * combine.c (find_split_point): For invalid memory address
931         nonobj + obj + const, if reg + obj + const is valid addressing
932         mode, split at nonobj.  Use if rather than else if for the
933         fallback.  Comment fixes.
935 2018-11-30  Indu Bhagat  <indu.bhagat@oracle.com>
937         * coverage.c (get_coverage_counts): Use from_function_decl for precise
938         function location.
939         * profile-count.c (profile_count::dump): Add handling for precise
940         profile quality.
941         * profile.c (compute_branch_probabilities): Rely on exec_counts instead
942         of profile_info to set profile_status of function.
943         (branch_prob): Do not set profile_status of function based on
944         profile_info. Done above based on exec_counts.
946 2018-11-30  Jakub Jelinek  <jakub@redhat.com>
948         PR tree-optimization/88274
949         * tree-ssa-reassoc.c (optimize_range_tests_xor,
950         optimize_range_tests_diff): If type has smaller precision than
951         corresponding mode or if it has non-standard min/max, compute
952         everything in a standard type for the precision.
954         PR testsuite/85368
955         * params.def (PARAM_LOGICAL_OP_NON_SHORT_CIRCUIT): New param.
956         * tree-ssa-ifcombine.c (ifcombine_ifandif): If
957         --param logical-op-non-short-circuit is present, override
958         LOGICAL_OP_NON_SHORT_CIRCUIT value from the param.
959         * fold-const.c (fold_range_test, fold_truth_andor): Likewise.
961 2018-11-30  Jeff Law  <law@redhat.com>
963         * optabs.c (expand_binop): Use "machine_mode" rather than
964         "enum machine mode" in most recent change.
966 2018-11-30  Wilco Dijkstra  <wdijkstr@arm.com>
968         PR middle-end/64242
969         * builtins.c (expand_builtin_longjmp): Use a temporary when restoring
970         the frame pointer.
971         (expand_builtin_nonlocal_goto): Likewise.
973 2018-11-30  David Malcolm  <dmalcolm@redhat.com>
975         * diagnostic-core.h (emit_diagnostic): New decl.
976         * diagnostic.c (emit_diagnostic): New overload, taking a
977         rich_location *.
979 2018-11-30  David Malcolm  <dmalcolm@redhat.com>
981         * pretty-print.c (class selftest::test_pretty_printer): New
982         subclass of pretty_printer.
983         (selftest::test_prefixes_and_wrapping): New test.
984         (selftest::pretty_print_c_tests): Call it.
986 2018-11-30  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
988         Minimize clone counter memory usage in create_virtual_clone.
989         * cgraph.h (clone_function_name): Add a variant that takes a
990         tree decl.
991         * cgraph.h (cgraph_node::create_virtual_clone): Add a new
992         argument: num_suffix.
993         * cgraphclones.c (cgraph_node::create_virtual_clone): Pass
994         num_suffix to clone_function_name.
995         (clone_function_name): Add a variant that takes a tree decl.
996         * ipa-cp.c (create_specialized_node): Keep track of clone
997         counters in clone_num_suffixes hash map.
998         (ipcp_driver): Free the counter hash map.
999         * ipa-hsa.c (process_hsa_functions): Creates at most one hsa
1000         clone per function.
1002 2018-11-30  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
1003         Make function assembly more independent.
1005         This is achieved by having clone_function_name assign unique clone
1006         numbers for each function independently.
1008         * cgraphclones.c: Replaced clone_fn_id_num with clone_fn_ids;
1009         hash map.
1010         (clone_function_name_numbered): Use clone_fn_ids.
1012 2018-11-30  Vladimir Makarov  <vmakarov@redhat.com>
1014         PR rtl-optimization/88179
1015         * lra-constraints.c (address_eliminator::address_eliminator):
1016         Don't eleminate regs in illegitimate address.
1018 2018-11-30  David Malcolm  <dmalcolm@redhat.com>
1020         PR preprocessor/88257
1021         * input.c (get_substring_ranges_for_loc): Fix indentation.
1022         Bulletproof against getting a different files back from
1023         linemap_resolve_location and expand_location_to_spelling_point.
1025 2018-11-30  Alexander Monakov  <amonakov@ispras.ru>
1027         PR gcov-profile/88279
1028         * tree-profile.c (init_ic_make_global_vars): Call
1029         decl_default_tls_model for variable and not it's type.
1031 2018-11-30  Sam Tebbs  <sam.tebbs@arm.com>
1033         * config/arm/arm.h (TARGET_DOTPROD): Add TARGET_VFP5 constraint.
1035 2018-11-30  Martin Liska  <mliska@suse.cz>
1037         PR sanitizer/81715
1038         * asan.c (asan_shadow_cst): Remove, partially transform
1039         into flush_redzone_payload.
1040         (RZ_BUFFER_SIZE): New.
1041         (struct asan_redzone_buffer): New.
1042         (asan_redzone_buffer::emit_redzone_byte): Likewise.
1043         (asan_redzone_buffer::flush_redzone_payload): Likewise.
1044         (asan_redzone_buffer::flush_if_full): Likewise.
1045         (asan_emit_stack_protection): Use asan_redzone_buffer class
1046         that is responsible for proper aligned stores and flushing
1047         of shadow memory payload.
1048         * asan.h (ASAN_MIN_RED_ZONE_SIZE): New.
1049         (asan_var_and_redzone_size): Likewise.
1050         * cfgexpand.c (expand_stack_vars): Use smaller alignment
1051         (ASAN_MIN_RED_ZONE_SIZE) in order to make shadow memory
1052         for automatic variables more compact.
1054 2018-11-30  Alan Modra  <amodra@gmail.com>
1056         * config/rs6000/predicates.md (easy_fp_constant): Avoid long
1057         dependent insn sequences.
1058         * config/rs6000/rs6000.c (num_insns_constant): Support long
1059         double constants.
1060         * config/rs6000/rs6000.md (mov<mode>_softfloat <FMOVE128>): Adjust
1061         length attribute.
1063 2018-11-30  Alan Modra  <amodra@gmail.com>
1065         * config/rs6000/rs6000.c (num_insns_constant_gpr): Renamed from
1066         num_insns_constant_wide.  Make static.  Revise comment.
1067         (num_insns_constant_multi): New function.
1068         (num_insns_constant): Formatting.  Correct CONST_WIDE_INT
1069         calculation.  Simplify and extract code common to both
1070         CONST_INT and CONST_DOUBLE.  Add gcc_unreachable for unhandled
1071         const_double modes.
1072         * config/rs6000/rs6000-protos.h (num_insns_const_wide): Delete.
1074 2018-11-30  Richard Biener  <rguenther@suse.de>
1076         PR tree-optimization/88274
1077         * tree-vrp.c (ranges_from_anti_range): Fix handling of
1078         TYPE_MIN/MAX_VALUE.
1080 2018-11-29  Andi Kleen  <ak@linux.intel.com>
1082         * config/i386/i386.c (current_fentry_section): Add.
1083         (x86_function_profiler): Handle fentry section.
1084         (ix86_attribute_table): Add fentry section.
1085         * config/i386/i386.opt: Add -mfentry-section.
1086         * doc/extend.texi: Document fentry_section attribute.
1087         * doc/invoke.texi: Document -mfentry-section.
1089 2018-11-29  Andi Kleen  <ak@linux.intel.com>
1091         * config/i386/i386.c (x86_print_call_or_nop): Handle nop name.
1092         (current_fentry_name): Add.
1093         (x86_function_profiler): Handle fentry_name attribute.
1094         (ix86_handle_fentry_name): Add.
1095         (ix86_attribute_table): Add fentry_name.
1096         * config/i386/i386.opt: Add -mfentry-name
1097         * doc/extend.texi: Document fentry_name.
1098         * doc/invoke.texi: Document minstrument-return.
1100 2018-11-29  Andi Kleen  <ak@linux.intel.com>
1102         * config/i386/i386-opts.h (enum instrument_return): Add.
1103         * config/i386/i386.c (output_return_instrumentation): Add.
1104         (ix86_output_function_return): Call output_return_instrumentation.
1105         (ix86_output_call_insn): Call output_return_instrumentation.
1106         * config/i386/i386.opt: Add -minstrument-return=.
1107         * doc/invoke.texi (-minstrument-return): Document.
1109 2018-11-29  Eric Botcazou  <ebotcazou@adacore.com>
1111         PR target/87807
1112         * config/sparc/sparc-modes.def: Minor tweak.
1113         * config/sparc/sparc.c: Minor reordering.
1114         (sparc_pass_by_reference): Move around.
1115         (traverse_record_type): Change offset from HOST_WIDE_INT to int.
1116         (classify_registers): Likewise for bitpos.
1117         (function_arg_slotno): Remove dead test and tweak comments.
1118         <MODE_RANDOM>: Remove useless assertion and test whether the
1119         parameter is named in order to pass it in FP registers.  Return
1120         the regno for floating-point vector types.
1121         (compute_int_layout): Change bitpos from HOST_WIDE_INT to int.
1122         (compute_fp_layout): Likewise.
1123         (count_registers): Likewise.
1124         (assign_int_registers): Likewise.
1125         (assign_fp_registers): Likewise.
1126         (assign_registers): Likewise.
1127         (function_arg_record_value): Change size from HOST_WIDE_INT to int
1128         and use CEIL_NWORDS to compute the number of registers.
1129         (function_arg_union_value): Minor tweaks.
1130         (function_arg_vector_value): Add slotno and named parameters, use
1131         CEIL_NWORDS to compute the number of registers.
1132         (sparc_function_arg_1): Rework handling of vector types.  Change
1133         size from HOST_WIDE_INT to int.
1134         (sparc_arg_partial_bytes): Rework handling of 32-bit ABI and deal
1135         with vector types for the 64-bt ABI.
1136         (sparc_function_arg_advance): Likewise.
1137         (sparc_return_in_memory): Add reference to -fpcc-struct-return.
1138         (sparc_struct_value_rtx): Return NULL_RTX instead of 0.
1139         (sparc_function_value_1): Rework handling of vector types.  Change
1140         size from HOST_WIDE_INT to int.
1142 2018-11-29  Jakub Jelinek  <jakub@redhat.com>
1144         PR target/88152
1145         * config/i386/sse.md (*<sse>_movmsk<ssemodesuffix><avxsizesuffix>_lt,
1146         *<sse>_movmsk<ssemodesuffix><avxsizesuffix>_zext_lt,
1147         *<sse>_movmsk<ssemodesuffix><avxsizesuffix>_shift,
1148         *<sse>_movmsk<ssemodesuffix><avxsizesuffix>_zext_shift,
1149         *<sse2_avx2>_pmovmskb_lt, *<sse2_avx2>_pmovmskb_zext_lt): New
1150         define_insn_and_split patterns.
1152         PR target/54700
1153         * config/i386/sse.md
1154         (*<sse4_1>_blendv<ssemodesuffix><avxsizesuffix>_lt,
1155         *<sse4_1>_blendv<ssefltmodesuffix><avxsizesuffix>_ltint,
1156         *<sse4_1_avx2>_pblendvb_lt): Change define_insn into
1157         define_insn_and_split.
1159 2018-11-29  Peter Bergner  <bergner@linux.ibm.com>
1161         PR target/87496
1162         * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
1163         -mabi=ieeelongdouble without both -mpopcntd and -mvsx.
1165 2018-11-29  Uros Bizjak  <ubizjak@gmail.com>
1167         * config/i386/i386.c (inline_memory_move_cost):
1168         Check "in" for 2 in MMX_CLASS_P case.
1169         * config/i386/mmx.md (*mov<mode>_internal): Correct
1170         TARGET_INTER_UNIT_MOVES_FROM_VEC and TARGET_INTER_UNIT_MOVES_TO_VEC
1171         alternatives in preferred_for_speed attribute calculation.
1173 2018-11-29  Martin Sebor  <msebor@redhat.com>
1175         PR c/88172
1176         PR testsuite/88208
1177         * doc/extend.texi (attribute constructor): Clarify.
1179 2018-11-29  Martin Liska  <mliska@suse.cz>
1181         PR middle-end/88246
1182         * builtins.c (expand_movstr): Fix thinko introduced
1183         when switching to the new enum.
1185 2018-11-29  qing zhao  <qing.zhao@oracle.com>
1187         * cif-code.def (EXTERN_LIVE_ONLY_STATIC): New CIF code.
1188         * common.opt: Add -flive-patching flag.
1189         * doc/invoke.texi: Document -flive-patching.
1190         * flag-types.h (enum live_patching_level): New enum.
1191         * ipa-inline.c (can_inline_edge_p): Disable external functions from
1192         inlining when flag_live_patching is LIVE_PATCHING_INLINE_ONLY_STATIC.
1193         * opts.c (control_options_for_live_patching): New function.
1194         (finish_options): Make flag_live_patching incompatible with flag_lto.
1195         Control IPA optimizations based on different levels of
1196         flag_live_patching.
1198 2018-11-29  Giuliano Belinassi  <giuliano.belinassi@usp.br>
1200         * match.pd (sinh (atanh (x))): New simplification rules.
1201         (cosh (atanh (x))): Likewise.
1203 2018-11-29  Jakub Jelinek  <jakub@redhat.com>
1205         PR target/54700
1206         * config/i386/sse.md (ssebytemode): Add V16SI, V8SI and V4SI entries.
1207         (ssefltmodesuffix, ssefltvecmode): New define_mode_attrs.
1208         (*<sse4_1>_blendv<ssemodesuffix><avxsizesuffix>_lt,
1209         *<sse4_1>_blendv<ssefltmodesuffix><avxsizesuffix>_ltint,
1210         *<sse4_1_avx2>_pblendvb_lt): New define_insns.
1212         PR target/88152
1213         * tree.h (build_uniform_cst, uniform_integer_cst_p): Declare.
1214         * tree.c (build_uniform_cst, uniform_integer_cst_p): New functions.
1215         * match.pd (define_predicates): Add uniform_integer_cst_p.
1216         (cmp @0 INTEGER_CST@1, cmp (convert?@2 @0) INTEGER_CST@1): Adjust
1217         so that it works also for vector comparisons with uniform constants
1218         with INTEGER_CST element.
1220         PR target/88234
1221         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): For
1222         vec_add and vec_sub builtins, perform PLUS_EXPR or MINUS_EXPR
1223         in unsigned_type_for instead of vector integral type where overflow
1224         doesn't wrap.
1226 2018-11-29  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
1228         There can be at most one .resolver clone per function
1229         * config/rs6000/rs6000.c (make_resolver_func): Generate
1230         resolver symbol with clone_function_name instead of
1231         clone_function_name_numbered.
1233 2018-11-29  Richard Biener  <rguenther@suse.de>
1235         PR tree-optimization/88243
1236         * tree-vect-patterns.c (vect_mark_pattern_stmts): Set the def
1237         type of all pattern-sequence stmts to vect_internal_def.
1239 2018-11-29  Andre Vieira  <andre.simoesdiasvieira@arm.com>
1241         PR target/88224
1242         * config/arm/arm-cpus.in (armv7-r): Add FP16conv configurations.
1243         (cortex-r7, cortex-r8): Update default and add new configuration.
1244         * doc/invoke.texi (armv7-r): Add two new vfp options.
1245         (nofp.dp): Add cortex-r7 and cortex-r8 to the list of targets that
1246         support this option.
1248 2018-11-29  Alan Modra  <amodra@gmail.com>
1250         * config/rs6000/rs6000.c (rs6000_emit_move): Disable long
1251         double split for targets other than Darwin.
1253 2018-11-29  Alan Modra  <amodra@gmail.com>
1255         * config/rs6000/rs6000.md (movdi_internal64): Correct lengths.
1257 2018-11-29  Alan Modra  <amodra@gmail.com>
1259         * config/rs6000/predicates.md (easy_fp_constant): Remove code
1260         dealing with integers in const_double.  Assert on unexpected
1261         modes.  Delete superfluous ABI_V4 test.
1262         * config/rs6000/rs6000.c (rs6000_emit_move): Comment fixes.
1263         Don't call easy_fp_constant for Pmode.
1264         (rs6000_hash_constant): Remove code dealing with integers in
1265         const_double.
1266         (rs6000_legitimate_constant_p): Likewise.
1267         (output_toc): Formatting, use CONST_DOUBLE_P.
1269 2018-11-29  Alan Modra  <amodra@gmail.com>
1271         * config/rs6000/constraints.md (G, H): Comment on purpose of
1272         constraint.  Correct mode comments and "G" mode test.
1273         * config/rs6000/rs6000.md (movdi_internal32): Remove "GH" from
1274         alternative handling "F".  Add length attr.  Formatting.
1275         (mov<mode>_softfloat <FMOVE128>): Delete "GH" from
1276         alternative, and move "F" to separate alternative.  Correct
1277         insn lengths.
1279 2018-11-29  Alan Modra  <amodra@gmail.com>
1281         * config/rs6000/predicates.md (easy_vector_constant): Don't call
1282         easy_fp_constant.
1284 2018-11-29  Alan Modra  <amodra@gmail.com>
1286         * config.in (HAVE_AS_PLTSEQ): Add.
1287         * config/rs6000/predicates.md (indirect_call_operand): New.
1288         * config/rs6000/rs6000-protos.h (rs6000_pltseq_template),
1289         (rs6000_sibcall_sysv): Declare.
1290         * config/rs6000/rs6000.c (init_cumulative_args): Set cookie
1291         CALL_LONG for -fno-plt.
1292         (print_operand <T, z, 0>): Handle UNSPEC_PLTSEQ.
1293         (rs6000_indirect_call_template_1): Emit .reloc directives for
1294         UNSPEC_PLTSEQ calls.
1295         (rs6000_pltseq_template): New function.
1296         (rs6000_longcall_ref): Add arg parameter.  Use PLT16 insns if
1297         relocs supported by assembler.  Move SYMBOL_REF test to callers.
1298         (rs6000_call_aix): Adjust rs6000_longcall_ref call.  Package
1299         insns in UNSPEC_PLTSEQ, preserving original func_desc.
1300         (rs6000_call_sysv): Likewise.
1301         (rs6000_sibcall_sysv): New function.
1302         * config/rs6000/rs6000.h (HAVE_AS_PLTSEQ): Provide default.
1303         * config/rs6000/rs6000.md (UNSPEC_PLTSEQ, UNSPEC_PLT16_HA,
1304         UNSPEC_PLT16_LO): New.
1305         (pltseq_tocsave, pltseq_plt16_ha, pltseq_plt16_lo, pltseq_mtctr): New.
1306         (call_indirect_nonlocal_sysv): Don't differentiate zero from non-zero
1307         cookie in constraints.  Test explicitly for flags in length attr.
1308         Handle unspec operand 1.
1309         (call_value_indirect_nonlocal_sysv): Likewise.
1310         (call_indirect_aix, call_value_indirect_aix): Handle unspec operand 1.
1311         (call_indirect_elfv2, call_value_indirect_elfv2): Likewise.
1312         (sibcall, sibcall_value): Use rs6000_sibcall_sysv.
1313         (sibcall_indirect_nonlocal_sysv): New pattern.
1314         (sibcall_value_indirect_nonlocal_sysv): Likewise.
1315         (sibcall_nonlocal_sysv, sibcall_value_nonlocal_sysv): Remove indirect
1316         call alternatives.
1317         * configure.ac: Check for gas plt sequence marker support.
1318         * configure: Regenerate.
1320 2018-11-29  Alan Modra  <amodra@gmail.com>
1322         * config/rs6000/predicates.md (unspec_tls): New.
1323         * config/rs6000/rs6000-protos.h (rs6000_call_template),
1324         (rs6000_sibcall_template): Update prototype.
1325         (rs6000_longcall_ref): Delete.
1326         (rs6000_call_sysv): Declare.
1327         * config/rs6000/rs6000.c (edit_tls_call_insn): New function.
1328         (global_tlsarg): New variable.
1329         (rs6000_legitimize_tls_address): Rewrite __tls_get_addr call
1330         handling.
1331         (print_operand): Extract UNSPEC_TLSGD address operand.
1332         (rs6000_call_template, rs6000_sibcall_template): Remove arg
1333         parameter, extract from second call operand instead.
1334         (rs6000_longcall_ref): Make static, localize vars.
1335         (rs6000_call_aix): Rename parameter to reflect new usage.  Take
1336         tlsarg from global_tlsarg.  Don't create unused rtl or nop insns.
1337         (rs6000_sibcall_aix): Rename parameter to reflect new usage.  Take
1338         tlsarg from global_tlsarg.
1339         (rs6000_call_sysv): New function.
1340         * config/rs6000/rs6000.md: Adjust rs6000_call_template and
1341         rs6000_sibcall_template throughout.
1342         (tls_gd_aix, tls_gd_sysv, tls_gd_call_aix, tls_gd_call_sysv): Delete.
1343         (tls_ld_aix, tls_ld_sysv, tls_ld_call_aix, tls_ld_call_sysv): Delete.
1344         (tls_gdld_nomark): New insn.
1345         (tls_gd): Swap operand order.  Simplify mode selection.
1346         (tls_gd_high, tls_gd_low): Swap operand order.
1347         (tls_ld): Remove const_int 0 vector element from UNSPEC_TLSLD.
1348         Simplify mode selection.
1349         (tls_ld_high, tls_ld_low): Similarly adjust UNSPEC_TLSLD.
1350         (call, call_value): Don't assert for second call operand.
1351         Use rs6000_call_sysv.
1353 2018-11-29  Alan Modra  <amodra@gmail.com>
1355         * config/rs6000/darwin.md (call_indirect_nonlocal_darwin64),
1356         (call_nonlocal_darwin64, call_value_indirect_nonlocal_darwin64),
1357         (call_value_nonlocal_darwin64): Remove constraints from second call
1358         arg, the rounded_stack_size_rtx arg.
1359         * config/rs6000/rs6000.md (tls_gd_aix, tls_gd_sysv, tls_gd_call_aix),
1360         (tls_gd_call_sysv, tls_ld_aix, tls_ld_sysv, tls_ld_call_aix),
1361         (tls_ld_call_sysv, call_local32, call_local64, call_value_local32),
1362         (call_value_local64, call_indirect_nonlocal_sysv),
1363         (call_nonlocal_sysv, call_nonlocal_sysv_secure),
1364         (call_value_indirect_nonlocal_sysv, call_value_nonlocal_sysv),
1365         (call_value_nonlocal_sysv_secure, call_local_aix),
1366         (call_value_local_aix, call_nonlocal_aix, call_value_nonlocal_aix),
1367         (call_indirect_aix, call_value_indirect_aix, call_indirect_elfv2),
1368         (call_value_indirect_elfv2, sibcall_local32, sibcall_local64),
1369         (sibcall_value_local32, sibcall_value_local64, sibcall_aix),
1370         (sibcall_value_aix): Likewise.
1372 2018-11-29  Alan Modra  <amodra@gmail.com>
1374         * config/rs6000/rs6000.md (TLSmode): Delete mode iterator.  Replace
1375         with P throughout except for call mems which should use SI.
1376         (tls_abi_suffix, tls_sysv_suffix, tls_insn_suffix): Delete mode
1377         attributes.  Replace with bits, mode and ptrload respectively.
1379 2018-11-29  Alan Modra  <amodra@gmail.com>
1381         * config/rs6000/rs6000-protos.h (rs6000_indirect_call_template),
1382         (rs6000_indirect_sibcall_template): Declare.
1383         * config/rs6000/rs6000.c (rs6000_indirect_call_template_1),
1384         (rs6000_indirect_call_template, rs6000_indirect_sibcall_template):
1385         New functions.
1386         * config/rs6000/rs6000.md (call_indirect_nonlocal_sysv),
1387         (call_value_indirect_nonlocal_sysv, sibcall_nonlocal_sysv),
1388         (call_indirect_aix, call_value_indirect_aix): Use
1389         rs6000_indirect_call_template and rs6000_indirect_sibcall_template.
1390         call_indirect_elfv2, call_value_indirect_elfv2): Likewise, and
1391         handle both speculation and non-speculation cases.
1392         (call_indirect_aix_nospec, call_value_indirect_aix_nospec): Delete.
1393         (call_indirect_elfv2_nospec, call_value_indirect_elfv2_nospec): Delete.
1395 2018-11-29  Alan Modra  <amodra@gmail.com>
1397         * config/rs6000/rs6000-protos.h (rs6000_call_template): Declare.
1398         (rs6000_sibcall_template): Declare.
1399         (macho_call_template): Rename from output_call.
1400         * config/rs6000/rs6000.c (rs6000_call_template_1): New function.
1401         (rs6000_call_template, rs6000_sibcall_template): Likewise.
1402         (macho_call_template): Rename from output_call.
1403         * config/rs6000/rs6000.md (tls_gd_aix, tls_gd_sysv),
1404         (tls_gd_call_aix, tls_gd_call_sysv, tls_ld_aix, tls_ld_sysv),
1405         (tls_ld_call_aix, tls_ld_call_sysv, call_nonlocal_sysv),
1406         (call_nonlocal_sysv_secure, call_value_nonlocal_sysv),
1407         (call_value_nonlocal_sysv_secure, call_nonlocal_aix),
1408         (call_value_nonlocal_aix): Use rs6000_call_template and update
1409         occurrences of output_call to macho_call_template.
1410         (sibcall_nonlocal_sysv, sibcall_value_nonlocal_sysv, sibcall_aix),
1411         (sibcall_value_aix): Use rs6000_sibcall_template.
1413 2018-11-28  Aaron Sawdey  <acsawdey@linux.ibm.com>
1415         * config/rs6000/rs6000-string.c (expand_block_clear): Change how
1416         we determine if unaligned vsx is ok.
1418 2018-11-28  Jan Hubicka  <jh@suse.cz>
1420         * predict.c (determine_unlikely_bbs): Forward declare; also determine
1421         edges that are always known to be taken because it is only likely
1422         edge out of given BB.
1423         (tree_estimate_probability): Call before profile guessing to get bit
1424         of extra precision.
1426 2018-11-28  Jan Hubicka  <jh@suse.cz>
1428         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Handle
1429         profile_probability::always better.
1431 2018-11-28  Jan Hubicka  <jh@suse.cz>
1433         * profile-count.h (profile_count::split): Give better result when
1434         splitting profile_probability::always.
1436 2018-11-28  Vladimir Makarov  <vmakarov@redhat.com>
1438         PR target/88207
1439         * ira-costs.c (scan_one_insn): Process subregs when updating costs
1440         for pseudos and allocnos from insn.
1442 2018-11-28  David Edelsohn  <dje.gcc@gmail.com>
1444         * config/rs6000/aix72.h: Update to match aix71.h changes.
1446 2018-11-28  Jeff Law  <law@redhat.com>
1448         * config/h8300/constraints.md: Add "C" constraint for call insns.
1449         * config/h8300/h8300.md (call, call_value): Turn into a define_expand
1450         and define_insn pair.  Move invalid call targets into a register in
1451         the expander and fix constraints in the matching pattern.
1452         * config/h8300/predicates.md (call_expander_operand): Renamed from
1453         call_insn_operand.  Reject things we shouldn't be trying to handle.
1454         (call_insn_operand): New predicate for use by the call/call_value
1455         insns.
1456         (small_call_insn_operand): Update appropriately.
1458 2018-11-28  Sam Tebbs  <sam.tebbs@arm.com>
1460         * config/aarch64/aarch64.c (aarch64_process_target_attr): Replace
1461         calls to strtok with strtok_r.
1463 2018-11-28  Richard Biener  <rguenther@suse.de>
1465         PR tree-optimization/88223
1466         * tree-ssa-sccvn.c (vn_reference_lookup_3): When skipping
1467         over a stored-same value may-alias store make sure to consider
1468         partial overlaps which are valid when TBAA reasonings do not
1469         apply and byte-granular overlaps are possible at all.
1471 2018-11-28  Richard Biener  <rguenther@suse.de>
1473         PR tree-optimization/88217
1474         * vr-values.c (vr_values::extract_range_from_phi_node): Make
1475         sure to handle results > +INF and < -INF correctly when
1476         trying to drop down to +INF - 1 or -INF + 1.
1478 2018-11-28  Alan Modra  <amodra@gmail.com>
1480         * xcoffout.c (do_block): Signed/unsigned warning fix.
1482 2018-11-28  Richard Biener  <rguenther@suse.de>
1484         PR tree-optimization/79351
1485         * tree-ssa-sccvn.c (vn_reference_lookup_3): For assignments from
1486         empty CONSTRUCTORs ensure the store is at a constant position.
1488 2018-11-28  Richard Biener  <rguenther@suse.de>
1490         PR tree-optimization/88229
1491         * tree-ssa.c (non_rewritable_mem_ref_base): Check DECL_SIZE_UNIT
1492         is an INTEGER_CST before accessing it so.
1494 2018-11-28  Sam Tebbs  <sam.tebbs@arm.com>
1496         * doc/invoke.texi (-mtune=): Remove obsolete CPU names.
1498 2018-11-28  Jakub Jelinek  <jakub@redhat.com>
1500         PR target/88189
1501         * config/i386/i386.c (ix86_expand_sse_movcc): Handle DFmode and
1502         SFmode using sse4_1_blendvs[sd] with TARGET_SSE4_1.  Formatting fixes.
1503         * config/i386/sse.md (sse4_1_blendv<ssemodesuffix>): New pattern.
1505 2018-11-27  Martin Liska  <mliska@suse.cz>
1507         * gcov.c (generate_results): Append current_working_directory
1508         only when exists.
1510 2018-11-27  Mike Gulick  <mgulick@mathworks.com>
1512         PR preprocessor/83173
1513         * input.c (dump_location_info): Dump reason and included_from
1514         fields from line_map_ordinary struct.  Fix indentation when
1515         location > 5 digits.
1516         * diagnostic-show-locus.c (num_digits, num_digits): Move to
1517         diagnostic.c to allow it to be utilized by input.c.
1518         * diagnostic.c (num_digits, selftest::test_num_digits): Moved
1519         here.
1520         (selftest::diagnostic_c_tests): Run selftest::test_num_digits.
1521         * diagnostic.h (num_digits): Add extern definition.
1523 2018-11-27  Fredrik Noring  <noring@nocrew.org>
1525         * config/mips/mips.c (mips_reorg_process_insns)
1526         (mips_option_override): Handle `-mfix-r5900'.
1527         * config/mips/mips.h (ASM_SPEC): Add `mfix-r5900' and
1528         `mno-fix-r5900'.
1529         * config/mips/mips.opt (mfix-r5900): New option.
1530         * doc/invoke.texi: Document the `r5900' processor name, and
1531         `-mfix-r5900' and `-mno-fix-r5900' options.
1533 2018-11-27  Jakub Jelinek  <jakub@redhat.com>
1535         PR target/88188
1536         * config/rs6000/rs6000.c (print_operand) <case 'D'>: Use
1537         output_operand_lossage instead of gcc_assert.
1538         <case 't'>: Likewise.
1539         <case 'z'>: Likewise.
1540         <case 'V'>: Use output_operand_lossage instead of gcc_unreachable.
1542 2018-11-27  Jeff Law  <law@redhat.com>
1544         * config/riscv/riscv (riscv_block_mvoe_straight): Use RETURN_BEGIN
1545         in call to move_by_pieces.
1547         * config/sh/sh-mem.c (expand_block_move): Use RETURN_BEGIN in call
1548         to move_by_pieces.
1550         * config/lm32/lm32.c (lm32_block_move_inline): Use RETURN_BEGIN in
1551         call to move_by_pieces.
1553         * config/mips/mips.c (mips_block_move_straight): Use RETURN_BEGIN
1554         in call to move_by_pieces.
1556         * config/microblaze/microblaze.c (microblaze_block_move_straight): Use
1557         RETURN_BEGIN in call to move_by_pieces.
1558         (microblaze_expand_block_move): Likewise.
1560 2018-11-27  Tamar Christina  <tamar.christina@arm.com>
1562         * doc/md.texi (xorsign): Document it.
1564 2018-11-27  Martin Liska  <mliska@suse.cz>
1566         * config/gnu-user.h (TARGET_F951_OPTIONS): New.
1567         * gcc.c (find_fortran_preinclude_file): New function
1568         to handle Fortran pre-include.
1570 2018-11-27  Martin Liska  <mliska@suse.cz>
1572         * asan.c (asan_emit_stack_protection): Use new enum values
1573         instead of int constants.
1574         * builtins.c (expand_builtin_memory_copy_args): Replace int
1575         type with memop_ret enum type.
1576         (expand_builtin_mempcpy_args): Likewise.
1577         (expand_builtin_memcpy): Use new enum values
1578         instead of int constants. Likewise.
1579         (expand_builtin_mempcpy): Likewise.
1580         (expand_movstr): Likewise.
1581         (expand_builtin_strcpy_args): Likewise.
1582         (expand_builtin_stpcpy_1): Likewise.
1583         (expand_builtin_strncpy): Likewise.
1584         (expand_builtin_memset_args): Likewise.
1585         * expr.c (move_by_pieces_d::finish_endp): Rename to ...
1586         (move_by_pieces_d::finish_retmode): ... this.
1587         (move_by_pieces): Change last argument type to memop_ret.
1588         (store_by_pieces): Use new enum values
1589         instead of int constants.
1590         (emit_block_move_hints): Likewise.
1591         (emit_push_insn): Likewise.
1592         (store_expr): Likewise.
1593         * expr.h (store_by_pieces): Change int to newly added enum
1594         type.
1595         * rtl.h (enum memop_ret): Define.
1596         (move_by_pieces): Use the enum type.
1598 2018-11-27  Alan Modra  <amodra@gmail.com>
1600         * config/rs6000/aix71.h (ASM_SPEC): Don't select default -maix64
1601         cpu here.
1602         (ASM_CPU_SPEC): Do so here.  Rewrite using if .. else if .. specs
1603         form.  Error on missing -mcpu case.
1604         * config/rs6000/driver-rs6000.c (asm_names <_AIX>): Update NULL case.
1605         (asm_names <!_AIX>): Add missing cpus.  Update NULL case.  Apply
1606         PR63177 fix for -mcpu=power8 and -mcpu=powerpc64le.
1607         * config/rs6000/rs6000.h (ASM_CPU_SPEC): Rewrite using if ..
1608         else if .. specs form.  Error on missing -mcpu case.  Don't output
1609         duplicate -maltivec.  Apply PR63177 fix for -mcpu=powerpc64le.
1611 2018-11-26  David Malcolm  <dmalcolm@redhat.com>
1613         * dump-context.h (dump_context::dump_loc): Convert 1st param from
1614         dump_flags_t to const dump_metadata_t &.  Convert 2nd param from
1615         const dump_location_t & to const dump_user_location_t &.
1616         (dump_context::dump_loc_immediate): Convert 2nd param from
1617         const dump_location_t & to const dump_user_location_t &.
1618         (dump_context::dump_gimple_stmt): Convert 1st param from
1619         dump_flags_t to const dump_metadata_t &.
1620         (dump_context::void dump_gimple_stmt_loc): Likewise; convert
1621         2nd param from const dump_location_t & to
1622         const dump_user_location_t &.
1623         (dump_context::dump_gimple_expr): Convert 1st param from
1624         dump_flags_t to const dump_metadata_t &.
1625         (dump_context::dump_gimple_expr_loc): Likewise; convert
1626         2nd param from const dump_location_t & to
1627         const dump_user_location_t &.
1628         (dump_context::dump_generic_expr): Convert 1st param from
1629         dump_flags_t to const dump_metadata_t &.
1630         (dump_context::dump_generic_expr_loc): Likewise; convert
1631         2nd param from const dump_location_t & to
1632         const dump_user_location_t &.
1633         (dump_context::dump_printf_va): Convert 1st param from
1634         dump_flags_t to const dump_metadata_t &.
1635         (dump_context::dump_printf_loc_va): Likewise; convert
1636         2nd param from const dump_location_t & to
1637         const dump_user_location_t &.
1638         (dump_context::dump_dec): Convert 1st param from
1639         dump_flags_t to const dump_metadata_t &.
1640         (dump_context::dump_symtab_node): Likewise.
1641         (dump_context::begin_scope): Split out 2nd param into
1642         user and impl locations.
1643         (dump_context::ensure_pending_optinfo): Add metadata param.
1644         (dump_context::begin_next_optinfo): Replace dump_location_t param
1645         with metadata and user location.
1646         * dumpfile.c (dump_context::dump_loc): Convert 1st param from
1647         dump_flags_t to const dump_metadata_t &.  Convert 2nd param from
1648         const dump_location_t & to const dump_user_location_t &.
1649         (dump_context::dump_loc_immediate): Convert 2nd param from
1650         const dump_location_t & to const dump_user_location_t &.
1651         (dump_context::dump_gimple_stmt): Convert 1st param from
1652         dump_flags_t to const dump_metadata_t &.
1653         (dump_context::void dump_gimple_stmt_loc): Likewise; convert
1654         2nd param from const dump_location_t & to
1655         const dump_user_location_t &.
1656         (dump_context::dump_gimple_expr): Convert 1st param from
1657         dump_flags_t to const dump_metadata_t &.
1658         (dump_context::dump_gimple_expr_loc): Likewise; convert
1659         2nd param from const dump_location_t & to
1660         const dump_user_location_t &.
1661         (dump_context::dump_generic_expr): Convert 1st param from
1662         dump_flags_t to const dump_metadata_t &.
1663         (dump_context::dump_generic_expr_loc): Likewise; convert
1664         2nd param from const dump_location_t & to
1665         const dump_user_location_t &.
1666         (dump_context::dump_printf_va): Convert 1st param from
1667         dump_flags_t to const dump_metadata_t &.
1668         (dump_context::dump_printf_loc_va): Likewise; convert
1669         2nd param from const dump_location_t & to
1670         const dump_user_location_t &.
1671         (dump_context::dump_dec): Convert 1st param from
1672         dump_flags_t to const dump_metadata_t &.
1673         (dump_context::dump_symtab_node): Likewise.
1674         (dump_context::begin_scope): Split out 2nd param into
1675         user and impl locations.
1676         (dump_context::ensure_pending_optinfo): Add metadata param.
1677         (dump_context::begin_next_optinfo): Replace dump_location_t param
1678         with metadata and user location.
1679         (dump_gimple_stmt): Convert 1st param from dump_flags_t to
1680         const dump_metadata_t &.
1681         (dump_gimple_stmt_loc): Likewise; convert 2nd param from
1682         const dump_location_t & to const dump_user_location_t &.
1683         (dump_gimple_expr): Convert 1st param from dump_flags_t to
1684         const dump_metadata_t &.
1685         (dump_gimple_expr_loc): Likewise; convert 2nd param from
1686         const dump_location_t & to const dump_user_location_t &.
1687         (dump_generic_expr): Convert 1st param from dump_flags_t to
1688         const dump_metadata_t &.
1689         (dump_generic_expr_loc): Likewise; convert 2nd param from
1690         const dump_location_t & to const dump_user_location_t &.
1691         (dump_printf): Convert 1st param from dump_flags_t to
1692         const dump_metadata_t &.
1693         (dump_printf_loc): Likewise; convert 2nd param from
1694         const dump_location_t & to const dump_user_location_t &.
1695         (dump_dec): Convert 1st param from dump_flags_t to
1696         const dump_metadata_t &.
1697         (dump_symtab_node): Likewise.
1698         (dump_begin_scope): Split out 2nd param into user and impl
1699         locations.
1700         (selftest::assert_impl_location_eq): New function.
1701         (ASSERT_IMPL_LOCATION_EQ): New macro.
1702         (selftest::test_impl_location): Update to use
1703         ASSERT_IMPL_LOCATION_EQ.
1704         (selftest::test_capture_of_dump_calls): Convert "loc" to
1705         dump_user_location_t.  Add ASSERT_IMPL_LOCATION_EQ throughout,
1706         verifying line numbers of dump emissions.
1707         * dumpfile.h (class dump_metadata_t): New class.
1708         (dump_printf): Convert 1st param from dump_flags_t to
1709         const dump_metadata_t &.
1710         (dump_printf_loc): Likewise; convert 2nd param from
1711         const dump_location_t & to const dump_user_location_t &.
1712         (dump_generic_expr_loc): Likewise.
1713         (dump_generic_expr): Convert 1st param from dump_flags_t to
1714         const dump_metadata_t &.
1715         (dump_gimple_stmt_loc): Likewise; convert 2nd param from
1716         const dump_location_t & to const dump_user_location_t &.
1717         (dump_gimple_stmt): Convert 1st param from dump_flags_t to
1718         const dump_metadata_t &.
1719         (dump_gimple_expr_loc): Likewise; convert 2nd param from
1720         const dump_location_t & to const dump_user_location_t &.
1721         (dump_gimple_expr): Convert 1st param from dump_flags_t to
1722         const dump_metadata_t &.
1723         (dump_symtab_node): Likewise.
1724         (dump_dec): Likewise.
1725         (dump_begin_scope): Split out 2nd param into user and impl
1726         locations.
1727         (auto_dump_scope::auto_dump_scope): Split "loc" param into a user
1728         location and impl_location, and capture the impl_location.
1729         (AUTO_DUMP_SCOPE): Rename param from LOC to USER_LOC.
1730         * loop-unroll.c (report_unroll): Update for changes to
1731         dump_printf_loc and dump_printf.
1732         * opt-problem.cc (opt_problem::opt_problem): Update for change to
1733         dump_loc.
1734         * optinfo-emit-json.cc
1735         (selftest::test_building_json_from_dump_calls): Convert "loc" from
1736         dump_location_t to dump_user_location_t.
1737         * optinfo.cc (optinfo::emit_for_opt_problem): Update for change in
1738         dump_loc_immediate.
1739         * profile.c (compute_branch_probabilities): Update for change to
1740         dump_printf_loc.
1741         * selftest.h (ASSERT_STR_CONTAINS_AT): New macro.
1742         * tree-vect-slp.c (vect_print_slp_tree): Update for change to
1743         dump_printf_loc.
1745 2018-11-27  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1747         * doc/sourcebuild.texi: Document check_effective_target_int_eq_float
1748         and check_effective_target_ptr_eq_long.
1750 2018-11-27  Alan Modra  <amodra@gmail.com>
1752         * config.gcc (powerpc*-*-freebsd*, powerpc-*-netbsd*),
1753         (powerpc-*-eabisimaltivec*, powerpc-*-eabisim*, powerpc-*-elf*),
1754         (powerpc-*-eabialtivec*, powerpc-*-eabi*, powerpc-*-rtems*),
1755         (powerpc-wrs-vxworks*, powerpc-*-lynxos*, powerpcle-*-elf*),
1756         (powerpcle-*-eabisim*, powerpcle-*-eabi*): Add gnu-user.h to tm_file.
1757         * config/rs6000/freebsd.h (CPLUSPLUS_CPP_SPEC),
1758         (LINK_GCC_C_SEQUENCE_SPEC): Undef.
1759         (ASM_APP_ON, ASM_APP_OFF): Don't define.
1760         * config/rs6000/freebsd64.h (ASM_APP_ON, ASM_APP_OFF): Don't define.
1761         * config/rs6000/lynx.h (ASM_APP_ON, ASM_APP_OFF): Don't define.
1762         * config/rs6000/linux64.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
1763         * config/rs6000/netbsd.h (CPLUSPLUS_CPP_SPEC),
1764         (LINK_GCC_C_SEQUENCE_SPEC): Undef.
1765         * config/rs6000/rtems.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
1766         * config/rs6000/sysv4.h (GNU_USER_TARGET_CRTI): Redefine.
1767         (GNU_USER_TARGET_CRTN): Redefine.
1768         (CC1_SPEC): Use GNU_USER_TARGET_CC1_SPEC.
1769         (LIB_LINUX_SPEC): Use GNU_USER_TARGET_LIB_SPEC.
1770         (CRTOFFLOADBEGIN, CRTOFFLOADEND): Don't define.
1771         (STARTFILE_LINUX_SPEC): Define as GNU_USER_TARGET_STARTFILE_SPEC.
1772         (ENDFILE_LINUX_SPEC): Define as GNU_USER_TARGET_ENDFILE_SPEC.
1773         (UCLIBC_DYNAMIC_LINKER, CHOOSE_DYNAMIC_LINKER): Don't define.
1774         (LINK_EH_SPEC): Don't define.
1776 2018-11-26  Martin Sebor  <msebor@redhat.com>
1778         PR 87756
1779         * expr.c (string_constant): Handle top-level decls of all character
1780         types and subobjects of narrow character type.
1782 2018-11-27  Alan Modra  <amodra@gmail.com>
1784         * config.gcc (powerpc*-*-linux*): Add linux.h to tm_file.
1785         * config/rs6000/linux.h (TARGET_OS_CPP_BUILTINS): Use
1786         GNU_USER_TARGET_OS_CPP_BUILTINS.
1787         (RS6000_ABI_NAME): Define.
1788         * config/rs6000/linux64.h (TARGET_OS_CPP_BUILTINS): Use
1789         GNU_USER_TARGET_OS_CPP_BUILTINS.
1790         (MUSL_DYNAMIC_LINKER32): Undef before defining.
1791         (UCLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER64): Don't define.
1792         (CHOOSE_DYNAMIC_LINKER): Don't define.
1793         (GNU_USER_DYNAMIC_LINKER32, GNU_USER_DYNAMIC_LINKER64): Don't define.
1794         * config/rs6000/sysv4.h (MUSL_DYNAMIC_LINKER): Undef before defining.
1795         (CHOOSE_DYNAMIC_LINKER, GNU_USER_DYNAMIC_LINKER): Only define when
1796         not already defined.
1797         (CPP_OS_LINUX_SPEC): Remove defines and asserts handled by
1798         TARGET_OS_CPP_BUILTINS.
1800 2018-11-26  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1802         * doc/sourcebuild.texi: Document check_effective_target_newlib_nano_io.
1804 2018-11-26  Jakub Jelinek  <jakub@redhat.com>
1806         PR target/88195
1807         * config/i386/i386.c (def_builtin2): If tcode == VOID_FTYPE_UINT64
1808         and !TARGET_64BIT, return NULL_TREE.
1810         PR c++/86900
1811         * dwarf2out.c (secname_for_decl): For functions with
1812         DECL_SECTION_NAME if in_cold_section_p, try to return
1813         current_function_section's name if it is a named section.
1815 2018-11-26  Maya Rashish  <coypu@sdf.org>
1817         PR target/58397
1818         * config.host (*-*-netbsd*): Use x-netbsd and host-netbsd.o.
1819         * config/x-netbsd: New file.
1820         * config/host-netbsd: New file.
1822 2018-11-26  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1824         * doc/sourcebuild.texi: Document check_effective_target_size20plus.
1825         Clarify documentation for check_effective_target_size32plus.
1827 2018-11-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
1829         * config/rs6000/rs6000-string.c (expand_cmp_vec_sequence): Rename
1830         and modify expand_strncmp_vec_sequence.
1831         (emit_final_compare_vec): Rename and modify emit_final_str_compare_vec.
1832         (generate_6432_conversion): New function.
1833         (expand_block_compare): Add support for vsx.
1834         (expand_block_compare_gpr): New function.
1835         * config/rs6000/rs6000.opt (rs6000_block_compare_inline_limit): Increase
1836         default limit to 63 because of more compact vsx code.
1838 2018-11-26  Uros Bizjak  <ubizjak@gmail.com>
1840         PR target/88178
1841         * config/i386/i386.c (dbx_register_map): Use IGNORED_DWARF_REGNUM
1842         for registers for which no debug information can be generated.
1843         Use INVALID_REGNUM for non-existent registers.
1844         (dbx64_register_map): Ditto.
1845         (svr4_dbx_register_map): Ditto.
1847 2018-11-26  Sandra Loosemore  <sandra@codesourcery.com>
1849         PR c/57182
1850         * doc/invoke.texi (Optimize Options): Document that
1851         -freorder-functions also uses "hot" and "cold" attributes.
1853 2018-11-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1855         * config/aarch64/aarch64.c (aarch64_mangle_type): Fix typo in comment.
1857 2018-11-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1859         * config/arm/types.md (mul64): Rename to...
1860         (widen_mul64): ... This.
1861         * config/arm/arm-generic.md: Rename mul64 to widen_mul64.
1862         * config/arm/cortex-a15.md: Likewise.
1863         * config/arm/cortex-a5.md: Likewise.
1864         * config/arm/cortex-a53.md: Likewise.
1865         * config/arm/cortex-a57.md: Likewise.
1866         * config/arm/cortex-a7.md: Likewise.
1867         * config/arm/cortex-m4.md: Likewise.
1868         * config/arm/exynos-m1.md: Likewise.
1869         * config/arm/marvell-pj4.md: Likewise.
1870         * config/arm/xgene1.md: Likewise.
1872 2018-11-26  Richard Biener  <rguenther@suse.de>
1874         PR tree-optimization/88182
1875         * tree-vect-loop.c (vectorizable_reduction): Pick up single
1876         correct reduc_def_info.
1877         * tree-vect-slp.c (vect_analyze_slp_instance): Set
1878         STMT_VINFO_REDUC_DEF of the first stmt.
1880 2018-11-26  Andreas Krebbel  <krebbel@linux.ibm.com>
1882         * doc/invoke.texi: Document z14/arch12 -march option.
1884 2018-11-25  Sandra Loosemore  <sandra@codesourcery.com>
1886         PR c/57166
1887         * doc/invoke.texi (Option Summary): Add -Wmissing-noreturn.
1888         (Warning Options): Likewise.
1890 2018-11-25  Sandra Loosemore  <sandra@codesourcery.com>
1892         PR web/79738
1893         * doc/extend.texi (Common Function Attributes): Clarify that
1894         functions with "const" attribute can read const global variables.
1896 2018-11-26  Alan Modra  <amodra@gmail.com>
1898         * config/rs6000/rs6000.h (OBJECT_PEF, TARGET_MACOS): Delete.
1900 2018-11-25  Sandra Loosemore  <sandra@codesourcery.com>
1902         PR other/54265
1903         * doc/extend.texi (Common Variable Attributes): Use preferred
1904         placement of type attributes in examples, plus whitespace fixes.
1905         (Type Attributes): Clarify why placement of attributes
1906         immediately after struct/union/enum keyword is preferred.
1907         (Common Type Attributes): Use preferred placement of type
1908         attributes in examples, plus more whitespace fixes.
1910 2018-11-25  Paul Koning  <ni1d@arrl.net>
1912         * config/pdp11/pdp11.h (TARGET_HAS_NO_HW_DIVIDE): Define.
1914 2018-11-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1916         * doc/sourcebuild.texi (Effective-Target Keywords, Environment
1917         attributes): Document d_runtime.
1919 2018-11-25  Vladimir Makarov  <vmakarov@redhat.com>
1921         PR bootstrap/88157
1922         * ira-costs.c (record_operand_costs): Initiate register move cost
1923         for mode.
1925 2018-11-23  Jeff Law  <law@redhat.com>
1927         PR rtl-optimization/87468
1928         * tree-ssa-threadupdate.c (create_block_for_threading): Clear
1929         EDGE_IGNORE on all outgoing edges of the duplicate block.
1931 2018-11-23  Vladimir Makarov  <vmakarov@redhat.com>
1933         PR bootstrap/88157
1934         * ira-costs.c (record_operand_costs): Use bigger hard reg class if
1935         its mode does not fit to the original class.
1937 2018-11-23  Martin Sebor  <msebor@redhat.com>
1939         PR tree-optimization/87756
1940         * expr.c (string_constant): Synthesize a string literal from
1941         the address of a constant character.
1942         * tree.c (build_string_literal): Add an argument.
1943         * tree.h (build_string_literal): Same.
1945 2018-11-23  Christoph Muellner  <christoph.muellner@theobroma-systems.com>
1947         * config/aarch64/aarch64-cores.def: Define emag.
1948         * config/aarch64/aarch64-tune.md: Regenerated with emag.
1949         * config/aarch64/aarch64.c (emag_tunings): New struct.
1950         * doc/invoke.texi: Document mtune value.
1952 2018-11-23  Christoph Muellner  <christoph.muellner@theobroma-systems.com>
1953             Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
1955         * config/aarch64/aarch64.c (xgene1_tunings): Optimize Xgene1 tunings
1956         for GCC 9.
1957         * config/aarch64/aarch64.c (xgene1_tunings): Add Xgene1 specific
1958         prefetch tunings.
1959         * config/aarch64/aarch64.c (xgene1_addrcost_table): Correct the post-modify
1960         costs.
1961         * config/arm/aarch-cost-tables.h (xgene1_extra_costs): Update the cost table
1962         for XGene1.
1964 2018-11-23  Richard Biener  <rguenther@suse.de>
1966         PR tree-optimization/88149
1967         * tree-vect-slp.c (vect_slp_analyze_node_operations): Detect
1968         the case where there are two different def types for the
1969         same operand at different operand position in the same stmt.
1971 2018-23-11  Mihail Ionescu  <mihail.ionescu@arm.com>
1973         * config/arm/arm.c (arm_expand_compare_and_swap): Simplify and call
1974         gen_atomic_compare_swap_1.
1975         (arm_evpc_neon_vuzp): Likewise gen_neon_vuzp_internal.
1976         (arm_evpc_neon_vtrn): Likewise gen_neon_vtrn_internal.
1977         (arm_evpc_neon_vext): Likewise gen_neon_vext_internal.
1978         (arm_evpc_neon_vzip): Likewise gen_neon_vzip_internal.
1979         (arm_evpc_neon_vrev): Replace the function pointer and simplify the mode
1980         checks.
1981         * config/arm/arm.md (neon_vext<mode>),
1982         (neon_vrev64<mode>, neon_vrev32<mode>),
1983         (neon_vrev16<mode>, neon_vtrn<mode>_internal),
1984         (neon_vzip<mode>_internal, neon_vuzp<mode>_internal): Add an '@'character
1985         before the pattern name.
1986         * config/arm/sync.md:
1987         (atomic_compare_and_swap<CCSI:arch><NARROW:mode>_1),
1988         (atomic_compare_and_swap<CCSI:arch><SIDI:mode>_1): Likewise.
1990 2018-11-23  Jakub Jelinek  <jakub@redhat.com>
1992         PR tree-optimization/86614
1993         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return early
1994         if TREE_NO_WARNING is set on ref.ref.
1996 2018-11-22  Sandra Loosemore  <sandra@codesourcery.com>
1997             Alan Coopersmith  <alan.coopersmith@oracle.com>
1999         PR c/53608
2000         * doc/extend.texi (Designated Inits): Clarify handling of multiple
2001         initializers for unions.
2003 2018-11-22  Jan Hubicka  <jh@suse.cz>
2005         PR lto/88142
2006         * ipa-devirt.c (type_variants_equivalent_p): Drop warn and warned
2007         parameters; do not warn here.
2008         (odr_subtypes_equivalent_p): Likewise.
2009         (warn_odr): Fix typo.
2010         (warn_types_mismatch): Do not output confused warnings on integer types.
2011         (odr_types_equivalent_p): Update.
2013 2018-11-22  Jakub Jelinek  <jakub@redhat.com>
2015         * config/i386/i386.c (ix86_option_override_internal,
2016         ix86_can_inline_p, classify_argument, construct_container,
2017         ix86_expand_prologue, ix86_expand_split_stack_prologue,
2018         ix86_expand_carry_flag_compare, expand_set_or_movmem_via_loop,
2019         expand_setmem_epilogue_via_loop, promote_duplicated_reg,
2020         ix86_expand_set_or_movmem, ix86_init_builtins_va_builtins_abi):
2021         Formatting fixes.
2023         * config/i386/i386.c (ix86_option_override_internal): For
2024         stack_protector_guard related options, use opts_set->x_ instead
2025         of global_options_set. and prefix options with opts->x_ .  Move
2026         defaults for offset and reg into else block.
2028 2018-11-22  Uros Bizjak  <ubizjak@gmail.com>
2030         * config/i386/i386.c (ix86_check_avx_upper_register):
2031         Return true for all SSE registers with mode bitsize > 128.
2033 2018-11-22  Vladimir Makarov  <vmakarov@redhat.com>
2035         PR rtl-optimization/87718
2036         * ira-costs.c: Remove trailing white-spaces.
2037         (record_operand_costs): Add a special treatment for moves
2038         involving a hard register.
2040 2018-11-22  Uros Bizjak  <ubizjak@gmail.com>
2042         * config/i386/i386.c (ix86_avx_emit_vzeroupper): Remove.
2043         (ix86_emit_mode_set) <case AVX_U128>: Emit vzeroupper here.
2045 2018-11-22  Martin Liska  <mliska@suse.cz>
2047         * common/config/i386/i386-common.c (processor_names): Add
2048         static assert and add missing "znver2".
2049         (ix86_get_valid_option_values): Add checking assert for null
2050         values and add "native" value if feasible.
2051         * config/i386/i386.h: Do not declare size of processor_names.
2052         * common/config/i386/i386-common.c:
2053         * config/i386/i386.c: Add static assert for size
2054         of processor_cost_table.
2056 2018-11-22  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
2058         * target-insns.def (stack_protect_combined_set): Define new standard
2059         pattern name.
2060         (stack_protect_combined_test): Likewise.
2061         * cfgexpand.c (stack_protect_prologue): Try new
2062         stack_protect_combined_set pattern first.
2063         * function.c (stack_protect_epilogue): Try new
2064         stack_protect_combined_test pattern first.
2065         * config/arm/arm.c (require_pic_register): Add pic_reg and compute_now
2066         parameters to control which register to use as PIC register and force
2067         reloading PIC register respectively.  Insert in the stream of insns if
2068         possible.
2069         (legitimize_pic_address): Expose above new parameters in prototype and
2070         adapt recursive calls accordingly.  Use pic_reg if non null instead of
2071         cached one.
2072         (arm_load_pic_register): Add pic_reg parameter and use it if non null.
2073         (arm_legitimize_address): Adapt to new legitimize_pic_address
2074         prototype.
2075         (thumb_legitimize_address): Likewise.
2076         (arm_emit_call_insn): Adapt to require_pic_register prototype change.
2077         (arm_expand_prologue): Adapt to arm_load_pic_register prototype change.
2078         (thumb1_expand_prologue): Likewise.
2079         * config/arm/arm-protos.h (legitimize_pic_address): Adapt to prototype
2080         change.
2081         (arm_load_pic_register): Likewise.
2082         * config/arm/predicated.md (guard_addr_operand): New predicate.
2083         (guard_operand): New predicate.
2084         * config/arm/arm.md (movsi expander): Adapt to legitimize_pic_address
2085         prototype change.
2086         (builtin_setjmp_receiver expander): Adapt to thumb1_expand_prologue
2087         prototype change.
2088         (stack_protect_combined_set): New expander..
2089         (stack_protect_combined_set_insn): New insn_and_split pattern.
2090         (stack_protect_set_insn): New insn pattern.
2091         (stack_protect_combined_test): New expander.
2092         (stack_protect_combined_test_insn): New insn_and_split pattern.
2093         (arm_stack_protect_test_insn): New insn pattern.
2094         * config/arm/thumb1.md (thumb1_stack_protect_test_insn): New insn pattern.
2095         * config/arm/unspecs.md (UNSPEC_SP_SET): New unspec.
2096         (UNSPEC_SP_TEST): Likewise.
2097         * doc/md.texi (stack_protect_combined_set): Document new standard
2098         pattern name.
2099         (stack_protect_set): Clarify that the operand for guard's address is
2100         legal.
2101         (stack_protect_combined_test): Document new standard pattern name.
2102         (stack_protect_test): Clarify that the operand for guard's address is
2103         legal.
2105 2018-11-22  Richard Biener  <rguenther@suse.de>
2107         PR tree-optimization/88148
2108         * tree-ssa-loop-niter.c (simplify_replace_tree): Get optional
2109         valueization callback parameter and handle it.
2110         * tree-ssa-loop-niter.h (simplify_replace_tree): Export.
2111         * tree-ssa-sccvn.c (process_bb): Eliminate in loop niter trees.
2113 2018-11-22  Richard Biener  <rguenther@suse.de>
2115         PR lto/87229
2116         PR lto/88112
2117         * lto-streamer-out.c (lto_is_streamable): Allow CALL_EXPRs
2118         which can appear in size expressions.
2119         * tree-streamer-in.c (unpack_ts_base_value_fields): Stream
2120         CALL_EXPR_BY_DESCRIPTOR.
2121         (streamer_read_tree_bitfields): Stream CALL_EXPR_IFN.
2122         * tree-streamer-out.c (pack_ts_base_value_fields): Stream
2123         CALL_EXPR_BY_DESCRIPTOR.
2124         (streamer_write_tree_bitfields): Stream CALL_EXPR_IFN.
2126         Revert
2127         PR lto/87229
2128         * tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
2129         sizepos values.
2131 2018-11-22  Richard Biener  <rguenther@suse.de>
2133         PR tree-optimization/88069
2134         * tree-ssa-sccvn.c (visit_phi): Tweak previous fix to not
2135         apply to default defs.
2137 2018-11-22  Jakub Jelinek  <jakub@redhat.com>
2139         PR target/85644
2140         PR target/86832
2141         * config/i386/i386.c (ix86_option_override_internal): Default
2142         ix86_stack_protector_guard to SSP_TLS only if TARGET_THREAD_SSP_OFFSET
2143         is defined.
2144         * config/i386/i386.md (stack_protect_set, stack_protect_set_<mode>,
2145         stack_protect_test, stack_protect_test_<mode>): Use empty condition
2146         instead of TARGET_SSP_TLS_GUARD.
2148 2018-11-22  Martin Liska  <mliska@suse.cz>
2150         PR sanitizer/88017
2151         * config/i386/i386.c (ix86_option_override_internal): Error
2152         about usage -mabi=ms and -fsanitize=thread.
2154 2018-11-21  Uros Bizjak  <ubizjak@gmail.com>
2156         Revert the revert:
2157         2013-10-26  Vladimir Makarov  <vmakarov@redhat.com>
2159         Revert:
2160         2013-10-25  Vladimir Makarov  <vmakarov@redhat.com>
2162         * lra-spills.c (lra_final_code_change): Remove useless move insns.
2164 2018-11-21  Uros Bizjak  <ubizjak@gmail.com>
2166         PR middle-end/88129
2167         * function.c (expand_function_end): Do not emit extra blockage insn.
2169 2018-11-21  Lokesh Janghel  <lokeshjanghel91@gmail.com>
2171         PR target/85667
2172         * config/i386/i386.c (function_value_ms_64): Return AX_REG instead
2173         of FIRST_SSE_REG for 4 or 8 byte modes.
2175 2018-11-21  Jan Hubicka  <jh@suse.cz>
2177         PR lto/87957
2178         * tree.c (fld_decl_context): Break out from ...
2179         (free_lang_data_in_decl): ... here; free TREE_PUBLIC, TREE_PRIVATE
2180         DECL_ARTIFICIAL of TYPE_DECL; do not free TREE_TYPE of TYPE_DECL.
2181         (fld_incomplete_type_of): Build copy of TYP_DECL.
2182         * ipa-devirt.c (free_enum_values): Rename to ...
2183         (free_odr_warning_data): ... this one; free also duplicated TYPE_DECLs
2184         and TREE_TYPEs of TYPE_DECLs.
2185         (get_odr_type): Initialize odr_vtable_hash if needed.
2187 2018-11-21  Alexandre Oliva <oliva@adacore.com>
2189         * final.c (compute_discriminator): Declare.  Renamed from...
2190         (maybe_set_discriminator): ... this.  Set and return a local.
2191         (override_discriminator): New.
2192         (final_scan_insn_1): Set it.
2193         (notice_source_line): Adjust.  Always set discriminator.
2195 2018-11-21  Jakub Jelinek  <jakub@redhat.com>
2197         PR target/87839
2198         * config/aarch64/atomics.md (@aarch64_compare_and_swap<mode>): Use
2199         rIJ constraint for aarch64_plus_operand rather than rn.
2201 2018-11-21  Renlin Li  <renlin.li@arm.com>
2203         PR middle-end/84877
2204         * explow.h (get_dynamic_stack_size): Declare it as external.
2205         * explow.c (record_new_stack_level): Remove function static attribute.
2206         * function.c (assign_stack_local_1): Dynamically align the stack slot
2207         addr for parameter copy on the stack.
2209 2018-11-21  Richard Biener  <rguenther@suse.de>
2211         PR bootstrap/88133
2212         * bitmap.c (bitmap_last_set_bit): Refactor to avoid warning.
2213         * Makefile.in (bitmap.o-warn): Remove again.
2215 2018-11-20  Jeff Law  <law@redhat.com>
2217         PR tree-optimization/88069
2218         * tree-ssa-dom.c (record_equivalences_from_phis): Propagate away
2219         degenerate virtual PHIs.
2221 2018-11-21  H.J. Lu  <hongjiu.lu@intel.com>
2223         PR target/87317
2224         * config/i386/sse.md (sse4_1_<code>v8qiv8hi2<mask_name>): Replace
2225         nonimmediate_operand with register_operand.
2226         (avx2_<code>v8qiv8si2<mask_name>): Likewise.
2227         (sse4_1_<code>v4qiv4si2<mask_name>): Likewise.
2228         (sse4_1_<code>v4hiv4si2<mask_name>): Likewise.
2229         (sse4_1_<code>v2qiv2di2<mask_name>): Likewise.
2230         (avx512f_<code>v8qiv8di2<mask_name>): Likewise.
2231         (avx2_<code>v4qiv4di2<mask_name>): Likewise.
2232         (avx2_<code>v4hiv4di2<mask_name>): Likewise.
2233         (sse4_1_<code>v2hiv2di2<mask_name>): Likewise.
2234         (sse4_1_<code>v2siv2di2<mask_name>): Likewise.
2235         (*sse4_1_<code>v8qiv8hi2<mask_name>_1): New pattern.
2236         (*sse4_1_<code>v8qiv8hi2<mask_name>_2): Likewise.
2237         (*avx2_<code>v8qiv8si2<mask_name>_1): Likewise.
2238         (*avx2_<code>v8qiv8si2<mask_name>_2): Likewise.
2239         (*sse4_1_<code>v4qiv4si2<mask_name>_1): Likewise.
2240         (*sse4_1_<code>v4qiv4si2<mask_name>_2): Likewise.
2241         (*sse4_1_<code>v4hiv4si2<mask_name>_1): Likewise.
2242         (*sse4_1_<code>v4hiv4si2<mask_name>_2): Likewise.
2243         (*avx512f_<code>v8qiv8di2<mask_name>_1): Likewise.
2244         (*avx512f_<code>v8qiv8di2<mask_name>_2): Likewise.
2245         (*avx2_<code>v4qiv4di2<mask_name>_1): Likewise.
2246         (*avx2_<code>v4qiv4di2<mask_name>_2): Likewise.
2247         (*avx2_<code>v4hiv4di2<mask_name>_1): Likewise.
2248         (*avx2_<code>v4hiv4di2<mask_name>_2): Likewise.
2249         (*sse4_1_<code>v2hiv2di2<mask_name>_1): Likewise.
2250         (*sse4_1_<code>v2hiv2di2<mask_name>_2): Likewise.
2251         (*sse4_1_<code>v2siv2di2<mask_name>_1): Likewise.
2252         (*sse4_1_<code>v2siv2di2<mask_name>_2): Likewise.
2254 2018-11-21  H.J. Lu  <hongjiu.lu@intel.com>
2256         * read-rtl.c (apply_subst_iterator): Handle define_split and
2257         define_insn_and_split.
2259 2018-11-21  Jakub Jelinek  <jakub@redhat.com>
2261         PR rtl-optimization/87817
2262         * config/i386/i386.md (bmi2_bzhi_<mode>3, *bmi2_bzhi_<mode>3,
2263         *bmi2_bzhi_<mode>3_1, *bmi2_bzhi_<mode>3_1_ccz): Use IF_THEN_ELSE
2264         in the pattern to avoid triggering UB when operands[2] is zero.
2265         (tbm_bextri_<mode>): New expander.  Renamed the old define_insn to ...
2266         (*tbm_bextri_<mode>): ... this.
2268 2018-11-21  Tom de Vries  <tdevries@suse.de>
2270         PR driver/79855
2271         * params.def (HOT_BB_COUNT_FRACTION): Terminate help message with
2272         period.
2274 2018-11-21  Andreas Krebbel  <krebbel@linux.ibm.com>
2276         * configure.ac: Add check for Binutils to determine whether vector
2277         load/store alignments hints are being supported.
2278         * config.in: Regenerate.
2279         * configure: Regenerate.
2280         * config/s390/s390.c (print_operand): Support new output
2281         modifier A.
2282         * config/s390/s390.md ("movti"): Append alignment hint output
2283         using the new output modifier 'A'.
2284         * config/s390/vector.md ("mov<mode>", "*vec_tf_to_v1tf")
2285         ("*vec_ti_to_v1ti"): Likewise.
2287 2018-11-20  Martin Sebor  <msebor@redhat.com>
2289         * doc/extend.texi (Other Builtins): Add __builtin_has_attribute.
2291 2018-11-20  Jan Hubicka  <hubicka@ucw.cz>
2293         PR lto/84044
2294         * ipa-devirt.c (odr_types_equivalent_p): Use operand_equal_p to
2295         compare ENUM values.
2297 2018-11-20  Jakub Jelinek  <jakub@redhat.com>
2299         PR tree-optimization/87895
2300         * omp-simd-clone.c (ipa_simd_modify_function_body): When removing
2301         or replacing GIMPLE_RETURN, set EDGE_FALLTHRU on the edge to EXIT.
2302         (simd_clone_adjust): Don't set EDGE_FALLTHRU here. In a loop that
2303         redirects edges to EXIT to edges to incr_bb, iterate while EXIT
2304         has any preds and always use EDGE_PRED (, 0).
2306 2018-11-20  Uros Bizjak  <ubizjak@gmail.com>
2308         PR target/88070
2309         * mode-switching.c (create_pre_exit): After reload, always split the
2310         fallthrough edge to the exit block.
2312 2018-11-20  Jan Hubicka  <hubicka@ucw.cz>
2314         * ipa-devirt.c (add_type_duplicate): Do not ICE on incomplete enums.
2315         * tree.c (build_array_type_1): Forward declare.
2316         (fld_type_variant_equal_p): Add INNER_TYPE parameter.
2317         (fld_type_variant): Likewise.
2318         (fld_simplified_types): New hash.
2319         (fld_process_array_type): New function.
2320         (fld_incomplete_type_of): Handle array and enumeration types.
2321         (fld_simplified_type): Handle simplification of arrays.
2322         (free_lang_data): Allocate and free simplified types hash.
2324 2018-11-20  Jan Hubicka  <hubicka@ucw.cz>
2326         PR lto/87957
2327         * ipa-devirt.c (odr_subtypes_equivalent_p): Report ODR violation
2328         when sybtype already violates ODR.
2329         (get_odr_type): Do not ICE when insert is false and type duplicate
2330         is not registered yet.
2331         (register_odr_type): Be sure to register subtypes first.
2333 2018-11-20  Andreas Krebbel  <krebbel@linux.ibm.com>
2335         * config/s390/s390.md ("clztidi2"): Swap the RTX's written to the
2336         DImode parts of the target operand.
2338 2018-11-20  Nathan Sidwell  <nathan@acm.org>
2340         PR 87926
2341         * Makefile.in (bitmap.o-warn): Use -Wno-error=array-bounds.
2343 2018-11-20  Jan Hubicka  <hubicka@ucw.cz>
2345         PR lto/87997
2346         * tree.c (free_lang_data_in_cgraph): Add argument fld; break out
2347         type checking to...
2348         (free_lang_data) ... here; update call of free_lang_data_in_cgraph.
2350 2018-11-20  Jan Hubicka  <hubicka@ucw.cz>
2352         PR ipa/87706
2353         * ipa-fnsummary.c (pass_ipa_fnsummary): Do not remove functions
2354         * ipa.c (possible_inline_candidate_p): Break out from ..
2355         (process_references): ... here ; drop before_inlining_p;
2356         cleanup handling of alises.
2357         (walk_polymorphic_call_targets): Likewise.
2358         (symbol_table::remove_unreachable_nodes): Likewise.
2359         * passes.c (pass_data_ipa_remove_symbols): New structure.
2360         (pass_ipa_remove_symbols): New pass.
2361         (make_pass_ipa_remove_symbols): New function.
2362         * tree-pass.h (make_pass_ipa_remove_symbols): Declare.
2363         * passes.def (pass_ipa_remove_symbols): Schedule after early passes.
2365 2018-11-20  Richard Biener  <rguenther@suse.de>
2367         * tree-vect-stmts.c (vectorizable_condition): Do not get
2368         at else_clause vect def for EXTRACT_LAST_REDUCTION.  Remove
2369         pointless vect_is_simple_use calls.
2371 2018-11-20  Richard Biener  <rguenther@suse.de>
2373         PR tree-optimization/88074
2374         * tree-ssa-dom.c (pass_dominator::execute): Do not walk
2375         backedges.
2377 2018-11-20  Richard Biener  <rguenther@suse.de>
2379         PR tree-optimization/88069
2380         * tree-ssa-sccvn.c (visit_phi): Do not value-number to unvisited
2381         virtual PHI arguments.
2383 2018-11-20  Ilya Leoshkevich  <iii@linux.ibm.com>
2385         PR target/88083
2386         * config/s390/s390.md: Skip LT(G) peephole when literal pool is
2387         involved.
2388         * rtl.h (contains_constant_pool_address_p): New function.
2389         * rtlanal.c (contains_constant_pool_address_p): Likewise.
2391 2018-11-20  Richard Biener  <rguenther@suse.de>
2393         PR middle-end/83215
2394         * alias.c (component_uses_parent_alias_set_from): Remove
2395         alias-set zero and TYPE_TYPELESS_STORAGE case both already
2396         handled in other ways.
2398 2018-11-20  Richard Biener  <rguenther@suse.de>
2400         PR tree-optimization/88087
2401         * tree-ssa-pre.c (create_expression_by_pieces): Re-materialize
2402         call fntype.
2403         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Remember
2404         call fntype.
2406 2018-11-20  Richard Biener  <rguenther@suse.de>
2408         PR middle-end/88089
2409         * tree-data-ref.c (lambda_matrix_right_hermite): Use abs_hwi.
2411 2018-11-19  Jan Hubicka  <hubicka@ucw.cz>
2413         PR lto/87957
2414         * ipa-devirt.c (free_enum_values): Do not ICE on ODR vilations.
2416 2018-11-19  Sandra Loosemore  <sandra@codesourcery.com>
2418         PR driver/50250
2419         * doc/invoke.texi (Link Options): Mention shared libraries
2420         in documentation for the -l option.  Simplify discussion and
2421         point to the system linker documentation for details.
2423 2018-11-19  Peter Bergner  <bergner@linux.ibm.com>
2425         PR rtl-optimization/88033
2426         * ira-lives.c (non_conflicting_reg_copy_p): Skip copies from a register
2427         to itself.  Use HARD_REGISTER_NUM_P.
2429 2018-11-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2431         * tree-vect-loop.c (vect_transform_loop): Disable further unrolling
2432         of the loop if vf is non-constant.
2434 2018-11-19  David Malcolm  <dmalcolm@redhat.com>
2436         PR tree-optimization/87025
2437         * dumpfile.c (dump_context::begin_scope): Call end_any_optinfo
2438         immediately after creating the scope optinfo.
2439         (selftest::test_pr87025): New function.
2440         (selftest::dumpfile_c_tests): Call it.
2441         * optinfo-emit-json.cc (optrecord_json_writer::pop_scope): Assert
2442         that we're not popping the top-level records array.
2443         * optinfo.cc (optinfo::handle_dump_file_kind): Assert that we're
2444         not changing the kind of a "scope" optinfo.
2446 2018-11-19  David Malcolm  <dmalcolm@redhat.com>
2448         PR tree-optimization/87025
2449         * dump-context.h: Include "optinfo.h".
2450         (class optrecord_json_writer): New forward decl.
2451         (dump_context::forcibly_enable_optinfo_p): Delete.
2452         (dump_context::optinfo_enabled_p): New member function.
2453         (dump_context::optimization_records_enabled_p): New member
2454         function.
2455         (dump_context::set_json_writer): New member function.
2456         (dump_context::emit_optinfo): New member function.
2457         (dump_context::m_forcibly_enable_optinfo): Delete.
2458         (dump_context::m_json_writer): New member data.
2459         * dumpfile.c (dump_context::set_json_writer): New member function.
2460         (dump_context::finish_any_json_writer): New member function.
2461         (dump_context::end_scope): Replace call to
2462         optimization_records_maybe_pop_dump_scope with call to
2463         m_json_writer->pop_scope.
2464         (dump_context::optinfo_enabled_p): New member function.
2465         (dump_context::end_any_optinfo): Replace call to optinfo::emit with call
2466         to dump_context::emit_optinfo.
2467         (dump_context::emit_optinfo): New member function.
2468         (temp_dump_context::temp_dump_context): Replace
2469         m_forcibly_enable_optinfo with call to set_json_writer.
2470         (temp_dump_context::~temp_dump_context): Clean up any json writer.
2471         * optinfo-emit-json.cc (class optrecord_json_writer): Move to
2472         optinfo-emit-json.h
2473         (the_json_writer): Delete.
2474         (optimization_records_start): Delete.
2475         (optimization_records_finish): Delete.
2476         (optimization_records_enabled_p): Delete, in favor of
2477         dump_context::optimization_records_enabled_p.
2478         (optimization_records_maybe_record_optinfo): Delete.
2479         (optimization_records_maybe_pop_dump_scope): Delete.
2480         * optinfo-emit-json.h: Include "json.h".  Delete forward
2481         decl of opt_pass.
2482         (optimization_records_start): Delete.
2483         (optimization_records_finish): Delete.
2484         (optimization_records_enabled_p): Delete.
2485         (optimization_records_maybe_record_optinfo): Delete.
2486         (optimization_records_maybe_pop_dump_scope): Delete.
2487         (class optrecord_json_writer): Move here from
2488         optinfo-emit-json.cc.
2489         * optinfo.cc (optinfo::emit_for_opt_problem): Replace call
2490         to optinfo::emit with call to dump_context::emit_optinfo.
2491         (optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
2492         (optinfo_enabled_p): Delete, in favor of
2493         dump_context::optinfo_enabled_p.
2494         (optinfo_wants_inlining_info_p): Update for conversion o
2495         optimization_records_enabled_p to a member function of
2496         dump_context.
2497         * optinfo.h (optinfo_enabled_p): Delete, in favor of
2498         dump_context::optinfo_enabled_p.
2499         (optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
2500         * toplev.c: Include "dump-context.h".
2501         (compile_file): Replace call to optimization_records_finish with
2502         dump_context::finish_any_json_writer.
2503         (do_compile): Replace call to optimization_records_start with
2504         conditionally creating a optrecord_json_writer for the
2505         dump_context.
2507 2018-11-19  Jakub Jelinek  <jakub@redhat.com>
2509         PR tree-optimization/88071
2510         * tree-vect-loop.c (vectorize_fold_left_reduction): Pass true instead
2511         of false as last argument to gsi_remove.
2512         * tree-vect-stmts.c (vect_finish_replace_stmt): Pass true instead of
2513         false as last argument to gsi_replace.
2515         PR debug/87039
2516         * omp-expand.c: Don't include debug.h.
2517         (adjust_context_and_scope): Add REGION argument.  Find DECL_CONTEXT
2518         from innermost outer parallel, task, teams or target that has a
2519         child_fn set, or, if there is no such outer region, use
2520         current_function_decl.  Do the DECL_CONTEXT adjustment regardless of
2521         whether a suitable BLOCK is found or not.
2522         (expand_parallel_call, expand_teams_call): Don't call
2523         adjust_context_and_scope here.
2524         (grid_expand_target_grid_body): Revert 2017-01-25 changes.
2525         (expand_omp_taskreg, expand_omp_target): Likewise.  Call
2526         adjust_context_and_scope.
2527         * dwarf2out.c (dwarf2out_early_global_decl): For
2528         decl_function_context recurse instead of calling dwarf2out_decl.
2530 2018-11-20  Eric Botcazou  <ebotcazou@adacore.com>
2532         PR rtl-optimization/85925
2533         * rtl.h (word_register_operation_p): New predicate.
2534         * combine.c (record_dead_and_set_regs_1): Only apply specific handling
2535         for WORD_REGISTER_OPERATIONS targets to word_register_operation_p RTX.
2536         * rtlanal.c (nonzero_bits1): Likewise.  Adjust couple of comments.
2537         (num_sign_bit_copies1): Likewise.
2539 2018-11-19  Richard Biener  <rguenther@suse.de>
2541         PR lto/87229
2542         * tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
2543         sizepos values.
2545 2018-11-19  Eric Botcazou  <ebotcazou@adacore.com>
2547         * compare-elim.c (struct comparison): Add not_in_a field.
2548         (is_not): New static function.
2549         (strip_not): Likewise.
2550         (conforming_compare): Handle a NOT in the first operand.
2551         (can_eliminate_compare): Likewise.
2552         (find_comparison_dom_walker::before_dom_children): Likewise.
2553         (try_eliminate_compare): Likewise.
2554         * config/visium/visium.md (negsi2_insn_set_carry): Turn into...
2555         (neg<mode>2_insn_set_carry): ...this and add missing NEG operation.
2557 2018-11-19  Jonathan Wakely  <jwakely@redhat.com>
2559         * doc/extend.texi (Common Type Attributes): Fix typos.
2561 2018-11-19  Martin Liska  <mliska@suse.cz>
2563         PR gcov-profile/88045
2564         * coverage.c (coverage_begin_function): Add assert.
2566 2018-11-18  Sandra Loosemore  <sandra@codesourcery.com>
2568         PR other/40498
2569         * doc/extend.texi (Common Function Attributes): Document that
2570         no_instrument_function applies to -p and -pg, too.
2571         * doc/invoke.texi (Instrumentation Options): Add cross-references
2572         to docs for -p, -pg, and -finstrument-functions.
2574 2018-11-18  Alan Modra  <amodra@gmail.com>
2576         * config/gnu-user.h (GNU_USER_TARGET_CRTI): Define.
2577         (GNU_USER_TARGET_STARTFILE_SPEC): Use it here.
2578         (GNU_USER_TARGET_CRTN): Define.
2579         (GNU_USER_TARGET_ENDFILE_SPEC): Use it here.
2580         (GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC): Define.
2582 2018-11-18  Alan Modra  <amodra@gmail.com>
2584         * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Delete
2585         !HAVE_LD_PIE variant.
2586         (GNU_USER_TARGET_ENDFILE_SPEC): Likewise.
2588 2018-11-17  Nick Clifton  <nickc@redhat.com>
2589             Sandra Loosemore  <sandra@codesourcery.com>
2591         PR driver/31357
2592         * doc/invoke.texi (Overall Options): Document that --help and
2593         --help=<value> options cannot be combined.
2595 2018-11-17  Jim Wilson  <jimw@sifive.com>
2597         * config/riscv/riscv.c (epilogue_cfa_sp_offset): New.
2598         (riscv_restore_reg): If restoring HARD_FRAME_POINTER_REGNUM, and
2599         epilogue_cfa_sp_offset set, then add REG_CFA_DEF_CFA regnote.
2600         (riscv_expand_epilogue): Initialize epilogue_cfa_sp_offset.  Set it
2601         to step2 if frame_pointer_needed and step1 is 0.
2603 2018-11-17  Sandra Loosemore  <sandra@codesourcery.com>
2605         PR c++/4225
2606         * doc/cpp.texi (System Headers): Add note about implicit
2607         extern "C" block on targets that define SYSTEM_IMPLICIT_EXTERN_C.
2609 2018-11-17  Sandra Loosemore  <sandra@codesourcery.com>
2611         PR c++/4025
2612         * doc/invoke.texi (C++ Dialect Options): Clarify usage of
2613         -fno-implicit-templates.
2615 2018-11-17  Jakub Jelinek  <jakub@redhat.com>
2617         PR tree-optimization/87546
2618         * tree-vect-patterns.c (vect_look_through_possible_promotion): Add
2619         min_precision variable, initially set it to orig_precision, only does
2620         something if op_type's precision is <= min_precision and update
2621         min_precision whenever calling set_op.
2623 2018-11-16  Jan Hubicka  <hubicka@ucw.cz>
2625         PR ipa/87957
2626         * ipa-devirt.c (warn_odr): Look for main variant to get TYPE_DECL.
2628 2018-11-16  Sandra Loosemore  <sandra@codesourcery.com>
2630         * doc/invoke.texi (Option Summary): Fix whitespace and line
2631         breaks in @gccoptlist environments.
2632         (Warning Options): Likewise.
2633         (Optimize Options): Likewise.
2634         (PowerPC SPE Options): Likewise.
2635         (RS/6000 and PowerPC Options): Likewise.
2637 2018-11-16  Jeff Law  <law@redhat.com>
2639         * config/mn10300/mn10300.md (adddi3_degenerate): Remove bogus
2640         gcc_assert.
2642 2018-11-16  Sandra Loosemore  <sandra@codesourcery.com>
2644         PR middle-end/23197
2645         * doc/invoke.texi (Optimize Options): Update options enabled by
2646         fprofile-generate, -fprofile-use, and -fauto-profile.
2648 2018-11-16  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2650         PR target/87927
2651         * target-def.h: Initialize TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP.
2652         Add them to the TARGET_ASM_{,UN}ALIGNED_INT_OP structs.
2653         * target.def: Enumerate TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP in
2654         the byte_op hook.
2655         * target.h: Add psi, pdi, pti to struct asm_int_op definition.
2656         * targhooks.c (default_print_patchable_function_entry): Assert
2657         asm_int_op does not return a NULL string.
2658         * varasm.c (integer_asm_op): Return the op for a partial int type
2659         when the requested size does not correspond to an integer type.
2660         * config/msp430/msp430.c: Initialize TARGET_ASM_{,UN}ALIGNED_PSI_OP.
2661         * doc/tm.texi: Regenerate.
2663 2018-11-12  Jason Merrill  <jason@redhat.com>
2665         * gimplify.c (gimplify_case_label_expr): Handle hot/cold attributes.
2667 2018-11-16  Michael Meissner  <meissner@linux.ibm.com>
2669         * config/rs6000/constraints.md (wF constraint): Remove power9
2670         fusion documentation.  Just document wF's use for power8 fusion.
2671         * config/rs6000/predicates.md (p9_fusion_reg_operand): Delete.
2672         (fusion_gpr_addis): Delete power9 fusion support.  Change power8
2673         fusion support to require the upper 12 bits to be all 0's or all
2674         1's.
2675         (fusion_gpr_mem_load): Add comment.
2676         (fusion_addis_mem_combo_load): Remove power9 fusion support.
2677         (fusion_addis_mem_combo_store): Delete.
2678         (fusion_offsettable_mem_operand): Delete.
2679         * config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Do not set
2680         power8 fusion here.
2681         (ISA_3_0_MASKS_SERVER): Delete power9 fusion.
2682         (POWERPC_MASKS): Delete power9 fusion.
2683         * config/rs6000/rs6000-protos.h (emit_fusion_load_store): Delete.
2684         (fusion_p9_p): Delete.
2685         (expand_fusion_p9_load): Delete.
2686         (expand_fusion_p9_store): Delete.
2687         (emit_fusion_p9_load): Delete.
2688         (emit_fusion_p9_store): Delete.
2689         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Delete power9
2690         fusion support.
2691         (rs6000_option_override_internal): Set power8 fusion based on
2692         whether we are tuning for power8.  Delete power9 fusion support.
2693         (rs6000_opt_masks): Delete -mpower9-fusion switch.
2694         (emit_fusion_load): Rename emit_fusion_load_store to
2695         emit_fusion_load, and drop fusion store support.  Update callers.
2696         (emit_fusion_load_store): Likewise.
2697         (emit_fusion_gpr_load): Likewise.
2698         (fusion_p9_p): Delete.
2699         (expand_fusion_p9_load): Delete.
2700         (expand_fusion_p9_store): Delete.
2701         (emit_fusion_p9_load): Delete.
2702         (emit_fusion_p9_store): Delete.
2703         * config/rs6000/rs6000.md (UNSPEC_FUSION_P9): Delete.
2704         (GPR_FUSION): Delete.
2705         (FPR_FUSION): Delete.
2706         (power9 fusion peephole2s): Delete.
2707         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Delete.
2708         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Delete.
2709         (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_load): Delete.
2710         (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_store): Delete.
2711         (fusion_p9_<mode>_constant): Delete.
2712         * config/rs6000/rs6000.opt (-mpower9-fusion): Delete undocumented
2713         power9 fusion switch.
2714         * doc/md.texi (PowerPC constraints): Update wF constraint
2715         documentation for power8 fusion only.
2717 2018-11-16  Jakub Jelinek  <jakub@redhat.com>
2719         PR rtl-optimization/87475
2720         * cfgrtl.c (patch_jump_insn): Allow redirection failure for
2721         CROSSING_JUMP_P insns.
2722         (cfg_layout_redirect_edge_and_branch): Don't ICE if ret is NULL.
2724 2018-11-16  Uros Bizjak  <ubizjak@gmail.com>
2726         PR target/88051
2727         * config/i386/i386.md (floatunsdidf2): Allow only 64bit AVX512F targets.
2728         * config/i386/sse.md (UNSPEC_MOVDI_TO_SSE): New UNSPEC.
2729         (movdi_to_sse): Rewrite using UNSPEC_MOVDI_TO_SSE unspec.
2731 2018-11-16  Jakub Jelinek  <jakub@redhat.com>
2733         PR middle-end/88032
2734         * optabs.c (expand_binop): For op0_mode use GET_MODE (op0), unless it
2735         is VOIDmode, in which case use int_mode.  Similarly for op1_mode.
2737 2018-11-16  Eric Botcazou  <ebotcazou@adacore.com>
2739         * tree-switch-conversion.h (switch_decision_tree::emit_case_nodes): Add
2740         location_t parameter.
2741         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
2742         (switch_decision_tree::do_jump_if_equal): Likewise.
2743         * tree-switch-conversion.c (switch_decision_tree::emit): Pass location
2744         of switch statement to emit_case_nodes.
2745         (switch_decision_tree::emit_cmp_and_jump_insns): Add LOC parameter and
2746         set it on the newly built GIMPLE comparison statement.
2747         (switch_decision_tree::do_jump_if_equal): Likewise.
2748         (switch_decision_tree::emit_case_nodes): Add LOC parameter and pass it
2749         in calls to do_jump_if_equal as well as recursive calls.
2751 2018-11-16  Andi Kleen  <ak@linux.intel.com>
2753         * config/i386/i386.md: Allow memory operands to ptwrite.
2755 2018-11-16  Michael Matz  <matz@suse.de>
2757         * system.h (PRsa): New macro.
2758         (SIZE_AMOUNT): Cast number to uint64_t.
2759         * alloc-pool.h (pool_usage::dump): Don't use %zu but PRsa.
2760         (pool_usage::dump_footer): Likewise and also use PRIu64.
2761         * bitmap.h (bitmap_usage::dump): Likewise.
2762         * ggc-common.c (ggc_usage::dump): Likewise.
2763         * ggc-page.c (ggc_print_statistics): Likewise.
2764         * input.c (dump_line_table_statistics): Likewise.
2765         * mem-stats.h (mem_usage::dump): Likewise.
2766         (mem_usage::dump_footer): Likewise.
2767         * rtl.c (dump_rtx_statistics): Likewise.
2768         * tree-cfg.c (dump_cfg_stats): Likewise.
2769         * tree-dfa.c (dump_dfa_stats): Likewise.
2770         * tree-phinodes.c (phinodes_print_statistics): Likewise.
2771         * tree-ssanames (ssanames_print_statistics): Likewise.
2772         * vec.c (vec_usage::dump): Likewise.
2773         (vec_usage::dump_footer): Likewise.
2775 2018-11-16  Richard Biener  <rguenther@suse.de>
2777         PR tree-optimization/88011
2778         * tree-vrp.c (extract_range_from_binary_expr): Fix error in
2779         replacing set_value_range_to_undefined and
2780         set_value_range_to_varying with method calls.
2782 2018-11-16  Ilya Leoshkevich  <iii@linux.ibm.com>
2784         * config/s390/s390.md
2785         (*r<noxa>sbg_<mode>_srl_bitmask): Do not delegate arithmetic to
2786         assembler.
2787         (*r<noxa>sbg_<mode>_sll): Likewise.
2788         (*r<noxa>sbg_<mode>_srl): Likewise.
2789         (*r<noxa>sbg_sidi_srl): New pattern.
2791 2018-11-16  Jerome Lambourg  <lambourg@adacore.com>
2793         * config/vxworks.h (TARGET_VXWORKS_HAVE_CTORS_DTORS): New macro.
2794         Default to TARGET_VXWORKS_RTP.
2795         (SUPPORTS_INIT_PRIORITY): Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
2796         of TARGET_VXWORKS_RTP.
2797         * config/vxworks.c: Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
2798         of TARGET_VXWORKS_RTP to set targetm.have_ctors_dtors.
2800 2018-11-15  Sandra Loosemore  <sandra@codesourcery.com>
2802         PR c++/25759
2803         * doc/extend.texi (Common Type Attributes): Make it explicit
2804         that attribute "packed" can apply to C++ classes.
2806 2018-11-15  Martin Sebor  <msebor@redhat.com>
2808         PR c++/87541
2809         PR c++/87542
2810         * tree.c (type_argument_type): New function.
2811         * tree.h (type_argument_type): Declare it.
2812         * gcc/doc/extend.texi (alloc_align): Update and clarify.
2813         (alloc_size, nonnull, sentinel): Same.
2815 2018-11-15  Andrew Stubbs  <ams@codesourcery.com>
2816             Kwok Cheung Yeung  <kcy@codesourcery.com>
2818         * tree-vect-stmts.c (vectorizable_store): Don't ICE when
2819         int_mode_for_size fails.
2820         (vectorizable_load): Likewise.
2822 2018-11-15  David Malcolm  <dmalcolm@redhat.com>
2824         * doc/ux.texi (Group logically-related diagnostics): Move
2825         discussion of auto_diagnostic_group into this new subsection.
2826         Give an example of where this grouping is used.
2828 2018-11-15  David Malcolm  <dmalcolm@redhat.com>
2830         PR other/19165
2831         * Makefile.in (OBJS): Move json.o to...
2832         (OBJS-libcommon): ...here and add diagnostic-format-json.o.
2833         * common.opt (fdiagnostics-format=): New option.
2834         (diagnostics_output_format): New enum.
2835         * diagnostic-format-json.cc: New file.
2836         * diagnostic.c (default_diagnostic_final_cb): New function, taken
2837         from start of diagnostic_finish.
2838         (diagnostic_initialize): Initialize final_cb to
2839         default_diagnostic_final_cb.
2840         (diagnostic_finish): Move "being treated as errors" messages to
2841         default_diagnostic_final_cb.  Call any final_cb.
2842         (default_diagnostic_finalizer): Add diagnostic_t param.
2843         (diagnostic_report_diagnostic): Pass "orig_diag_kind" to
2844         diagnostic_finalizer callback.
2845         * diagnostic.h (enum diagnostics_output_format): New enum.
2846         (diagnostic_finalizer_fn): Reimplement, adding diagnostic_t param.
2847         (struct diagnostic_context): Add "final_cb".
2848         (default_diagnostic_finalizer): Add diagnostic_t param.
2849         (diagnostic_output_format_init): New decl.
2850         * doc/invoke.texi (-fdiagnostics-format): New option.
2851         * dwarf2out.c (gen_producer_string): Ignore
2852         OPT_fdiagnostics_format_.
2853         * gcc.c (driver_handle_option): Handle OPT_fdiagnostics_format_.
2854         * lto-wrapper.c (append_diag_options): Ignore it.
2855         * opts.c (common_handle_option): Handle it.
2857 2018-11-15  David Malcolm  <dmalcolm@redhat.com>
2859         PR tree-optimization/88015
2860         * graphite-isl-ast-to-gimple.c
2861         (translate_isl_ast_to_gimple::scop_to_isl_ast): Add missing check
2862         for dump_enabled_p.
2863         * graphite-sese-to-poly.c (build_poly_scop): Likewise.
2865 2018-11-15  Richard Biener  <rguenther@suse.de>
2867         PR middle-end/88029
2868         * gimple.c (gimple_call_flags): Union flags from decl, type
2869         and call fntype.
2870         * trans-mem.c (is_tm_pure_call): Simplify.
2872 2018-11-15  Richard Biener  <rguenther@suse.de>
2874         PR tree-optimization/88031
2875         * tree-vect-loop.c (vectorizable_reduction): Move check
2876         for multiple types earlier so we get the expected dump.
2877         Simplify calls to vectorizable_condition.
2878         * tree-vect-stmts.h (vectorizable_condition): Update prototype.
2879         * tree-vect-stmts.c (vectorizable_condition): Instead of
2880         reduc_def and reduc_index take just a flag.  Simplify
2881         code-generation now that we can rely on the defs being set up.
2882         (vectorizable_comparison): Remove unused argument.
2884 2018-11-15  Richard Biener  <rguenther@suse.de>
2886         PR tree-optimization/88030
2887         * tree-complex.c (need_eh_cleanup): New global.
2888         (update_complex_assignment): Mark blocks that need EH update.
2889         (expand_complex_comparison): Likewise.
2890         (tree_lower_complex): Allocate and deallocate need_eh_cleanup,
2891         perform EH cleanup and schedule CFG cleanup if that did anything.
2893 2018-11-15  Jakub Jelinek  <jakub@redhat.com>
2895         PR rtl-optimization/88018
2896         * cfgrtl.c (fixup_abnormal_edges): Guard moving insns to fallthru edge
2897         on the presence of fallthru edge, rather than if it is a USE or not.
2899 2018-11-15  Richard Biener  <rguenther@suse.de>
2901         PR middle-end/87917
2902         * tree-data-ref.c (analyze_miv_subscript): Guard calls to
2903         analyze_subscript_affine_affine properly.
2905 2018-11-15  Xianmiao Qu  <xianmiao_qu@c-sky.com>
2907         * config/csky/csky-linux-elf.h (LINUX_DYNAMIC_LINKER): Remove.
2908         (GLIBC_DYNAMIC_LINKER): Define.
2909         (LINUX_TARGET_LINK_SPEC): Update the dynamic linker's name.
2911 2018-11-15  Bin Cheng  <bin.cheng@linux.alibaba.com>
2913         PR tree-optimization/84648
2914         * tree-ssa-loop-niter.c (adjust_cond_for_loop_until_wrap): New.
2915         (number_of_iterations_cond): Adjust exit cond for loop-until-wrap case
2916         by calling adjust_cond_for_loop_until_wrap.
2918 2018-11-15  Sandra Loosemore  <sandra@codesourcery.com>
2920         PR other/56334
2921         * doc/extend.texi (Common Function Attributes): Clarify linker
2922         restrictions on "aligned" attribute.
2923         (Common Variable Attributes): Likewise.  Mention that linker
2924         restrictions don't apply to stack-allocated variables.
2926 2018-11-15  Joern Rennecke  <joern.rennecke@riscy-ip.com>
2928         * gensupport.c (add_predicate_code): Properly handle ZERO_EXTRACT
2929         as an lvalue.
2931 2018-11-14  Sandra Loosemore  <sandra@codesourcery.com>
2933         PR lto/55102
2934         PR lto/56700
2935         * doc/invoke.texi (Optimize Options): Remove bad example about
2936         interaction between -flto and -O.  Replace it with a note that
2937         you need to compile with -O and not just link.  Copy-edit -flto
2938         discussion to reduce verbiage and improve flow.
2940 2018-11-14  Sandra Loosemore  <sandra@codesourcery.com>
2942         PR middle-end/59658
2943         * doc/invoke.texi (Optimize Options): Clarify that -O0 and -Og
2944         also suppress many optimizations.  Alphabetize option lists for
2945         -O1, -O2, and -Os.  Add list of options disabled with -Og, and
2946         correct documentation for those options to say that.
2947         * opts.c (default_options_table): Sort table by level and option
2948         name, to make it easier to correlate to the manual.
2950 2018-11-14  Uros Bizjak  <ubizjak@gmail.com>
2952         * config/i386/i386.c (ix86_print_operand_address_as): Simplify
2953         printing of the names of segment registers.
2955 2018-11-14  Nathan Sidwell  <nathan@acm.org>
2957         PR debug/88006
2958         PR debug/87462
2959         * dwarf2out.c (dwarf2out_finish): Apply resolve_addr to comdat
2960         type list.
2962 2018-11-14  David Malcolm  <dmalcolm@redhat.com>
2964         * Makefile.in (CFLAGS-optinfo-emit-json.o): Add $(ZLIBINC).
2966 2018-11-14  Jakub Jelinek  <jakub@redhat.com>
2968         P1236R1 - Signed integers are two's complement
2969         * doc/invoke.texi (Wshift-overflow): Adjust documentation for c++2a.
2971         PR bootstrap/86739
2972         * hash-map.h (hash_map::iterator::reference_pair): New class.
2973         (hash_map::iterator::operator*): Return it rather than std::pair.
2975 2018-11-14  Jeff Law  <law@redhat.com>
2977         * optabs.c (expand_binop): Pass INT_MODE to operand_subword_force
2978         iff the operand is a constant.
2980 2018-11-14  Aldy Hernandez  <aldyh@redhat.com>
2982         * gimple-ssa-evrp-analyze.c
2983         (evrp_range_analyzer::record_ranges_from_incoming_edge): Rename
2984         ignore_equivs_equal_p to equal_p.
2985         * ipa-cp.c (meet_with_1): Use equal_p instead of
2986         ignore_equivs_equal_p.
2987         * ipa-prop.c (ipa_vr_ggc_hash_traits::equal): Same.
2988         * tree-vrp.c (value_range::ignore_equivs_equal_p): Remove.
2989         (value_range::operator==): Remove.
2990         (value_range::operator!=): Remove.
2991         (vrp_prop::visit_stmt): Use equal_p.
2992         * tree-vrp.h (value_range): Remove operator==, operator!=,
2993         ignore_equivs_equal_p.
2994         * vr-values.c (update_value_range): Use equal_p.
2996 2018-11-14  Michael Matz  <matz@suse.de>
2998         PR middle-end/86575
2999         * gimplify.c (collect_fallthrough_labels): Add new argument,
3000         return location via that, don't modify statements.
3001         (warn_implicit_fallthrough_r): Adjust call, don't use
3002         statement location directly.
3004 2018-11-14  Richard Biener  <rguenther@suse.de>
3006         PR middle-end/87985
3007         * tree-data-ref.c (split_constant_offset): Add wrapper
3008         allocating a cache hash-map.
3009         (split_constant_offset_1): Cache results of expanding
3010         expressions from SSA def stmts.
3012 2018-11-14  Richard Biener  <rguenther@suse.de>
3014         PR middle-end/88021
3015         * tree-data-ref.c (lambda_matrix_row_add): Change const1 argument
3016         to lambda_int.
3017         (lambda_vector_mult_const): Likewise.
3018         (lambda_matrix_right_hermite): Use lambda_int temporaries.
3020 2018-11-14  Wilco Dijkstra  <wdijkstr@arm.com>
3021             Jackson Woodruff  <jackson.woodruff@arm.com>
3023         PR 71026/tree-optimization
3024         * match.pd: Simplify floating point comparisons.
3026 2018-11-14  Jakub Jelinek  <jakub@redhat.com>
3028         PR rtl-optimization/87817
3029         * config/i386/i386.c (ix86_fold_builtin): For _bzhi_u{32,64} if
3030         last argument has low 8 bits clear, fold to 0.
3032 2018-11-14  Iain Sandoe  <iain@sandoe.co.uk>
3034         * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Cast
3035         MAX_OFILE_ALIGNMENT as needed.
3037 2018-11-14  Richard Biener  <rguenther@suse.de>
3039         PR tree-optimization/88019
3040         * graphite-isl-ast-to-gimple.c (ternary_op_to_tree): Rewrite
3041         COND_EXPR arguments to non-trapping overflow.
3043 2018-11-14  Claudiu Zissulescu  <claziss@synopsys.com>
3045         * config/arc/arc.h (reg_class): Reorder registers classes, remove
3046         unused register classes.
3047         (REG_CLASS_NAMES): Likewise.
3048         (REG_CLASS_CONTENTS): Likewise.
3049         (FIXED_REGISTERS): Make lp_count fixed.
3050         (BASE_REG_CLASS): Remove ACC16_BASE_REGS reference.
3051         (PROGRAM_COUNTER_REGNO): Remove.
3052         * config/arc/arc.c (arc_conditional_register_usage): Remove unused
3053         register classes, use constants for register numbers, remove
3054         reg_class_contents references.
3055         (arc_process_double_reg_moves): Add asserts.
3056         (arc_secondary_reload): Remove LPCOUNT_REG reference, use
3057         lra_in_progress predicate.
3058         (arc_init_reg_tables): Remove unused register classes.
3059         (arc_register_move_cost): Likewise.
3060         (arc_preferred_reload_class): Likewise.
3061         (hwloop_optimize): Update rtx patterns involving lp_count register.
3062         (arc_return_address_register): Rename ILINK1, INLINK2 regnums macros.
3063         * config/arc/constraints.md ("c"): Choose between GENERAL_REGS and
3064         CHEAP_CORE_REGS.  Former one will be used for LRA.
3065         ("Rac"): Choose between GENERAL_REGS and ALL_CORE_REGS.  Former
3066         one will be used for LRA.
3067         ("w"): Choose between GENERAL_REGS and WRITABLE_CORE_REGS.  Former
3068         one will be used for LRA.
3069         ("W"): Choose between GENERAL_REGS and MPY_WRITABLE_CORE_REGS.
3070         Former one will be used for LRA.
3071         ("f"): Delete constraint.
3072         ("k"): Likewise.
3073         ("e"): Likewise.
3074         ("l"): Change it from register constraint to constraint.
3075         * config/arc/arc.md (movqi_insn): Remove unsed lp_count constraints.
3076         (movhi_insn): Likewise.
3077         (movsi_insn): Update pattern.
3078         (arc_lp): Likewise.
3079         (dbnz): Likewise.
3080         (stack_tie): Remove 'b' constraint letter.
3081         (R4_REG): Define.
3082         (R9_REG, R15_REG, R16_REG, R25_REG): Likewise.
3083         (R32_REG, R40_REG, R41_REG, R42_REG, R43_REG, R44_REG): Likewise.
3084         (R57_REG, R59_REG, PCL_REG): Likewise.
3085         (ILINK1_REGNUM): Renamed to ILINK1_REG.
3086         (ILINK2_REGNUM): Renamed to ILINK2_REG.
3087         (Rgp): Remove.
3088         (SP_REGS): Likewise.
3089         (Rcw): Remove unused reg classes.
3090         * config/arc/predicates.md (dest_reg_operand): Just default on
3091         register_operand predicate.
3092         (mpy_dest_reg_operand): Likewise.
3093         (move_dest_operand): Use macros instead of constants.
3094         * config/arc/arc.opt (mlra): Switch to lra as default.
3096 2018-11-14  Richard Biener  <rguenther@suse.de>
3098         PR tree-optimization/87974
3099         * tree-vect-loop.c (vectorizable_reduction): When computing
3100         the vectorized reduction PHI vector type ignore constant
3101         and external defs.
3103 2018-11-14  Jakub Jelinek  <jakub@redhat.com>
3105         PR tree-optimization/87977
3106         * tree-ssa-math-opts.c (optimize_recip_sqrt): Don't reuse division
3107         stmt, build a new one and replace the old one with it.  Formatting fix.
3108         Call release_ssa_name (x) if !has_other_use and !delete_div.
3109         (pass_cse_reciprocals::execute): Before calling optimize_recip_sqrt
3110         verify lhs of stmt is still def.
3112 2018-11-13  Peter Bergner  <bergner@linux.ibm.com>
3114         PR rtl-optimization/87507
3115         * lower-subreg.c (operand_for_swap_move_operator): New function.
3116         (simple_move): Strip simple operators.
3117         (find_pseudo_copy): Likewise.
3118         (resolve_operand_for_swap_move_operator): New function.
3119         (resolve_simple_move): Strip simple operators and swap operands.
3121 2018-11-13  Jakub Jelinek  <jakub@redhat.com>
3123         PR tree-optimization/87898
3124         * omp-simd-clone.c (ipa_simd_modify_stmt_ops): Formatting fix.
3125         (ipa_simd_modify_function_body): Remove debug stmts where the first
3126         argument was changed into a non-decl.
3128 2018-11-13  Peter Bergner  <bergner@linux.ibm.com>
3130         PR rtl-optimization/87899
3131         * lra-lives.c (start_living): Update white space in comment.
3132         (enum point_type): New.
3133         (sparseset_contains_pseudos_p): New function.
3134         (update_pseudo_point): Likewise.
3135         (make_hard_regno_live): Use HARD_REGISTER_NUM_P macro.
3136         (make_hard_regno_dead): Likewise.  Remove ignore_reg_for_conflicts
3137         handling.  Move early exit after adding conflicts.
3138         (mark_pseudo_live): Use HARD_REGISTER_NUM_P macro.  Add early exit
3139         if regno is already live.  Remove all handling of program points.
3140         (mark_pseudo_dead): Use HARD_REGISTER_NUM_P macro.  Add early exit
3141         after adding conflicts.  Remove all handling of program points and
3142         ignore_reg_for_conflicts.
3143         (mark_regno_live): Use HARD_REGISTER_NUM_P macro.  Remove return value
3144         and do not guard call to mark_pseudo_live.
3145         (mark_regno_dead): Use HARD_REGISTER_NUM_P macro.  Remove return value
3146         and do not guard call to mark_pseudo_dead.
3147         (check_pseudos_live_through_calls): Use HARD_REGISTER_NUM_P macro.
3148         (process_bb_lives): Use HARD_REGISTER_NUM_P and HARD_REGISTER_P macros.
3149         Use new function update_pseudo_point.  Handle register copies by
3150         removing the source register from the live set.  Handle INOUT operands.
3151         Update to the next program point using the unused_set, dead_set and
3152         start_dying sets.
3153         (lra_create_live_ranges_1): Use HARD_REGISTER_NUM_P macro.
3155 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
3157         * builtins.c: Replace "source_location" with "location_t".
3158         * diagnostic-show-locus.c: Likewise.
3159         * diagnostic.c: Likewise.
3160         * dumpfile.c: Likewise.
3161         * gcc-rich-location.h: Likewise.
3162         * genmatch.c: Likewise.
3163         * gimple.h: Likewise.
3164         * gimplify.c: Likewise.
3165         * input.c: Likewise.
3166         * input.h: Likewise.  Eliminate the typedef.
3167         * omp-expand.c: Likewise.
3168         * selftest.h: Likewise.
3169         * substring-locations.h (get_source_location_for_substring):
3170         Rename to...
3171         (get_location_within_string): ...this.
3172         * tree-cfg.c: Replace "source_location" with "location_t".
3173         * tree-cfgcleanup.c: Likewise.
3174         * tree-diagnostic.c: Likewise.
3175         * tree-into-ssa.c: Likewise.
3176         * tree-outof-ssa.c: Likewise.
3177         * tree-parloops.c: Likewise.
3178         * tree-phinodes.c: Likewise.
3179         * tree-phinodes.h: Likewise.
3180         * tree-ssa-loop-ivopts.c: Likewise.
3181         * tree-ssa-loop-manip.c: Likewise.
3182         * tree-ssa-phiopt.c: Likewise.
3183         * tree-ssa-phiprop.c: Likewise.
3184         * tree-ssa-threadupdate.c: Likewise.
3185         * tree-ssa.c: Likewise.
3186         * tree-ssa.h: Likewise.
3187         * tree-vect-loop-manip.c: Likewise.
3189 2018-11-13  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
3191         * doc/extend.texi: Fix typo in the weakref description.
3193 2018-11-13  Richard Biener  <rguenther@suse.de>
3195         PR tree-optimization/86991
3196         * tree-vect-loop.c (vect_is_slp_reduction): Delay reduction
3197         group building until we have successfully detected the SLP
3198         reduction.
3199         (vect_is_simple_reduction): Remove fixup code here.
3201 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
3203         * dumpfile.c (VERIFY_DUMP_ENABLED_P): New macro.
3204         (dump_gimple_stmt): Use it.
3205         (dump_gimple_stmt_loc): Likewise.
3206         (dump_gimple_expr): Likewise.
3207         (dump_gimple_expr_loc): Likewise.
3208         (dump_generic_expr): Likewise.
3209         (dump_generic_expr_loc): Likewise.
3210         (dump_printf): Likewise.
3211         (dump_printf_loc): Likewise.
3212         (dump_dec): Likewise.
3213         (dump_dec): Likewise.
3214         (dump_hex): Likewise.
3215         (dump_symtab_node): Likewise.
3216         * gimple-loop-interchange.cc (tree_loop_interchange::interchange):
3217         Guard dump call with dump_enabled_p.
3218         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl): Likewise.
3219         * graphite-optimize-isl.c (optimize_isl): Likewise.
3220         * graphite.c (graphite_transform_loops): Likewise.
3221         * tree-loop-distribution.c (pass_loop_distribution::execute): Likewise.
3222         * tree-parloops.c (parallelize_loops): Likewise.
3223         * tree-ssa-loop-niter.c (number_of_iterations_exit): Likewise.
3224         * tree-vect-data-refs.c (vect_analyze_group_access_1): Likewise.
3225         (vect_prune_runtime_alias_test_list): Likewise.
3226         * tree-vect-loop.c (vect_update_vf_for_slp): Likewise.
3227         (vect_estimate_min_profitable_iters): Likewise.
3228         * tree-vect-slp.c (vect_record_max_nunits): Likewise.
3229         (vect_build_slp_tree_2): Likewise.
3230         (vect_supported_load_permutation_p): Likewise.
3231         (vect_slp_analyze_operations): Likewise.
3232         (vect_slp_analyze_bb_1): Likewise.
3233         (vect_slp_bb): Likewise.
3234         * tree-vect-stmts.c (vect_analyze_stmt): Likewise.
3235         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.
3236         (pass_slp_vectorize::execute): Likewise.
3237         (increase_alignment): Likewise.
3239 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
3241         PR ipa/87955
3242         * ipa-inline.c (report_inline_failed_reason): Guard calls to
3243         cl_target_option_print_diff and cl_optimization_print_diff with
3244         if (dump_file).
3246 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
3248         * doc/invoke.texi (-fsave-optimization-record): Note that the
3249         output is compressed.
3250         * optinfo-emit-json.cc: Include <zlib.h>.
3251         (optrecord_json_writer::write): Compress the output.
3253 2018-11-13  Aldy Hernandez  <aldyh@redhat.com>
3255         * tree-vrp.c (value_range_base::dump): Dump type.
3256         Do not use INF nomenclature for 1-bit types.
3257         (dump_value_range): Group all variants to common dumping code.
3258         (debug): New overloaded functions for value_ranges.
3259         (value_range_base::dump): Remove no argument version.
3260         (value_range::dump): Same.
3262 2018-11-13  Richard Biener  <rguenther@suse.de>
3264         PR tree-optimization/87931
3265         * tree-vect-loop.c (vect_is_simple_reduction): Restrict
3266         nested cycles we support to latch computations vectorizable_reduction
3267         handles.
3269 2018-11-13  Martin Liska  <mliska@suse.cz>
3271         PR tree-optimization/87885
3272         * cfghooks.c (account_profile_record): Rename
3273         to ...
3274         (profile_record_check_consistency): ... this.
3275         Calculate missing num_mismatched_freq_in.
3276         (profile_record_account_profile): New function
3277         that calculates time and size of a function.
3278         * cfghooks.h (struct profile_record): Remove
3279         all tuples.
3280         (struct cfg_hooks): Remove after_pass flag.
3281         (account_profile_record): Rename to ...
3282         (profile_record_check_consistency): ... this.
3283         (profile_record_account_profile): New.
3284         * cfgrtl.c (rtl_account_profile_record): Remove
3285         after_pass flag.
3286         * passes.c (check_profile_consistency): Do only
3287         checking.
3288         (account_profile): Calculate size and time of
3289         function only.
3290         (pass_manager::dump_profile_report): Reformat
3291         output.
3292         (execute_one_ipa_transform_pass): Call
3293         consistency check before clean upand call account_profile
3294         after a clean up is done.
3295         (execute_one_pass): Call check_profile_consistency and
3296         account_profile instead of using after_pass flag..
3297         * tree-cfg.c (gimple_account_profile_record): Likewise.
3299 2018-11-13  Martin Liska  <mliska@suse.cz>
3301         PR sanitizer/87930
3302         * config/i386/i386.c (ix86_option_override_internal): Error
3303         about usage -mabi=ms and -fsanitize={,kernel-}address.
3305 2018-11-13  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3307         * config/aarch64/aarch64.c
3308         (aarch64_vectorize_preferred_vector_alignment): Change return type to
3309         poly_uint64.
3310         (aarch64_simd_vector_alignment_reachable): Adapt to preferred vector
3311         alignment being a poly int.
3312         * doc/tm.texi (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Change
3313         return type to poly_uint64.
3314         * target.def (default_preferred_vector_alignment): Likewise.
3315         * targhooks.c (default_preferred_vector_alignment): Likewise.
3316         * targhooks.h (default_preferred_vector_alignment): Likewise.
3317         * tree-vect-data-refs.c (vect_calculate_target_alignment): Likewise.
3318         (vect_compute_data_ref_alignment): Adapt to vector alignment being a
3319         poly int.
3320         (vect_update_misalignment_for_peel): Likewise.
3321         (vect_enhance_data_refs_alignment): Likewise.
3322         (vect_find_same_alignment_drs): Likewise.
3323         (vect_duplicate_ssa_name_ptr_info): Likewise.
3324         (vect_setup_realignment): Likewise.
3325         (vect_can_force_dr_alignment_p): Change alignment parameter type to
3326         poly_uint64.
3327         * tree-vect-loop-manip.c (get_misalign_in_elems): Learn to construct a
3328         mask with a compile time variable vector alignment.
3329         (vect_gen_prolog_loop_niters): Adapt to vector alignment being a poly
3330         int.
3331         (vect_do_peeling): Exit early if vector alignment is not constant.
3332         * tree-vect-stmts.c (ensure_base_align): Adapt to vector alignment being
3333         a poly int.
3334         (vectorizable_store): Likewise.
3335         (vectorizable_load): Likweise.
3336         * tree-vectorizer.h (struct dr_vec_info): Make target_alignment field a
3337         poly_uint64.
3338         (vect_known_alignment_in_bytes): Adapt to vector alignment being a
3339         poly int.
3340         (vect_can_force_dr_alignment_p): Change alignment parameter type to
3341         poly_uint64.
3343 2018-11-13  Richard Biener  <rguenther@suse.de>
3345         PR tree-optimization/87962
3346         * tree-vect-loop.c (vect_is_simple_reduction): More reliably
3347         detect outer reduction for disqualifying in-loop uses.
3349 2018-11-13  Richard Biener  <rguenther@suse.de>
3351         PR tree-optimization/87967
3352         * tree-vect-loop.c (vect_transform_loop): Also copy PHIs
3353         for constants for the scalar loop.
3355 2018-11-13  Alan Modra  <amodra@gmail.com>
3357         * config/rs6000/linux64.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Exclude
3358         integer constants when -mcmodel=medium.
3360 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
3362         * config/arc/arc.h (FUNCTION_PROFILER): Redefine to empty.
3363         * config/arc/elf.h (PROFILE_HOOK): Define.
3364         * config/arc/linux.h (PROFILE_HOOK): Likewise.
3366 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
3368         * config/arc/arc.c (hwloop_optimize): Bailout when detecting a
3369         jump table data in the text section.
3371 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
3373         * config/arc/arc.c (arc_eh_return_address_location): Repurpose it
3374         to fit the eh_return pattern.
3375         * config/arc/arc.md (eh_return): Define.
3376         (VUNSPEC_ARC_EH_RETURN): Likewise.
3377         * config/arc/arc-protos.h (arc_eh_return_address_location): Match
3378         new implementation.
3379         * config/arc/arc.h (EH_RETURN_HANDLER_RTX): Remove it.
3382 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
3384         * common/config/arc/arc-common.c (arc_option_optimization_table):
3385         Millicode optimization is default on for size optimizations.
3386         * config/arc/arc-protos.h (arc_check_multi): New function.
3387         * config/arc/arc.c (RTX_OK_FOR_OFFSET_P): Rearange.
3388         (ENTER_LEAVE_START_REG): Define.
3389         (ENTER_LEAVE_END_REG): Likewise.
3390         (arc_override_options): Disable millicode when long calls option
3391         is on.
3392         (arc_frame_info): Change it from int to bool.
3393         (arc_compute_frame_size): Clean up.
3394         (arc_save_restore): Remove.
3395         (frame_save_reg): New function.
3396         (frame_restore_reg): Likewise.
3397         (arc_enter_leave_p): Likewise.
3398         (arc_save_callee_saves): Likewise.
3399         (arc_restore_callee_saves): Likewise.
3400         (arc_save_callee_enter): Likewise.
3401         (arc_restore_callee_leave): Likewise.
3402         (arc_save_callee_milli): Likewise.
3403         (arc_restore_callee_milli): Likewise.
3404         (arc_expand_prologue): Reimplement to emit enter/leave
3405         instructions.
3406         (arc_expand_epilogue): Likewise.
3407         (arc_check_multi): New function.
3408         * config/arc/arc.md (push_multi_fp): New pattern.
3409         (push_multi_fp_blink): Likewise.
3410         (pop_multi_fp): Likewise.
3411         (pop_multi_fp_blink): Likewise.
3412         (pop_multi_fp_ret): Likewise.
3413         (pop_multi_fp_blink_ret): Likewise.
3414         * config/arc/arc.opt (mmillicode): Update option.
3415         (mcode-density-frame): New option.
3416         * config/arc/predicates.md (push_multi_operand): New predicate.
3417         (pop_multi_operand): Likewise.
3418         * doc/invoke.texi (ARC): Update ARC options information.
3421 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
3423         * config/arc/arc-protos.h (gen_operands_ldd_std): Add.
3424         * config/arc/arc.c (operands_ok_ldd_std): New function.
3425         (mem_ok_for_ldd_std): Likewise.
3426         (gen_operands_ldd_std): Likewise.
3427         * config/arc/arc.md: Add peephole2 rules for std/ldd.
3429 2018-11-13  Eric Botcazou  <ebotcazou@adacore.com>
3431         * toplev.c (output_stack_usage): Turn test on flag_stack_usage into
3432         test on stack_usage_file.
3433         (lang_dependent_init): Do not open the .su file if generating LTO.
3435 2018-11-13  Jakub Jelinek  <jakub@redhat.com>
3437         PR rtl-optimization/87918
3438         * simplify-rtx.c (simplify_merge_mask): For COMPARISON_P, use
3439         simplify_gen_relational rather than simplify_gen_binary.
3441 2018-11-13  Richard Biener  <rguenther@suse.de>
3443         * tree-ssanames.h (set_range_info): Use value_range_base.
3444         (get_range_info): Likewise.
3445         * tree-ssanames.c (set_range_info): Likewise.
3446         (get_range_info): Likewise.
3447         * tree-vrp.c (value_range_base::union_helper): Split
3448         out common parts of value_range[_base]::union_.
3449         (value_range_base::union_): Update.
3450         (value_range::union_): Likewise.
3451         (determine_value_range_1): Use value_range_base.
3452         (determine_value_range): Likewise.
3453         * tree-vrp.h (value_range_base::union_helper): Move ...
3454         (value_range::union_helper): ... from here.
3456 2018-11-13  Alan Modra  <amodra@gmail.com>
3458         * config/rs6000/rs6000.c (rs6000_secondary_reload_inner): Negate
3459         offset for PRE_DEC.
3460         (rs6000_secondary_reload_gpr): Don't call find_replacement.
3462 2018-11-13  Sandra Loosemore  <sandra@codesourcery.com>
3464         PR middle-end/59634
3465         * doc/invoke.texi (Optimize Options): Clarify that the
3466         l1-cache-line-size, l1-cache-size, and l2-cache-size parameters
3467         apply to data cache size.
3469 2018-11-13  Alan Modra  <amodra@gmail.com>
3471         * config/rs6000/predicates.md (logical_const_operand),
3472         (logical_operand): Correct comment.
3473         * config/rs6000/rs6000.c (rs6000_emit_prologue): Comment fix.
3475 2018-11-13  Alan Modra  <amodra@gmail.com>
3477         * config/rs6000/rs6000.md (addsi3_high): Prefix with '*'.
3479 2018-11-13  Alan Modra  <amodra@gmail.com>
3481         * gcc/doc/md.texi (Machine Constraints): Correct rs6000 h constraint
3482         description.
3483         * config/rs6000/rs6000.md (movsi_internal1): Delete MT%0 case
3484         covered by alternative.
3485         (movcc_internal1): Ignore h for register preference.
3486         (mov<mode>_hardfloat64): Likewise.
3487         (mov<mode>_softfloat): Ignore c, l, h for register preference.
3489 2018-11-12  Sandra Loosemore  <sandra@codesourcery.com>
3491         PR preprocessor/47823
3492         * doc/cpp.texi (Alternatives to Wrapper #ifndef): Move #pragma once
3493         documentation to...
3494         (Pragmas): ...here.
3495         * doc/extend.texi (Pragmas): Note additional pragmas documented
3496         in the CPP manual.
3498 2018-11-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
3500         PR middle-end/86677
3501         PR middle-end/87528
3502         * tree-scalar-evolution.c (expression_expensive_p): Make
3503         BUILTIN POPCOUNT as expensive when backend does not define it.
3505 2018-11-12  Fredrik Noring  <noring@nocrew.org>
3507         * config.gcc: Update with-llsc defaults for MIPS r5900.
3509 2018-11-12  Martin Liska  <mliska@suse.cz>
3511         PR gcov-profile/87442
3512         * common.opt: Add -fprofile-filter-files and -fprofile-exclude-files
3513         options.
3514         * doc/invoke.texi: Document them.
3515         * tree-profile.c (parse_profile_filter): New.
3516         (parse_profile_file_filtering): Likewise.
3517         (release_profile_file_filtering): Likewise.
3518         (include_source_file_for_profile): Likewise.
3519         (tree_profiling): Filter source files based on the
3520         newly added options.
3522 2018-11-12  Martin Liska  <mliska@suse.cz>
3524         PR target/87903
3525         * doc/extend.texi: Add missing values for __builtin_cpu_is and
3526         __builtin_cpu_supports for x86 target.
3528 2018-11-12  Sandra Loosemore  <sandra@codesourcery.com>
3530         PR middle-end/21110
3531         * doc/rtl.texi (Constants): Clarify that mode of "high" doesn't
3532         have to be Pmode.
3533         (Arithmetic): Likewise for "lo_sum".
3535 2018-11-12  Renlin Li  <renlin.li@arm.com>
3537         PR target/87815
3538         * dse.c (get_stored_val): Add check for compile-time constantness
3539         of gap.
3541 2018-11-12  Sudakshina Das  <sudi.das@arm.com>
3543         * config/arm/arm-cpus.in (armv8_5, sb, predres): New features.
3544         (ARMv8_5a): New fgroup.
3545         (armv8.5-a): New arch.
3546         (armv8-a, armv8.1-a, armv8.2-a, armv8.3-a, armv8.4-a): New options
3547         sb and predres.
3548         * config/arm/arm-tables.opt: Regenerate.
3549         * config/arm/t-aprofile: Add matching rules for -march=armv8.5-a
3550         * config/arm/t-arm-elf (all_v8_archs): Add armv8.5-a.
3551         * config/arm/t-multilib (v8_5_a_simd_variants): New variable.
3552         Add matching rules for -march=armv8.5-a and extensions.
3553         * doc/invoke.texi (ARM options): Document -march=armv8.5-a.
3554         Add sb and predres to all armv8-a except armv8.5-a.
3556 2018-11-12  Richard Biener  <rguenther@suse.de>
3558         * tree-vrp.h (value_range[_base]::set): Make public.  Provide
3559         overload for single value.
3560         (value_range[_base]::set_nonnull): New.
3561         (value_range[_base]::set_null): Likewise.
3562         (value_range): Document bitmap copying behavior, mark
3563         copy constructor and assignment operator deleted.
3564         (value_range::move): New.
3565         (value_range::set_and_canonicalize): Default bitmap to zero.
3566         (set_value_range_to_nonnull): Remove.
3567         (set_value_range_to_null): Likewise.
3568         (set_value_range): Likewise.
3569         (set_value_range_to_value): Likewise.
3570         (extract_range_from_unary_expr): Work on value_range_base.
3571         (extract_range_from_binary_expr_1): Likewise.  Rename to...
3572         (extract_range_from_binary_expr): ... this.
3573         * tree-vrp.c (value_range::update): Clear equiv bitmap
3574         if required.
3575         (value_range::move): New, move equiv bitmap.
3576         (value_range_base::set_undefined): Avoid assignment.
3577         (value_range::set_undefined): Likewise.
3578         (value_range_base::set_varying): Likewise.
3579         (value_range::set_varying): Likewise.
3580         (set_value_range): Remove.
3581         (value_range_base::set): New overload for value.
3582         (value_range::set): Likewise.
3583         (set_value_range_to_nonnull): Remove.
3584         (value_range_base::set_nonnull): New.
3585         (value_range::set_nonnull): Likewise.
3586         (set_value_range_to_null): Remove.
3587         (value_range_base::set_null): New.
3588         (value_range::set_null): Likewise.
3589         (range_is_null): Work on value_range_base.
3590         (range_is_nonnull): Likewise.
3591         (ranges_from_anti_range): Likewise.
3592         (extract_range_into_wide_ints): Likewise.
3593         (extract_range_from_multiplicative_op): Likewise.
3594         (extract_range_from_binary_expr): Likewise.  Update for API changes.
3595         (extract_range_from_unary_expr): Likewise.  Remove OBJ_TYPE_REF
3596         handling.
3597         (value_range::intersect_helper): Avoid copy and assignment.
3598         (value_range::union_helper): Likewise.
3599         (determine_value_range_1): Adjust.
3600         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
3601         Avoid assignment by using move.
3602         (evrp_range_analyzer::record_ranges_from_stmt): Avoid assignment.
3603         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
3604         Likewise.
3605         * tree-ssanames.c (get_range_info): Likewise.
3606         * vr-values.h (vr_values::get_vr_for_comparison): Adjust API.
3607         * vr-values.c (vr_values::get_value_range): Adjust.
3608         (vr_values::update_value_range): Likewise.
3609         (symbolic_range_based_on_p): Work on value_range_base.
3610         (vr_values::extract_range_from_binary_expr): Use value_range_base.
3611         (vr_values::extract_range_from_unary_expr): Likewise.
3612         (vr_values::extract_range_from_cond_expr): Avoid assignment.
3613         (vr_values::extract_range_from_comparison): Adjust.
3614         (vr_values::check_for_binary_op_overflow): Use value_range_base.
3615         (vr_values::extract_range_basic): Adjust.
3616         (vr_values::adjust_range_with_scev): Likewise.
3617         (vr_values::vrp_visit_assignment_or_call): Likewise.
3618         (vr_values::get_vr_for_comparison): Change API to avoid
3619         assignment and copy construction.
3620         (vr_values::compare_name_with_value): Adjust accordingly.
3621         (vr_values::compare_names): Likewise.
3622         (vr_values::extract_range_from_phi_node): Avoid assignment and
3623         bogus in-place modify of equiv bitmap.
3624         (vr_values::simplify_bit_ops_using_ranges): Use value_range_base.
3625         * ipa-prop.c (ipa_compute_jump_functions_for_edge): Adjust
3626         for extract_range_from_unary_expr API change.
3627         * ipa-cp.c (ipa_vr_operation_and_type_effects): Likewise.
3629 2018-11-12  Eric Botcazou  <ebotcazou@adacore.com>
3631         * config/mcore/mcore.h (WORD_REGISTER_OPERATIONS): Remove duplicate.
3633 2018-11-12  Richard Biener  <rguenther@suse.de>
3635         * tree-vrp.h (value_range_base::symbolic_p,
3636         value_range_base::constant_p, value_range_base::zero_p,
3637         value_range_base::singleton_p): Move from value_range.
3638         (value_range::dump): Add.
3639         * gimple-ssa-evrp-analyze.c
3640         (evrp_range_analyzer::record_ranges_from_phis): Use set_varying.
3641         * ipa-cp.c (ipcp_vr_lattice::print): Use dump_value_range.
3642         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
3643         Use set_varying.
3644         * tree-vrp.c (value_range::symbolic_p): Move to value_range_base.
3645         (value_range::constant_p): Likewise.
3646         (value_range::singleton_p): Likewise.
3647         (value_range_base::dump): Add.
3648         (set_value_range_to_undefined): Remove.
3649         (set_value_range_to_varying): Likewise.
3650         (range_int_cst_p): Take value_range_base argument.
3651         (range_int_cst_singleton_p): Likewise.
3652         (value_range_constant_singleton): Likewise.
3653         (vrp_set_zero_nonzero_bits): Likewise.
3654         (extract_range_from_multiplicative_op): Use set_varying.
3655         (extract_range_from_binary_expr_1): Likewise. Use set_undefined.
3656         (extract_range_from_unary_expr): Likewise.
3657         (dump_value_range_base): Change to overload of dump_value_range.
3658         (vrp_prop::vrp_initialize): Use set_varying and set_undefined.
3659         (vrp_prop::visit_stmt): Likewise.
3660         (value_range::intersect_helper): Likewise.
3661         (value_range::union_helper): Likewise.
3662         (determine_value_range_1): Likewise.
3664 2018-11-12  Richard Biener  <rguenther@suse.de>
3666         * tree-vrp.c (set_value_range_to_nonnull): Clear equiv.
3667         (set_value_range_to_null): Likewise.
3668         * vr-values.c (vr_values::extract_range_from_comparison):
3669         Clear equiv for constant singleton ranges.
3671 2018-11-12  Wei Xiao  <wei3.xiao@intel.com>
3673         * config/i386/sse.md: Combine VFIXUPIMM* patterns
3674         (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
3675         (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
3676         (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Remove.
3677         (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
3678         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
3679         (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Remove.
3681 2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>
3683         PR c/69502
3684         * doc/extend.texi (Common Type Attributes): For the align type
3685         attribute, copy language about decreasing alignment from the
3686         corresponding variable attribute.
3688 2018-11-11  Xianmiao Qu  <xianmiao_qu@c-sky.com>
3690         * config/csky/csky.md (*fpuv2_nmulsf3_1, *fpuv2_nmuldf3_1): Handle
3691         -frounding-math.
3693 2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>
3695         PR c++/43105
3696         * doc/invoke.texi (C++ Dialect Options): Add warning about mixing
3697         -frtti and -fno-rtti code.
3699 2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>
3701         PR c/26366
3702         * doc/extend.texi (Other Builtins): Document probability associated
3703         with __builtin_expect.
3705 2018-11-11  Uros Bizjak  <ubizjak@gmail.com>
3707         PR target/87928
3708         * config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI
3709         instead of (TARGET_64BIT && ix86_abi == MS_ABI).
3710         * config/i386/darwin.h (STACK_BOUNDARY): Ditto.
3711         * config/i386/cygming.h (STACK_BOUNDARY): Remove.
3713 2018-11-11  Xianmiao Qu  <xianmiao_qu@c-sky.com>
3715         * config/csky/csky-linux-elf.h (CC1_SPEC): Support -profile.
3717 2018-11-11  Xianmiao Qu  <xianmiao_qu@c-sky.com>
3719         * config/csky/csky.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
3721 2018-11-11  Richard Biener  <rguenther@suse.de>
3723         * tree-vrp.h (class value_range_base): New base class for
3724         value_range containing all but the m_equiv member.
3725         (dump_value_range_base): Add.
3726         (range_includes_zero_p): Work on value_range_base.
3727         * tree-vrp.c (value_range_base::set): Split out base handling
3728         from...
3729         (value_range::set): this.
3730         (value_range::set_equiv): New.
3731         (value_range_base::value_range_base): New constructors.
3732         (value_range_base::check): Split out base handling from...
3733         (value_range::check): this.
3734         (value_range::equal_p): Refactor in terms of
3735         ignore_equivs_equal_p which is now member of the base.
3736         (value_range_base::set_undefined): New.
3737         (value_range_base::set_varying): Likewise.
3738         (value_range_base::dump):Split out base handling from...
3739         (value_range::dump): this.
3740         (value_range_base::set_and_canonicalize): Split out base handling
3741         from...
3742         (value_range::set_and_canonicalize): this.
3743         (value_range_base::union_): New.
3744         * ipa-prop.h (struct ipa_jump_func): Use value_range_base *
3745         for m_vr.
3746         * ipa-cp.c (class ipcp_vr_lattice): Use value_range_base
3747         instead of value_range everywhere.
3748         (ipcp_vr_lattice::print): Use dump_value_range_base.
3749         (ipcp_vr_lattice::meet_with): Adjust.
3750         (ipcp_vr_lattice::meet_with_1): Likewise.
3751         (ipa_vr_operation_and_type_effects): Likewise.
3752         (propagate_vr_across_jump_function): Likewise.
3753         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Likewise.
3754         (ipa_get_value_range): Likewise.
3755         (ipa_set_jfunc_vr): Likewise.
3756         (ipa_compute_jump_functions_for_edge): Likewise.
3758 2018-11-10  Sandra Loosemore  <sandra@codesourcery.com>
3760         PR middle-end/65703
3761         * doc/invoke.texi (Optimize Options): Add @opindex entries
3762         for the positive forms of -fno-xxx and -mno-xxx options
3763         that were lacking them.
3765 2018-11-10  Segher Boessenkool  <segher@kernel.crashing.org>
3767         * combine.c (make_more_copies): Only make an intermediate copy if the
3768         dest of a move is a pseudo.
3770 2018-11-09  Maya Rashish  <coypu@sdf.org>
3772         PR target/87221
3773         * config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): Use crtbeginS.o for PIE.
3774         (NETBSD_ENDFILE_SPEC): Use crtendS.o for PIE.
3776 2018-11-09  Sandra Loosemore  <sandra@codesourcery.com>
3778         PR driver/41179
3779         PR middle-end/65703
3780         * doc/invoke.texi (Optimize Options): Clarify default behavior
3781         for -fno-toplevel-reorder, -fno-defer-pop, and -fno-branch-count-reg.
3783 2018-11-09  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3785         PR tree-optimization/87940
3786         * expr.c (string_constant): Don't strip NOPS in subexpressions.
3787         Fold PLUS_EXPR correctly.
3789 2018-11-09  Ilya Leoshkevich  <iii@linux.ibm.com>
3791         PR target/87762
3792         * config/s390/s390.c (s390_safe_relative_long_p): New function.
3793         (annotate_constant_pool_refs): Skip insns which support
3794         relative addressing.
3795         (annotate_constant_pool_refs_1): New helper function.
3796         (find_constant_pool_ref): Skip insns which support relative
3797         addression.
3798         (find_constant_pool_ref_1): New helper function.
3799         (replace_constant_pool_ref): Skip insns which support
3800         relative addressing.
3801         (replace_constant_pool_ref_1): New helper function.
3802         (s390_mainpool_start): Adapt to the new signature.
3803         (s390_mainpool_finish): Likewise.
3804         (s390_chunkify_start): Likewise.
3805         (s390_chunkify_finish): Likewise.
3806         (pass_s390_early_mach::execute): Likewise.
3807         (s390_prologue_plus_offset): Likewise.
3808         (s390_emit_prologue): Likewise.
3809         (s390_emit_epilogue): Likewise.
3811 2018-11-09  Jakub Jelinek  <jakub@redhat.com>
3813         * gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid
3814         but unsupported lastprivate with conditional modifier.
3816 2018-11-09  Jeff Law  <law@redhat.com>
3818         * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): Handle
3819         unused argument better.  Add gcc_unreachable to silence warning.
3821 2018-11-09  Martin Sebor  <msebor@redhat.com>
3823         PR middle-end/81824
3824         * attribs.c (has_attribute): New helper function.
3825         (decls_mismatched_attributes, maybe_diag_alias_attributes): Same.
3826         * attribs.h (decls_mismatched_attributes): Declare.
3827         * cgraphunit.c (handle_alias_pairs): Call maybe_diag_alias_attributes.
3828         (maybe_diag_incompatible_alias): Use OPT_Wattribute_alias_.
3829         * common.opt (-Wattribute-alias): Take an argument.
3830         (-Wno-attribute-alias): New option.
3831         * doc/extend.texi (Common Function Attributes): Document copy.
3832         (Common Variable Attributes): Same.
3833         * doc/invoke.texi (-Wmissing-attributes): Document enhancement.
3834         (-Wattribute-alias): Document new option argument.
3836 2018-11-09  Richard Earnshaw  <rearnsha@arm.com>
3838         * config/arm/parsecpu.awk (/alias/): Tighten invisible alias
3839         matching criteria.  Remove unused array initializer.
3841 2018-11-09  Bill Schmidt  <wschmidt@linux.ibm.com>
3842             Jinsong Ji  <jji@us.ibm.com>
3844         * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix incorrect
3845         constraints by introducing a new temporary.
3846         (_mm_cvtss_si64): Likewise.
3848 2018-11-09  Martin Liska  <mliska@suse.cz>
3850         * common.opt: Add -fipa-stack-alignment flag.
3851         * doc/invoke.texi: Document it.
3852         * final.c (rest_of_clean_state): Guard stack
3853         shrinking with flag.
3855 2018-11-09  Martin Liska  <mliska@suse.cz>
3857         * cgraph.h (ipa_discover_readonly_nonaddressable_vars): Rename
3858         to ...
3859         (ipa_discover_variable_flags): ... this.
3860         * common.opt: Come up with new flag -fipa-reference-addressable.
3861         * doc/invoke.texi: Document it.
3862         * ipa-reference.c (propagate): Call the renamed fn.
3863         * ipa-visibility.c (whole_program_function_and_variable_visibility):
3864         Likewise.
3865         * ipa.c (ipa_discover_readonly_nonaddressable_vars): Renamed to
3866         ...
3867         (ipa_discover_variable_flags): ... this.  Discover
3868         non-addressable variables only with the newly added flag.
3869         * opts.c: Enable the newly added flag with -O1 and higher
3870         optimization level.
3872 2018-11-09  David Malcolm  <dmalcolm@redhat.com>
3874         * json.cc (selftest::test_writing_literals): Fix comment.
3876 2018-11-09  Martin Liska  <mliska@suse.cz>
3878         * config/aarch64/aarch64.c (aarch64_parse_arch): Do not copy
3879         string to a stack buffer.
3880         (aarch64_parse_cpu): Likewise.
3881         (aarch64_parse_tune): Likewise.
3883 2018-11-09  Richard Biener  <rguenther@suse.de>
3885         PR tree-optimization/87953
3886         * tree-vect-loop.c (vectorizable_reduction): For analysis
3887         always pass ops[0] to vectorizable_condition.
3889 2018-11-09  Stafford Horne  <shorne@gmail.com>
3890             Richard Henderson  <rth@twiddle.net>
3891             Joel Sherrill  <joel@rtems.org>
3893         * common/config/or1k/or1k-common.c: New file.
3894         * config/or1k/*: New.
3895         * config.gcc (or1k*-*-*): New.
3896         * configure.ac (or1k*-*-*): New test for openrisc tls.
3897         * configure: Regenerated.
3898         * doc/install.texi: Document OpenRISC triplets.
3899         * doc/invoke.texi: Document OpenRISC arguments.
3900         * doc/md.texi: Document OpenRISC.
3902 2018-11-09  Richard Earnshaw  <rearnsha@arm.com>
3904         * config/arm/arm-cpus.in (arm7tdmi): Add an alias for arm7tdmi-s.
3905         (arm7tdmi-s): Delete CPU.
3906         (arm710t): Add aliases for arm720t and arm740t.
3907         (arm720t, arm740t): Delete CPUs.
3908         (arm920t): Add aliases for arm920, arm922t and arm940t.
3909         (arm920, arm922t, arm940t): Delete CPUs.
3910         (arm10tdmi): Add alias for arm1020t.
3911         (arm1020t): Delete CPU.
3912         (arm9e): Add aliases for arm946e-s, arm966e-s and arm968e-s.
3913         (arm946e-s, arm966e-s, arm968e-s): Delete CPUs.
3914         (arm10e): Add aliases for arm1020e and arm1022e.
3915         (arm1020e, arm1022e): Delete CPU.
3916         * config/arm/arm.md (generic_sched): Remove entries that are now
3917         handled by aliases.
3918         (generic_vfp): Likewise.
3919         * config/arm/arm1020e.md: Simplify tuning selection based on alias
3920         changes.
3921         * config/arm/arm-tune.md: Regenerated.
3922         * config/arm/arm-tables.opt: Regenerated.
3924 2018-11-09  Richard Biener  <rguenther@suse.de>
3926         PR tree-optimization/87621
3927         * tree-vect-loop.c (vectorizable_reduction): Handle reduction
3928         op with only phi inputs.
3929         * tree-ssa-loop-ch.c: Include tree-ssa-sccvn.h.
3930         (ch_base::copy_headers): Run CSE on copied loop headers.
3931         (pass_ch_vect::process_loop_p): Simplify.
3933 2018-11-09  Alexandre Oliva <oliva@adacore.com>
3935         * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Adjust
3936         for non-w64 x86_64 biarch.
3938 2018-11-09  Alexandre Oliva <aoliva@redhat.com>
3940         PR rtl-optimization/86438
3941         * compare-elim.c (try_eliminate_compare): Use SET_SRC instead
3942         of in_b for the compare if in_b is SET_DEST.
3944         PR target/87793
3945         * config/i386/i386.c (ix86_const_not_ok_for_debug_p): Reject
3946         non-toplevel UNSPEC.
3948 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
3950         * tree-vrp.c (value_range::check): Do not access internals
3951         directly.
3952         (value_range::singleton_p): Same.
3953         (value_range::type): Same.
3954         (vrp_finalize): Use value_range API.
3956 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
3958         * tree-vrp.c (may_contain_p): Do not access m_min/m_max directly.
3960 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
3962         * vr-values.c (vr_values::get_value_range): Use value_range API
3963         instead of piecing together ranges.
3964         (vr_values::update_value_range): Same.
3966 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
3968         * gimple-fold.c (size_must_be_zero_p): Use value_range API instead
3969         of performing ad-hoc calculations.
3970         * tree-ssanames.c (set_range_info): New overloaded function
3971         accepting value_range &.
3972         (get_range_info): Same.
3973         * tree-ssanames.h (set_range_info_raw): Remove.
3974         (set_range_info): New prototype.
3975         (get_range_info): Same.
3976         * tree-vrp.h (value_range::null_p): Rename to zero_p.
3977         * tree-vrp.c (value_range::null_p): Same.
3979 2018-11-09  Jan Hubicka  <jh@suse.cz>
3981         * tree.c (fld_type_variant_equal_p): Test user align flag.
3982         (flt_type_variant): Copy user align flag.
3983         (fld_incomplete_type_of): Clear it.
3985 2018-11-09  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3987         * config/arm/neon.md (div<mode>3): New pattern.
3989 2018-11-08  Andi Kleen  <ak@linux.intel.com>
3991         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET): New.
3992         (OPTION_MASK_ISA_PTWRITE_UNSET): New.
3993         (ix86_handle_option): Handle OPT_mptwrite.
3994         * config/i386/cpuid.h (bit_PTWRITE): Add.
3995         * config/i386/driver-i386.c (host_detect_local_cpu): Detect ptwrite.
3996         * config/i386/i386-builtin.def (BDESC): Add ptwrite32/64.
3997         * config/i386/i386-c.c (ix86_target_macros_internal): Define __PTWRITE__.
3998         * config/i386/i386.c (ix86_target_string): Handle ptwrite.
3999         (ix86_option_override_internal): Handle PTA_PTWRITE.
4000         (ix86_valid_target_attribute_inner_p): Define ptwrite.
4001         (def_builtin2): Force UINT64 to be 64bit only.
4002         * config/i386/i386.h (TARGET_PTWRITE): Add.
4003         (TARGET_PTWRITE_P): Add.
4004         (PTA_PTWRITE): Add.
4005         * config/i386/i386.md: Define ptwrite.
4006         * config/i386/i386.opt: Add -mptwrite.
4007         * config/i386/immintrin.h (_ptwrite64): Add.
4008         (_ptwrite32): Add
4009         * doc/extend.texi: Document __builtin_ia32_ptwrite*.
4010         * doc/invoke.texi: Document -mptwrite.
4012 2018-11-08  Peter Bergner  <bergner@linux.ibm.com>
4014         PR rtl-optimization/87600
4015         * cfgexpand.c (expand_asm_stmt): Catch illegal asm constraint usage.
4016         * lra-constraints.c (process_alt_operands): Skip illegal hard
4017         register usage.  Prefer reloading non hard register operands.
4019 2018-11-08  Sandra Loosemore  <sandra@codesourcery.com>
4021         PR other/36572
4022         * doc/invoke.texi (Optimize Options): Clarify default behavior
4023         for -fno-sched-interblock and -fno-sched-spec.
4025 2018-11-08  Roman Geissler  <roman.geissler@amadeus.com>
4027         * collect2.c (linker_select):  Add USE_LLD_LD.
4028         (ld_suffixes): Add ld.lld.
4029         (main): Handle -fuse-ld=lld.
4030         * common.opt (-fuse-ld=lld): New option.
4031         * doc/invoke.texi (-fuse-ld=lld): Document.
4032         * opts.c (common_handle_option): Handle OPT_fuse_ld_lld.
4034 2018-11-08  Paul Koning  <ni1d@arrl.net>
4036         * config/pdp11/constraints.md: Add "Z" series constraints for use
4037         with pre-dec and post-inc addressing.
4038         * config/pdp11/pdp11-protos.m (expand_block_move): Delete.
4039         (pdp11_expand_operands): Add int argument (word count).
4040         (pdp11_sp_frame_offset): Delete.
4041         (pdp11_cmp_length): New function.
4042         (pushpop_regeq): New function.
4043         * config/pdp11/pdp11.c (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P):
4044         Add hook.
4045         (pdp11_expand_prologue, pdp11_expand_epilogue): Rewrite for new
4046         frame layout.
4047         (pdp11_initial_elimination_offset): Ditto.
4048         (pdp11_expand_operands): Add word count argument.  Bugfixes.
4049         (output_move_multiple): Change how pointer adjustment is done.
4050         (pdp11_gen_int_label): Correct format.
4051         (output_ascii): Ditto.
4052         (pdp11_asm_output_var): Add code for DEC assembler case.
4053         (pdp11_asm_print_operand): Bugfix for CONST_DOUBLE holding integer
4054         value.
4055         (legitimate_const_double_p): Ditto.
4056         (pdp11_register_move_cost): Adjust for new register classes.
4057         (pdp11_regno_reg_class): Ditto.
4058         (expand_block_move): Delete.
4059         (pushpop_regeq): New function.
4060         (pdp11_legitimate_address_p): Bugfix in check for constant
4061         offset.
4062         (pdp11_sp_frame_offset): Delete.
4063         (pdp11_reg_save_size): New helper function for new frame layout.
4064         (output_addr_const_pdp11): Remove CONST_DOUBLE case.
4065         (pdp11_expand_shift): Bugfix in check for constant shift count.
4066         (pdp11_shift_length): Ditto.
4067         (pdp11_assemble_shift): Copy input to pdp11_expand_operands.
4068         (pdp11_cmp_length): New function.
4069         * config/pdp11/pdp11.h (TARGET_CPU_CPP_BUILTINS): Add macros for
4070         some compile options.
4071         (FIXED_REGISTERS): Remove HARD_FRAME_POINTER_REGNUM.
4072         (CALL_USED_REGISTERS): Ditto.
4073         (ELIMINABLE_REGS): Ditto.
4074         (REGISTER_NAMES): Ditto.
4075         (reg_class): Add classes NOTR0_REG through NOTSP_REG for use by Z
4076         constraints.
4077         (REG_CLASS_NAMES): Ditto.
4078         (REG_CLASS_CONTENTS): Ditto.  Also remove
4079         HARD_FRAME_POINTER_REGNUM.
4080         (CPU_REG_CLASS): New macro.
4081         (CLASS_MAX_NREGS): Adjust for new register classes.
4082         (FUNCTION_PROFILER): Make no-op.
4083         (may_call_alloca): Remove unused declaration.
4084         (ASM_OUTPUT_ALIGN): Add workaround for PR87795.
4085         (ASM_OUTPUT_SKIP): Fix format.
4086         * config/pdp11/pdp11.md (unspecv): Add UNSPECV_MOVMEM.
4087         (HARD_FRAME_POINTER_REGNUM): Remove.
4088         (return): Delete.
4089         (*rts): Rename.  Remove epilogue related checks.
4090         (cmpsi, cmpdi): New insn.
4091         (cbranch<mode>4): Change to apply to SI and DI modes as well.
4092         (mov<mode>): Change constraints to enforce that push/pop
4093         destination cannot use the same register as source.
4094         (*mov<mode><cc_cc>): Ditto.
4095         (movmemhi, movmemhi1, movmemhi_nocc): Change to expand block move
4096         at assembly output rather than as RTL expander.
4097         (zero_extendqihi2): Bugfix in check for same registers.
4098         (adddi3_nocc): Bugfix in check for constant operand.
4099         (addsi3_nocc): Ditto.
4100         (subdi3_nocc): Ditto.
4101         (subsi3_nocc): Ditto.
4102         (negdi2_nocc): Copy input to pdp11_expand_operands.
4103         (negsi2_nocc): Ditto.
4104         (bswap2_nocc): Ditto.
4105         * config/pdp11/pdp11.opt (mlra): Fix documentation.
4106         * config/pdp11/t-pdp11: Use -Os.
4108 2018-11-08  Richard Earnshaw  <rearnsha@arm.com>
4110         * config/arm/parsecpu.awk (/alias/): New parsing rule.
4111         (/begin cpu/): Check that the cpu name hasn't been previously defined.
4112         (gen_comm_data): Print out CPU alias tables.
4113         (check_cpu): Match aliases when checking the CPU name.
4114         * config/arm/arm-protos.h (cpu_alias): New structure.
4115         (cpu_option): Add entry for aliases.
4116         * config/arm/arm-cpus.in (strongarm): Add aliases for strongarm110
4117         strongarm1100 and strongarm1110.
4118         (strongarm110, strongarm1100, strongarm1110): Delete CPU entries.
4119         (config/arm/arm-generic.md): Remove redundant references to
4120         strongarm110, strongarm1100 and strongarm1110.
4121         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
4122         Scan aliases for additional hints.
4123         (arm_parse_cpu_option_name): Also match a cpu name against the list
4124         of aliases.
4125         * config/arm/arm-tables.opt: Regenerated.
4126         * config/arm/arm-tune.md: Regenerated.
4128 2018-11-08  Jakub Jelinek  <jakub@redhat.com>
4130         * builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
4131         BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
4132         BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
4133         BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
4134         BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
4135         BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
4136         * gengtype.c (open_base_files): Add omp-general.h.
4137         * gimple.c (gimple_build_omp_critical):
4138         (gimple_build_omp_taskgroup): Add CLAUSES argument.  Call
4139         gimple_omp_taskgroup_set_clauses.
4140         (gimple_build_omp_atomic_load): Add mo argument, call
4141         gimple_omp_atomic_set_memory_order.
4142         (gimple_build_omp_atomic_store): Likewise.
4143         (gimple_copy): Adjust handling of GIMPLE_OMP_TASKGROUP.
4144         * gimple.def (GIMPLE_OMP_TASKGROUP): Use GSS_OMP_SINGLE_LAYOUT
4145         instead of GSS_OMP.
4146         (GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
4147         of GSS_OMP_SINGLE_LAYOUT, adjust comments.
4148         * gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST, GF_OMP_TASK_TASKWAIT
4149         and GF_OMP_ATOMIC_MEMORY_ORDER.  Remove GF_OMP_ATOMIC_SEQ_CST, use
4150         different value for GF_OMP_ATOMIC_NEED_VALUE.
4151         (struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
4152         comments.
4153         (struct gimple_statement_omp_single_layout): And remove here.
4154         (struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
4155         than gimple_statement_omp_single_layout.
4156         (is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
4157         GIMPLE_OMP_TEAMS.
4158         (is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
4159         (gimple_omp_subcode): Formatting fix.
4160         (gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
4161         gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
4162         gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
4163         gimple_omp_teams_host, gimple_omp_teams_set_host,
4164         gimple_omp_task_taskwait_p, gimple_omp_task_set_taskwait_p,
4165         gimple_omp_taskgroup_clauses, gimple_omp_taskgroup_clauses_ptr,
4166         gimple_omp_taskgroup_set_clauses): New inline functions.
4167         (gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
4168         (gimple_build_omp_atomic_store): Likewise.
4169         (gimple_omp_atomic_seq_cst_p): Remove.
4170         (gimple_omp_atomic_memory_order): New function.
4171         (gimple_omp_atomic_set_seq_cst): Remove.
4172         (gimple_omp_atomic_set_memory_order): New function.
4173         (gimple_build_omp_taskgroup): Add clauses argument.
4174         * gimple-pretty-print.c (dump_gimple_omp_taskgroup): New function.
4175         (dump_gimple_omp_task): Print taskwait with depend clauses.
4176         (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Use
4177         dump_omp_atomic_memory_order.
4178         (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
4179         * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALLOC_ONLY,
4180         GOVD_MAP_FROM_ONLY and GOVD_NONTEMPORAL.
4181         (enum omp_region_type): Reserve bits 1 and 2 for auxiliary flags,
4182         renumber values of most of ORT_* enumerators, add ORT_HOST_TEAMS,
4183         ORT_COMBINED_HOST_TEAMS, ORT_TASKGROUP, ORT_TASKLOOP and
4184         ORT_UNTIED_TASKLOOP enumerators.
4185         (enum gimplify_defaultmap_kind): New.
4186         (struct gimplify_omp_ctx): Remove target_map_scalars_firstprivate and
4187         target_map_pointers_as_0len_arrays members, add defaultmap.
4188         (new_omp_context): Initialize defaultmap member.
4189         (gimple_add_tmp_var): Handle ORT_TASKGROUP like ORT_WORKSHARE.
4190         (maybe_fold_stmt): Don't fold even in host teams regions.
4191         (omp_firstprivatize_variable): Handle ORT_TASKGROUP like
4192         ORT_WORKSHARE.  Test ctx->defaultmap[GDMK_SCALAR] instead of
4193         ctx->omp_firstprivatize_variable.
4194         (omp_add_variable): Don't add private/firstprivate for VLAs in
4195         ORT_TASKGROUP.
4196         (omp_default_clause): Print "taskloop" rather than "task" if
4197         ORT_*TASKLOOP.
4198         (omp_notice_variable): Handle ORT_TASKGROUP like ORT_WORKSHARE.
4199         Handle new defaultmap clause kinds.
4200         (omp_is_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.  Allow simd
4201         iterator to be lastprivate or private.  Fix up diagnostics if linear
4202         is used on collapse>1 simd iterator.
4203         (omp_check_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.
4204         (gimplify_omp_depend): New function.
4205         (gimplify_scan_omp_clauses): Add shared clause on parallel for
4206         combined parallel master taskloop{, simd} if taskloop has
4207         firstprivate, lastprivate or reduction clause.  Handle
4208         OMP_CLAUSE_REDUCTION_TASK diagnostics.  Adjust tests for
4209         ORT_COMBINED_TEAMS.  Gimplify depend clauses with iterators.  Handle
4210         cancel and simd OMP_CLAUSE_IF_MODIFIERs.  Handle
4211         OMP_CLAUSE_NONTEMPORAL.  Handle new defaultmap clause kinds.  Handle
4212         OMP_CLAUSE_{TASK,IN}_REDUCTION.  Diagnose invalid conditional
4213         lastprivate.
4214         (gimplify_adjust_omp_clauses_1): Ignore GOVD_NONTEMPORAL.  Handle
4215         GOVD_MAP_ALLOC_ONLY and GOVD_MAP_FROM_ONLY.
4216         (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NONTEMPORAL.  Handle
4217         OMP_CLAUSE_{TASK,IN}_REDUCTION.
4218         (gimplify_omp_task): Handle taskwait with depend clauses.
4219         (gimplify_omp_for): Add shared clause on parallel for combined
4220         parallel master taskloop{, simd} if taskloop has firstprivate,
4221         lastprivate or reduction clause.  Use ORT_TASKLOOP or
4222         ORT_UNTIED_TASKLOOP instead of ORT_TASK or ORT_UNTIED_TASK.  Adjust
4223         tests for ORT_COMBINED_TEAMS.  Handle C++ range for loops with
4224         NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS.  Firstprivatize
4225         __for_end and __for_range temporaries on OMP_PARALLEL for
4226         distribute parallel for{, simd}.  Move OMP_CLAUSE_REDUCTION
4227         and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
4228         sandwiched in between two taskloops.
4229         (computable_teams_clause): Test ctx->defaultmap[GDMK_SCALAR]
4230         instead of ctx->omp_firstprivatize_variable.
4231         (gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
4232         ORT_COMBINED_HOST_TEAMS if not inside of target construct.  If
4233         host teams, use gimplify_and_return_first etc. for body like
4234         for target or target data constructs, and at the end call
4235         gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
4236         (gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
4237         of OMP_ATOMIC_SEQ_CST, pass it as new argument to
4238         gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
4239         gimple_omp_atomic_set_seq_cst calls.
4240         (gimplify_expr) <case OMP_TASKGROUP>: Move handling into a separate
4241         case, handle taskgroup clauses.
4242         * lto-streamer-out.c (hash_tree): Handle
4243         OMP_CLAUSE_{TASK,IN}_REDUCTION.
4244         * Makefile.in (GTFILES): Add omp-general.h.
4245         * omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND,
4246         BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
4247         BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
4248         BUILT_IN_GOMP_LOOP_START, BUILT_IN_GOMP_LOOP_ORDERED_START,
4249         BUILT_IN_GOMP_LOOP_DOACROSS_START,
4250         BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
4251         BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
4252         BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
4253         BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
4254         BUILT_IN_GOMP_LOOP_ULL_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_START,
4255         BUILT_IN_GOMP_LOOP_ULL_DOACROSS_START,
4256         BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
4257         BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
4258         BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
4259         BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME,
4260         BUILT_IN_GOMP_PARALLEL_REDUCTIONS, BUILT_IN_GOMP_SECTIONS2_START,
4261         BUILT_IN_GOMP_TEAMS_REG, BUILT_IN_GOMP_TASKGROUP_REDUCTION_REGISTER,
4262         BUILT_IN_GOMP_TASKGROUP_REDUCTION_UNREGISTER,
4263         BUILT_IN_GOMP_TASK_REDUCTION_REMAP,
4264         BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER): New builtins.
4265         * omp-expand.c (workshare_safe_to_combine_p): Return false for
4266         non-worksharing loops.
4267         (omp_adjust_chunk_size): Don't adjust anything if chunk_size is zero.
4268         (determine_parallel_type): Don't combine parallel with worksharing
4269         which has _reductemp_ clause.
4270         (expand_parallel_call): Emit the GOMP_*nonmonotonic_runtime* or
4271         GOMP_*maybe_nonmonotonic_runtime* builtins instead of GOMP_*runtime*
4272         if there is nonmonotonic modifier or if there is no modifier and no
4273         ordered clause.  For dynamic and guided schedule without monotonic
4274         and nonmonotonic modifier, default to nonmonotonic.
4275         (expand_omp_for): Likewise.  Adjust expand_omp_for_generic caller, use
4276         GOMP_loop{,_ull}{,_ordered,_doacross}_start builtins if there are
4277         task reductions.
4278         (expand_task_call): Add GOMP_TASK_FLAG_REDUCTION flag to flags if
4279         there are any reduction clauses.
4280         (expand_taskwait_call): New function.
4281         (expand_teams_call): New function.
4282         (expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
4283         expand_teams_call for it.  Formatting fix.  Handle taskwait with
4284         depend clauses.
4285         (expand_omp_for_generic): Add SCHED_ARG argument.  Handle expansion
4286         of worksharing loops with task reductions.
4287         (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
4288         expansion of worksharing loops with task reductions.
4289         (expand_omp_sections): Handle expansion of sections with task
4290         reductions.
4291         (expand_omp_synch): For host teams call expand_omp_taskreg.
4292         (omp_memory_order_to_memmodel): New function.
4293         (expand_omp_atomic_load, expand_omp_atomic_store,
4294         expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
4295         instead of gimple_omp_atomic_seq_cst_p.
4296         (build_omp_regions_1, omp_make_gimple_edges): Treat taskwait with
4297         depend clauses as a standalone directive.
4298         * omp-general.c (enum omp_requires): New variable.
4299         (omp_extract_for_data): Initialize have_reductemp member.  Allow
4300         NE_EXPR even in OpenMP loops, transform them into LT_EXPR or
4301         GT_EXPR loops depending on incr sign.  Formatting fixes.
4302         * omp-general.h (struct omp_for_data): Add have_reductemp member.
4303         (enum omp_requires): New enum.
4304         (omp_requires_mask): Declare.
4305         * omp-grid.c (grid_eliminate_combined_simd_part): Formatting fix.
4306         Fix comment typos.
4307         * omp-low.c (struct omp_context): Add task_reductions and
4308         task_reduction_map fields.
4309         (is_host_teams_ctx): New function.
4310         (is_taskreg_ctx): Return true also if is_host_teams_ctx.
4311         (use_pointer_for_field): Use is_global_var instead of
4312         TREE_STATIC || DECL_EXTERNAL, and apply only if not privatized
4313         in outer contexts.
4314         (build_outer_var_ref): Ignore taskgroup outer contexts.
4315         (delete_omp_context): Release task_reductions and task_reduction_map.
4316         (scan_sharing_clauses): Don't add any fields for reduction clause on
4317         taskloop.  Handle OMP_CLAUSE__REDUCTEMP_.  Handle
4318         OMP_CLAUSE_{IN,TASK}_REDUCTION and OMP_CLAUSE_REDUCTION with task
4319         modifier.  Don't ignore shared clauses in is_host_teams_ctx contexts.
4320         Handle OMP_CLAUSE_NONTEMPORAL.
4321         (add_taskreg_looptemp_clauses): Add OMP_CLAUSE__REDUCTEMP_ clause if
4322         needed.
4323         (scan_omp_parallel): Add _reductemp_ clause if there are any reduction
4324         clauses with task modifier.
4325         (scan_omp_task): Handle taskwait with depend clauses.
4326         (finish_taskreg_scan): Move field corresponding to _reductemp_ clause
4327         first.  Move also OMP_CLAUSE__REDUCTEMP_ clause in front if present.
4328         Handle GIMPLE_OMP_TEAMS like GIMPLE_OMP_PARALLEL.
4329         (scan_omp_for): Fix comment formatting.
4330         (scan_omp_teams): Handle host teams constructs.
4331         (check_omp_nesting_restrictions): Allow teams with no outer
4332         OpenMP context.  Adjust diagnostics for teams strictly nested into
4333         some explicit OpenMP construct other than target.  Allow OpenMP atomics
4334         inside of simd regions.
4335         (scan_omp_1_stmt): Call scan_sharing_clauses for taskgroups.
4336         (scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
4337         taskreg_nesting_level while scanning host teams construct.
4338         (task_reduction_read): New function.
4339         (lower_rec_input_clauses): Handle OMP_CLAUSE_REDUCTION on taskloop
4340         construct.  Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE__REDUCTEMP_
4341         clauses.  Handle OMP_CLAUSE_REDUCTION with task modifier.  Remove
4342         second argument create_tmp_var if it is NULL.  Don't ignore shared
4343         clauses in is_host_teams_ctx contexts.  Handle
4344         OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
4345         clauses.
4346         (lower_reduction_clauses): Ignore reduction clauses with task
4347         modifier.  Remove second argument create_tmp_var if it is NULL.
4348         Initialize OMP_ATOMIC_MEMORY_ORDER to relaxed.
4349         (lower_send_clauses): Ignore reduction clauses with task modifier.
4350         Handle OMP_CLAUSE__REDUCTEMP_.  Don't send anything for
4351         OMP_CLAUSE_REDUCTION on taskloop.  Handle OMP_CLAUSE_IN_REDUCTION.
4352         (maybe_add_implicit_barrier_cancel): Add OMP_RETURN argument, don't
4353         rely that it is the last stmt in body so far.  Ignore outer taskgroup
4354         contexts.
4355         (omp_task_reductions_find_first, omp_task_reduction_iterate,
4356         lower_omp_task_reductions): New functions.
4357         (lower_omp_sections): Handle reduction clauses with taskgroup
4358         modifiers.  Adjust maybe_add_implicit_barrier_cancel caller.
4359         (lower_omp_single): Adjust maybe_add_implicit_barrier_cancel caller.
4360         (lower_omp_for): Likewise.  Handle reduction clauses with taskgroup
4361         modifiers.
4362         (lower_omp_taskgroup): Handle taskgroup reductions.
4363         (create_task_copyfn): Copy over OMP_CLAUSE__REDUCTEMP_ pointer.
4364         Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE_REDUCTION clauses.
4365         (lower_depend_clauses): If there are any
4366         OMP_CLAUSE_DEPEND_DEPOBJ or OMP_CLAUSE_DEPEND_MUTEXINOUTSET
4367         depend clauses, use a new array format.  If OMP_CLAUSE_DEPEND_LAST is
4368         seen, assume lowering is done already and return early.  Set kind
4369         on artificial depend clause to OMP_CLAUSE_DEPEND_LAST.
4370         (lower_omp_taskreg): Handle reduction clauses with task modifier on
4371         parallel construct.  Handle reduction clause on taskloop construct.
4372         Handle taskwait with depend clauses.
4373         (lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
4374         for host teams constructs.
4375         * tree.c (omp_clause_num_ops): Add in_reduction, task_reduction,
4376         nontemporal and _reductemp_ clause entries.
4377         (omp_clause_code_name): Likewise.
4378         (walk_tree_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION,
4379         OMP_CLAUSE_NONTEMPORAL and OMP_CLAUSE__REDUCTEMP_.
4380         * tree-core.h (enum omp_clause_code): Add
4381         OMP_CLAUSE_{{IN,TASK}_REDUCTION,NONTEMPORAL,_REDUCTEMP_}.
4382         (enum omp_clause_defaultmap_kind, enum omp_memory_order): New.
4383         (struct tree_base): Add omp_atomic_memory_order field into union.
4384         Remove OMP_ATOMIC_SEQ_CST comment.
4385         (enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_MUTEXINOUTSET
4386         and OMP_CLAUSE_DEPEND_DEPOBJ.
4387         (struct tree_omp_clause): Add subcode.defaultmap_kind.
4388         * tree.def (OMP_TASKGROUP): Add another operand, move next to other
4389         OpenMP constructs with body and clauses operands.
4390         * tree.h (OMP_BODY): Use OMP_MASTER instead of OMP_TASKGROUP.
4391         (OMP_CLAUSES): Use OMP_TASKGROUP instead of OMP_SINGLE.
4392         (OMP_TASKGROUP_CLAUSES): Define.
4393         (OMP_CLAUSE_DECL): Use OMP_CLAUSE__REDUCTEMP_ instead of
4394         OMP_CLAUSE__LOOPTEMP_.
4395         (OMP_ATOMIC_SEQ_CST): Remove.
4396         (OMP_ATOMIC_MEMORY_ORDER, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE,
4397         OMP_CLAUSE_LASTPRIVATE_CONDITIONAL): Define.
4398         (OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INIT,
4399         OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER,
4400         OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
4401         OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Handle
4402         OMP_CLAUSE_{,IN_,TASK_}REDUCTION.
4403         (OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_REDUCTION_INSCAN,
4404         OMP_CLAUSE_DEFAULTMAP_KIND, OMP_CLAUSE_DEFAULTMAP_CATEGORY,
4405         OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_SET_KIND):
4406         Define.
4407         * tree-inline.c (remap_gimple_stmt): Remap taskgroup clauses.
4408         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
4409         OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE_NONTEMPORAL.
4410         (convert_local_omp_clauses): Likewise.  Remove useless test.
4411         * tree-parloops.c (create_call_for_reduction_1): Pass
4412         OMP_MEMORY_ORDER_RELAXED as new argument to
4413         dump_gimple_omp_atomic_load and dump_gimple_omp_atomic_store.
4414         * tree-pretty-print.c (dump_omp_iterators): New function.
4415         (dump_omp_clause): Handle OMP_CLAUSE__REDUCTEMP_,
4416         OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_{TASK,IN}_REDUCTION.  Print
4417         reduction modifiers.  Handle OMP_CLAUSE_DEPEND_DEPOBJ and
4418         OMP_CLAUSE_DEPEND_MUTEXINOUTSET.  Print iterators in depend clauses.
4419         Print __internal__ for OMP_CLAUSE_DEPEND_LAST.  Handle cancel and
4420         simd OMP_CLAUSE_IF_MODIFIERs.  Handle new kinds of
4421         OMP_CLAUSE_DEFAULTMAP. Print conditional: for
4422         OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
4423         (dump_omp_atomic_memory_order): New function.
4424         (dump_generic_node): Use it.  Print taskgroup clauses.  Print
4425         taskwait with depend clauses.
4426         * tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
4427         * tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
4428         Handle OMP_CLAUSE_{TASK,IN}_REDUCTION.
4429         * tree-streamer-out.c (pack_ts_omp_clause_value_fields,
4430         write_ts_omp_clause_tree_pointers): Likewise.
4432 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
4434         PR ipa/86395
4435         * doc/invoke.texi (-fdump-ipa-): Document the "-optimized",
4436         "-missed", "-note", and "-all" sub-options.
4437         * ipa-inline.c (caller_growth_limits): Port from fprintf to dump
4438         API.
4439         (can_early_inline_edge_p): Likewise.
4440         (want_early_inline_function_p): Likewise.
4441         (want_inline_self_recursive_call_p): Likewise.
4442         (recursive_inlining): Likewise.
4443         (inline_small_functions): Likewise.
4444         (flatten_function): Likewise.
4445         (ipa_inline): Likewise.
4446         (inline_always_inline_functions): Likewise.
4447         (early_inline_small_functions): Likewise.
4448         (early_inliner): Likewise.
4449         * tree-inline.c (expand_call_inline): Likewise.
4451 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
4453         * pretty-print.c (pp_format): Handle %f.
4454         (selftest::test_pp_format): Add test of %f.
4455         * pretty-print.h (pp_double): New macro.
4457 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
4459         * dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro.
4460         * dumpfile.c (make_item_for_dump_cgraph_node): Move to before...
4461         (dump_pretty_printer::decode_format): Implement "%C" for
4462         cgraph_node *.
4463         (selftest::test_capture_of_dump_calls): Rename "where" to
4464         "stmt_loc".  Convert test_decl to a function decl and set its
4465         location.  Add a symbol_table_test RAII instance and a
4466         cgraph_node, using it to test "%C" and dump_symtab_node.
4468 2018-11-08  Eric Botcazou  <ebotcazou@adacore.com>
4470         PR middle-end/87916
4471         * cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P.
4473 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
4475         * cgraph.c: Include "selftest.h".
4476         (saved_symtab): New variable.
4477         (selftest::symbol_table_test::symbol_table_test): New ctor.
4478         (selftest::symbol_table_test::~symbol_table_test): New dtor.
4479         (selftest::test_symbol_table_test): New test.
4480         (selftest::cgraph_c_tests): New.
4481         * cgraph.h (saved_symtab): New decl.
4482         (selftest::symbol_table_test): New class.
4483         * selftest-run-tests.c (selftest::run_tests): Call
4484         selftest::cgraph_c_tests.
4485         * selftest.h (selftest::cgraph_c_tests): New decl.
4487 2018-11-08  Richard Biener  <rguenther@suse.de>
4489         * tree-data-ref.h (lambda_int): New typedef.
4490         (lambda_vector_gcd): Adjust.
4491         (lambda_vector_new): Likewise.
4492         (lambda_matrix_new): Likewise.
4493         * tree-data-ref.c  (print_lambda_vector): Adjust.
4495 2018-11-08  Richard Biener  <rguenther@suse.de>
4497         PR tree-optimization/87929
4498         * tree-complex.c (expand_complex_comparison): Clean EH.
4500 2018-11-08  Martin Liska  <mliska@suse.cz>
4502         * doc/extend.texi: Reword.
4503         * predict.c (expr_expected_value_1): Likewise.
4505 2018-11-08  Richard Biener  <rguenther@suse.de>
4507         PR tree-optimization/87913
4508         * tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares
4509         of extreme values to ordered comparisons.
4511 2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
4513         PR middle-end/42726
4514         * doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior.
4516 2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
4518         * doc/invoke.texi: Remove leading dash from @opindex entries
4519         throughout the file.
4521 2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
4523         PR driver/80828
4524         * doc/invoke.texi (Option Summary): Add -e and --entry.
4525         (Link Options): Likewise.
4527 2018-11-07  Nathan Sidwell  <nathan@acm.org>
4529         PR 87926
4530         * Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak
4531         --disable-checking bootstrap.
4533 2018-11-07  Hafiz Abid Qadeer  <abidh@codesourcery.com>
4535         * configure: Regenerated.
4537 2018-11-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
4539         PR c/87691
4540         * stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE
4541         to the mode of the widest field iff the widest field has mode class
4542         MODE_INT, or MODE_PARTIAL_INT and the union would be passed by
4543         reference.
4545 2018-11-07  Nikolai Merinov  <n.merinov@inango-systems.com>
4547         * common.opt: Add -Wattribute-warning.
4548         * doc/invoke.texi: Add documentation for -Wno-attribute-warning.
4549         * expr.c (expand_expr_real_1): Add new attribute to warning_at
4550         call to allow user configure behavior of "warning" attribute.
4552 2018-11-07  Segher Boessenkool  <segher@kernel.crashing.org>
4554         * target.def: Put @: after every vs., e.g., and i.e. where it is
4555         followed by whitespace.
4556         * doc/extend.texi: Ditto.
4557         * doc/fragments.texi: Ditto.
4558         * doc/gimple.texi: Ditto.
4559         * doc/implement-c.texi: Ditto.
4560         * doc/install.texi: Ditto.
4561         * doc/invoke.texi: Ditto.
4562         * doc/md.texi: Ditto.
4563         * doc/plugins.texi: Ditto.
4564         * doc/rtl.texi: Ditto.
4565         * doc/sourcebuild.texi: Ditto.
4566         * doc/tm.texi.in: Ditto.
4567         * doc/ux.texi: Ditto.
4568         * doc/tm.texi: Regenerate.
4570 2018-11-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4572         * config/arm/arm-cpus.in (ares): New entry.
4573         * config/arm/arm-tables.opt: Regenerate.
4574         * config/arm/arm-tune.md: Likewise.
4575         * doc/invoke.texi (ARM Options): Document ares.
4577 2018-11-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4579         * config/aarch64/aarch64-cores.def (ares): Define.
4580         * config/aarch64/aarch64-tune.md: Regenerate.
4581         * doc/invoke.texi (AArch64 Options): Document ares value for mtune.
4583 2018-11-07  Jan Hubicka  <jh@suse.cz>
4585         * tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE.
4586         (free_lang_data_in_decl): Set TREE_ADDRESSABLE for public vars and
4587         functions; clear TYPE_DECL_SUPPRESS_DEBUG and DECL_MODE for
4588         TYPE_DECL.
4590 2018-11-07  Richard Biener  <rguenther@suse.de>
4592         PR tree-optimization/87914
4593         * tree-vect-loop.c (vect_is_simple_reduction): Improve detection
4594         of nested cycles.
4595         (vectorizable_reduction): Handle shifts and rotates by dispatching
4596         to vectorizable_shift.
4597         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Handle
4598         in-loop uses of vect_nested_cycle defs.  Merge cycle and internal
4599         def cases.
4600         (vectorizable_shift): Export and handle being called as
4601         vect_nested_cycle.
4602         (vect_analyze_stmt): Call vectorizable_shift after
4603         vectorizable_reduction.
4604         * tree-vectorizer.h (vectorizable_shift): Declare.
4606 2018-11-07  Jan Hubicka  <jh@suse.cz>
4608         * ipa-devirt.c (odr_types_equivalent_p): Expect constants
4609         than const decls in TREE_VALUE of enum.
4610         (dump_type_inheritance_graph): Improve duplicate dumping.
4611         (free_enum_values): New.
4612         (build_type_inheritance_graph): Use it.
4613         * tree.c (free_lang_data_in_type): Free TYPE_VALUES of enums
4614         which are not main variants or not ODR types.
4615         (verify_type_variant): Expect variants to have no TYPE_VALUES.
4617 2018-11-07  Richard Biener  <rguenther@suse.de>
4619         * ipa-inline.c (want_inline_small_function_p): Compute
4620         big_speedup_p lazily and last.
4622 2018-11-07  Jan Hubicka  <jh@suse.cz>
4624         * tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
4625         building incomplete variant of complete type.
4626         (fld_type_variant): Do not copy TYPE_ALIGN when building incomplete
4627         variant of complete type.
4629 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
4631         * config/mips/mips.c: Fix typo in documentation of
4632         mips_loongson_ext2_prefetch_cookie.
4633         (mips_option_override): fix brain twister logical.
4634         * config/mips/mips.h: Fix typo in documentation of
4635         ISA_HAS_CTZ_CTO and define pattern.
4636         * config/mips/mips.md (prefetch): Hoist EXT2 above
4637         the 2EF/EXT block.
4638         (prefetch_indexed): Hoist EXT2 above the EXT block.
4640 2018-11-07  Jan Hubicka  <jh@suse.cz>
4642         * tree.c (free_lang_data_in_type): Add fld parameter; simplify
4643         return and parameter types of function and method types.
4644         (free_lang_data_in_cgraph): Update.
4646 2018-11-07  Martin Liska  <mliska@suse.cz>
4648         PR rtl-optimization/87868
4649         * postreload-gcse.c (eliminate_partially_redundant_load): Set
4650         threshold to max_count if we would overflow.
4651         * profile-count.h: Make max_count a public constant.
4653 2018-11-07  Martin Liska  <mliska@suse.cz>
4655         * mem-stats.h: Fix GNU coding style.
4657 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
4659         * config/mips/gs264e.md: New.
4660         * config/mips/mips-cpus.def: Define gs264e.
4661         * config/mips/mips-tables.opt: Regenerate.
4662         * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
4663         gs264e.
4664         (mips_issue_rate): Add support for gs264e.
4665         (mips_multipass_dfa_lookahead): Likewise.
4666         * config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
4667         (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
4668         (MIPS_ASE_MSA_SPEC): New.
4669         (BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
4670         (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
4671         (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
4672         * config/mips/mips.md: Include gs264e.md.
4673         (processor): Add gs264e.
4674         * config/mips/mips.opt (MSA): Use Mask instead of Var.
4675         * doc/invoke.texi: Add gs264e to supported architectures.
4677 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
4679         * config/mips/gs464e.md: New.
4680         * config/mips/mips-cpus.def: Define gs464e.
4681         * config/mips/mips-tables.opt: Regenerate.
4682         * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
4683         gs464e.
4684         (mips_issue_rate): Add support for gs464e.
4685         (mips_multipass_dfa_lookahead): Likewise.
4686         (mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
4687         * config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
4688         (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
4689         (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
4690         (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
4691         * config/mips/mips.md: Include gs464e.md.
4692         (processor): Add gs464e.
4693         * doc/invoke.texi: Add gs464e to supported architectures.
4695 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
4697         * config/mips/loongson3a.md: Rename to ...
4698         * config/mips/gs464.md: ... here.
4699         * config/mips/mips-cpus.def: Define gs464; Add loongson3a
4700         as an alias of gs464 processor.
4701         * config/mips/mips-tables.opt: Regenerate.
4702         * config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
4703         instead of PROCESSOR_LOONGSON_3A.
4704         (mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
4705         TUNE_LOONGSON_3A.
4706         (mips_option_override): Enable MMI and EXT for gs464.
4707         * config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
4708         Rename TUNE_LOONGSON_3A to TUNE_GS464.
4709         (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
4710         (ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
4711         ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
4712         TARGET_LOONGSON_3A.
4713         * config/mips/mips.md: Include gs464.md instead of loongson3a.md.
4714         (processor): Add gs464;
4715         * doc/invoke.texi: Add gs464 to supported architectures.
4717 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
4719         * config/mips/mips-protos.h
4720         (mips_loongson_ext2_prefetch_cookie): New prototype.
4721         * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
4722         (mips_option_override): Enable TARGET_LOONGSON_EXT when
4723         TARGET_LOONGSON_EXT2 is true.
4724         * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
4725         __mips_loongson_ext2, __mips_loongson_ext_rev=2.
4726         (ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
4727         (ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
4728         TARGET_LOONGSON_EXT2.
4729         (ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
4730         (define_insn "ctz<mode>2"): New insn pattern.
4731         (define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
4732         (define_insn "prefetch_indexed_<mode>"): Include
4733         TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
4734         * config/mips/mips.opt (-mloongson-ext2): Add option.
4735         * gcc/doc/invoke.texi (-mloongson-ext2): Document.
4737 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
4739         * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
4740         __mips_loongson_ext.
4741         (MIPS_ASE_LOONGSON_EXT_SPEC): New.
4742         (BASE_DRIVER_SELF_SPECS): march=loongson3a implies
4743         -mloongson-ext.
4744         (ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
4745         * config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
4746         <u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
4747         instead of TARGET_LOONGSON_3A.
4748         * config/mips/mips.opt (-mloongson-ext): Add option.
4749         * gcc/doc/invoke.texi (-mloongson-ext): Document.
4751 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
4753         * config.gcc (extra_headers): Add loongson-mmiintrin.h.
4754         * config/mips/loongson.md: Move to ...
4755         * config/mips/loongson-mmi.md: here; Adjustment.
4756         * config/mips/loongson.h: Move to ...
4757         State as deprecated. Include loongson-mmiintrin.h for back
4758         compatibility and warning.
4759         * config/mips/loongson-mmiintrin.h: ... here.
4760         * config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
4761         mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
4762         TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
4763         (mips_option_override): Make sure MMI use hard float;
4764         (mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
4765         mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
4766         mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
4767         TARGET_LOONGSON_VECTORS.
4768         * gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
4769         (TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
4770         (MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
4771         (BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
4772         -mloongson-mmi.
4773         (SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
4774         TARGET_LOONGSON_VECTORS.
4775         * gcc/config/mips/mips.md (MOVE64, MOVE128): Use
4776         TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
4777         (Loongson MMI patterns): Include loongson-mmi.md instead of
4778         loongson.md.
4779         * gcc/config/mips/mips.opt (-mloongson-mmi): New option.
4780         * gcc/doc/invoke.texi (-mloongson-mmi): Document.
4782 2018-11-07  Richard Biener  <rguenther@suse.de>
4784         PR lto/87906
4785         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
4786         BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
4788 2018-11-07  Alexandre Oliva <aoliva@redhat.com>
4790         PR rtl-optimization/87874
4791         * lra.c (lra_substitute_pseudo): Do not create a subreg for
4792         const wide ints.
4794 2018-11-06  Aaron Sawdey  <acsawdey@linux.ibm.com>
4796         * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
4797         if not in indexed or indirect form.
4798         (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
4799         (bswap<mode>2_store): Ditto.
4801 2018-11-06  Richard Earnshaw  <rearnsha@arm.com>
4803         * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
4804         the UNSPEC.
4806 2018-11-06  Richard Biener  <rguenther@suse.de>
4808         PR tree-optimization/86850
4809         * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
4810         instead of src.m_vec.
4812 2018-11-06  Jan Hubicka  <jh@suse.cz>
4814         * tree.c (fld_simplified_type_name): Break out form ...
4815         (free_lang_data_in_type): ... here.
4816         (fld_type_variant_equal_p): Use it.
4818 2018-11-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4820         * config/default-d.c: Include memmodel.h.
4822         * config/sol2-d.c: New file.
4823         * config/t-sol2 (sol2-d.o): New rule.
4824         * config.gcc <*-*-solaris2*>: Set d_target_objs,
4825         target_has_targetdm.
4827 2018-11-06  Jan Hubicka  <jh@suse.cz>
4829         * tree.c (fld_type_variant): Also copy alignment; be sure that
4830         new variant is equal.
4832 2018-11-06  Ilya Leoshkevich  <iii@linux.ibm.com>
4834         PR target/87762
4835         * config/s390/s390.md: Add relative_long attribute.
4837 2018-11-06  Jan Hubicka  <jh@suse.cz>
4839         * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
4840         * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
4841         * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
4842         stream TYPE_NEEDS_CONSTRUCTING.
4843         * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
4844         * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
4846 2018-11-06  Richard Biener  <rguenther@suse.de>
4848         * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
4849         dump-scope ...
4850         (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
4852 2018-11-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
4854         * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
4855         REG_CLASS_CONTENTS[GEN_REGS].
4856         (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
4858 2018-11-06  Jan Hubicka  <jh@suse.cz>
4860          * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
4862 2018-11-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4864         PR sanitizer/80953
4865         * config/sol2.h (ASAN_CC1_SPEC): Define.
4866         (LD_WHOLE_ARCHIVE_OPTION): Define.
4867         (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
4868         (ASAN_REJECT_SPEC): Provide default.
4869         (LIBASAN_EARLY_SPEC): Define.
4870         (LIBTSAN_EARLY_SPEC): Define.
4871         (LIBLSAN_EARLY_SPEC): Define.
4872         * config/i386/sol2.h (CC1_SPEC): Redefine.
4873         (ASAN_REJECT_SPEC): Define.
4875         * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
4876         (TARGET_ASAN_SHADOW_OFFSET): Define.
4877         (sparc_asan_shadow_offset): New function.
4878         * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
4879         (ASAN_REJECT_SPEC): Define.
4881 2018-11-06  Jan Hubicka  <jh@suse.cz>
4883         * tree.c (fld_type_variant): Copy canonical type.
4884         (fld_incomplete_type_of): Check that canonical types looks sane;
4885         copy canonical type.
4886         (verify_type): Accept when incomplete type has complete canonical type.
4888 2018-11-06  Jan Hubicka  <jh@suse.cz>
4890         * tree.c (free_lang_data): Reset overwite_assembler_name,
4891         print_xnode, print_decl, print_type and print_identifier of
4892         langhooks.
4894 2018-11-06  Richard Biener  <rguenther@suse.de>
4896         PR tree-optimization/87889
4897         * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
4898         Do nothing if old and new arg are the same
4900 2018-11-06  Andreas Krebbel  <krebbel@linux.ibm.com>
4902         PR target/87723
4903         * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
4904         attributes for operands 3 and 4.
4906 2018-11-06  Richard Biener  <rguenther@suse.de>
4908         PR middle-end/18041
4909         * simplify-rtx.c (simplify_binary_operation_1): Add pattern
4910         matching bitfield insertion.
4912 2018-11-06  Alexandre Oliva <aoliva@redhat.com>
4914         * auto-inc-dec.c: Include valtrack.h.  Improve comments.
4915         (reg_next_debug_use): New.
4916         (attempt_change): Propagate adjusted expression into affected
4917         debug insns.
4918         (merge_in_block): Track uses in debug insns.
4919         (pass_inc_dec::execute): Allocate and release
4920         reg_next_debug_use.
4922 2018-11-06  Wei Xiao  <wei3.xiao@intel.com>
4924         * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
4925         (_mm512_fixupimm_round_pd): Update parameters and builtin.
4926         (_mm512_maskz_fixupimm_round_pd): Ditto.
4927         (_mm512_fixupimm_round_ps): Ditto.
4928         (_mm512_maskz_fixupimm_round_ps): Ditto.
4929         (_mm_fixupimm_round_sd): Ditto.
4930         (_mm_maskz_fixupimm_round_sd): Ditto.
4931         (_mm_fixupimm_round_ss): Ditto.
4932         (_mm_maskz_fixupimm_round_ss): Ditto.
4933         (_mm512_fixupimm_pd): Ditto.
4934         (_mm512_maskz_fixupimm_pd): Ditto.
4935         (_mm512_fixupimm_ps): Ditto.
4936         (_mm512_maskz_fixupimm_ps): Ditto.
4937         (_mm_fixupimm_sd): Ditto.
4938         (_mm_maskz_fixupimm_sd): Ditto.
4939         (_mm_fixupimm_ss): Ditto.
4940         (_mm_maskz_fixupimm_ss): Ditto.
4941         (_mm512_mask_fixupimm_round_pd): Update builtin.
4942         (_mm512_mask_fixupimm_round_ps): Ditto.
4943         (_mm_mask_fixupimm_round_sd): Ditto.
4944         (_mm_mask_fixupimm_round_ss): Ditto.
4945         (_mm512_mask_fixupimm_pd): Ditto.
4946         (_mm512_mask_fixupimm_ps): Ditto.
4947         (_mm_mask_fixupimm_sd): Ditto.
4948         (_mm_mask_fixupimm_ss): Ditto.
4949         * config/i386/avx512vlintrin.h:
4950         (_mm256_fixupimm_pd): Update parameters and builtin.
4951         (_mm256_maskz_fixupimm_pd): Ditto.
4952         (_mm256_fixupimm_ps): Ditto.
4953         (_mm256_maskz_fixupimm_ps): Ditto.
4954         (_mm_fixupimm_pd): Ditto.
4955         (_mm_maskz_fixupimm_pd): Ditto.
4956         (_mm_fixupimm_ps): Ditto.
4957         (_mm_maskz_fixupimm_ps): Ditto.
4958         (_mm256_mask_fixupimm_pd): Update builtin.
4959         (_mm256_mask_fixupimm_ps): Ditto.
4960         (_mm_mask_fixupimm_pd): Ditto.
4961         (_mm_mask_fixupimm_ps): Ditto.
4962         * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
4963         * config/i386/i386-builtin.def: Update builtin definitions.
4964         * config/i386/i386.c: Handle new builtin types and remove useless ones.
4965         * config/i386/sse.md: Update VFIXUPIMM* patterns.
4966         (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
4967         (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
4968         (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
4969         (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
4970         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
4971         (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
4972         * config/i386/subst.md:
4973         (round_saeonly_sd_mask_operand4): Add new subst_attr.
4974         (round_saeonly_sd_mask_op4): Ditto.
4975         (round_saeonly_expand_operand5): Ditto.
4976         (round_saeonly_expand): Update.
4978 2018-11-05  Max Filippov  <jcmvbkbc@gmail.com>
4980         * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
4982 2018-11-05  Segher Boessenkool  <segher@kernel.crashing.org>
4984         PR rtl-optimization/87871
4985         * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
4987 2018-11-05  Paul Koning  <ni1d@arrl.net>
4989         * doc/sourcebuild.texi (target attributes): Document new "inf"
4990         effective target keyword.
4992 2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
4994         * config/s390/s390.c (s390_register_move_cost): Increase costs for
4995         moves involving the CC reg.
4997 2018-11-05  Richard Biener  <rguenther@suse.de>
4999         PR tree-optimization/87873
5000         * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
5001         argument.
5002         * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
5003         * tree-vect-loop.c (vect_transform_loop): When splitting the
5004         loop exit also create forwarder PHIs for constants.
5005         * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
5006         Handle constant to_arg, add extra checking we match up the correct
5007         PHIs.
5009 2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
5011         * config/s390/s390.md: QImode and HImode for load on condition.
5013 2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
5015         * config/s390/predicates.md: Fix typo.
5016         * config/s390/s390.md: Allow immediates for load on condition.
5018 2018-11-05  Martin Liska  <mliska@suse.cz>
5020         * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
5021         * bitmap.h (struct bitmap_usage): Likewise.
5022         * ggc-common.c (SCALE): Remove.
5023         (LABEL): Likewise.
5024         (struct ggc_usage): Use SIZE_AMOUNT. And update
5025         compare method.
5026         * ggc-page.c (SCALE): Remove.
5027         (STAT_LABEL): Remove.
5028         (ggc_print_statistics): Use SIZE_AMOUNT.
5029         * gimple.h (SCALE): Remove.
5030         (LABEL): Likewise.
5031         * input.c (ONE_K): Remove.
5032         (ONE_M): Likewise.
5033         (SCALE): Likewise.
5034         (STAT_LABEL): Likewise.
5035         (FORMAT_AMOUNT): Likewise.
5036         (dump_line_table_statistics): Use SIZE_AMOUNT.
5037         * mem-stats.h (struct mem_usage): Likewise.
5038         * rtl.c (dump_rtx_statistics): Likewise.
5039         (rtx_alloc_counts): Change type to size_t.
5040         (rtx_alloc_sizes): Likewise.
5041         (rtx_count_cmp): New.
5042         (dump_rtx_statistics): Sort first based on counts.
5043         * tree.c (tree_nodes_cmp): New.
5044         (tree_codes_cmp): New.
5045         (dump_tree_statistics): Sort first based on counts.
5046         * system.h (ONE_K): New.
5047         (ONE_M): Likewise.
5048         (SIZE_SCALE): Likewise.
5049         (SIZE_LABEL): Likewise.
5050         (SIZE_AMOUNT): Likewise.
5051         * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
5052         * tree-dfa.c (dump_dfa_stats): Likewise.
5053         * tree-phinodes.c (phinodes_print_statistics): Likewise.
5054         * tree-ssanames.c (ssanames_print_statistics): Likewise.
5055         * tree.c (dump_tree_statistics): Likewise.
5056         * vec.c (struct vec_usage): Likewise.
5057         * trans-mem.c (tm_mangle): Enlarge buffer in order to not
5058         trigger a -Werror=format-overflow with
5059         --enable-gather-detailed-stats.
5061 2018-11-05  Martin Liska  <mliska@suse.cz>
5063         * mem-stats.h (mem_alloc_description::release_instance_overhead):
5064         Return T *.
5065         * vec.c (struct vec_usage): Register m_element_size.
5066         (vec_prefix::register_overhead): New arguments: elements and
5067         element_size.
5068         (vec_prefix::release_overhead): Subtract elements.
5069         * vec.h (struct vec_prefix): Change signature.
5070         (va_heap::reserve): Pass proper arguments.
5071         (va_heap::release): Likewise.
5073 2018-11-05  Martin Liska  <mliska@suse.cz>
5075         * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
5076         style.
5077         * vec.c: Likewise.
5079 2018-11-05  Richard Biener  <rguenther@suse.de>
5081         * tree-scalar-evolution.h (final_value_replacement_loop): Update
5082         prototype.
5083         * tree-scalar-evolution.c (final_value_replacement_loop): Return
5084         whether anything was done.
5085         (scev_const_prop): Remove constant propagation part, fold
5086         remains into ...
5087         * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
5088         (pass_data_scev_cprop): TODO_cleanup_cfg is now done
5089         conditionally.
5091 2018-11-05  Jakub Jelinek  <jakub@redhat.com>
5093         PR tree-optimization/87859
5094         * gimple-ssa-store-merging.c (struct merged_store_group): Add
5095         only_constants and first_nonmergeable_order members.
5096         (merged_store_group::merged_store_group): Initialize them.
5097         (merged_store_group::do_merge): Clear only_constants member if
5098         adding something other than INTEGER_CST store.
5099         (imm_store_chain_info::coalesce_immediate_stores): Don't merge
5100         stores with order >= first_nonmergeable_order.  Use
5101         merged_store->only_constants instead of always recomputing it.
5102         Set merged_store->first_nonmergeable_order if we've skipped any
5103         stores.  Attempt to merge overlapping INTEGER_CST stores that
5104         we would otherwise skip.
5106         PR sanitizer/87837
5107         * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
5109 2018-11-05  Xuepeng Guo  <xuepeng.guo@intel.com>
5111         PR target/87853
5112         * config/i386/emmintrin.h (__v16qs): New to cope with option
5113         -funsigned-char.
5114         (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
5115         (_mm_cmplt_epi8): Likewise.
5116         (_mm_cmpgt_epi8): Likewise.
5118 2018-11-05  Richard Biener  <rguenther@suse.de>
5120         PR rtl-optimization/87852
5121         * fwprop.c (use_killed_between): Only consider single-defs of the
5122         use whose definition statement dominates the use.
5124 2018-11-05  Martin Liska  <mliska@suse.cz>
5126         PR web/87829
5127         * doc/invoke.texi: Remove options that are
5128         not disabled with -Os.
5130 2018-11-05  Martin Liska  <mliska@suse.cz>
5132         PR c/87811
5133         * doc/extend.texi: Update constrain about the last argument
5134         of __builtin_expect_with_probability.
5136 2018-11-05  Martin Liska  <mliska@suse.cz>
5138         PR c/87811
5139         * predict.c (expr_expected_value_1): Verify
5140         that last argument is a real constants and emit
5141         error.
5143 2018-11-05  Martin Liska  <mliska@suse.cz>
5145         PR gcov-profile/77698
5146         * ipa-profile.c (ipa_profile): Adjust hotness threshold
5147         only in LTO mode.
5149 2018-11-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5151         PR tree-optimization/86572
5152         * builtins.c (c_strlen): Handle negative offsets in a safe way.
5154 2018-11-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5156         PR tree-optimization/87672
5157         * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
5158         * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
5160 2018-11-04  Uros Bizjak  <ubizjak@gmail.com>
5162         PR middle-end/58372
5163         * cfgexpand.c (pass_expand::execute): Move the call to
5164         finish_eh_generation in front of the call to expand_stack_alignment.
5166 2018-11-04  Venkataramanan Kumar <venkataramanan.kumar@amd.com>
5168         * common/config/i386/i386-common.c (processor_alias_table): Add
5169         znver2 entry.
5170         * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
5171         (case ${target}): Add znver2.
5172         * config/i386/driver-i386.c: (host_detect_local_cpu): Let
5173         -march=native recognize znver2 processors.
5174         * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
5175         * config/i386/i386.c (m_znver2): New definition.
5176         (m_ZNVER): New definition.
5177         (m_AMD_MULTIPLE): Includes m_znver2.
5178         (processor_cost_table): Add znver2 entry.
5179         (processor_target_table): Add znver2 entry.
5180         (get_builtin_code_for_version): Set priority for
5181         PROCESSOR_ZNVER2.
5182         (processor_model): Add M_AMDFAM17H_ZNVER2.
5183         (arch_names_table): Ditto.
5184         (ix86_reassociation_width): Include znver2.
5185         * config/i386/i386.h (TARGET_znver2): New definition.
5186         (struct ix86_size_cost): Add TARGET_ZNVER2.
5187         (enum processor_type): Add PROCESSOR_ZNVER2.
5188         * config/i386/i386.md (define_attr "cpu"): Add znver2.
5189         * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
5190         * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
5191         (ix86_adjust_cost): Add znver2.
5192         * config/i386/x86-tune.def:  Replace m_ZNVER1 by m_ZNVER.
5193         * gcc/doc/extend.texi: Add details about znver2.
5194         * gcc/doc/invoke.texi: Add details about znver2.
5196 2018-11-03  Sandra Loosemore  <sandra@codesourcery.com>
5198         PR target/87079
5200         * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
5201         pattern.
5203 2018-11-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
5205         * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
5206         attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
5208 2018-11-02  Richard Earnshaw  <rearnsha@arm.com>
5210         * config/aarch64/aarch64.c ((aarch64_override_options): Disable
5211         shrink-wrapping when -mtrack-speculation.
5213 2018-11-02  Richard Biener  <rguenther@suse.de>
5215         * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
5216         (pop_cost_one_pair): Do not free pair.
5217         (pop_best_coalesce): Likewise.
5218         (create_coalesce_list): Initialize obstack.
5219         (delete_coalesce_list): Free obstack.
5220         (find_coalesce_pair): Obstack-allocate coalesce pairs.
5221         (add_cost_one_coalesce): Likewise.
5222         (struct live_track): Remove bitmap pointer indirections.
5223         (new_live_track): Adjust.
5224         (delete_live_track): Likewise.
5225         (live_track_remove_partition): Likewise.
5226         (live_track_add_partition): Likewise.
5227         (live_track_live_p): Likewise.
5228         (live_track_process_def): Likewise.
5229         (live_track_clear_base_vars): Likewise.
5231 2018-11-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5233         * configure.ac (gcc_cv_as_sparc_register_op): Remove.
5234         * configure: Regenerate.
5235         * config.in: Regenerate.
5236         * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
5237         HAVE_AS_REGISTER_PSEUDO_OP guard.
5238         * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
5239         !HAVE_AS_REGISTER_PSEUDO_OP support.
5240         (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
5241         guard.
5243 2018-11-02  Richard Biener  <rguenther@suse.de>
5245         * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
5246         with is_type_die.
5248 2018-11-02  Richard Biener  <rguenther@suse.de>
5250         PR tree-optimization/87776
5251         * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
5252         executable when iterating but running into rpo-vn-max-loop-depth
5253         and not eliding the iteration.
5255 2018-11-30  Jan Hubicka  <jh@suse.cz>
5257         * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
5258         TYPE_DECL.
5260 2018-11-01  Aaron Sawdey  <acsawdey@linux.ibm.com>
5262         * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
5263         prototype.
5264         * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
5265         Combine with rs6000_address_for_fpconvert.
5266         (rs6000_address_for_fpconvert): Combine with
5267         rs6000_force_indexed_or_indirect_mem.
5268         (rs6000_expand_vector_init): Change function call from
5269         rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
5270         * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
5271         rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
5272         (floatsi<mode>2_lfiwax_mem): Ditto.
5273         (floatunssi<mode>2_lfiwzx): Ditto.
5274         (floatunssi<mode>2_lfiwzx_mem): Ditto.
5275         (float<QHI:mode><FP_ISA3:mode>2): Ditto.
5276         (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
5277         (fix_trunc<mode>si2_stfiwx): Ditto.
5278         (fixuns_trunc<mode>si2_stfiwx): Ditto.
5279         (float_<mode>si2_hw): Ditto.
5280         (floatuns_<mode>si2_hw): Ditto.
5281         * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
5282         (vsx_splat_<mode>): Ditto.
5284 2018-11-01  Joseph Myers  <joseph@codesourcery.com>
5286         * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
5287         at end of assembler input text.
5288         * configure: Regenerate.
5290 2018-11-01  Jakub Jelinek  <jakub@redhat.com>
5292         PR tree-optimization/87826
5293         * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
5294         negative or larger or equal to type's precision.
5296 2018-10-31  Alexandre Oliva <aoliva@redhat.com>
5298         * opts.c (default_options_table): Do not enable
5299         OPT_fdelayed_branch at -Og.
5300         * doc/invoke.texi (-fdelayed-branch): Document it.
5302 2018-10-31  Richard Henderson  <richard.henderson@linaro.org>
5304         * optabs-libfuncs.c (build_libfunc_function_visibility):
5305         New, split out from...
5306         (build_libfunc_function): ... here.
5307         (init_one_libfunc_visibility): New, split out from ...
5308         (init_one_libfunc): ... here.
5310         * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
5311         scratch register need not be early-clobber.  Document the reason
5312         why we cannot use ST<OP>.
5314 2018-10-31  Joseph Myers  <joseph@codesourcery.com>
5316         PR bootstrap/82856
5317         * configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.  Use single
5318         line for second argument of AC_DEFINE_UNQUOTED.
5319         * doc/install.texi (Tools/packages necessary for modifying GCC):
5320         Update to autoconf 2.69 and automake 1.15.1.
5321         * aclocal.m4, config.in, configure: Regenerate.
5323 2018-10-31  Pat Haugen  <pthaugen@us.ibm.com>
5325         * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
5326         initialization.
5328 2018-10-31  Martin Liska  <mliska@suse.cz>
5330         PR driver/83193
5331         * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
5332         Add new argument invalid_extension.
5333         (aarch64_get_all_extension_candidates): New function.
5334         (aarch64_rewrite_selected_cpu): Add NULL to function call.
5335         * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
5336         new argument.
5337         (aarch64_get_all_extension_candidates): New function.
5338         * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
5339         argument invalid_extension.
5340         (aarch64_parse_cpu): Likewise.
5341         (aarch64_print_hint_for_extensions): New function.
5342         (aarch64_validate_mcpu): Provide hint about invalid extension.
5343         (aarch64_validate_march): Likewise.
5344         (aarch64_handle_attr_arch): Pass new argument.
5345         (aarch64_handle_attr_cpu): Provide hint about invalid extension.
5346         (aarch64_handle_attr_isa_flags): Likewise.
5348 2018-10-31  Richard Biener  <rguenther@suse.de>
5350         PR middle-end/70359
5351         PR middle-end/86270
5352         * tree-outof-ssa.c (insert_backedge_copies): Restrict
5353         copy generation to useful cases.  Place the copy before
5354         the definition of the backedge value when possible.
5356 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
5358         * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
5359         * config/arc/arc.c (arc_active_insn): New function.
5360         (check_store_cacheline_hazard): Likewise.
5361         (workaround_arc_anomaly): Use check_store_cacheline_hazard.
5362         (arc_override_options): Disable delay slot scheduler for older
5363         A7.
5364         (arc_store_addr_hazard_p): New implementation, old one renamed to
5365         ...
5366         (arc_store_addr_hazard_internal_p): Renamed.
5367         (arc_reorg): Don't combine into brcc instructions which are part
5368         of hardware hazard solution.
5369         * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
5370         (tune_arc700): Likewise.
5371         * config/arc/arc.opt (arc7xx): New tune value.
5372         * config/arc/arc700.md: Improve A7 scheduler.
5374 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
5376         * config/arc/arc.c (arc_override_options): Remove
5377         TARGET_COMPACT_CASESI.
5378         * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
5379         (CASE_VECTOR_MODE): Likewise.
5380         (CASE_VECTOR_PC_RELATIVE): Likewise.
5381         (CASE_VECTOR_SHORTEN_MODE): Likewise.
5382         (CASE_VECTOR_SHORTEN_MODE1): Delete.
5383         (ADDR_VEC_ALIGN): Update.
5384         (ASM_OUTPUT_CASE_LABEL): Undefine.
5385         (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
5386         (TARGET_BI_BIH): Define.
5387         (DEFAULT_BRANCH_INDEX): Likewise.
5388         * config/arc/arc.md (casesi): Rework to accept BI/BIH
5389         instructions, remove compact_casesi use case.
5390         (casesi_compact_jump): Remove.
5391         (casesi_dispatch): New pattern.
5392         * config/arc/arc.opt: Add mbranch-index option. Deprecate
5393         compact_casesi option.
5394         * doc/invoke.texi: Document mbranch-index option.
5396 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
5398         * config/arc/arc.c (arc_get_tp): Remove function.
5399         (arc_emit_call_tls_get_addr): Likewise.
5400         (arc_call_tls_get_addr): New function.
5401         (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
5402         * config/arc/arc.md (tls_load_tp_soft): Remove.
5403         (tls_gd_get_addr): Likewise.
5405 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
5407         * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
5408         (mulsi3_600_lib): Remove pattern.
5409         (umulsi3_highpart_600_lib_le): Likewise.
5410         (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
5411         (umulsidi3): Remove call to umulsidi3_600_lib.
5412         (umulsidi3_600_lib): Remove pattern.
5413         (peephole2): Remove peephole using the above deprecated patterns.
5415 2018-10-31  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
5417         PR target/87374
5418         * config/arm/arm.c (arm_option_check_internal): Disable the combined
5419         use of -mslow-flash-data and -mword-relocations.
5420         (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
5421         * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
5422         flag_pic.
5423         * doc/invoke.texi (-mword-relocations): Mention conflict with
5424         -mslow-flash-data.
5425         (-mslow-flash-data): Reciprocally.
5427 2018-10-31  Richard Henderson  <richard.henderson@linaro.org>
5429         * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
5430         16-byte modes held in GP registers to use an even regno.
5432         * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
5433         (aarch64_atomic_ldop_supported_p): Remove.
5434         (aarch64_gen_atomic_ldop): Remove.
5435         * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
5436         Fully expand LSE operations here.
5437         (atomic_fetch_<atomic_optab><ALLI>): Likewise.
5438         (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
5439         (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
5440         and use ATOMIC_LDOP instead; use register_operand for the input;
5441         drop the split and emit insns directly.
5442         (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
5443         (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
5444         (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
5446         * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
5447         (aarch64_gen_atomic_ldop): Don't call it.
5448         * config/aarch64/atomics.md (atomic_exchange<ALLI>):
5449         Use aarch64_reg_or_zero.
5450         (aarch64_atomic_exchange<ALLI>): Likewise.
5451         (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
5452         operand 0; use aarch64_reg_or_zero for input; merge ...
5453         (@aarch64_atomic_swp<ALLI>): ... this and remove.
5455         * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
5456         (aarch64_split_compare_and_swap): Use it.
5457         (aarch64_expand_compare_and_swap): Likewise.  Remove convert_modes;
5458         test oldval against the proper predicate.
5459         * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
5460         Use nonmemory_operand for expected.
5461         (cas_short_expected_pred): New.
5462         (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
5463         (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
5464         * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
5465         (aarch64_plushi_operand): New.
5467         * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
5468         Force oldval into the rval register for TARGET_LSE; emit the compare
5469         during initial expansion so that it may be deleted if unused.
5470         (aarch64_gen_atomic_cas): Remove.
5471         * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
5472         Change =&r to +r for operand 0; use match_dup for operand 2;
5473         remove is_weak and mod_f operands as unused.  Drop the split
5474         and merge with...
5475         (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
5476         (@aarch64_compare_and_swap<GPI>_lse): Similarly.
5477         (@aarch64_atomic_cas<GPI>): Similarly.
5479 2018-10-31  Richard Biener  <rguenther@suse.de>
5481         * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
5482         using ABSU_EXPR.
5484 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
5486         * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
5487         * config/aarch64/aarch64.md: Include saphira.md
5488         * config/aarch64/saphira.md: New file for pipeline description.
5490 2018-10-30  Martin Sebor  <msebor@redhat.com>
5492         PR middle-end/87041
5493         * gimple-ssa-sprintf.c (format_directive): Use %G to include
5494         inlining context.
5495         (sprintf_dom_walker::compute_format_length):
5496         Avoid setting POSUNDER4K here.
5497         (get_destination_size): Handle null argument values.
5498         (get_user_idx_format): New function.
5499         (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
5500         functions, including user-defined with attribute format printf.
5501         Use %G to include inlining context.
5502         Set POSUNDER4K here.
5504 2018-10-30  Jan Hubicka  <jh@suse.cz>
5506         * params.def (lto-partitions): Bump from 32 to 128.
5508 2018-10-30  Jan Hubicka  <jh@suse.cz>
5510         * tree.c
5511         (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
5512         head in file.
5513         (free_lang_data_in_type): Forward declare.
5514         (fld_type_variant_equal_p): New function.
5515         (fld_type_variant): New function
5516         (fld_incomplete_types): New hash.
5517         (fld_incomplete_type_of): New function
5518         (fld_simplfied-type): New function.
5519         (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
5520         (free_lang_data): Allocate and free fld_incomplete_type; update call
5521         of free_lang_data_in_decl.
5523 2018-10-30  Eric Botcazou  <ebotcazou@adacore.com>
5525         * gcov.c (output_lines): Remove duplicate line.
5527 2018-10-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
5529         * config/rs6000/rs6000.md (bswapdi2): Force address into register
5530         if not in indexed or indirect form.
5531         (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
5532         (bswapdi2_store): Ditto.
5533         * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
5534         helper function.
5535         * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
5536         Prototype for helper function.
5538 2018-10-30  Martin Sebor  <msebor@redhat.com>
5540         * doc/extend.texi (optimize): Clarify/expand attribute documentation.
5541         (target, pragma GCC optimize, pragma GCC target): Ditto.
5543 2018-10-30  Jonathan Wakely  <jwakely@redhat.com>
5545         * doc/extend.texi: Fix prototype and description of
5546         __builtin_expect_with_probability.
5548 2018-10-30  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
5550         * cgraph.h (clone_function_name_1): Replaced by new
5551           clone_function_name_numbered that takes name as string; for
5552           privatize_symbol_name_1 use only.
5553           (clone_function_name): Renamed to
5554           clone_function_name_numbered to be explicit about numbering.
5555           (clone_function_name): New two-argument function that does
5556           not number its output.
5557           (clone_function_name): New three-argument function that
5558           takes a number to append to its output.
5559         * cgraphclones.c (duplicate_thunk_for_node):
5560           (clone_function_name_1): Renamed.
5561           (clone_function_name_numbered): Two new functions.
5562           (clone_function_name): Improved documentation.
5563           (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
5564         * config/rs6000/rs6000.c (make_resolver_func): Ditto.
5565         * final.c (final_scan_insn_1): Use the new clone_function_name
5566           without numbering.
5567         * multiple_target.c (create_dispatcher_calls): Ditto.
5568           (create_target_clone): Ditto.
5569         * omp-expand.c (grid_expand_target_grid_body): Ditto.
5570         * omp-low.c (create_omp_child_function_name): Ditto.
5571         * omp-simd-clone.c (simd_clone_create): Ditto.
5572         * symtab.c (simd_symtab_node::noninterposable_alias): Use the
5573           new clone_function_name without numbering.
5575 2018-10-30  Richard Earnshaw  <rearnsha@arm.com>
5577         * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
5578         Assert that the allocation size is not zero.
5580 2018-10-30  Richard Biener  <rguenther@suse.de>
5582         PR tree-optimization/87800
5583         * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
5584         non-induction or reduction PHIs.
5586 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
5588         * config/aarch64/falkor-tag-collision-avoidance.c
5589         (execute_tag_collision_avoidance): Call df_note_add_problem.
5591 2018-10-30  Martin Liska  <mliska@suse.cz>
5593         * doc/extend.texi: Fix typo in documentation
5594         of __builtin_expect_with_probability.
5596 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
5598         PR c++/87721
5599         * input.c (get_substring_ranges_for_loc): Detect if
5600         linemap_resolve_location gives us a NULL map, and reject
5601         this case.
5603 2018-10-29  Iain Buclaw  <ibuclaw@gdcproject.org>
5605         * config.gcc (xstormy16-*-elf): Set tm_d_file.
5607 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
5608             Martin Sebor  <msebor@redhat.com>
5609             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
5611         * doc/ux.texi (Quoting): New subsection, adapted from material at
5612         https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
5613         MartinSebor and ManuelLopezIbanez.
5614         (Fix-it hints): Note that fix-it hints shouldn't be marked for
5615         translation.
5617 2018-10-29  Kugan Vivekanandarajah  <kuganv@linaro.org>
5619         PR middle-end/87469
5620         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
5621         max value.
5623 2018-10-29  Paul A. Clarke  <pc@us.ibm.com>
5625         * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
5627 2018-10-29  Paul Koning  <ni1d@arrl.net>
5629         * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
5631 2018-10-29  Paul A. Clarke  <pc@us.ibm.com>
5633         * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
5634         _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
5635         _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
5636         _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
5637         _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
5638         _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
5639         _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
5640         _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
5641         Change 'vector' to '__vector'.
5642         * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
5643         _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
5644         _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
5645         _mm_avg_pu16): Likewise.  And, whitespace corrections.
5647 2018-10-29  Richard Biener  <rguenther@suse.de>
5649         PR tree-optimization/87785
5650         * tree-vect-slp.c (vect_gather_slp_loads): Only gather
5651         internal defs.
5653 2018-10-29  Olivier Hainque  <hainque@adacore.com>
5655         * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
5657 2018-10-29  Olivier Hainque  <hainque@adacore.com>
5659         * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
5660         ports configuration macro, defaults to "gnu".
5661         (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
5662         TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
5664 2018-10-29  Olivier Hainque  <hainque@adacore.com>
5666         * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
5668 2018-10-29  Richard Biener  <rguenther@suse.de>
5670         PR tree-optimization/87790
5671         * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
5672         (vect_make_slp_decision): Adjust.
5673         (vect_slp_analyze_bb_1): Likewise.
5674         (vect_detect_hybrid_slp_stmts): Properly union SLP type over
5675         edges.
5677 2018-10-29  Richard Biener  <rguenther@suse.de>
5679         PR tree-optimization/87785
5680         * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
5681         and processing.
5682         (vect_build_slp_tree): Likewise.
5683         (vect_gather_slp_loads): New function.
5684         (vect_analyze_slp_instance): Gather loads separately from the
5685         SLP tree build.
5687 2018-10-29  Martin Liska  <mliska@suse.cz>
5689         * Makefile.in: Make dependency to json.o.
5690         * doc/gcov.texi: Document new JSON format, remove
5691         old intermediate format documentation.
5692         * gcov.c (struct function_info): Come up with m_name and
5693         m_demangled_name.
5694         (function_info::function_info): Initialize it.
5695         (function_info::~function_info): Release it.
5696         (main): Rename flag_intermediate_format to flag_json_format.
5697         (print_usage): Describe --json-format.
5698         (process_args): Set flag_json_format.
5699         (output_intermediate_line): Remove.
5700         (output_intermediate_json_line): Likewise.
5701         (get_gcov_intermediate_filename): Return new extension
5702         ".gcov.json.gz".
5703         (output_intermediate_file): Implement JSON emission.
5704         (output_json_intermediate_file): Implement JSON emission.
5705         (generate_results): Use ::get_name for function name.
5706         Handle JSON output file.
5707         (read_graph_file): Use ::get_name instead of cplus_demangle.
5708         (read_count_file): Likewise.
5709         (solve_flow_graph): Likewise.
5710         (add_line_counts): Likewise.
5711         (accumulate_line_counts): Use new flag_json_format.
5712         (output_function_details): Use ::get_name instead of cplus_demangle.
5713         (output_lines): Likewise.
5714         * json.cc (test_writing_literals): Add new tests.
5715         * json.h (class literal): Add new boolean constructor.
5717 2018-10-29  Segher Boessenkool  <segher@kernel.crashing.org>
5719         PR rtl-optimization/87701
5720         PR rtl-optimization/87780
5721         * combine.c (make_more_copies): Rewrite.
5723 2018-10-28  Kugan Vivekanandarajah  <kuganv@linaro.org>
5725         * doc/generic.texi (ABSU_EXPR): Document.
5726         * match.pd (absu(x)*absu(x) -> x*x): Handle.
5727         (absu(absu(X)) -> absu(X)): Likewise.
5728         (absu(-X) -> absu(X)): Likewise.
5729         (absu(X)  where X is nonnegative -> X): Likewise.
5731 2018-10-28  Iain Buclaw  <ibuclaw@gdcproject.org>
5733         * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
5734         (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
5735         (tm_d.h, cs-tm_d.h, default-d.o): New rules.
5736         (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
5737         (s-tm-texi): Also check timestamp on d-target.def.
5738         (generated_files): Add TM_D_H and d-target-hooks-def.h.
5739         (build/genhooks.o): Also depend on D_TARGET_DEF.
5740         * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
5741         variables.
5742         * config/aarch64/aarch64-d.c: New file.
5743         * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
5744         Define.
5745         * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
5746         prototype.
5747         * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
5748         * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
5749         * config/arm/arm-d.c: New file.
5750         * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
5751         * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
5752         * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
5753         * config/arm/t-arm (arm-d.o): New rule.
5754         * config/default-d.c: New file.
5755         * config/glibc-d.c: New file.
5756         * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5757         * config/i386/i386-d.c: New file.
5758         * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
5759         * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
5760         * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
5761         (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
5762         * config/i386/t-i386 (i386-d.o): New rule.
5763         * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5764         * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5765         * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
5766         * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5767         * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
5768         * config/mips/mips-d.c: New file.
5769         * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
5770         * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
5771         * config/mips/t-mips (mips-d.o): New rule.
5772         * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5773         * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5774         * config/powerpcspe/powerpcspe-d.c: New file.
5775         * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
5776         New prototype.
5777         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
5778         Support GNU D by using 0 as the language type.
5779         * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
5780         * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
5781         * config/riscv/riscv-d.c: New file.
5782         * config/riscv/riscv-protos.h (riscv_d_target_versions): New
5783         prototype.
5784         * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
5785         * config/riscv/t-riscv (riscv-d.o): New rule.
5786         * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5787         * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5788         * config/rs6000/rs6000-d.c: New file.
5789         * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
5790         prototype.
5791         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
5792         Support GNU D by using 0 as the language type.
5793         * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
5794         * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
5795         * config/s390/s390-d.c: New file.
5796         * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
5797         * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
5798         * config/s390/t-s390 (s390-d.o): New rule.
5799         * config/sparc/sparc-d.c: New file.
5800         * config/sparc/sparc-protos.h (sparc_d_target_versions): New
5801         prototype.
5802         * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
5803         * config/sparc/t-sparc (sparc-d.o): New rule.
5804         * config/t-glibc (glibc-d.o): New rule.
5805         * configure: Regenerated.
5806         * configure.ac (tm_d_file): New variable.
5807         (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
5808         * doc/contrib.texi (Contributors): Add self for the D frontend.
5809         * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
5810         * doc/install.texi (Configuration): Mention libphobos as an option for
5811         --enable-shared.  Mention d as an option for --enable-languages.
5812         (Testing): Mention check-d as a target.
5813         * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
5814         name suffixes.  Mention d as a -x option.
5815         * doc/sourcebuild.texi (Top Level): Mention libphobos.
5816         * doc/standards.texi (Standards): Add section on D language.
5817         * doc/tm.texi: Regenerated.
5818         * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
5819         TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
5820         * dwarf2out.c (is_dlang): New function.
5821         (gen_compile_unit_die): Use DW_LANG_D for D.
5822         (declare_in_namespace): Return module die for D, instead of adding
5823         extra declarations into the namespace.
5824         (gen_namespace_die): Generate DW_TAG_module for D.
5825         (gen_decl_die): Handle CONST_DECLSs for D.
5826         (dwarf2out_decl): Likewise.
5827         (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
5828         (prune_unused_types_walk): Handle DW_tag_interface_type same as other
5829         kinds of aggregates.
5830         * gcc.c (default_compilers): Add entries for .d, .dd and .di.
5831         * genhooks.c: Include d/d-target.def.
5833 2018-10-28  Iain Sandoe  <iain@sandoe.co.uk>
5835         PR target/85669
5836         * config/rs6000/darwin.h (STACK_BOUNDARY): New.
5837         (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
5838         (STACK_DYNAMIC_OFFSET): Likewise.
5840 2018-10-27  Sandra Loosemore  <sandra@codesourcery.com>
5842         PR target/80024
5843         * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
5844         error message.
5846 2018-10-26  Tulio Magno Quites Machado Filho  <tuliom@linux.ibm.com>
5848         * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
5849         return type and other typos.
5851 2018-10-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
5853         * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
5854         a shorter sequence with fewer branches.
5855         (emit_final_str_compare_gpr): Ditto.
5857 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
5859         * config/rs6000/tmmintrin.h: New file.
5860         * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
5862 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
5864         * config/rs6000/mmintrin.h: Enable 32bit compilation.
5865         * config/rs6000/xmmintrin.h: Likewise.
5867 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
5869         * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
5871 2018-10-26  Richard Biener  <rguenther@suse.de>
5873         * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
5874         and wrapper.
5875         (vect_mark_slp_stmts_relevant): Likewise.
5876         (vect_detect_hybrid_slp_stmts): Likewise.
5877         (vect_bb_slp_scalar_cost): Likewise.
5878         (vect_remove_slp_scalar_calls): Likewise.
5880 2018-10-26  Jan Hubicka  <jh@suse.cz>
5882         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
5883         (warn_types_mismatch): Fix walk of DECL_NAME.
5884         (odr_types_equivalent_p): Fix overactive assert.
5886 2018-10-26  Richard Biener  <rguenther@suse.de>
5888         PR tree-optimization/87105
5889         * tree-vectorizer.h (_slp_tree::refcnt): New member.
5890         * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
5891         refcnt.
5892         (vect_create_new_slp_node): Initialize refcnt to one.
5893         (bst_traits): Move.
5894         (scalar_stmts_set_t, bst_fail): Remove.
5895         (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
5896         (vect_build_slp_tree): Add bst_map argument and lookup
5897         already created SLP nodes.
5898         (vect_print_slp_tree): Handle a SLP graph, print SLP node
5899         addresses.
5900         (vect_slp_rearrange_stmts): Handle a SLP graph.
5901         (vect_analyze_slp_instance): Adjust and free SLP nodes from
5902         the CSE map.  Fix indenting.
5903         (vect_schedule_slp_instance): Add short-cut.
5905 2018-10-26  Martin Liska  <mliska@suse.cz>
5907         PR testsuite/86158
5908         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
5909         addr_expr and not with pointers.
5911 2018-10-26  Jan Hubicka  <jh@suse.cz>
5913         * tree.c (free_lang_data_in_type): Only check main variants.
5914         * ipa-devirt.c (warn_odr): Make static.
5915         (types_same_for_odr): Drop strict variant.
5916         (types_odr_comparable): Likewise.
5917         (odr_or_derived_type_p): Look for main variants.
5918         (odr_name_hasher::equal): Cleanup comment.
5919         (odr_subtypes_equivalent): Add warn and warned arguments; check main
5920         variants.
5921         (type_variants_equivalent_p): break out from ...
5922         (odr_types_equivalent): ... here; go for main variants where needed.
5923         (warn_odr): ... here; turn static.
5924         (warn_types_mismatch): Compare mangled names of main variants.
5925         * ipa-utils.h (types_odr_comparable): Drop strict parameter.
5926         (type_with_linkage_p): Sanity check that we look at main variant.
5927         * lto.c (lto_read_decls): Only consider main variant to be ODR type.
5928         * tree.h (types_same_for_odr): Drop strict argument.
5930 2018-10-26  Richard Biener  <rguenther@suse.de>
5932         PR tree-optimization/87746
5933         * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
5934         Simplify and fix WRT strided store groups with size not
5935         equal to step in element count.
5936         (vect_analyze_group_access_1): Dump the whole group.
5938 2018-10-25  Carl Love  <cel@us.ibm.com>
5940         * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
5941         P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
5942         P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name.  Add quad
5943         precicion entry for each overloaded builtin.
5944         * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
5945         VSCEDPUO): Rename overloaded name.
5946         (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
5947         VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
5948         * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
5949         define_expand for xscmpexqp instruction.
5950         (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
5952 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
5953             Jinsong Ji <jji@us.ibm.com>
5955         * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
5956         function with vec_sl.
5957         (_mm_slli_epi32): Likewise.
5958         (_mm_slli_epi64): Likewise.
5959         (_mm_srai_epi16): Replace deprecated function with vec_sra.
5960         (_mm_srai_epi32): Likewise.
5961         (_mm_srli_epi16): Replace deprecated function with vec_sr.
5962         (_mm_srli_epi32): Likewise.
5963         (_mm_srli_epi64): Likewise.
5964         (_mm_sll_epi16): Replace deprecated function with vec_sl.
5965         (_mm_sll_epi32): Likewise.
5966         (_mm_sll_epi64): Likewise.
5967         (_mm_sra_epi16): Replace deprecated function with vec_sra.
5968         (_mm_sra_epi32): Likewise.
5969         (_mm_srl_epi16): Replace deprecated function with vec_sr.
5970         (_mm_srl_epi32): Likewise.
5971         (_mm_srl_epi64): Likewise.
5973 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
5974             Jinsong Ji <jji@us.ibm.com>
5976         * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
5977         comparison operators with vec_cmp* for compatibility due to
5978         unfortunate history; clean up formatting and use types more
5979         appropriately.
5980         (_mm_sll_epi32): Likewise.
5981         (_mm_sll_epi64): Likewise.
5982         (_mm_srl_epi16): Likewise.
5983         (_mm_srl_epi32): Likewise.
5984         (_mm_srl_epi64): Likewise.
5986 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
5987             Jinsong Ji <jji@us.ibm.com>
5989         * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
5990         * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
5991         __vector __bool int.  Use vec_cmpgt in preference to deprecated
5992         function vec_vcmpgtfp.
5993         (_mm_max_ps): Likewise.
5995 2018-10-25  Jeff Law  <law@redhat.com>
5997         * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
5998         if returning false.
6000 2018-10-25  Martin Sebor  <msebor@redhat.com>
6002         * doc/extend.texi (aligned): Expand attribute description.
6003         (Alignment): Rename section.  Discuss function arguments.
6005 2018-10-25  Jan Hubicka  <jh@suse.cz>
6007         * ipa-devirt.c (main_odr_variant): Remove.
6008         (hash_odr_name, types_same_for_odr, types_odr_comparable,
6009         odr_name_hasher::equal, odr_subtypes_equivalent_p):
6010         Drop use of main_odr_variant.
6011         (add_type_duplicate): Silence confused warnings on integer types.
6012         (get_odr_type): Always look for main variant.
6013         (register_odr_type): Simplify.
6015 2018-10-25  Richard Biener  <rguenther@suse.de>
6017         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
6018         Initialize ng to silence error with release checking bootstrap.
6020 2018-10-25  Richard Biener  <rguenther@suse.de>
6022         * tree-if-conv.c: Include tree-ssa-sccvn.h.
6023         (tree_if_conversion): Run CSE on the if-converted loop body.
6025 2018-10-25  Ilya Leoshkevich  <iii@linux.ibm.com>
6027         * config/s390/constraints.md (ZL): New constraint.
6028         * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
6029         operands.
6030         * config/s390/s390.md (movdi_larl): Remove.
6031         (movdi_64): Add the LARL alternative.
6033 2018-10-25  Ilya Leoshkevich  <iii@linux.ibm.com>
6035         PR bootstrap/87747
6036         * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
6037         (RTX_CODE_HWINT_P): New macro.
6038         (rtx_code_size): Use RTX_CODE_HWINT_P ().
6040 2018-10-25  Jan Hubicka  <jh@suse.cz>
6042         * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
6043         is anonymous.
6045 2018-10-25  Richard Biener  <rguenther@suse.de>
6047         PR tree-optimization/87665
6048         PR tree-optimization/87745
6049         * tree-vectorizer.h (get_earlier_stmt): Remove.
6050         (get_later_stmt): Pick up UID from the original non-pattern stmt.
6052 2018-10-25  Sam Tebbs  <sam.tebbs@arm.com>
6054         * options.texi (Deprecated): Move list to Var section.
6056 2018-10-24  Bill Schmidt  <wschmidt@linux.ibm.com>
6057             Jinsong Ji <jji@us.ibm.com>
6059         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
6060         __vector long to __vector long long.
6061         (_mm_cvtpd_ps): Likewise.
6062         (_mm_cvttpd_epi32): Likewise.
6063         (_mm_cvtpi32_pd): Likewise.
6064         (_mm_unpackhi_epi64): Likewise.
6065         (_mm_unpacklo_epi64): Likewise.
6067 2018-10-24  Segher Boessenkool  <segher@kernel.crashing.org>
6069         PR rtl-optimization/87720
6070         * combine.c (make_more_copies): Skip if the dest is pc_rtx.
6072 2018-10-24  Alexandre Oliva <aoliva@redhat.com>
6074         * gimple-ssa-isolate-paths.c
6075         (find_implicit_erroneous_behavior): Do not change code if the
6076         pass is running for warnings only.
6077         (find_explicit_erroneous_behavior): Likewise.
6079 2018-10-24  Michael Meissner  <meissner@linux.ibm.com>
6081         * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
6082         Define as rs6000_mangle_decl_assembler_name.
6083         (rs6000_mangle_decl_assembler_name): If the user switched from IBM
6084         long double to IEEE long double, switch the names of the long
6085         double built-in functions to be <func>f128 instead of <func>l.
6087 2018-10-24  Martin Sebor  <msebor@redhat.com>
6089         * doc/extend.texi (nonnull): List no-argument form.  Reference
6090         -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
6092 2018-10-24  Richard Biener  <rguenther@suse.de>
6094         * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
6096 2018-10-24  Martin Liska  <mliska@suse.cz>
6098         PR tree-optimization/84436
6099         * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
6100         Remove.
6101         (switch_conversion::contains_linear_function_p): New.
6102         (switch_conversion::build_one_array): Support linear
6103         transformation on input.
6104         * tree-switch-conversion.h (struct switch_conversion): Add
6105         contains_linear_function_p declaration.
6107 2018-10-24  Richard Biener  <rguenther@suse.de>
6109         * varasm.c (const_hash_1): Return hash of ADDR_EXPR
6110         if its argument is CONSTANT_CLASS_P.
6112 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
6114         * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
6115         it is wrong for forward declarations.
6117 2018-10-24  Ilya Leoshkevich  <iii@linux.ibm.com>
6119         * config/s390/s390.c (s390_check_qrst_address): Add the missing
6120         SYMBOL_REF_P () check.
6122 2018-10-24  Richard Biener  <rguenther@suse.de>
6124         PR tree-optimization/87105
6125         * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
6126         dump classification.
6127         (vect_analyze_data_ref_accesses): Handle duplicate loads and
6128         stores by splitting the affected group after the fact.
6129         * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
6130         fail the SLP build because of size constraints.
6132 2018-10-24  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6134         * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
6135         * configure: Regenerate.
6136         * config.in: Regenerate.
6137         * varasm.c (mergeable_string_section): Use readonly_data_section
6138         if linker doesn't support SHF_MERGE with alignment > 8.
6139         (mergeable_constant_section): Likewise.
6141 2018-10-24  Richard Biener  <rguenther@suse.de>
6143         PR tree-optimization/84013
6144         * tree-ssa-structalias.c (struct msdi_data): New struct for
6145         marshalling data to walk_stmt_load_store_ops.
6146         (maybe_set_dependence_info): Refactor as callback for
6147         walk_stmt_load_store_ops.
6148         (compute_dependence_clique): Set restrict info on all stmt kinds.
6150 2018-10-24  Martin Liska  <mliska@suse.cz>
6152         * cgraph.c (cgraph_node::dump):
6153         Remove reduntant dumps and make tp_first_run dump more compact.
6155 2018-10-24  Richard Biener  <rguenther@suse.de>
6157         PR tree-optimization/87665
6158         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
6159         to reflect reality.
6161 2018-10-12  Jeff Law  <law@redhat.com>
6163         * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
6164         for H8/S.
6166 2018-10-23  Richard Biener  <rguenther@suse.de>
6168         * tree-vrp.c (add_assert_info): Guard dump_printf with
6169         dump_enabled_p.
6170         * gimple-ssa-evrp-analyze.c
6171         (evrp_range_analyzer::record_ranges_from_incoming_edge):
6172         Use value_range::ignore_equivs_equal_p.
6174 2018-10-23  Richard Biener  <rguenther@suse.de>
6176         PR tree-optimization/87105
6177         PR tree-optimization/87608
6178         * passes.def (pass_all_early_optimizations): Add early phi-opt
6179         after dce.
6180         * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
6181         addition to debug stmts.
6182         (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
6183         and abs replacement early.
6184         * tree-cfg.c (gimple_empty_block_p): Likewise.
6186 2018-10-23  Richard Earnshaw  <rearnsha@arm.com>
6188         PR target/86383
6189         * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
6190         specified to configure.
6191         (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
6193 2018-10-23  Richard Biener  <rguenther@suse.de>
6195         PR tree-optimization/87700
6196         * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
6198 2018-10-23  Jakub Jelinek  <jakub@redhat.com>
6200         PR target/87674
6201         * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
6202         second argument from __mmask16 to __mmask8.
6203         * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
6204         _mm_mask_packs_epi32): Likewise.
6205         * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
6206         Likewise.
6207         (_mm512_mask_prefetch_i64scatter_pd): Likewise.  Formatting fix.
6209 2018-10-23  Richard Biener  <rguenther@suse.de>
6211         * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
6213 2018-10-23  Richard Biener  <rguenther@suse.de>
6215         PR tree-optimization/86144
6216         * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
6217         over simd attribute.
6219 2018-10-23  Richard Biener  <rguenther@suse.de>
6221         PR tree-optimization/87693
6222         * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
6223         the case we do not find the taken edge.
6225 2018-10-22  Bill Schmidt  <wschmidt@linux.ibm.com>
6226             Jinsong Ji  <jji@us.ibm.com>
6228         * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
6229         (_mm_store_pd): Use unaligned vector type for pointer cast.
6230         (_mm_maskmoveu_si128): Likewise.
6231         * config/rs6000/xmmintrin.h (__m128_u): New typedef.
6232         (_mm_store_ps): Use unaligned vector type for pointer cast.
6234 2018-10-22  Paul Koning  <ni1d@arrl.net>
6236         * symtab.c (symtab_node::increase_alignment): Correct max
6237         alignment check.
6239 2018-10-22  Yury Gribov  <tetra2005@gmail.com>
6241         PR tree-optimization/87633
6242         * match.pd: Do not generate unordered integer comparisons.
6244 2018-10-22  Segher Boessenkool  <segher@kernel.crashing.org>
6246         PR rtl-optimization/87600
6247         * combine.c: Add include of expr.h.
6248         (cant_combine_insn_p): Do not combine moves from any hard non-fixed
6249         register to a pseudo.
6250         (make_more_copies): New function, add a copy to a new pseudo after
6251         the moves from hard registers into pseudos.
6252         (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
6253         later.  Call make_more_copies.
6255 2018-10-22  Andrew Stubbs  <ams@codesourcery.com>
6257         * lra-constraints.c (process_alt_operands): New local array,
6258         matching_early_clobber.  Check matching_early_clobber before
6259         decrementing reject, and set matching_early_clobber after.
6261 2018-10-22  Segher Boessenkool  <segher@kernel.crashing.org>
6263         PR target/87598
6264         * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
6265         call output_addr_const and hope for the best.
6267 2018-10-22  Richard Biener  <rguenther@suse.de>
6269         * gimple-ssa-evrp-analyze.c
6270         (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
6271         smarter about what ranges to use.
6272         * tree-vrp.c (add_assert_info): Dump here.
6273         (register_edge_assert_for_2): Instead of here at multiple but
6274         not all places.
6276         * gcc.dg/tree-ssa/evrp12.c: New testcase.
6277         * gcc.dg/predict-6.c: Adjust.
6278         * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
6279         * gcc.dg/tree-ssa/vrp02.c: Likewise.
6280         * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
6282 2018-10-22  Steven Bosscher <steven@gcc.gnu.org>
6283         Richard Biener  <rguenther@suse.de>
6285         * bitmap.h: Update data structure documentation, including a
6286         description of bitmap views as either linked-lists or splay trees.
6287         (struct bitmap_element_def): Update comments for splay tree bitmaps.
6288         (struct bitmap_head_def): Likewise.
6289         (bitmap_list_view, bitmap_tree_view): New prototypes.
6290         (bitmap_initialize_stat): Initialize a bitmap_head's indx and
6291         tree_form fields.
6292         (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
6293         (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
6294         * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
6295         released bitmap element here.
6296         (bitmap_element_free): Remove.
6297         (bitmap_elt_clear_from): Work on splay tree bitmaps.
6298         (bitmap_list_link_element): Renamed from bitmap_element_link.  Move
6299         this function similar ones such that linked-list bitmap implementation
6300         functions are grouped.
6301         (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
6302         and moved for grouping.
6303         (bitmap_list_insert_element_after): Renamed from
6304         bitmap_elt_insert_after, and moved for grouping.
6305         (bitmap_list_find_element): New function spliced from bitmap_find_bit.
6306         (bitmap_tree_link_left, bitmap_tree_link_right,
6307         bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
6308         bitmap_tree_link_element, bitmap_tree_unlink_element,
6309         bitmap_tree_find_element): New functions for splay-tree bitmap
6310         implementation.
6311         (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
6312         Renamed and moved, see above entries.
6313         (bitmap_tree_listify_from): New function to convert part of a splay
6314         tree bitmap to a linked-list bitmap.
6315         (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
6316         (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
6317         (bitmap_find_bit): Remove.
6318         (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
6319         bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
6320         Handle splay tree bitmaps.
6321         (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
6322         bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
6323         bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
6324         bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
6325         bitmap_intersect_compl_p, bitmap_ior_and_compl,
6326         bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
6327         bitmap_hash): Reject trying to act on splay tree bitmaps.  Make
6328         corresponding changes to use linked-list specific bitmap_element
6329         manipulation functions as applicable for efficiency.
6330         (bitmap_tree_to_vec): New function.
6331         (debug_bitmap_elt_file): New function split out from ...
6332         (debug_bitmap_file): ... here.  Handle splay tree bitmaps.
6333         (bitmap_print): Likewise.
6335         PR tree-optimization/63155
6336         * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
6337         SSA edge worklists.
6338         * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
6339         in tree-view.
6341 2018-10-22  Martin Liska  <mliska@suse.cz>
6343         PR tree-optimization/87686
6344         Revert
6345         2018-08-29  Martin Liska  <mliska@suse.cz>
6347         * tree-switch-conversion.c (switch_conversion::expand):
6348         Strenghten assumption about gswitch statements.
6350 2018-10-22  Martin Liska  <mliska@suse.cz>
6352         * ipa-icf.c (sem_item::compare_attributes): Remove.
6353         (sem_item::compare_referenced_symbol_properties): Use
6354         attribute_list_equal instead.
6355         (sem_function::equals_wpa): Likewise.
6356         * ipa-icf.h: Remove compare_attributes.
6358 2018-10-22  Richard Biener  <rguenther@suse.de>
6360         PR middle-end/87682
6361         * mem-stats.h (mem_usage::operator==): Fix pasto.
6363 2018-10-22  Richard Biener  <rguenther@suse.de>
6365         PR tree-optimization/87640
6366         * tree-vrp.c (set_value_range_with_overflow): Decompose
6367         incomplete result.
6368         (extract_range_from_binary_expr_1): Adjust.
6370 2018-10-22  Martin Jambor  <mjambor@suse.cz>
6372         * tree-eh.h (stmt_could_throw_p): Add function parameter.
6373         (stmt_can_throw_external): Likewise.
6374         (stmt_can_throw_internal): Likewise.
6375         * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
6376         (lower_eh_constructs_2): Likewise.
6377         (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
6378         (stmt_can_throw_external): Likewise.
6379         (stmt_can_throw_internal): Likewise.
6380         (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
6381         (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
6382         (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
6383         (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
6384         (pass_lower_eh_dispatch::execute): Pass cfun to
6385         stmt_can_throw_external.
6386         (cleanup_empty_eh): Likewise.
6387         (verify_eh_edges): Pass cfun to stmt_could_throw_p.
6388         * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
6389         stmt_can_throw_external instead of pushing it to cfun.
6390         (symbol_table::create_edge): Likewise.
6391         * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
6392         stmt_can_throw_internal.
6393         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
6394         to stmt_could_throw_p.
6395         * gimple-ssa-store-merging.c (handled_load): Pass cfun to
6396         stmt_can_throw_internal.
6397         (pass_store_merging::execute): Likewise.
6398         * gimple-ssa-strength-reduction.c
6399         (find_candidates_dom_walker::before_dom_children): Pass cfun to
6400         stmt_could_throw_p.
6401         * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
6402         stmt_can_throw_internal.
6403         * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
6404         to stmt_can_throw_external.
6405         (check_stmt): Pass cfun to stmt_could_throw_p.
6406         (check_stmt): Pass cfun to stmt_can_throw_external.
6407         (pass_nothrow::execute): Likewise.
6408         * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
6409         * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
6410         stmt_can_throw_internal.
6411         (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
6412         (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
6413         (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
6414         * tree-complex.c (expand_complex_libcall): Pass cfun to
6415         stmt_could_throw_p and to stmt_can_throw_internal.
6416         (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
6417         * tree-inline.c (copy_edges_for_bb): Likewise.
6418         (maybe_move_debug_stmts_to_successors): Likewise.
6419         * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
6420         stmt_could_throw_p.
6421         * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
6422         * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
6423         * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
6424         stmt_can_throw_internal.
6425         * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
6426         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
6427         stmt_could_throw_p.
6428         (mark_aliased_reaching_defs_necessary_1): Pass cfun to
6429         stmt_can_throw_internal.
6430         * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
6431         * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
6432         stmt_could_throw_p.
6433         * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
6434         (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
6435         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
6436         (convert_mult_to_fma_1): Likewise.
6437         (convert_to_divmod): Likewise.
6438         * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
6439         * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
6440         * tree-ssa-propagate.c
6441         (substitute_and_fold_dom_walker::before_dom_children): Likewise.
6442         * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
6443         (maybe_optimize_range_tests): Likewise.
6444         (linearize_expr_tree): Likewise.
6445         (reassociate_bb): Likewise.
6446         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
6447         * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
6448         * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
6449         (handle_char_store): Likewise.
6450         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
6451         stmt_can_throw_internal.
6452         * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
6453         stmt_could_throw_p.
6454         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
6455         (vectorizable_call): Pass cfun to stmt_can_throw_internal.
6456         (vectorizable_simd_clone_call): Likewise.
6457         * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
6458         (gimple_stringop_fixed_value): Likewise.
6460 2018-10-22  Ilya Leoshkevich  <iii@linux.ibm.com>
6462         * config/s390/s390.c (s390_loadrelative_operand_p): Accept
6463         literal pool references.
6464         (s390_check_qrst_address): Adapt to the new behavior of
6465         s390_loadrelative_operand_p ().
6467 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
6469         PR target/72782
6470         * config/i386/sse.md (*andnot<mode>3_bcst): New.
6472 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
6474         PR target/72782
6475         * config/i386/sse.md (*<code><mode>3_bcst): New.
6477 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
6479         PR target/72782
6480         * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
6481         V4DI, V16SI and V8DI.
6482         (*sub<mode>3<mask_name>_bcst): New.
6483         (*add<mode>3<mask_name>_bcst): Likewise.
6485 2018-10-21  Bill Schmidt  <wschmidt@linux.ibm.com>
6486             Jinsong Ji  <jji@us.ibm.com>
6488         * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
6489         __m64 with __vector unsigned long long for compatibility.
6490         (_mm_movemask_epi8): Likewise.
6491         * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
6492         (_mm_cvttps_pi32): Likewise.
6493         (_mm_cvtpi32_ps): Likewise.
6494         (_mm_cvtps_pi16): Likewise.
6495         (_mm_loadh_pi): Likewise.
6496         (_mm_storeh_pi): Likewise.
6497         (_mm_movehl_ps): Likewise.
6498         (_mm_movelh_ps): Likewise.
6499         (_mm_loadl_pi): Likewise.
6500         (_mm_storel_pi): Likewise.
6501         (_mm_movemask_ps): Likewise.
6502         (_mm_shuffle_pi16): Likewise.
6504 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
6506         PR target/72782
6507         * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
6508         __builtin_ia32_vfnmsubpd512_mask.
6509         (_mm512_mask_fnmsub_round_pd): Likewise.
6510         (_mm512_fnmsub_pd): Likewise.
6511         (_mm512_mask_fnmsub_pd): Likewise.
6512         (_mm512_maskz_fnmsub_round_pd): Use
6513         __builtin_ia32_vfnmsubpd512_maskz.
6514         (_mm512_maskz_fnmsub_pd): Likewise.
6515         (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
6516         (_mm512_mask_fnmsub_round_ps): Likewise.
6517         (_mm512_fnmsub_ps): Likewise.
6518         (_mm512_mask_fnmsub_ps): Likewise.
6519         (_mm512_maskz_fnmsub_round_ps): Use
6520         __builtin_ia32_vfnmsubps512_maskz.
6521         (_mm512_maskz_fnmsub_ps): Likewise.
6522         * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
6523         __builtin_ia32_vfnmsubpd256_mask.
6524         (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
6525         (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
6526         (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
6527         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
6528         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
6529         (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
6530         (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
6531         (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
6532         * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
6533         __builtin_ia32_vfnmsubpd.
6534         (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
6535         (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
6536         (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
6537         (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
6538         (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
6539         * config/i386/i386-builtin.def: Add
6540         __builtin_ia32_vfnmsubpd256_mask,
6541         __builtin_ia32_vfnmsubpd256_maskz,
6542         __builtin_ia32_vfnmsubpd128_mask,
6543         __builtin_ia32_vfnmsubpd128_maskz,
6544         __builtin_ia32_vfnmsubps256_mask,
6545         __builtin_ia32_vfnmsubps256_maskz,
6546         __builtin_ia32_vfnmsubps128_mask,
6547         __builtin_ia32_vfnmsubps128_maskz,
6548         __builtin_ia32_vfnmsubpd512_mask,
6549         __builtin_ia32_vfnmsubpd512_maskz,
6550         __builtin_ia32_vfnmsubps512_mask,
6551         __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
6552         __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
6553         __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
6554         __builtin_ia32_vfnmsubpd256.
6555         * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
6556         (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
6557         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
6558         Likewise.
6559         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
6560         Likewise.
6561         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
6562         Likewise.
6563         (fmai_vmfnmsub_<mode><round_name>): Likewise.
6565 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
6567         PR target/72782
6568         * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
6569         __builtin_ia32_vfnmaddpd512_mask.
6570         (_mm512_mask_fnmadd_round_pd): Likewise.
6571         (_mm512_fnmadd_pd): Likewise.
6572         (_mm512_mask_fnmadd_pd): Likewise.
6573         (_mm512_maskz_fnmadd_round_pd): Use
6574         __builtin_ia32_vfnmaddpd512_maskz.
6575         (_mm512_maskz_fnmadd_pd): Likewise.
6576         (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
6577         (_mm512_mask_fnmadd_round_ps): Likewise.
6578         (_mm512_fnmadd_ps): Likewise.
6579         (_mm512_mask_fnmadd_ps): Likewise.
6580         (_mm512_maskz_fnmadd_round_ps): Use
6581         __builtin_ia32_vfnmaddps512_maskz.
6582         (_mm512_maskz_fnmadd_ps): Likewise.
6583         * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
6584         __builtin_ia32_vfnmaddpd256_mask.
6585         (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
6586         (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
6587         (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
6588         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
6589         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
6590         (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
6591         (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
6592         (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
6593         * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
6594         __builtin_ia32_vfnmaddpd.
6595         (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
6596         (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
6597         (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
6598         (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
6599         (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
6600         * config/i386/i386-builtin.def: Add
6601         __builtin_ia32_vfnmaddpd256_mask,
6602         __builtin_ia32_vfnmaddpd256_maskz,
6603         __builtin_ia32_vfnmaddpd128_mask,
6604         __builtin_ia32_vfnmaddpd128_maskz,
6605         __builtin_ia32_vfnmaddps256_mask,
6606         __builtin_ia32_vfnmaddps256_maskz,
6607         __builtin_ia32_vfnmaddps128_mask,
6608         __builtin_ia32_vfnmaddps128_maskz,
6609         __builtin_ia32_vfnmaddpd512_mask,
6610         __builtin_ia32_vfnmaddpd512_maskz,
6611         __builtin_ia32_vfnmaddps512_mask,
6612         __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
6613         __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
6614         __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
6615         __builtin_ia32_vfnmaddpd256.
6616         * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
6617         (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
6618         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
6619         Likewise.
6620         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
6621         Likewise.
6622         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
6623         Likewise.
6624         (fmai_vmfnmadd_<mode><round_name>): Likewise.
6626 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
6628         PR target/72782
6629         * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
6630         __builtin_ia32_vfmsubpd512_mask.
6631         (_mm512_mask_fmsub_round_pd): Likewise.
6632         (_mm512_fmsub_pd): Likewise.
6633         (_mm512_mask_fmsub_pd): Likewise.
6634         (_mm512_maskz_fmsub_round_pd): Use
6635         __builtin_ia32_vfmsubpd512_maskz.
6636         (_mm512_maskz_fmsub_pd): Likewise.
6637         (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
6638         (_mm512_mask_fmsub_round_ps): Likewise.
6639         (_mm512_fmsub_ps): Likewise.
6640         (_mm512_mask_fmsub_ps): Likewise.
6641         (_mm512_maskz_fmsub_round_ps): Use
6642         __builtin_ia32_vfmsubps512_maskz.
6643         (_mm512_maskz_fmsub_ps): Likewise.
6644         * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
6645         __builtin_ia32_vfmsubpd256_mask.
6646         (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
6647         (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
6648         (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
6649         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
6650         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
6651         (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
6652         (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
6653         (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
6654         * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
6655         __builtin_ia32_vfmsubpd.
6656         (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
6657         (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
6658         (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
6659         (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
6660         (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
6661         * config/i386/i386-builtin.def: Add
6662         __builtin_ia32_vfmsubpd256_mask,
6663         __builtin_ia32_vfmsubpd256_maskz,
6664         __builtin_ia32_vfmsubpd128_mask,
6665         __builtin_ia32_vfmsubpd128_maskz,
6666         __builtin_ia32_vfmsubps256_mask,
6667         __builtin_ia32_vfmsubps256_maskz,
6668         __builtin_ia32_vfmsubps128_mask,
6669         __builtin_ia32_vfmsubps128_maskz,
6670         __builtin_ia32_vfmsubpd512_mask,
6671         __builtin_ia32_vfmsubpd512_maskz,
6672         __builtin_ia32_vfmsubps512_mask,
6673         __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
6674         __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
6675         __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
6676         __builtin_ia32_vfmsubpd256.
6677         * config/i386/sse.md (fma4i_fmsub_<mode>): New.
6678         (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
6679         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
6680         Likewise.
6681         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
6682         Likewise.
6683         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
6684         Likewise.
6685         (fmai_vmfmsub_<mode><round_name>): Likewise.
6687 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
6689         * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
6690         Remove plus.  Renamed to ...
6691         (*sub<mode>3<mask_name>_bcst): This.
6692         (*add<mode>3<mask_name>_bcst_2): Renamede to ...
6693         (*add<mode>3<mask_name>_bcst): This.
6695 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
6697         PR target/72782
6698         * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
6700 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
6702         PR target/87662
6703         * i386/avx512vlintrin.h (_mm256_or_epi32): New.
6704         (_mm_or_epi32): Likewise.
6705         (_mm256_xor_epi32): Likewise.
6706         (_mm_xor_epi32): Likewise.
6707         (_mm256_or_epi64): Likewise.
6708         (_mm_or_epi64): Likewise.
6709         (_mm256_xor_epi64): Likewise.
6710         (_mm_xor_epi64): Likewise.
6712 2018-10-20  H.J. Lu  <hongjiu.lu@intel.com>
6714         PR target/72782
6715         * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
6717 2018-10-20  Jakub Jelinek  <jakub@redhat.com>
6719         PR middle-end/87647
6720         * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
6722 2018-10-20  Andreas Schwab  <schwab@linux-m68k.org>
6724         * doc/ux.texi: Move @section directly after @node.
6726 2018-10-19  Jakub Jelinek  <jakub@redhat.com>
6728         PR middle-end/85488
6729         PR middle-end/87649
6730         * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
6731         depend closely nested inside of loop with ordered clause with
6732         a parameter.
6734 2018-10-19  David Malcolm  <dmalcolm@redhat.com>
6736         * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
6737         * doc/gccint.texi: Include ux.texi and use it in top-level menu.
6738         * doc/ux.texi: New file.
6740 2018-10-19  Segher Boessenkool  <segher@kernel.crashing.org>
6742         * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
6743         be the first CR field allocated.
6745 2018-10-19  Richard Biener  <rguenther@suse.de>
6747         PR target/87657
6748         * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
6749         TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
6751 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
6753         PR target/72782
6754         * config/i386/sse.md
6755         (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
6756         (*add<mode>3<mask_name>_bcst_2): Likewise.
6758 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
6760         * config/i386/sse.md
6761         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
6762         Replace nonimmediate_operand with register_operand.
6763         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
6764         Likewise.
6765         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
6766         Likewise.
6768 2018-10-19  Ilya Leoshkevich  <iii@linux.ibm.com>
6770         PR rtl-optimization/87596
6771         * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
6772         lra_get_insn_recog_data () instead of lra_insn_recog_data[]
6773         for instructions in FROM..TO range.
6775 2018-10-19  Eric Botcazou  <ebotcazou@adacore.com>
6777         * cfgexpand.c (expand_one_var): Use specific wording in error message
6778         for non-local frame variables.
6779         * stor-layout.c (layout_decl): Do not issue a warning for them.
6781 2018-10-19  Robin Dapp  <rdapp@linux.ibm.com>
6783         * haifa-sched.c (priority): Add force_recompute parameter.
6784         (apply_replacement): Call priority () with force_recompute = true.
6785         (restore_pattern): Likewise.
6787 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
6789         * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
6790         HOST_BITS_PER_WIDE_INT.
6791         (test_vector_ops_duplicate): Likewise.
6793 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
6795         PR target/72782
6796         * config/i386/sse.md (VF_AVX512): New.
6797         (avx512bcst): Likewise.
6798         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
6799         Likewise.
6800         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
6801         Likewise.
6802         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
6803         Likewise.
6805 2018-10-18  Jonathan Wakely  <jwakely@redhat.com>
6807         * doc/invoke.texi (-dumpversion): Improve grammar.
6808         (-dumpfullversion): Make more consistent with -dumpversion.
6810 2018-10-18  Uros Bizjak  <ubizjak@gmail.com>
6812         * config/i386/i386.c (ix86_emit_fp_unordered_jump):
6813         Set JUMP_LABEL to the jump insn.
6814         (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
6815         Predict emitted jump and add label to jump insn.
6817 2018-10-18  David Malcolm  <dmalcolm@redhat.com>
6819         PR tree-optimization/87562
6820         * input.c (get_substring_ranges_for_loc): Use
6821         LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
6822         getting the linemap for the endpoint.  Verify that it's either
6823         in the same linemap as the start point's spelling location, or
6824         at least in the same file.
6826 2018-10-18  Richard Biener  <rguenther@suse.de>
6828         * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
6829         feed width-specific load/store costs through ix86_vec_cost.
6830         * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
6831         (k8_cost): Likewise.
6832         (bdver_cost): Likewise.
6833         (znver1_cost): Likewise.
6834         (btver1_cost): Likewise.
6835         (btver2_cost): Likewise.
6837 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
6839         * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
6840         to simplify subreg of vec_merge.
6842 2018-10-18  Richard Biener  <rguenther@suse.de>
6844         * config/i386/i386.c: Fix costing of vector FMA.
6846 2018-10-18  Richard Biener  <rguenther@suse.de>
6848         * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
6849         and argument.
6850         (ix86_builtin_vectorization_cost): For vec_construct properly
6851         cost insertion into SSE regs.
6852         (...): Adjust calls to ix86_vec_cost.
6854 2018-10-18  Richard Biener  <rguenther@suse.de>
6856         PR middle-end/87087
6857         Revert
6858         2018-02-07  Richard Biener  <rguenther@suse.de>
6860         PR tree-optimization/84204
6861         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
6862         this place.
6864 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
6866         PR target/87537
6867         * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
6868         of vec_duplicate.
6869         (test_vector_ops_duplicate): Add test for a scalar subreg of a
6870         VEC_MERGE of a VEC_DUPLICATE.
6872 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
6874         * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
6875         * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
6876         * doc/standards.texi (C Language): Document C2X.
6877         * dwarf2out.c (highest_c_language), config/rl78/rl78.c
6878         (rl78_option_override): Handle "GNU C2X" language name.
6880 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
6882         * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
6883         Document C17 as published in 2018.
6885 2018-10-17  Eric Botcazou  <ebotcazou@adacore.com>
6887         PR middle-end/87623
6888         * fold-const.c (fold_truth_andor_1): If the right side is not constant,
6889         bail out if both sides do not have the same storage order.
6891 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
6893         * bitmap.c (bitmap_head::dump): New.
6894         * bitmap.h (bitmap_head): Add dump().
6895         * gimple-ssa-evrp-analyze.c
6896         (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
6897         (evrp_range_analyzer::set_ssa_range_info): Same.
6898         (evrp_range_analyzer::record_ranges_from_phis): Same.
6899         (evrp_range_analyzer::record_ranges_from_stmt): Same.
6900         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
6901         * gimple-ssa-sprintf.c (get_int_range): Same.
6902         (format_integer): Same.
6903         (sprintf_dom_walker::handle_gimple_call): Same.
6904         * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
6905         (ipcp_vr_lattice::top_p): Same.
6906         (ipcp_vr_lattice::bottom_p): Same.
6907         (ipcp_vr_lattice::set_to_bottom): Same.
6908         (ipa_vr_operation_and_type_effects): Same.
6909         (propagate_vr_across_jump_function): Same.
6910         (ipcp_store_vr_results): Same.
6911         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
6912         (ipa_print_node_jump_functions_for_edge): Same.
6913         (ipa_get_value_range): Same.
6914         (ipa_compute_jump_functions_for_edge): Same.
6915         (ipa_write_jump_function): Same.
6916         * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
6917         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
6918         Same.
6919         * vr-values.c (set_value_range_to_nonnegative): Same.
6920         (set_value_range_to_truthvalue): Same.
6921         (vr_values::get_value_range): Same.
6922         (vr_values::set_defs_to_varying): Same.
6923         (vr_values::update_value_range): Same.
6924         (symbolic_range_based_on_p): Same.
6925         (vr_values::op_with_boolean_value_range_p): Same.
6926         (vr_values::extract_range_for_var_from_comparison_expr): Same.
6927         (vr_values::extract_range_from_ssa_name): Same.
6928         (vr_values::extract_range_from_binary_expr): Same.
6929         (vr_values::extract_range_from_unary_expr): Same.
6930         (vr_values::extract_range_from_cond_expr): Same.
6931         (vr_values::extract_range_from_comparison): Same.
6932         (vr_values::check_for_binary_op_overflow): Same.
6933         (vr_values::extract_range_basic): Same.
6934         (vr_values::extract_range_from_assignment): Same.
6935         (compare_ranges): Same.
6936         (compare_range_with_value): Same.
6937         (vr_values::adjust_range_with_scev): Same.
6938         (vrp_valueize): Same.
6939         (vrp_valueize_1): Same.
6940         (vr_values::get_vr_for_comparison): Same.
6941         (vr_values::compare_name_with_value): Same.
6942         (vr_values::compare_names): Same.
6943         (vr_values::vrp_evaluate_conditional): Same.
6944         (find_case_label_ranges): Same.
6945         (vr_values::vrp_visit_switch_stmt): Same.
6946         (vr_values::extract_range_from_phi_node): Same.
6947         (vr_values::simplify_div_or_mod_using_ranges): Same.
6948         (vr_values::simplify_bit_ops_using_ranges): Same.
6949         (test_for_singularity): Same.
6950         (range_fits_type_p): Same.
6951         (vr_values::simplify_cond_using_ranges_1): Same.
6952         (vr_values::simplify_switch_using_ranges): Same.
6953         (vr_values::simplify_float_conversion_using_ranges): Same.
6954         (vr_values::two_valued_val_range_p): Same.
6955         (vr_values::add_equivalence): Move to value_range::equiv_add.
6956         * vr-values.h (vr_values::add_equivalence): Remove.
6957         (VR_INITIALIZER): Remove.
6958         * tree-vrp.c (value_range::set): New.
6959         (value_range::equiv_add): New.
6960         (value_range::value_range): New.
6961         (value_range::deep_copy): New.
6962         (value_range::check): New.
6963         (value_range::equal_p): New.
6964         (value_range::ignore_equivs_equal_p): New.
6965         (value_range::operator==): New.
6966         (value_range::operator!=): New.
6967         (value_range::symbolic_p): New.
6968         (value_range::numeric_p): New.
6969         (value_range::set_undefined): New.
6970         (value_range::set_varying): New.
6971         (value_range::may_contain_p): New.
6972         (value_range::equiv_clear): New.
6973         (value_range::singleton_p): New.
6974         (value_range::intersect): New.
6975         (value_range::dump): New.
6976         (value_range::set_and_canonicalize): New.
6977         (set_value_range): Adjust for value_range API.
6978         (set_value_range_to_undefined): Same.
6979         (set_value_range_to_varying): Same.
6980         (set_and_canonicalize_value_range): Same.
6981         (set_value_range_to_nonnull): Same.
6982         (set_value_range_to_null): Same.
6983         (range_is_null): Same.
6984         (range_is_nonnull): Same.
6985         (range_int_cst_p): Same.
6986         (range_int_cst_singleton_p): Same.
6987         (symbolic_range_p): Same.
6988         (range_includes_zero_p): Same.
6989         (value_range_constant_singleton): Same.
6990         (vrp_set_zero_nonzero_bits): Same.
6991         (ranges_from_anti_range): Same.
6992         (extract_range_into_wide_ints): Same.
6993         (extract_range_from_multiplicative_op): Same.
6994         (set_value_range_with_overflow): Same.
6995         (extract_range_from_binary_expr_1): Same.
6996         (extract_range_from_unary_expr): Same.
6997         (dump_value_range): Same.
6998         (debug_value_range): Same.
6999         (vrp_prop::check_array_ref): Same.
7000         (vrp_prop::check_mem_ref): Same.
7001         (vrp_prop::vrp_initialize): Same.
7002         (vrp_prop::visit_stmt): Same.
7003         (intersect_ranges): Same.
7004         (vrp_prop::visit_phi): Same.
7005         (vrp_prop::vrp_finalize): Same.
7006         (determine_value_range_1): Same.
7007         (determine_value_range): Same.
7008         (vrp_intersect_ranges_1): Rename to...
7009         (vrp_intersect_1): this.
7010         (vrp_intersect_ranges): Rename to...
7011         (value_range::intersect_helper): ...this.
7012         (vrp_meet_1): Rename to...
7013         (value_range::union_helper): ...this.
7014         (vrp_meet): Rename to...
7015         (value_range::union_): ...this.
7016         (copy_value_range): Remove.
7017         * tree-vrp.h (struct value_range): Rewrite into a proper class.
7018         (value_range::vrtype): New.
7019         (value_range::type): New.
7020         (value_range::equiv): New.
7021         (value_range::min): New.
7022         (value_range::max): New.
7023         (value_range::varying_p): New.
7024         (value_range::undefined_p): New.
7025         (value_range::null_p): New.
7026         (value_range::equiv_add): New.
7027         (copy_value_range): Remove.
7029 2018-10-17  David Malcolm  <dmalcolm@redhat.com>
7031         * Makefile.in (SELFTEST_TARGETS): New.
7032         (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
7033         (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
7034         (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
7035         c/Make-lang.in.
7036         (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
7037         (selftest-c++-gdb, selftest-c++-valgrind): Move to
7038         cp/Make-lang.in.
7039         * configure: Regenerate.
7040         * configure.ac (selftest_languages): New.
7042 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
7044         * tree-vrp.c (extract_range_from_multiplicative_op): Remove
7045         overflow wraps argument.
7046         (extract_range_from_binary_expr_1): Do not pass overflow wraps to
7047         wide_int_range_multiplicative_op.
7048         * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
7049         overflow wraps argument.
7050         (wide_int_range_multiplicative_op): Same.
7051         (wide_int_range_lshift): Same.
7052         (wide_int_range_div): Same.
7053         * wide-int-range.h (wide_int_range_multiplicative_op): Same.
7054         (wide_int_range_lshift): Same.
7055         (wide_int_range_div): Same.
7057 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
7059         * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
7060         use sign as argument.
7061         * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
7062         wide_int_range_shift_undefined_p.
7064 2018-10-16  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7066         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
7067         Rename to...
7068         (@despeculate_copy<ALLI_TI:mode>): ... This.
7069         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
7070         switch statement.
7072 2018-10-16  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7074         * config.gcc: Obsolete *-*-solaris2.10*.
7075         * doc/install.texi (Specific, *-*-solaris2*): Document it.
7077 2018-10-12  Jeff Law  <law@redhat.com>
7079         * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
7080         reg + sym +- const_int addressing modes.
7082 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
7084         * common.opt (fdiagnostics-minimum-margin-width=): New option.
7085         * diagnostic-show-locus.c (layout::layout): Apply the minimum
7086         margin width.
7087         (layout::start_annotation_line): Only print up to 3 of the
7088         margin character, to avoid touching the left-hand side.
7089         (selftest::test_diagnostic_show_locus_fixit_lines): Update for
7090         minimum margin width, as set by test_diagnostic_context's ctor.
7091         (selftest::test_fixit_insert_containing_newline): Likewise.
7092         (selftest::test_fixit_insert_containing_newline_2): Likewise.
7093         (selftest::test_line_numbers_multiline_range): Clear
7094         dc.min_margin_width.
7095         * diagnostic.c (diagnostic_initialize): Initialize
7096         min_margin_width.
7097         * diagnostic.h (struct diagnostic_context): Add field
7098         "min_margin_width".
7099         * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
7100         * opts.c (common_handle_option): Handle
7101         OPT_fdiagnostics_minimum_margin_width_.
7102         * selftest-diagnostic.c
7103         (selftest::test_diagnostic_context::test_diagnostic_context):
7104         Initialize min_margin_width to 6.
7105         * toplev.c (general_init): Initialize global_dc->min_margin_width.
7107 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
7109         * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
7110         Fix usage of "error_at_rich_loc" in the comment.
7112 2018-10-15  Renlin Li  <renlin.li@arm.com>
7114         PR target/87563
7115         * tree-vectorizer.c (try_vectorize_loop_1): Don't use
7116         if-conversioned loop when it contains ifn with types not
7117         supported by backend.
7118         * internal-fn.c (expand_direct_optab_fn): Add an assert.
7119         (direct_internal_fn_supported_p): New helper function.
7120         * internal-fn.h (direct_internal_fn_supported_p): Declare.
7122 2018-10-15  Jakub Jelinek  <jakub@redhat.com>
7124         PR target/87572
7125         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
7126         Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
7127         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
7129 2018-10-15  Bin Cheng  <bin.cheng@linux.alibaba.com>
7131         PR tree-optimization/87022
7132         * tree-loop-distribution.c (pg_add_dependence_edges): Check all
7133         bits in dist vector rather than the first one.
7135 2018-10-15  Richard Biener  <rguenther@suse.de>
7137         PR middle-end/87610
7138         * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
7139         (visit_loadstore): When a used restrict tag escaped verify that
7140         the points-to solution of "other" pointers do not include
7141         escaped.
7142         (compute_dependence_clique): If a used restrict tag escaped
7143         communicated that down to visit_loadstore.
7145 2018-10-15  Andreas Krebbel  <krebbel@linux.ibm.com>
7147         * config/s390/s390.c (s390_expand_vec_init): Force vector element
7148         into reg if it isn't a general operand.
7150 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
7152         PR target/87599
7153         * config/i386/sse.md (*vec_dupv2di): Add register source to
7154         movddup.
7156 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
7158         PR target/87572
7159         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
7160         Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
7161         OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
7162         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
7164 2018-10-13  Eric Botcazou  <ebotcazou@adacore.com>
7166         * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
7167         (notice_args_size): Set it in the current trace if no insn that can
7168         throw internally has been seen yet.
7169         (connect_traces): When connecting args_size between traces, allow the
7170         incoming values not to match if there is an insn setting it before the
7171         first insn that can throw internally; in that case, force the creation
7172         of a CFI note on this latter insn.
7174 2018-10-13  Jonathan Wakely  <jwakely@redhat.com>
7176         * opt-problem.h (opt_wrapper): Use template-argument-list when naming
7177         the base class, because using the injected-class-name was not clearly
7178         specified until DR 176.
7180 2018-10-12  Paul Koning  <ni1d@arrl.net>
7182         * config/pdp11/pdp11.md (doloop_end): New expander.
7183         (doloop_end_insn): renamed from "doloop_end".
7184         (addqi3): New pattern.
7185         (subqi3): New pattern.
7186         * config/pdp11/predicates.md (incdec_operand): New predicate.
7188 2018-10-12  Yury Gribov  <tetra2005@gmail.com>
7190         PR middle-end/81376
7191         * real.c (format_helper::can_represent_integral_type_p): New function
7192         * real.h (format_helper::can_represent_integral_type_p): Ditto.
7193         * match.pd: New pattern.
7195 2018-10-12  Alexandre Oliva <oliva@adacore.com>
7197         * configure.ac: Introduce --enable-large-address-aware
7198         to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
7199         * doc/install.texi: Document it.
7200         * configure, config.in: Rebuilt.
7201         * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
7202         based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
7203         (LINK_SPEC): Insert it.
7204         * config/i386/mingw-w64.h: Likewise.
7206         * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
7208 2018-10-12  Peter Bergner  <bergner@linux.ibm.com>
7210         PR rtl-optimization/87600
7211         * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
7213 2018-10-12  Paul Koning  <ni1d@arrl.net>
7215         * doc/md.texi (doloop_end): Document that the pattern code may
7216         need to check operand mode.
7218 2018-10-12  Wilco Dijkstra  <wdijkstr@arm.com>
7220         * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
7221         to zero-extend between int and floating-point registers.
7222         (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
7223         ldp into floating-point registers.  Add type and arch attributes.
7224         (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
7225         Use f_loads for type attribute.
7227 2018-10-11  Martin Sebor  <msebor@redhat.com>
7229         * doc/extend.texi (attribute packed): Correct typos.
7231 2018-10-11  Martin Sebor  <msebor@redhat.com>
7233         * doc/extend.texi (attribute flatten): Mention interaction with
7234         noinline.
7236 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
7238         PR target/87156
7239         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
7240         Set new_decl virtual flag to zero.
7242 2018-10-11  Martin Sebor  <msebor@redhat.com>
7244         PR middle-end/87593
7245         * doc/extend.texi (attribute format_arg): Discuss using multiple
7246         attributes on a single function.
7248 2018-10-11  Giuliano Belinassi  <giuliano.belinassi@usp.br>
7250         PR tree-optimization/86829
7251         * match.pd (sin (atan (x))): New simplification rules.
7252         (cos (atan (x))): Likewise.
7253         * real.c (build_sinatan_real): New function.
7254         * real.h (build_sinatan_real): Prototype.
7256 2018-10-11  Will Schmidt <will_schmidt@vnet.ibm.com>
7258         * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
7259         function.
7260         (fold_mergeeo_helper): New helper function.
7261         (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
7262         intrinsics.  Correct some whitespace indentation issues.
7264 2018-10-11  Wilco Dijkstra  <wdijkstr@arm.com>
7266         PR target/87511
7267         * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
7268         Use HOST_WIDE_INT_1U for shift.
7270 2018-10-11  Doug Rupp  <rupp@adacore.com>
7271             Olivier Hainque  <hainque@adacore.com>
7273         * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
7274         Pass --relax to the linker for RTPs.
7275         (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
7277 2018-10-11  Andrew Stubbs  <ams@codesourcery.com>
7278             Jan Hubicka  <jh@suse.cz>
7279             Martin Jambor  <mjambor@suse.cz>
7281         * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
7282         the same elements are repeated rather than printing all of them.
7283         * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
7284         "repeated" elements.
7285         * read-rtl-function.c (test_loading_repeat): New function.
7286         (read_rtl_function_c_tests): Call test_loading_repeat.
7287         * rtl-tests.c (test_dumping_repeat): New function.
7288         (rtl_tests_c_tests): Call test_dumping_repeat.
7290 2018-10-11  Richard Biener  <rguenther@suse.de>
7292         * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
7293         bdver?_cost): Unify to ...
7294         (bdver_memcpy, bdver_memset, bdver_cost): ... this.
7295         * config/i386/i386.c (processor_cost_table): Adjust.
7297 2018-10-10  Eric Botcazou  <ebotcazou@adacore.com>
7299         PR middle-end/87574
7300         * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
7301         the thunk when expanding to GIMPLE.
7303 2018-10-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7305         PR bootstrap/87551
7306         * varasm.c (mergeable_string_section): Don't try to move zero-length
7307         strings to the merge section.
7309 2018-10-10  Uros Bizjak  <ubizjak@gmail.com>
7311         PR target/87573
7312         * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
7314 2018-10-10  Jakub Jelinek  <jakub@redhat.com>
7316         PR target/87550
7317         * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
7318         to special_args set.
7320 2018-10-10  Richard Biener  <rguenther@suse.de>
7322         * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
7323         reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
7324         reduc_plus_scal_v4sf): Merge into pattern reducing to half width
7325         and recursing and pattern terminating the recursion on SSE
7326         vector width using ix86_expand_reduc.
7327         (reduc_sminmax_scal_<mode>): Split into part reducing to half
7328         width and recursing and SSE2 vector variant doing the final
7329         reduction with ix86_expand_reduc.
7330         (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
7331         with terminating the recursion at AVX level, splitting that
7332         to SSE there.
7334 2018-10-09  David Malcolm  <dmalcolm@redhat.com>
7336         * genmatch.c (error_cb): Rename to...
7337         (diagnostic_cb): ...this, converting int params to enums.
7338         (fatal_at): Update for renaming.
7339         (warning_at): Likewise.
7340         (main): Likewise.
7341         * input.c (selftest::ebcdic_execution_charset::apply):
7342         Update for renaming of...
7343         (selftest::ebcdic_execution_charset::on_error): ...this, renaming
7344         to...
7345         (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
7346         converting level and reason to enums.
7347         (class selftest::lexer_error_sink): Rename to...
7348         (class selftest::lexer_test_options): ...this, renaming field
7349         "m_errors" to "m_diagnostics".
7350         (selftest::lexer_test_options::apply): Update for renaming of...
7351         (selftest::lexer_test_options::on_error): ...this, renaming to...
7352         (selftest::lexer_test_options::on_diagnostic): ...this
7353         converting level and reason to enums.
7354         (selftest::test_lexer_string_locations_raw_string_unterminated):
7355         Update for renamings.
7356         * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
7357         "reason".
7359 2018-10-09  Paul A. Clarke  <pc@us.ibm.com>
7361         * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
7362         * config/rs6000/pmmintrin.h: New file.
7364 2018-10-09  Eric Botcazou  <ebotcazou@adacore.com>
7366         PR tree-optimization/86659
7367         * gimple-match.h (gimple_match_op constructors): Initialize reverse.
7369 2018-10-09  Richard Biener  <rguenther@suse.de>
7371         PR tree-optimization/63155
7372         * tree-ssa-structalias.c: Include tree-ssa.h.
7373         (get_constraint_for_ssa_var): For undefs return nothing_id.
7374         (find_func_aliases): Cleanup PHI handling.
7376 2018-10-09  Richard Biener  <rguenther@suse.de>
7378         * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
7379         replacements.
7381 2018-10-09  Martin Liska  <mliska@suse.cz>
7383         * asan.c (asan_emit_stack_protection): If a stack variable
7384         is located in a same file as current function, then emit
7385         line info into variable definition string.
7387 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
7389         * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
7390         information.
7392 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
7394         * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
7395         on the thunk.
7397 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
7399         PR tree-optimization/86659
7400         * gimple-match.h (struct gimple_match_op): Add reverse field.
7401         (gimple_match_op::set_op): New overloaded method.
7402         * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
7403         the REF_REVERSE_STORAGE_ORDER flag on the value.
7404         (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
7405         REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
7407 2018-10-08  Richard Sandiford  <richard.sandiford@arm.com>
7409         PR middle-end/63155
7410         * gimple-ssa-backprop.c (backprop::intersect_uses): Use
7411         FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
7413 2018-10-08  H.J. Lu  <hongjiu.lu@intel.com>
7415         PR target/87517
7416         * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
7417         Defined with __builtin_ia32_vfmaddsubpd512_mask.
7419 2018-10-08  Richard Biener  <rguenther@suse.de>
7421         * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
7422         cost the same as AVX128 ones.
7424 2018-10-08  Paul Koning  <ni1d@arrl.net>
7426         * config/pdp11/pdp11-protos.h (output_block_move): Remove.
7427         (expand_block_move): New function.
7428         * config/pdp11/pdp11.c (output_block_move): Remove.
7429         (expand_block_move): New function.
7430         * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
7431         * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
7432         (*movmemhi1): Remove.
7434 2018-10-08  Robin Dapp  <rdapp@linux.ibm.com>
7436         * config/s390/2827.md: Increase latencies for some FP instructions.
7438 2018-10-08  Richard Biener  <rguenther@suse.de>
7440         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
7441         Open a dump scope.
7442         * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
7443         * tree-vectorizer.h (dump_stmt_cost): Adjust.
7444         (add_stmt_cost): Dump return value of the hook.
7446 2018-10-08  Richard Biener  <rguenther@suse.de>
7448         PR tree-optimization/63155
7449         * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
7450         (ssa_propagation_engine::ssa_propagate): Remove redundant
7451         bitmap bit clearing.
7453 2018-10-05  Peter Bergner  <bergner@linux.ibm.com>
7455         PR rtl-optimization/86939
7456         PR rtl-optimization/87479
7457         * ira.h (non_conflicting_reg_copy_p): New prototype.
7458         * ira-lives.c (ignore_reg_for_conflicts): New static variable.
7459         (make_hard_regno_dead): Don't add conflicts for register
7460         ignore_reg_for_conflicts.
7461         (make_object_dead): Likewise.
7462         (non_conflicting_reg_copy_p): New function.
7463         (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
7464         Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
7465         * lra-lives.c (ignore_reg_for_conflicts): New static variable.
7466         (make_hard_regno_dead): Don't add conflicts for register
7467         ignore_reg_for_conflicts.  Remove special conflict handling of
7468         REAL_PIC_OFFSET_TABLE_REGNUM.  Remove now unused argument
7469         check_pic_pseudo_p and update callers.
7470         (mark_pseudo_dead): Don't add conflicts for register
7471         ignore_reg_for_conflicts.
7472         (process_bb_lives): Set ignore_reg_for_conflicts for copies.
7474 2018-10-05  Andrew Waterman  <andrew@sifive.com>
7475             Jim Wilson  <jimw@sifive.com>
7477         * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
7478         Add define_expand.  Add ! HONOR_SNANS check to current pattern.  Add
7479         new pattern using HONOR_SNANS that emits one extra instruction.
7481 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
7483         * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
7484         patterns): Merge SI and DI patterns to a GPR pattern.
7485         (unnamed define_insn and define_split for record form of that): Merge
7486         to a single define_insn_and_split pattern.
7488 2018-10-05  David Malcolm  <dmalcolm@redhat.com>
7490         PR c++/56856
7491         * input.c (expand_location_to_spelling_point): Add param "aspect"
7492         and use rather than hardcoding LOCATION_ASPECT_CARET.
7493         (get_substring_ranges_for_loc): Handle the case of a single token
7494         within a macro expansion.
7495         * input.h (expand_location_to_spelling_point): Add "aspect" param,
7496         defaulting to LOCATION_ASPECT_CARET.
7498 2018-10-05  Paul Koning  <ni1d@arrl.net>
7500         * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
7501         (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
7502         (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
7503         (pdp11_guard_type): New function.
7505 2018-10-05  Paul Koning  <ni1d@arrl.net>
7507         * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
7508         * config/pdp11/pdp11.opt (mfloat32): Remove.
7509         (mfloat64): Remove.
7510         * doc/invoke.texi (pdp11 -mfloat32): Remove:
7511         (pdp11 -mfloat64): Remove.
7513 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
7515         * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
7516         (*cmp<mode>_cc_i387): Ditto.
7517         (*cmpu<mode>_cc_i387): Ditto.
7518         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
7519         * config/i386/i386.c (ix86_expand_fp_compare): Remove
7520         "scratch" argument.
7521         <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
7522         Emit x86_sahf_1 pattern.
7523         (ix86_expand_compare): Update call to ix86_expand_fp_compare.
7524         (ix86_expand_carry_flag_compare): Ditto.
7526 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
7528         * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
7529         to reg_or_0_operand.  Add "C" constraint.
7530         (*cmpxf_cc_i387): Ditto.
7531         (*cmp<mode>_i387): Change operand 2 predicate
7532         to nonimm_or_0_operand.  Add "C" constraint.
7533         (*cmp<mode>_cc_i387): Ditto.
7534         (*cmp<mode>_0_i387): Remove insn pattern.
7535         (*cmp<mode>_0_cc_i387): Ditto.
7537 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
7539         * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
7540         * config/i386/predicates.md (nonimm_or_0_operand): Rename
7541         from vector_move_operand.  Update all uses.
7543 2018-10-05  Martin Sebor  <msebor@redhat.com>
7545         PR tree-optimization/87490
7546         * builtins.c (expand_builtin_strnlen): Handle a null data.decl
7547         consistently.
7549 2018-10-05  Richard Biener  <rguenther@suse.de>
7551         PR tree-optimization/63155
7552         * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
7553         vertical space in dumpfiles.
7554         * tree-ssa-propagate.h
7555         (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
7556         * tree-ssa-propagate.c (cfg_blocks_back): New global.
7557         (ssa_edge_worklist_back): Likewise.
7558         (curr_order): Likewise.
7559         (cfg_blocks_get): Remove abstraction.
7560         (cfg_blocks_add): Likewise.
7561         (cfg_blocks_empty_p): Likewise.
7562         (add_ssa_edge): Add to current or next worklist based on
7563         RPO index.
7564         (add_control_edge): Likewise.
7565         (ssa_propagation_engine::process_ssa_edge_worklist): Fold
7566         into ...
7567         (ssa_propagation_engine::ssa_propagate): ... here.  Unify
7568         iteration from CFG and SSA edge worklist so we process
7569         everything in RPO order, prioritizing forward progress
7570         over iteration.
7571         (ssa_prop_init): Allocate new worklists, do not dump
7572         immediate uses.
7573         (ssa_prop_fini): Free new worklists.
7575 2018-10-05  Richard Biener  <rguenther@suse.de>
7577         * tree-core.h (tree_block::abstract_flag): Remove.
7578         (tree_block::block_num): Make full 32bits.
7579         * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
7580         * tree.h (BLOCK_ABSTRACT): Remove.
7581         * dwarf2out.c (gen_lexical_block_die): Remove dead code
7582         resulting from BLOCK_ABSTRACT being always false.
7583         (gen_inlined_subroutine_die): Likewise.
7584         (gen_block_die): Likewise.
7585         * tree.c (block_ultimate_origin): Likewise.
7586         * tree-pretty-print.c (dump_block_node): Remove code dealing
7587         with BLOCK_ABSTRACT.
7588         * tree-ssa-live.c (dump_scope_block): Likewise.
7589         * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
7590         * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
7592 2018-10-05   Richard Biener  <rguenther@suse.de>
7594         * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
7595         is asked for initialize mode to the component mode of the
7596         vector type.
7598 2018-10-05  H.J. Lu  <hongjiu.lu@intel.com>
7600         PR target/87522
7601         * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
7602         assembler for -mavx.
7603         * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
7605 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
7607         PR target/87509
7608         * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
7609         RS6000_BTM_DFP.
7610         * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
7611         to be DImode.  When using mffscrn, force the operand to a register.
7613 2018-10-04  Uros Bizjak  <ubizjak@gmail.com>
7615         * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
7616         from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
7617         X87MODEF mode iterator.
7618         (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
7619         *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
7620         X87MODEF mode iterator.
7622 2018-10-04  Vinay Kumar  <vinay.kumar@blackfigtech.com>
7624         * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
7625         -Wno-prio-ctor-dtor.
7627 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
7629         * Makefile.in (OBJS): Add opt-problem.o.
7630         * dump-context.h: Include "selftest.h.
7631         (selftest::temp_dump_context): New forward decl.
7632         (class dump_context): Make friend of class
7633         selftest::temp_dump_context.
7634         (dump_context::dump_loc_immediate): New decl.
7635         (class dump_pretty_printer): Move here from dumpfile.c.
7636         (class temp_dump_context): Move to namespace selftest.
7637         (temp_dump_context::temp_dump_context): Add param
7638         "forcibly_enable_dumping".
7639         (selftest::verify_dumped_text):
7640         (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
7641         (selftest::verify_item):
7642         (ASSERT_IS_TEXT): Move here from dumpfile.c.
7643         (ASSERT_IS_TREE): Likewise.
7644         (ASSERT_IS_GIMPLE): Likewise.
7645         * dumpfile.c (dump_context::dump_loc): Move immediate dumping
7646         to...
7647         (dump_context::dump_loc_immediate): ...this new function.
7648         (class dump_pretty_printer): Move to dump-context.h.
7649         (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
7650         (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
7651         (temp_dump_context::temp_dump_context): Move to "selftest"
7652         namespace.  Add param "forcibly_enable_dumping", and use it to
7653         conditionalize the use of m_pp;
7654         (selftest::verify_dumped_text): Make non-static.
7655         (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
7656         (selftest::verify_item): Make non-static.
7657         (ASSERT_IS_TEXT): Move to dump-context.h.
7658         (ASSERT_IS_TREE): Likewise.
7659         (ASSERT_IS_GIMPLE): Likewise.
7660         (selftest::test_capture_of_dump_calls): Pass "true" for new
7661         param of temp_dump_context.
7662         * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
7663         it to MSG_ALL_PRIORITIES.  Update values of TDF_COMPARE_DEBUG and
7664         TDF_COMPARE_DEBUG.
7665         * opt-problem.cc: New file.
7666         * opt-problem.h: New file.
7667         * optinfo-emit-json.cc
7668         (selftest::test_building_json_from_dump_calls): Pass "true" for
7669         new param of temp_dump_context.
7670         * optinfo.cc (optinfo_kind_to_dump_flag): New function.
7671         (optinfo::emit_for_opt_problem): New function.
7672         (optinfo::emit): Clarity which emit_item is used.
7673         * optinfo.h (optinfo::get_dump_location): New accessor.
7674         (optinfo::emit_for_opt_problem): New decl.
7675         (optinfo::emit): Make const.
7676         * selftest-run-tests.c (selftest::run_tests): Call
7677         selftest::opt_problem_cc_tests.
7678         * selftest.h (selftest::opt_problem_cc_tests): New decl.
7679         * tree-data-ref.c (dr_analyze_innermost): Convert return type from
7680         bool to opt_result, converting fprintf messages to
7681         opt_result::failure_at calls.  Add "stmt" param for use by the
7682         failure_at calls.
7683         (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
7684         (runtime_alias_check_p): Convert return type from bool to
7685         opt_result, converting dump_printf calls to
7686         opt_result::failure_at, using the statement DDR_A for their
7687         location.
7688         (find_data_references_in_stmt): Convert return type from bool to
7689         opt_result, converting "return false" to opt_result::failure_at
7690         with a new message.
7691         * tree-data-ref.h: Include "opt-problem.h".
7692         (dr_analyze_innermost): Convert return type from bool to opt_result,
7693         and add a const gimple * param.
7694         (find_data_references_in_stmt): Convert return type from bool to
7695         opt_result.
7696         (runtime_alias_check_p): Likewise.
7697         * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
7698         dr_analyze_innermost.
7699         * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
7700         Convert return type from bool to opt_result, adding a message for
7701         the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
7702         (vect_analyze_data_ref_dependence): Convert return type from bool
7703         to opt_result.  Change sense of return type from "false"
7704         effectively meaning "no problems" to "false" meaning a problem,
7705         so that "return false" becomes "return opt_result::success".
7706         Convert "return true" calls to opt_result::failure_at, using
7707         the location of statement A rather than vect_location.
7708         (vect_analyze_data_ref_dependences): Convert return type from bool
7709         to opt_result.
7710         (verify_data_ref_alignment): Likewise, converting dump_printf_loc
7711         calls to opt_result::failure_at, using the stmt location rather
7712         than vect_location.
7713         (vect_verify_datarefs_alignment): Convert return type from bool
7714         to opt_result.
7715         (vect_enhance_data_refs_alignment): Likewise.  Split local "stat"
7716         into multiple more-tightly-scoped copies.
7717         (vect_analyze_data_refs_alignment): Convert return type from bool
7718         to opt_result.
7719         (vect_analyze_data_ref_accesses): Likewise, converting a
7720         "return false" to a "return opt_result::failure_at", adding a
7721         new message.
7722         (vect_prune_runtime_alias_test_list): Convert return type from
7723         bool to opt_result, converting dump_printf_loc to
7724         opt_result::failure_at.  Add a %G to show the pertinent statement,
7725         and use the stmt's location rather than vect_location.
7726         (vect_find_stmt_data_reference): Convert return type from
7727         bool to opt_result, converting dump_printf_loc to
7728         opt_result::failure_at, using stmt's location.
7729         (vect_analyze_data_refs):  Convert return type from bool to
7730         opt_result.  Convert "return false" to "return
7731         opt_result::failure_at", adding messages as needed.
7732         * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
7733         type from bool to opt_result.
7734         (vect_determine_vf_for_stmt): Likewise.
7735         (vect_determine_vectorization_factor): Likewise, converting
7736         dump_printf_loc to opt_result::failure_at, using location of phi
7737         rather than vect_location.
7738         (vect_analyze_loop_form_1): Convert return type from bool to
7739         opt_result, converting dump_printf_loc calls, retaining the use of
7740         vect_location.
7741         (vect_analyze_loop_form): Convert return type from loop_vec_info
7742         to opt_loop_vec_info.
7743         (vect_analyze_loop_operations): Convert return type from bool to
7744         opt_result, converting dump_printf_loc calls, using the location
7745         of phi/stmt rather than vect_location where available.  Convert
7746         various "return false" to "return opt_result::failure_at" with
7747         "unsupported phi" messages.
7748         (vect_get_datarefs_in_loop): Convert return type from bool to
7749         opt_result.  Add a message for the
7750         PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
7751         (vect_analyze_loop_2): Convert return type from bool to
7752         opt_result.  Ensure "ok" is set to a opt_result::failure_at before
7753         each "goto again;", adding new messages where needed.
7754         Add "unsupported grouped {store|load}" messages.
7755         (vect_analyze_loop): Convert return type from loop_vec_info to
7756         opt_loop_vec_info.
7757         * tree-vect-slp.c (vect_analyze_slp): Convert return type from
7758         bool to opt_result.
7759         * tree-vect-stmts.c (process_use): Likewise, converting
7760         dump_printf_loc call and using stmt location, rather than
7761         vect_location.
7762         (vect_mark_stmts_to_be_vectorized): Likeise.
7763         (vect_analyze_stmt): Likewise, adding a %G.
7764         (vect_get_vector_types_for_stmt): Convert return type from bool to
7765         opt_result, converting dump_printf_loc calls and using stmt
7766         location, rather than vect_location.
7767         (vect_get_mask_type_for_stmt): Convert return type from tree to
7768         opt_tree, converting dump_printf_loc calls and using stmt location.
7769         * tree-vectorizer.c: Include "opt-problem.h.
7770         (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
7771         MSG_PRIORITY_INTERNALS.  Convert local "loop_vinfo" from
7772         loop_vec_info to opt_loop_vec_info.  If if fails, and dumping is
7773         enabled, use it to report at the top level "couldn't vectorize
7774         loop" followed by the problem.
7775         * tree-vectorizer.h (opt_loop_vec_info): New typedef.
7776         (vect_mark_stmts_to_be_vectorized): Convert return type from bool
7777         to opt_result.
7778         (vect_analyze_stmt): Likewise.
7779         (vect_get_vector_types_for_stmt): Likewise.
7780         (tree vect_get_mask_type_for_stmt): Likewise.
7781         (vect_analyze_data_ref_dependences): Likewise.
7782         (vect_enhance_data_refs_alignment): Likewise.
7783         (vect_analyze_data_refs_alignment): Likewise.
7784         (vect_verify_datarefs_alignment): Likewise.
7785         (vect_analyze_data_ref_accesses): Likewise.
7786         (vect_prune_runtime_alias_test_list): Likewise.
7787         (vect_find_stmt_data_reference): Likewise.
7788         (vect_analyze_data_refs): Likewise.
7789         (vect_analyze_loop): Convert return type from loop_vec_info to
7790         opt_loop_vec_info.
7791         (vect_analyze_loop_form): Likewise.
7792         (vect_analyze_slp): Convert return type from bool to opt_result.
7794 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
7796         * doc/invoke.texi (-fopt-info): Document new "internals"
7797         sub-option.
7798         * dump-context.h (dump_context::apply_dump_filter_p): New decl.
7799         * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
7800         MSG_ALL_KINDS.
7801         (optinfo_verbosity_options): Add "internals".
7802         (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
7803         (dump_context::apply_dump_filter_p): New member function.
7804         (dump_context::dump_loc): Use apply_dump_filter_p rather than
7805         explicitly masking the dump_kind.
7806         (dump_context::begin_scope): Increment the scope depth first.  Use
7807         apply_dump_filter_p rather than explicitly masking the dump_kind.
7808         (dump_context::emit_item): Use apply_dump_filter_p rather than
7809         explicitly masking the dump_kind.
7810         (dump_dec): Likewise.
7811         (dump_hex): Likewise.
7812         (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
7813         (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
7814         (opt_info_switch_p): Update handling of default
7815         MSG_OPTIMIZED_LOCATIONS to cope with default of
7816         MSG_PRIORITY_USER_FACING.
7817         (dump_basic_block): Use apply_dump_filter_p rather than explicitly
7818         masking the dump_kind.
7819         (selftest::test_capture_of_dump_calls): Update test_dump_context
7820         instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
7821         than MSG_ALL.  Generalize scope test to be run at all four
7822         combinations of with/without MSG_PRIORITY_USER_FACING and
7823         MSG_PRIORITY_INTERNALS, adding examples of explicit priority
7824         for each of the two values.
7825         * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
7826         Rename MSG_ALL to MSG_ALL_KINDS.  Add MSG_PRIORITY_USER_FACING,
7827         MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
7828         values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
7829         (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
7830         with MSG_PRIORITY_*.
7831         * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
7832         dump messages as MSG_PRIORITY_USER_FACING.
7833         * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
7834         about the interaction with MSG_PRIORITY_*.
7836 2018-10-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7838         * varasm.c (output_constant): Add new parameter merge_strings.
7839         Make strings properly zero terminated in merge string sections.
7840         (mergeable_string_section): Don't fail if the last char is non-zero.
7841         (assemble_variable_contents): Handle merge string sections.
7842         (assemble_variable): Likewise.
7843         (assemble_constant_contents): Likewise.
7844         (output_constant_def_contents): Likewise.
7845         (output_constructor_array_range,
7846         output_constructor_regular_field): Adjust call to output_constant.
7847         (output_object_block): Adjust call to assemble_constant_contents
7848         and assemble_variable_contents.
7850 2018-10-04  Martin Liska  <mliska@suse.cz>
7852         PR c/87483
7853         * cgraphunit.c (process_function_and_variable_attributes):
7854         Warn about a function with alias attribute and a body.
7856 2018-10-04  Martin Liska  <mliska@suse.cz>
7858         PR ipa/82625
7859         * multiple_target.c (redirect_to_specific_clone): New function.
7860         (ipa_target_clone): Use it.
7861         * tree-inline.c: Fix comment.
7863 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
7865         * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
7866         fields.
7867         (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
7868         (gcc::dump_manager::register_pass): New member function, adapted
7869         from loop body in gcc::pass_manager::register_pass, adding a
7870         call to update_dfi_for_opt_info.
7871         (gcc::dump_manager::opt_info_enable_passes): Store the
7872         -fopt-info options into the new fields.  Move the loop
7873         bodies into...
7874         (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
7875         function.
7876         * dumpfile.h (struct opt_pass): New forward decl.
7877         (gcc::dump_manager::register_pass): New decl.
7878         (gcc::dump_manager::update_dfi_for_opt_info): New decl.
7879         (class gcc::dump_manager): Add fields "m_optgroup_flags",
7880         "m_optinfo_flags", and "m_optinfo_filename".
7881         * passes.c (gcc::pass_manager::register_pass): Move all of the
7882         dump-handling code to gcc::dump_manager::register_pass.
7884 2018-10-04  Peter Bergner  <bergner@linux.ibm.com>
7886         PR rtl-optimization/87466
7887         * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
7888         * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
7889         * doc/tm.texi: Regenerate.
7890         * ira-lives.c (process_bb_node_lives): Use the new target hook.
7891         * lra-lives.c (process_bb_lives): Likewise.
7892         * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
7893         Define.
7895 2018-10-04  Tamar Christina  <tamar.christina@arm.com>
7897         * params.c (add_params): Fix initialization.
7899 2018-10-04  Martin Liska  <mliska@suse.cz>
7901         PR gcov-profile/84107
7902         * tree-profile.c (init_ic_make_global_vars):
7903         Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
7904         Come up with new ic_tuple* variables.  Emit
7905         __gcov_indirect_call{,_topn} variables.
7906         (gimple_gen_ic_profiler): Access the variable
7907         and emit gimple.
7908         (gimple_gen_ic_func_profiler): Access
7909         __gcov_indirect_call.callee field.
7910         (gimple_init_gcov_profiler): Use ptr_type_node.
7911         * value-prof.c (gimple_ic): Use ptr_type_node.
7913 2018-10-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
7915         PR tree-optimization/85787
7916         * ipa-pure-const.c (malloc_candidate_p_1): Move most of
7917         malloc_candidate_p into this function and add support for
7918         detecting multiple phis.
7919         (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
7921 2018-10-04  Martin Liska  <mliska@suse.cz>
7923         PR ipa/87491
7924         * ipa-inline.c (inline_to_all_callers_1):
7925         Call ultimate_alias_target for node being inlined.
7927 2018-10-03  Jeff Law  <law@redhat.com>
7929         * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
7930         target's wchar_t.
7931         * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
7932         * tree.h (get_typenode_from_name): Prototype.
7934 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
7936         * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
7937         Change operand 2 predicate to nonimmediate_operand.
7938         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
7940 2018-10-03  Martin Sebor  <msebor@redhat.com>
7941             Jeff Law  <law@redhat.com>
7943         * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
7944         initialize it.
7945         (get_string_length): Detect unterminated arrays.
7946         (format_string): Same.
7947         (format_directive): Warn about unterminated arrays.
7948         (handle_gimple_call): Mark statements with no_warning as needed.
7950 2018-10-03  Jim Wilson  <jimw@sifive.com>
7952         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
7953         also define __riscv_abi_rve.  Delete trailing white space.
7955 2018-10-03  Paul Koning  <ni1d@arrl.net>
7957         Enable LRA register allocator for PDP11.
7958         * config/pdp11/constraints.md (Q): Use define_memory_constraint.
7959         (R): Likewise.
7960         (D): Likewise.
7961         * config/pdp11/pdp11.c (pdp11_lra_p): New function.
7962         * config/pdp11/pdp11.opt (-mlra): New option.
7963         * doc/invoke.texi (PDP-11 Options): Document -mlra.
7965 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
7967         * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
7968         (*<absneg:code>extend<mode>xf2): Ditto.
7970 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
7972         PR tree-optimization/87415
7973         * tree-vrp.c (set_value_range_with_overflow): Special case one bit
7974         precision fields.
7976 2018-10-02  Jeff Law  <law@redhat.com>
7978         * gimple-fold.c (get_range_strlen): Only set *nonstr when
7979         an unterminated string is discovered.  Bubble up range
7980         even for unterminated strings.
7981         (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
7982         indicates the string was not terminated via NONSTR.
7984 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
7986         * tree-vrp.c (extract_range_from_unary_expr): Special case all
7987         pointer conversions.
7988         Do not do anything special for anti-ranges.
7990 2018-10-03  Jérôme Lambourg  <lambourg@adacore.com>
7992         * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
7993         DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
7995 2018-10-03  Martin Liska  <mliska@suse.cz>
7997         PR gcov-profile/86109
7998         * coverage.c (coverage_begin_function): Do not
7999         mark lambdas as artificial.
8000         * tree-core.h (struct GTY): Remove tm_clone_flag
8001         and introduce new lambda_function.
8002         * tree.h (DECL_LAMBDA_FUNCTION): New macro.
8004 2018-10-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
8006         PR target/87474
8007         * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
8008         P8_VECTOR and VSX are enabled.
8010 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
8012         * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
8013         0x3907 as CPU model number.
8015 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
8017         * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
8018         * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
8019         PF_Z14.  Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
8020         TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
8021         TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
8022         * config/s390/s390.md: Likewise. Rename also the cpu attribute
8023         value from arch12 to z14.
8025 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
8027         * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
8028         (isinfxf2): Ditto.
8029         (isinf<mode>2): Ditto.
8031 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
8033         * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
8034         before emitting fxam.  Perform calculations in XFmode.
8036 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
8038         * match.pd (((X /[ex] A) +- B) * A): New transformation.
8040 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
8042         PR middle-end/87319
8043         * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
8044         * tree.c (signed_or_unsigned_type_for): Handle complex.
8046 2018-10-02  Jeff Law  <law@redhat.com>
8048         * gimple-fold.c (get_range_strlen): Remove dead code.
8050 2018-10-02  Martin Sebor  <msebor@redhat.com>
8051             Jeff Law  <law@redhat.com>
8053         * builtins.c (unterminated_array): Add new arguments.
8054         If argument is not terminated, bubble up size and exact
8055         state to callers.
8056         (expand_builtin_strnlen): Detect, avoid expanding
8057         and diagnose unterminated arrays.
8058         (c_strlen): Fill in offset of start of unterminated strings.
8059         * builtins.h (unterminated_array): Update prototype.
8061 2018-10-02  Richard Biener  <rguenther@suse.de>
8063         * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
8064         of haddv4df, first reduce to SSE width and exploit the fact
8065         that we only need element zero with the reduction result.
8066         (reduc_plus_scal_v2df): Likewise.
8068 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
8070         * dojump.h (do_jump): Delete.
8071         (do_jump_1): Likewise.
8072         (split_comparison): Move around.
8073         * dojump.c (do_jump): Make static.
8074         (do_jump_1): Likewise.
8075         (jumpifnot): Move around.
8076         (jumpifnot_1): Likewise.
8077         (jumpif): Likewise.
8078         (jumpif_1): Likewise.
8079         * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
8081 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
8083         * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
8084         insns in the delay slot and add_insn_after for the jump insn.
8086 2018-10-02  Richard Biener  <rguenther@suse.de>
8088         * tree-inline.c (expand_call_inline): Use the location of
8089         the callee declaration for the inline-entry marker.
8090         * final.c (notice_source_line): Remove special-casing of
8091         NOTE_INSN_INLINE_ENTRY.
8093 2018-10-01  Carl Love  <cel@us.ibm.com>
8095         PR 69431
8096         * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
8097         (__builtin_mtfsb0): New.
8098         (__builtin_mtfsb1): New.
8099         ( __builtin_set_fpscr_rn): New.
8100         (__builtin_set_fpscr_drn): New.
8101         * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
8102         (rs6000_expand_set_fpscr_rn_builtin): Add.
8103         (rs6000_expand_set_fpscr_drn_builtin): Add.
8104         (rs6000_expand_builtin): Add case statement entries for
8105         RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
8106         RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
8107         RS6000_BUILTIN_MFFSL.
8108         (rs6000_init_builtins): Add ftype initialization and def_builtin
8109         calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
8110         __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
8111         * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
8112         rs6000_mffscdrn): Add define_insn.
8113         (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
8114         * doc/extend.texi: Add documentation for the builtins.
8116 2018-10-01  Richard Biener  <rguenther@suse.de>
8118         PR tree-optimization/87465
8119         * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
8120         causing branch miscounts.
8122 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
8124         * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
8125         aarch64_option_default_param):  New.
8126         (params.h): Include.
8127         (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
8128         * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
8129         stack-clash protection validation code.
8131 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
8133         * params.c (validate_param): New.
8134         (add_params): Use it.
8135         (set_param_value): Refactor param validation into validate_param.
8136         (diagnostic.h): Include.
8137         * diagnostic.h (diagnostic_ready_p): New.
8139 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
8141         * params.c (set_param_value):
8142         Add index of parameter being validated.
8143         * common/common-target.def (option_validate_param): New.
8144         * common/common-targhooks.h (default_option_validate_param): New.
8145         * common/common-targhooks.c (default_option_validate_param): New.
8146         * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
8147         * doc/tm.texi: Regenerate.
8149 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
8151         PR target/86486
8152         * config/aarch64/aarch64.c (aarch64_override_options_internal):
8153         Add validation for stack-clash parameters and set defaults.
8155 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
8157         PR target/86486
8158         * configure.ac: Add stack-clash-protection-guard-size.
8159         * doc/install.texi: Document it.
8160         * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
8161         * params.def: Update comment for guard-size.
8162         (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
8163         PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
8164         * configure: Regenerate.
8166 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
8168         PR target/86486
8169         * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
8170         STACK_DYNAMIC_OFFSET): New.
8171         * config/aarch64/aarch64.c (aarch64_layout_frame):
8172         Update outgoing args size.
8173         (aarch64_stack_clash_protection_alloca_probe_range,
8174         TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
8176 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
8178         PR target/86486
8179         * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
8180         probe ranges.
8181         * target.def (stack_clash_protection_alloca_probe_range): New.
8182         (stack_clash_protection_final_dynamic_probe): Remove.
8183         * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
8184         (default_stack_clash_protection_final_dynamic_probe): Remove.
8185         * targhooks.c: Likewise.
8186         * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
8187         (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
8188         * doc/tm.texi: Regenerate.
8190 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
8192         PR target/86486
8193         * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
8194         * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
8195         aarch64_clamp_to_uimm12_shift): New.
8196         (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
8197         * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
8199 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
8201         PR target/86486
8202         * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
8204 2018-10-01  Jeff Law  <law@redhat.com>
8205             Richard Sandiford <richard.sandiford@linaro.org>
8206             Tamar Christina  <tamar.christina@arm.com>
8208         PR target/86486
8209         * config/aarch64/aarch64.md
8210         (probe_stack_range): Add k (SP) constraint.
8211         * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
8212         STACK_CLASH_MAX_UNROLL_PAGES): New.
8213         * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
8214         stack probes for stack clash.
8215         (aarch64_allocate_and_probe_stack_space): New.
8216         (aarch64_expand_prologue): Use it.
8217         (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
8218         (aarch64_sub_sp): Add emit_move_imm optional param.
8220 2018-10-01  MCC CS <deswurstes@users.noreply.github.com>
8222         PR tree-optimization/87261
8223         * match.pd: Remove trailing whitespace.
8224         Add (x & y) | ~(x | y) -> ~(x ^ y),
8225         (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
8227 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
8229         * config/arc/arc.md (*add_n): Clean up pattern, update instruction
8230         constraints.
8231         (ashlsi3_insn): Update instruction constraints.
8232         (ashrsi3_insn): Likewise.
8233         (rotrsi3): Likewise.
8234         (add_shift): Likewise.
8235         * config/arc/constraints.md (Csz): New 32 bit constraint. It
8236         avoids placing in the limm field small constants which, otherwise,
8237         could end into a small instruction.
8239 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
8241         * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
8242         destination register is not odd-even.
8243         (umaddsidi4_split): Likewise.
8245 2018-10-01  Richard Biener  <rguenther@suse.de>
8247         * tree-inline.c (expand_call_inline): Store origin of fn
8248         in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
8249         * tree.c (block_ultimate_origin): Simplify and do some
8250         checking.
8252 2018-09-30  Uros Bizjak  <ubizjak@gmail.com>
8254         * config/i386/mmx.md (EMMS): New int iterator.
8255         (emms): New int attribute.
8256         (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
8257         EMMS int iterator.  Explicitly declare clobbers.
8258         (mmx_emms): Remove expander.
8259         (mmx_femms): Ditto.
8260         * config/i386/predicates.md (emms_operation): Remove predicate.
8261         (vzeroall_pattern): New predicate.
8262         (vzeroupper_pattern): Rename from vzeroupper_operation.
8263         * config/i386/i386.c (ix86_avx_u128_mode_after): Use
8264         vzeroupper_pattern and vzeroall_pattern predicates.
8266 2018-09-30  Peter Bergner  <bergner@linux.ibm.com>
8268         PR rtl-optimization/86939
8269         * ira-lives.c (make_hard_regno_born): Rename from this...
8270         (make_hard_regno_live): ... to this.  Remove update to conflict
8271         information.  Update function comment.
8272         (make_hard_regno_dead): Add conflict information update.  Update
8273         function comment.
8274         (make_object_born): Rename from this...
8275         (make_object_live): ... to this.  Remove update to conflict information.
8276         Update function comment.
8277         (make_object_dead):  Add conflict information update.  Update function
8278         comment.
8279         (mark_pseudo_regno_live): Call make_object_live.
8280         (mark_pseudo_regno_subword_live): Likewise.
8281         (mark_hard_reg_dead): Update function comment.
8282         (mark_hard_reg_live): Call make_hard_regno_live.
8283         (process_bb_node_lives): Likewise.
8284         * lra-lives.c (make_hard_regno_born): Rename from this...
8285         (make_hard_regno_live): ... to this.  Remove update to conflict
8286         information.  Remove now uneeded check_pic_pseudo_p argument.
8287         Update function comment.
8288         (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
8289         to conflict information.  Update function comment.
8290         (mark_pseudo_live): Remove update to conflict information.  Update
8291         function comment.
8292         (mark_pseudo_dead): Add conflict information update.
8293         (mark_regno_live): Call make_hard_regno_live.
8294         (mark_regno_dead): Call make_hard_regno_dead with new arguement.
8295         (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
8297 2018-09-29  H.J. Lu  <hongjiu.lu@intel.com>
8299         PR target/87370
8300         * config/i386/i386.c (construct_container): Use TImode for
8301         BLKmode values in 2 integer registers.
8303 2018-09-29  Jeff Law  <law@redhat.com>
8305         * builtins.c (unterminated_array): Pass in c_strlen_data * to
8306         c_strlen rather than just a tree *.
8307         (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
8308         Update recursive calls appropriately.  If caller did not provide a
8309         suitable data pointer, create a local one.  When a non-terminated
8310         string is discovered, bubble up information about the string via the
8311         c_strlen_data object.
8312         * builtins.h (c_strlen): Update prototype.
8313         (c_strlen_data): New structure.
8314         * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
8315         For a type 2 call, if c_strlen indicates a non-terminated string
8316         use the length of the non-terminated string.
8317         (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
8319 2018-09-29  Jakub Jelinek  <jakub@redhat.com>
8321         PR target/87467
8322         * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
8323         __m512d type for __A argument rather than __m512.
8325 2018-09-28  John David Anglin  <danglin@gcc.gnu.org>
8327         * match.pd (simple_comparison): Don't optimize if either operand is
8328         a function pointer when target needs function pointer canonicalization.
8330 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
8332         * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
8333         power5 .. power9 to remove indirection.
8334         * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
8335         ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
8336         ASM_CPU_476_SPEC): Delete.
8337         (ASM_CPU_SPEC): Adjust.
8338         (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
8339         asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
8341 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
8343         * config.in: Delete HAVE_AS_DCI.
8344         * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
8345         * config/rs6000/rs6000.h: Ditto.
8346         * configure.ac: Delete HAVE_AS_DCI.
8347         * configure: Regenerate.
8349 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
8351         * config.in (HAVE_AS_LWSYNC): Delete.
8352         * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
8353         * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
8354         do it as a .long .
8355         * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
8356         * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
8357         as a .long .
8358         * configure.ac: Delete HAVE_AS_LWSYNC.
8359         * configure: Regenerate.
8361 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
8362             Pierre-Marie de Rodat  <derodat@adacore.com>
8364         * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
8365         * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
8366         (cgraph_node::create_thunk): Add indirect_offset parameter.
8367         (thunk_adjust): Likewise.
8368         * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
8369         and initialize the corresponding field with it.
8370         (cgraph_node::dump): Dump indirect_offset field.
8371         * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
8372         * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
8373         (thunk_adjust): Add indirect_offset parameter and deal with it.
8374         (cgraph_node::expand_thunk): Deal with the indirect_offset field and
8375         pass it to thunk_adjust.  Do not call the target hook if it's non-zero
8376         or if the thunk is external or local.  Fix formatting.  Do not chain
8377         the RESULT_DECL to BLOCK_VARS.  Pass the static chain to the target,
8378         if any, in the GIMPLE representation.
8379         * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
8380         * lto-cgraph.c (lto_output_node): Write indirect_offset field.
8381         (input_node): Read indirect_offset field.
8382         * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
8383         call to thunk_adjust.
8384         * tree-nested.c (struct nesting_info): Add thunk_p field.
8385         (create_nesting_tree): Set it.
8386         (convert_all_function_calls): Copy static chain from targets to thunks.
8387         (finalize_nesting_tree_1): Return early for thunks.
8388         (unnest_nesting_tree_1): Do not finalize thunks.
8389         (gimplify_all_functions): Do not gimplify thunks.
8391 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
8393         * opt-suggestions.c (option_proposer::build_option_suggestions):
8394         Release "option_values".
8396 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
8398         * coverage.c (get_coverage_counts): Convert problem-reporting dump
8399         messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
8400         * dumpfile.c (kind_as_string): New function.
8401         (dump_loc): Rather than a hardcoded prefix of "note: ", use
8402         kind_as_string to vary the prefix based on dump_kind.
8403         (selftest::test_capture_of_dump_calls): Update for above.
8405 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
8407         * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
8408         (GET_SSE_REGNO): Rename from SSE_REGNO.  Update all uses for rename.
8410 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
8412         * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
8413         * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
8414         INVALID_REGNUM instead of FPSR_REG.
8415         (ix86_md_asm_adjust): Do not clobber FPSR_REG.
8416         * config/i386/i386.md: Update comment of FP compares.
8417         (fldenv): Do not clobber FPSR_REG.
8419 2018-09-28  Richard Biener  <rguenther@suse.de>
8421         * tree.h (BLOCK_ORIGIN): New.
8422         * omp-expand.c (grid_expand_target_grid_body): Assign
8423         BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
8424         * tree-inline.c (remap_block): Likewise.
8425         * auto-profile.c (get_function_decl_from_block): Simplify
8426         by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
8427         * langhooks.c (lhd_print_error_function): Likewise.
8428         * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
8429         Likewise.
8430         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
8431         * tree.c (block_nonartificial_location): Likewise.
8432         (block_ultimate_origin): Likewise.
8433         * tree-pretty-print.c (percent_K_format): Likewise.  Remove
8434         no longer needed LTO case.
8436 2018-09-28  Andrew Stubbs  <ams@codesourcery.com>
8437             Jan Hubicka  <jh@suse.cz>
8438             Martin Jambor  <mjambor@suse.cz>
8440         * simplify-rtx.c (simplify_merge_mask): New function.
8441         (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
8442         same masks are used in op1 or op2.
8443         (test_vec_merge): New function.
8444         (test_vector_ops): Call test_vec_merge.
8446 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
8448         * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
8449         * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
8450         * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
8451         (cypress_costs): Set it.
8452         (supersparc_costs): Likewise.
8453         (hypersparc_costs): Likewise.
8454         (leon_cost): Likewise.
8455         (leon3_costs): Likewise.
8456         (sparclet_costs): Likewise.
8457         (ultrasparc_costs): Likewise.
8458         (ultrasparc_costs): Likewise.
8459         (niagara_costs): Likewise.
8460         (niagara2_costs): Likewise.
8461         (niagara3_costs): Likewise.
8462         (niagara4_costs): Likewise.
8463         (niagara7_costs): Likewise.
8464         (m8_costs): Likewise.
8465         (TARGET_CAN_FOLLOW_JUMP): Define.
8466         (pass_work_around_errata::gate): Minor tweak.
8467         (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
8468         Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
8469         Automaitcally clear MASK_FSMULD mask for V7 processors.
8470         (sparc_can_follow_jump): New static function.
8471         (output_ubranch): Deal with CROSSING_JUMP_P.
8472         (sparc_use_sched_lookahead): Rewrite using switch statement.
8473         (sparc_issue_rate): Reorder.
8474         (sparc_branch_cost): New function.
8476 2018-09-27  Martin Sebor  <msebor@redhat.com>
8478         * tree.h (tree_to_shwi): Add attribute nonnull and pure.
8479         (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
8480         (int_fits_type_p): Same.
8482 2018-09-27  Uros Bizjak  <ubizjak@gmail.com>
8484         * config/i386/i386.md (FPCR_REG): Remove.
8485         (UNSPEC_FLDCW): Remove.
8486         (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
8487         (x86_fldcw_1): Remove insn pattern.
8488         (fnstenv): Do not clobber FPCR_REG.
8489         (fldenv): Ditto.
8490         * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
8491         (CALL_USED_REGISTERS): Ditto.
8492         (REG_ALLOC_ORDER): Ditto.
8493         (REG_CLASS_CONTENTS): Ditto.
8494         (HI_REGISTER_NAMES): Ditto.
8495         (ADDITIONAL_REGISTER_NAMES): Use defines instead
8496         of numerical constants.
8497         * config/i386/i386.c (regclass_map): Remove fpsr register.
8498         (dbx_register_map): Ditto.
8499         (dbx64_register_map): Ditto.
8500         (svr4_dbx_register_map): Ditto.
8501         (print_reg): Do not handle FPCR_REG.
8503 2018-09-27  Segher Boessenkool  <segher@kernel.crashing.org>
8505         PR target/87149
8506         * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
8507         HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
8508         Delete, always treat as true.
8509         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
8510         Ditto.  Simplify remaining code.
8511         * config/powerpcspe/powerpcspe.h: Ditto.
8512         * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
8513         Simplify remaining code.
8514         (rs6000_expand_builtin): Ditto.
8515         * config/rs6000/rs6000.h: Ditto.
8516         * configure.ac: Ditto.
8517         * configure: Regenerate.
8519 2018-09-27  Martin Liska  <mliska@suse.cz>
8521         * coverage.c (get_coverage_counts): Revert the formatting
8522         of missing profile opt info.
8524 2018-09-27  Richard Biener  <rguenther@suse.de>
8526         PR debug/37801
8527         PR debug/87440
8528         * dwarf2out.c (set_block_origin_self): Do not mark outermost
8529         block as we do not output that.
8530         (gen_inlined_subroutine_die): Elide the originally outermost
8531         block, matching what we do for concrete instances.
8532         (decls_for_scope): Add parameter specifying whether to recurse
8533         to subblocks.
8535 2018-09-27  Andrew Stubbs  <ams@codesourcery.com>
8536             Tom de Vries  <tom@codesourcery.com>
8538         PR 82089
8540         * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
8541         STORE_FLAG_VALUE == 1.
8543 2018-09-27  Andreas Krebbel  <krebbel@linux.ibm.com>
8545         * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
8546         constant definitions.
8547         ("tx_assist"): Replace magic number with PPA_TX_ABORT.
8548         ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
8549         ("speculation_barrier"): New expander definition.
8551 2018-09-26  Indu Bhagat  <indu.bhagat@oracle.com>
8553         PR gcov-profile/86957
8554         * common.opt: New warning option -Wmissing-profile.
8555         * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
8556         * doc/invoke.texi: Document -Wmissing-profile.
8558 2018-09-26  Jim Wilson  <jimw@sifive.com>
8560         * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
8561         (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
8563 2018-09-26  Martin Sebor  <msebor@redhat.com>
8565         * tree.c (zerop): Change return type to bool.
8566         (integer_zerop, integer_onep, integer_each_onep): Same.
8567         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
8568         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
8569         (real_onep, real_minus_onep, chain_index): Same.
8570         (print_type_hash_statistics, type_list_equal): Same.
8571         * tree.h (zerop): Same.
8572         (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
8573         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
8574         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
8575         (real_onep, real_minus_onep, chain_index): Same.
8576         (print_type_hash_statistics, type_list_equal): Same.
8578 2018-09-26  Jim Wilson  <jimw@sifive.com>
8580         * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
8582 2018-09-26  Jakub Jelinek  <jakub@redhat.com>
8584         PR target/87414
8585         * config/i386/i386.c: Include debug.h and dwarf2out.h.
8586         (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
8587         call.
8589 2018-09-25  Andrew Stubbs  <ams@codesourcery.com>
8591         * builtins.c (get_builtin_sync_mem): Force address mode conversion.
8593 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
8595         * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
8596         and FP_SECOND_SSE_REGS.
8597         (REG_CLASS_NAMES): Ditto.
8598         (REG_CLASS_CONTENTS): Ditto.
8599         * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
8600         FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
8601         (ix86_preferred_output_reload_class): Ditto.
8602         * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
8603         clobber constraint to "=&f".
8604         (fix_truncdi_i387): Ditto.
8605         (lrintxfdi2): Ditto.
8606         (fistdi2_<rounding>): Ditto.
8607         (fpremxf4_i387): Change "=u" constraint to "=f".
8608         (fprem1xf4_i387): Ditto.
8609         (sincosxf3): Ditto.
8610         (fptanxf4_i387): Ditto.
8611         (fxtractxf3_i387): Ditto.
8612         (fscalexf4_i387): Ditto.
8613         (atan2xf3): Change "u" constraint to "f".
8614         (fyl2xxf3_i387): Ditto.
8615         (fyl2xp1xf3_i387): Ditto.
8617 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
8619         PR target/87439
8620         * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
8621         for removed I387_MASK_PM entity.
8624 2018-09-26  Jeff Law  <law@redhat.com>
8625         Revert
8626         2018-09-26  Alexey Neyman  <stilor@att.net>
8628         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
8629         headers are no longer pulled in by <isl/val.h>.
8631 2018-09-26  Richard Biener  <rguenther@suse.de>
8633         PR debug/87443
8634         * dwarf2out.c (gen_lexical_block_die): Do not equate inline
8635         or concrete instance DIE to the tree.  Create abstract origin
8636         attributes also for concrete instances.
8638 2018-09-26  Alexey Neyman  <stilor@att.net>
8640         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
8641         headers are no longer pulled in by <isl/val.h>.
8643 2018-09-26  Matthew Malcomson  <matthew.malcomson@arm.com>
8645         * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
8646         Use new helper functions.
8647         * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
8648         Use new helper functions.
8649         * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
8650         aarch_mm_needs_release): New declarations.
8651         * config/arm/aarch-common.c (aarch_mm_needs_acquire,
8652         aarch_mm_needs_release): New.
8654 2018-09-26  Eric Botcazou  <ebotcazou@adacore.com>
8656         * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
8657         (arm32_output_mi_thunk): Deal with long calls.
8659 2018-09-26  Richard Biener  <rguenther@suse.de>
8661         PR debug/87428
8662         PR debug/87362
8663         * tree-inline.c (expand_call_inline): When the location
8664         of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
8665         or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
8666         the inserted BLOCK to make inlined_function_outer_scope_p
8667         recognize it.
8668         * dwarf2out.c (add_call_src_coords_attributes): Do not add
8669         coords for reserved locations.
8671 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
8673         * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
8674         (*call_indirect_nonlocal_sysv<mode>): Ditto.
8675         (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
8676         (*sibcall_nonlocal_sysv<mode>): Ditto.
8677         (*sibcall_value_nonlocal_sysv<mode>): Ditto.
8678         (<bd>_<mode>): Ditto.
8679         (<bd>tf_<mode>): Ditto.
8681 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
8683         * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
8684         control string as a list of templates instead of as C code.
8685         (*altivec_movti): Ditto.
8686         * config/rs6000/darwin.md (movdf_low_di): Ditto.
8688 2018-09-25  Jim Wilson  <jimw@sifive.com>
8690         * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
8691         when target symbol is weak.
8693 2018-09-25  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8695         PR c/87387
8696         * builtins.c (unterminated_array): Simplify.
8697         * expr.c (string_constant): Handle SSA_NAME.  Add more exceptions
8698         where pointer arithmetic is safe.
8700 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
8702         PR target/86987
8703         * config/rs6000/altivec.md (altivec_vspltb): Use
8704         const_0_to_15_operand instead of u5bit_cint_operand.
8705         (*altivec_vspltb_internal): Ditto.
8706         (altivec_vspltb_direct): Ditto.
8707         (altivec_vsplth): Use const_0_to_7_operand instead of
8708         u5bit_cint_operand.
8709         (*altivec_vsplth_internal): Ditto.
8710         (altivec_vsplth_direct): Ditto.
8711         (altivec_vspltw): Use const_0_to_3_operand instead of
8712         u5bit_cint_operand.
8713         (*altivec_vspltw_internal): Ditto.
8714         (altivec_vspltw_direct): Ditto.
8715         (altivec_vspltsf): Ditto.
8716         (*altivec_vspltsf_internal): Ditto.
8717         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
8718         various splats with the proper size immediate.  Reorder the various
8719         cases by ascending size of immediate, and put all such together.
8721 2018-09-25  Richard Biener  <rguenther@suse.de>
8723         PR debug/83941
8724         * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
8725         GC-ification.
8726         (maybe_create_die_with_external_ref): Do not create
8727         DW_TAG_imported_unit here.
8728         (add_abstract_origin_attribute): Handle external BLOCK refs.
8729         (dwarf2out_abstract_function): Simplify LTO case.
8730         (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
8731         rather than using maybe_create_die_with_external_ref.
8733 2018-09-25  Uros Bizjak  <ubizjak@gmail.com>
8735         PR target/71278
8736         * config/i386/i386.md (frndintxf2_mask_pm): Remove.
8737         (frndintxf2_mask_pm_i387): Ditto.
8738         (nearbyintxf2): Rewrite expander pattern to match rintxf2.
8739         Enable for !flag_trapping_math.
8740         (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
8741         Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
8742         Change operand 1 predicate to nonimmediate_operand.
8743         (attr "i387_cw"): Remove mask_pm.
8744         * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
8745         (enum ix86_entity): Remove I387_MASK_PM.
8746         * config/i386/i386.c (ix86_i387_mode_needed): Do not
8747         handle I387_MASK_PM.
8748         (ix86_mode_needed): Ditto.
8749         (ix86_mode_after): Ditto.
8750         (ix86_mode_entry): Ditto.
8751         (ix86_mode_exit): Ditto.
8752         (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
8754 2018-09-25  Jakub Jelinek  <jakub@redhat.com>
8756         * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
8757         to_update_switch_stmts to vNULL instead of calling create on them
8758         immediately.
8760 2018-09-25  Richard Biener  <rguenther@suse.de>
8762         PR tree-optimization/87402
8763         * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
8764         (visit_phi): Re-instantiate handling of supposed to be VARYING
8765         but non-VARYING backedge value.
8767 2018-09-25  Richard Biener  <rguenther@suse.de>
8769         PR debug/83941
8770         * dwarf2out.c (struct sym_off_pair): New.
8771         (external_die_map): New global.
8772         (lookup_decl_die): When in LTO create DIEs lazily from the
8773         external_die_map.
8774         (lookup_block_die): New function, create DIEs lazily in LTO.
8775         (equate_block_to_die): New function.
8776         (dwarf2out_die_ref_for_decl): During WPA get the association
8777         from the external DIE map.
8778         (dwarf2out_register_external_die): Record mapping into the
8779         external DIE map.
8780         (maybe_create_die_with_external_ref): New function split out from
8781         DIE generation part of old dwarf2out_register_external_die.
8782         (add_abstract_origin_attribute): Do not return the DIE.  When
8783         in LTO reference externals directly.
8784         (dwarf2out_abstract_function): When in LTO ignore calls for
8785         decls with external DIEs (already present abstract instances).
8786         (gen_call_site_die): Adjust.
8787         (add_high_low_attributes): Likewise.
8788         (gen_lexical_block_die): Likewise.
8789         (gen_inlined_subroutine_die): Likewie.
8790         (gen_block_die): Likewise.
8791         (dwarf2out_inline_entry): Likewise.
8792         (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
8793         DIEs.
8795 2018-09-25  Martin Liska  <mliska@suse.cz>
8797         * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
8798         integers and not by a float value.
8800 2018-09-25  Martin Liska  <mliska@suse.cz>
8802         PR fortran/87394
8803         * dbgcnt.c (dbg_cnt_process_single_pair): Return false
8804         instead of NULL.
8805         * dumpfile.c (dump_enable_all): Remove extra parenthesis.
8806         * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
8807         * godump.c (go_format_type): Remove extra parenthesis.
8809 2018-09-25  Martin Liska  <mliska@suse.cz>
8811         * alias.c (set_dest_equal_p): Remove unused function.
8812         * config/i386/i386.c (def_builtin_pure2): Likewise.
8813         * diagnostic-show-locus.c (class layout): Remove
8814         unused field.
8815         (layout::layout): Likewise here.
8816         * dump-context.h (class temp_dump_context): Likewise.
8817         * dwarf2out.c (add_AT_fde_ref): Remove unused function.
8818         (add_AT_loclistsptr): Likewise.
8819         (add_AT_offset): Likewise.
8820         (get_AT_hi_pc): Likewise.
8821         (is_comdat_die): Likewise.
8822         (type_is_enum): Likewise.
8823         (ceiling): Likewise.
8824         (add_AT_vms_delta): Likewise.
8825         (is_class_die): Likewise.
8826         * edit-context.c (class line_event): Remove unused field.
8827         * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
8828         unused function.
8829         * ipa-cp.c (ipa_get_vr_lat): Likewise.
8830         * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
8831         (ok_for_base_p_nonstrict): Likewise.
8832         * tree-chrec.c (is_not_constant_evolution): Likewise.
8833         (chrec_fold_poly_cst): Likewise.
8834         * tree-if-conv.c (has_pred_critical_p): Likewise.
8835         * tree-ssa-coalesce.c (print_exprs): Likewise.
8836         * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
8837         * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
8838         * tree-vrp.c (value_ranges_intersect_p): Likewise.
8839         (value_range_nonnegative_p): Likewise.
8841 2018-09-25  Martin Liska  <mliska@suse.cz>
8843         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
8844         Do not handle "GNU Pascal".
8845         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
8846         Likewise.
8847         * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
8848         from documentation. Likewise.
8849         * dbxout.c (dbxout_range_type): Likewise.
8850         * doc/cpp.texi: Likewise.
8851         * doc/extend.texi: Likewise.
8852         * doc/frontends.texi: Likewise.
8853         * doc/invoke.texi: Remove Pascal entry.
8854         * tree.def (CLEANUP_POINT_EXPR): Likewise.
8855         * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
8857 2018-09-25  Martin Liska  <mliska@suse.cz>
8859         PR middle-end/86078
8860         * doc/invoke.texi: Document all parameters and remove default
8861         of the parameters.
8863 2018-09-25  Ilya Leoshkevich  <iii@linux.ibm.com>
8865         PR bootstrap/87417
8866         * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
8867         contains HOST_WIDE_INTs when computing its size.
8869 2018-09-24  Jim Wilson  <jimw@sifive.com>
8871         PR target/87391
8872         * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
8873         not TARGET_RVE.
8874         (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
8876 2018-09-24  Andrew Pinski  <apinski@marvell.com>
8878         *  config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
8879         access prev before checking it for NULLness in the
8880         AARCH64_FUSE_CMP_BRANCH case.
8882 2018-09-24  H.J. Lu  <hongjiu.lu@intel.com>
8884         PR target/82699
8885         * config/i386/i386.c (rest_of_insert_endbranch): Set
8886         endbr_queued_at_entrance to true and don't insert ENDBR if
8887         x86_function_profiler will be called.
8888         (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
8889         is true.
8890         * config/i386/i386.h (machine_function): Add
8891         endbr_queued_at_entrance.
8893 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
8895         * genattrtab.c (mk_attr_alt): Use alternative_mask.
8896         (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
8897         types.
8898         (check_attr_test): Use alternative_mask.
8899         (get_attr_value): Likewise.
8900         (compute_alternative_mask): Use alternative_mask and XWINT.
8901         (make_alternative_compare): Use alternative_mask.
8902         (attr_alt_subset_p): Use XWINT.
8903         (attr_alt_subset_of_compl_p): Likewise.
8904         (attr_alt_intersection): Use alternative_mask and XWINT.
8905         (attr_alt_union): Likewise.
8906         (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
8907         (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
8908         (simplify_test_exp): Use alternative_mask and XWINT.
8909         (write_test_expr): Use alternative_mask and XWINT, adjust bit
8910         number calculation to support 64 bits.  Generate code that
8911         checks 64-bit masks.
8912         (main): Use alternative_mask.
8913         * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
8915 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
8917         PR target/80080
8918         * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
8919         RETURN+USE when returning via %r14.
8921 2018-09-24  Martin Liska  <mliska@suse.cz>
8923         * gcov.c (output_lines): Print colorization legend
8924         for both flag_use_colors and flag_use_hotness_colors.
8925         Reword the help.
8927 2018-09-24  Martin Liska  <mliska@suse.cz>
8929         * coverage.c (get_coverage_counts): Use warning_at
8930         with current_function_decl location. Use %qD in warning
8931         message.
8933 2018-09-24  Martin Liska  <mliska@suse.cz>
8935         * memory-block.h (memory_block_pool::release): Annotate with
8936         valgrind that the memory is not accessible.
8938 2018-09-24  Martin Liska  <mliska@suse.cz>
8940         PR sanitizer/85774
8941         * asan.c: Make asan_handled_variables extern.
8942         * asan.h: Likewise.
8943         * cfgexpand.c (expand_stack_vars): Make sure
8944         a representative is unpoison if another
8945         variable in the partition is handled by
8946         use-after-scope sanitization.
8948 2018-09-24  Richard Biener  <rguenther@suse.de>
8950         PR tree-optimization/63155
8951         * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
8952         the worklist when the edge of the respective argument isn't
8953         executable.
8955 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
8957         * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
8958         ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
8959         (MASK_CLASS_P): Update for rename.
8960         (MAYBE_MASK_CLASS_P): Ditto.
8961         (REG_CLASS_NAMES): Update.
8962         (REG_CLASS_CONTENT): Update.
8963         * config/i386/i386.c (regclass_map): Update for MASK_REG
8964         and ALL_MASK_REGS rename.
8965         * config/i386/constraints.md (Yk): Update for rename.
8966         (k): Ditto.
8968 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
8970         * config/i386/i386.h (enum reg_class): Remove
8971         EVEX_SSE_REGS and MOD4_SSE_REGS.
8972         (REG_CLASS_NAMES): Update.
8973         (REG_CLASS_CONTENT): Update.
8974         * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
8975         registers as ALL_SSE_REGS.
8976         (ix86_additional_allocno_class_p): Remove.
8977         (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
8978         (ix86_register_priority): Lower priority of EVEX SSE registers.
8979         Use IN_RANGE macro where appropriate.
8980         (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
8981         AVX-5124VNNIW checks.
8982         (ix86_modes_tieable_p): Tie 512-bit SSE modes.
8983         * config/i386/sse.md (avx5124fmaddps_4fmaddps)
8984         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
8985         (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
8986         (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
8987         (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
8988         (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
8989         (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
8990         (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
8991         (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
8992         (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
8993         * config/i386/constraints.md (Yh): Remove.
8995 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
8997         * config/i386/i386.c (regclass_map): Declare integer REX registers
8998         as GENERAL_REGS.
9000 2018-09-23  Gerald Pfeifer  <gerald@pfeifer.com>
9002         * doc/service.texi (Service): Switch the fsf.org link to https.
9004 2018-09-22  Chung-Ju Wu  <jasonwucj@gmail.com>
9006         PR target/86798
9007         * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9008         Define to speculation_safe_value_not_needed.
9010 2018-09-21  Florian Weimer  <fweimer@redhat.com>
9012         PR middle-end/81035
9013         * doc/extend.texi (Common Function Attributes): Mention that
9014         noreturn suppresses tail call optimization.
9016 2018-09-21  Jeff Law  <law@redhat.com>
9018         * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
9019         vr_values::cleanup_edges_and_switches.
9020         * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
9021         vr_values class.
9022         (identify_jump_threads): Remove EDGE_IGNORE handling.
9023         (execute_vrp): Move handling of to_remove_edges and
9024         to_update_switch_stmts into vr_values class member functions.
9025         * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
9026         (to_update_switch_stmts): Likewise.
9027         * vr-values.c: Include cfghooks.h.
9028         (vr_values::vr_values): Initialize to_remove_edges and
9029         to_update_switch_stmts.
9030         (vr_values::~vr_values): Verify to_remove_edges and
9031         to_update_switch_stmts are empty.
9032         (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
9033         (vr_values::cleanup_edges_and_switches): New member function.
9034         * vr-values.h (vr_values): Add cleanup_edges_and_switches member
9035         function.  Add new data members.
9037 2018-09-21  David Malcolm  <dmalcolm@redhat.com>
9039         PR tree-optimization/87309
9040         * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
9041         calls with pflags and alt_flags.
9042         (selftest::test_capture_of_dump_calls): Add test of interaction of
9043         MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
9045 2018-09-21  Olivier Hainque  <hainque@adacore.com>
9047         * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
9049 2018-09-21  Olivier Hainque  <hainque@adacore.com>
9051         * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
9053 2018-09-21  Olivier Hainque  <hainque@adacore.com>
9055         * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
9056         Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
9057         (VXWORKS_LIBS_RTP): Minor reordering.
9059 2018-09-21  Olivier Hainque  <hainque@adacore.com>
9061         * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
9062         (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
9064 2018-09-21  Olivier Hainque  <hainque@adacore.com>
9066         * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
9067         (PTRDIFF_TYPE): Likewise.
9069 2018-09-21  Olivier Hainque  <hainque@adacore.com>
9071         * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
9072         triplet, similar to support for VxWorks7.
9073         * config/vxworks-dummy.h: Provide a default definition
9074         of TARGET_VXWORKS64 to 0.
9076 2018-09-21  Olivier Hainque  <hainque@adacore.com>
9078         * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
9079         * config/vxworks-dummy.h: here.
9081 2018-09-21  Olivier Hainque  <hainque@adacore.com>
9083         * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
9085 2018-09-21  Shaokun Zhang  <zhangshaokun@hisilicon.com>
9086             Bo Zhou  <zbo.zhou@hisilicon.com>
9088         * config/aarch64/aarch64-cores.def (tsv110): New CPU.
9089         * config/aarch64/aarch64-tune.md: Regenerated.
9090         * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
9091         * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
9092         * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
9094 2018-09-21  Andrew Stubbs  <ams@codesourcery.com>
9095             Julian Brown  <julian@codesourcery.com>
9097         * builtins.c (get_builtin_sync_mem): Handle address spaces.
9099 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
9101         * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
9102         if the call takes a static chain.
9104 2018-09-21  Martin Liska  <mliska@suse.cz>
9106         * auto-profile.c (autofdo_source_profile::read): Do not
9107         set sum_all.
9108         (read_profile): Do not add working sets.
9109         (read_autofdo_file): Remove sum_all.
9110         (afdo_callsite_hot_enough_for_early_inline): Remove const
9111         qualifier.
9112         * coverage.c (struct counts_entry): Remove gcov_summary.
9113         (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
9114         do not support GCOV_TAG_PROGRAM_SUMMARY.
9115         (get_coverage_counts): Remove summary and expected
9116         arguments.
9117         * coverage.h (get_coverage_counts): Likewise.
9118         * doc/gcov-dump.texi: Remove -w option.
9119         * gcov-dump.c (dump_working_sets): Remove.
9120         (main): Do not support '-w' option.
9121         (print_usage): Likewise.
9122         (tag_summary): Likewise.
9123         * gcov-io.c (gcov_write_summary): Do not dump
9124         histogram.
9125         (gcov_read_summary): Likewise.
9126         (gcov_histo_index): Remove.
9127         (gcov_histogram_merge): Likewise.
9128         (compute_working_sets): Likewise.
9129         * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
9130         it not obsolete.
9131         (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
9132         (GCOV_TAG_SUMMARY_LENGTH): Adjust.
9133         (GCOV_HISTOGRAM_SIZE): Remove.
9134         (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
9135         (struct gcov_summary): Simplify rapidly just
9136         to runs and sum_max fields.
9137         (gcov_histo_index): Remove.
9138         (NUM_GCOV_WORKING_SETS): Likewise.
9139         (compute_working_sets): Likewise.
9140         * gcov-tool.c (print_overlap_usage_message): Remove
9141         trailing empty line.
9142         * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
9143         (output_lines): Remove program related line.
9144         * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
9145         * lto-cgraph.c (output_profile_summary): Do not stream GCOV
9146         histogram.
9147         (input_profile_summary): Do not read it.
9148         (merge_profile_summaries): And do not merge it.
9149         (input_symtab): Do not call removed function.
9150         * modulo-sched.c (sms_schedule): Do not print sum_max.
9151         * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
9152         removed when histogram method was invented.
9153         (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
9154         mode.
9155         * postreload-gcse.c (eliminate_partially_redundant_load): Fix
9156         GCOV coding style.
9157         * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
9158         and dump selected value.
9159         * profile.c (add_working_set): Remove.
9160         (get_working_sets): Likewise.
9161         (find_working_set): Likewise.
9162         (get_exec_counts): Do not work with working sets.
9163         (read_profile_edge_counts): Do not inform as sum_max is removed.
9164         (compute_branch_probabilities): Likewise.
9165         (compute_value_histograms): Remove argument for call of
9166         get_coverage_counts.
9167         * profile.h: Do not make gcov_summary const.
9169 2018-09-21  Monk Chiang  <sh.chiang04@gmail.com>
9171         * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
9173 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
9175         PR tree-optimization/86990
9176         * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
9177         Check that the entire merged store group is made of constants only for
9178         overlapping stores.
9180 2018-09-20  Allan Sandfeld Jensen  <allan.jensen@qt.io>
9182         * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
9183         (VTABLE_VERIFICATION_SPEC): Likewise.
9184         (SANITIZER_EARLY_SPEC): Likewise.
9185         (SANITIZER_SPEC): Likewise.
9186         * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
9187         * doc/invoke.texi (Link Options): Document -r.
9189 2018-09-20  Richard Biener <rguenther@suse.de>
9191         PR middle-end/87054
9192         * gimplify.c (gimplify_expr): Retain alignment of
9193         addressable lvalue in dereference.
9195 2018-09-20  Alexandre Oliva <aoliva@redhat.com>
9197         PR bootstrap/87013
9198         * configure.ac: Check for .loc is_stmt support.
9199         * configure, config.in: Rebuilt.
9200         * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
9201         if not supported.
9203 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
9205         * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
9206         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
9207         -misel=no.
9209 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
9211         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
9212         VECTOR_OTHER.
9213         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
9214         case VECTOR_OTHER.
9216 2018-09-20  Marek Polacek  <polacek@redhat.com>
9218         * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
9220 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
9222         PR tree-optimization/87288
9223         * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
9224         into account when determining PEELING_FOR_NITERS.
9226 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
9228         PR tree-optimization/86877
9229         * tree-vect-loop.c (vect_analyze_loop_2): Call
9230         vect_verify_datarefs_alignment.
9232 2018-09-19  Marek Polacek  <polacek@redhat.com>
9234         * doc/invoke.texi: Document -Wclass-conversion.
9236 2018-09-19  John David Anglin  <danglin@gcc.gnu.org>
9238         * config/pa/pa.c (pa_adjust_priority): Delete.
9239         (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
9241         * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
9242         (atomic_storehi): Likewise.
9243         (atomic_storesi): Likewise.
9244         (atomic_loaddi): Restore compare and swap exchange loop code.
9246 2018-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
9248         PR rtl-optimization/86902
9249         * combine.c (try_combine): When changing the CC mode used, don't change
9250         an unrelated mode in other_insn to that new CC mode.
9252 2018-09-19  David Malcolm  <dmalcolm@redhat.com>
9254         * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
9255         with %T in place of calls to dump_generic_expr.
9256         (prune_runtime_alias_test_list): Likewise.
9257         (create_runtime_alias_checks): Likewise.
9258         * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
9259         (vect_analyze_data_ref_dependence): Likewise.
9260         (vect_slp_analyze_data_ref_dependence): Likewise.
9261         (vect_record_base_alignment): Likewise.  Use %G in place of call
9262         to dump_gimple_stmt.
9263         (vect_compute_data_ref_alignment): Likewise.
9264         (verify_data_ref_alignment): Likewise.
9265         (vect_find_same_alignment_drs): Likewise.
9266         (vect_analyze_group_access_1): Likewise.
9267         (vect_analyze_data_ref_accesses): Likewise.
9268         (dependence_distance_ge_vf): Likewise.
9269         (dump_lower_bound): Likewise.
9270         (vect_prune_runtime_alias_test_list): Likewise.
9271         (vect_find_stmt_data_reference): Likewise.
9272         (vect_analyze_data_refs): Likewise.
9273         (vect_create_addr_base_for_vector_ref): Likewise.
9274         (vect_create_data_ref_ptr): Likewise.
9275         * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
9276         (vect_can_advance_ivs_p): Likewise.
9277         (vect_update_ivs_after_vectorizer): Likewise.
9278         (vect_gen_prolog_loop_niters): Likewise.
9279         (vect_prepare_for_masked_peels): Likewise.
9280         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
9281         (vect_determine_vectorization_factor): Likewise.
9282         (vect_is_simple_iv_evolution): Likewise.
9283         (vect_analyze_scalar_cycles_1): Likewise.
9284         (vect_analyze_loop_operations): Likewise.
9285         (report_vect_op): Likewise.
9286         (vect_is_slp_reduction): Likewise.
9287         (check_reduction_path): Likewise.
9288         (vect_is_simple_reduction): Likewise.
9289         (vect_create_epilog_for_reduction): Likewise.
9290         (vect_finalize_reduction:): Likewise.
9291         (vectorizable_induction): Likewise.
9292         (vect_transform_loop_stmt): Likewise.
9293         (vect_transform_loop): Likewise.
9294         (optimize_mask_stores): Likewise.
9295         * tree-vect-patterns.c (vect_pattern_detected): Likewise.
9296         (vect_split_statement): Likewise.
9297         (vect_recog_over_widening_pattern): Likewise.
9298         (vect_recog_average_pattern): Likewise.
9299         (vect_determine_min_output_precision_1): Likewise.
9300         (vect_determine_precisions_from_range): Likewise.
9301         (vect_determine_precisions_from_users): Likewise.
9302         (vect_mark_pattern_stmts): Likewise.
9303         (vect_pattern_recog_1): Likewise.
9304         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
9305         (vect_record_max_nunits): Likewise.
9306         (vect_build_slp_tree_1): Likewise.
9307         (vect_build_slp_tree_2): Likewise.
9308         (vect_print_slp_tree): Likewise.
9309         (vect_analyze_slp_instance): Likewise.
9310         (vect_detect_hybrid_slp_stmts): Likewise.
9311         (vect_detect_hybrid_slp_1): Likewise.
9312         (vect_slp_analyze_operations): Likewise.
9313         (vect_slp_analyze_bb_1): Likewise.
9314         (vect_transform_slp_perm_load): Likewise.
9315         (vect_schedule_slp_instance): Likewise.
9316         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
9317         (vect_mark_stmts_to_be_vectorized): Likewise.
9318         (vect_init_vector_1): Likewise.
9319         (vect_get_vec_def_for_operand): Likewise.
9320         (vect_finish_stmt_generation_1): Likewise.
9321         (vect_check_load_store_mask): Likewise.
9322         (vectorizable_call): Likewise.
9323         (vectorizable_conversion): Likewise.
9324         (vectorizable_operation): Likewise.
9325         (vectorizable_load): Likewise.
9326         (vect_analyze_stmt): Likewise.
9327         (vect_is_simple_use): Likewise.
9328         (vect_get_vector_types_for_stmt): Likewise.
9329         (vect_get_mask_type_for_stmt): Likewise.
9330         * tree-vectorizer.c (increase_alignment): Likewise.
9332 2018-09-19  Andrew Stubbs  <ams@codesourcery.com>
9334         * doc/rtl.texi: Adjust vec_select description.
9335         * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
9336         non-constant selectors.
9338 2018-09-19  Matthew Malcomson  <matthew.malcomson@arm.com>
9340         * config/aarch64/aarch64-protos.h
9341         (aarch64_offset_9bit_signed_unscaled_p): New declaration.
9342         * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
9343         (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
9344         * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
9345         (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
9346         (AARCH64_FL_PROFILE): Move index so flags are ordered.
9347         (AARCH64_ISA_RCPC8_4): New flag.
9348         * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
9349         to aarch64_offset_9bit_signed_unscaled_p.
9350         * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
9351         and use stlur.
9352         * config/aarch64/constraints.md (Ust): New constraint.
9353         * config/aarch64/predicates.md.
9354         (aarch64_9bit_offset_memory_operand): New predicate.
9355         (aarch64_rcpc_memory_operand): New predicate.
9357 2018-09-19  Eric Botcazou  <ebotcazou@adacore.com>
9359         PR rtl-optimization/87361
9360         * rtlanal.c (nonzero_bits1): Revert accidental change.
9362 2018-09-19  Richard Biener  <rguenther@suse.de>
9364         PR tree-optimization/87349
9365         PR tree-optimization/87342
9366         * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
9368 2018-09-18  Marek Polacek  <polacek@redhat.com>
9370         P1064R0 - Allowing Virtual Function Calls in Constant Expressions
9371         * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
9373 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
9375         * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
9377 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
9379         PR rtl-optimization/86882
9380         * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
9382 2018-09-18  Uros Bizjak  <ubizjak@gmail.com>
9384         * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
9385         *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
9387 2018-09-18  Jonathan Wakely  <jwakely@redhat.com>
9389         PR other/87353
9390         * doc/invoke.texi (Link Options): Fix formatting and grammar.
9392 2018-09-18  Richard Biener  <rguenther@suse.de>
9394         PR middle-end/63155
9395         * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
9396         (compute_samebase_partition_bases): Likewise.
9397         (coalesce_ssa_name): Always use compute_optimized_partition_bases.
9398         (gimple_can_coalesce_p): Simplify.
9400 2018-09-18  Hans-Peter Nilsson  <hp@bitrange.com>
9402         Handle a library implementation of ffs calling __builtin_ffs.
9403         * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
9404         (mmix_init_libfuncs): New function: make __builtin_ffs expand
9405         to __ffsdi2.
9407 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
9409         * diagnostic-show-locus.c (class layout_range): Add field
9410         "m_original_idx".
9411         (layout_range::layout_range): Add "original_idx" param and use it
9412         to initialize new field.
9413         (make_range): Use 0 for original_idx.
9414         (layout::layout): Pass in index to calls to
9415         maybe_add_location_range.
9416         (layout::maybe_add_location_range): Add param "original_idx" and
9417         pass it on to layout_range.
9418         (layout::print_any_labels): Pass on range->m_original_idx to
9419         get_text call.
9420         (gcc_rich_location::add_location_if_nearby): Use 0 for
9421         original_idx.
9422         * gcc-rich-location.h (text_range_label::get_text): Update for new
9423         param.
9424         (range_label_for_type_mismatch::get_text): Likewise.
9426 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
9428         * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
9430 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
9432         * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
9433         format_string_diagnostic_t.
9434         (fmtwarn_n): Likewise.
9435         * substring-locations.c
9436         (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
9437         (format_warning_n_va): Convert to...
9438         (format_string_diagnostic_t::emit_warning_n_va): ...this.
9439         (format_warning_va): Convert to...
9440         (format_string_diagnostic_t::emit_warning_va): ...this.
9441         (format_warning_at_substring): Convert to...
9442         (format_string_diagnostic_t::emit_warning): ...this.
9443         (format_warning_at_substring_n): Convert to...
9444         (format_string_diagnostic_t::emit_warning_n): ...this.
9445         * substring-locations.h (class format_string_diagnostic_t): New
9446         class.
9447         (format_warning_va): Convert to
9448         format_string_diagnostic_t::emit_warning_va.
9449         (format_warning_n_va): Convert to
9450         format_string_diagnostic_t::emit_warning_n_va.
9451         (format_warning_at_substring): Convert to
9452         format_string_diagnostic_t::emit_warning.
9453         (format_warning_at_substring_n): Convert to
9454         format_string_diagnostic_t::emit_warning_n.
9456 2018-09-17  Cesar Philippidis  <cesar@codesourcery.com>
9457             Bernd Schmidt <bernds_cb1@t-online.de>
9459         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
9460         SImode args.
9462 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
9464         * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
9465         operand 0 predicate to nonimmediate operand.
9466         (rint<mode>2_frndint): Remove insn pattern.
9467         (rint<mode>2): Change operand 1 predicate to general_operand.
9468         Extend operand 1 to XFmode and generate rintxf2 insn.
9469         (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
9470         Do not use X87MODEF mode macro.
9471         (frndintxf2_<rounding>_i387): Rename from
9472         frndint<mode>2_<rounding>_i387.  Do not use X87MODEF mode macro.
9473         (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
9474         to XFmode and generate significandxf3 insn.
9476 2018-09-17  Richard Biener  <rguenther@suse.de>
9478         PR tree-optimization/87328
9479         * tree-ssa-sccvn.c (process_bb): Remove assertion about not
9480         visiting unexecutable backedges when not iterating.
9481         (do_rpo_vn): Mark all edges not executable even when not
9482         iterating.
9484 2018-09-17  Martin Jambor  <mjambor@suse.cz>
9486         PR c/63886
9487         * doc/invoke.texi (Warning Options): Likewise.
9489 2018-09-17  Richard Biener  <rguenther@suse.de>
9491         PR tree-optimization/87301
9492         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
9493         clean EH info from leftover copy assignments.
9495 2018-09-17  Martin Liska  <mliska@suse.cz>
9497         PR gcov-profile/85871
9498         * gcov.c (output_intermediate_file): Fix out of bounds
9499         access.
9501 2018-09-17  Vineet Gupta  <vgupta@synopsys.com>
9503         * config/arc/arc.c: Object attributes for core4 not reflected
9504         correctly.
9505         * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
9506         core3).
9508 2018-09-17  Alexey Brodkin  <abrodkin@synopsys.com>
9510         * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
9512 2018-09-17  Martin Liska  <mliska@suse.cz>
9514         * doc/gcov.texi: Document new option --use-hotness-colors.
9515         * gcov.c (struct source_info): Declare new field.
9516         (source_info::source_info): Set default for maximum_count.
9517         (print_usage): Add new -q option.
9518         (process_args): Process it.
9519         (accumulate_line_info): Save src->maximum_count.
9520         (output_line_beginning): Make color line number if
9521         flag_use_hotness_colors is set.
9522         (output_line_details): Pass default argument value.
9523         (output_lines): Pass src->maximum_count.
9525 2018-09-17  Martin Liska  <mliska@suse.cz>
9527         * common/config/i386/i386-common.c (ix86_get_valid_option_values):
9528         Use processor_names table.
9529         * config/i386/i386.c (ix86_default_align): Use
9530         processor_cost_table for alignment values.
9531         (ix86_option_override_internal): Use processor_names.
9532         (ix86_function_specific_print): Likewise.
9533         * config/i386/i386.h (struct processor_costs):
9534         Add alignment values.
9535         (struct ptt): Remove and replace with const char *.
9536         * config/i386/x86-tune-costs.h (struct processor_costs):
9537         Declare default alignments for all costs.
9539 2018-09-17  Aldy Hernandez  <aldyh@redhat.com>
9541         * tree-vrp.c (extract_range_from_unary_expr): Do not special case
9542         symbolics or VR_VARYING ranges for ABS_EXPR.
9543         * wide-int-range.cc (wide_int_range_abs): Return positive numbers
9544         when range will wrap.
9546 2018-09-15  Eric Botcazou  <ebotcazou@adacore.com>
9548         PR middle-end/86864
9549         * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
9550         before and after a JUMP_TABLE_DATA.
9552 2018-09-14  John David Anglin  <danglin@gcc.gnu.org>
9554         PR middle-end/87188
9555         * dojump.c (do_compare_and_jump): Canonicalize function pointers
9556         when one operand is a function pointer.  Use POINTER_TYPE_P and
9557         FUNC_OR_METHOD_TYPE_P.
9558         * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
9559         * fold-const.c (build_range_check): Likewise.
9560         * match.pd (simple_comparison): Likewise.
9562 2018-09-14  David Malcolm  <dmalcolm@redhat.com>
9564         PR c/82967
9565         * spellcheck.c (get_edit_distance_cutoff): New function.
9566         (selftest::test_edit_distance_unit_test_oneway): Rename to...
9567         (selftest::test_get_edit_distance_one_way): ...this.
9568         (selftest::test_get_edit_distance_unit): Rename to...
9569         (selftest::test_get_edit_distance_both_ways): ...this.
9570         (selftest::test_edit_distances): Move tests to this new function,
9571         and test some more pairs of strings.  Update for above renaming.
9572         (selftest::get_old_cutoff): New function.
9573         (selftest::test_get_edit_distance_cutoff): New function.
9574         (selftest::assert_suggested_for): New function.
9575         (ASSERT_SUGGESTED_FOR): New macro.
9576         (selftest::assert_not_suggested_for): New function.
9577         (ASSERT_NOT_SUGGESTED_FOR): New macro.
9578         (selftest::test_suggestions): New function.
9579         (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
9580         tests to selftest::test_edit_distances and call it.  Add calls to
9581         selftest::test_get_edit_distance_cutoff and
9582         selftest::test_suggestions.
9583         * spellcheck.h (get_edit_distance_cutoff): New function declaration.
9584         (best_match::consider): Replace hard-coded cutoff calculation with
9585         a call to...
9586         (best_match::get_cutoff): New declaration.
9587         (best_match::get_best_meaningful_candidate): Likewise.
9589 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9591         * builtins.c (fold_builtin_strlen): Remove TODO comment.
9593 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9595         revert:
9596         2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9598         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
9599         terminated string literal.
9601 2018-09-14  Martin Sebor  <msebor@redhat.com>
9603         * builtins.c (unterminated_array): Handle ARRAY_REF.
9604         (expand_builtin_stpcpy_1): Detect unterminated char arrays.
9605         * builtins.h (unterminated_array): Declare extern.
9606         * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
9607         arrays.
9608         (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
9609         calls.
9611 2018-09-14  Martin Sebor  <msebor@redhat.com>
9612             Jeff Law  <law@redhat.com>
9614         * builtins.c (unterminated_array): New.
9615         (expand_builtin_strcpy): Adjust.
9616         (expand_builtin_strcpy_args): Detect unterminated arrays.
9617         * gimple-fold.c (get_maxval_strlen): Add argument.  Detect
9618         unterminated arrays.
9619         * gimple-fold.h (get_maxval_strlen): Add argument.
9620         (gimple_fold_builtin_strcpy): Detec unterminated arrays.
9622         * gimple-fold.c (get_range_strlen): Add argument.
9623         (get_maxval_strlen): Adjust.
9624         * gimple-fold.h (get_range_strlen): Add argument.
9626 2018-09-14  Wei Xiao  <wei3.xiao@intel.com>
9628         * config/i386/movdirintrin.h: Fix copyright year.
9630 2018-09-14  Uros Bizjak  <ubizjak@gmail.com>
9632         * reg-stack.c: Include regs.h.
9633         (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
9634         (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
9635         FIRST_STACK_REG, not DFmode.
9636         (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
9637         FIRST_STACK_REG, not XFmode.  Explicitly construct swap RTX.
9638         (change stack): Default register mode to the reg_raw_mode of
9639         FIRST_STACK_REG, not DFmode.
9640         * config/i386/i386.md (*swap<mode>): Remove insn pattern.
9641         (*swapxf): Rename from swapxf.
9643 2018-09-14  Carl Love  <cel@us.ibm.com>
9645         * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
9646         * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
9648 2018-09-14  Segher Boessenkool  <segher@kernel.crashing.org>
9650         PR target/87224
9651         * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
9652         alternatives.
9654 2018-09-14  Sam Tebbs  <sam.tebbs@arm.com>
9656         PR target/85628
9657         * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
9659 2018-09-14  Jason Merrill  <jason@redhat.com>
9661         Fix --enable-gather-detailed-mem-stats.
9662         * hash-table.c (hash_table_usage): Change from variable to function.
9663         * hash-table.h: Adjust.
9664         * Makefile.in: Add missing dependencies on hash-table.h.
9666 2018-09-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9668         PR tree-optimization/87259
9669         PR lto/87283
9670         (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
9671         execute_cse_reciprocals_1 has tried transforming.
9673 2018-09-14  Aldy Hernandez  <aldyh@redhat.com>
9675         * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
9676         VR_VARYING for PLUS/MINUS_EXPR.
9678 2018-09-14  Ilya Leoshkevich  <iii@linux.ibm.com>
9680         * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
9681         formatting.
9683 2018-09-14  Richard Biener  <rguenther@suse.de>
9685         PR middle-end/63155
9686         * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
9687         bits for the merged partition.
9689 2018-09-13  Martin Sebor  <msebor@redhat.com>
9690             Bernd Edlinger  <bernd.edlinger@hotmail.de>
9692         * builtins.h (c_srlen): Add argument.
9693         * builtins.c (warn_string_no_nul): New function.
9694         (c_strlen): Add argument and use it.  Update recursive calls.
9695         Pass DECL argument to string_constant to get info on non
9696         terminated strings.  Update *NONSTR as needed.
9697         (fold_builtin_strlen): Add argument to calls to c_strlen.
9698         Warn for unterminated arrays.
9699         (warn_string_no_null): Add prototype.
9700         * expr.c (string_constant): Update arguments.  Update recursive
9701         calls appropriately.  Detect missing NUL terminator and outermost
9702         declaration its missing in.
9703         Improve checks for arrays with nonzero lower bound or elements
9704         that are not a single byte.  Simplify offset computation.
9705         Simplify checks for non-NUL terminated strings.
9706         * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
9707         * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
9709 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9711         * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
9712         correctly.
9713         * fold-const.c (c_getstr): Fix function comment.  Remove unused third
9714         argument.  Fix range checks.
9715         * fold-const.h (c_getstr): Adjust protoype.
9716         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
9717         string is constant but contains no NUL byte.
9719         * expr.c (string_constant): Adjust function comment.
9720         Remove bogus check for zero termination.
9722         * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
9724         * varasm.c (compare_constant): Compare type size of STRING_CSTs.
9725         (get_constant_size): Don't make STRING_CSTs larger than they are.
9726         (check_string_literal): New check function for STRING_CSTs.
9727         (output_constant): Use it.
9729 2018-09-13  Eric Botcazou  <ebotcazou@adacore.com>
9731         PR target/86812
9732         * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
9734 2018-09-13  Richard Biener  <rguenther@suse.de>
9736         PR tree-optimization/87263
9737         * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
9738         (struct unwind_state): Add max_rpo field.
9739         (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
9740         Compute max_rpo, the max RPO number a block can be backwards reached
9741         from.  Re-write non-iterating mode to a RPO ordered worklist approach,
9742         separating it from the iterating mode.
9744 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
9746         * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
9747         (rfs_decision): New scheduling decision.
9749 2018-09-13  Richard Biener  <rguenther@suse.de>
9751         PR bootstrap/87134
9752         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
9753         (vn_nary_op_insert_pieces_predicated): Do not write useless
9754         valid_dominated_by_p entry outside of the allocated storage.
9756 2018-09-13  Omar Sandoval  <osandov@osandov.com>
9757             Tom de Vries  <tdevries@suse.de>
9759         PR debug/86985
9760         * dwarf2out.c (is_c): New function.
9761         (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
9763 2018-09-13  Sam Tebbs  <sam.tebbs@arm.com>
9765         PR target/85628
9766         * config/aarch64/aarch64.md (*aarch64_bfxil):
9767         Define.
9768         * config/aarch64/constraints.md (Ulc): Define.
9769         * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
9770         Define.
9771         * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
9772         New function.
9774 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
9776         * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
9777         * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
9778         aarch64_layout_frame call.
9779         (aarch64_expand_epilogue): Likewise.
9780         (aarch64_initial_elimination_offset): Likewise.
9781         (aarch64_get_separate_components): Likewise.
9782         (aarch64_use_return_insn_p): Likewise.
9783         (aarch64_layout_frame): Remove unneeded check.
9785 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
9787         * configure.ac: Only append
9788         " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
9789         gcc_config_arguments if it was never reconfigured or last reconfigure
9790         was with different arguments.
9791         * configure: Regenerated.
9793 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
9794             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9796         PR middle-end/87290
9797         * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
9798         (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
9800 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
9802         PR tree-optimization/87287
9803         * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
9804         X % C == 0 to X % (unsigned) C == 0 optimization to ...
9805         * match.pd (X % C == 0): ... here.  New optimization.
9807 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
9809         PR middle-end/82853
9810         * expr.h (maybe_optimize_mod_cmp): Declare.
9811         * expr.c (mod_inv): New function.
9812         (maybe_optimize_mod_cmp): New function.
9813         (do_store_flag): Use it.
9814         * cfgexpand.c (expand_gimple_cond): Likewise.
9816 2018-09-09  Cesar Philippidis  <cesar@codesourcery.com>
9817             Julian Brown  <julian@codesourcery.com>
9819         PR middle-end/86336
9820         * gimplify.c (gimplify_scan_omp_clauses): Set
9821         target_firstprivatize_array_bases in OpenACC parallel and kernels
9822         region contexts.  Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
9823         OpenACC data regions.
9825 2018-09-12  Uros Bizjak  <ubizjak@gmail.com>
9827         * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
9828         (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
9830 2018-09-12  Richard Biener  <rguenther@suse.de>
9832         PR tree-optimization/87280
9833         * tree-ssa-sccvn.c (process_bb): Handle the case of executable
9834         edge but unreachable target.
9835         (do_rpo_vn): For conservatively handling a PHI only mark
9836         the backedge executable but not the block reachable.
9838 2018-09-12  Richard Biener  <rguenther@suse.de>
9840         PR tree-optimization/87266
9841         * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
9842         visited blocks.
9844 2018-09-12  Andreas Krebbel  <krebbel@linux.ibm.com>
9846         * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
9847         constants.
9848         ("trunc<BFP:mode><DFP_ALL:mode>2")
9849         ("trunc<DFP_ALL:mode><BFP:mode>2")
9850         ("extend<BFP:mode><DFP_ALL:mode>2")
9851         ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
9852         according to the target operand type.
9854 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
9855             Andreas Krebbel  <krebbel@linux.ibm.com>
9857         PR tree-optimization/86844
9858         * gimple-ssa-store-merging.c
9859         (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
9860         there are any overlapping stores in between them, make sure they are
9861         also coalesced or we give up completely.
9863 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
9865         PR middle-end/87248
9866         * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
9867         BIT_AND_EXPR's second operand is a power of two.  Formatting fix.
9869 2018-09-12  Tom de Vries  <tdevries@suse.de>
9871         * common.opt (gdescribe-dies): Add option.
9872         * dwarf2out.c (add_name_and_src_coords_attributes): Add description
9873         attribute for artifical and nameless decls.
9874         (dwarf2out_register_external_die): Add description attribute to
9875         external reference die.
9876         (add_desc_attribute): New functions.
9877         (gen_subprogram_die): Add description attribute to
9878         DW_TAG_call_site_parameter.
9879         * tree-pretty-print.c (print_generic_expr_to_str): New function.
9880         * tree-pretty-print.h (print_generic_expr_to_str): Declare.
9881         * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
9882         -gno-describe-dies.
9883         (@item -gdescribe-dies): Add.
9885 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
9887         * tree-vrp.c (vrp_shift_undefined_p): Remove.
9888         (extract_range_from_binary_expr_1: Call
9889         wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
9890         * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
9891         depend on sign.
9893 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
9895         * gimple-ssa-warn-alloca.c
9896         (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
9897         field for ALLOCA_BOUND_*_LARGE.
9899 2018-09-11  Nathan Sidwell  <nathan@acm.org>
9901         * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
9903 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
9905         * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
9906         for clobbers.  Remove obsolete comment.
9908 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
9910         * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
9911         mpxchk, mpxld and mpxst types.
9912         (define_attr length_immediate): Remove all processing of mpx types.
9913         (define_attr prefix_0f): Ditto.
9914         (define_attr memory): Ditto.
9916 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
9918         * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
9919         (log<mode>2): Change operand 1 predicate to general_operand.
9920         Extend operand 1 to XFmode and generate logxf3 insn.
9921         (log10<mode>2): Change operand 1 predicate to general_operand.
9922         Extend operand 1 to XFmode and generate log10xf3 insn.
9923         (log2<mode>2): Change operand 1 predicate to general_operand.
9924         Extend operand 1 to XFmode and generate log2xf3 insn.
9925         (fyl2xp1_extend<mode>xf3_i387): Remove.
9926         (log1p<mode>2): Change operand 1 predicate to general_operand.
9927         Extend operand 1 to XFmode and generate log1pxf3 insn.
9928         (fxtract_extend<mode>xf3_i387): Remove.
9929         (logb<mode>2): Change operand 1 predicate to general_operand.
9930         Extend operand 1 to XFmode and generate logbxf3 insn.
9931         (ilogb<mode>2): Change operand 1 predicate to general_operand.
9932         Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
9933         (significand<mode>2): Change operand 1 predicate to general_operand.
9934         Extend operand 1 to XFmode and generate significandxf3 insn.
9936 2018-09-11  Nathan Sidwell  <nathan@acm.org>
9938         * gcc.c (perror_with_name, pfatal_with_name): Delete.
9939         (load_specs): Use fatal_error.
9940         (DELETE_IF_ORDINARY, process_command): Use error.
9941         (execute, run_attempt): Use fatal_error.
9943 2018-09-11  Andrew Stubbs  <ams@codesourcery.com>
9945         * diagnostic-core.h (sorry_at): New prototype.
9946         * diagnostic.c (sorry_at): New function.
9948 2018-09-11  Aldy Hernandez  <aldyh@redhat.com>
9950         * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
9951         by zero as VR_UNDEFINED.
9953 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
9955         * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
9956         (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
9957         (<sincos>mode2): New expander.
9958         (sincos_extend<mode>xf3_i387): Remove insn pattern.
9959         (sincos -> sin, cos splitters): Remove splitter patterns.
9960         (sincos<mode>3): Change operand 2 predicate to general_operand.
9961         Extend operand 2 to XFmode and generate sincosxf3 insn.
9962         (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
9963         Change operand 3 predicate to const1_operand.
9964         (fptan_extend<mode>xf4_i387): Remove insn pattern.
9965         (tanxf2): Update operands in the call to fptanxf4_i387.
9966         (tan<mode>2): Change operand 1 predicate to general_operand.
9967         Extend operand 1 to XFmode and generate tanxf3 insn.
9968         (atan2xf3): Rename from *fpatanxf3_i387.
9969         (fpatan_extend<mode>xf3_i387): Remove insn pattern.
9970         (atan2xf3): Remove expander.
9971         (atan2<mode<3):  Change operand 1 and 2 predicates to general_operand.
9972         Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
9973         (atan<mode>2): Change operand 1 predicate to general_operand.
9974         Extend operand 1 to XFmode and generate atanxf3 insn.
9976 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
9978         * config/i386/i386.md (x87/SSE constant load splitter): Use
9979         memory_operand instead of nonimmediate_operand for input operand
9980         predicate.
9982 2018-09-09  Uros Bizjak  <ubizjak@gmail.com>
9984         * config/i386/i386.md (float partial SSE register stall splitter): Move
9985         splitter near its instruction pattern.
9986         (float_extend partial SSE register stall splitter): Ditto.
9987         (float_truncate partial SSE register stall splitter): Ditto.
9989 2018-09-09  Hans-Peter Nilsson  <hp@bitrange.com>
9991         PR target/86794
9992         * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
9993         to speculation_safe_value_not_needed.
9995         PR target/85666
9996         * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
9997         non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
9998         (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
9999         leaf_function_p, instead use has_hard_reg_initial_val.
10001 2018-09-09  Nathan Sidwell  <nathan@acm.org>
10003         * gcc.h (pfatal_with_name): Don't declare here.
10004         * gcc.c (pfatal_with_name): Make static.
10006 2018-09-09  Xianmiao Qu  <xianmiao_qu@c-sky.com>
10008         * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
10009         earlyclobber.
10011 2018-09-08  John David Anglin  <danglin@gcc.gnu.org>
10013         PR rtl-optimization/85458
10014         * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
10015         priority hook to reduce the priority of EXPR.
10017 2018-09-07  Uros Bizjak  <ubizjak@gmail.com>
10019         * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
10020         DImode for x87 on 32bit targets.  Conditionally disable x87 modes
10021         with X87_ENABLE_FLOAT.  Remove preparation code.
10022         (*float<SWI48:mode><MODEF:mode>2): Rename from
10023         *float<SWI48:mode><MODEF:mode>2_mixed.  Handle x87, SSE and mixed
10024         math using "enabled" attribute.
10025         (*floatdi<MODEF:mode>2_i387): Rename from
10026         *float<SWI48x:mode><MODEF:mode>2_i387.  Handle only DImode and
10027         enable for 32bit targets only.
10028         (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
10029         splitter.
10030         (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
10031         as operand 1 predicate.  Rewrite as define_insn_and_split.
10032         (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
10034 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
10036         * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
10037         to fallthru to FLOAT case.
10039 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
10041         PR target/86731
10042         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
10043         around folding of vec_sl to handle out of range shift values.
10045 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
10047         * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
10048         Update callers to gen_fix_trunc<mode>_i387_fisttp
10049         (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
10050         nonimmediate_operand.
10051         (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
10052         and corresponding splitters.
10053         (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
10054         (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
10055         (fix_truncdi_i387_with_temp): Remove insn pattern
10056         and corresponding splitters.
10057         (fix_trunc<mode>_i387): Change operand 0 predicate to
10058         nonimmediate_operand.
10059         (fix_trunc<mode>_i387_with_temp): Remove insn pattern
10060         and corresponding splitters.
10061         (*fistdi2_1): Remove.
10062         (fistdi2): Ditto.
10063         (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
10064         (lrintxfdi2): Remove expander.  Reimplement as define_insn.
10065         (*fist<mode>2_1): Remove.
10066         (fist<mode>2): Ditto.
10067         (fist<mode>2_with_temp): Remove insn pattern and corresponding
10068         splitters.
10069         (lrintxf<mode>2): Remove expander.  Reimplement as define_insn.
10070         (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
10071         (fistdi2_<rounding>): Change operand 0 predicate to
10072         nonimmediate_operand.
10073         (fistdi2_<rounding>_with_temp): Remove insn pattern
10074         and corresponding splitters.
10075         (fist<mode>2_<rounding>): Change operand 0 predicate to
10076         nonimmediate_operand.
10077         (fist<mode>2_<rounding>_with_temp): Remove insn pattern
10078         and corresponding splitters.
10080         (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
10082 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10084         * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
10085         the init value.
10087 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
10089         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
10090         early gimple folding of vec_splat().
10091         * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
10092         * gimple-fold.h: Add an extern define for tree_vec_extract().
10094 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
10096         * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
10097         wrappers around TREE_TYPE comparisons.
10099 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
10101         PR target/80080
10102         * config/s390/predicates.md: Add nonsym_memory_operand.
10103         * config/s390/s390.c (s390_legitimize_cs_operand): If operand
10104         contains a SYMBOL_REF, load it into an intermediate pseudo.
10105         (s390_emit_compare_and_swap): Legitimize operand.
10106         * config/s390/s390.md: Use the new nonsym_memory_operand
10107         with UNSPECV_CAS patterns.
10109 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
10111         PR target/80080
10112         * config/s390/s390-passes.def: New file.
10113         * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
10114         declaration.
10115         (make_pass_s390_early_mach): Add declaration.
10116         * config/s390/s390.c (make_pass_s390_early_mach):
10117         (s390_option_override): Remove dynamic registration.
10118         * config/s390/t-s390: Add s390-passes.def.
10120 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
10122         * config/s390/s390.c (s390_decompose_constant_pool_ref):
10123         Remove UNSPEC_LTREL_BASE check.
10124         (annotate_constant_pool_refs): Likewise.
10125         (find_constant_pool_ref): Likewise.
10126         (find_ltrel_base): Removed.
10127         (replace_ltrel_base): Removed.
10128         (s390_mainpool_finish): Remove replace_ltrel_base call.
10129         (s390_chunkify_start): Remove pending LTREL_BASE logic.
10130         (s390_chunkify_finish): Remove replace_ltrel_base call.
10131         * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
10133 2018-09-06  Hans-Peter Nilsson  <hp@axis.com>
10135         PR target/86779
10136         * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
10137         to speculation_safe_value_not_needed.
10139 2018-09-05  Cesar Philippidis  <cesar@codesourcery.com>
10140             Bernd Schmidt  <bernds_cb1@t-online.de>
10142         * config/nvptx/nvptx-opts.h: New file.
10143         * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
10144         * config/nvptx/nvptx.h: Include "nvptx-opts.h".
10145         (ASM_SPEC): Define.
10146         (TARGET_SM35): New macro.
10147         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
10148         correct predicate.
10149         * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
10150         values.
10151         (misa=): New option.
10152         * doc/invoke.texi (Nvidia PTX Options): Document -misa.
10154 2018-09-05  Uros Bizjak  <ubizjak@gmail.com>
10156         * config/i386/i386.md (truncdfsf2): Remove expander.
10157         (truncdfsf2_with_temp): Ditto.
10158         (truncxf<mode>2): Ditto.
10159         (*truncdfsf_fast_mixed): Remove insn pattern.
10160         (*truncdfsf_fast_i387): Ditto.
10161         (*truncdfsf_mixed): Ditto.
10162         (*truncdfsf_i387): Ditto.
10163         (*truncdfsf2_i387_1): Ditto.
10164         (*truncxfsf2_mixed): Ditto.
10165         (*truncxfdf2_mixed): Ditto.
10166         (*truncxf<mode>2_i387_noop): Ditto. Update callers
10167         to call gen_truncxf<mode>2 instead.
10168         (*truncxf<mode>2_i387): Remove.
10169         (reg->reg splitters): Remove splitter pattern.
10170         (reg->mem splitters): Ditto.
10172         (truncdfsf2): New insn pattern.
10173         (truncxf<mode>2): Ditto.
10175 2018-09-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10177         * tree-ssa-math-opts.c (is_mult_by): New function.
10178         (is_square_of): Use the above.
10179         (optimize_recip_sqrt): New function.
10180         (pass_cse_reciprocals::execute): Use the above.
10182 2018-09-05  Richard Biener  <rguenther@suse.de>
10184         PR bootstrap/87134
10185         * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
10186         to zero-init the emplaced vec.
10188 2018-09-05  Martin Liska  <mliska@suse.cz>
10190         PR tree-optimization/87205
10191         * tree-switch-conversion.c (pass_lower_switch::execute):
10192         Group cases for switch statements.
10194 2018-09-05  Richard Biener  <rguenther@suse.de>
10196         PR tree-optimization/87217
10197         * tree-ssa-sccvn.c (vuse_valueize): New.
10198         (vn_reference_lookup_pieces): Use it.
10199         (vn_reference_lookup): Likewise.
10201 2018-09-05  Nathan Sidwell  <nathan@acm.org>
10203         PR c++/87137
10204         * stor-layout.c (place_field): Scan forwards to check last
10205         bitfield when ms_bitfield_placement is in effect.
10207 2018-09-05  Richard Biener  <rguenther@suse.de>
10209         PR bootstrap/87225
10210         * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
10211         return.
10213 2018-09-05  Siddhesh Poyarekar  <siddhesh@sourceware.org>
10214             Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
10216         * config/aarch64/falkor-tag-collision-avoidance.c: New file.
10217         * config.gcc (extra_objs): Build it.
10218         * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
10219         Likewise.
10220         * config/aarch64/aarch64-passes.def
10221         (pass_tag_collision_avoidance): New pass.
10222         * config/aarch64/aarch64.c (qdf24xx_tunings): Add
10223         AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
10224         (aarch64_classify_address): Remove static qualifier.
10225         (aarch64_address_info, aarch64_address_type): Move to...
10226         * config/aarch64/aarch64-protos.h: ... here.
10227         (make_pass_tag_collision_avoidance): New function.
10228         * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
10229         New tuning flag.
10231 2018-09-05  Martin Liska  <mliska@suse.cz>
10233         * doc/gcov.texi: Update documentation of humar
10234         readable mode.
10235         * gcov.c (format_count): Print one decimal place, it provides
10236         more fine number of situations like '1G' vs. '1.4G'.
10238 2018-09-05  Martin Liska  <mliska@suse.cz>
10240         PR target/87164
10241         * config/rs6000/rs6000.opt: Mark the option as Deprecated.
10242         * optc-gen.awk: Allow 'Var' for Deprecated options in order
10243         to generate a MASK value.
10245 2018-09-04  H.J. Lu  <hongjiu.lu@intel.com>
10247         PR debug/86593
10248         * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
10249         if frame pointer isn't used.
10250         (compute_frame_pointer_to_fb_displacement): Likewise.
10252 2018-09-04  Jakub Jelinek  <jakub@redhat.com>
10254         PR target/87198
10255         * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
10256         OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
10257         OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
10258         (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
10259         and OPTION_MASK_ISA_XSAVEC_UNSET.
10261 2018-09-04  Max Filippov  <jcmvbkbc@gmail.com>
10263         * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
10264         XOR operations in NAND case.
10266 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
10268         * wide-int-range.cc (wide_int_range_convert): New.
10269         * wide-int-range.h (wide_int_range_convert): New.
10270         * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
10271         code into wide_int_range_convert.
10272         (extract_range_into_wide_ints): Do not munge anti range constants
10273         into the entire domain.  Just return the range back.
10275 2018-09-04  Martin Liska  <mliska@suse.cz>
10277         * genmatch.c (output_line_directive): Add new argument
10278         fnargs.
10279         (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
10281 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
10283         * doc/invoke.texi (Option Summary): Add whitespace.
10285         * doc/invoke.texi (Option Summary): Add -Waligned-new.
10287 2018-09-04  Richard Biener  <rguenther@suse.de>
10289         PR tree-optimization/87211
10290         * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
10291         backedge value we're supposed to treat as VARYING also number
10292         the PHI to VARYING in case it got a different value-number already.
10294 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
10296         * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
10297         (extract_range_from_binary_expr_1): Do not call
10298         vrp_can_optimize_bit_op.
10299         * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
10300         static.
10301         (wide_int_range_get_mask_and_bounds): New.
10302         (wide_int_range_optimize_bit_op): New.
10303         (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
10304         (wide_int_range_bit_and): Same.
10305         * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
10306         (wide_int_range_optimize_bit_op): New.
10307         (wide_int_range_get_mask_and_bounds): New.
10309 2018-09-04  Richard Biener  <rguenther@suse.de>
10311         PR tree-optimization/87176
10312         * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
10313         variable.  When value-numbering a virtual PHI node make sure
10314         to not value-number to the backedge value.
10316 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
10318         * doc/extend.texi (Long Long, Hex Floats): Document support for
10319         long long and hex floats in more recent versions of ISO C++.
10321 2018-09-03  Richard Biener  <rguenther@suse.de>
10323         PR tree-optimization/87177
10324         * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
10325         cleanup.
10327 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
10329         * bb-reorder.c (edge_order): Convert to C-qsort-style
10330         tri-state comparator.
10331         (reorder_basic_blocks_simple): Change std::stable_sort to
10332         gcc_stablesort.
10334 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
10336         * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
10337         tri-state comparator.
10338         (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
10340 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
10342         * sort.cc (struct sort_ctx): New field 'nlim'.  Use it...
10343         (mergesort): ... here as maximum count for using netsort.
10344         (gcc_qsort): Set nlim to 3 if stable sort is requested.
10345         (gcc_stablesort): New.
10346         * system.h (gcc_stablesort): Declare.
10348 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
10350         * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
10351         * system.h (qsort): Always redirect to gcc_qsort.  Update comment.
10352         * vec.c (qsort_chk): Do not call gcc_qsort.  Update comment.
10354 2018-09-03  Segher Boessenkool  <segher@kernel.crashing.org>
10356         * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
10357         lxsdx and stxsdx alternatives.
10358         (*mov<mode>_hardfloat64): Ditto.
10359         * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
10361 2018-09-03  Richard Biener  <rguenther@suse.de>
10363         PR tree-optimization/87200
10364         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
10365         simplify result.
10367 2018-09-03  Martin Liska  <mliska@suse.cz>
10369         PR tree-optimization/87201
10370         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
10371         Fix parenthesis in an expression.
10373 2018-09-03  Richard Biener  <rguenther@suse.de>
10375         PR tree-optimization/87197
10376         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
10377         visited.  CSE the VN_INFO hashtable lookup.
10379         PR tree-optimization/87169
10380         * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
10381         iterating make sure there's no extra backedges from irreducible
10382         regions feeding the header.  Mark the destination block
10383         executable.
10385 2018-09-03  Martin Liska  <mliska@suse.cz>
10387         PR driver/83193
10388         * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
10389         * common/common-targhooks.c (default_get_valid_option_values):
10390         New function.
10391         * common/common-targhooks.h (default_get_valid_option_values):
10392         Likewise.
10393         * common/config/i386/i386-common.c: Move processor_target_table
10394         from i386.c.
10395         (ix86_get_valid_option_values): New function.
10396         (TARGET_GET_VALID_OPTION_VALUES): New macro.
10397         * config/i386/i386.c (struct ptt): Move to i386-common.c.
10398         (PTA_*): Move all defined masks into i386-common.c.
10399         (ix86_function_specific_restore): Use new processor_cost_table.
10400         * config/i386/i386.h (struct ptt): Moved from i386.c.
10401         (struct pta): Likewise.
10402         * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
10403         * doc/tm.texi.in: Likewise.
10404         * opt-suggestions.c (option_proposer::suggest_option):
10405         Pass prefix to build_option_suggestions.
10406         (option_proposer::get_completions): Likewise.
10407         (option_proposer::build_option_suggestions): Use the new target
10408         hook.
10409         * opts.c (struct option_help_tuple): New struct.
10410         (print_filtered_help): Use the new target hook.
10412 2018-09-03  Martin Liska  <mliska@suse.cz>
10414         PR middle-end/59521
10415         * predict.c (set_even_probabilities): Add likely_edges
10416         argument and handle cases where we have precisely one
10417         likely edge.
10418         (combine_predictions_for_bb): Catch also likely_edges.
10419         (tree_predict_by_opcode): Handle gswitch statements.
10420         * tree-cfg.h (find_case_label_for_value): New declaration.
10421         (find_taken_edge_switch_expr): Likewise.
10422         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
10423         Find pivot in decision tree based on probabily, not by number of
10424         nodes.
10426 2018-09-02  Gerald Pfeifer  <gerald@pfeifer.com>
10428         * doc/standards.texi (Standards): Update Objective-C reference.
10430 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
10432         * doc/install.texi (Prerequisites): Update link for MPC.
10434 2018-09-01  Michael Matz  <matz@suse.de>
10436         PR tree-optimization/87074
10437         * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
10438         PHIs for outer-loop uses.
10440 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
10442         * doc/generic.texi (OpenMP): Adjust link to openmp.org.
10443         * doc/invoke.texi (C Dialect Options): Ditto.
10445 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
10447         * doc/install.texi (Prerequisites): Adjust link mpfr.org.
10449 2018-08-31  Richard Biener  <rguenther@suse.de>
10451         PR tree-optimization/87168
10452         * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
10453         (rpo_elim::eliminate_avail): When OP was not visited it must
10454         be available.
10456 2018-08-31  David Malcolm  <dmalcolm@redhat.com>
10458         * tree-vrp.c (copy_value_range): Convert param "from" from
10459         "value_range *" to "const value_range *".
10460         (range_is_null): Likewise for param "vr".
10461         (range_int_cst_p): Likewise.
10462         (range_int_cst_singleton_p): Likewise.
10463         (symbolic_range_p): Likewise.
10464         (value_ranges_intersect_p): Likewise for both params.
10465         (value_range_nonnegative_p): Likewise for param "vr".
10466         (value_range_constant_singleton): Likewise.
10467         (vrp_set_zero_nonzero_bits): Likewise for param "ar".
10468         (extract_range_into_wide_ints): Likewise for param "vr".
10469         (extract_range_from_multiplicative_op): Likewise for params "vr0"
10470         and "vr1".
10471         (vrp_can_optimize_bit_op): Likewise.
10472         (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
10473         "vr1_".
10474         (extract_range_from_unary_expr): Likewise.
10475         (debug_value_range): Likewise for param "vr".
10476         (value_range::dump): Add "const" qualifier.
10477         (vrp_prop::check_array_ref): Convert local "vr" from
10478         "value_range *" to "const value_range *".
10479         (vrp_prop::check_mem_ref): Likewise.
10480         (vrp_prop::visit_stmt): Likewise for local "old_vr".
10481         (vrp_intersect_ranges_1): Likewise for param "vr_1".
10482         (vrp_intersect_ranges): Likewise.
10483         (simplify_stmt_for_jump_threading): Likewise for local "vr".
10484         (vrp_prop::vrp_finalize): Likewise.
10485         * tree-vrp.h (value_range::dump): Add "const" qualifier.
10486         (vrp_intersect_ranges): Add "const" qualifier to params as above.
10487         (extract_range_from_unary_expr): Likewise.
10488         (value_range_constant_singleton): Likewise.
10489         (symbolic_range_p): Likewise.
10490         (copy_value_range): Likewise.
10491         (extract_range_from_binary_expr_1): Likewise.
10492         (range_int_cst_p): Likewise.
10493         (vrp_set_zero_nonzero_bits): Likewise.
10494         (range_int_cst_singleton_p): Likewise.
10496 2018-08-31  Vlad Lazar  <vlad.lazar@arm.com>
10498         * config/aarch64/arm_neon.h (vabsd_s64): New.
10499         (vnegd_s64): Likewise.
10501 2018-08-31  Martin Jambor  <mjambor@suse.cz>
10503         * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
10505 2018-08-31  Martin Liska  <mliska@suse.cz>
10507         * ipa-icf.c (sem_item::add_type): Use
10508         sem_item::m_type_hash_cache.
10509         * ipa-icf.h: Move the cache from sem_item_optimizer
10510         to sem_item.
10512 2018-08-31  Nathan Sidwell  <nathan@acm.org>
10514         * doc/extend.texi (Backwards Compatibility): Remove implicit
10515         extern C leeway of () being (...).
10517 2018-08-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10519         * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
10521 2018-08-31  Segher Boessenkool  <segher@kernel.crashing.org>
10523         PR target/86684
10524         PR target/87149
10525         * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
10527 2018-08-31  Jakub Jelinek  <jakub@redhat.com>
10529         PR middle-end/87138
10530         * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
10531         gen_int_mode.  Formatting fixes.
10533 2018-08-30  Sandra Loosemore  <sandra@codesourcery.com>
10535         * target.def (custom_function_descriptors): Improve documentation.
10536         * doc/tm.texi.in (Trampolines): Expand discussion of function
10537         descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
10538         beginning of the section.
10539         * doc/tm.texi: Regenerated.
10541 2018-08-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
10543         * cfg.h (class auto_edge_flag): Spell out the template-id of the
10544         base class in the initializer list.  This is a workaround for
10545         building with older GCC.
10546         (class auto_bb_flag): Likewise.
10548 2018-08-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
10550         * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
10551         (altivec_vcmpequ<VI_char>_p): Remove star.
10552         * config/rs6000/rs6000-string.c (do_load_for_compare): Support
10553         vector load modes.
10554         (expand_strncmp_vec_sequence): New function.
10555         (emit_final_str_compare_vec): New function.
10556         (expand_strn_compare): Add support for vector strncmp.
10557         * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
10558         length specification to bytes.
10559         * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
10560         (vcmpnezb_p): New pattern.
10561         * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
10562         for option -mstring-compare-inline-limit.
10564 2018-08-30  Thiago Macieira  <thiago.macieira@intel.com>
10566         * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
10567         (PTA_SKYLAKE): Add PTA_AES.
10568         (PTA_GOLDMONT): Likewise.
10570 2018-08-29  Jan Hubicka  <jh@suse.cz>
10572         PR lto/86517
10573         * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
10574         * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
10576 2018-08-29  Jan Hubicka  <jh@suse.cz>
10578         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
10579         TYPE_STUB_DECL.
10580         (hash_tree): Do not visit TYPE_STUB_DECL.
10581         * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
10582         stream TYPE_STUB_DECL.
10583         * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
10584         * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
10585         after free_lang_data.
10586         (type_in_anonymous_namespace_p): Likewise.
10588 2018-08-29  Jan Hubicka  <jh@suse.cz>
10590         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
10591         comment that it has to be even number.
10592         (class sreal): Change m_sig type to int32_t.
10593         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
10594         int64_t for temporary calculations.
10595         (sreal_verify_basics): Drop one bit from minimum and maximum.
10597 2018-08-30  Richard Biener  <rguenther@suse.de>
10599         PR tree-optimization/87147
10600         * tree-ssa-sccvn.c (SSA_VISITED): New function.
10601         (visit_phi): When the degenerate result is from the backedge and
10602         we didn't visit its definition yet drop to VARYING.
10603         (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
10605 2018-08-29  Jan Hubicka  <jh@suse.cz>
10607         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
10608         DECL_VINDEX.
10609         (hash_tree): Likewise.
10611 2018-08-29  Jan Hubicka  <jh@suse.cz>
10613         * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
10614         and TYPE_NEXT_REF_TO.
10616 2018-08-29  Jan Hubicka  <jh@suse.cz>
10618         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
10619         comment that it has to be even number.
10620         (class sreal): Change m_sig type to int32_t.
10621         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
10622         int64_t for temporary calculations.
10623         (sreal_verify_basics): Drop one bit from minimum and maximum.
10625 2018-08-30  Tamar Christina  <tamar.christina@arm.com>
10627         * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
10629 2018-08-30  Vlad Lazar  <vlad.lazar@arm.com>
10631         PR middle-end/86995
10632         * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
10633         if to_add is negative.
10635 2018-08-29  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10637         PR middle-end/87053
10638         * builtins.c (c_strlen): Improve range checks.
10640 2018-08-29  Martin Sebor  <msebor@redhat.com>
10641             Jeff Law  <law@redhat.com>
10643         PR tree-optimization/86714
10644         PR tree-optimization/86711
10645         * builtins.c (c_strlen): Add arguments to call to string_constant.
10646         * expr.c (string_constant): Add argument.  Detect missing nul
10647         terminator and outermost declaration it's missing in.
10648         * expr.h (string_constant): Add argument.
10649         * fold-const.c (read_from_constant_string): Add arguments to call to
10650         string_constant.
10651         (c_getstr): Likewise.
10652         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
10653         to string_constant.
10654         * tree-ssa-strlen.c (get_stridx): Likewise.
10656 2018-08-29  Jan Hubicka  <jh@suse.cz>
10658         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
10659         Do not stream DECL_VINDEX.
10660         * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
10661         * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
10662         (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
10664 2018-08-29  Richard Biener  <rguenther@suse.de>
10666         * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
10667         virtual operands that are not default defs to honor region
10668         boundaries.
10669         (rpo_vn_valueize): Remove ineffective code here.
10671 2018-08-29  Richard Biener  <rguenther@suse.de>
10673         PR tree-optimization/87132
10674         * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
10675         when skipping defs reachable over backedges.
10677 2018-08-29  Richard Biener  <rguenther@suse.de>
10679         * tree-core.h: Document use of deprecated_flag in SSA_NAME.
10680         * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
10681         * tree-into-ssa.c (pass_build_ssa::execute): Initialize
10682         function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
10683         * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
10684         (vn_reference_lookup_3): Remove use of const_parms.
10685         (free_rpo_vn): Do not free const_parms.
10686         (do_rpo_vn): Do not call init_const_parms.
10687         * tree-ssa-alias.c (refs_may_alias_p_1): Honor
10688         SSA_NAME_POINTS_TO_READONLY_MEMORY.
10689         (call_may_clobber_ref_p_1): Likewise.
10691 2018-08-29  Alexander Monakov  <amonakov@ispras.ru>
10693         PR other/86726
10694         * invoke.texi (Optimization Options): List -ftree-scev-cprop.
10695         (-O): Ditto.
10696         (-ftree-scev-cprop): Document.
10698 2018-08-29  Jan Hubicka  <jh@suse.cz>
10700         * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
10701         parameters.
10702         (sreal constructor): Update.
10703         * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
10704         sreal:operator/): Update.
10706 2018-08-29  Martin Liska  <mliska@suse.cz>
10708         * tree-switch-conversion.c (switch_conversion::expand):
10709         Strenghten assumption about gswitch statements.
10711 2018-08-29  Richard Biener  <rguenther@suse.de>
10713         PR tree-optimization/87117
10714         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
10715         re-value-number released SSA VDEFs.
10717 2018-08-29  Richard Biener  <rguenther@suse.de>
10719         PR tree-optimization/87126
10720         * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
10722 2018-08-28  Jim Wilson  <jimw@sifive.com>
10724         * config/riscv/pic.md: Rewrite.
10725         * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
10726         invalid address.
10727         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
10728         (SOFTF, default_load, softload, softstore): New.
10730 2018-08-28  Jeff Law  <law@redhat.com>
10732         * fold-const.c (fold_binary_loc): Remove recently added assert.
10734 2018-08-28  Joern Rennecke  <joern.rennecke@riscy-ip.com>
10736         * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
10737         to OP parmeter of generated function.
10739 2018-08-28  MCC CS  <deswurstes@users.noreply.github.com>
10741         PR tree-optimization/87009
10742         * match.pd: Add boolean optimizations.
10744 2018-08-28  Martin Sebor  <msebor@redhat.com>
10746         PR middle-end/86631
10747         * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
10748         * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
10749         (pass_walloca::gate): Use it.
10750         (alloca_call_type): Same.
10751         (pass_walloca::execute): Same.
10752         * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
10754 2018-08-28  David Malcolm  <dmalcolm@redhat.com>
10756         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
10757         GCC_VERSION for usage of "__gcc_dump_printf__" format from
10758         >= 3005 to >= 9000.
10760 2018-08-28  Richard Biener  <rguenther@suse.de>
10762         PR tree-optimization/87124
10763         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
10764         constants before looking up avail.
10766 2018-08-28  Jakub Jelinek  <jakub@redhat.com>
10768         PR middle-end/87099
10769         * calls.c (maybe_warn_nonstring_arg): Punt early if
10770         warn_stringop_overflow is zero.  Don't call get_range_strlen
10771         on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
10772         Swap comparison operands to have constants on rhs.  Only use
10773         lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
10774         increment lenrng[0].
10776 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
10778         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
10779         use of tree_to_shwi.  Remove duplicated test for the size being
10780         a whole number of bytes.
10782 2018-08-28  Richard Biener  <rguenther@suse.de>
10784         PR tree-optimization/87117
10785         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
10786         Handle removed stmt without LHS (GIMPLE_NOP).
10788 2018-08-28  Richard Biener  <rguenther@suse.de>
10790         PR tree-optimization/87117
10791         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
10792         void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
10794 2018-08-28  Richard Biener  <rguenther@suse.de>
10796         PR tree-optimization/87117
10797         * tree-ssa-pre.c (compute_avail): Do not make expressions
10798         with predicated values available.
10799         (get_expr_value_id): Assert we do not run into predicated value
10800         expressions.
10802 2018-08-28  Richard Biener  <rguenther@suse.de>
10804         PR tree-optimization/87117
10805         * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
10806         get virtual operands.
10807         (get_expr_operands): Handle STRING_CST like other decls.
10809 2018-08-28  Martin Liska  <mliska@suse.cz>
10811         * tree.h: Update documentation of fndecl_built_in_p
10812         functions.
10815 2018-08-27  Jeff Law  <law@redhat.com>
10816         PR tree-optimization/87110
10817         * tree-ssa-dse.c (compute_trims): Handle non-constant
10818         TYPE_SIZE_UNIT.
10820 2018-08-27  Martin Sebor  <msebor@redhat.com>
10822         PR tree-optimization/86914
10823         * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
10825 2018-08-27  Martin Sebor  <msebor@redhat.com>
10827         PR tree-optimization/87112
10828         * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
10829         the type of the bound argument.
10831 2018-08-27  Jeff Law  <law@redhat.com>
10833         * tree-ssa-dse.c (compute_trims): Handle case where the reference's
10834         type does not have a TYPE_SIZE_UNIT.
10836 2018-08-27  Steve Ellcey  <sellcey@cavium.com>
10838         * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
10839         with include of backend.h.
10841 2018-08-27  Richard Biener  <rguenther@suse.de>
10843         PR tree-optimization/86927
10844         * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
10845         use const cond reduction code.
10847 2018-08-27  Alexander Monakov  <amonakov@ispras.ru>
10849         PR tree-optimization/85758
10850         * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
10852 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
10854         PR c++/87091
10855         * diagnostic-show-locus.c (class layout_range): Update for
10856         conversion of show_caret_p to a tri-state.
10857         (layout_range::layout_range): Likewise.
10858         (make_range): Likewise.
10859         (layout::maybe_add_location_range): Likewise.
10860         (layout::should_print_annotation_line_p): Don't show annotation
10861         lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
10862         (layout::get_state_at_point): Update for conversion of
10863         show_caret_p to a tri-state.  Bail out early for
10864         SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
10865         underlining or source colorization.
10866         (gcc_rich_location::add_location_if_nearby): Update for conversion
10867         of show_caret_p to a tri-state.
10868         (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
10869         (selftest::test_one_liner_fixit_replace_equal_secondary_range):
10870         Likewise.
10871         (selftest::test_one_liner_labels): Likewise.
10872         * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
10873         conversion of show_caret_p to a tri-state.
10874         * pretty-print.c (text_info::set_location): Likewise.
10875         * pretty-print.h (text_info::set_location): Likewise.
10876         * substring-locations.c (format_warning_n_va): Likewise.
10877         * tree-diagnostic.c (default_tree_printer): Likewise.
10878         * tree-pretty-print.c (newline_and_indent): Likewise.
10880 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
10882         PR c++/87091
10883         * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
10884         line above for line-insertion fix-it hints.
10885         (selftest::test_fixit_insert_containing_newline): Update the
10886         expected results, and add a test with line-numbering enabled.
10888 2018-08-27  Martin Liska  <mliska@suse.cz>
10890         PR sanitizer/86962
10891         * sanopt.c (sanitize_rewrite_addressable_params): Ignore
10892         params with DECL_HAS_VALUE_EXPR_P.
10894 2018-08-27  Martin Liska  <mliska@suse.cz>
10896         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
10897         selected expansion strategy.
10899 2018-08-27  Martin Liska  <mliska@suse.cz>
10901         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
10902         * builtins.c (is_builtin_fn): Likewise.
10903         * attribs.c (diag_attr_exclusions): Use new function
10904         fndecl_built_in_p and remove check for FUNCTION_DECL if
10905         possible.
10906         (builtin_mathfn_code): Likewise.
10907         (fold_builtin_expect): Likewise.
10908         (fold_call_expr): Likewise.
10909         (fold_builtin_call_array): Likewise.
10910         (fold_call_stmt): Likewise.
10911         (set_builtin_user_assembler_name): Likewise.
10912         (is_simple_builtin): Likewise.
10913         * calls.c (gimple_alloca_call_p): Likewise.
10914         (maybe_warn_nonstring_arg): Likewise.
10915         * cfgexpand.c (expand_call_stmt): Likewise.
10916         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
10917         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
10918         (cgraph_node::verify_node): Likewise.
10919         * cgraphclones.c (build_function_decl_skip_args): Likewise.
10920         (cgraph_node::create_clone): Likewise.
10921         * config/arm/arm.c (arm_insert_attributes): Likewise.
10922         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
10923         * dse.c (scan_insn): Likewise.
10924         * expr.c (expand_expr_real_1): Likewise.
10925         * fold-const.c (operand_equal_p): Likewise.
10926         (fold_binary_loc): Likewise.
10927         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
10928         * gimple-low.c (lower_stmt): Likewise.
10929         * gimple-pretty-print.c (dump_gimple_call): Likewise.
10930         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
10931         Likewise.
10932         * gimple.c (gimple_build_call_from_tree): Likewise.
10933         (gimple_call_builtin_p): Likewise.
10934         (gimple_call_combined_fn): Likewise.
10935         * gimplify.c (gimplify_call_expr): Likewise.
10936         (gimple_boolify): Likewise.
10937         (gimplify_modify_expr): Likewise.
10938         (gimplify_addr_expr): Likewise.
10939         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
10940         * ipa-cp.c (determine_versionability): Likewise.
10941         * ipa-fnsummary.c (compute_fn_summary): Likewise.
10942         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
10943         * ipa-split.c (visit_bb): Likewise.
10944         (split_function): Likewise.
10945         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
10946         * lto-cgraph.c (input_node): Likewise.
10947         * lto-streamer-out.c (write_symbol): Likewise.
10948         * omp-low.c (setjmp_or_longjmp_p): Likewise.
10949         (lower_omp_1): Likewise.
10950         * predict.c (strip_predict_hints): Likewise.
10951         * print-tree.c (print_node): Likewise.
10952         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
10953         * trans-mem.c (is_tm_irrevocable): Likewise.
10954         (is_tm_load): Likewise.
10955         (is_tm_simple_load): Likewise.
10956         (is_tm_store): Likewise.
10957         (is_tm_simple_store): Likewise.
10958         (is_tm_abort): Likewise.
10959         (tm_region_init_1): Likewise.
10960         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
10961         * tree-cfg.c (verify_gimple_call): Likewise.
10962         (move_stmt_r): Likewise.
10963         (stmt_can_terminate_bb_p): Likewise.
10964         * tree-eh.c (lower_eh_constructs_2): Likewise.
10965         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
10966         * tree-inline.c (remap_gimple_stmt): Likewise.
10967         (copy_bb): Likewise.
10968         (estimate_num_insns): Likewise.
10969         (fold_marked_statements): Likewise.
10970         * tree-sra.c (scan_function): Likewise.
10971         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
10972         (optimize_stack_restore): Likewise.
10973         (pass_fold_builtins::execute): Likewise.
10974         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
10975         (mark_all_reaching_defs_necessary_1): Likewise.
10976         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
10977         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
10978         (pass_forwprop::execute): Likewise.
10979         * tree-ssa-loop-im.c (stmt_cost): Likewise.
10980         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
10981         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
10982         * tree-ssa-strlen.c (get_string_length): Likewise.
10983         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
10984         (find_func_aliases_for_call): Likewise.
10985         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
10986         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
10987         * tree-tailcall.c (find_tail_calls): Likewise.
10988         * tree.c (need_assembler_name_p): Likewise.
10989         (free_lang_data_in_decl): Likewise.
10990         (get_call_combined_fn): Likewise.
10991         * ubsan.c (is_ubsan_builtin_p): Likewise.
10992         * varasm.c (incorporeal_function_p): Likewise.
10993         * tree.h (DECL_BUILT_IN): Remove and replace with
10994         fndecl_built_in_p.
10995         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
10996         (fndecl_built_in_p): New.
10998 2018-08-27  Martin Liska  <mliska@suse.cz>
11000         PR tree-optimization/86847
11001         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
11002         Dump also subtree probability.
11003         (switch_decision_tree::do_jump_if_equal): New function.
11004         (switch_decision_tree::emit_case_nodes): Handle special
11005         situations in balanced tree that can be emitted much simpler.
11006         Fix calculation of probabilities that happen in tree expansion.
11007         * tree-switch-conversion.h (struct cluster): Add
11008         is_single_value_p.
11009         (struct simple_cluster): Likewise.
11010         (struct case_tree_node): Add new function has_child.
11011         (do_jump_if_equal): New.
11013 2018-08-27  Martin Liska  <mliska@suse.cz>
11015         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
11016         Add new argument to bit_test_cluster constructor.
11017         (bit_test_cluster::emit): Set bits really number of values
11018         handlel by a test.
11019         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
11020         probability argument.
11021         * tree-switch-conversion.h (struct bit_test_cluster):
11022         Add m_handles_entire_switch.
11024 2018-08-27  Martin Liska  <mliska@suse.cz>
11026         PR tree-optimization/86702
11027         * tree-switch-conversion.c (jump_table_cluster::emit):
11028         Make probabilities even for values in jump table
11029         according to number of cases handled.
11030         (switch_decision_tree::compute_cases_per_edge): Pass
11031         argument to reset_out_edges_aux function.
11032         (switch_decision_tree::analyze_switch_statement): Likewise.
11033         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
11034         Make it static.
11036 2018-08-27  Martin Liska  <mliska@suse.cz>
11038         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
11039         cfun argument explicitly.
11040         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
11041         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
11042         function gimple_switch_default_bb.
11043         (convert_switch_statements):
11044         (expand_builtins):
11045         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
11046         * stmt.c (label_to_block_fn): Use label_to_block and pass
11047         cfun argument explicitly and use gimple_switch_label_bb.
11048         (expand_case): Likewise.
11049         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
11050         cfun argument explicitly. Likewise.
11051         (make_edges_bb): Likewise.
11052         (make_cond_expr_edges): Likewise.
11053         (get_cases_for_edge): Likewise.
11054         (make_gimple_switch_edges): Likewise.
11055         (label_to_block_fn): Likewise.
11056         (label_to_block): Likewise.
11057         (make_goto_expr_edges): Likewise.
11058         (make_gimple_asm_edges): Likewise.
11059         (main_block_label): Likewise.
11060         (group_case_labels_stmt): Likewise.
11061         (find_taken_edge_computed_goto): Likewise.
11062         (find_taken_edge_switch_expr): Likewise.
11063         (gimple_verify_flow_info): Likewise.
11064         (gimple_redirect_edge_and_branch): Likewise.
11065         (gimple_switch_label_bb): New function.
11066         (gimple_switch_default_bb): Likewise.
11067         (gimple_switch_edge): Likewise.
11068         (gimple_switch_default_edge): Likewise.
11069         * tree-cfg.h (label_to_block_fn): Remove and replace ...
11070         (label_to_block): ... with this.
11071         (gimple_switch_label_bb): New.
11072         (gimple_switch_default_bb): Likewise.
11073         (gimple_switch_edge): Likewise.
11074         (gimple_switch_default_edge): Likewise.
11075         * tree-cfgcleanup.c (convert_single_case_switch): Use
11076         new gimple functions and pass new argument to label_to_block.
11077         (cleanup_control_flow_bb):
11078         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
11079         cfun argument explicitly.
11080         (make_eh_edges): Likewise.
11081         (redirect_eh_dispatch_edge): Likewise.
11082         (lower_resx): Likewise.
11083         (lower_eh_dispatch): Likewise.
11084         (maybe_remove_unreachable_handlers): Likewise.
11085         (unsplit_eh): Likewise.
11086         (cleanup_empty_eh): Likewise.
11087         (verify_eh_edges): Likewise.
11088         (verify_eh_dispatch_edge): Likewise.
11089         * tree-ssa-dom.c (record_edge_info): Likewise.
11090         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
11091         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
11092         (thread_through_normal_block): Likewise.
11093         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
11094         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
11095         * tree-switch-conversion.c (switch_conversion::collect): Use new
11096         gimple functions.
11097         (switch_conversion::check_final_bb): Likewise.
11098         (switch_conversion::gather_default_values): Pass new argument
11099         to label_to_block.
11100         (switch_conversion::build_constructors): Likewise.
11101         (switch_decision_tree::compute_cases_per_edge): Use new
11102         gimple_switch_edge function.
11103         (switch_decision_tree::analyze_switch_statement): Pass new argument
11104         to label_to_block.
11105         (switch_decision_tree::try_switch_expansion): Use
11106         gimple_switch_default_edge.
11107         * tree-vrp.c (find_switch_asserts): Pass new argument
11108         to label_to_block.
11109         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
11110         (vr_values::simplify_switch_using_ranges): Likewise.
11112 2018-08-27  Richard Biener  <rguenther@suse.de>
11114         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
11115         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
11117         * tree-ssa-sccvn.h (struct vn_pval): New structure.
11118         (struct vn_nary_op_s): Add unwind_to member.  Add
11119         predicated_values flag and put result into a union together
11120         with a linked list of vn_pval.
11121         (struct vn_ssa_aux): Add name member to make maintaining
11122         a map of SSA name to vn_ssa_aux possible.  Remove no longer
11123         needed info, dfsnum, low, visited, on_sccstack, use_processed
11124         and range_info_anti_range_p members.
11125         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
11126         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
11127         New functions.
11128         (vn_valueize): New global.
11129         (vn_context_bb): Likewise.
11130         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
11131         VN_INFO_PTR_INFO): Remove.
11132         * tree-ssa-sccvn.c: ... (rewrite)
11133         (pass_fre::execute): For -O2+ initialize loops and run
11134         RPO VN in optimistic mode (iterating).  For -O1 and -Og
11135         run RPO VN in non-optimistic mode.
11136         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
11137         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
11138         * doc/invoke.texi (sccvn-max-scc-size): Remove.
11139         (rpo-vn-max-loop-depth): Document.
11140         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
11141         when valuezing the VUSE signals we walked out of the region.
11142         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
11143         (phi_translate): Set VN context block to use for availability
11144         lookup.
11145         (compute_avail): Likewise.
11146         (pre_valueize): New function.
11147         (pass_pre::execute): Adjust to the RPO VN API.
11149         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
11150         (propagate_constants_for_unrolling): Remove.
11151         (tree_unroll_loops_completely): Perform value-numbering
11152         on the unrolled bodies loop parent.
11154 2018-08-27  Richard Biener  <rguenther@suse.de>
11156         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
11157         for partial antic compute.
11159 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
11161         PR rtl-optimization/87065
11162         * combine.c (simplify_if_then_else): Formatting fix.
11163         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
11164         check.
11165         (known_cond): Don't return const_true_rtx for vector modes.  Use
11166         CONST0_RTX instead of const0_rtx.  Formatting fixes.
11168 2018-08-27  Martin Liska  <mliska@suse.cz>
11170         PR gcov-profile/87069
11171         * gcov.c (process_file): Record files already processed
11172         and warn about a file being processed multiple times.
11174 2018-08-27  Martin Liska  <mliska@suse.cz>
11176         PR driver/83193
11177         * config/aarch64/aarch64.c (aarch64_override_options_internal):
11178         Set default values for x_aarch64_*_string strings.
11179         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
11180         prefix.  For -mabi do not print '=ABI' in help and use
11181         <option_value> format for -msve-vector-bits and -moverride
11182         options.
11184 2018-08-26  Jeff Law  <law@redhat.com>
11186         * config/mips/frame-header-opt.c: Include "backend.h" rather than
11187         "cfg.h"
11189 2018-08-26  Marek Polacek  <polacek@redhat.com>
11191         PR c++/87029, Implement -Wredundant-move.
11192         * doc/invoke.texi: Document -Wredundant-move.
11194 2018-08-25  Martin Sebor  <msebor@redhat.com>
11196         PR tree-optimization/87059
11197         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
11198         to the same type as the other.
11199         * fold-const.c (fold_binary_loc): Assert expectation.
11201 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
11203         * config/darwin.c (machopic_legitimize_pic_address): Clean up
11204         extraneous parentheses, dead code section and formatting.
11206 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
11208         PR c++/87091
11209         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
11210         wide enough for jumps in the line-numbering to be visible.
11211         (layout::print_gap_in_line_numbering): New member function.
11212         (layout::calculate_line_spans): When using line numbering, merge
11213         line spans that are only 1 line apart.
11214         (diagnostic_show_locus): When printing line numbers, show gaps in
11215         line numbering directly, rather than printing headers.
11216         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
11217         line-numbering with multiple line spans.
11218         (selftest::test_fixit_insert_containing_newline_2): Add test of
11219         line-numbering, in which the spans are close enough to be merged.
11221 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
11223         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
11224         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
11225         * tree-vrp.c (range_is_nonnull): Remove.
11226         (range_includes_zero_p): Accept value_range instead of min/max.
11227         (extract_range_from_binary_expr_1): Do not early bail on
11228         POINTER_PLUS_EXPR.
11229         Use range_includes_zero_p instead of range_is_nonnull.
11230         (extract_range_from_unary_expr): Use range_includes_zero_p instead
11231         of range_is_nonnull.
11232         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
11233         special case VR_ANTI_RANGE.
11234         (vrp_finalize): Same.
11235         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
11236         instead of min/max.
11237         (range_is_nonnull): Remove.
11238         * vr-values.c (vrp_stmt_computes_nonzero): Use
11239         range_includes_zero_p instead of range_is_nonnull.
11240         (extract_range_basic): Pass value_range to range_includes_zero_p
11241         instead of range_is_nonnull.
11243 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
11245         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
11246         * emit-rtl.h (rtl_data): Remove return_bnd.
11247         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
11248         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
11249         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
11250         (POINTER_BOUNDS_MODE): Remove definition.
11251         (make_pointer_bounds_mode): Remove.
11252         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
11253         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
11254         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
11255         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
11256         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
11257         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
11258         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
11260         * config/i386/i386-modes.def (BND32, BND64): Remove.
11261         * config/i386/i386.c (dbx_register_map): Remove bound registers.
11262         (dbx64_register_map): Ditto.
11263         (svr4_dbx_register_map): Ditto.
11264         (indirect_thunk_bnd_needed): Remove.
11265         (indirect_thunks_bnd_used): Ditto.
11266         (indirect_return_bnd_needed): Ditto.
11267         (indirect_return_via_cx_bnd): Ditto.
11268         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
11269         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
11270         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
11271         (output_indirect_thunk_function): Remove handling of
11272         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
11273         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
11274         (ix86_save_reg): Remove handling of crtl->return_bnd.
11275         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
11276         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
11277         and UNSPEC_BNDLX_ADDR.
11278         (ix86_output_indirect_branch_via_reg): Remove handling of
11279         indirect_thunk_prefix_bnd.
11280         (ix86_output_indirect_branch_via_push): Ditto.
11281         (ix86_output_function_return): Ditto.
11282         (ix86_output_indirect_function_return): Ditto.
11283         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
11284         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
11285         (CALL_USED_REGISTERS): Ditto.
11286         (REG_ALLOC_ORDER): Update for removal of bound registers.
11287         (HI_REGISTER_NAMES): Ditto.
11288         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
11289         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
11290         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
11291         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
11292         (FIRST_PSEUDO_REG): Update.
11293         (BND): Remove mode iterator.
11294         * config/i386/predicates.md (bnd_mem_operator): Remove.
11296 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
11298         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
11299         vectors.
11301 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
11303         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
11304         the case in which the permute needs only a single element and
11305         repeats for every vector of the result.  Extend that case to
11306         handle variable-length vectors.
11307         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
11309 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
11311         PR debug/79342
11312         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
11313         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
11315 2018-08-24  Richard Biener  <rguenther@suse.de>
11317         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
11318         bb_flags_allocated members.
11319         (auto_flag): New RAII class for allocating flags.
11320         (auto_edge_flag): New RAII class for allocating edge flags.
11321         (auto_bb_flag): New RAII class for allocating bb flags.
11322         * cfgloop.c (verify_loop_structure): Allocate temporary edge
11323         flag dynamically.
11324         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
11325         in favor of temporarily allocated BB flag.
11326         * hsa-brig.c: Re-order includes.
11327         * hsa-dump.c: Likewise.
11328         * hsa-regalloc.c: Likewise.
11329         * print-rtl.c: Likewise.
11330         * profile-count.c: Likewise.
11332 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
11334         PR target/86989
11335         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
11336         the TOC register.
11338 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
11340         PR 87073/bootstrap
11341         * wide-int-range.cc (wide_int_range_div): Do not ignore result
11342         from wide_int_range_multiplicative_op.
11344 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11346         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
11347         "permutaion".
11349 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
11351         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
11352         to 'expanded'.
11354 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
11356         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
11357         full GENERIC expression used for replacement.
11359 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
11361         * tree-vrp.c (abs_extent_range): Remove.
11362         (extract_range_into_wide_ints): Pass wide ints by reference.
11363         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
11364         Pass wide ints by reference in all calls to
11365         extract_range_into_wide_ints.
11366         * wide-int-range.cc (wide_int_range_div): New.
11367         * wide-int-range.h (wide_int_range_div): New.
11368         (wide_int_range_includes_zero_p): New.
11369         (wide_int_range_zero_p): New.
11371 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
11373         * config/aarch64/aarch64.md (arches): New enum.
11374         (arch): New enum attr.
11375         (arch_enabled): New attr.
11376         (enabled): Now uses arch_enabled only.
11377         (simd, sve, fp16): Removed attribute.
11378         (fp): Attr now defined in terms of 'arch'.
11379         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
11380         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
11381         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
11382         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
11383         attributes into 'arch'.
11384         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
11385         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
11386         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
11387         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
11388         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
11389         'simd' attribute into 'arch'.
11390         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
11391         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
11392         Convert use of 'fp' attribute to 'arch'.
11393         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
11394         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
11395         into 'arch'.
11396         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
11397         (different modes) Merge 'fp' and 'simd' into 'arch'.
11398         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
11399         'simd' into 'arch'.
11401 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
11403         PR rtl-optimization/87026
11404         * expmed.c (canonicalize_comparison): If we can no longer create
11405         pseudoregisters, don't.
11407 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
11409         PR target/86951
11410         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
11411         prototype.
11412         * config/arm/arm.c (speculation_barrier_libfunc): New static
11413         variable.
11414         (arm_init_libfuncs): Initialize it.
11415         (arm_emit_speculation_barrier): New function.
11416         * config/arm/arm.md (speculation_barrier): Call
11417         arm_emit_speculation_barrier for architectures that do not have
11418         DSB or ISB.
11419         (speculation_barrier_insn): Only match on Armv7 or later.
11421 2018-08-23  Richard Biener  <rguenther@suse.de>
11423         PR middle-end/87024
11424         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
11425         calls.
11427 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
11429         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
11430         of single-vector TBLs.
11431         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
11432         one input is given.
11434 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
11436         PR target/85910
11437         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
11438         aarch64_evpc_tbl guard.
11440 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11442         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
11443         behaviour.
11445 2018-08-22  Martin Sebor  <msebor@redhat.com>
11447         PR middle-end/87052
11448         * tree-pretty-print.c (pretty_print_string): Add argument.
11449         (dump_generic_node): Call to pretty_print_string with string size.
11451 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
11453         PR rtl-optimization/86771
11454         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
11455         of two SETs into those two SETs, one to be placed at i2, if that SETs
11456         destination is modified between i2 and i3.
11458 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
11460         PR tree-optimization/86725
11461         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
11462         function.
11463         (vect_analyze_scalar_cycles_1): Check it.
11465 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
11467         PR tree-optimization/86725
11468         * tree-vect-loop.c (vect_is_simple_reduction): When treating
11469         an outer loop phi as a double reduction, make sure that the
11470         single user of the phi result is an inner loop phi.
11472 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
11474         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
11475         grouped stores with gaps to a strided group.
11477 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
11479         * tree-vect-stmts.c (get_group_load_store_type)
11480         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
11481         first statement in a group.
11483 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
11485         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
11486         the sequence used in gcc/gcc.c.
11488 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
11490         PR other/704
11491         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
11492         building it.
11494 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
11496         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
11497         Darwin10-specific unwinder-shim.
11498         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
11499         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
11500         New to cater for Darwin10 Rosetta.
11502 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
11504         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
11505         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
11507 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
11509         PR bootstrap/81033
11510         PR target/81733
11511         PR target/52795
11512         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
11513         (dwarf2out_switch_text_section): Generate a local label for the
11514         second function sub-section and apply it as the second FDE start
11515         label.
11516         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
11517         second sub-section start.
11519 2018-08-22  Richard Biener  <rguenther@suse.de>
11521         PR tree-optimization/86988
11522         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
11524 2018-08-22  Richard Biener  <rguenther@suse.de>
11526         PR tree-optimization/86945
11527         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
11529 2018-08-22  Alexandre Oliva <oliva@adacore.com>
11531         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
11532         a comment about how uses of r2 for .sdata2 come about.
11534 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
11536         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
11538 2018-08-21  Marek Polacek  <polacek@redhat.com>
11540         PR c++/86981, Implement -Wpessimizing-move.
11541         * doc/invoke.texi: Document -Wpessimizing-move.
11543 2018-08-21  Jan Hubicka  <jh@suse.cz>
11545         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
11546         * tree.h (is_redundant_typedef): Remove.
11547         * dwarf2out.c (is_redundant_typedef): Turn into static function.
11549 2018-08-21  Jan Hubicka  <jh@suse.cz>
11551         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
11552         when possible.
11554 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
11556         * expmed.c (extract_low_bits): Reject invalid subregs early.
11558 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11560         PR middle-end/86121
11561         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
11562         behaviour.
11564 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
11566         * config/vxworks.h: Guard vxworks_asm_out_constructor and
11567         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
11568         * config/vxworks.c: Likewise.
11570 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
11572         * config/vxworks.c: Set targetm.have_ctors_dtors
11573         if HAVE_INITFINI_ARRAY_SUPPORT.
11574         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
11575         if HAVE_INITFINI_ARRAY_SUPPORT.
11577 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
11579         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
11580         default search path for VxWorks < 7.
11582 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11584         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
11585         (get_format_string): Refer to c_getstr.
11587 2018-08-21  Tom de Vries  <tdevries@suse.de>
11589         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
11590         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
11591         (debuginfo_early_stop): Declare.
11592         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
11593         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
11594         (debuginfo_early_stop): New function.
11595         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
11596         and debuginfo_early_stop.
11597         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
11598         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
11599         (general_init): Call debuginfo_early_init.
11600         (finalize): Call debuginfo_fini.
11601         (do_compile): Call debuginfo_init.
11602         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
11603         -fdump-early-debug.
11604         (@item -fdump-debug, @item -fdump-earlydebug): Add.
11606 2018-08-21  Tom de Vries  <tdevries@suse.de>
11608         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
11609         flag_dump_noaddr and flag_dump_unnumbered.
11611 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
11613         * wide-int-range.cc (wide_int_range_abs): New.
11614         (wide_int_range_order_set): Rename from wide_int_range_min_max.
11615         * wide-int-range.h (wide_int_range_abs): New.
11616         (wide_int_range_min_max): New.
11617         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
11618         case to call wide_int_range_abs.
11619         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
11620         (extract_range_from_abs_expr): Delete.
11622 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
11624         PR target/87033
11625         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
11626         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
11627         for indexed loads.
11629 2018-08-20  Nathan Sidwell  <nathan@acm.org>
11630             Jeff Law <law@redhat.com>
11632         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
11633         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
11635 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
11637         PR other/84889
11638         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
11639         (decl_attributes): Likewise.
11640         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
11641         instance.
11642         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
11643         * diagnostic-core.h (class auto_diagnostic_group): New class.
11644         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
11645         (diagnostic_report_diagnostic): Handle the first diagnostics within
11646         a group.
11647         (emit_diagnostic): Add auto_diagnostic_group instance.
11648         (inform): Likewise.
11649         (inform_n): Likewise.
11650         (warning): Likewise.
11651         (warning_at): Likewise.
11652         (warning_n): Likewise.
11653         (pedwarn): Likewise.
11654         (permerror): Likewise.
11655         (error): Likewise.
11656         (error_n): Likewise.
11657         (error_at): Likewise.
11658         (sorry): Likewise.
11659         (fatal_error): Likewise.
11660         (internal_error): Likewise.
11661         (internal_error_no_backtrace): Likewise.
11662         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
11663         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
11664         * diagnostic.h (struct diagnostic_context): Add fields
11665         "diagnostic_group_nesting_depth",
11666         "diagnostic_group_emission_count", "begin_group_cb",
11667         "end_group_cb".
11668         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
11669         Add auto_diagnostic_group instance(s).
11670         (find_explicit_erroneous_behavior): Likewise.
11671         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
11672         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
11673         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
11674         (gimplify_va_arg_expr): Likewise.
11675         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
11676         (HSA_SORRY_AT): Likewise.
11677         * ipa-devirt.c (compare_virtual_tables): Likewise.
11678         (warn_odr): Likewise.
11679         * multiple_target.c (expand_target_clones): Likewise.
11680         * opts-common.c (cmdline_handle_error): Likewise.
11681         * reginfo.c (globalize_reg): Likewise.
11682         * substring-locations.c (format_warning_n_va): Likewise.
11683         * tree-inline.c (expand_call_inline): Likewise.
11684         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
11685         * tree-ssa-loop-niter.c
11686         (do_warn_aggressive_loop_optimizations): Likewise.
11687         * tree-ssa-uninit.c (warn_uninit): Likewise.
11688         * tree.c (warn_deprecated_use): Likewise.
11690 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
11692         PR target/87014
11693         * config/i386/i386.md (eh_return): Always update EH return
11694         address in word_mode.
11696 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
11698         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
11699         TARGET_SPLIT_COMPLEX_ARG is defined.
11701 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11703         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
11705 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11707         PR target/86984
11708         * expr.c (expand_assignment): Assert that bitpos is positive.
11709         (store_field): Likewise
11710         (expand_expr_real_1): Make sure that bitpos is positive.
11711         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
11712         integer overflow.
11714 2018-08-20  Nathan Sidwell  <nathan@acm.org>
11716         * Makefile.in (CPP_ID_DATA_H): Delete.
11717         (CPP_INTERNAL_H): Don't add it.
11718         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
11719         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
11721 2018-08-20  Richard Biener  <rguenther@suse.de>
11723         PR tree-optimization/78655
11724         * tree-vrp.c (extract_range_from_binary_expr_1): Make
11725         pointer + offset nonnull if either operand is nonnull work.
11727 2018-08-20  Tom de Vries  <tdevries@suse.de>
11729         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
11730         unless the referenced die describes the added property using
11731         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
11732         Otherwise, add a DW_AT_location to the referenced die.
11734 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
11736         PR target/86994
11737         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
11738         register_operand when calling ix86_set_reg_reg_cost.
11739         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
11740         Set *total to 0 for operands that satisfy x86_64_immediate_operand
11741         predicate and to 1 otherwise.
11743 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
11745         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
11746         emit a diagnostic that it is not supported and reset the option.
11747         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
11748         supported and consume the option.  (ASM_FINAL_SPEC): New.
11750 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
11752         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
11753         a sentence.
11755 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
11757         C-SKY port: Documentation
11759         * doc/extend.texi (C-SKY Function Attributes): New section.
11760         * doc/invoke.texi (Option Summary): Add C-SKY options.
11761         (C-SKY Options): New section.
11762         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
11764 2018-08-17  Jojo  <jijie_rong@c-sky.com>
11765             Huibin Wang  <huibin_wang@c-sky.com>
11766             Sandra Loosemore  <sandra@codesourcery.com>
11767             Chung-Lin Tang  <cltang@codesourcery.com>
11769         C-SKY port: Backend implementation
11771         * config/csky/*: New.
11772         * common/config/csky/*: New.
11774 2018-08-17  Jojo  <jijie_rong@c-sky.com>
11775             Huibin Wang  <huibin_wang@c-sky.com>
11776             Sandra Loosemore  <sandra@codesourcery.com>
11777             Chung-Lin Tang  <cltang@codesourcery.com>
11778             Andrew Jenner  <andrew@codesourcery.com>
11780         C-SKY port: Configury
11782         * config.gcc (csky-*-*): New.
11783         * configure.ac: Add csky to targets for dwarf2 debug_line support.
11784         * configure: Regenerated.
11786 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
11788         * dump-context.h: Include "dumpfile.h".
11789         (dump_context::dump_printf_va): Convert final param from va_list
11790         to va_list *.  Convert from ATTRIBUTE_PRINTF to
11791         ATTRIBUTE_GCC_DUMP_PRINTF.
11792         (dump_context::dump_printf_loc_va): Likewise.
11793         * dumpfile.c: Include "stringpool.h".
11794         (make_item_for_dump_printf_va): Delete.
11795         (make_item_for_dump_printf): Delete.
11796         (class dump_pretty_printer): New class.
11797         (dump_pretty_printer::dump_pretty_printer): New ctor.
11798         (dump_pretty_printer::emit_items): New member function.
11799         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
11800         function.
11801         (dump_pretty_printer::emit_item): New member function.
11802         (dump_pretty_printer::stash_item): New member function.
11803         (dump_pretty_printer::format_decoder_cb): New member function.
11804         (dump_pretty_printer::decode_format): New member function.
11805         (dump_context::dump_printf_va): Reimplement in terms of
11806         dump_pretty_printer.
11807         (dump_context::dump_printf_loc_va): Convert final param from va_list
11808         to va_list *.
11809         (dump_context::begin_scope): Reimplement call to
11810         make_item_for_dump_printf.
11811         (dump_printf): Update for change to dump_printf_va.
11812         (dump_printf_loc): Likewise.
11813         (selftest::test_capture_of_dump_calls): Convert "stmt" from
11814         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
11815         with %T, %E, and %G.
11816         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
11817         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
11818         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
11819         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
11820         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
11821         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
11822         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
11823         within a dump_printf_loc call to "%wu".
11824         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
11825         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
11826         missing space after "=".
11827         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
11828         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
11829         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
11830         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
11831         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
11832         duplicate "vectorized" from message.
11834 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
11836         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
11837         polyNxK_t element's TYPE_STRING_FLAG.
11839 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
11841         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
11842         (they were unnamed before).  Fix comments.
11844 2018-08-17  Nathan Sidwell  <nathan@acm.org>
11846         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
11848 2018-08-17  Richard Biener  <rguenther@suse.de>
11850         PR tree-optimization/86841
11851         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
11853 2018-08-17  Martin Liska  <mliska@suse.cz>
11855         * common.opt: Remove Warn, Init and Report for options with
11856         Ignore/Deprecated flag. Warning is done automatically for
11857         Deprecated flags.
11858         * config/i386/i386.opt: Likewise.
11859         * config/ia64/ia64.opt: Likewise.
11860         * config/rs6000/rs6000.opt: Likewise.
11861         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
11862         Remove usage of flag_check_pointer_bounds.
11863         * lto-wrapper.c (merge_and_complain): Do not handle
11864         OPT_fcheck_pointer_bounds.
11865         (append_compiler_options): Likewise.
11866         * opt-functions.awk: Do not handle Deprecated.
11867         * optc-gen.awk: Check that Var, Report and Init are not
11868         used for an option with Ignore/Deprecated flag.
11869         * opts-common.c (decode_cmdline_option): Do not report
11870         CL_ERR_DEPRECATED.
11871         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
11872         options.
11873         * opts.h (struct cl_option): Remove cl_deprecated flag.
11874         (CL_ERR_DEPRECATED): Remove error enum value.
11876 2018-08-17  Richard Biener  <rguenther@suse.de>
11878         PR middle-end/86505
11879         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
11880         across a va-arg-pack using call adjust its return value accordingly.
11882 2018-08-16  Martin Sebor  <msebor@redhat.com>
11884         PR tree-optimization/86853
11885         * gimple-ssa-sprintf.c (struct format_result): Rename member.
11886         (struct fmtresult): Add member and initialize it in ctors.
11887         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
11888         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
11889         (format_directive): Set POSUNDER4K when MAYFAIL is set.
11890         (parse_directive): Handle %C same as %c.
11891         (sprintf_dom_walker::compute_format_length): Adjust.
11892         (is_call_safe): Adjust.
11894 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11896         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
11897         for determining how to count the elements.
11898         * builtins.h (c_strlen): Adjust prototype.
11899         * expr.c (string_constant): Add new parameter mem_size.
11900         Set *mem_size appropriately.
11901         * expr.h (string_constant): Adjust protoype.
11902         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
11903         * gimple-fold.h (get_range_strlen): Adjust prototype.
11904         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
11905         (format_string): Call get_string_length with eltsize.
11907 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
11909         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
11910         to emit the span, rather than setting it as the prefix.
11912 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
11914         * diagnostic-show-locus.c (layout::start_annotation_line): Add
11915         "margin_char" parameter, defaulting to space.  Use it in place
11916         of pp_space for the initial part of the margin.
11917         (layout::print_leading_fixits): Use '+' when filling the margin
11918         of line-insertion fix-it hints.
11920 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
11922         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
11923         Delete.
11925 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
11927         * config/rs6000/altivec.md: Don't set length attribute to the default
11928         value.
11929         * config/rs6000/darwin.md: Ditto.
11930         * config/rs6000/dfp.md: Ditto.
11931         * config/rs6000/htm.md: Ditto.
11932         * config/rs6000/rs6000.md: Ditto.
11933         * config/rs6000/sync.md: Ditto.
11934         * config/rs6000/vsx.md: Ditto.
11936 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
11938         * config/rs6000/altivec.md: Don't set length attribute to the default
11939         value, for branch instructions.
11940         * config/rs6000/darwin.md: Ditto.
11941         * config/rs6000/rs6000.md: Ditto.
11943 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
11945         * config/rs6000/rs6000.md (length): Always define as const_int 4.
11946         (unnamed conditional branch define_insn): Set length to 4 or 8
11947         depending on offset.
11948         (<bd>_<mode>): Similar, for alternative 0.
11949         (<bd>tf_<mode>): Ditto.
11951 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
11953         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
11955 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
11957         * doc/rtl.texi: Replace old RTX class names with new names.
11960 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
11962         * expmed.h (canonicalize_comparison): New declaration.
11963         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
11964         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
11965         * optabs.c (prepare_cmp_insn): Likewise.
11966         * rtl.h (unsigned_condition_p): New function which checks if a
11967         comparison operator is unsigned.
11969 2018-08-16  Nathan Sidwell  <nathan@acm.org>
11971         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
11972         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
11974 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
11976         PR target/84711
11977         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
11978         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
11979         (mov<mov>): ..this and enable unconditionally.
11981 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
11983         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
11985 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
11987         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
11988         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
11989         "Common" with "Target".
11991 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
11993         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
11994         * doc/invoke.texi (mmitigate-rop): Remove.
11995         * config/i386/i386.c: Do not include "regrename.h".
11996         (ix86_rop_should_change_byte_p, reg_encoded_number)
11997         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
11998         Remove.
11999         (ix86_reorg): Remove call to ix86_mitigate_rop.
12000         * config/i386/i386.md (attr "modrm_class"): Remove.
12001         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
12002         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
12003         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
12005 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
12007         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
12008         allow folding of mergeh() and mergel() for the float and double types.
12009         (fold_mergehl_helper): Rework to handle building a permute tree
12010         for float vectors.
12012 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
12014         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
12015         for TARGET_SSE.
12017 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
12019         * common.opt (fdiagnostics-show-labels): New option.
12020         * diagnostic-show-locus.c (class layout_range): Add field
12021         "m_label".
12022         (class layout): Add field "m_show_labels_p".
12023         (layout_range::layout_range): Add param "label" and use it to
12024         initialize m_label.
12025         (make_range): Pass in NULL for new "label" param of layout_range's
12026         ctor.
12027         (layout::layout): Initialize m_show_labels_p.
12028         (layout::maybe_add_location_range): Pass in loc_range->m_label
12029         when constructing layout_range instances.
12030         (struct line_label): New struct.
12031         (layout::print_any_labels): New member function.
12032         (layout::print_line): Call it if label-printing is enabled.
12033         (selftest::test_one_liner_labels): New test.
12034         (selftest::test_diagnostic_show_locus_one_liner): Call it.
12035         * diagnostic.c (diagnostic_initialize): Initialize
12036         context->show_labels_p.
12037         * diagnostic.h (struct diagnostic_context): Add field
12038         "show_labels_p".
12039         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
12040         -fno-diagnostics-show-labels.
12041         * dwarf2out.c (gen_producer_string): Add
12042         OPT_fdiagnostics_show_labels to the ignored options.
12043         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
12044         param.
12045         (gcc_rich_location::maybe_add_expr): Likewise.
12046         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
12047         label" param, defaulting to NULL.
12048         (gcc_rich_location::add_expr): Add "label" param.
12049         (gcc_rich_location::maybe_add_expr): Likewise.
12050         (class text_range_label): New class.
12051         (class range_label_for_type_mismatch): New class.
12052         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
12053         of format_warning_va.
12054         (fmtwarn_n): Likewise for new params of format_warning_n_va.
12055         * lto-wrapper.c (merge_and_complain): Add
12056         OPT_fdiagnostics_show_labels to the "pick one setting" options.
12057         (append_compiler_options): Likewise to the dropped options.
12058         (append_diag_options): Likewise to the passed-on options.
12059         * opts.c (common_handle_option): Handle the new option.
12060         * selftest-diagnostic.c
12061         (test_diagnostic_context::test_diagnostic_context): Enable
12062         show_labels_p.
12063         * substring-locations.c: Include "gcc-rich-location.h".
12064         (format_warning_n_va): Add "fmt_label" and "param_label" params
12065         and use them as appropriate.
12066         (format_warning_va): Add "fmt_label" and "param_label" params,
12067         passing them on to format_warning_n_va.
12068         (format_warning_at_substring): Likewise.
12069         (format_warning_at_substring_n): Likewise.
12070         * substring-locations.h (format_warning_va): Add "fmt_label" and
12071         "param_label" params.
12072         (format_warning_n_va): Likewise.
12073         (format_warning_at_substring): Likewise.
12074         (format_warning_at_substring_n): Likewise.
12075         * toplev.c (general_init): Initialize global_dc->show_labels_p.
12077 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
12079         PR testsuite/86519
12080         * builtins.c (expand_builtin_memcmp): Do not expand the call
12081         when overflow is detected.
12083 2018-08-15  Martin Sebor  <msebor@redhat.com>
12085         PR tree-optimization/71625
12086         * config/aarch64/aarch64-builtins.c
12087         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
12089 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
12091         * config/s390/s390.c (s390_reorg): Remove loop.
12093 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
12095         * config/darwin.c
12096          (darwin_function_switched_text_sections): Delete.
12097         * gcc/config/darwin.h
12098          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
12100 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
12102         PR target/81685
12103         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
12104         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
12105         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
12107 2018-08-15  Martin Liska  <mliska@suse.cz>
12109         PR tree-optimization/86925
12110         * predict.c (expr_expected_value_1): When taking
12111         later predictor, assign also probability.
12112         Use fold_build2_initializer_loc in order to fold
12113         the expression in -frounding-math.
12115 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
12117         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
12118         patterns.
12119         (expand_vec_perm_1): Try the new method.
12121 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
12123         PR target/86547
12124         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
12125         Check whether lra_live_max_point is 0 before dividing.
12127 2018-08-14  Martin Sebor  <msebor@redhat.com>
12129         PR tree-optimization/86650
12130         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
12131         (vrp_prop::check_mem_ref): Same.
12133 2018-08-13  Liu Hao <lh_mouse@126.com>
12135         * pretty-print.c (eat_esc_sequence): Swap the foreground and
12136         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
12137         and clear it thereafter, as it only works for DBCS.
12139 2018-08-13  Liu Hao <lh_mouse@126.com>
12141         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
12142         handle returned by _get_osf_handle().
12144 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
12146         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
12147         for folding vec_perm.
12149 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
12151         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
12152         Add support for gimple-folding of vec_pack() and vec_unpack()
12153         intrinsics.
12155 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
12157         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
12158         vec_xst variants to the list.
12159         (rs6000_gimple_fold_builtin): Add support for folding unaligned
12160         vector loads and stores.
12162 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
12164         * config.gcc (rs6000-ibm-aix4.x): Delete.
12165         (rs6000-ibm-aix5.1): Delete.
12166         (rs6000-ibm-aix5.2): Delete.
12167         (rs6000-ibm-aix5.3): Delete.
12168         * config/rs6000/aix43.h: Delete.
12169         * config/rs6000/aix51.h: Delete.
12170         * config/rs6000/aix52.h: Delete.
12171         * config/rs6000/t-aix43: Delete.
12173 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
12175         * config/s390/s390.c (s390_decompose_constant_pool_ref):
12176         New function.
12177         (s390_decompose_address): Factor out constant pool ref
12178         decomposition.
12180 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
12182         * config/nds32/nds32-predicates.c
12183         (nds32_can_use_bclr_p): Change return type as bool.
12184         (nds32_can_use_bset_p): Ditto.
12185         (nds32_can_use_btgl_p): Ditto.
12186         (nds32_can_use_bitci_p): Ditto.
12187         * config/nds32/nds32-protos.h
12188         (nds32_can_use_bclr_p): Change declaration.
12189         (nds32_can_use_bset_p): Ditto.
12190         (nds32_can_use_btgl_p): Ditto.
12191         (nds32_can_use_bitci_p): Ditto.
12193 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
12195         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
12196         Support -msched-prolog-epilog option.
12197         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
12199 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
12201         * common/config/nds32/nds32-common.c
12202         (nds32_option_optimization_table): Enalbe -malways-align.
12204 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
12206         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
12207         extra_headers.
12208         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
12209         OPT_misr_secure_ case.
12210         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
12211         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
12212         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
12213         secure attribute.
12214         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
12215         (nds32_isr_info): New field security_level.
12216         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
12217         * config/nds32/nds32.md (return_internal): Consider critical attribute.
12218         * config/nds32/nds32.opt (misr-secure): New option.
12219         * config/nds32/nds32_init.inc: New file.
12220         * config/nds32/nds32_isr.h: New file.
12222 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
12224         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
12225         Update comment for atomic instructions.
12226         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
12227         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
12228         Remove.
12229         (atomic_loaddi): Revise fence expansion to only emit fence prior to
12230         load for __ATOMIC_SEQ_CST model.
12231         (atomic_loaddi_1): Remove float register target.
12232         (atomic_storedi): Handle CONST_INT values.
12233         (atomic_storedi_1): Remove float register source.  Add special case
12234         for zero value.
12235         (memory_barrier): New expander and insn.
12237 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
12239         PR tree-optimization/86835
12240         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
12241         new_stmt after def_gsi, make sure to insert new_square_stmt after
12242         that stmt, not 2 stmts before it.
12244 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
12246         PR target/82418
12247         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
12248         instead of SWI48.
12250 2018-08-10  Martin Liska  <mliska@suse.cz>
12252         PR target/83610
12253         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
12254         function type.
12255         * builtins.c (expand_builtin_expect_with_probability):
12256         New function.
12257         (expand_builtin_expect_with_probability): New function.
12258         (build_builtin_expect_predicate): Add new argumnet probability
12259         for BUILT_IN_EXPECT_WITH_PROBABILITY.
12260         (fold_builtin_expect):
12261         (fold_builtin_2):
12262         (fold_builtin_3):
12263         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
12264         * builtins.h (fold_builtin_expect): Set new argument.
12265         * doc/extend.texi: Document __builtin_expect_with_probability.
12266         * doc/invoke.texi: Likewise.
12267         * gimple-fold.c (gimple_fold_call): Pass new argument.
12268         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
12269         also BUILT_IN_EXPECT_WITH_PROBABILITY.
12270         * predict.c (get_predictor_value): New function.
12271         (expr_expected_value): Add new argument probability. Assume
12272         that predictor and probability are always non-null.
12273         (expr_expected_value_1): Likewise.  For __builtin_expect and
12274         __builtin_expect_with_probability set probability.  Handle
12275         combination in binary expressions.
12276         (tree_predict_by_opcode): Simplify code by simply calling
12277         get_predictor_value.
12278         (pass_strip_predict_hints::execute): Add handling of
12279         BUILT_IN_EXPECT_WITH_PROBABILITY.
12280         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
12281         new predictor.
12282         * tree.h (DECL_BUILT_IN_P): New function.
12284 2018-08-10  Martin Liska  <mliska@suse.cz>
12286         PR tree-optimization/85799
12287         * passes.def: Add argument for pass_strip_predict_hints.
12288         * predict.c (class pass_strip_predict_hints): Add new argument
12289         early_p.
12290         (strip_predictor_early): New function.
12291         (pass_strip_predict_hints::execute): Call the function to
12292         strip predictors.
12293         (strip_predict_hints): New function.
12294         * predict.def: Fix comment.
12296 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
12298         * Makefile.in: Clarify which tm.texi to copy over to assert the
12299         right to grant a GFDL license for all.
12301 2018-08-09  Jeff Law  <law@redhat.com>
12303         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
12304         unused variable.
12306 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
12308         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
12309         prototype.
12311 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
12313         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
12314         reductions for variable-length vectors.
12316 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
12318         PR other/84889
12319         * common.opt (fdiagnostics-show-line-numbers): New option.
12320         * diagnostic-show-locus.c (class layout): Add fields
12321         "m_show_line_numbers_p" and "m_linenum_width";
12322         (num_digits): New function.
12323         (test_num_digits): New function.
12324         (layout::layout): Initialize new fields.  Update m_x_offset
12325         logic to handle any left margin.
12326         (layout::print_source_line): Print line number when requested.
12327         (layout::start_annotation_line): New member function.
12328         (layout::print_annotation_line): Call it.
12329         (layout::print_leading_fixits): Likewise.
12330         (layout::print_trailing_fixits): Likewise.  Update calls to
12331         move_to_column for new parameter.
12332         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
12333         it to potentially call start_annotation_line.
12334         (layout::show_ruler): Call start_annotation_line.
12335         (selftest::test_line_numbers_multiline_range): New selftest.
12336         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
12337         and selftest::test_line_numbers_multiline_range.
12338         * diagnostic.c (diagnostic_initialize): Initialize
12339         show_line_numbers_p.
12340         * diagnostic.h (struct diagnostic_context): Add field
12341         "show_line_numbers_p".
12342         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
12343         -fno-diagnostics-show-line-numbers.
12344         * dwarf2out.c (gen_producer_string): Add
12345         OPT_fdiagnostics_show_line_numbers to the ignored options.
12346         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
12347         one setting" options.
12348         (append_compiler_options): Likewise to the dropped options.
12349         (append_diag_options): Likewise to the passed-on options.
12350         * opts.c (common_handle_option): Handle the new option.
12351         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
12353 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12355         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
12356         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
12357         third argument of type "const signed char" to descriptions of
12358         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
12359         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
12360         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
12361         __builtin_bcdsub_ov functions.
12363 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
12365         PR tree-optimization/86858
12366         * tree-vect-loop.c (vect_is_simple_reduction): Restore
12367         flow_bb_inside_loop_p calls.
12369 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
12371         PR tree-optimization/86871
12372         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
12373         instead of gimple_assign_lhs.
12375 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
12377         PR target/86887
12378         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
12379         register constraint to operand 0.
12380         (add<mode>3_carryinC): Likewise.
12381         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
12383 2018-08-09  Martin Liska  <mliska@suse.cz>
12385         PR c/86895
12386         * common.opt: Remove extra line.
12388 2018-08-09  Martin Liska  <mliska@suse.cz>
12390         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
12391         at the end of a line, make first letter capital and end up
12392         a sentence with a dot.
12393         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
12394         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
12395         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
12396         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
12397         (PARAM_MAX_ISL_OPERATIONS): Likewise.
12398         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
12399         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
12400         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
12401         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
12402         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
12403         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
12404         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
12405         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
12406         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
12407         (PARAM_TREE_REASSOC_WIDTH): Likewise.
12408         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
12409         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
12410         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
12412 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
12414         PR target/84332
12415         * config/s390/s390.c (s390_option_override_internal): Reduce the
12416         stack-clash-protection-probe-interval param if it would be too big
12417         for z900.
12419 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
12421         PR target/46179
12422         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
12423         * config/m68k/m68k.c (handle_move_double): Don't call
12424         m68k_final_prescan_insn.
12425         (m68k_adjust_decorated_operand): Renamed from
12426         m68k_final_prescan_insn, remove first and third operand and
12427         simplify.
12428         (print_operand): Call it.
12429         (print_operand_address): Call it.
12431 2018-08-08  Nathan Sidwell  <nathan@acm.org>
12433         * diagnostic.c (diagnostic_report_current_module): Use
12434         linemap_included_from & linemap_included_from_linemap.
12436 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
12438         * config/aarch64/aarch64-cores.def: Add phecda core.
12439         * config/aarch64/aarch64-tune.md: Regenerate.
12440         * doc/invoke.texi: Add phecda core.
12442 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
12444         PR target/85295
12445         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
12446         definitions.
12447         * config/s390/s390.md ("movti"): Add more alternatives for
12448         constant to GPR copies.
12450 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
12452         * config/s390/s390.c: Fix whitespace damage throughout the file.
12453         * config/s390/s390.h: Likewise.
12454         * config/s390/tpf.h: Likewise.
12456 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
12458         * config/s390/s390.c (s390_loadrelative_operand_p):
12459         Remove TARGET_CPU_ZARCH usages.
12460         (s390_rtx_costs): Likewise.
12461         (s390_legitimate_constant_p): Likewise.
12462         (s390_cannot_force_const_mem): Likewise.
12463         (legitimate_reload_constant_p): Likewise.
12464         (s390_preferred_reload_class): Likewise.
12465         (legitimize_pic_address): Likewise.
12466         (legitimize_tls_address): Likewise.
12467         (s390_split_branches): Removed.
12468         (s390_add_execute): Removed.
12469         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
12470         (s390_mainpool_start): Likewise.
12471         (s390_mainpool_finish): Likewise.
12472         (s390_mainpool_cancel): Removed.
12473         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
12474         (s390_chunkify_cancel): Likewise.
12475         (s390_return_addr_rtx): Likewise.
12476         (s390_register_info): Remove split_branches_pending_p uages.
12477         (s390_optimize_register_info): Likewise.
12478         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
12479         split_branches_pending_p usages.
12480         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
12481         (s390_load_got): Likewise.
12482         (s390_expand_split_stack_prologue): Likewise.
12483         (output_asm_nops): Likewise.
12484         (s390_function_profiler): Likewise.
12485         (s390_emit_call): Likewise.
12486         (s390_conditional_register_usage): Likewise.
12487         (s390_optimize_prologue): Likewise.
12488         (s390_reorg): Remove TARGET_CPU_ZARCH and
12489         split_branches_pending_p usages.
12490         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
12491         usages.
12492         (s390_output_indirect_thunk_function): Likewise.
12493         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
12494         (TARGET_CPU_ZARCH_P): Removed.
12495         (struct machine_function): Remove split_branches_pending_p.
12496         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
12498 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
12500         * common/config/s390/s390-common.c (processor_flags_table):
12501         Remove flags.
12502         * config.gcc: Remove with_arch/with_tune support.
12503         * config/s390/2064.md: Remove cpu attribute comparisons.
12504         * config/s390/driver-native.c (s390_host_detect_local_cpu):
12505         Remove MTN.
12506         * config/s390/linux.h (ASM_SPEC):
12507         Remove -march support.
12508         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
12509         Use a table to get an arch level.
12510         * config/s390/s390-opts.h (enum processor_type):
12511         Remove enum values.
12512         * config/s390/s390.c
12513         (processor_table): Remove entries, add arch_level values.
12514         (s390_issue_rate): Remove cases.
12515         (s390_option_override): Adjust
12516         s390_option_override_internal() call.
12517         (s390_option_override_internal): Remove deprecation warning.
12518         (s390_valid_target_attribute_tree): Adjust
12519         s390_option_override_internal() call.
12520         * config/s390/s390.h (struct s390_processor):
12521         Share with s390-c.c, add arch_level field.
12522         * config/s390/s390.md:
12523         Remove occurrences in cpu attribute.
12524         * config/s390/s390.opt: Remove -march/-mtune support.
12525         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
12526         * doc/invoke.texi: Remove deprecation warning.
12528 2018-08-08  Luis Machado  <luis.machado@linaro.org>
12530         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
12531         global.
12532         (qdf24xx_tunings): Set vector cost structure to
12533         qdf24xx_vector_cost.
12535         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
12536         <register_sextend>: Set to 3.
12538 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
12540         PR target/86838
12541         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
12542         * config/aarch64/aarch64-simd.md
12543         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
12544         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
12545         (aarch64_frecpx<mode>): ...this new pattern.
12546         * config/aarch64/aarch64-simd-builtins.def: Remove comment
12547         about aarch64_frecp<FRECP:frecp_suffix><mode>.
12549 2018-08-07  Martin Liska  <mliska@suse.cz>
12551         PR middle-end/83023
12552         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
12553         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
12554         * predict.def (PRED_MALLOC_NONNULL): New predictor.
12555         * doc/extend.texi: Document that malloc attribute adds
12556         hit to compiler.
12558 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
12560         PR target/86785
12561         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12562         Define to speculation_safe_value_not_needed.
12564 2018-08-06  Jeff Law  <law@redhat.com>
12566         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
12567         the vr_values instance to cprop_into_stmt.
12568         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
12569         (cprop_operand): Also query EVRP to determine if OP is a constant.
12571 2018-08-06  Nathan Sidwell  <nathan@acm.org>
12573         * diagnostic.c (diagnostic_report_current_module): Reroll
12574         included-at loop.  Translate text.
12576 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
12578         * function-tests.c (selftest::test_expansion_to_rtl): Call
12579         free_after_compilation.
12581 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
12583         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
12585 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
12587         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
12588         loops with memory block operations from getting unrolled.
12590 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
12592         PR target/86807
12593         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12594         Define to speculation_safe_value_not_needed.
12596 2018-08-06  Jeff Law  <law@redhat.com>
12598         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
12599         assert.
12601 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
12603         PR target/86662
12604         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
12605         with all enabled __intN types.
12607         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
12609 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
12611         * alias.c (record_set): Check for clobber high.
12612         * cfgexpand.c (expand_gimple_stmt): Likewise.
12613         * combine-stack-adj.c (single_set_for_csa): Likewise.
12614         * combine.c (find_single_use_1): Likewise.
12615         (set_nonzero_bits_and_sign_copies): Likewise.
12616         (get_combine_src_dest): Likewise.
12617         (is_parallel_of_n_reg_sets): Likewise.
12618         (try_combine): Likewise.
12619         (record_dead_and_set_regs_1): Likewise.
12620         (reg_dead_at_p_1): Likewise.
12621         (reg_dead_at_p): Likewise.
12622         * dce.c (deletable_insn_p): Likewise.
12623         (mark_nonreg_stores_1): Likewise.
12624         (mark_nonreg_stores_2): Likewise.
12625         * df-scan.c (df_find_hard_reg_defs): Likewise.
12626         (df_uses_record): Likewise.
12627         (df_get_call_refs): Likewise.
12628         * dwarf2out.c (mem_loc_descriptor): Likewise.
12629         * haifa-sched.c (haifa_classify_rtx): Likewise.
12630         * ira-build.c (create_insn_allocnos): Likewise.
12631         * ira-costs.c (scan_one_insn): Likewise.
12632         * ira.c (equiv_init_movable_p): Likewise.
12633         (rtx_moveable_p): Likewise.
12634         (interesting_dest_for_shprep): Likewise.
12635         * jump.c (mark_jump_label_1): Likewise.
12636         * postreload-gcse.c (record_opr_changes): Likewise.
12637         * postreload.c (reload_cse_simplify): Likewise.
12638         (struct reg_use): Add source expr.
12639         (reload_combine): Check for clobber high.
12640         (reload_combine_note_use): Likewise.
12641         (reload_cse_move2add): Likewise.
12642         (move2add_note_store): Likewise.
12643         * print-rtl.c (print_pattern): Likewise.
12644         * recog.c (decode_asm_operands): Likewise.
12645         (store_data_bypass_p): Likewise.
12646         (if_test_bypass_p): Likewise.
12647         * regcprop.c (kill_clobbered_value): Likewise.
12648         (kill_set_value): Likewise.
12649         * reginfo.c (reg_scan_mark_refs): Likewise.
12650         * reload1.c (maybe_fix_stack_asms): Likewise.
12651         (eliminate_regs_1): Likewise.
12652         (elimination_effects): Likewise.
12653         (mark_not_eliminable): Likewise.
12654         (scan_paradoxical_subregs): Likewise.
12655         (forget_old_reloads_1): Likewise.
12656         * reorg.c (find_end_label): Likewise.
12657         (try_merge_delay_insns): Likewise.
12658         (redundant_insn): Likewise.
12659         (own_thread_p): Likewise.
12660         (fill_simple_delay_slots): Likewise.
12661         (fill_slots_from_thread): Likewise.
12662         (dbr_schedule): Likewise.
12663         * resource.c (update_live_status): Likewise.
12664         (mark_referenced_resources): Likewise.
12665         (mark_set_resources): Likewise.
12666         * rtl.c (copy_rtx): Likewise.
12667         * rtlanal.c (reg_referenced_p): Likewise.
12668         (single_set_2): Likewise.
12669         (noop_move_p): Likewise.
12670         (note_stores): Likewise.
12671         * sched-deps.c (sched_analyze_reg): Likewise.
12672         (sched_analyze_insn): Likewise.
12674 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
12676         * cse.c (invalidate_reg): New function extracted from...
12677         (invalidate): ...here.
12678         (canonicalize_insn): Check for clobber high.
12679         (invalidate_from_clobbers): invalidate clobber highs.
12680         (invalidate_from_sets_and_clobbers): Likewise.
12681         (count_reg_usage): Check for clobber high.
12682         (insn_live_p): Likewise.
12683         * cselib.c (cselib_expand_value_rtx_1):Likewise.
12684         (cselib_invalidate_regno): Check for clobber in setter.
12685         (cselib_invalidate_rtx): Pass through setter.
12686         (cselib_invalidate_rtx_note_stores):
12687         (cselib_process_insn): Check for clobber high.
12688         * cselib.h (cselib_invalidate_rtx): Add operand.
12690 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
12692         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
12693         (mark_not_eliminable): Likewise.
12694         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
12695         * lra-lives.c (process_bb_lives): Check for clobber high.
12696         * lra.c (new_insn_reg): Remember clobber highs.
12697         (collect_non_operand_hard_regs): Check for clobber high.
12698         (lra_set_insn_recog_data): Likewise.
12699         (add_regs_to_insn_regno_info): Likewise.
12700         (lra_update_insn_regno_info): Likewise.
12702 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
12704         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
12705         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
12707 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
12709         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
12710         (copy_insn_1): Likewise.
12711         (gen_hard_reg_clobber_high): New gen function.
12712         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
12713         * genemit.c (gen_exp): Likewise.
12714         (gen_emit_seq): Pass through info.
12715         (gen_insn): Check for CLOBBER_HIGH.
12716         (gen_expand): Pass through info.
12717         (gen_split): Likewise.
12718         (output_add_clobbers): Likewise.
12719         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
12720         (remove_clobbers): Likewise.
12721         * rtl.h (gen_hard_reg_clobber_high): New declaration.
12723 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
12725         * doc/rtl.texi (clobber_high): Add.
12726         (parallel): Add in clobber high
12727         * rtl.c (rtl_check_failed_code3): Add function.
12728         * rtl.def (CLOBBER_HIGH): Add expression.
12729         * rtl.h (RTL_CHECKC3): Add macro.
12730         (rtl_check_failed_code3): Add declaration.
12731         (XC3EXP): Add macro.
12733 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
12735         PR target/86386
12736         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
12737         cfun->machine->max_used_stack_alignment if needed.
12739 2018-08-04  Martin Sebor  <msebor@redhat.com>
12741         PR tree-optimization/86571
12742         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
12743         NaN output to 4.
12745 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
12747         PR target/86799
12748         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12749         Define.
12751 2018-08-03  Jeff Law  <law@redhat.com>
12753         PR target/86795
12754         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12755         Define to speculation_safe_value_not_needed.
12757 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
12759         * doc/gcov.texi (-x): Remove duplicate "to".
12760         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
12761         (-Wif-not-aligned): Remove duplicate "is".
12762         (-flto): Remove duplicate "the".
12763         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
12764         duplicate "v5.00.b".
12765         (MSP430 Options): Remove duplicate "and" from the description
12766         of "-mgprel-sec=regexp".
12767         (x86 Options): Remove duplicate copies of "vmldLog102" and
12768         vmlsLog104 from description of "-mveclibabi=type".
12770 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
12772         * internal-fn.h (first_commutative_argument): Declare.
12773         * internal-fn.c (first_commutative_argument): New function.
12774         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
12775         restrictions for pattern statements.  Use first_commutative_argument
12776         to look for commutative operands in calls to internal functions.
12778 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
12780         * Makefile.in (wide-int-range.o): New.
12781         * tree-vrp.c: Move all the wide_int_* functions to...
12782         * wide-int-range.cc: ...here.
12783         * tree-vrp.h: Move all the wide_int_* prototypes to...
12784         * wide-int-range.h: ...here.
12786 2018-08-03  Tom de Vries  <tdevries@suse.de>
12788         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
12789         UI_NONE.
12790         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
12791         * except.c (output_function_exception_table): Do early exit if
12792         targetm_common.except_unwind_info (&global_options) == UI_NONE.
12794 2018-08-03  Martin Liska  <mliska@suse.cz>
12796         * predict.c (dump_prediction): Change to 2 digits
12797         in fraction part.
12799 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
12801         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
12802         neon_dup_q to...
12803         (falkor_am_1_gtov_gtov): ... a new insn reservation.
12805 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
12807         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
12808         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
12809         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
12810         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
12811         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
12813 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
12815         * diagnostic-show-locus.c (diagnostic_show_locus): Use
12816         pp_take_prefix when saving the existing prefix.
12817         * diagnostic.c (diagnostic_append_note): Likewise.
12818         * langhooks.c (lhd_print_error_function): Likewise.
12819         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
12820         param's type.  Free the existing prefix.
12821         (pp_take_prefix): New function.
12822         (pretty_printer::pretty_printer): Drop the prefix parameter.
12823         Rename the length parameter to match the comment.
12824         (pretty_printer::~pretty_printer): Free the prefix.
12825         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
12826         parameter.
12827         (struct pretty_printer): Drop the "const" from "prefix" field's
12828         type and clarify memory management.
12829         (pp_set_prefix): Drop the "const" from the 2nd param.
12830         (pp_take_prefix): New decl.
12832 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
12834         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
12835         for word_mode_ok here instead of passing as argument.
12836         (expand_block_compare): Change select_block_compare_mode() call.
12837         (expand_strncmp_gpr_sequence): New function.
12838         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
12840 2018-08-02  Jeff Law  <law@redhat.com>
12842         PR target/86790
12843         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12844         Define to speculation_safe_value_not_needed.
12846         PR target/86784
12847         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12848         Define to speculation_safe_value_not_needed.
12850 2018-08-02  Tom de Vries  <tdevries@suse.de>
12852         PR target/86660
12853         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
12854         function.  Return UI_TARGET unconditionally.
12855         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
12856         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
12858 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
12860         * genemit.c (print_overload_test): Fix typo.
12862 2018-08-02  Richard Biener  <rguenther@suse.de>
12864         PR tree-optimization/86816
12865         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
12866         which checks for value availability before querying it.
12867         (gvn_uses_equal): Use it.
12868         (same_succ_hash): Likewise.
12869         (gimple_equal_p): Likewise.
12871 2018-08-02  Nick Clifton  <nickc@redhat.com>
12873         PR target/86813
12874         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12875         Define to speculation_safe_value_not_needed.
12877         PR target/86810
12878         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12879         Define to speculation_safe_value_not_needed.
12881         PR target/86810
12882         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12883         Define to speculation_safe_value_not_needed.
12885         PR target/86803
12886         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12887         Define to speculation_safe_value_not_needed.
12889         PR target/86797
12890         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12891         Define to speculation_safe_value_not_needed.
12893         PR target/86791
12894         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12895         Define to speculation_safe_value_not_needed.
12897         PR target/86789
12898         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12899         Define to speculation_safe_value_not_needed.
12901         PR target/86787
12902         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12903         Define to speculation_safe_value_not_needed.
12905         PR target/86782
12906         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
12907         speculation_safe_value_not_needed.
12909         PR target/86781
12910         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
12911         to speculation_safe_value_not_needed.
12913 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
12915         * doc/md.texi: Expand the documentation of instruction names
12916         to mention port-local uses.  Document '@' in pattern names.
12917         * read-md.h (overloaded_instance, overloaded_name): New structs.
12918         (mapping): Declare.
12919         (md_reader::handle_overloaded_name): New member function.
12920         (md_reader::get_overloads): Likewise.
12921         (md_reader::m_first_overload): New member variable.
12922         (md_reader::m_next_overload_ptr): Likewise.
12923         (md_reader::m_overloads_htab): Likewise.
12924         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
12925         m_next_overload_ptr and m_overloads_htab.
12926         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
12927         (get_mode_token, get_code_token, get_int_token): New functions.
12928         (map_attr_string): Add an optional argument that passes back
12929         the associated iterator.
12930         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
12931         (md_reader::handle_overloaded_name, add_overload_instance): New
12932         functions.
12933         (apply_iterators): Handle '@' names.  Report an error if '@'
12934         is used without iterators.
12935         (initialize_iterators): Initialize the new iterator_group fields.
12936         * genopinit.c (handle_overloaded_code_for)
12937         (handle_overloaded_gen): New functions.
12938         (main): Use them to print declarations of maybe_code_for_* and
12939         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
12940         * genemit.c (print_overload_arguments, print_overload_test)
12941         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
12942         (main): Use it to print definitions of maybe_code_for_* and
12943         maybe_gen_* functions.
12944         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
12945         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
12946         instead of explicit mode checks.
12947         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
12948         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
12949         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
12950         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
12951         (aarch64_expand_compare_and_swap): Likewise
12952         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
12953         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
12954         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
12955         (aarch64_constant_pool_reload_icode): Delete.
12956         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
12957         instead of aarch64_constant_pool_reload_icode.  Use
12958         code_for_aarch64_reload_mov instead of explicit mode checks.
12959         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
12960         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
12961         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
12962         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
12963         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
12964         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
12965         (aarch64_atomic_load_op_code): Delete.
12966         (aarch64_emit_atomic_load_op): Likewise.
12967         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
12968         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
12969         instead of aarch64_emit_atomic_load_op.
12970         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
12971         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
12972         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
12973         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
12974         character before the pattern name.
12975         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
12976         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
12977         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
12978         (aarch64_frecps<mode>): Likewise.
12979         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
12980         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
12981         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
12982         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
12983         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
12985 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
12987         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
12988         Allow HFmode constants if TARGET_FP_F16INST.
12990 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
12992         PR target/86014
12993         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
12994         No longer check last store for clobber of address register.
12996 2018-08-02  Martin Liska  <mliska@suse.cz>
12998         PR gcov-profile/86817
12999         * gcov.c (process_all_functions): New function.
13000         (main): Call it.
13001         (process_file): Move functions processing to
13002         process_all_functions.
13004 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
13006         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
13007         "const" to the "gimple *" and "rtx_insn *" parameters.
13008         * dumpfile.h (dump_user_location_t::dump_user_location_t):
13009         Likewise.
13010         (dump_location_t::dump_location_t): Likewise.
13012 2018-08-01  Martin Sebor  <msebor@redhat.com>
13014         PR tree-optimization/86650
13015         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
13016         rather than a "gcall *".  Directly pass the data of interest
13017         to percent_K_format, rather than building a temporary CALL_EXPR
13018         to hold it.
13019         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
13020         (gimple_fold_builtin_strncat): Adjust.
13021         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
13022         gcall* argument with gimple*.
13023         * gimple-ssa-warn-restrict.c (check_call): Same.
13024         (wrestrict_dom_walker::before_dom_children): Same.
13025         (builtin_access::builtin_access): Same.
13026         (check_bounds_or_overlap): Same
13027         (maybe_diag_overlap): Same.
13028         (maybe_diag_offset_bounds): Same.
13029         * tree-diagnostic.c (default_tree_printer): Move usage of
13030         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
13031         to this callsite.
13032         * tree-pretty-print.c (percent_K_format): Add argument.
13033         * tree-pretty-print.h: Add argument.
13034         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
13035         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
13036         (maybe_diag_stxncpy_trunc): Same.
13037         (handle_builtin_stxncpy): Same.
13038         (handle_builtin_strcat): Same.
13040 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
13042         * match.pd: Optimise pointer range checks.
13044 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
13046         PR tree-optimization/86758
13047         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
13048         to remove pattern statements.
13050 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
13052         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
13053         result of dfs_enumerate_from when constructing stmt_vec_infos,
13054         instead of additionally calling get_loop_body.
13056 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
13058         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
13059         parameter.
13060         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
13061         When creating an iv, assert that the step is not known to be zero.
13062         (vect_setup_realignment): Update call accordingly.
13063         * tree-vect-stmts.c (vectorizable_store): Likewise.
13064         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
13066 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
13068         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
13069         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
13070         (vectorizable_reduction): Likewise.
13071         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
13072         (vect_detect_hybrid_slp_stmts): Likewise.
13073         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
13075 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
13077         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
13078         (wide_int_set_zero_nonzero_bits): ...this.
13079         (zero_nonzero_bits_from_vr): Rename to...
13080         (vrp_set_zero_nonzero_bits): ...this.
13081         (extract_range_from_multiplicative_op_1): Abstract wide int
13082         code...
13083         (wide_int_range_multiplicative_op): ...here.
13084         (extract_range_from_binary_expr_1): Extract wide int binary
13085         operations into their own functions.
13086         (wide_int_range_lshift): New.
13087         (wide_int_range_can_optimize_bit_op): New.
13088         (wide_int_range_shift_undefined_p): New.
13089         (wide_int_range_bit_xor): New.
13090         (wide_int_range_bit_ior): New.
13091         (wide_int_range_bit_and): New.
13092         (wide_int_range_trunc_mod): New.
13093         (extract_range_into_wide_ints): New.
13094         (vrp_shift_undefined_p): New.
13095         (extract_range_from_multiplicative_op): New.
13096         (vrp_can_optimize_bit_op): New.
13097         * tree-vrp.h (value_range::dump): New.
13098         (wide_int_range_multiplicative_op): New.
13099         (wide_int_range_lshift):New.
13100         (wide_int_range_shift_undefined_p): New.
13101         (wide_int_range_bit_xor): New.
13102         (wide_int_range_bit_ior): New.
13103         (wide_int_range_bit_and): New.
13104         (wide_int_range_trunc_mod): New.
13105         (zero_nonzero_bits_from_bounds): Rename to...
13106         (wide_int_set_zero_nonzero_bits): ...this.
13107         (zero_nonzero_bits_from_vr): Rename to...
13108         (vrp_set_zero_nonzero_bits): ...this.
13109         (range_easy_mask_min_max): Rename to...
13110         (wide_int_range_can_optimize_bit_op): this.
13111         * vr-values.c (simplify_bit_ops_using_ranges): Rename
13112         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
13114 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
13116         * tree-vectorizer.h (vect_orig_stmt): New function.
13117         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
13118         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
13119         (vect_create_epilog_for_reduction): Likewise.
13120         (vectorizable_live_operation): Likewise.
13121         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
13122         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
13123         * tree-vect-stmts.c (vectorizable_call): Likewise.
13124         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
13126 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
13128         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
13129         argument.
13130         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
13131         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
13132         (vect_transform_loop): Likewise.
13133         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
13135 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
13137         * tree-vectorizer.h (vect_schedule_slp): Return void.
13138         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
13139         (vect_schedule_slp): Likewise.
13141 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
13143         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
13144         argument.
13145         (vect_transform_loop): Update calls accordingly.  Schedule SLP
13146         instances before the main loop, if any exist.
13148 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
13150         PR tree-optimization/86749
13151         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
13152         If the lhs is used in a COND_EXPR, check that it is being used
13153         as the "then" or "else" value.
13155 2018-08-01  Tom de Vries  <tdevries@suse.de>
13157         PR target/86800
13158         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
13159         speculation_safe_value_not_needed.
13161 2018-08-01  Richard Biener  <rguenther@suse.de>
13163         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
13164         as base and offset.
13166 2018-08-01  Martin Liska  <mliska@suse.cz>
13168         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
13169         format how successful transformation is dumped.
13170         (gimple_mod_pow2_value_transform): Likewise.
13171         (gimple_mod_subtract_transform): Likewise.
13172         (gimple_stringops_transform): Likewise.
13174 2018-08-01  Martin Liska  <mliska@suse.cz>
13176         PR value-prof/35543
13177         * value-prof.c (interesting_stringop_to_profile_p):
13178         Simplify the code and add BUILT_IN_MEMMOVE.
13179         (gimple_stringops_transform): Likewise.
13181 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
13183         * config/aarch64/aarch64-simd.md
13184         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
13185         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
13186         use GPI iterator instead of SI mode.
13188 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
13190         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
13191         rs6000_speculation_barrier.
13192         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
13193         new barrier pattern name.
13195 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
13197         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
13198         (speculation_barrier): New insn.
13200 2018-08-01  Richard Biener  <rguenther@suse.de>
13202         PR bootstrap/86724
13203         * graphite.h: Include isl/id.h and isl/space.h to allow build
13204         with ISL 0.20.
13206 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
13208         PR target/86651
13209         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
13210         mode for COFF targets.
13211         * defaults.h (TARGET_COFF): Define.
13212         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
13213         TARGET_COFF): Define.
13214         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
13215         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
13216         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
13218 2018-07-31  Alexandre Oliva <oliva@adacore.com>
13220         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
13221         * gimple-streamer-out.c (output_bb): Save it.
13222         * lto-streamer-in.c (input_struct_function_base): Restore
13223         instance discriminator if available.  Create map on demand.
13224         * lto-streamer-out.c (output_struct_function_base): Save it if
13225         available.
13226         * final.c (decl_to_instance_map): Document LTO strategy.
13228 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
13229             Olivier Hainque  <hainque@adacore.com>
13231         * debug.h (decl_to_instance_map_t): New type.
13232         (decl_to_instance_map): Declare.
13233         (maybe_create_decl_to_instance_map): New inline function.
13234         * final.c (bb_discriminator, last_bb_discriminator): New statics,
13235         to track basic block discriminators.
13236         (final_start_function_1): Initialize them.
13237         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
13238         bb_discriminator.
13239         (decl_to_instance_map): New variable.
13240         (map_decl_to_instance, maybe_set_discriminator): New functions.
13241         (notice_source_line): Set discriminator.
13243 2018-07-31  Ian Lance Taylor  <iant@golang.org>
13245         * targhooks.c (default_have_speculation_safe_value): Add
13246         ATTRIBUTE_UNUSED.
13248 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
13250         * dump-context.h: Include "pretty-print.h".
13251         (dump_context::refresh_dumps_are_enabled): New decl.
13252         (dump_context::emit_item): New decl.
13253         (class dump_context): Add fields "m_test_pp" and
13254         "m_test_pp_flags".
13255         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
13256         (temp_dump_context::get_dumped_text): New decl.
13257         (class temp_dump_context): Add field "m_pp".
13258         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
13259         (dump_context::refresh_dumps_are_enabled): ...and add a test for
13260         m_test_pp.
13261         (set_dump_file): Update for above change.
13262         (set_alt_dump_file): Likewise.
13263         (dump_loc): New overload, taking a pretty_printer *.
13264         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
13265         to any test pretty-printer.
13266         (make_item_for_dump_gimple_stmt): New function, adapted from
13267         optinfo::add_gimple_stmt.
13268         (dump_context::dump_gimple_stmt): Call it, and use the result,
13269         eliminating the direct usage of dump_file and alt_dump_file in
13270         favor of indirectly using them via emit_item.
13271         (make_item_for_dump_gimple_expr): New function, adapted from
13272         optinfo::add_gimple_expr.
13273         (dump_context::dump_gimple_expr): Call it, and use the result,
13274         eliminating the direct usage of dump_file and alt_dump_file in
13275         favor of indirectly using them via emit_item.
13276         (make_item_for_dump_generic_expr): New function, adapted from
13277         optinfo::add_tree.
13278         (dump_context::dump_generic_expr): Call it, and use the result,
13279         eliminating the direct usage of dump_file and alt_dump_file in
13280         favor of indirectly using them via emit_item.
13281         (make_item_for_dump_printf_va): New function, adapted from
13282         optinfo::add_printf_va.
13283         (make_item_for_dump_printf): New function.
13284         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
13285         and use the result, eliminating the direct usage of dump_file and
13286         alt_dump_file in favor of indirectly using them via emit_item.
13287         (make_item_for_dump_dec): New function.
13288         (dump_context::dump_dec): Call it, and use the result,
13289         eliminating the direct usage of dump_file and alt_dump_file in
13290         favor of indirectly using them via emit_item.
13291         (make_item_for_dump_symtab_node): New function, adapted from
13292         optinfo::add_symtab_node.
13293         (dump_context::dump_symtab_node): Call it, and use the result,
13294         eliminating the direct usage of dump_file and alt_dump_file in
13295         favor of indirectly using them via emit_item.
13296         (dump_context::begin_scope): Reimplement, avoiding direct usage
13297         of dump_file and alt_dump_file in favor of indirectly using them
13298         via emit_item.
13299         (dump_context::emit_item): New member function.
13300         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
13301         Set up test pretty-printer on the underlying context.  Call
13302         refresh_dumps_are_enabled.
13303         (temp_dump_context::~temp_dump_context): Call
13304         refresh_dumps_are_enabled.
13305         (temp_dump_context::get_dumped_text): New member function.
13306         (selftest::verify_dumped_text): New function.
13307         (ASSERT_DUMPED_TEXT_EQ): New macro.
13308         (selftest::test_capture_of_dump_calls): Run all tests twice, with
13309         and then without optinfo enabled.  Add uses of
13310         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
13311         * dumpfile.h: Update comment for the dump_* API.
13312         * optinfo-emit-json.cc
13313         (selftest::test_building_json_from_dump_calls): Update for new
13314         param for temp_dump_context ctor.
13315         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
13316         and "m_owned" field.
13317         (optinfo_item::~optinfo_item): Likewise.
13318         (optinfo::add_item): New member function.
13319         (optinfo::emit): Update comment.
13320         (optinfo::add_string): Delete.
13321         (optinfo::add_printf): Delete.
13322         (optinfo::add_printf_va): Delete.
13323         (optinfo::add_gimple_stmt): Delete.
13324         (optinfo::add_gimple_expr): Delete.
13325         (optinfo::add_tree): Delete.
13326         (optinfo::add_symtab_node): Delete.
13327         (optinfo::add_dec): Delete.
13328         * optinfo.h (class dump_context): New forward decl.
13329         (optinfo::add_item): New decl.
13330         (optinfo::add_string): Delete.
13331         (optinfo::add_printf): Delete.
13332         (optinfo::add_printf_va): Delete.
13333         (optinfo::add_gimple_stmt): Delete.
13334         (optinfo::add_gimple_expr): Delete.
13335         (optinfo::add_tree): Delete.
13336         (optinfo::add_symtab_node): Delete.
13337         (optinfo::add_dec): Delete.
13338         (optinfo::add_poly_int): Delete.
13339         (optinfo_item::optinfo_item): Remove "owned" param.
13340         (class optinfo_item): Remove field "m_owned".
13342 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
13344         PR middle-end/86705
13345         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
13346         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
13347         requested variable alignment.
13348         (expand_one_ssa_partition): Likewise.
13349         (expand_one_var): Likewise.
13351 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
13353         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
13354         to speculation_safe_value_not_needed.
13356 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
13358         * targhooks.h (speculation_safe_value_not_needed): New prototype.
13359         * targhooks.c (speculation_safe_value_not_needed): New function.
13360         * target.def (have_speculation_safe_value): Update documentation.
13361         * doc/tm.texi: Regenerated.
13363 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
13365         * config/aarch64/iterators.md (ALLI_TI): New iterator.
13366         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
13367         expand.
13368         (despeculate_copy<ALLI:mode>_insn): New insn.
13369         (despeculate_copyti_insn): New insn.
13370         (despeculate_simple<ALLI:mode>): New insn
13371         (despeculate_simpleti): New insn.
13372         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
13373         function.
13374         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
13375         aarch64_speculation_safe_value.
13376         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
13378 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
13380         * config/aarch64/aarch64-speculation.cc: New file.
13381         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
13382         before pass_reorder_blocks.
13383         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
13384         prototype.
13385         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
13386         X14 and X15 when tracking speculation.
13387         * config/aarch64/aarch64.md (register name constants): Add
13388         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
13389         (unspec): Add UNSPEC_SPECULATION_TRACKER.
13390         (speculation_barrier): New insn attribute.
13391         (cmp<mode>): Allow SP in comparisons.
13392         (speculation_tracker): New insn.
13393         (speculation_barrier): Add speculation_barrier attribute.
13394         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
13395         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
13396         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
13398 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
13400         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
13401         aarch64_track_speculation is true.
13402         (tb<optab><mode>1): Likewise.
13403         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
13404         generate CB[N]Z when tracking speculation.
13405         (aarch64_split_compare_and_swap): Likewise.
13406         (aarch64_split_atomic_op): Likewise.
13408 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
13410         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
13412 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
13414         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
13415         (speculation_barrier): New insn.
13417 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
13419         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
13420         * config/arm/arm.md (speculation_barrier): New expand.
13421         (speculation_barrier_insn): New pattern.
13423 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
13425         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
13426         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
13427         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
13428         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
13429         list.
13430         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
13431         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
13432         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
13433         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
13434         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
13435         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
13436         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
13437         * builtins.c (expand_speculation_safe_value): New function.
13438         (expand_builtin): Call it.
13439         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
13440         * doc/extend.texi: Document __builtin_speculation_safe_value.
13441         * doc/md.texi: Document "speculation_barrier" pattern.
13442         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
13443         TARGET_HAVE_SPECULATION_SAFE_VALUE.
13444         * doc/tm.texi: Regenerated.
13445         * target.def (have_speculation_safe_value, speculation_safe_value): New
13446         hooks.
13447         * targhooks.c (default_have_speculation_safe_value): New function.
13448         (default_speculation_safe_value): New function.
13449         * targhooks.h (default_have_speculation_safe_value): Add prototype.
13450         (default_speculation_safe_value): Add prototype.
13452 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
13454         * dump-context.h (dump_context::dump_loc): New decl.
13455         * dumpfile.c (dump_context::dump_loc): New member function.
13456         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
13457         and dump_gimple_stmt.
13458         (dump_context::dump_gimple_expr_loc): Likewise, using
13459         dump_gimple_expr.
13460         (dump_context::dump_generic_expr_loc): Likewise, using
13461         dump_generic_expr.
13462         (dump_context::dump_printf_loc_va): Likewise, using
13463         dump_printf_va.
13464         (dump_context::begin_scope): Explicitly using the global function
13465         "dump_loc", rather than the member function.
13467 2018-07-31  Martin Sebor  <msebor@redhat.com>
13469         PR tree-optimization/86741
13470         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
13472 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
13474         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
13475         depend on whether prefetch instructions will be emitted or not.
13476         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
13477         will be emitted or not.
13478         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
13479         (TARGET_SETMEM_PFD): New macros.
13481 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13483         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
13484         (NULL_STMT_VEC_INFO): Delete.
13485         (stmt_vec_info::operator*): Likewise.
13486         (stmt_vec_info::operator gimple *): Likewise.
13487         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
13488         of NULL_STMT_VEC_INFO.
13489         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
13490         (vect_reassociating_reduction_p): Likewise.
13491         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
13492         (vectorizable_store): Likewise.
13493         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
13494         (vec_info::free_stmt_vec_infos): Likewise.
13496 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13498         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
13499         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
13501 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13503         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
13504         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
13505         (vec_info::free_stmt_vec_info): New private member functions.
13506         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
13507         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
13508         * tree-parloops.c (gather_scalar_reductions): Remove calls to
13509         set_stmt_vec_info_vec and free_stmt_vec_infos.
13510         * tree-vect-loop.c (_loop_vec_info): Remove call to
13511         set_stmt_vec_info_vec.
13512         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
13513         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
13514         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
13515         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
13516         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
13517         assignments in {vec_info::,}new_stmt_vec_info that are redundant
13518         with the clearing in the xcalloc.
13519         (stmt_vec_info_vec): Delete.
13520         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
13521         (vectorize_loops): Likewise.
13522         (vec_info::~vec_info): Remove argument from call to
13523         free_stmt_vec_infos.
13524         (vec_info::add_stmt): Remove vinfo argument from call to
13525         new_stmt_vec_info.
13527 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13529         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
13530         rather than a gimple stmt.
13531         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
13532         information for pattern statements when passed the original
13533         statement; instead wait to be passed the pattern statement itself.
13534         Don't call set_vinfo_for_stmt here.
13535         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
13536         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
13537         stmt_vec_infos here.
13538         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
13539         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
13540         stmt_vec_infos entry.
13542 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13544         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
13545         * tree-vectorizer.c (vec_info::replace_stmt): New function.
13546         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
13547         * tree-vect-stmts.c (vectorizable_call): Likewise.
13548         (vectorizable_simd_clone_call): Likewise.
13550 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13552         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
13553         * tree-vectorizer.c (vec_info::remove_stmt): New function.
13554         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
13555         * tree-vect-loop.c (vect_transform_loop): Likewise.
13556         * tree-vect-slp.c (vect_schedule_slp): Likewise.
13557         * tree-vect-stmts.c (vect_remove_stores): Likewise.
13559 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13561         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
13562         (vect_dr_stmt): Delete.
13563         * tree-vectorizer.c (vec_info::lookup_dr): New function.
13564         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
13565         of DR_VECT_AUX.
13566         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
13567         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
13568         (vect_verify_datarefs_alignment, vect_peeling_supportable)
13569         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
13570         (vect_analyze_data_refs): Likewise.
13571         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
13572         argument.
13573         (vect_find_same_alignment_drs): Likewise.
13574         (vect_slp_analyze_node_dependences): Update calls accordingly.
13575         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
13576         instead of DR_VECT_AUX.
13577         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
13578         of a vector data references.  Use vec_info::lookup_dr instead of
13579         DR_VECT_AUX.
13580         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
13581         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
13582         instead of DR_VECT_AUX.
13584 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13586         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
13587         dr_vec_info.
13588         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
13589         accordingly.
13590         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
13591         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
13592         (vect_gen_prolog_loop_niters): Likewise.
13594 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13596         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
13597         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
13598         (vect_known_alignment_in_bytes, vect_dr_behavior)
13599         (vect_get_scalar_dr_size): Take references as dr_vec_infos
13600         instead of data_references.  Update calls to other routines for
13601         which the same change has been made.
13602         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
13603         dr_vec_infos instead of stmt_vec_infos.
13604         (vect_analyze_data_ref_dependence): Update call accordingly.
13605         (vect_slp_analyze_data_ref_dependence)
13606         (vect_record_base_alignments): Use DR_VECT_AUX.
13607         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
13608         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
13609         (vector_alignment_reachable_p, vect_get_data_access_cost)
13610         (vect_peeling_supportable, vect_analyze_group_access_1)
13611         (vect_analyze_group_access, vect_analyze_data_ref_access)
13612         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
13613         (vect_compile_time_alias, vect_small_gap_p)
13614         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
13615         (vect_supportable_dr_alignment): Take references as dr_vec_infos
13616         instead of data_references.  Update calls to other routines for
13617         which the same change has been made.
13618         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
13619         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
13620         (vect_slp_analyze_and_verify_node_alignment)
13621         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
13622         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
13623         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
13624         above changes.
13625         (_vect_peel_info::dr): Replace with...
13626         (_vect_peel_info::dr_info): ...this new field.
13627         (vect_peeling_hash_get_most_frequent)
13628         (vect_peeling_hash_choose_best_peeling): Update accordingly.
13629         (vect_peeling_hash_get_lowest_cost):
13630         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
13631         routines for which the same change has been made.
13632         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
13633         data_reference.
13634         * tree-vect-loop-manip.c (get_misalign_in_elems)
13635         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
13636         above changes.
13637         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
13638         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
13639         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
13640         (get_group_load_store_type, get_negative_load_store_type)
13641         (vect_get_data_ptr_increment, vectorizable_store)
13642         (vectorizable_load): Likewise.
13643         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
13644         Update calls to other routines for which the same change has been made.
13646 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13648         * tree-vectorizer.h (vec_info::move_dr): New member function.
13649         (dataref_aux): Rename to...
13650         (dr_vec_info): ...this and add "dr" and "stmt" fields.
13651         (_stmt_vec_info::dr_aux): Update accordingly.
13652         (_stmt_vec_info::data_ref_info): Delete.
13653         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
13654         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
13655         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
13656         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
13657         of data_ref.
13658         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
13659         (STMT_VINFO_DR_INFO): New macro.
13660         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
13661         (set_dr_misalignment): Update after rename of dataref_aux.
13662         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
13663         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
13664         initialization of STMT_VINFO_DATA_REF.
13665         * tree-vectorizer.c (vec_info::move_dr): New function.
13666         * tree-vect-patterns.c (vect_recog_bool_pattern)
13667         (vect_recog_mask_conversion_pattern)
13668         (vect_recog_gather_scatter_pattern): Use it.
13669         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
13670         the "dr" and "stmt" fields of dr_vec_info instead of
13671         STMT_VINFO_DATA_REF.
13673 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13675         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
13676         (is_pattern_stmt_p): Use it.
13677         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
13678         on pattern statements.
13680 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13682         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
13683         original stmt as a stmt_vec_info rather than a gimple stmt.
13684         (vect_pattern_recog_1): Take the statement directly as a
13685         stmt_vec_info, rather than via a gimple_stmt_iterator.
13686         Update call to vect_mark_pattern_stmts.
13687         (vect_pattern_recog): Update calls accordingly.
13689 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13691         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
13692         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
13693         a vect_def_type for the first argument.
13694         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
13695         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
13696         operand if it isn't defined by a vectorized statement.
13697         (vect_build_gather_load_calls): Remove the mask_dt argument and
13698         update calls to vect_get_vec_def_for_stmt_copy.
13699         (vectorizable_bswap): Likewise the dt argument.
13700         (vectorizable_call): Update calls to vectorizable_bswap and
13701         vect_get_vec_def_for_stmt_copy.
13702         (vectorizable_simd_clone_call, vectorizable_assignment)
13703         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
13704         (vectorizable_comparison): Update calls to
13705         vect_get_vec_def_for_stmt_copy.
13706         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
13707         vect_is_simple_use.
13708         (vect_get_loop_based_defs): Remove dt argument and update call
13709         to vect_get_vec_def_for_stmt_copy.
13710         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
13711         and vect_get_vec_def_for_stmt_copy.
13712         (vectorizable_load): Update calls to vect_build_gather_load_calls
13713         and vect_get_vec_def_for_stmt_copy.
13714         * tree-vect-loop.c (vect_create_epilog_for_reduction)
13715         (vectorizable_reduction, vectorizable_live_operation): Update calls
13716         to vect_get_vec_def_for_stmt_copy.
13718 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13720         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
13721         and gimple stmt arguments with a stmt_vec_info.
13722         (vect_record_base_alignments): Update calls accordingly.
13723         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
13724         and gimple stmt arguments with a stmt_vec_info.
13725         (vect_build_slp_tree_1): Remove vinfo argument and update call
13726         to vect_record_max_nunits.
13727         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
13728         and vect_record_max_nunits.
13730 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13732         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
13733         file and take a stmt_vec_info instead of a gimple stmt.
13734         (supportable_widening_operation, vect_finish_replace_stmt)
13735         (vect_finish_stmt_generation, vect_get_store_rhs)
13736         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
13737         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
13738         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
13739         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
13740         (vect_create_data_ref_ptr, bump_vector_ptr)
13741         (vect_permute_store_chain, vect_setup_realignment)
13742         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
13743         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
13744         (vectorizable_reduction, vectorizable_induction)
13745         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
13746         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
13747         than gimple stmts as arguments.
13748         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
13749         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
13750         (can_group_stmts_p, vect_check_gather_scatter)
13751         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
13752         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
13753         (vect_permute_load_chain, vect_shift_permute_load_chain)
13754         (vect_transform_grouped_load)
13755         (vect_record_grouped_load_vectors): Likewise.
13756         * tree-vect-loop.c (vect_fixup_reduc_chain)
13757         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
13758         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
13759         (vectorizable_reduction, vectorizable_induction)
13760         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
13761         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
13762         (vect_get_load_store_mask): Likewise.
13763         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
13764         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
13765         * tree-vect-stmts.c (vect_mark_relevant)
13766         (is_simple_and_all_uses_invariant)
13767         (exist_non_indexing_operands_for_use_p, process_use)
13768         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
13769         (vect_get_vec_def_for_operand, vect_get_vec_defs)
13770         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
13771         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
13772         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
13773         (get_negative_load_store_type, get_load_store_type)
13774         (vect_check_load_store_mask, vect_check_store_rhs)
13775         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
13776         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
13777         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
13778         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
13779         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
13780         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
13781         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
13782         (supportable_widening_operation): Likewise.
13784 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13786         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
13787         a stmt_vec_info instead of a gcall.
13788         (vect_check_gather_scatter): Update call accordingly.
13789         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
13790         of a gphi.
13791         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
13792         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
13793         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
13794         instead of a gimple stmt.
13795         (vect_transform_loop): Update calls accordingly.
13796         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
13797         stmt_vec_infos instead of gimple stmts.
13798         (vect_analyze_slp_instance): Update use accordingly.
13799         * tree-vect-stmts.c (read_vector_array, write_vector_array)
13800         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
13801         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
13802         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
13803         (vect_gen_widened_results_half, vect_get_loop_based_defs)
13804         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
13805         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
13806         down to subroutines.
13808 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13810         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
13811         of the worklist from a vector of gimple stmts to a vector of
13812         stmt_vec_infos.
13813         * tree-vect-stmts.c (vect_mark_relevant, process_use)
13814         (vect_mark_stmts_to_be_vectorized): Likewise
13816 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13818         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
13819         statement before passing it to vect_analyze_stmt.
13820         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
13821         the chain of phi vector definitions.  Track the exit phi via its
13822         stmt_vec_info.
13823         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
13824         STMT_VINFO_REDUC_DEF.
13825         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
13826         stmt_vec_infos to handle the statement chains.
13827         (vect_get_slp_defs): Record the first statement in the node
13828         using a stmt_vec_info.
13829         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
13830         statements here and pass their stmt_vec_info down to subroutines.
13831         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
13832         down to vect_finish_stmt_generation.
13833         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
13834         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
13835         stmt_vec_infos to subroutines.
13836         (vect_remove_stores): Use stmt_vec_infos to handle the statement
13837         chains.
13839 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13841         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
13842         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
13843         (vect_permute_store_chain, vect_setup_realignment)
13844         (vect_permute_load_chain, vect_shift_permute_load_chain)
13845         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
13846         stmts internally, and when passing values to other vectorizer routines.
13847         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
13848         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
13849         (vect_analyze_loop_operations, get_initial_def_for_reduction)
13850         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
13851         (vectorizable_reduction, vectorizable_induction)
13852         (vectorizable_live_operation, vect_transform_loop_stmt)
13853         (vect_transform_loop): Likewise.
13854         * tree-vect-patterns.c (vect_reassociating_reduction_p)
13855         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
13856         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
13857         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
13858         (vect_slp_analyze_node_operations_1): Likewise.
13859         * tree-vect-stmts.c (vect_mark_relevant, process_use)
13860         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
13861         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
13862         (vect_finish_stmt_generation_1, get_group_load_store_type)
13863         (get_load_store_type, vect_build_gather_load_calls)
13864         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
13865         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
13866         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
13867         (vectorizable_store, vectorizable_load, vectorizable_condition)
13868         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
13869         (supportable_widening_operation): Likewise.
13870         (vect_get_vector_types_for_stmt): Likewise.
13871         * tree-vectorizer.h (vect_dr_behavior): Likewise.
13873 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13875         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
13876         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
13877         (vect_permute_store_chain, vect_permute_load_chain)
13878         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
13879         repeated stmt_vec_info lookups.
13880         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
13881         (vect_update_ivs_after_vectorizer): Likewise.
13882         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
13883         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
13884         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
13885         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
13886         (vect_bb_slp_scalar_cost): Likewise.
13887         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
13889 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13891         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
13892         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
13893         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
13894         to get gassigns and gcalls, rather than operating on generc gimple
13895         stmts.
13896         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
13897         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
13898         (vectorizable_load, vect_analyze_stmt): Likewise.
13899         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
13901 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13903         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
13904         return stmt_vec_infos rather than gimple stmts.  Do not accept
13905         null arguments.
13906         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
13907         of a gimple stmt.
13908         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
13909         Update use of get_later_stmt.
13910         (vect_get_constant_vectors): Update call accordingly.
13911         (vect_schedule_slp_instance): Likewise
13912         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
13913         (vect_slp_analyze_instance_dependence): Likewise.
13914         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
13916 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13918         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
13919         (stmt_info_for_cost::stmt_info): ...this new field.
13920         (add_stmt_costs): Update accordingly.
13921         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
13922         (vect_get_known_peeling_cost): Likewise.
13923         (vect_estimate_min_profitable_iters): Likewise.
13924         * tree-vect-stmts.c (record_stmt_cost): Likewise.
13926 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13928         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
13929         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
13930         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
13931         accordingly.
13932         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
13934 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13936         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
13937         a gimple stmt to a stmt_vec_info.
13938         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
13940 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13942         * tree-vectorizer.h (vec_info::grouped_stores): Change from
13943         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
13944         (_loop_vec_info::reduction_chains): Likewise.
13945         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
13946         accordingly.
13947         * tree-vect-slp.c (vect_analyze_slp): Likewise.
13949 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13951         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
13952         a gimple stmt to a stmt_vec_info.
13953         (_stmt_vec_info::next_element): Likewise.
13954         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
13955         (vect_slp_analyze_and_verify_node_alignment)
13956         (vect_analyze_group_access_1, vect_analyze_group_access)
13957         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
13958         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
13959         (vect_supportable_dr_alignment): Update accordingly.
13960         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
13961         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
13962         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
13963         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
13964         * tree-vect-slp.c (vect_build_slp_tree_1)
13965         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
13966         (vect_split_slp_store_group, vect_analyze_slp_instance)
13967         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
13968         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
13969         (get_group_load_store_type, get_load_store_type)
13970         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
13971         (vect_transform_stmt, vect_remove_stores): Likewise.
13973 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13975         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
13976         than a gimple stmt.
13977         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
13978         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
13979         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
13980         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
13981         (vector_alignment_reachable_p, vect_get_data_access_cost)
13982         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
13983         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
13984         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
13985         (vect_analyze_group_access_1, vect_analyze_group_access)
13986         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
13987         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
13988         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
13989         result of vect_dr_stmt and use the stmt_vec_info instead of
13990         the associated gimple stmt.
13991         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
13992         (vect_gen_prolog_loop_niters): Likewise.
13993         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
13995 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13997         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
13998         to a vec<stmt_vec_info>.
13999         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
14000         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
14001         vec<stmt_vec_info>.
14002         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
14003         to a vec<stmt_vec_info>.
14004         (bst_traits::value_type, bst_traits::value_type): Likewise.
14005         (bst_traits::hash): Update accordingly.
14006         (vect_get_and_check_slp_defs): Change the stmts parameter from
14007         a vec<gimple *> to a vec<stmt_vec_info>.
14008         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
14009         (vect_build_slp_tree): Likewise.
14010         (vect_build_slp_tree_2): Likewise.  Update uses of
14011         SLP_TREE_SCALAR_STMTS.
14012         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
14013         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
14014         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
14015         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
14016         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
14017         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
14018         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
14019         (vect_get_constant_vectors, vect_get_slp_defs)
14020         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
14021         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
14022         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
14023         instead of gimple stmts.
14024         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
14025         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
14026         (vect_slp_analyze_instance_dependence): Update uses of
14027         SLP_TREE_SCALAR_STMTS.
14028         (vect_slp_analyze_and_verify_node_alignment): Likewise.
14029         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
14030         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
14031         (get_initial_defs_for_reduction): Likewise.
14032         (vect_create_epilog_for_reduction): Likewise.
14033         (vectorize_fold_left_reduction): Likewise.
14034         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
14035         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
14036         (can_vectorize_live_stmts): Likewise.
14038 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
14040         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
14041         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
14042         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
14043         than gimple stmts.
14044         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
14045         of a gimple stmt.
14046         (gather_scalar_reductions): Update after above interface changes.
14047         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
14048         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
14049         than gimple stmts.
14050         (vect_force_simple_reduction): Likewise.
14051         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
14052         LOOP_VINFO_REDUCTIONS.
14053         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
14055 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
14057         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
14058         a gimple stmt to a stmt_vec_info.
14059         * tree-vect-loop.c (vect_active_double_reduction_p)
14060         (vect_force_simple_reduction, vectorizable_reduction): Update
14061         accordingly.
14063 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
14065         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
14066         vec<gimple *> to a vec<stmt_vec_info>.
14067         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
14068         the reduction_phis argument from a vec<gimple *> to a
14069         vec<stmt_vec_info>.
14070         (vectorizable_reduction): Likewise the phis local variable that
14071         is passed to vect_create_epilog_for_reduction.  Update for new type
14072         of SLP_TREE_VEC_STMTS.
14073         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
14074         (vectorizable_live_operation): Likewise.
14075         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
14076         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
14078 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
14080         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
14081         a gimple stmt to a stmt_vec_info.
14082         (vectorizable_condition, vectorizable_live_operation)
14083         (vectorizable_reduction, vectorizable_induction): Pass back the
14084         vectorized statement as a stmt_vec_info.
14085         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
14086         use of STMT_VINFO_VEC_STMT.
14087         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
14088         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
14089         as stmt_vec_infos rather than gimple stmts.
14090         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
14091         to a stmt_vec_info.
14092         (vectorizable_live_operation): Likewise.
14093         (vectorizable_reduction, vectorizable_induction): Likewise,
14094         updating use of STMT_VINFO_VEC_STMT.
14095         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
14096         of STMT_VINFO_VEC_STMT.
14097         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
14098         (vectorizable_simd_clone_call, vectorizable_conversion)
14099         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
14100         (vectorizable_store, vectorizable_load, vectorizable_condition)
14101         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
14102         from a gimple stmt to a stmt_vec_info.
14103         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
14104         pointer to a stmt_vec_info to the vectorizable_* routines.
14106 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
14108         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
14109         a gimple stmt to a stmt_vec_info.
14110         (is_pattern_stmt_p): Update accordingly.
14111         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
14112         (vect_record_grouped_load_vectors): Likewise.
14113         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
14114         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
14115         (vect_model_reduction_cost): Likewise.
14116         (vect_create_epilog_for_reduction): Likewise.
14117         (vectorizable_reduction, vectorizable_induction): Likewise.
14118         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
14119         Return the stmt_vec_info for the pattern statement.
14120         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
14121         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
14122         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
14123         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
14124         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
14125         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
14126         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
14127         (free_stmt_vec_info, vect_is_simple_use): Likewise.
14129 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
14131         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
14132         (vect_finish_stmt_generation): Likewise.
14133         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
14134         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
14135         (vect_build_gather_load_calls): Use the return value of the above
14136         functions instead of a separate call to vinfo_for_stmt.  Use narrow
14137         scopes for the input gimple stmt and wider scopes for the associated
14138         stmt_vec_info.  Use vec_info::lookup_def when setting these
14139         stmt_vec_infos from an SSA_NAME definition.
14140         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
14141         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
14142         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
14143         (vectorizable_store, vectorizable_load, vectorizable_condition)
14144         (vectorizable_comparison): Likewise.
14145         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
14146         (vectorizable_reduction): Likewise.
14148 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
14150         * tree-vectorizer.h (vect_is_simple_use): Add an optional
14151         stmt_vec_info * parameter before the optional gimple **.
14152         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
14153         (process_use, vect_get_vec_def_for_operand_1): Update callers.
14154         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
14155         * tree-vect-loop.c (vectorizable_reduction): Likewise.
14156         (vectorizable_live_operation): Likewise.
14157         * tree-vect-patterns.c (type_conversion_p): Likewise.
14158         (vect_look_through_possible_promotion): Likewise.
14159         (vect_recog_rotate_pattern): Likewise.
14160         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
14162 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
14164         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
14165         a typedef to a wrapper class.
14166         (NULL_STMT_VEC_INFO): New macro.
14167         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
14168         (stmt_vec_info::operator*): New function.
14169         (stmt_vec_info::operator gimple *): Likewise.
14170         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
14171         (add_stmt_costs): Likewise.
14172         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
14173         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
14174         (vect_get_known_peeling_cost): Likewise.
14175         (vect_estimate_min_profitable_iters): Likewise.
14176         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
14177         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
14178         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
14179         (vectorizable_store, free_stmt_vec_infos): Likewise.
14180         (new_stmt_vec_info): Change return type of xcalloc to
14181         _stmt_vec_info *.
14183 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
14185         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
14186         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
14187         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
14188         a single_imm_use-based sequence.
14189         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
14191 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
14193         * tree-vectorizer.h (vec_info::lookup_def): Declare.
14194         * tree-vectorizer.c (vec_info::lookup_def): New function.
14195         * tree-vect-patterns.c (vect_get_internal_def): Use it.
14196         (vect_widened_op_tree): Likewise.
14197         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
14198         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
14199         (vectorizable_reduction): Likewise.
14200         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
14201         of a gimple *.
14202         (vect_is_slp_reduction): Update calls accordingly.  Use
14203         vec_info::lookup_def.
14204         (vect_is_simple_reduction): Likewise
14205         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
14207 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
14209         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
14210         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
14211         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
14212         of vinfo_for_stmt.
14213         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
14214         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
14215         (vect_update_vf_for_slp, vect_analyze_loop_operations)
14216         (vect_is_slp_reduction, vectorizable_induction)
14217         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
14218         * tree-vect-patterns.c (vect_init_pattern_stmt):
14219         (vect_determine_min_output_precision_1, vect_determine_precisions)
14220         (vect_pattern_recog): Likewise.
14221         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
14222         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
14223         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
14224         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
14225         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
14226         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
14227         info field from a loop to a loop_vec_info.
14229 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
14231         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
14232         (vec_info::add_stmt): Declare.
14233         * tree-vectorizer.c (vec_info::add_stmt): New function.
14234         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
14235         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
14236         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
14237         (vectorizable_induction): Likewise.
14238         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
14239         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
14240         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
14241         (vectorizable_load): Likewise.
14242         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
14243         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
14244         (vect_recog_gather_scatter_pattern): Likewise.
14245         (append_pattern_def_seq): Likewise.  Remove a check that is
14246         performed by add_stmt itself.
14248 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
14250         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
14251         which make_ssa_name was called with new_stmt before new_stmt
14252         had been created.
14254 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
14256         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
14257         split out from...
14258         (vect_is_slp_reduction): ...here...
14259         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
14260         that are already known to be false.
14262 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
14264         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
14265         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
14266         STMT_VINFO_NUM_SLP_USES when it's true.
14267         (vect_free_slp_instance): Add a final_p parameter and pass it to
14268         vect_free_slp_tree.
14269         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
14270         (vect_analyze_slp_instance): Likewise.
14271         (vect_slp_analyze_operations): Likewise.
14272         (vect_slp_analyze_bb_1): Likewise.
14273         * tree-vectorizer.c (vec_info): Likewise.
14274         * tree-vect-loop.c (vect_transform_loop): Likewise.
14276 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
14278         * tree-vect-loop.c (vectorizable_reduction): Assert that the
14279         function is not called for second and subsequent members of
14280         a reduction group.
14282 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
14284         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
14285         cases for nested loops from here to ...
14286         (vect_create_epilog_for_reduction): ...here.  Only call
14287         vect_is_simple_use for inner-loop reductions.
14289 2018-07-31  Martin Liska  <mliska@suse.cz>
14291         PR gcov-profile/85338
14292         PR gcov-profile/85350
14293         PR gcov-profile/85372
14294         * profile.c (struct location_triplet): New.
14295         (struct location_triplet_hash): Likewise.
14296         (output_location): Do not output a BB that
14297         is already recorded for a line.
14298         (branch_prob): Use streamed_locations.
14300 2018-07-31  Martin Liska  <mliska@suse.cz>
14302         PR gcov-profile/85370
14303         * coverage.c (coverage_begin_function): Do not mark target
14304         clones as artificial functions.
14306 2018-07-31  Martin Liska  <mliska@suse.cz>
14308         PR gcov-profile/83813
14309         PR gcov-profile/84758
14310         PR gcov-profile/85217
14311         PR gcov-profile/85332
14312         * profile.c (branch_prob): Do not record GOTO expressions
14313         for GIMPLE statements which locations are already streamed.
14315 2018-07-31  Olivier Hainque  <hainque@adacore.com>
14317         * gcc.c (handle_spec_function): Accept a soft_matched_part
14318         argument, as do_spec_1.  Pass it down to ...
14319         (eval_spec_function): Accept a soft_matched_part argument,
14320         and pass it down to ...
14321         (do_spec_2): Accept a soft_matched_part argument, and pass
14322         it down to do_spec_1.
14323         (do_spec_1): Pass soft_matched_part to handle_spec_function.
14324         (handle_braces): Update call to handle_spec_function.
14325         (driver::set_up_specs): Update calls to do_spec_2.
14326         (compare_debug_dump_opt_spec_function): Likewise.
14327         (compare_debug_self_opt_spec_function): Likewise.
14329 2018-07-31  Olivier Hainque  <hainque@adacore.com>
14331         * common.opt (nolibc): New option.
14332         * doc/invoke.texi (Link Options): Document it.
14333         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
14334         * config/alpha/linux.h: Likewise.
14335         * config/arc/elf.h: Likewise.
14336         * config/arm/uclinux-elf.h: Likewise.
14337         * config/arm/unknown-elf.h: Likewise.
14338         * config/avr/avrlibc.h: Likewise.
14339         * config/bfin/bfin.h: Likewise.
14340         * config/bfin/linux.h: Likewise.
14341         * config/bfin/uclinux.h: Likewise.
14342         * config/darwin.h: Likewise.
14343         * config/darwin10.h: Likewise.
14344         * config/darwin12.h: Likewise.
14345         * config/gnu-user.h: Likewise.
14346         * config/lm32/uclinux-elf.h: Likewise.
14347         * config/pa/pa-hpux11.h: Likewise.
14348         * config/pa/pa64-hpux.h: Likewise.
14349         * config/sparc/sparc.h: Likewise.
14351 2018-07-31  Olivier Hainque  <hainque@adacore.com>
14353         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
14354         undefined variables.
14356 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
14358         PR target/86640
14359         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
14360         instead of GEN_INT.
14362 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
14364         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
14365         terminated string literal.
14367 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
14369         PR rtl-optimization/85160
14370         * combine.c (is_just_move): New function.
14371         (try_combine): Allow combining two instructions into two if neither of
14372         the original instructions was a move.
14374 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
14376         PR target/86673
14377         * doc/extend.texi (Global Register Variables): Discourage use of type
14378         qualifiers.
14379         (Local Register Variables): Likewise.
14381 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
14383         PR tree-optimization/86506
14384         * hwint.h (ceil_log2): Resync with hwint.c implementation.
14386 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
14388         PR target/86547
14389         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
14390         hard_regno, make sure no insn between `from` and `to` clobbers it.
14392 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
14393             Tom de Vries  <tdevries@suse.de>
14395         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
14396         (PTX_DEFAULT_RUNTIME_DIM): ... this.
14397         (nvptx_goacc_validate_dims): Set default worker and gang dims to
14398         PTX_DEFAULT_RUNTIME_DIM.
14399         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
14401 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
14403         * config/pa/pa.c (pa_output_addr_vec): Align address table.
14404         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
14405         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
14407 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
14409         * config/rs6000/constraints.md (wG constraint): Delete, no longer
14410         used.
14411         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
14412         predicate to reflect toc fusion has been deleted.
14413         (toc_fusion_mem_raw): Delete, no longer used.
14414         (toc_fusion_mem_wrapped): Likewise.
14415         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
14416         fusion mask bit.
14417         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
14418         Delete, no longer used.
14419         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
14420         meant to be used for toc fusion.
14421         (rs6000_debug_print_mode): Delete toc fusion debugging.
14422         (rs6000_debug_reg_global): Likewise.
14423         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
14424         fusion and secondary reload support that were never used.
14425         (rs6000_option_override_internal): Delete TOC fusion, that was only
14426         partially defined, and it did not work unless you also used the
14427         -mcmodel= switch.
14428         (rs6000_legitimate_address_p): Delete TOC fusion support.
14429         (rs6000_opt_masks): Likewise.
14430         (fusion_wrap_memory_address): Delete function, no longer used.
14431         (fusion_split_address); Delete TOC fusion support.
14432         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
14433         longer used with toc fusion being deleted.
14434         (TARGET_TOC_FUSION_FP): Likewise.
14435         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
14436         UNSPEC.
14437         (toc fusion spliter): Delete TOC fusion support.
14438         (toc_fusionload_<mode>): Likewise.
14439         (toc_fusionload_di): Likewise.
14440         (fusion_gpr_load_<mode>): Delete generator function, this insn no
14441         longer needs to be named.  Rename predicate to delete TOC fusion.
14442         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
14443         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
14444         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
14445         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
14446         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
14448 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14450         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
14451         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
14452         __int128 in built-in function prototypes.
14453         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
14454         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
14456 2018-07-27  Martin Sebor  <msebor@redhat.com>
14458         PR tree-optimization/86696
14459         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
14460         types, including enums.
14461         (handle_char_store): Be prepared for the above function to fail.
14463 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
14465         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
14466         when optimization level is lower than 2 or optimize for size.
14468 2018-07-26  Martin Sebor  <msebor@redhat.com>
14470         PR tree-optimization/86043
14471         PR tree-optimization/86042
14472         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
14473         (get_string_cst_length): Rename...
14474         (get_min_string_length): ...to this.  Add argument.
14475         (handle_char_store): Extend to handle multi-character stores by
14476         MEM_REF.
14477         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
14478         * tree.h (initializer_zerop): Add argument.
14480 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
14482         PR middle-end/86660
14483         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
14484         declare target to variables if they have always,{to,from,tofrom} map
14485         kinds.
14487 2018-07-26  Martin Liska  <mliska@suse.cz>
14489         PR lto/86548
14490         * lto-wrapper.c: Add linker_output as prefix
14491         for ltrans_output_file.
14493 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
14495         PR rtl-optimization/85805
14496         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
14497         value for hard registers if that was written in the same mode.
14499 2018-07-26  Martin Liska  <mliska@suse.cz>
14501         PR gcov-profile/86536
14502         * gcov.c (format_gcov): Use printf format %.*f directly
14503         and do not handle special values.
14505 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
14507         * common/config/arc/arc-common.c (arc_option_optimization_table):
14508         Update default optimizations for size.
14510 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
14512         * config/arc/arc.md (movsf_insn): Add short instruction selection.
14513         * config/arc/constraints.md (CfZ): New constraint.
14514         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
14515         (subsf3_fpu): Likewise.
14516         (cmpsf_fpu): Likewise.
14517         (cmpsf_fpu_uneq): Likewise.
14519 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
14521         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
14522         accesses as well.
14523         (arc_is_uncached_mem_p): uncached applies to both the variable and
14524         the pointer.
14526 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
14528         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
14529         register names.
14531 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
14533         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
14534         field "m_scopes" from vec to auto_vec.
14536 2018-07-25  Martin Liska  <mliska@suse.cz>
14538         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
14539         return type.
14541 2018-07-25  Richard Biener  <rguenther@suse.de>
14543         PR debug/86654
14544         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
14545         special wrt context_die late.
14546         (gen_subprogram_die): Re-use DIEs in local scope.
14548 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
14550         PR tree-optimization/86644
14551         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
14553 2018-07-25  Martin Liska  <mliska@suse.cz>
14555         PR middle-end/86645
14556         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
14557         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
14559 2018-07-25  Martin Liska  <mliska@suse.cz>
14561         PR sanitizer/79635
14562         * params.def: Explain ASan abbreviation and provide
14563         a documentation link.
14565 2018-07-24  Martin Sebor  <msebor@redhat.com>
14567         PR tree-optimization/86622
14568         PR tree-optimization/86532
14569         * builtins.h (string_length): Declare.
14570         * builtins.c (c_strlen): Correct handling of non-constant offsets.
14571         (check_access): Be prepared for non-constant length ranges.
14572         (string_length): Make extern.
14573         * expr.c (string_constant): Only handle the minor non-constant
14574         array index.  Use string_constant to compute the length of
14575         a generic string constant.
14577 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
14579         PR tree-optimization/86618
14580         * tree-vect-stmts.c (vectorizable_call): Don't take the address
14581         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
14583 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
14585         PR tree-optimization/86636
14586         * json.cc (json::object::set): Fix comment.  Add assertions.
14587         (json::array::append): Move here from json.h.  Add comment and an
14588         assertion.
14589         (json::string::string): Likewise.
14590         * json.h (json::array::append): Move to json.cc.
14591         (json::string::string): Likewise.
14592         * optinfo-emit-json.cc
14593         (optrecord_json_writer::impl_location_to_json): Assert that we
14594         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
14595         wrapper around it.  Expand the location once, rather than three
14596         times.
14597         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
14598         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
14599         wrappers.
14600         (optrecord_json_writer::optinfo_to_json): Likewise, in four
14601         places.  Fix some overlong lines.
14603 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
14605         * config/aarch64/aarch64-simd.md
14606         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
14607         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
14608         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
14609         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
14610         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
14611         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
14612         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
14613         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
14614         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
14616 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
14618         PR middle-end/86627
14619         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
14620         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
14621         and abs_d == d, do the power of two handling if profitable.
14623 2018-07-24  Richard Biener  <rguenther@suse.de>
14625         * match.pd: Add BIT_FIELD_REF canonicalizations.
14627 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
14629         PR c/86617
14630         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
14632 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
14634         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
14635         terminated STRING_CST object.
14637 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
14639         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
14641 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
14643         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
14644         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
14645         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
14646         the elements into a register.
14647         (rs6000_split_v4si_init_di_reg): Delete.
14648         (rs6000_split_v4si_init): Delete.
14649         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
14650         (vsx_init_v4si): Rewrite as a define_expand.
14652 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
14654         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
14655         zero_extend argument from memory): New.
14657 2018-07-22  Martin Sebor  <msebor@redhat.com>
14659         PR bootstrap/86621
14660         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
14661         diagnosing calls with unknown arguments unless -Walloca-larger-than
14662         is restricted to less than PTRDIFF_MAX bytes.
14664 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
14666         * doc/gcov.texi (Invoking Gcov): Editorial changes.
14668 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
14670         * pretty-print.c (text_info::set_location): Remove redundant
14671         "line_table" parameter from call to rich_location::set_range.
14673 2018-07-20  Martin Sebor  <msebor@redhat.com>
14675         PR middle-end/82063
14676         * builtins.c (expand_builtin_alloca): Adjust.
14677         * calls.c (alloc_max_size): Simplify.
14678         * cgraphunit.c (cgraph_node::expand): Adjust.
14679         * common.opt (larger_than_size, warn_frame_larger_than): Remove
14680         variables.
14681         (frame_larger_than_size): Same.
14682         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
14683         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
14684         Initialize.
14685         * doc/invoke.texi (GCC Command Options): Document option arguments.
14686         Explain byte-size arguments and suffixes.
14687         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
14688         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
14689         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
14690         * doc/options.texi (UInteger): Expand.
14691         (Host_Wide_Int, ByteSize): Document new properties.
14692         * final.c (final_start_function_1): Include sizes in an error message.
14693         * function.c (frame_offset_overflow): Same.
14694         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
14695         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
14696         Diagnose unbounded alloca calls only for limits of less than
14697         PTRDIFF_MAX.
14698         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
14699         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
14700         for alloca(0).
14701         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
14702         only for limits of less than PTRDIFF_MAX.
14703         * langhooks-def.h (lhd_handle_option): Change function argument
14704         to HOST_WIDE_INT.
14705         * langhooks.c (lhd_handle_option): Same.
14706         * langhooks.h (handle_option): Same.
14707         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
14708         ByteSize flags.
14709         (var_type, var_type_struct): Same.
14710         (var_set): Handle ByteSize flag.
14711         * optc-gen.awk: Add comments to output to ease debugging.  Make
14712         use of HOST_WIDE_INT where appropriate.
14713         * opts-gen-save.awk:  Use %lx to format unsigned long.
14714         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
14715         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
14716         arguments.  Parse bytes-size suffixes.
14717         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
14718         (enum_value_to_arg): Same.
14719         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
14720         (handle_option): Adjust.
14721         (generate_option): Change function argument to HOST_WIDE_INT.
14722         (cmdline_handle_error): Adjust.
14723         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
14724         (set_option): Change function argument to HOST_WIDE_INT.
14725         (option_enabled): Handle cl_host_wide_int.
14726         (get_option_state): Handle CLVC_SIZE.
14727         (control_warning_option): Same.
14728         * opts.c (common_handle_option): Change function argument to
14729         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
14730         OPT_Wvla_larger_than_.
14731         * opts.h (enum cl_var_type): Add an enumerator.
14732         * stor-layout.c (layout_decl): Print a more meaningful warning.
14733         * toplev.c (output_stack_usage): Adjust.
14735 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
14737         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
14738         call to inline_expand_builtin_string_cmp.
14739         (expand_builtin_strcmp): Likewise.
14740         (expand_builtin_strncmp): Likewise.
14741         (inline_string_cmp): Delete the last parameter, change char_type_node
14742         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
14743         two operands.
14744         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
14745         the inlining expansion on target where the type of the call has same or
14746         narrower precision than unsigned char.
14748 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
14750         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
14751         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
14752         * common.opt (fsave-optimization-record): New option.
14753         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
14754         * doc/invoke.texi (-fsave-optimization-record): New option.
14755         * dumpfile.c: Include "optinfo-emit-json.h".
14756         (struct kv_pair): Move to coretypes.h.
14757         (optgroup_options): Make non-static.
14758         (dump_context::end_scope): Call
14759         optimization_records_maybe_pop_dump_scope.
14760         * dumpfile.h (optgroup_options): New decl.
14761         * json.cc: New file.
14762         * json.h: New file.
14763         * optinfo-emit-json.cc: New file.
14764         * optinfo-emit-json.h: New file.
14765         * optinfo.cc: Include "optinfo-emit-json.h".
14766         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
14767         (optinfo_enabled_p): Check optimization_records_enabled_p.
14768         (optinfo_wants_inlining_info_p): Likewise.
14769         * optinfo.h: Update comment.
14770         * profile-count.c (profile_quality_as_string): New function.
14771         * profile-count.h (profile_quality_as_string): New decl.
14772         (profile_count::quality): New accessor.
14773         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
14774         and optinfo_emit_json_cc_tests.
14775         * selftest.h (selftest::json_cc_tests): New decl.
14776         (selftest::optinfo_emit_json_cc_tests): New decl.
14777         * toplev.c: Include "optinfo-emit-json.h".
14778         (compile_file): Call optimization_records_finish.
14779         (do_compile): Call optimization_records_start.
14780         * tree-ssa-live.c: Include optinfo.h.
14781         (remove_unused_scope_block_p): Retain inlining information if
14782         optinfo_wants_inlining_info_p returns true.
14784 2018-07-20  Richard Biener  <rguenther@suse.de>
14786         PR debug/86585
14787         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
14788         to cover -flto-partition=none.
14790 2018-07-20  Martin Liska  <mliska@suse.cz>
14792         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
14793         (get_decl_source_range): Remove unused function.
14795 2018-07-20  Richard Biener  <rguenther@suse.de>
14797         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
14798         (struct vn_phi_s): Likewise.
14799         (struct vn_reference_s): Likewise.
14800         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
14801         for searching the slot of an entry known to be in the hash itself.
14802         (vn_phi_hasher::equal): Likewise.
14803         (vn_reference_hasher::equal): Likewise.
14804         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
14805         globals.
14806         (optimistic_info, current_info): Remove, keeping only valid_info.
14807         (vn_reference_lookup_1): Remove fallback lookup.
14808         (vn_reference_lookup_2): Likewise.
14809         (vn_nary_op_lookup_1): Likewise.
14810         (vn_phi_lookup): Likewise.
14811         (vn_nary_build_or_lookup_1): Make sure to not chain the built
14812         hash element.
14813         (vn_reference_insert): Adjust, chain the inserted hash element
14814         at last_inserted_ref.
14815         (vn_reference_insert_pieces): Likewise.
14816         (visit_reference_op_call): Likewise.
14817         (vn_nary_op_insert_into): Chain the inserted hash element at
14818         last_inserted_nary.
14819         (vn_nary_op_insert_pieces): Adjust.
14820         (vn_nary_op_insert): Likewise.
14821         (vn_nary_op_insert_stmt): Likewise.
14822         (vn_phi_insert): Adjust, chain the inserted hash element at
14823         last_inserted_phi.
14824         (process_scc): Remove clearing and copying the optimistic
14825         table.  Instead remove elements inserted during an optimistic
14826         iteration from the single table we maintain.
14827         (init_scc_vn): Adjust.
14828         (free_scc_vn): Likewise.
14829         (sccvn_dom_walker::record_cond): Likewise.
14830         (sccvn_dom_walker::after_dom_children): Likewise.
14832 2018-07-19  Martin Sebor  <msebor@redhat.com>
14834         PR tree-optimization/84047
14835         PR tree-optimization/83776
14836         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
14837         (check_array_bounds): Call it.
14839 2018-07-19  Martin Sebor  <msebor@redhat.com>
14841         * align.h (align_flags): Use member initialization.
14843 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
14845         * Makefile.in (OBJS): Add optinfo.o.
14846         * coretypes.h (class symtab_node): New forward decl.
14847         (struct cgraph_node): New forward decl.
14848         (class varpool_node): New forward decl.
14849         * dump-context.h: New file.
14850         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
14851         "tree-pass.h".
14852         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
14853         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
14854         (set_alt_dump_file): Likewise.
14855         (dump_context::~dump_context): New dtor.
14856         (dump_gimple_stmt): Move implementation to...
14857         (dump_context::dump_gimple_stmt): ...this new member function.
14858         Add the stmt to any pending optinfo, creating one if need be.
14859         (dump_gimple_stmt_loc): Move implementation to...
14860         (dump_context::dump_gimple_stmt_loc): ...this new member function.
14861         Start a new optinfo and add the stmt to it.
14862         (dump_gimple_expr): Move implementation to...
14863         (dump_context::dump_gimple_expr): ...this new member function.
14864         Add the stmt to any pending optinfo, creating one if need be.
14865         (dump_gimple_expr_loc): Move implementation to...
14866         (dump_context::dump_gimple_expr_loc): ...this new member function.
14867         Start a new optinfo and add the stmt to it.
14868         (dump_generic_expr): Move implementation to...
14869         (dump_context::dump_generic_expr): ...this new member function.
14870         Add the tree to any pending optinfo, creating one if need be.
14871         (dump_generic_expr_loc): Move implementation to...
14872         (dump_context::dump_generic_expr_loc): ...this new member
14873         function.  Add the tree to any pending optinfo, creating one if
14874         need be.
14875         (dump_printf): Move implementation to...
14876         (dump_context::dump_printf_va): ...this new member function.  Add
14877         the text to any pending optinfo, creating one if need be.
14878         (dump_printf_loc): Move implementation to...
14879         (dump_context::dump_printf_loc_va): ...this new member function.
14880         Start a new optinfo and add the stmt to it.
14881         (dump_dec): Move implementation to...
14882         (dump_context::dump_dec): ...this new member function.  Add the
14883         value to any pending optinfo, creating one if need be.
14884         (dump_context::dump_symtab_node): New member function.
14885         (dump_context::get_scope_depth): New member function.
14886         (dump_context::begin_scope): New member function.
14887         (dump_context::end_scope): New member function.
14888         (dump_context::ensure_pending_optinfo): New member function.
14889         (dump_context::begin_next_optinfo): New member function.
14890         (dump_context::end_any_optinfo): New member function.
14891         (dump_context::s_current): New global.
14892         (dump_context::s_default): New global.
14893         (dump_scope_depth): Delete global.
14894         (dumpfile_ensure_any_optinfo_are_flushed): New function.
14895         (dump_symtab_node): New function.
14896         (get_dump_scope_depth): Reimplement in terms of dump_context.
14897         (dump_begin_scope): Likewise.
14898         (dump_end_scope): Likewise.
14899         (selftest::temp_dump_context::temp_dump_context): New ctor.
14900         (selftest::temp_dump_context::~temp_dump_context): New dtor.
14901         (selftest::verify_item): New function.
14902         (ASSERT_IS_TEXT): New macro.
14903         (ASSERT_IS_TREE): New macro.
14904         (ASSERT_IS_GIMPLE): New macro.
14905         (selftest::test_capture_of_dump_calls): New test.
14906         (selftest::dumpfile_c_tests): Call it.
14907         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
14908         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
14909         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
14910         descriptive comment.
14911         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
14912         (dump_node, dump_bb): Move these unrelated decls.
14913         (class dump_manager): Add leading comment.
14914         * optinfo.cc: New file.
14915         * optinfo.h: New file.
14917 2018-07-19  Michael Collison  <michael.collison@arm.com>
14918             Richard Henderson <rth@redhat.com>
14920         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
14921         (subti): Handle op1 zero.
14922         (subvti4, usub4ti4): New.
14923         (*sub<GPI>3_compare1_imm): New.
14924         (sub<GPI>3_carryinCV): New.
14925         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
14926         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
14928 2018-07-19  Michael Collison  <michael.collison@arm.com>
14929             Richard Henderson <rth@redhat.com>
14931         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
14932         (addti3): Create simpler code if low part is already known to be 0.
14933         (addvti4, uaddvti4): New.
14934         (*add<GPI>3_compareC_cconly_imm): New.
14935         (*add<GPI>3_compareC_cconly): New.
14936         (*add<GPI>3_compareC_imm): New.
14937         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
14938         handle constants within this pattern..
14939         (*add<GPI>3_compareV_cconly_imm): New.
14940         (*add<GPI>3_compareV_cconly): New.
14941         (*add<GPI>3_compareV_imm): New.
14942         (add<GPI>3_compareV): New.
14943         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
14944         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
14945         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
14946         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
14947         with 'comparison' operator.
14948         (*add<GPI>3_compareV_cconly_imm): Ditto.
14949         (*add<GPI>3_compareV_cconly): Ditto.
14950         (*add<GPI>3_compareV_imm): Ditto.
14951         (add<GPI>3_compareV): Ditto.
14952         (add<mode>3_carryinC): Ditto.
14953         (*add<mode>3_carryinC_zero): Ditto.
14954         (*add<mode>3_carryinC): Ditto.
14955         (add<mode>3_carryinV): Ditto.
14956         (*add<mode>3_carryinV_zero): Ditto.
14957         (*add<mode>3_carryinV): Ditto.
14959 2018-07-19  Michael Collison  <michael.collison@arm.com>
14960             Richard Henderson <rth@redhat.com>
14962         * config/aarch64/aarch64-modes.def (CC_V): New.
14963         * config/aarch64/aarch64-protos.h
14964         (aarch64_addti_scratch_regs): Declare
14965         (aarch64_subvti_scratch_regs): Declare.
14966         (aarch64_expand_subvti): Declare.
14967         (aarch64_gen_unlikely_cbranch): Declare
14968         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
14969         for signed overflow using CC_Vmode.
14970         (aarch64_get_condition_code_1): Handle CC_Vmode.
14971         (aarch64_gen_unlikely_cbranch): New function.
14972         (aarch64_addti_scratch_regs): New function.
14973         (aarch64_subvti_scratch_regs): New function.
14974         (aarch64_expand_subvti): New function.
14976 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
14978         * config/aarch64/aarch64-option-extensions.def: New entry for profile
14979         extension.
14980         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
14981         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
14982         extension.
14984 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
14986         PR target/83009
14987         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
14988         address check not strict.
14990 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
14992         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
14993         Umq with Umn.
14994         (store_pair_lanes<mode>): Likewise.
14995         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
14996         enum value 'ADDR_QUERY_LDP_STP_N'.
14997         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
14998         (aarch64_print_address_internal): Add declaration.
14999         (aarch64_print_ldpstp_address): Remove.
15000         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
15001         (aarch64_print_operand): Change printing of 'y'.
15002         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
15003         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
15004         'true' rather than '1'.
15005         * config/aarch64/constraints.md (Uml): Likewise.
15006         (Uml): Rename to Umn.
15007         (Umq): Remove.
15009 2018-07-19  Richard Biener  <rguenther@suse.de>
15011         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
15012         a trailing array.
15013         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
15014         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
15015         (vn_reference_hasher): Likewise.
15016         (struct vn_tables_s): Remove obstack and alloc-pool members.
15017         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
15018         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
15019         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
15020         (vn_reference_insert_pieces): Likewise.
15021         (alloc_vn_nary_op_noinit): Adjust.
15022         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
15023         (vn_phi_eq): Adjust.
15024         (shared_lookup_phiargs): Remove.
15025         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
15026         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
15027         (visit_reference_op_call): Likewise.
15028         (copy_nary, copy_phi, copy_reference): Remove.
15029         (process_scc): Rewind the obstack when iterating.  Do not
15030         copy the elements to valid_info but just move them from one
15031         hashtable to the other.
15032         (allocate_vn_table): Adjust.
15033         (free_vn_table): Likewise.
15034         (init_scc_vn): Likewise.
15035         (free_scc_vn): Likewise.
15037 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
15039         PR target/86560
15040         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
15041         indirect_return as function type attribute.
15042         (ix86_attribute_table): Change indirect_return to function
15043         type attribute.
15044         * doc/extend.texi: Update indirect_return attribute.
15046 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
15048         * wide-int.h (widest2_int): New.
15049         * gimple-fold.c (arith_overflowed_p): Use it.
15050         * tree.h (widest2_int_cst): New.
15051         * tree-vrp.c (wide_int_binop_overflow): Rename from
15052         vrp_int_const_binop.
15053         Rewrite to work on trees.
15054         (extract_range_from_multiplicative_op_1): Abstract code to...
15055         (wide_int_range_min_max): ...here.
15056         (wide_int_range_cross_product): ...and here.
15057         (extract_range_from_binary_expr_1): Abstract overflow code to...
15058         (wide_int_range_mult_wrapping): ...here.
15059         * tree-vrp.h (wide_int_range_cross_product): New.
15060         (wide_int_range_mult_wrapping): New.
15062 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
15063             Julia Koval  <julia.koval@intel.com>
15065         * config/i386/x86-tune-costs.h (skylake_memcpy,
15066         skylake_memset): Replace rep_prefix with unrolling for size 512.
15068 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
15070         PR middle-end/86544
15071         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
15072         comparision with EQ_EXPR in last stmt.
15074 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15076         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
15077         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
15078         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
15079         previously known as "PowerPC AltiVec Built-in Functions".  Move
15080         some material to new subsubsections "PowerPC AltiVec Built-in
15081         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
15082         ISA 2.07".
15083         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
15084         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
15085         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
15086         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
15088 2018-07-18  Richard Biener  <rguenther@suse.de>
15090         PR tree-optimization/86557
15091         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
15092         EXACT_DIV_EXPR.
15094 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
15096         * config/s390/s390.c (s390_function_profiler): Generate CFI.
15098 2018-07-17  Jeff Law  <law@redhat.com>
15100         * config/arm/arm.c (get_label_padding): Update for recent
15101         changes to label_to_alignment.
15103         PR tree-optimization/86010
15104         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
15106         * config/mips/mips.c (vr4130_align_insns): Update for recent
15107         changes to label_to_alignment.
15109         * config/frv/frv.c (frv_label_align): Update for recent changes
15110         to label_to_alignment.
15112         * config/nios2/nios2.c (nios2_label_align): Update for recent
15113         changes which dropped ALIGN_LABELS_LOG.
15115 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
15117         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
15118         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
15120 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
15122         * config/arc/arc.c (arc_label_align): Use align_labels instead of
15123         deprecated align_labels_log.
15125 2018-07-17  Richard Biener  <rguenther@suse.de>
15127         PR lto/86456
15128         * dwarf2out.c (init_sections_and_labels): Always generate
15129         a debug_line_str_section for early LTO debug.
15130         (dwarf2out_finish): Reset debug_line_str_hash output early.
15131         Bump counter for extra dwarf5 .debug_loc labels to not conflict
15132         with fat LTO part.
15133         (dwarf2out_early_finish): Output debug_line_str.
15135 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
15137         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
15138         index register on z196 or later.
15140 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
15142         * config/s390/s390.c (s390_default_align): Set default function
15143         alignment to 16.
15144         (s390_override_options_after_change): Call s390_default align.
15145         (s390_option_override_internal): Call s390_default_align.
15146         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
15148 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
15150         PR middle-end/86542
15151         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
15152         to _looptemp_ clauses, other than the first two.
15154 2018-07-17  Martin Liska  <mliska@suse.cz>
15156         * opts.c: Do not enable OPT_falign_* for -Os.
15158 2018-07-17  Martin Liska  <mliska@suse.cz>
15160         * align.h (MAX_CODE_ALIGN): New.
15161         (MAX_CODE_ALIGN_VALUE): New.
15162         * common/config/i386/i386-common.c (ix86_handle_option):
15163         (MAX_CODE_ALIGN): Moved to align.h.
15164         * final.c (MAX_CODE_ALIGN): Likewise.
15165         * opts.c (parse_and_check_align_values):
15166         (MAX_CODE_ALIGN): Likewise.
15167         (MAX_CODE_ALIGN_VALUE): Likewise.
15169 2018-07-17  Martin Liska  <mliska@suse.cz>
15171         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
15172         in order to fulfil coding style.
15173         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
15174         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15175         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
15176         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
15177         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
15178         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
15179         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
15180         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
15181         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15183 2018-07-17  Martin Liska  <mliska@suse.cz>
15185         * align.h: New file.
15186         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
15187         directly.
15188         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
15189         align_flags of label_to_alignment.
15190         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
15191         align_flags class.
15192         * config/m68k/m68k.c: Do not use removed align_labels_value and
15193         align_loops_value.
15194         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
15195         (LOOP_ALIGN): Likewise.
15196         (LABEL_ALIGN): Likewise.
15197         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
15198         Remove not used macro.
15199         (rs6000_loop_align): Change return type to align_flags.
15200         (rs6000_loop_align_max_skip): Remove.
15201         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
15202         Change return type to align_flags.
15203         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
15204         Remove not used macro.
15205         (rs6000_loop_align):  Change return type to align_flags.
15206         (rs6000_loop_align_max_skip): Remove.
15207         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
15208         * config/rx/rx-protos.h (rx_align_for_label): Make it
15209         static function.
15210         * config/rx/rx.c (rx_align_for_label): Change return type
15211         to align_flags.
15212         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
15213         macro definitions.
15214         into align_flags class.
15215         (LABEL_ALIGN): Likewise.
15216         (LOOP_ALIGN): Likewise.
15217         * config/s390/s390.c (s390_label_align): Use align_flags
15218         class member.
15219         (s390_asm_output_function_label): Likewise.
15220         * config/sh/sh.c (sh_override_options_after_change):
15221         Use align_flags class directly without macros.
15222         (find_barrier): Likewise.
15223         (barrier_align): Likewise.
15224         (sh_loop_align): Likewise.
15225         * config/spu/spu.c (spu_option_override):
15226         Use align_flags_tuple::get_value instead of removed macros.
15227         (spu_sched_init): Likewise.
15228         * config/spu/spu.h (GTY): Likewise.
15229         * config/visium/visium.c (visium_option_override):
15230         Set "8" as default secondary alignment.
15231         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
15232         in order to guarantee secondary alignment of 8.
15233         * coretypes.h: Include align.h header file.
15234         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
15235         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
15236         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
15237         * doc/tm.texi.in: Likewise.
15238         * final.c (struct label_alignment): Remove not used structure.
15239         (LABEL_ALIGN): Change type to align_flags.
15240         (LOOP_ALIGN): Likewise.
15241         (JUMP_ALIGN): Likewise.
15242         (default_loop_align_max_skip): Remove.
15243         (default_label_align_max_skip): Likewise.
15244         (default_jump_align_max_skip): Likewise.
15245         (default_label_align_after_barrier_max_skip):
15246         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
15247         (LABEL_TO_MAX_SKIP): Remove.
15248         (label_to_alignment): Return align_flags type instead of integer.
15249         (label_to_max_skip): Remove.
15250         (align_fuzz): Use align_flags type.
15251         (compute_alignments): Use align_flags type and use align_flags::max
15252         to combine multiple alignments.
15253         (grow_label_align): Grow vec instead of C array.
15254         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
15255         (shorten_branches):  Use align_flags type and use align_flags::max
15256         to combine multiple alignments.
15257         (final_scan_insn_1): Remove usage of secondary alignment that comes
15258         from label alignment, but instead use proper secondary alignment
15259         which is computed in grow_label_align.
15260         * flags.h (struct align_flags_tuple): Move to align.h.
15261         (struct align_flags): Likewise.
15262         (state_align_loops): Rename to align_loops.
15263         (state_align_jumps): Rename to align_jumps.
15264         (state_align_labels): Rename to align_labels.
15265         (state_align_functions): Rename to align_functions.
15266         (align_loops_log): Remove.
15267         (align_jumps_log): Remove.
15268         (align_labels_log): Remove.
15269         (align_functions_log): Remove.
15270         (align_loops_max_skip): Remove.
15271         (align_jumps_max_skip): Remove.
15272         (align_labels_max_skip): Remove.
15273         (align_functions_max_skip): Remove.
15274         (align_loops_value): Remove.
15275         (align_jumps_value): Remove.
15276         (align_labels_value): Remove.
15277         (align_functions_value): Remove.
15278         * output.h (label_to_alignment): Change return type to align_flags.
15279         (label_to_max_skip): Remove.
15280         * target.def: Remove loop_align_max_skip, label_align_max_skip,
15281         jump_align_max_skip macros.
15282         * targhooks.h (default_loop_align_max_skip): Remove.
15283         (default_label_align_max_skip): Likewise.
15284         (default_jump_align_max_skip): Likewise.
15285         (default_label_align_after_barrier_max_skip): Remove.
15286         * toplev.c (read_log_maxskip): Use ::normalize function.
15287         (parse_N_M): Remove not used argument and also call ::normalize.
15288         (parse_alignment_opts): Do not pass unused arguments.
15289         * varasm.c (assemble_start_function): Use directly align_functions
15290         instead of removed macros.
15291         * system.h: Do not poison removed macros.
15293 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
15295         PR middle-end/86539
15296         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
15297         and cond temporaries don't have reference type if iterator has
15298         pointer type.  For init use &for_pre_body instead of pre_p if
15299         for_pre_body is non-empty.
15301 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
15303         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
15304         double-double modes to SFmode directly directly.
15305         (trunc<mode>sf2_fprs): Delete.
15307 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
15309         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
15310         for conversions between IFmode and the decimal floating point modes.
15311         (init_float128_ieee): Use the correct names for conversions between
15312         KFmode and the decimal floating point modes.
15314 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
15316         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
15317         for the conversions between TDmode and IFmode.
15318         (init_float128_ieee): Use more correct names for the conversions
15319         between TDmode and KFmode.
15321 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
15323         PR tree-optimization/86526
15324         * builtins.c (expand_builtin_memcmp): Formatting fixes.
15325         (inline_expand_builtin_string_cmp): Likewise.
15326         (inline_string_cmp): Likewise.  Use c_readstr instead of
15327         builtin_memcpy_read_str.  Add unit_mode temporary.
15329 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
15331         PR middle-end/86528
15332         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
15333         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
15335 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15337         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
15338         Alphabetize prototypes of built-in functions, separating out
15339         built-in functions that are listed in this section but should be
15340         described elsewhere.
15342 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
15344         PR target/86511
15345         * expmed.c (emit_store_flag): Do not emit setcc followed by a
15346         conditional move when trapping comparison was split to a
15347         non-trapping one (and vice versa).
15349 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
15351         * config/s390/s390.c (s390_function_profiler): Generate nops
15352         instead of profiler call sequences.
15353         * config/s390/s390.opt: Add the new option.
15355 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
15357         * config/s390/s390.c (s390_function_profiler): Generate
15358         __mcount_loc section.
15359         * config/s390/s390.opt: Add the new option.
15361 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
15363         * common.opt: Add the new warning.
15364         * config/s390/s390.c (s390_function_profiler): Emit "brasl
15365         %r0,__fentry__" when -mfentry is specified.
15366         (s390_option_override_internal): Disallow -mfentry for 31-bit
15367         CPUs.
15368         * config/s390/s390.opt: Add the new option.
15370 2018-07-16  Richard Biener  <rguenther@suse.de>
15372         PR lto/86523
15373         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
15374         for function-local FUNCTION_DECL and RESULT_DECL immediately.
15376 2018-07-16  Martin Liska  <mliska@suse.cz>
15378         PR ipa/86529
15379         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
15380         to ::get_create.
15382 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
15384         * config/arc/arcHS.md: Update ARCHS scheduling rules.
15386 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
15388         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
15389         for ARCHS4x.
15390         * config/arc/arc-cpus.def (hs4x): New cpu.
15391         (hs4xd): Likewise.
15392         * config/arc/arc-tables.opt: Regenerate.
15393         * config/arc/arc.c (arc_sched_issue_rate): New function.
15394         (TARGET_SCHED_ISSUE_RATE): Define.
15395         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
15396         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
15397         fpu_cvt.
15398         (attr tune): Add ARCHS4x tune values.
15399         (attr tune_dspmpy): Define.
15400         (*tst): Correct instruction type.
15401         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
15402         * config/arc/arcHS4x.md: New file.
15403         * config/arc/fpu.md: Update instruction type attributes.
15404         * config/arc/t-multilib: Regenerate.
15406 2018-07-16  Tom de Vries  <tdevries@suse.de>
15408         PR debug/86455
15409         * var-tracking.c (vt_initialize): Fix pre_dec handling.
15411 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
15413         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
15414         early clobber.
15416 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
15418         PR tree-optimization/86514
15419         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
15420         conversion to a boolean type from a type with greater precision.
15422 2018-07-16  Tom de Vries  <tdevries@suse.de>
15424         * var-tracking.c (vt_initialize): Print adjusted insn slim if
15425         dump_flags request TDF_SLIM.
15427 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
15429         * fold-const.c (int_const_binop_1): Abstract...
15430         (wide_int_binop): ...wide int code here.
15431         (poly_int_binop): ...poly int code here.
15432         Abstract the rest of int_const_binop_1 into int_const_binop.
15433         * fold-const.h (wide_int_binop): New.
15434         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
15435         Remove useless PLUS/MINUS_EXPR case.
15436         (zero_nonzero_bits_from_vr): Move wide int code...
15437         (zero_nonzero_bits_from_bounds): ...here.
15438         (extract_range_from_binary_expr_1): Move mask optimization code...
15439         (range_easy_mask_min_max): ...here.
15440         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
15441         (range_easy_mask_min_max): New.
15443 2018-07-15  Jeff Law  <law@redhat.com>
15445         PR target/85993
15446         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
15447         block.
15449 2018-07-14  Jim Wilson  <jimw@sifive.com>
15451         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
15453 2018-07-14  Paul Koning  <ni1d@arrl.net>
15455         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
15457 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
15459         * lto-streamer-out.c (copy_function_or_variable): Dump info about
15460         copying section.
15462 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
15463             Steve Munroe  <munroesj52@gmail.com>
15465         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
15466         (_mm_andnot_si128): Likewise.
15467         (_mm_or_si128): Likewise.
15468         (_mm_xor_si128): Likewise.
15470 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
15472         PR middle-end/78809
15473         * builtins.c (expand_builtin_memcmp): Inline the calls first
15474         when result_eq is false.
15475         (expand_builtin_strcmp): Inline the calls first.
15476         (expand_builtin_strncmp): Likewise.
15477         (inline_string_cmp): New routine. Expand a string compare
15478         call by using a sequence of char comparison.
15479         (inline_expand_builtin_string_cmp): New routine. Inline expansion
15480         a call to str(n)cmp/memcmp.
15481         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
15482         New option.
15483         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
15485 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
15487         * config/arm/driver-arm.c: Include arm-native.h.
15488         (host_detect_local_cpu): Use auto-generated data tables.
15489         (vendors, arm_cpu_table): Delete.  Move part information to ...
15490         * config/arm/arm-cpus.in: ... here.
15491         * config/arm/parsecpu.awk (gen_native): New function.
15492         (vendor, part): New CPU fields.
15493         (END): Add support for building the native CPU detection tables.
15494         * config/arm/t-arm (arm-native.h): Add build rule.
15495         (driver-arm.o): Add dependency on arm-native.h.
15497 2018-07-13  Richard Biener  <rguenther@suse.de>
15499         PR middle-end/85974
15500         * match.pd (addr1 - addr2): Allow either of the operand to
15501         have a conversion.
15503 2018-07-13  Tom de Vries  <tdevries@suse.de>
15505         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
15506         in remap_ssa_name.
15508 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
15510         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
15511         arrays instead of numbered variables.
15513 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
15515         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
15516         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
15518 2018-07-13  Richard Biener  <rguenther@suse.de>
15520         PR debug/86452
15521         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
15522         instead of get_context_die.
15524 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
15525             Richard Biener  <rguenther@suse.de>
15527         PR middle-end/86489
15528         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
15529         that the loop latch destination where phi is defined.
15531 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
15533         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
15534         (riscv_expand_epilogue): Add assertion to check interrupt mode.
15535         (riscv_set_current_function): Extract getting interrupt type to new
15536         function.
15537         (riscv_get_interrupt_type): New function.
15538         (riscv_merge_decl_attributes): New function, checking interrupt type is
15539         same.
15540         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
15542 2018-07-12  Paul Koning  <ni1d@arrl.net>
15544         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
15545         directive.
15547 2018-07-12  Paul Koning  <ni1d@arrl.net>
15549         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
15550         zero reference, add doloop_end instead.
15551         * doc/md.texi (decrement_and_branch_until_zero): Remove.
15552         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
15553         detail for doloop_end.
15555 2018-07-12  Martin Sebor  <msebor@redhat.com>
15557         PR c/86453
15558         * attribs.c (decl_attributes): Reject conflicting attributes before
15559         calling attribute handlers.
15561 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
15563         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
15564          parameter.
15565         (gcc::dump_manager::get_dump_file_name): likewise.
15566         (dump_begin): Likewise.
15567         * dumpfile.h (dump_begin): Update prototype.
15568         (gcc::dump_manager::get_dump_file_name,
15569         gcc::dump_manager::get_dump_file_name): Update prototype.
15571 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
15573         * internal-fn.h (vectorizable_internal_fn_p): New function.
15574         * tree-vect-slp.c (compatible_calls_p): Likewise.
15575         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
15576         to internal functions.
15577         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
15579 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
15581         * fold-const.h (inverse_conditions_p): Declare.
15582         * fold-const.c (inverse_conditions_p): New function.
15583         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
15584         that test the inverse condition of a conditional internal function.
15585         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
15586         * internal-fn.c (internal_fn_mask_index): Handle conditional
15587         internal functions.
15588         (vectorized_internal_fn_supported_p): New function.
15589         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
15590         (any_pred_load_store): Replace with...
15591         (need_to_predicate): ...this new variable.
15592         (redundant_ssa_names): New variable.
15593         (ifcvt_can_use_mask_load_store): Move initial checks to...
15594         (ifcvt_can_predicate): ...this new function.  Handle tree codes
15595         for which a conditional internal function exists.
15596         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
15597         instead of ifcvt_can_use_mask_load_store.  Update after variable
15598         name change.
15599         (predicate_load_or_store): New function, split out from
15600         predicate_mem_writes.
15601         (check_redundant_cond_expr): New function.
15602         (value_available_p): Likewise.
15603         (predicate_rhs_code): Likewise.
15604         (predicate_mem_writes): Rename to...
15605         (predicate_statements): ...this.  Use predicate_load_or_store
15606         and predicate_rhs_code.
15607         (combine_blocks, tree_if_conversion): Update after above name changes.
15608         (ifcvt_local_dce): Handle redundant_ssa_names.
15609         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
15610         general conditional functions.
15611         * tree-vect-stmts.c (vectorizable_call): Likewise.
15613 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
15614             Alan Hayward  <alan.hayward@arm.com>
15615             David Sherwood  <david.sherwood@arm.com>
15617         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
15618         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
15619         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
15620         plus and minus and convert them into IFN_COND_FMA-based sequences.
15621         (convert_mult_to_fma): Handle conditional plus and minus.
15623 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
15625         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
15626         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
15627         (cond_fnms_optab): New optabs.
15628         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
15629         internal functions.
15630         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
15631         * internal-fn.h (get_conditional_internal_fn): Declare.
15632         (get_unconditional_internal_fn): Likewise.
15633         * internal-fn.c (cond_ternary_direct): New macro.
15634         (expand_cond_ternary_optab_fn): Likewise.
15635         (direct_cond_ternary_optab_supported_p): Likewise.
15636         (FOR_EACH_COND_FN_PAIR): Likewise.
15637         (get_conditional_internal_fn): New function.
15638         (get_unconditional_internal_fn): Likewise.
15639         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
15640         (gimple_match_op::gimple_match_op): Add a new overload for 5
15641         operands.
15642         (gimple_match_op::set_op): Likewise.
15643         (gimple_resimplify5): Declare.
15644         * genmatch.c (decision_tree::gen): Generate simplifications for
15645         5 operands.
15646         * gimple-match-head.c (gimple_simplify): Define an overload for
15647         5 operands.  Handle calls with 5 arguments in the top-level overload.
15648         (convert_conditional_op): Handle conversions from unconditional
15649         internal functions to conditional ones.
15650         (gimple_resimplify5): New function.
15651         (build_call_internal): Pass a fifth operand.
15652         (maybe_push_res_to_seq): Likewise.
15653         (try_conditional_simplification): Try converting conditional
15654         internal functions to unconditional internal functions.
15655         Handle 3-operand unconditional forms.
15656         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
15657         Define ternary equivalents of the current rules for binary conditional
15658         internal functions.
15659         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
15660         ternary operations.
15661         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
15662         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
15663         (optab): Handle them.
15664         (SVE_COND_FP_TERNARY): New int iterator.
15665         (sve_fmla_op, sve_fmad_op): New int attributes.
15666         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
15667         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
15668         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
15670 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
15672         * target.def (preferred_else_value): New target hook.
15673         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
15674         * doc/tm.texi: Regenerate.
15675         * targhooks.h (default_preferred_else_value): Declare.
15676         * targhooks.c (default_preferred_else_value): New function.
15677         * internal-fn.h (conditional_internal_fn_code): Declare.
15678         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
15679         (get_conditional_internal_fn): Use it.
15680         (conditional_internal_fn_code): New function.
15681         * gimple-match.h (gimple_match_cond): New struct.
15682         (gimple_match_op): Add a cond member function.
15683         (gimple_match_op::gimple_match_op): Update all forms to take a
15684         gimple_match_cond.
15685         * genmatch.c (expr::gen_transform): Use the same condition as res_op
15686         for the suboperation, but don't specify a particular else_value.
15687         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
15688         (visit_nary_op, visit_reference_op_load): Pass
15689         gimple_match_cond::UNCOND to the gimple_match_op constructor.
15690         * gimple-match-head.c: Include tree-eh.h
15691         (convert_conditional_op): New function.
15692         (maybe_resimplify_conditional_op): Likewise.
15693         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
15694         (gimple_resimplify2): Likewise.
15695         (gimple_resimplify3): Likewise.
15696         (gimple_resimplify4): Likewise.
15697         (maybe_push_res_to_seq): Return null for conditional operations.
15698         (try_conditional_simplification): New function.
15699         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
15700         constructor.
15701         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
15702         IFN_COND_* call.
15703         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
15704         function.
15705         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
15707 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
15709         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
15710         DECL_FCONTEXT
15711         (hash_tree): Do not hash DECL_FCONTEXT
15712         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
15713         Do not stream DECL_FCONTEXT.
15714         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
15715         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
15717 2018-07-12  Richard Biener  <rguenther@suse.de>
15719         PR debug/86462
15720         * dwarf2out.c (gen_block_die): Only output blocks when they have
15721         at least one !DECL_IGNORED_P variable.
15723 2018-07-12  Richard Biener  <rguenther@suse.de>
15725         PR target/84829
15726         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
15727         Remove -mieee-fp handling.
15729 2018-07-12  Richard Biener  <rguenther@suse.de>
15731         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
15732         left-over from last patch.
15734 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
15736         PR tree-optimization/86492
15737         * gimple-ssa-store-merging.c
15738         (imm_store_chain_info::coalesce_immediate_stores): Call
15739         check_no_overlap even for the merge_overlapping case.  Formatting fix.
15741 2018-07-12  Richard Biener  <rguenther@suse.de>
15743         PR middle-end/86479
15744         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
15745         move possibly trapping operations into the conditional.
15747 2018-07-12  Richard Biener  <rguenther@suse.de>
15749         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
15750         (vn_lookup_simplify_result): Remove recursion limit applied
15751         here.
15752         (vn_nary_build_or_lookup_1): Adjust.
15753         (try_to_simplify): Likewise.
15754         * gimple-match-head.c (gimple_resimplify1): Instead apply one
15755         here.
15756         (gimple_resimplify2): Likewise.
15757         (gimple_resimplify3): Likewise.
15758         (gimple_resimplify4): Likewise.
15760 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
15762         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
15763         Use __mmask64 type instead of __mmask8 for __M argument.
15764         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
15765         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
15766         __U argument.
15767         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
15768         __mmask16 for __M argument.
15769         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
15770         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
15771         to __mmask16 instead of __mmask8.
15772         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
15773         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
15774         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
15775         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
15776         instead of __mmask16 for __U argument.
15777         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
15778         __mmask16 instead of __mmask8 for __U argument.
15779         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
15780         __U argument.
15781         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
15782         __mmask16.
15783         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
15784         argument.
15785         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
15786         __U argument.
15787         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
15788         __mmask16.
15789         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
15790         of __mmask16.
15791         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
15792         __U argument.
15793         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
15794         __U argument.
15795         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
15796         __U argument.
15797         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
15798         __U argument.
15799         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
15800         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
15801         return type as well as __M argument type and all casts from __mmask8
15802         to __mmask32.
15803         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
15804         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
15805         return type as well as __M argument type and all casts from __mmask8
15806         to __mmask16.
15807         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
15808         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
15809         return type as well as __M argument type and all casts from __mmask8
15810         to __mmask32.
15811         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
15812         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
15813         return type as well as __M argument type and all casts from __mmask8
15814         to __mmask16.
15815         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
15816         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
15817         __mmask16.
15819 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
15821         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
15822         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
15823         for __U argument.
15825 2018-07-11  Paul Koning  <ni1d@arrl.net>
15827         * doc/md.texi (define_subst): Document how multiple occurrences of
15828         the same argument in the replacement pattern are handled.
15830 2018-07-11  Paul Koning  <ni1d@arrl.net>
15832         * doc/extend.texi (Common Variable Attributes): Move "mode" into
15833         alphabetical order.
15834         (Common Type Attributes): Add "mode" attribute.
15836 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
15838         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
15839         stream DECL_ORIGINAL_TYPE.
15840         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
15841         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
15842         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
15843         Do not walk original type.
15844         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
15845         external decls.
15846         (write_ts_decl_non_common_tree_pointers): Do not stream
15847         DECL_ORIGINAL_TYPE
15848         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
15849         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
15851 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
15853         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
15854         thread twice from the same starting edge.
15856 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
15858         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
15859         * gimple.c (gimple_call_nonnull_result_p): ...here...
15860         (gimple_call_nonnull_arg): ...and here.
15861         * gimple.h (gimple_call_nonnull_result_p): New.
15862         (gimple_call_nonnull_arg): New.
15864 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
15866         * config/arm/arm-cpus.in: Move information from fpu field of each
15867         cpu definition to the isa field.
15868         * config/arm/parsecpu.awk (fpu): Delete match rule.
15869         (gen_comm_data): Don't add bits from the CPU's FPU entry.
15871 2018-07-11  Richard Biener  <rguenther@suse.de>
15873         PR debug/86457
15874         * dwarf2out.c (init_sections_and_labels): Use
15875         output_asm_line_debug_info consistently.
15876         (dwarf2out_early_finish): Likewise.
15877         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
15878         type units.
15880 2018-07-11  Richard Biener  <rguenther@suse.de>
15882         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
15883         Rework father_bb setting in a way to avoid propagating constants
15884         multiple times on a loop body.
15886 2018-07-10  Mark Wielaard  <mark@klomp.org>
15888         PR debug/86459
15889         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
15891 2018-07-10  Richard Biener  <rguenther@suse.de>
15893         * hash-map.h (hash_map::iterator::operator*): Return
15894         references to key and value.
15896 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
15898         PR c++/86443
15899         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
15900         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
15901         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
15902         (gimplify_omp_for): For composite loops, move outer
15903         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
15904         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
15905         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
15906         TREE_LIST for both the original class iterator and the "last" helper
15907         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
15908         loop, remember has_decl_expr from outer composite loops for the
15909         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
15911 2018-07-09  Martin Sebor  <msebor@redhat.com>
15913         PR middle-end/77357
15914         PR middle-end/86428
15915         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
15916         accessing implicitly initialized array elements.
15917         * expr.c (string_constant): Handle string initializers of
15918         character arrays within aggregates.
15919         * gimple-fold.c (fold_array_ctor_reference): Add argument.
15920         Store element offset.  As a special case, handle zero size.
15921         (fold_nonarray_ctor_reference): Same.
15922         (fold_ctor_reference): Add argument.  Store subobject offset.
15923         * gimple-fold.h (fold_ctor_reference): Add argument.
15925 2018-07-09  Paul Koning  <ni1d@arrl.net>
15927         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
15928         (pdp11_insn_cost): New function.
15929         (pdp11_md_asm_adjust): New function.
15930         (TARGET_INVALID_WITHIN_DOLOOP): Define.
15931         (pdp11_rtx_costs): Update to match machine better.
15932         (output_addr_const_pdp11): Correct format mismatch warnings.
15933         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
15934         * config/pdp11/pdp11.md: General change to add base_cost and/or
15935         length attributes for use by new pdp11_insn_cost function.
15936         (MIN_BRANCH): Correct definition.
15937         (MIN_SOB): Ditto.
15938         (doloop_end): Use standard pattern name for looping pattern.
15939         (doloop_end_nocc): New.
15940         (movsf): Add another constraint alternative.
15941         (zero_extendqihi2): Add constraint alternatives for not in place
15942         extend.
15943         (zero_extendhisi2): Remove.
15944         (shift patterns): Add CC handling variants.
15945         (bswaphi2): New.
15946         (bswapsi2): New.
15947         (rothi3): New.
15948         (define_peephole2): New peephole to recognize mov that sets CC for
15949         subsequent test.
15951 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15953         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
15954         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
15955         wi::add.
15957 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
15959         PR c/86420
15960         * real.c (real_nextafter): Return true if result is denormal.
15962 2018-07-09  Martin Liska  <mliska@suse.cz>
15964         * common.opt: Add back wrongly removed attribute.
15966 2018-07-09  Richard Biener  <rguenther@suse.de>
15968         PR debug/86413
15969         * dwarf2out.c (gen_block_die): For an early generated DIE
15970         always output high/low PC attributes.
15972 2018-07-09  Tom de Vries  <tdevries@suse.de>
15974         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
15975         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
15976         onto VAR_DECL with abstract origin.
15978 2018-07-07  Jim Wilson  <jimw@sifive.com>
15980         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
15982 2018-07-07  Tom de Vries  <tdevries@suse.de>
15984         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
15986 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
15988         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
15989         overflow_type.
15990         (combine_bound): Use wide-int overflow calculation instead of
15991         rolling our own.
15992         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
15993         overflow_type.
15994         * fold-const.c (int_const_binop_2): Same.
15995         (extract_muldiv_1): Same.
15996         (fold_div_compare): Same.
15997         (fold_abs_const): Same.
15998         * match.pd: Same.
15999         * poly-int.h (add): Same.
16000         (sub): Same.
16001         (neg): Same.
16002         (mul): Same.
16003         * predict.c (predict_iv_comparison): Same.
16004         * profile-count.c (slow_safe_scale_64bit): Same.
16005         * simplify-rtx.c (simplify_const_binary_operation): Same.
16006         * tree-chrec.c (tree_fold_binomial): Same.
16007         * tree-data-ref.c (split_constant_offset_1): Same.
16008         * tree-if-conv.c (idx_within_array_bound): Same.
16009         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
16010         * tree-ssa-phiopt.c (minmax_replacement): Same.
16011         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
16012         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
16013         * vr-values.c (vr_values::adjust_range_with_scev): Same.
16014         * wide-int.cc (wi::add_large): Same.
16015         (wi::mul_internal): Same.
16016         (wi::sub_large): Same.
16017         (wi::divmod_internal): Same.
16018         * wide-int.h: Change overflow type to overflow_type for neg, add,
16019         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
16020         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
16021         mul_internal, divmod_internal.
16022         (overflow_type): New enum.
16023         (accumulate_overflow): New.
16025 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
16027         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
16028         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
16030 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
16032         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
16033         argument is checked for zero before entering loop, avoid checking again.
16035 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
16037         * gimplify.h (generic_expr_could_trap_p): Set as global function.
16038         * gimplify.h (generic_expr_could_trap_p): Likwise.
16039         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
16041 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
16043         PR tree-optimization/86401
16044         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
16045         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
16046         (fold_bit_and_mask): ... here.  New helper function for match.pd.
16047         * fold-const.h (fold_bit_and_mask): Declare.
16048         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
16050 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
16052         PR target/86324
16053         * target.def (translate_mode_attribute): New hook.
16054         * targhooks.h (default_translate_mode_attribute): Declare.
16055         * targhooks.c (default_translate_mode_attribute): New function.
16056         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
16057         * doc/tm.texi: Regenerate.
16058         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
16059         (rs6000_translate_mode_attribute): New function.
16061 2018-07-06  Paul Koning  <ni1d@arrl.net>
16063         * doc/md.texi (define_split): Document DONE and FAIL.
16064         (define_peephole2): Ditto.
16066 2018-07-05  Jeff Law  <law@redhat.com>
16068         PR tree-optimization/86010
16069         * tree-ssa-dse.c (compute_trims): More aggressively trim at
16070         both the head and tail of mem* and str* calls.
16072 2018-07-05  Jim Wilson  <jimw@sifive.com>
16074         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
16076 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
16078         * config/aarch64/aarch64-simd.md: correct flags text for
16079         MIN_EXPR replacement.
16081 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
16083         * configure: Regenerated.
16085 2018-07-05  Carl Love  <cel@us.ibm.com>
16087         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
16088         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
16089         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
16090         VSX_BUILTIN_DOUBLEL_V4SF.
16092 2018-07-05  Martin Sebor  <msebor@redhat.com>
16094         PR c++/86400
16095         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
16096         than its domain to compute its the upper bound of a char array.
16098 2018-07-05  Nathan Sidwell  <nathan@acm.org>
16100         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
16101         * doc/cpp.texi: Update comment.
16102         * doc/tm.texi: Rebuilt.
16103         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
16104         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
16105         * doc/extend.texi (Backwards Compatibility): Clarify it is system
16106         headers affected by extern "C".
16107         * system.h: Poison NO_IMPLICIT_EXTERN_C.
16108         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
16109         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
16110         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
16111         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
16112         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
16113         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
16114         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
16115         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
16116         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
16117         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
16118         config/sparc/sp64-elf.h, config/spu/spu.h,
16119         config/stormy16/stormy16.h, config/v850/v850.h,
16120         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
16121         define NO_IMPLICIT_EXTERN_C.
16122         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
16124 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
16126         PR target/84711
16127         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
16128         instead of GET_MODE_SIZE when comparing Units.
16130 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
16132         PR target/84711
16133         * rtlanal.c (set_noop_p): Constrain on mode change,
16134         include hard-reg-set.h
16136 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
16138         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
16140 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
16142         Revert
16143         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
16145         PR sanitizer/84250
16146         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
16147         libasan.
16148         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
16150 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
16152         PR sanitizer/84250
16153         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
16154         libasan.
16155         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
16157 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
16159         PR middle-end/86380
16160         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
16162 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
16164         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
16165         neg_*_op* variables.
16167 2018-07-04  Martin Liska  <mliska@suse.cz>
16169         * tree-switch-conversion.c: Define
16170         max_ratio_for_speed and max_ratio_for_size constants.
16172 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
16173             Martin Liska  <mliska@suse.cz>
16175         PR middle-end/66240
16176         PR target/45996
16177         PR c/84100
16178         * common.opt: Rename align options with 'str_' prefix.
16179         * common/config/i386/i386-common.c (set_malign_value): New
16180         function.
16181         (ix86_handle_option): Use it to set -falign-* options/
16182         * config/aarch64/aarch64-protos.h (struct tune_params): Change
16183         type from int to string.
16184         * config/aarch64/aarch64.c: Update default values from int
16185         to string.
16186         * config/alpha/alpha.c (alpha_override_options_after_change):
16187         Likewise.
16188         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
16189         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
16190         max skip conditionally.
16191         * config/i386/freebsd.h (SUBALIGN_LOG): New.
16192         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
16193         max skip conditionally.
16194         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
16195         max skip conditionally.
16196         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
16197         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
16198         max skip conditionally.
16199         * config/i386/i386.c (struct ptt): Change type from int to
16200         string.
16201         (ix86_default_align): Set default values.
16202         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
16203         max skip conditionally.
16204         * config/i386/iamcu.h (SUBALIGN_LOG): New.
16205         (ASM_OUTPUT_MAX_SKIP_ALIGN):
16206         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
16207         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
16208         max skip conditionally.
16209         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
16210         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
16211         * config/i386/x86-64.h (SUBALIGN_LOG): New.
16212         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
16213         max skip conditionally.
16214         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
16215         * config/ia64/ia64.c (ia64_option_override): Set default values
16216         for alignment options.
16217         * config/m68k/m68k.c: Handle new str_align_* options.
16218         * config/mips/mips.c (mips_set_compression_mode): Change
16219         type of constants.
16220         (mips_option_override): Set default values for options.
16221         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
16222         Likewise.
16223         * config/rs6000/rs6000.c (rs6000_option_override_internal):
16224         Likewise.
16225         * config/rx/rx.c (rx_option_override): Likewise.
16226         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
16227         (LABEL_ALIGN): Use align_labels_log.
16228         (LOOP_ALIGN): Use align_loops_align.
16229         * config/s390/s390.c (s390_asm_output_function_label): Use new
16230         macros.
16231         * config/sh/sh.c (sh_override_options_after_change):
16232         Change type of constants.
16233         * config/spu/spu.c (spu_sched_init): Likewise.
16234         * config/sparc/sparc.c (sparc_option_override): Set default
16235         values for options.
16236         * config/visium/visium.c (visium_option_override): Likewise.
16237         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
16238         emit p2align format with last argument if it's not needed.
16239         * doc/invoke.texi: Document extended format of -falign-*.
16240         * final.c: Use align_labels alignment.
16241         * flags.h (struct target_flag_state): Change type to use
16242         align_flags.
16243         (struct align_flags_tuple): New.
16244         (struct align_flags): Likewise.
16245         (align_loops_log): Redefine macro to use new types.
16246         (align_loops_max_skip): Redefine macro to use new types.
16247         (align_jumps_log): Redefine macro to use new types.
16248         (align_jumps_max_skip): Redefine macro to use new types.
16249         (align_labels_log): Redefine macro to use new types.
16250         (align_labels_max_skip): Redefine macro to use new types.
16251         (align_functions_log): Redefine macro to use new types.
16252         (align_loops): Redefine macro to use new types.
16253         (align_jumps): Redefine macro to use new types.
16254         (align_labels): Redefine macro to use new types.
16255         (align_functions): Redefine macro to use new types.
16256         (align_functions_max_skip): Redefine macro to use new types.
16257         (align_loops_value): New macro.
16258         (align_jumps_value): New macro.
16259         (align_labels_value): New macro.
16260         (align_functions_value): New macro.
16261         * function.c (invoke_set_current_function_hook): Propagate
16262         alignment values from flags to global variables default in
16263         topleev.h.
16264         * ipa-icf.c (sem_function::equals_wpa): Use
16265         cl_optimization_option_eq instead of memcmp.
16266         * lto-streamer.h (cl_optimization_stream_out): Support streaming
16267         of string types.
16268         (cl_optimization_stream_in): Likewise.
16269         * optc-save-gen.awk: Support strings in cl_optimization.
16270         * opth-gen.awk: Likewise.
16271         * opts.c (finish_options): Remove error checking of invalid
16272         value ranges.
16273         (MAX_CODE_ALIGN): Remove.
16274         (MAX_CODE_ALIGN_VALUE): Likewise.
16275         (parse_and_check_align_values): New function.
16276         (check_alignment_argument): Likewise.
16277         (common_handle_option): Use check_alignment_argument.
16278         * opts.h (parse_and_check_align_values): Declare.
16279         * toplev.c (init_alignments): Remove.
16280         (read_log_maxskip): New.
16281         (parse_N_M): Likewise.
16282         (parse_alignment_opts): Likewise.
16283         (backend_init_target): Remove usage of init_alignments.
16284         * toplev.h (parse_alignment_opts): Declare.
16285         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
16286         argument.
16287         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
16288         * tree.c (cl_option_hasher::equal): New.
16289         * varasm.c: Use new global macros.
16291 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
16293         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
16294         Use a simpler align directive also if MAXSKIP = ALIGN-1.
16295         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
16296         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
16297         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
16298         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
16299         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
16300         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
16301         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
16302         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
16303         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
16304         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
16305         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
16307 2018-07-04  Martin Liska  <mliska@suse.cz>
16308             Jonathan Wakely  <jwakely@redhat.com>
16310         * coverage.c: Use correct type.
16311         * doc/invoke.texi: Language correction.
16313 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
16315         PR target/85620
16316         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
16317         ENDBRANCH for non-tail call which may return via indirect branch.
16318         * doc/extend.texi: Document indirect_return attribute.
16320 2018-07-03  Martin Sebor  <msebor@redhat.com>
16322         PR tree-optimization/86274
16323         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
16324         precondition.
16325         (format_floating): Correct handling of infinities and NaNs.
16327 2018-07-03  Martin Sebor  <msebor@redhat.com>
16329         * print-tree.c (print_real_cst): New function.
16330         (print_node_brief): Call it.
16331         (print_node): Ditto.
16333 2018-07-03  Jeff Law  <law@redhat.com>
16335         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
16336         into a single pattern.
16338         * config/h8300/h8300.md (ors code_iterator): New.
16339         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
16340         a single pattern and single splitter.
16341         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
16342         (iorqi3_1, xorqi3_1): Likewise.
16343         (iorqi3, xorqi3 expanders): Similarly.
16345         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
16346         (movmd_internal) into a single pattern using the P mode iterator.
16347         (movmd splitters): Similarly.
16348         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
16349         (movsd splitters): Similarly.
16351         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
16352         ADDB, ADDW and ADDL into a single ADD attribute which selects the
16353         right table based on the size of the operand.
16354         * config/h8300/h8300.md (length_table): Corresponding changes. All
16355         references to "addb", "addw" and "addl" changed to "add".
16356         (btst patterns): Merge two variants into a single pattern.
16357         (tstqi, tsthi): Likewise.
16358         (addhi3_incdec, addsi3_incdec): Likewise.
16359         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
16360         (mulhi3, mulsi3): Likewise.
16361         (udivhi3, udivsi3): Likewise.
16362         (divhi3, divsi3): Likewise.
16363         (andorqi3, andorhi3, andorsi3): Likewise.
16365 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
16367         PR target/85694
16368         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
16369         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
16371 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
16373         PR tree-optimization/85694
16374         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
16375         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
16376         UNSPEC_URHADD.
16377         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
16378         (<u>avg<mode>3_ceil): New patterns.
16380 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
16382         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
16383         scan-tree-dump directive.
16384         * gcc.dg/vect/slp-perm-2.c: Likewise.
16385         * gcc.dg/vect/slp-perm-3.c: Likewise.
16386         * gcc.dg/vect/slp-perm-5.c: Likewise.
16387         * gcc.dg/vect/slp-perm-6.c: Likewise.
16388         * gcc.dg/vect/slp-perm-7.c: Likewise.
16389         * gcc.dg/vect/slp-perm-8.c: Likewise.
16391 2018-07-03  Marek Polacek  <polacek@redhat.com>
16393         PR middle-end/86202
16394         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
16396 2018-07-03  Richard Biener  <rguenther@suse.de>
16398         PR ipa/86389
16399         * tree-ssa-structalias.c (find_func_clobbers): Properly
16400         handle indirect calls.
16402 2018-07-03  Jeff Law  <law@redhat.com>
16404         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
16405         (shifts): New code iterator.
16406         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
16407         expander.  Fix HImode handling on H8/SX.
16408         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
16409         (subqi3, subhi3, subsi3 expanders): Likewise.
16410         (andqi3, andhi3, andsi3 expanders): Likewise.
16411         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
16412         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
16413         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
16414         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
16415         (zero_extendqihi2, zero_extendqisi2): Likewise.
16416         (extendqihi2, extendqisi2): Likewise.
16417         (rotlqi3, rotlhi3, rotlsi3): Likewise.
16418         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
16419         (rotlqi3_1, rotlhi3_1): Likewise.
16420         (logicalhi3_sn, logicalsi3_sn): Likewise.
16421         (logicalhi3, logicalsi3): Likewise.
16423 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
16425         * tree-vect-patterns.c (vect_recog_rotate_pattern)
16426         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
16427         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
16428         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
16429         type to append_pattern_def_seq instead of creating a stmt_vec_info
16430         directly.
16431         (build_mask_conversion): Likewise.  Remove vinfo argument.
16432         (vect_add_conversion_to_patterm): Likewise, renaming to...
16433         (vect_add_conversion_to_pattern): ...this.
16434         (vect_recog_mask_conversion_pattern): Update call to
16435         build_mask_conversion.  Pass the vector type to
16436         append_pattern_def_seq here too.
16437         (vect_recog_gather_scatter_pattern): Update call to
16438         vect_add_conversion_to_pattern.
16440 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
16442         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
16443         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
16444         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
16445         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
16446         STMT_VINFO_PATTERN_DEF_SEQ to null here.
16447         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
16448         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
16449         append_pattern_def_seq instead of new_pattern_def_seq.
16450         (vect_recog_divmod_pattern): Do both of the above.
16451         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
16452         is null.
16454 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
16456         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
16457         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
16458         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
16459         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
16460         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
16461         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
16462         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
16463         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
16464         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
16465         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
16466         parameter with a single stmt_vec_info.
16467         (vect_recog_func_ptr): Likewise.
16468         (vect_recog_gather_scatter_pattern): Likewise, folding in...
16469         (vect_try_gather_scatter_pattern): ...this.
16470         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
16471         the stmt_vec_info of the statement to be matched.  Don't clear
16472         STMT_VINFO_RELATED_STMT.
16473         (vect_pattern_recog): Update call accordingly.
16475 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
16477         PR tree-optimization/85694
16478         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
16479         (uavgM3_ceil): Document new optabs.
16480         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
16481         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
16482         functions.
16483         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
16484         (savg_ceil_optab): New optabs.
16485         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
16486         (vect_vect_recog_func_ptrs): Add it.
16487         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
16488         constant directly from the associated lhs.
16490 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
16492         * tree-vect-patterns.c (vect_split_statement): New function.
16493         (vect_convert_input): Use it to try to split an existing cast.
16495 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
16497         * poly-int.h (print_hex): New function.
16498         * dumpfile.h (dump_dec, dump_hex): Declare.
16499         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
16500         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
16501         min_input_precision, operation_precision and operation_sign.
16502         * tree-vect-patterns.c (vect_get_range_info): New function.
16503         (vect_same_loop_or_bb_p, vect_single_imm_use)
16504         (vect_operation_fits_smaller_type): Delete.
16505         (vect_look_through_possible_promotion): Add an optional
16506         single_use_p parameter.
16507         (vect_recog_over_widening_pattern): Rewrite to use new
16508         stmt_vec_info infomration.  Handle one operation at a time.
16509         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
16510         (vect_truncatable_operation_p, vect_set_operation_type)
16511         (vect_set_min_input_precision): New functions.
16512         (vect_determine_min_output_precision_1): Likewise.
16513         (vect_determine_min_output_precision): Likewise.
16514         (vect_determine_precisions_from_range): Likewise.
16515         (vect_determine_precisions_from_users): Likewise.
16516         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
16517         (vect_vect_recog_func_ptrs): Put over_widening first.
16518         Add cast_forwprop.
16519         (vect_pattern_recog): Call vect_determine_precisions.
16521 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
16523         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
16524         statements that have been replaced by further pattern statements.
16525         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
16527 2018-07-03  Richard Biener  <rguenther@suse.de>
16529         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
16530         always set *dt.  Dump vectype in vectype overload.
16531         * dumpfile.h (dump_gimple_expr): New function.
16532         (dump_gimple_expr_loc): Likewise.
16533         * dumpfile.c (dump_gimple_expr): New function.
16534         (dump_gimple_expr_loc): Likewise.
16536 2018-07-02  Jeff Law  <law@redhat.com>
16538         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
16539         the H8/300, H8/300H and H8/S variants into a single pattern.
16540         (movhi_h8300, movqi_h8300hs): Similarly.
16541         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
16542         (QHI mode iterator): New.
16544         * config/h8300/h8300.md: Remove trailing whitespace.
16546 2018-07-02  Jim Wilson  <jimw@sifive.com>
16548         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
16549         instead of emit_insn for interrupt returns.
16550         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
16551         (riscv_sret, riscv_uret): Likewise.
16553 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
16555         * pretty-print.c (selftest::test_pp_format): Move save and restore
16556         of quotes to class auto_fix_quotes, and add an instance.
16557         * selftest.c: Include "intl.h".
16558         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
16559         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
16560         * selftest.h (selftest::auto_fix_quotes): New class.
16562 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
16564         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
16565         (aarch64_sve_prepare_conditional_op): Remove.
16566         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
16567         Allow aarch64_simd_reg_or_zero as select operand; remove
16568         the aarch64_sve_prepare_conditional_op call.
16569         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
16570         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
16571         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
16572         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
16573         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
16574         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
16575         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
16576         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
16577         and a splitters to match all of the *_any patterns.
16578         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
16580         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
16581         (SVE_COND_FP_BINARY_REV): Remove.
16582         (sve_int_op_rev, sve_fp_op_rev): New.
16583         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
16584         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
16585         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
16586         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
16587         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
16588         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
16589         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
16590         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
16591         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
16593         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
16594         Remove match_dup 1 from the inner unspec.
16595         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
16597         * config/aarch64/aarch64.md (movprfx): New attr.
16598         (length): Default movprfx to 8.
16599         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
16600         (*madd<SVE_I>, *msub<SVE_I): Likewise.
16601         (*<su>mul<SVE_I>3_highpart): Likewise.
16602         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
16603         (*v<ASHIFT><SVE_I>3): Likewise.
16604         (*<su><MAXMIN><SVE_I>3): Likewise.
16605         (*<su><MAXMIN><SVE_F>3): Likewise.
16606         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
16607         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
16608         (*div<SVE_F>4): Likewise.
16610 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
16612         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
16613         in dump string.
16615 2018-07-02  Richard Biener  <rguenther@suse.de>
16617         PR tree-optimization/86363
16618         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
16619         memset argument refers to a non-variable address.
16621 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
16623         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
16624         {PLUS,MINUS}_EXPR code to...
16625         (adjust_symbolic_bound): ...here,
16626         (combine_bound): ...here,
16627         (set_value_range_with_overflow): ...and here.
16629 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
16631         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
16632         code...
16633         (extract_range_from_abs_expr): ...here.
16635 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
16637         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
16638         -fno-omit-frame-pointer when not optimizing.
16640 2018-07-02  Martin Liska  <mliska@suse.cz>
16642         PR ipa/86279
16643         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
16644         (propagate_nothrow): Likewise.
16646 2018-07-02  Martin Liska  <mliska@suse.cz>
16648         PR ipa/86323
16649         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
16651 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
16653         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
16654         function in r262149, changing "loc" param from source_location to
16655         const dump_location_t &.
16656         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
16657         declaration, as above.
16659 2018-07-01  Paul Koning  <ni1d@arrl.net>
16661         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
16662         -munit-asm, -mgnu-asm, -mdec-asm.
16663         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
16664         (pdp11_output_labelref): New.
16665         (pdp11_output_def): New.
16666         (pdp11_output_addr_vec_elt): New.
16667         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
16668         %# and %@ format codes.
16669         (pdp11_option_override): New.
16670         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
16671         (pdp11_output_ident): New.
16672         (pdp11_asm_named_section): New.
16673         (pdp11_asm_init_sections): New.
16674         (pdp11_file_start): New.
16675         (pdp11_file_end): New.
16676         (output_ascii): Use .ascii/.asciz for -mdec-asm.
16677         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
16678         %o, like %c but octal.
16679         (pdp11_option_override): New.
16680         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
16681         -mdec-asm.
16682         (DATA_SECTION_ASM_OP): Ditto.
16683         (READONLY_DATA_SECTION_ASM_OP): New.
16684         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
16685         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
16686         (ASM_OUTPUT_LABELREF): Ditto.
16687         (ASM_OUTPUT_DEF): Ditto.
16688         (ASM_OUTPUT_EXTERNAL): New.
16689         (ASM_OUTPUT_SOURCE_FILENAME): New.
16690         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
16691         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
16692         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
16693         %# and %@ format codes.
16694         * config/pdp11/pdp11.opt (mgnu-asm): New.
16695         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
16696         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
16697         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
16699 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
16701         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
16702         dereferencing path[] beyond its length.
16703         (debug_path): New.
16704         (debug_all_paths): New.
16705         (rewire_first_differing_edge): New.
16706         (adjust_paths_after_duplication): New.
16707         (duplicate_thread_path): Call adjust_paths_after_duplication.
16708         Add new argument.
16709         (thread_through_all_blocks): Add new argument to
16710         duplicate_thread_path.
16712 2018-06-30  Jim Wilson  <jimw@sifive.com>
16714         * config/riscv/predicates.md (p2m1_shift_operand): New.
16715         (high_mask_shift_operand): New.
16716         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
16717         pattern using p2m1_shift_operand.
16718         (lshsi3_zero_extend_3+2): New combiner pattern using
16719         high_mask_shift_operand.
16721 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
16723         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
16724         split out from...
16725         (vect_recog_rotate_pattern): ...here.
16726         (vect_convert_input): Try to insert casts of invariants in the
16727         preheader.
16728         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
16729         preheader to be empty.
16731 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
16733         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
16734         vector type.  If given, install it in the new statement's
16735         STMT_VINFO_VECTYPE.
16736         (vect_element_precision): New function.
16737         (vect_unpromoted_value): New struct.
16738         (vect_unpromoted_value::vect_unpromoted_value): New function.
16739         (vect_unpromoted_value::set_op): Likewise.
16740         (vect_look_through_possible_promotion): Likewise.
16741         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
16742         (vect_widened_op_tree, vect_convert_input): Likewise.
16743         (vect_convert_inputs, vect_convert_output): Likewise.
16744         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
16745         to handle the optional cast of the multiplication result and
16746         vect_widened_op_tree to detect the widened multiplication itself.
16747         Do not require the input and output of promotion casts to have
16748         the same sign, but base the signedness of the operation on the
16749         input rather than the result.  If the pattern includes two
16750         promotions, check that those promotions have the same sign.
16751         Do not restrict the MULT_EXPR handling to a double-width result;
16752         handle quadruple-width results and wider.  Use vect_convert_inputs
16753         to convert the inputs to the common type.
16754         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
16755         to handle the optional cast of the ABS result.  Also allow a sign
16756         change or a sign extension between the ABS and MINUS.
16757         Use vect_widened_op_tree to detect the widened subtraction and use
16758         vect_convert_inputs to convert the inputs to the common type.
16759         (vect_handle_widen_op_by_const): Delete.
16760         (vect_recog_widen_op_pattern): New function.
16761         (vect_recog_widen_mult_pattern): Use it.
16762         (vect_recog_widen_shift_pattern): Likewise.
16763         (vect_recog_widen_sum_pattern): Use
16764         vect_look_through_possible_promotion to handle the promoted
16765         PLUS_EXPR operand.
16767 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
16769         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
16770         the containing gimple_seq *.
16771         * gimple-iterator.h (gsi_for_stmt): Declare it.
16772         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
16773         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
16774         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
16775         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
16776         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
16777         checks.
16778         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
16779         split out from...
16780         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
16781         statement being replaced is part of an existing pattern
16782         definition sequence, inserting the new pattern statements before
16783         the original one.
16784         (vect_pattern_recog_1): Don't return a bool.  If the statement
16785         is already part of a pattern, instead apply pattern matching
16786         to the pattern definition statements.  Don't clear the
16787         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
16788         (vect_pattern_recog): Don't break after the first match;
16789         continue processing the pattern definition statements instead.
16790         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
16792 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
16794         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
16795         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
16796         (vect_recog_widen_sum_pattern): Use it.
16798 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
16800         * tree-vect-loop.c (vectorizable_reduction): Assert that the
16801         phi is not a pattern statement and has not been replaced by
16802         a pattern statement.
16803         * tree-vect-patterns.c (type_conversion_p): Don't check
16804         STMT_VINFO_IN_PATTERN_P.
16805         (vect_recog_vector_vector_shift_pattern): Likewise.
16806         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
16807         the pattern statement rather than the original statement; check
16808         directly for a WIDEN_MULT_EXPR here.
16809         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
16810         vect_is_simple_use to return the pattern statement rather
16811         than the original statement; use is_pattern_stmt_p to check
16812         for such a pattern statement.
16813         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
16814         to return the pattern statement rather than the original statement;
16815         don't do the same transformation here.
16816         (vect_is_simple_use): If the defining statement has been replaced
16817         by a pattern statement, return the pattern statement instead.
16818         Remove the corresponding (local) transformation from the vectype
16819         overload.
16821 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
16823         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
16824         end and default to null.
16825         * tree-vect-loop.c (vect_create_epilog_for_reduction)
16826         (vectorizable_reduction): Update calls accordingly, dropping the
16827         gimple ** argument if the passed-back statement isn't needed.
16828         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
16829         (vect_recog_rotate_pattern): Likewise.
16830         (vect_recog_mask_conversion_pattern): Likewise.
16831         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
16832         (vect_mask_constant_operand_p): Likewise.
16833         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
16834         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
16835         (get_group_load_store_type, get_load_store_type): Likewise.
16836         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
16837         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
16838         (vectorizable_conversion, vectorizable_assignment): Likewise.
16839         (vectorizable_shift, vectorizable_operation): Likewise.
16840         (vectorizable_store, vect_is_simple_cond): Likewise.
16841         (vectorizable_condition, vectorizable_comparison): Likewise.
16842         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
16843         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
16844         and move it to the end.  Cope with null def_stmt_outs.
16846 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
16848         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
16850 2018-06-29  Jeff Law  <law@redhat.com>
16852         * config/v850/v850.c (v850_legitimate_address_p): Handle large
16853         displacements for TARGET_V850E2V3 and newer.
16854         (TARGET_LRA_P): Remove.  Defaults to LRA now.
16855         * config/v850/v850.md (sign23byte_load): Remove.
16856         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
16857         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
16859 2018-06-29  Martin Liska  <mliska@suse.cz>
16861         PR lto/85759
16862         * coverage.c (coverage_init): Mangle full path name.
16863         * doc/invoke.texi: Document the change.
16864         * gcov-io.c (mangle_path): New.
16865         * gcov-io.h (mangle_path): Likewise.
16866         * gcov.c (mangle_name): Use mangle_path for path mangling.
16868 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16870         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
16871         if starting source register is not even.
16873 2018-06-29  Martin Liska  <mliska@suse.cz>
16875         PR tree-optimization/86263
16876         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
16877         Make edge redirection.
16879 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
16881         * dumpfile.c (dump_loc): Add indentation based on scope depth.
16882         (dump_scope_depth): New variable.
16883         (get_dump_scope_depth): New function.
16884         (dump_begin_scope): New function.
16885         (dump_end_scope): New function.
16886         * dumpfile.h (get_dump_scope_depth): New declaration.
16887         (dump_begin_scope): New declaration.
16888         (dump_end_scope): New declaration.
16889         (class auto_dump_scope): New class.
16890         (AUTO_DUMP_SCOPE): New macro.
16891         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
16892         AUTO_DUMP_SCOPE.
16894 2018-06-29  Richard Biener  <rguenther@suse.de>
16896         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
16897         compute_all_dependences succeeds.
16898         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
16899         exceed --param loop-max-datarefs-for-datadeps.
16901 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
16903         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
16905 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
16907         PR target/86348
16908         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
16909         alternative 0 in preferred_for_speed attribute.
16911 2018-06-28  Paul Koning  <ni1d@arrl.net>
16913         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
16914         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
16915         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
16916         * config/pdp11/pdp11.md: Correct "length" attribute calculation
16917         for shift insn patterns.
16919 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
16921         * cgraph.c (cgraph_node::get_body): Replace assignments to
16922         "dump_file" with calls to set_dump_file.
16923         * dumpfile.c (alt_dump_file): Make static, and group with...
16924         (alt_flags): ...this definition.
16925         (dumps_are_enabled): New variable.
16926         (refresh_dumps_are_enabled): New function.
16927         (set_dump_file): New function.
16928         (set_alt_dump_file): New function.
16929         (gcc::dump_manager::dump_start): Replace assignments to
16930         "dump_file" and "alt_dump_file" with calls to set_dump_file and
16931         set_alt_dump_file.
16932         (gcc::dump_manager::dump_finish): Likewise.
16933         * dumpfile.h (alt_dump_file): Delete decl.
16934         (dumps_are_enabled): New variable decl.
16935         (set_dump_file): New function decl.
16936         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
16937         global.
16938         * tree-nested.c (lower_nested_functions): Replace assignments to
16939         "dump_file" with calls to set_dump_file.
16941 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
16943         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
16944         goto_locus of each outgoing edge of each basic block.
16946 2018-06-28  Richard Biener  <rguenther@suse.de>
16948         * dwarf2out.c (decl_scope_table): Remove.
16949         (push_decl_scope): Likewise.
16950         (pop_decl_scope): Likewise.
16951         (gen_type_die_for_member): Do not call push/pop_decl_scope.
16952         (gen_struct_or_union_type_die): Likewise.
16953         (gen_tagged_type_die): Likewise.
16954         (dwarf2out_init): Do not initialize decl_scope_table.
16955         (dwarf2out_c_finalize): Do not free it.
16957 2018-06-28  Richard Biener  <rguenther@suse.de>
16959         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
16960         deciding whether to not re-use a DIE.
16962 2018-06-28  Richard Biener  <rguenther@suse.de>
16964         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
16965         DW_AT_abstract_origin attribute.
16967 2018-06-28  Martin Liska  <mliska@suse.cz>
16969         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
16970         Use newly introduced constants.
16971         * tree-switch-conversion.h (struct jump_table_cluster):
16972         Define max_ratio_for_size and max_ratio_for_speed.
16974 2018-06-28  Martin Liska  <mliska@suse.cz>
16976         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
16977         Add new checking assert to catch invalid state.
16978         (jump_table_cluster::can_be_handled): Handle single case
16979         clusters.
16980         (jump_table_cluster::is_beneficial): Bail out for such case.
16981         (bit_test_cluster::find_bit_tests):
16982         Add new checking assert to catch invalid state.
16983         (bit_test_cluster::can_be_handled): Handle single case
16984         clusters.
16985         (bit_test_cluster::is_beneficial): Bail out for such case.
16986         (switch_decision_tree::analyze_switch_statement):
16987         Fix comment.
16989 2018-06-28  Martin Liska  <mliska@suse.cz>
16991         * common.opt: Introduce -completion option.
16992         * gcc.c (driver_handle_option): Handle it.
16993         (driver::main): Print completions if completion
16994         is set.
16995         * opt-suggestions.c (option_proposer::get_completions):
16996         New function.
16997         (option_proposer::suggest_completion): Likewise.
16998         (option_proposer::find_param_completions): Likewise.
16999         (verify_autocompletions): Likewise.
17000         (test_completion_valid_options): Likewise.
17001         (test_completion_valid_params): Likewise.
17002         (in_completion_p): Likewise.
17003         (empty_completion_p): Likewise.
17004         (test_completion_partial_match): Likewise.
17005         (test_completion_garbage): Likewise.
17006         (opt_proposer_c_tests): Likewise.
17007         * opt-suggestions.h: Declare new functions.
17008         * opts.c (common_handle_option): Handle OPT__completion_.
17009         * selftest-run-tests.c (selftest::run_tests): Add
17010         opt_proposer_c_tests.
17011         * selftest.c (assert_str_startswith): New.
17012         * selftest.h (assert_str_startswith): Likewise.
17013         (opt_proposer_c_tests): New.
17014         (ASSERT_STR_STARTSWITH): Likewise.
17016 2018-06-28  Martin Liska  <mliska@suse.cz>
17018         * Makefile.in: Add opt-suggestions.o.
17019         * gcc-main.c: Include opt-suggestions.h.
17020         * gcc.c (driver::driver): Likewise.
17021         (driver::~driver): Remove m_option_suggestions.
17022         (driver::build_option_suggestions): Moved to option_proposer.
17023         (driver::suggest_option): Likewise.
17024         (driver::handle_unrecognized_options): Use option_proposer.
17025         * gcc.h (class driver): Add new memver m_option_proposer.
17026         * opt-suggestions.c: New file.
17027         * opt-suggestions.h: New file.
17029 2018-06-28  Martin Liska  <mliska@suse.cz>
17031         * vec.h (class auto_string_vec): New (moved from auto_argvec).
17032         (auto_string_vec::~auto_string_vec): Likewise.
17034 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
17036         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
17037         prevent_decl_creation_for_types fields up and add reset_location field.
17038         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
17039         statement if id->reset_location is true.
17040         (copy_edges_for_bb): Do not set goto_locus on the new edges if
17041         id->reset_location is true.
17042         (copy_phis_for_bb): Force input_location on the arguments if
17043         id->reset_location is true.
17044         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
17045         is set on the function to be inlined.
17047 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
17049         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
17051 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
17053         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
17054         registers for Pmode.
17055         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
17056         hard registers for the clobbered pseudo.
17058 2018-06-27  Paul Koning  <ni1d@arrl.net>
17060         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
17061         mutually exclusive options.
17062         * config/pdp11/constraints.md (h): New constraint.
17063         (O): Update definition to match shift code generation.
17064         (D): New constraint.
17065         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
17066         (CCFP): Remove.
17067         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
17068         function.
17069         (output_jump): Change arguments.
17070         (pdp11_fixed_cc_regs): New function.
17071         (pdp11_cc_mode): Ditto.
17072         (pdp11_expand_shift): Ditto.
17073         (pdp11_assemble_shift): Ditto.
17074         (pdp11_small_shift): Ditto.
17075         (pdp11_branch_cost): Remove.
17076         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
17077         from output.
17078         (pdp11_register_move_cost): Update for CC registers.
17079         (pdp11_rtx_costs): Add case for LSHIFTRT.
17080         (pdp11_output_jump): Add CCNZ mode conditional branches.
17081         (notice_update_cc_on_set): Remove.
17082         (pdp11_cc_mode): New function.
17083         (simple_memory_operand): Correct pre/post decrement case.
17084         (no_side_effect_operand): New function.
17085         (pdp11_regno_reg_class): Add CC_REGS class.
17086         (pdp11_fixed_cc_regs): New function.
17087         (pdp11_small_shift): New function.
17088         (pdp11_expand_shift): New function to expand shift insns.
17089         (pdp11_assemble_shift): New function to output shifts.
17090         (pdp11_branch_cost): Remove.
17091         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
17092         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
17093         (WCHAR_TYPE): Ditto.
17094         (PTRDIFF_TYPE): Ditto.
17095         (ADJUST_INSN_LENGTH): New macro.
17096         (FIXED_REGISTERS): Add CC registers.
17097         (CALL_USED_REGISTERS): Ditto.
17098         (reg_class): Ditto.
17099         (REG_CLASS_NAMES): Ditto.
17100         (REG_CLASS_CONTENTS): Ditto.
17101         (SELECT_CC_MODE): Use new function.
17102         (TARGET_FLAGS_REGNUM): New macro.
17103         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
17104         (cc0_reg_rtx): Remove.
17105         (CC_STATUS_MDEP): Remove.
17106         (CC_STATUS_MDEFP_INIT): Remove.
17107         (CC_IN_FPU): Remove.
17108         (NOTICE_UPDATE_CC): Remove.
17109         (REGISTER_NAMES): Add CC registers.
17110         (BRANCH_COST): Change to constant 1.
17111         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
17112         handling.
17113         * config/pdp11/pdp11.opt (mbcopy): Remove.
17114         (mbcopy-builtin): Remove.
17115         (mbranch-cheap): Remove.
17116         (mbranch-expensive): Remove.
17117         * config/pdp11/predicates.md (expand_shift_operand): Update to
17118         match shift code generation.
17119         (ccnz_operator): New predicate.
17120         * doc/invoke.texi (PDP-11 Options): Remove deleted options
17121         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
17122         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
17123         exclusive options.
17124         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
17125         description of O constraint.
17127 2018-06-27  Jeff Law  <law@redhat.com>
17128             Austin Law  <austinklaw@gmail.com>
17130         * config/v850/v850.md (addsi3_set_flags): New pattern.
17131         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
17132         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
17133         (zero_extendhisi2_v850_set_flags): Likewise.
17134         (zero_extendqisi2_v850_set_flags): Likewise.
17135         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
17136         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
17137         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
17139         * config/v850/v850-protos.h (notice_update_cc): Remove.
17140         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
17141         (v850_print_operand): Handle 'D' and "d".
17142         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
17143         Add handling of arithmetic/logical operations compared against zero.
17144         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
17145         Do not look at v850_compare_op, instead get mode from last argument.
17146         (v850_gen_compare): Remove
17147         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
17148         after reload for prologue insns.
17149         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
17150         patterns.
17151         (construct_save_jarl): Likewise.
17152         (TARGET_FLAGS_REGNUM): Define.
17153         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
17154         (NOTICE_UPDATE_CC): Remove.
17155         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
17156         than cc0.  Conditionalize on reload_completed.
17157         (cmpsi_insn, setfcc_insn): Likewise.
17158         (tst1 splitter): Turn into define_and_split which sets the flags
17159         after reload.
17160         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
17161         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
17162         (cstoresf4, cstoredf4): Clobber the flags.
17163         (cmpsi, cmpsf, cmpdf): Remove expanders.
17164         (setf_insn): Remove pattern.
17165         (addsi3): Turn into define_and_split which clobbers the flags after
17166         reload and a suitable pattern (addsi3_clobber_flags) for use after
17167         reload.
17168         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
17169         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
17170         (ashrsi3, ashrsi3_v850e2): Likewise.
17171         (bins): Clobber the flags.
17172         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
17173         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
17174         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
17175         (call_value_internal_short, call_value_internal_long): Likewise.
17176         (callt_save_interrupt, callt_return_interrupt): Likewise.
17177         (save_interrupt, return_interrupt): Likewise.
17178         (callt_save_all_interrupt, save_all_interrupt): Likewise.
17179         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
17180         (restore_all_interrupt, _restore_all_interrupt): Likewise.
17181         (All FP comparisons): Only allow after reload has completed.
17182         (trfsr): Likewise.
17183         (divh, divhu): Tweak output template.
17184         (branch_z_normal, branch_z_invert): Remove
17185         (branch_nz_normal, branch_nz_invert): Likewise.
17186         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
17188         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
17189         * config/v850/v850.c (notice_update_cc): Remove.
17190         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
17191         (CC_NO_CARRY): Likewise.
17192         (NOTICE_UPDATE_CC): Define to nothing.
17193         * config/v850/v850.md: Remove block comment on cc0 handling
17194         Remove "cc" attribute from all patterns.  Remove cc_status handling
17195         from all patterns.  Minor formatting fixes.
17197 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17199         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
17200         (cortex-a76.cortex-a55): Likewise.
17201         * config/aarch64/aarch64-tune.md: Regenerate.
17202         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
17203         cortex-a76.cortex-a55.
17205 2018-06-27  Jeff Law  <law@redhat.com>
17207         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
17208         (MULTILIB_DIRNAMES): Similarly.
17210 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
17212         * gimple.h (gimple_return_retbnd): Delete.
17213         (gimple_return_set_retbnd): Likewise.
17214         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
17215         gimple_return_set_retbnd.
17216         * gimple-pretty-print.c (dump_gimple_return): Remove call to
17217         gimple_return_retbnd and adjust.
17218         * tree-inline.h (struct copy_body_data): Remove retbnd field.
17219         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
17220         Explicitly return NULL in a couple more cases.  Move assertion
17221         on debug statements and remove unreachable code.
17222         (reset_debug_binding): Do not test id->retbnd.
17223         (expand_call_inline): Do not set it.
17225 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
17227         * configure.ac: Add --disable-gcov option.
17228         * configure: Regenerate.
17229         * Makefile.in: Honour @enable_gcov@.
17230         * doc/install.texi: Document --disable-gcov.
17232 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17234         * config/arm/arm-cpus.in (cortex-a76): New entry.
17235         (cortex-a76.cortex-a55): Likewise.
17236         * config/arm/arm-tables.opt: Regenerate.
17237         * config/arm/arm-tune.md: Likewise.
17238         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
17239         * doc/invoke.texi (ARM Options): Document cortex-a76 and
17240         cortex-a76.cortex-a55.
17242 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
17244         PR target/85769
17245         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
17247 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
17249         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
17250         comment.
17251         (EPILOGUE_USES): Likewise.
17253 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
17255         * tree-inline.c (remap_location): New function extracted from...
17256         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
17257         (copy_phis_for_bb): ...here.  Call remap_location.
17258         (copy_cfg_body): Adjust call to copy_edges_for_bb.
17260 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
17262         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
17263         unaligned vsx for 16B memset.
17265 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
17267         PR target/86285
17268         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
17269         ieee128_float_type_node to long_double_type_node unless
17270         TARGET_LONG_DOUBLE_128 is set.
17272 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
17274         * cfgloop.c (get_loop_location): Convert return type from
17275         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
17276         by implicit construction from rtx_insn *, and using
17277         dump_user_location_t::from_function_decl for the fallback case.
17278         * cfgloop.h (get_loop_location): Convert return type from
17279         location_t to dump_user_location_t.
17280         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
17281         dump_printf_loc to pass in a dump_location_t rather than a
17282         location_t, via the gimple stmt.
17283         * coverage.c (get_coverage_counts): Update calls to
17284         dump_printf_loc to pass in dump_location_t rather than a
17285         location_t.
17286         * doc/optinfo.texi (Dump types): Convert example of
17287         dump_printf_loc from taking "locus" to taking "insn".  Update
17288         description of the "_loc" calls to cover dump_location_t.
17289         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
17290         "selftest.h".
17291         (dump_user_location_t::dump_user_location_t): New constructors,
17292         from gimple *stmt and rtx_insn *.
17293         (dump_user_location_t::from_function_decl): New function.
17294         (dump_loc): Make static.
17295         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
17296         const dump_location_t &.
17297         (dump_generic_expr_loc): Delete.
17298         (dump_printf_loc): Convert param "loc" from location_t to
17299         const dump_location_t &.
17300         (selftest::test_impl_location): New function.
17301         (selftest::dumpfile_c_tests): New function.
17302         * dumpfile.h: Include "profile-count.h".
17303         (class dump_user_location_t): New class.
17304         (struct dump_impl_location_t): New struct.
17305         (class dump_location_t): New class.
17306         (dump_printf_loc): Convert 2nd param from source_location to
17307         const dump_location_t &.
17308         (dump_generic_expr_loc): Delete.
17309         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
17310         const dump_location_t &.
17311         * gimple-fold.c (fold_gimple_assign): Update call to
17312         dump_printf_loc to pass in a dump_location_t rather than a
17313         location_t, via the gimple stmt.
17314         (gimple_fold_call): Likewise.
17315         * gimple-loop-interchange.cc
17316         (loop_cand::analyze_iloop_reduction_var): Update for change to
17317         check_reduction_path.
17318         (tree_loop_interchange::interchange): Update for change to
17319         find_loop_location.
17320         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
17321         change in return-type of find_loop_location.
17322         (graphite_regenerate_ast_isl): Likewise.
17323         * graphite-optimize-isl.c (optimize_isl): Likewise.
17324         * graphite.c (graphite_transform_loops): Likewise.
17325         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
17326         pass in a dump_location_t rather than a location_t, via the
17327         gimple stmt.
17328         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
17329         * ipa.c (walk_polymorphic_call_targets): Likewise.
17330         * loop-unroll.c (report_unroll): Convert "locus" param from
17331         location_t to dump_location_t.
17332         (decide_unrolling): Update for change to get_loop_location's
17333         return type.
17334         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
17335         location_t to dump_user_location_t.
17336         (grid_find_single_omp_among_assignments_1): Updates calls to
17337         dump_printf_loc to pass in a dump_location_t rather than a
17338         location_t, via the gimple stmt.
17339         (grid_parallel_clauses_gridifiable): Convert "tloc" from
17340         location_t to dump_location_t.  Updates calls to dump_printf_loc
17341         to pass in a dump_location_t rather than a location_t, via the
17342         gimple stmt.
17343         (grid_inner_loop_gridifiable_p): Likewise.
17344         (grid_dist_follows_simple_pattern): Likewise.
17345         (grid_gfor_follows_tiling_pattern): Likewise.
17346         (grid_target_follows_gridifiable_pattern): Likewise.
17347         (grid_attempt_target_gridification): Convert initialization
17348         of local "grid" from memset to zero-initialization; FIXME: does
17349         this require C++11?  Update call to dump_printf_loc to pass in a
17350         optinfo_location rather than a location_t, via the gimple stmt.
17351         * profile.c (read_profile_edge_counts): Updates call to
17352         dump_printf_loc to pass in a dump_location_t rather than a
17353         location_t
17354         (compute_branch_probabilities): Likewise.
17355         * selftest-run-tests.c (selftest::run_tests): Call
17356         dumpfile_c_tests.
17357         * selftest.h (dumpfile_c_tests): New decl.
17358         * tree-loop-distribution.c (pass_loop_distribution::execute):
17359         Update for change in return type of find_loop_location.
17360         * tree-parloops.c (parallelize_loops): Likewise.
17361         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
17362         "locus" from location_t to dump_user_location_t.
17363         (canonicalize_loop_induction_variables): Likewise.
17364         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
17365         for change in return type of find_loop_location.
17366         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
17367         to dump_printf_loc to pass in a dump_location_t rather than a
17368         location_t, via the stmt.
17369         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
17370         Likewise.
17371         * tree-vect-loop-manip.c (find_loop_location): Convert return
17372         type from source_location to dump_user_location_t.
17373         (vect_do_peeling): Update for above change.
17374         (vect_loop_versioning): Update for change in type of
17375         vect_location.
17376         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
17377         from location_t to dump_user_location_t.
17378         (vect_estimate_min_profitable_iters): Update for change in type
17379         of vect_location.
17380         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
17381         location_t to dump_location_t.
17382         (vect_slp_bb): Update for change in type of vect_location.
17383         * tree-vectorizer.c (vect_location): Convert from source_location
17384         to dump_user_location_t.
17385         (try_vectorize_loop_1): Update for change in vect_location's type.
17386         (vectorize_loops): Likewise.
17387         (increase_alignment): Likewise.
17388         * tree-vectorizer.h (vect_location): Convert from source_location
17389         to dump_user_location_t.
17390         (find_loop_location): Convert return type from source_location to
17391         dump_user_location_t.
17392         (check_reduction_path): Convert 1st param from location_t to
17393         dump_user_location_t.
17394         * value-prof.c (check_counter): Update call to dump_printf_loc to
17395         pass in a dump_user_location_t rather than a location_t; update
17396         call to error_at for change in type of "locus".
17397         (check_ic_target): Update call to dump_printf_loc to
17398         pass in a dump_user_location_t rather than a location_t, via the
17399         call_stmt.
17401 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
17403         * config/s390/s390.h (enum processor_flags): Do not use
17404         default tune parameter when -march was specified.
17406 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
17408         PR target/86314
17409         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
17410         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
17411         operands.
17413 2018-06-26  Richard Biener  <rguenther@suse.de>
17415         PR tree-optimization/86287
17416         PR bootstrap/86316
17417         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
17418         (vect_analyze_loop): Initialize n_stmts.
17420 2018-06-26  Richard Biener  <rguenther@suse.de>
17422         PR middle-end/86271
17423         * fold-const.c (fold_convertible_p): Pointer extension
17424         isn't valid.
17426 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
17428         PR debug/86064
17429         * dwarf2out.c (loc_list_has_views): Adjust comments.
17430         (dw_loc_list): Split single cross-partition range with
17431         nonzero locview.
17433 2018-06-25  Jeff Law  <law@redhat.com>
17435         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
17436         on -mbig-switch by default.
17438         * config/v850/predicates.md (const_float_1_operand): Fix match_code
17439         test.
17440         (const_float_0_operand): Remove unused predicate.
17441         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
17442         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
17443         (recipsf2): New expander.  Original pattern now called
17444         (recipsf2_insn).
17445         (recipdf2, recipdf2_insn): Similarly.
17446         (rsqrtsf2, rsqrtsf2_insn): Similarly
17447         (rsqrtdf2, rsqrtdf2_insn): Similarly
17449 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
17451         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
17452         Simplify logic for FreeBSD (twice).
17454 2018-06-25  Martin Sebor  <msebor@redhat.com>
17456         PR tree-optimization/86204
17457         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
17458         a strnlen result if it's less than the length of the string.
17460 2018-06-25  Martin Sebor  <msebor@redhat.com>
17462         PR tree-optimization/85700
17463         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
17464         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
17465         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
17467 2018-06-25  Martin Sebor  <msebor@redhat.com>
17469         * doc/extend.texi (Zero-length arrays): Update and clarify.
17471 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
17473         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
17474         added IEEE/IBM long double multilib support on PowerPC little
17475         endian Linux systems.
17476         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
17477         (MULTILIB_DEFAULTS): Likewise.
17478         * config/rs6000/rs6000.c (rs6000_option_override_internal):
17479         Likewise.
17480         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
17481         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
17482         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
17484 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
17486         PR middle-end/86311
17487         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
17488         (REORDER_45): Likewise.
17490 2018-06-25  Jeff Law  <law@redhat.com>
17492         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
17493         dividend to 32 bits.  Adjust length.
17494         (udivmodhi4): Cleanup output template.  Fix length.
17496 2018-06-25  Carl Love  <cel@us.ibm.com>
17498         * config/rs6000/vsx.md: Change word selector to prefered location.
17500 2018-06-25  Richard Biener  <rguenther@suse.de>
17502         PR tree-optimization/86304
17503         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
17504         epilogue-if-converted loops as well.
17506 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
17508         * lto-section-out.c (lto_begin_section): Do not print section
17509         name for noaddr and unnumbered dumps.
17511 2018-06-25  Richard Biener  <rguenther@suse.de>
17513         * tree-vectorizer.h (struct vec_info_shared): New structure
17514         with parts split out from struct vec_info and loop_nest from
17515         struct _loop_vec_info.
17516         (struct vec_info): Adjust accordingly.
17517         (struct _loop_vec_info): Likewise.
17518         (LOOP_VINFO_LOOP_NEST): Adjust.
17519         (LOOP_VINFO_DATAREFS): Likewise.
17520         (LOOP_VINFO_DDRS): Likewise.
17521         (struct _bb_vec_info): Likewise.
17522         (BB_VINFO_DATAREFS): Likewise.
17523         (BB_VINFO_DDRS): Likewise.
17524         (struct _stmt_vec_info): Add dr_aux member.
17525         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
17526         (DR_MISALIGNMENT_UNINITIALIZED): New.
17527         (set_dr_misalignment): Adjust.
17528         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
17529         (vect_analyze_loop): Adjust prototype.
17530         (vect_analyze_loop_form): Likewise.
17531         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
17532         Compute dependences lazily.
17533         (vect_record_base_alignments): Use shared datarefs/ddrs.
17534         (vect_verify_datarefs_alignment): Likewise.
17535         (vect_analyze_data_refs_alignment): Likewise.
17536         (vect_analyze_data_ref_accesses): Likewise.
17537         (vect_analyze_data_refs): Likewise.
17538         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
17539         constructor parameter for shared part.
17540         (vect_analyze_loop_form): Pass in shared part and adjust.
17541         (vect_analyze_loop_2): Pass in storage for the number of
17542         stmts.  Move loop nest finding to the caller.  Compute
17543         datarefs lazily.
17544         (vect_analyze_loop): Pass in shared part.
17545         (vect_transform_loop): Verify shared datarefs are unchanged.
17546         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
17547         constructor parameter for shared part.
17548         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
17549         (vect_slp_bb): Verify shared datarefs are unchanged before
17550         transform.
17551         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
17552         change.
17553         (new_stmt_vec_info): Initialize DR_AUX misalignment to
17554         DR_MISALIGNMENT_UNINITIALIZED.
17555         * tree-vectorizer.c (vec_info::vec_info): Add constructor
17556         parameter for shared part.
17557         (vec_info::~vec_info): Adjust.
17558         (vec_info_shared::vec_info_shared): New.
17559         (vec_info_shared::~vec_info_shared): Likewise.
17560         (vec_info_shared::save_datarefs): Likewise.
17561         (vec_info_shared::check_datarefs): Likewise.
17562         (try_vectorize_loop_1): Construct shared part live for analyses
17563         of a single loop for multiple vector sizes.
17564         * tree-parloops.c (gather_scalar_reductions): Adjust.
17566 2018-06-25  Richard Biener  <rguenther@suse.de>
17568         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
17569         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
17570         (vect_analyze_data_refs): Remove similar code from here and
17571         simplify accordingly.
17573 2018-06-25  Richard Biener  <rguenther@suse.de>
17575         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
17576         for reverse storage order accesses rather than asserting
17577         they cannot happen here.
17579 2018-06-25  Tom de Vries  <tdevries@suse.de>
17581         PR debug/86257
17582         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
17583         Use data16 instead of .byte for insn prefix.
17585 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
17587         PR C++/86082
17588         * parser.c (make_char_string_pack): Pass this literal chars
17589         through cpp_interpret_string.
17590         (cp_parser_userdef_numeric_literal): Check the result of
17591         make_char_string_pack.
17593 2018-06-24  Maya Rashish  <coypu@sdf.org>
17595         * ginclude/stddef.h: Simplify conditions around avoiding
17596         re-definition of __size_t.
17598 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
17600         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
17601         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
17603 2018-06-22  Maya Rashish  <coypu@sdf.org>
17605         * doc/invoke.texi (mno-fancy-math-387): Update for changes
17606         made to OpenBSD and NetBSD through the years.
17608 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17610         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
17611         behavior of vec_pack (vector double, vector double) to match
17612         behavior of vec_float2 (vector double, vector double).
17614 2018-06-22  Olivier Hainque  <hainque@adacore.com>
17616         * gimplify.c (gimplify_function_tree): Prevent creation
17617         of a trampoline for the address of the current function
17618         passed to entry/exit instrumentation hooks.
17620 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
17622         PR target/86222
17623         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
17624         correctly.
17626 2018-06-22  Martin Liska  <mliska@suse.cz>
17628         PR tree-optimization/86263
17629         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
17630         Bail out if is_enabled is false.
17631         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
17632         New declaration.
17633         (jump_table_cluster::is_enabled): New function.
17635 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
17637         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
17638         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
17639         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
17640         (lto_input_ts_binfo_tree_pointers): Likewise.
17641         * tree-streamer-out.c (streamer_write_tree_bitfields,
17642         write_ts_binfo_tree_pointers): Likewise.
17643         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
17645 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
17647         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
17649 2018-06-22  Martin Liska  <mliska@suse.cz>
17651         * symbol-summary.h (get): Make it pure and inline move
17652         functionality from ::get function.
17653         (get): Remove and inline into ::get and ::get_create.
17654         (get_create): Move code from ::get function.
17656 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17658         PR target/85994
17659         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
17660         -x assembler-with-cpp.
17662 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17664         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
17665         _FILE_OFFSET_BITS=64 for C++.
17667 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
17669         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
17670         conversion insn that shows up when pr85657-3.c is compiled using
17671         IEEE 128-bit long double.
17672         (neg<mode>2_internal): Use the correct mode to check whether the
17673         mode is IBM extended.
17674         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
17675         multiply and divide external functions from being created more
17676         than once.
17678 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
17680         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
17681         functions.
17682         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
17683         the edge can be forwarded.
17684         (cfg_layout_merge_blocks): Likewise.
17686 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
17688         * except.c (finish_eh_generation): Commit edge insertions only after
17689         the EH edges have been redirected from post-landing to landing pads.
17691 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
17693         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
17694         create_tmp_var_for to create the FRAME decl.
17695         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
17697 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
17699         * tree-inline.c (copy_edges_for_bb): Minor tweak.
17700         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
17701         debug statement when resetting its value.
17702         (expand_call_inline): Copy the locus of the call onto the assignment
17703         of the return value, if any.  Use local variable in more cases.
17705 2018-06-21  Martin Liska  <mliska@suse.cz>
17707         * ipa-pure-const.c (propagate_nothrow): Use
17708         funct_state_summaries->get.
17709         (dump_malloc_lattice): Likewise.
17710         (propagate_malloc): Likewise.
17712 2018-06-21  Richard Biener  <rguenther@suse.de>
17714         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
17715         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
17716         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
17717         comment.
17718         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
17719         BLOCK_ABSTRACT_ORIGIN unconditionally.
17721 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
17723         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
17724         deleting it.
17725         * ipa-reference.c (ipa_reference_c_finalize): Delete
17726         ipa_ref_opt_sum_summaries and set it to NULL.
17728 2018-06-21  Tom de Vries  <tdevries@suse.de>
17730         PR tree-optimization/85859
17731         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
17732         test with comment from bb_no_side_effects_p.
17734 2018-06-21  Richard Biener  <rguenther@suse.de>
17736         PR tree-optimization/86232
17737         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
17738         max for constant niter.
17740 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
17742         * config/aarch64/aarch64-simd.md
17743         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
17745 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
17747         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
17748         Make opernads of the unspec commutative.
17750 2018-06-21  Richard Biener  <rguenther@suse.de>
17752         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
17753         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
17754         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
17755         (vect_analyze_data_ref_dependence): Re-order checks to deal with
17756         NULL DR_STEP.
17757         (vect_record_base_alignments): Do not record base alignment
17758         for gathers or scatters.
17759         (vect_compute_data_ref_alignment): Drop return value that is always
17760         true.  Bail out early for gathers or scatters.
17761         (vect_enhance_data_refs_alignment): Bail out early for gathers
17762         or scatters.
17763         (vect_find_same_alignment_drs): Likewise.
17764         (vect_analyze_data_refs_alignment): Remove dead code.
17765         (vect_slp_analyze_and_verify_node_alignment): Likewise.
17766         (vect_analyze_data_refs): For possible gathers or scatters do
17767         not create an alternate DR, just check their possible validity
17768         and mark them.  Adjust DECL_NONALIASED handling to not rely
17769         on DR_BASE_ADDRESS.
17770         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
17771         update inits of gathers or scatters.
17772         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
17773         Also copy gather/scatter flag to pattern vinfo.
17775 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17777         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
17778         behavior of vec_packsu (vector unsigned long long, vector unsigned
17779         long long) to match behavior of vec_packs with same signature.
17781 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
17782             Thomas Schwinge <thomas@codesourcery.com>
17783             Cesar Philippidis  <cesar@codesourcery.com>
17785         * gimplify.c (gimplify_scan_omp_clauses): Add support for
17786         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
17787         (gimplify_adjust_omp_clauses): Likewise.
17788         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
17789         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
17790         (gimplify_omp_target_update): Update handling of acc update and
17791         enter/exit data.
17792         * omp-low.c (install_var_field): Remove unused parameter
17793         base_pointers_restrict.
17794         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
17795         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
17796         FINALIZE}
17797         (omp_target_base_pointers_restrict_p): Delete.
17798         (scan_omp_target): Update call to scan_sharing_clauses.
17799         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
17800         FINALIZE}.
17801         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
17802         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
17803         (convert_local_omp_clauses): Likewise.
17804         * tree-pretty-print.c (dump_omp_clause): Likewise.
17805         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
17806         FINALIZE}.
17807         (omp_clause_code_name): Likewise.
17809 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
17811         PR debug/86194
17812         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
17813         be narrowed.
17815         PR tree-optimization/86231
17816         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
17817         anti-range don't overwrite *vr0min before using it to compute *vr0max.
17819 2018-06-20  Tom de Vries  <tdevries@suse.de>
17821         PR tree-optimization/86097
17822         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
17823         iv type if signedness of iv type is not the same as that of *nit.
17825 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
17827         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
17828         EDGE_EH edges, verify they are all EDGE_EH.
17830 2018-06-20  Maya Rashish  <coypu@sdf.org>
17832         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
17834 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17836         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
17837         * config/aarch64/aarch64.c (xgene1_tunings): Add
17838         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
17839         (aarch64_mode_valid_for_sched_fusion_p):
17840         Allow 16-byte modes.
17841         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
17842         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
17843         128-bit modes.
17844         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
17845         New pattern.
17846         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
17847         * config/aarch64/iterators.md (VQ2): New mode iterator.
17849 2018-06-20  Martin Liska  <mliska@suse.cz>
17851         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
17852         Change default ratio from 10 to 8.
17854 2018-06-20  Martin Liska  <mliska@suse.cz>
17856         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
17857         New.
17858         (bit_test_cluster::find_bit_tests): Likewise.
17859         (switch_decision_tree::analyze_switch_statement): Find clusters.
17860         * tree-switch-conversion.h (struct jump_table_cluster): Document
17861         hierarchy.
17863 2018-06-20  Martin Liska  <mliska@suse.cz>
17865         * tree-switch-conversion.c (switch_conversion::collect):
17866         Record m_uniq property.
17867         (switch_conversion::expand): Bail out for special conditions.
17868         (group_cluster::~group_cluster): New.
17869         (group_cluster::group_cluster): Likewise.
17870         (group_cluster::dump): Likewise.
17871         (jump_table_cluster::emit): New.
17872         (switch_decision_tree::fix_phi_operands_for_edges): New.
17873         (struct case_node): Remove struct.
17874         (jump_table_cluster::can_be_handled): New.
17875         (case_values_threshold): Moved to header.
17876         (reset_out_edges_aux): Likewise.
17877         (jump_table_cluster::is_beneficial): New.
17878         (bit_test_cluster::can_be_handled): Likewise.
17879         (add_case_node): Remove.
17880         (bit_test_cluster::is_beneficial): New.
17881         (case_bit_test::cmp): New.
17882         (bit_test_cluster::emit): New.
17883         (expand_switch_as_decision_tree_p): Remove.
17884         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
17885         (fix_phi_operands_for_edge): Likewise.
17886         (switch_decision_tree::analyze_switch_statement): New.
17887         (compute_cases_per_edge): Move ...
17888         (switch_decision_tree::compute_cases_per_edge): ... here.
17889         (try_switch_expansion): Likewise.
17890         (switch_decision_tree::try_switch_expansion): Likewise.
17891         (record_phi_operand_mapping): Likewise.
17892         (switch_decision_tree::record_phi_operand_mapping): Likewise.
17893         (emit_case_decision_tree): Likewise.
17894         (switch_decision_tree::emit): Likewise.
17895         (balance_case_nodes): Likewise.
17896         (switch_decision_tree::balance_case_nodes): Likewise.
17897         (dump_case_nodes): Likewise.
17898         (switch_decision_tree::dump_case_nodes): Likewise.
17899         (emit_jump): Likewise.
17900         (switch_decision_tree::emit_jump): Likewise.
17901         (emit_cmp_and_jump_insns): Likewise.
17902         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
17903         (emit_case_nodes): Likewise.
17904         (switch_decision_tree::emit_case_nodes): Likewise.
17905         (conditional_probability): Remove.
17906         * tree-switch-conversion.h (enum cluster_type): New.
17907         (PRINT_CASE): New.
17908         (struct cluster): Likewise.
17909         (cluster::cluster): Likewise.
17910         (struct simple_cluster): Likewise.
17911         (simple_cluster::simple_cluster): Likewise.
17912         (struct group_cluster): Likewise.
17913         (struct jump_table_cluster): Likewise.
17914         (struct bit_test_cluster): Likewise.
17915         (struct min_cluster_item): Likewise.
17916         (struct case_tree_node): Likewise.
17917         (case_tree_node::case_tree_node): Likewise.
17918         (jump_table_cluster::case_values_threshold): Likewise.
17919         (struct case_bit_test): Likewise.
17920         (struct switch_decision_tree): Likewise.
17921         (struct switch_conversion): Likewise.
17922         (switch_decision_tree::reset_out_edges_aux): Likewise.
17924 2018-06-20  Martin Liska  <mliska@suse.cz>
17926         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
17927         (hoist_edge_and_branch_if_true): Likewise.
17928         (expand_switch_using_bit_tests_p): Likewise.
17929         (struct case_bit_test): Likewise.
17930         (case_bit_test_cmp): Likewise.
17931         (emit_case_bit_tests): Likewise.
17932         (switch_conversion::switch_conversion): New class.
17933         (struct switch_conv_info): Remove old struct.
17934         (collect_switch_conv_info): More to ...
17935         (switch_conversion::collect): ... this.
17936         (check_range): Likewise.
17937         (switch_conversion::check_range): Likewise.
17938         (check_all_empty_except_final): Likewise.
17939         (switch_conversion::check_all_empty_except_final): Likewise.
17940         (check_final_bb): Likewise.
17941         (switch_conversion::check_final_bb): Likewise.
17942         (create_temp_arrays): Likewise.
17943         (switch_conversion::create_temp_arrays): Likewise.
17944         (free_temp_arrays): Likewise.
17945         (gather_default_values): Likewise.
17946         (switch_conversion::gather_default_values): Likewise.
17947         (build_constructors): Likewise.
17948         (switch_conversion::build_constructors): Likewise.
17949         (constructor_contains_same_values_p): Likewise.
17950         (switch_conversion::contains_same_values_p): Likewise.
17951         (array_value_type): Likewise.
17952         (switch_conversion::array_value_type): Likewise.
17953         (build_one_array): Likewise.
17954         (switch_conversion::build_one_array): Likewise.
17955         (build_arrays): Likewise.
17956         (switch_conversion::build_arrays): Likewise.
17957         (gen_def_assigns): Likewise.
17958         (switch_conversion::gen_def_assigns): Likewise.
17959         (prune_bbs): Likewise.
17960         (switch_conversion::prune_bbs): Likewise.
17961         (fix_phi_nodes): Likewise.
17962         (switch_conversion::fix_phi_nodes): Likewise.
17963         (gen_inbound_check): Likewise.
17964         (switch_conversion::gen_inbound_check): Likewise.
17965         (process_switch): Use the newly created class.
17966         (switch_conversion::expand): New.
17967         (switch_conversion::~switch_conversion): New.
17968         * tree-switch-conversion.h: New file.
17970 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
17972         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
17973         tree-vect-patterns.c.
17974         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
17975         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
17976         (vect_recog_sad_pattern): Likewise.
17977         (vect_recog_widen_sum_pattern): Likewise.
17978         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
17979         (vect_recog_widen_shift_pattern): Remove the type_in argument.
17980         (vect_recog_rotate_pattern): Likewise.
17981         (vect_recog_mult_pattern): Likewise.
17982         (vect_recog_vector_vector_shift_pattern): Likewise.
17983         (vect_recog_divmod_pattern): Likewise.
17984         (vect_recog_mixed_size_cond_pattern): Likewise.
17985         (vect_recog_bool_pattern): Likewise.
17986         (vect_recog_mask_conversion_pattern): Likewise.
17987         (vect_try_gather_scatter_pattern): Likewise.
17988         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
17989         (vect_recog_over_widening_pattern): Likewise.
17990         (vect_recog_gather_scatter_pattern): Likewise.
17991         (vect_recog_func_ptr): Move from tree-vectorizer.h
17992         (vect_vect_recog_func_ptrs): Move further down the file.
17993         (vect_recog_func): Likewise.  Remove the third argument.
17994         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
17995         (vect_pattern_recog_1): Expect the pattern function to do any
17996         necessary target tests.  Also expect it to provide a vector type.
17997         Remove the type_in handling.
17999 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
18001         * tree-vect-patterns.c (vect_pattern_detected): New function.
18002         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
18003         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
18004         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
18005         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
18006         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
18007         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
18008         (vect_recog_mask_conversion_pattern)
18009         (vect_try_gather_scatter_pattern): Likewise.
18011 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
18013         * tree-vect-patterns.c (vect_get_internal_def): New function.
18014         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
18015         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
18016         (search_type_for_mask_1): Use it.
18018 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
18020         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
18021         redundant WIDEN_SUM_EXPR handling.
18022         (vect_recog_sad_pattern): Likewise.
18024 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
18026         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
18027         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
18028         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
18029         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
18030         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
18032 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
18034         * tree-vect-stmts.c (vectorizable_call): Make sure that we
18035         use the stmt_vec_info of the original bb statement for the
18036         new zero assignment, even if the call is part of a pattern.
18038 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
18040         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
18041         that the sequence is attached to the original statement rather
18042         than the pattern statement.
18043         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
18044         PATTERN_DEF_SEQ from the original statement rather than
18045         the main pattern statement.
18046         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
18047         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
18048         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
18050 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
18052         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
18053         definition statements before the early exit for statements that aren't
18054         live or relevant.
18055         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
18056         split out from...
18057         (vect_transform_loop): ...here.  Process pattern definition
18058         statements without first checking whether the main pattern
18059         statement is live or relevant.
18061 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
18063         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
18064         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
18066 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
18068         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
18069         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
18070         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
18071         (expand_block_compare): Change select_block_compare_mode call.
18072         (expand_strncmp_align_check): Use new functions, fix comment.
18073         (emit_final_str_compare_gpr): New function.
18074         (expand_strn_compare): Refactor and clean up code.
18075         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
18077 2018-06-19  Tony Reix  <tony.reix@atos.com>
18078             Damien Bergamini  <damien.bergamini@atos.com>
18079             David Edelsohn  <dje.gcc@gmail.com>
18081         * collect2.c (static_obj): New variable.
18082         (static_libs): New variable.
18083         (is_in_list): Uncomment declaration.
18084         (main): Track AIX libraries linked statically.
18085         (is_in_list): Uncomment definition.
18086         (scan_prog_file): Don't add AIX shared libraries initializer
18087         to constructor list if linking statically.
18089 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
18091         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
18092         constant.
18093         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
18095 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
18097         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
18098         blocks.
18100 2018-06-19  Martin Liska  <mliska@suse.cz>
18102         * config/i386/i386.c (ix86_can_inline_p): Do not use
18103         ipa_fn_summaries::get_create.
18104         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
18105         get.
18106         (devirtualization_time_bonus): Likewise.
18107         (ipcp_propagate_stage): Likewise.
18108         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
18109         (edge_set_predicate): Likewise.
18110         (evaluate_conditions_for_known_args): Likewise.
18111         (evaluate_properties_for_edge): Likewise.
18112         (ipa_call_summary::reset): Tranform to ...
18113         (ipa_call_summary::~ipa_call_summary): ... this.
18114         (ipa_fn_summary::reset): Transform to ...
18115         (ipa_fn_summary::~ipa_fn_summary): ... this.
18116         (ipa_fn_summary_t::remove): Rename to ...
18117         (ipa_fn_summary_t::remove_callees): ... this.
18118         (ipa_fn_summary_t::duplicate): Use placement new
18119         instead of memory copy.
18120         (ipa_call_summary_t::duplicate): Likewise.
18121         (ipa_call_summary_t::remove): Remove.
18122         (dump_ipa_call_summary): Change get_create to get.
18123         (ipa_dump_fn_summary): Dump only when summary exists.
18124         (analyze_function_body): Use symbol_summary::get instead
18125         of get_create.
18126         (compute_fn_summary): Likewise.
18127         (estimate_edge_devirt_benefit): Likewise.
18128         (estimate_edge_size_and_time): Likewise.
18129         (inline_update_callee_summaries): Likewise.
18130         (remap_edge_change_prob): Likewise.
18131         (remap_edge_summaries): Likewise.
18132         (ipa_merge_fn_summary_after_inlining): Likewise.
18133         (write_ipa_call_summary): Likewise.
18134         (ipa_fn_summary_write): Likewise.
18135         (ipa_free_fn_summary): Likewise.
18136         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
18137         (struct ipa_call_summary): Likewise.
18138         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
18139         of get_create.
18140         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
18141         (estimate_size_after_inlining): Likewise.
18142         (estimate_growth): Likewise.
18143         (growth_likely_positive): Likewise.
18144         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
18145         (inline_call): Likewise.
18146         * ipa-inline.c (caller_growth_limits): Likewise.
18147         (can_inline_edge_p): Likewise.
18148         (can_inline_edge_by_limits_p): Likewise.
18149         (compute_uninlined_call_time): Likewise.
18150         (compute_inlined_call_time): Likewise.
18151         (want_inline_small_function_p): Likewise.
18152         (edge_badness): Likewise.
18153         (update_caller_keys): Likewise.
18154         (update_callee_keys): Likewise.
18155         (inline_small_functions): Likewise.
18156         (inline_to_all_callers_1): Likewise.
18157         (dump_overall_stats): Likewise.
18158         (early_inline_small_functions): Likewise.
18159         (early_inliner): Likewise.
18160         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
18161         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
18162         * ipa-pure-const.c (malloc_candidate_p): Likewise.
18163         * ipa-split.c (execute_split_functions): Likewise.
18164         * symbol-summary.h: Likewise.
18165         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
18167 2018-06-19  Richard Biener  <rguenther@suse.de>
18169         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
18170         (vectorize_loops): ... here.  Fix dbgcnt handling.
18171         (try_vectorize_loop): Wrap try_vectorize_loop_1.
18173 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
18175         PR target/86197
18176         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
18177         ieee128 argument takes up only one (vector) register, not two (floating
18178         point) registers.
18180 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
18182         * gimplify.c (gimplify_init_constructor): Really never clear for an
18183         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
18185 2018-06-19  Richard Biener  <rguenther@suse.de>
18187         PR tree-optimization/86179
18188         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
18189         after failed recognition.
18191 2018-06-18  Martin Sebor  <msebor@redhat.com>
18193         PR middle-end/85602
18194         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
18195         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
18196         Handle integer subtraction.
18197         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
18198         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
18200 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
18202         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
18203         param from rtx to rtx_insn *.
18204         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
18205         param.
18206         (frv_ifcvt_modify_insn): Likwise.
18207         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
18208         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
18209         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
18210         as_a <rtx_insn *> cast to local "unprotected_region" once
18211         it's been established that it's not NULL or pc_rtx.
18212         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
18213         param "sethi" from rtx to rtx_insn *.
18214         (nds32_group_float_insns): Likewise for param "insn".
18215         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
18216         param.
18217         (vax_output_int_subtract): Likewise.
18218         * config/vax/vax.c (vax_output_int_add): Likewise for param
18219         "insn".
18220         (vax_output_int_subtract): Likewise.
18221         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
18222         (emit_pattern_after): Likewise for param "after".
18223         (emit_insn_after): Likewise.
18224         (emit_jump_insn_after): Likewise.
18225         (emit_call_insn_after): Likewise.
18226         (emit_debug_insn_after): Likewise.
18227         (emit_pattern_before): Likewise for param "before".
18228         (emit_insn_before): Likewise.
18229         (emit_jump_insn_before): Likewise.
18230         * final.c (get_insn_template): Likewise for param "insn", removing
18231         a cast.
18232         * output.h (get_insn_template): Likewise for 2nd param.
18233         * rtl.h (emit_insn_before): Likewise.
18234         (emit_jump_insn_before): Likewise.
18235         (emit_debug_insn_before_noloc): Likewise.
18236         (emit_insn_after): Likewise.
18237         (emit_jump_insn_after): Likewise.
18238         (emit_call_insn_after): Likewise.
18239         (emit_debug_insn_after): Likewise.
18240         (set_insn_deleted): Likewise for param.
18242 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
18244         PR target/85358
18245         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
18246         floating point modes, so that IFmode is numerically greater than
18247         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
18248         to declare the ordering.  This prevents IFmode from being
18249         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
18250         machine.  Include rs6000-modes.h to share the fractional values
18251         between genmodes* and the rest of the compiler.
18252         (IFmode): Likewise.
18253         (KFmode): Likewise.
18254         (TFmode): Likewise.
18255         * config/rs6000/rs6000-modes.h: New file.
18256         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
18257         meaning of rs6000_long_double_size so that 126..128 selects an
18258         appropriate 128-bit floating point type.
18259         (rs6000_option_override_internal): Likewise.
18260         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
18261         (TARGET_LONG_DOUBLE_128): Change the meaning of
18262         rs6000_long_double_size so that 126..128 selects an appropriate
18263         128-bit floating point type.
18264         (LONG_DOUBLE_TYPE_SIZE): Update comment.
18265         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
18266         source and destination to match the standard usage.
18267         (truncifkf2): Likewise.
18268         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
18269         ISA 2.07 to use an explicit clobber, instead of passing in a
18270         temporary.
18271         (copysign<mode>3_soft): Likewise.
18273 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
18275         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
18276         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
18277         (vect_slp_analyze_instance_dependence): Likewise.
18278         (vect_enhance_data_refs_alignment): Likewise.
18279         (vect_analyze_data_refs_alignment): Likewise.
18280         (vect_slp_analyze_and_verify_instance_alignment
18281         (vect_analyze_data_ref_accesses): Likewise.
18282         (vect_prune_runtime_alias_test_list): Likewise.
18283         (vect_analyze_data_refs): Likewise.
18284         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
18285         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
18286         (vect_analyze_scalar_cycles_1): Likewise.
18287         (vect_get_loop_niters): Likewise.
18288         (vect_analyze_loop_form_1): Likewise.
18289         (vect_update_vf_for_slp): Likewise.
18290         (vect_analyze_loop_operations): Likewise.
18291         (vect_analyze_loop): Likewise.
18292         (vectorizable_induction): Likewise.
18293         (vect_transform_loop): Likewise.
18294         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
18295         * tree-vect-slp.c (vect_analyze_slp): Likewise.
18296         (vect_make_slp_decision): Likewise.
18297         (vect_detect_hybrid_slp): Likewise.
18298         (vect_slp_analyze_operations): Likewise.
18299         (vect_slp_bb): Likewise.
18300         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
18301         (vectorizable_bswap): Likewise.
18302         (vectorizable_call): Likewise.
18303         (vectorizable_simd_clone_call): Likewise.
18304         (vectorizable_conversion): Likewise.
18305         (vectorizable_assignment): Likewise.
18306         (vectorizable_shift): Likewise.
18307         (vectorizable_operation): Likewise.
18308         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
18310 2018-06-18  Martin Sebor  <msebor@redhat.com>
18312         PR tree-optimization/81384
18313         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
18314         * builtins.c (expand_builtin_strnlen): New function.
18315         (expand_builtin): Call it.
18316         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
18317         * builtins.def (BUILT_IN_STRNLEN): New.
18318         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
18319         Warn for bounds in excess of maximum object size.
18320         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
18321         single-value ranges.  Handle strnlen.
18322         (handle_builtin_strlen): Handle strnlen.
18323         (strlen_check_and_optimize_stmt): Same.
18324         * doc/extend.texi (Other Builtins): Document strnlen.
18326 2018-06-18  Maya Rashish  <coypu@sdf.org>
18328         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
18329         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
18330         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
18332         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
18333         here to ...
18334         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
18336 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
18338         * tree.c (escaped_string::escape): Replace cast to char * by
18339         const_cast<char *> (unescaped).
18341 2018-06-18  Nick Clifton  <nickc@redhat.com>
18343         PR 84195
18344         * tree.c (escaped_string): New class.  Converts an unescaped
18345         string into its escaped equivalent.
18346         (warn_deprecated_use): Use the new class to convert the
18347         deprecation message, if present.
18348         (test_escaped_strings): New self test.
18349         (test_c_tests): Add test_escaped_strings.
18350         * doc/extend.texi (deprecated): Add a note that the
18351         deprecation message is affected by the -fmessage-length
18352         option, and that control characters will be escaped.
18353         (#pragma GCC error): Document this pragma.
18354         (#pragma GCC warning): Likewise.
18355         * doc/invoke.texi (-fmessage-length): Document this option's
18356         effect on the #warning and #error preprocessor directives and
18357         the deprecated attribute.
18359 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
18361         * tree.c (decl_value_expr_lookup): Revert latest change.
18362         (decl_value_expr_insert): Likewise.
18364 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
18366         * gimplify.c (nonlocal_vlas): Delete.
18367         (nonlocal_vla_vars): Likewise.
18368         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
18369         referenced VLAs.
18370         (gimplify_body): Do not create and destroy nonlocal_vlas.
18371         * tree-nested.c: Include diagnostic.h.
18372         (use_pointer_in_frame): Tweak.
18373         (lookup_field_for_decl): Add assertion and declare the transformation.
18374         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
18375         internal error when the reference is in a wrong context.  Do not
18376         create a debug decl by default.
18377         (note_nonlocal_block_vlas): Delete.
18378         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
18379         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
18380         create a debug decl by default.
18381         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
18382         call is in a wrong context.
18383         (fixup_vla_decls): New function.
18384         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
18385         debug variables were created.
18386         * tree.c (decl_value_expr_lookup): Add checking assertion.
18387         (decl_value_expr_insert): Likewise.
18389 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
18391         PR middle-end/82479
18392         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
18393         * tree-scalar-evolution.c (interpret_expr): Likewise.
18394         (expression_expensive_p): Likewise.
18395         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
18396         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
18397         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
18398         (ssa_defined_by_minus_one_stmt_p): New.
18400 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
18402         PR middle-end/64946
18403         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
18404         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
18405         * dojump.c (do_jump): Likewise.
18406         * expr.c (expand_expr_real_2): Check operand type's sign.
18407         * fold-const.c (const_unop): Handle ABSU_EXPR.
18408         (fold_abs_const): Likewise.
18409         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
18410         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
18411         (strip_sign_op_1): Likesise.
18412         * match.pd: Add new pattern to generate ABSU_EXPR.
18413         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
18414         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
18415         * tree-eh.c (operation_could_trap_helper_p): Likewise.
18416         * tree-inline.c (estimate_operator_cost): Likewise.
18417         * tree-pretty-print.c (dump_generic_node): Likewise.
18418         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
18419         * tree.def (ABSU_EXPR): New.
18421 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
18423         PR middle-end/86095
18424         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
18425         documented as preserved for backward compatibility only.
18426         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
18428         PR rtl-optimization/86108
18429         * bb-reorder.c (create_forwarder_block): Renamed to ...
18430         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
18431         jump from new landing pad to the second part.
18432         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
18433         Adjust callers.
18435 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
18437         PR middle-end/85878
18438         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
18439         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
18440         Only call store_expr for halves if the mode is the same.
18442         PR middle-end/86123
18443         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
18444         Fix up comment formatting.
18446 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
18448         * typed-splay-tree.h (typed_splay_tree::remove): New function.
18449         (typed_splay_tree::closure,
18450         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
18451         (typed_splay_tree::typed_splay_tree,
18452         typed_splay_tree::operator =): Declared private.
18453         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
18454         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
18455         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
18456         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
18457         typed_splay_tree::splay_tree_splay,
18458         typed_splay_tree::splay_tree_foreach_helper,
18459         typed_splay_tree::splay_tree_insert,
18460         typed_splay_tree::splay_tree_remove,
18461         typed_splay_tree::splay_tree_lookup,
18462         typed_splay_tree::splay_tree_predecessor,
18463         typed_splay_tree::splay_tree_successor,
18464         typed_splay_tree::splay_tree_min,
18465         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
18466         (typed_splay_tree::root, typed_splay_tree::comp,
18467         typed_splay_tree::delete_key,
18468         typed_splay_tree::delete_value): New data members.
18469         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
18470         typed_splay_tree::remove.
18472 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
18474         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
18475         -mginv and -mno-ginv to the assembler.
18476         * config/mips/mips.opt (-mcrc): New option.
18477         (-mginv): Likewise.
18478         * doc/invoke.text (-mcrc): Document.
18479         (-mginv): Likewise.
18481 2018-06-15  Nick Clifton  <nickc@redhat.com>
18483         PR 84195
18484         * tree.c (escaped_string): New class.  Converts an unescaped
18485         string into its escaped equivalent.
18486         (warn_deprecated_use): Use the new class to convert the
18487         deprecation message, if present.
18488         (test_escaped_strings): New self test.
18489         (test_c_tests): Add test_escaped_strings.
18490         * doc/extend.texi (deprecated): Add a note that the
18491         deprecation message is affected by the -fmessage-length
18492         option, and that control characters will be escaped.
18493         (#pragma GCC error): Document this pragma.
18494         (#pragma GCC warning): Likewise.
18495         * doc/invoke.texi (-fmessage-length): Document this option's
18496         effect on the #warning and #error preprocessor directives and
18497         the deprecated attribute.
18499 2018-06-15  Richard Biener  <rguenther@suse.de>
18501         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
18502         here, also noting vector size used.
18503         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
18504         size used in MSG_OPTIMIZED_LOCATIONS dump.
18505         (pass_slp_vectorize::execute): Adjust.
18507 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
18509         PR target/85968
18510         * config/arc/arc.c (arc_return_address_register): Fix
18511         if-condition.
18513 2018-06-15  Richard Biener  <rguenther@suse.de>
18515         PR middle-end/86159
18516         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
18517         leave useless conversion stripping to force_gimple_operand_gsi.
18518         (gimplify_build2): Likewise.
18519         (gimplify_build1): Likewise.
18521 2018-06-15  Richard Biener  <rguenther@suse.de>
18523         PR middle-end/86076
18524         * tree-cfg.c (move_stmt_op): unshare invariant addresses
18525         before adjusting their block.
18527 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
18529         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
18530         multilibs for *-*-rtems*.
18531         * config/riscv/t-rtems: New file.
18533 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
18535         PR middle-end/86122
18536         * match.pd ((A +- CST1) +- CST2): Punt if last resort
18537         unsigned_type_for returns NULL.
18539         PR target/85945
18540         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
18541         subregs of multi-word pseudos unless the float mode has word size.
18543 2018-06-14  Richard Biener  <rguenther@suse.de>
18545         PR middle-end/86139
18546         * tree-vect-generic.c (build_word_mode_vector_type): Remove
18547         duplicate and harmful type_hash_canon.
18548         * tree.c (type_hash_canon): Assert we didn't find ourselves.
18550 2018-06-14  Richard Biener  <rguenther@suse.de>
18552         PR ipa/86124
18553         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
18554         NULL cgraph_node.
18556 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
18558         * config/rtems.h (STDINT_LONG32): Define.
18560 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
18561             Prachi Godbole  <prachi.godbole@imgtec.com>
18563         * config/mips/mips-cpus.def: Define P6600.
18564         * config/mips/mips-tables.opt: Regenerate.
18565         * config/mips/mips.c (mips_ucbranch_type): New enum.
18566         (mips_rtx_cost_data): Add support for P6600.
18567         (mips_issue_rate): Likewise.
18568         (mips_multipass_dfa_lookahead): Likewise.
18569         (mips_avoid_hazard): Likewise.
18570         (mips_reorg_process_insns): Likewise.
18571         (mips_classify_branch_p6600): New function.
18572         * config/mips/mips.h (TUNE_P6600): New define.
18573         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
18574         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
18575         * config/mips/mips.md: Include p6600.md.
18576         (processor): Add p6600.
18577         * config/mips/p6600.md: New file.
18578         * doc/invoke.texi: Add p6600 to supported architectures.
18580 2018-06-13  Martin Sebor  <msebor@redhat.com>
18582         PR tree-optimization/86114
18583         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
18584         of integer types.
18585         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
18587 2018-06-13  Richard Biener  <rguenther@suse.de>
18589         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
18590         Properly set vector type of the intermediate stmt.
18591         * tree-vect-stmts.c (vectorizable_operation): The destination
18592         var always has vectype_out type.
18594 2018-06-13  Jeff Law  <law@redhat.com>
18596         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
18597         integer 0 for argument to print_rtl_with_bb.
18598         (rl78_reorg): Likewise.
18600 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
18602         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
18603         from rtx to rtx_insn *.
18604         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
18605         "label".
18606         (add_sched_insns_for_speculation): Likewise for local "target",
18607         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
18608         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
18609         from rtx_insn ** to rtx_code_label **.
18610         (reorg_emit_nops): Likewise.
18611         (c6x_reorg): Likewise for local "call_labels".
18612         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
18613         rtx to rtx_insn *.
18614         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
18615         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
18616         the loops over LABEL_REFS.
18617         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
18618         braf_label.
18619         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
18620         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
18621         (split_branches): Strengthen local "olabel" from rtx to
18622         rtx_insn *, adding a safe_as_a cast.
18623         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
18624         to "rtx_insn *".
18625         (add_insn_after): Likewise for first two params.
18626         (add_insn_before): Likewise.
18627         (remove_insn): Likewise for param.
18628         (emit_pattern_before_noloc): Likewise for second and third params.
18629         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
18630         (emit_call_insn_before_noloc): Likewise.
18631         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
18632         to "rtx_insn *".
18633         (emit_barrier_before): Likewise.
18634         (emit_label_before): Strengthen "label" param from "rtx" to
18635         "rtx_code_label *".  Strengthen "before" param from "rtx" to
18636         "rtx_insn *".
18637         (emit_insn_after_1): Strengthen "after" param from "rtx" to
18638         "rtx_insn *".
18639         (emit_pattern_after_noloc): Likewise.
18640         (emit_insn_after_noloc): Likewise.
18641         (emit_jump_insn_after_noloc): Likewise.
18642         (emit_call_insn_after_noloc): Likewise.
18643         (emit_debug_insn_after_noloc): Likewise.
18644         (emit_barrier_after): Likewise.
18645         (emit_label_after): Likewise for both params.
18646         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
18647         "loc" param from "int" to "location_t".
18648         (emit_insn_after_setloc): Likewise.
18649         (emit_jump_insn_after_setloc): Likewise.
18650         (emit_call_insn_after_setloc): Likewise.
18651         (emit_debug_insn_after_setloc): Likewise.
18652         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
18653         "loc" param from "int" to "location_t".
18654         (emit_pattern_before): Convert NULL_RTX to NULL.
18655         (emit_insn_before_setloc): Convert "loc" param from "int" to
18656         "location_t".
18657         (emit_jump_insn_before_setloc): Likewise.
18658         (emit_call_insn_before_setloc): Likewise.
18659         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
18660         rtx_insn *.  Convert "loc" param from "int" to "location_t".
18661         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
18662         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
18663         Convert 3rd param from "int" to "location_t".
18664         (emit_barrier_before, emit_barrier_after, next_real_insn):
18665         Strengthen param from rtx to rtx_insn *.
18666         (emit_label_before): Strengthen 1st param from "rtx" to
18667         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
18668         "rtx_insn *".
18669         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
18670         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
18671         Strengthen 2nd param from "rtx" to "rtx_insn *".
18672         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
18673         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
18674         Likewise. Convert 3rd param from "int" to "location_t".
18675         (emit_label_after): Strengthen 1st param from "rtx" to
18676         "rtx_code_label *".
18677         (next_real_insn, remove_insn): Strengthen param from "rtx" to
18678         "rtx_insn *".
18679         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
18680         from "rtx" to "rtx_insn *".
18682 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
18684         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
18685         bodies streamed in with -Q.
18686         * dumpfile.c (dump_files): Add lto-stream-out dump file.
18687         * dumpfile.h (tree_dump_index): Add lto_stream_out.
18688         * gimple-streamer-out.c: Include gimple-pretty-print.h
18689         (output_bb): Dump stmts streamed.
18690         * lto-section-out.c: Include print-tree.h
18691         (lto_begin_section): Dump sections created.
18692         (lto_output_decl_index): Dump decl encoded.
18693         * lto-streamer-out.c: Include print-tree.h
18694         (create_output_block): Dump output block created.
18695         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
18696         (output_function): Dump function output.
18697         (output_constructor): Dump constructor streamed.
18698         (write_global_stream): Output indexes encoded.
18699         (produce_asm_for_decls): Dump streams encoded.
18700         * lto-streamer.c (streamer_dump_file): New global var.
18701         * lto-streamer.h (streamer_dump_file): Declare.
18702         * passes.c (ipa_write_summaries): Initialize streamer dump.
18703         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
18704         in.
18706 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
18708         PR target/86048
18709         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
18710         offsets for register save directives.  Emit a second batch of save
18711         directives, if need be, when the function accesses prior frames.
18713 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
18715         * config/arc/fpu.md (fmasf4): Force operand to register.
18716         (fnmasf4): Likewise.
18718 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
18720         * config/arc/arc-protos.h (arc_pad_return): Remove.
18721         * config/arc/arc.c (machine_function): Remove force_short_suffix
18722         and size_reason.
18723         (arc_print_operand): Adjust printing of '&'.
18724         (arc_verify_short): Remove conditional printing of short suffix.
18725         (arc_final_prescan_insn): Remove reference to size_reason.
18726         (pad_return): New function.
18727         (arc_reorg): Call pad_return.
18728         (arc_pad_return): Remove.
18729         (arc_init_machine_status): Remove reference to force_short_suffix.
18730         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
18731         (attr length): When attribute iscompact is true force to 2
18732         regardless; in the case of maybe check if we want to force the
18733         instruction to have 4 bytes length.
18734         (nopv): Change it to generate 4 byte long nop as well.
18735         (blockage): New pattern.
18736         (simple_return): Remove call to arc_pad_return.
18737         (p_return_i): Likewise.
18739 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
18741         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
18743 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
18745         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
18746         ARC cores.
18748 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
18750         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
18751         for ARC700 and ARCv2.
18753 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
18755         PR target/86076
18756         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
18757         operands[2] instead of operands[1].
18760 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
18762         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
18763         case, check whether the outer register overlaps an unallocatable
18764         register, not just whether it fits the required class.
18766 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
18768         * poly-int.h (can_div_trunc_p): Add new overload in which all values
18769         are poly_ints.
18770         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
18771         (memrefs_conflict_p): Likewise.
18772         (init_alias_analysis): Likewise.
18773         * cfgexpand.c (expand_debug_expr): Likewise.
18774         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
18775         * cse.c (fold_rtx): Likewise.
18776         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
18777         * expr.c (emit_block_move_hints): Likewise.
18778         (clear_storage_hints, push_block, emit_push_insn): Likewise.
18779         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
18780         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
18781         (emit_group_store): Likewise.
18782         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
18783         to read the PRE/POST_MODIFY increment.
18784         * calls.c (store_one_arg): Use strip_offset.
18785         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
18786         poly_int_rtx_p.
18787         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
18788         by a VEC_SELECT.
18789         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
18790         (simplify_binary_operation_1): Extend CONST_INT handling to
18791         poly_int_rtx_p.
18792         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
18793         than a HOST_WIDE_INT.
18794         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
18795         poly_int64.
18796         (adjust_mems, add_stores): Update accodingly.
18797         (vt_canonicalize_addr): Track polynomial offsets.
18798         (emit_note_insn_var_location): Likewise.
18799         (vt_add_function_parameter): Likewise.
18800         (vt_initialize): Likewise.
18802 2018-06-12  Jeff Law  <law@redhat.com>
18804         * config.gcc (alpha*-*-freebsd*): Remove.
18805         * config/alpha/freebsd.h: Remove.
18807 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
18809         PR other/69968
18810         * spellcheck-tree.c (levenshtein_distance): Rename to...
18811         (get_edit_distance): ...this, and update for underlying renaming.
18812         * spellcheck-tree.h (levenshtein_distance): Rename to...
18813         (get_edit_distance): ...this.
18814         * spellcheck.c (levenshtein_distance): Rename to...
18815         (get_edit_distance): ...this.  Convert from Levenshtein distance
18816         to Damerau-Levenshtein distance by supporting transpositions of
18817         adjacent characters.  Rename "v1" to "v_next" and "v0" to
18818         "v_one_ago".
18819         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
18820         (selftest::test_edit_distance_unit_test_oneway): ...this, and
18821         update for underlying renaming.
18822         (selftest::levenshtein_distance_unit_test): Rename to...
18823         (selftest::test_get_edit_distance_unit): ...this, and update for
18824         underlying renaming.
18825         (selftest::test_find_closest_string): Add example from PR 69968
18826         where transposition helps
18827         (selftest::test_metric_conditions): Update for renaming.
18828         (selftest::test_metric_conditions): Likewise.
18829         (selftest::spellcheck_c_tests): Likewise.
18830         * spellcheck.h (levenshtein_distance): Rename both overloads to...
18831         (get_edit_distance): ...this.
18832         (best_match::consider): Update for renaming.
18834 2018-06-12  Martin Sebor  <msebor@redhat.com>
18836         PR tree-optimization/85259
18837         * builtins.c (compute_objsize): Handle constant offsets.
18838         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
18839         true iff a warning has been issued.
18840         * gimple.h (gimple_nonartificial_location): New function.
18841         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
18842         gimple_nonartificial_location and handle -Wno-system-headers.
18843         (handle_builtin_stxncpy): Same.
18845 2018-06-12  Martin Sebor  <msebor@redhat.com>
18847         PR c/85931
18848         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
18850 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
18852         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
18853         BUILTIN_VEC_XST entries for pointer to double and long long.
18855 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
18857         PR target/85990
18858         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
18859         Update comments.
18860         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
18861         Likewise.
18863 2018-06-12  Martin Liska  <mliska@suse.cz>
18865         * doc/options.texi: Document IntegerRange.
18867 2018-06-12  Martin Liska  <mliska@suse.cz>
18869         * config/i386/i386.opt: Make MPX-related options as Deprecated.
18870         * opt-functions.awk: Handle Deprecated flag.
18871         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
18872         and report error.
18873         (read_cmdline_option): Report warning for a deprecated option.
18874         * opts.h (struct cl_option): Add new field cl_deprecated.
18875         (CL_ERR_DEPRECATED): New.
18877 2018-06-12  Martin Liska  <mliska@suse.cz>
18879         * doc/options.texi: Document Deprecated option flag.
18881 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
18883         * config/arc/arc-arch.h (arc_extras): New enum.
18884         (arc_cpu_t):Add field extra.
18885         (arc_cpu_types): Consider the extras.
18886         * config/arc/arc-cpus.def: Add extras info.
18887         * config/arc/arc-opts.h (processor_type): Consider extra field.
18888         * config/arc/arc.c (arc_override_options): Handle extra field.
18890 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
18892         * config/arc/arc-arch.h: Update ARC_OPTX macro.
18893         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
18894         field.
18895         * config/arc/arc.c (arc_init): Update pic warning.
18896         (irq_range): Update irq range parsing warnings.
18897         (arc_override_options): Update various warning messages.
18898         (arc_handle_aux_attribute): Likewise.
18900 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
18902         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
18904 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
18906         * doc/sourcebuild.texi: Document usage of line number 0 in verify
18907         compiler messages directives.
18909 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
18911         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
18912         * config/mips/mips-tables.opt: Regenerate.
18913         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
18914         mips64r6.
18915         * doc/invoke.texi: Document -march=i6500.
18917 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
18919         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
18920         (i6400_gpmul): Add cpu_unit.
18921         (i6400_gpdiv): Likewise.
18922         (i6400_msa_add_d): Update reservations.
18923         (i6400_msa_int_add) Likewise.
18924         (i6400_msa_short_logic3) Likewise.
18925         (i6400_msa_short_logic2) Likewise.
18926         (i6400_msa_short_logic) Likewise.
18927         (i6400_msa_move) Likewise.
18928         (i6400_msa_cmp) Likewise.
18929         (i6400_msa_short_float2) Likewise.
18930         (i6400_msa_div_d) Likewise.
18931         (i6400_msa_long_logic1) Likewise.
18932         (i6400_msa_long_logic2) Likewise.
18933         (i6400_msa_mult) Likewise.
18934         (i6400_msa_long_float2) Likewise.
18935         (i6400_msa_long_float4) Likewise.
18936         (i6400_msa_long_float5) Likewise.
18937         (i6400_msa_long_float8) Likewise.
18938         (i6400_fpu_fadd): Include frint type.
18939         (i6400_fpu_store): New define_insn_reservation.
18940         (i6400_fpu_load): Likewise.
18941         (i6400_fpu_move): Likewise.
18942         (i6400_fpu_fcmp): Likewise.
18943         (i6400_fpu_fmadd): Likewise.
18944         (i6400_int_mult): Include imul3nc type and update reservation.
18945         (i6400_int_div): Include idiv3 type and update reservation.
18946         (i6400_int_load): Update to check type not move_type.
18947         (i6400_int_store): Likewise.
18948         (i6400_int_prefetch): Set zero latency.
18950 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
18952         * gcc.c: Document new %@{...} sequence.
18953         (LINK_COMMAND_SPEC): Use it for the -L switches.
18954         (cpp_unique_options): Use it for the -I switches.
18955         (at_file_argbuf): New global variable.
18956         (in_at_file): Likewise.
18957         (alloc_args): Create at_file_argbuf.
18958         (clear_args): Truncate at_file_argbuf.
18959         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
18960         (open_at_file): New function.
18961         (close_at_file): Likewise.
18962         (create_at_file): Delete.
18963         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
18964         <'o'>: Likewise.
18965         <'@'>: New case.
18966         (validate_switches_from_spec): Deal with %@{...} sequence.
18967         (validate_switches): Likewise.
18968         (driver::finalize): Call clear_args.
18970 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
18972         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
18974 2018-06-11  Martin Sebor  <msebor@redhat.com>
18976         * doc/invoke.texi (-Wall): List -Wc++17-compat.
18977         (Wno-class-memaccess): Add @opindex.
18978         (Wno-templates, Wno-multiple-inheritance): Same.
18979         (Wno-virtual-inheritance, Wno-namespaces): Same.
18980         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
18981         (Wno-format-overflow, Wno-format-truncation): Same.
18982         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
18983         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
18984         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
18985         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
18986         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
18987         (Wno-misspelled-isr): Same.
18989 2018-06-11  Martin Sebor  <msebor@redhat.com>
18991         * PR tree-optimization/86083
18992         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
18994 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
18996         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
18998 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
19000         PR target/85755
19001         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
19002         on the correct operand.
19003         (*movdi_internal64): Ditto.
19005 2018-06-11  Martin Liska  <mliska@suse.cz>
19007         PR tree-optimization/86089
19008         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
19010 2018-06-11  Julia Koval  <julia.koval@intel.com>
19012         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
19013         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
19014         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
19016 2018-06-11  Olivier Hainque  <hainque@adacore.com>
19018         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
19019         for Ada with strict dwarf2.
19021 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
19023         PR target/85755
19024         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
19025         addresses.
19027 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
19029         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
19031 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
19033         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
19034         TARGET_ELF.
19036 2018-06-08  Martin Liska  <mliska@suse.cz>
19038         * tree-cfg.h (debug_function): Fix argument type to match
19039         implementation.
19041 2018-06-08  Martin Liska  <mliska@suse.cz>
19043         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
19044         Remove usage of MPX-related (and removed) fields.
19045         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
19047 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
19049         * cfg.c (debug): Use TDF_NONE rather than 0.
19050         * cfghooks.c (debug): Likewise.
19051         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
19052         (struct dump_option_value_info): Convert to...
19053         (struct kv_pair): ...this template type.
19054         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
19055         rather than 0.
19056         (optinfo_verbosity_options): Likewise.
19057         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
19058         OPTGROUP_NONE.
19059         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
19060         than int for "optgroup_flags" param.
19061         (dump_generic_expr_loc): Use dump_flags_t rather than int for
19062         "dump_kind" param.
19063         (dump_dec): Likewise.
19064         (dump_finish): Use TDF_NONE rather than 0.
19065         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
19066         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
19067         than 0.  Update for change to option_ptr.
19068         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
19069         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
19070         0.  Update for changes to optinfo_verbosity_options and
19071         optgroup_options.
19072         (opt_info_switch_p): Convert optgroup_flags from int to
19073         optgroup_flags_t.
19074         (dump_basic_block): Use dump_flags_t rather than int
19075         for "dump_kind" param.
19076         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
19077         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
19078         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
19079         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
19080         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
19081         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
19082         TDF_NONE): Convert from macros to...
19083         (enum dump_flag): ...this new enum.
19084         (dump_flags_t): Update to use enum.
19085         (operator|, operator&, operator~, operator|=, operator&=):
19086         Implement for dump_flags_t.
19087         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
19088         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
19089         Convert from macros to...
19090         (enum optgroup_flag): ...this new enum.
19091         (optgroup_flags_t): New typedef.
19092         (operator|, operator|=): Implement for optgroup_flags_t.
19093         (struct dump_file_info): Convert field "alt_flags" to
19094         dump_flags_t.  Convert field "optgroup_flags" to
19095         optgroup_flags_t.
19096         (dump_basic_block): Use dump_flags_t rather than int for param.
19097         (dump_generic_expr_loc): Likewise.
19098         (dump_dec): Likewise.
19099         (dump_register): Convert param "optgroup_flags" to
19100         optgroup_flags_t.
19101         (opt_info_enable_passes): Likewise.
19102         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
19103         than 0.
19104         * gimple-pretty-print.c (debug): Likewise.
19105         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
19106         (merged_store_group::apply_stores): Likewise.
19107         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
19108         * gimple.c (verify_gimple_pp): Likewise.
19109         * graphite-poly.c (print_pbb_body): Likewise.
19110         * passes.c (pass_manager::register_one_dump_file): Convert
19111         local "optgroup_flags" to optgroup_flags_t.
19112         * print-tree.c (print_node): Use TDF_NONE rather than 0.
19113         (debug): Likewise.
19114         (debug_body): Likewise.
19115         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
19116         to optgroup_flags_t.
19117         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
19118         than 0.
19119         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
19120         (convert_mult_to_fma): Likewise.
19121         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
19122         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
19123         * tree-vect-data-refs.c (dump_lower_bound): Convert param
19124         "dump_kind" to dump_flags_t.
19126 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
19128         * config/rs6000/rs6000.c (min, max): Delete.
19130 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
19132         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
19133         -mabi=spe and -mabi=no-spe.
19135 2018-06-08  Martin Liska  <mliska@suse.cz>
19137         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
19138         where we expect an existing summary.
19140 2018-06-08  Martin Liska  <mliska@suse.cz>
19142         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
19143         * ipa-inline.h (estimate_edge_growth): Likewise.
19145 2018-06-08  Martin Liska  <mliska@suse.cz>
19147         * cgraph.c (function_version_hasher::hash): Use
19148         cgraph_node::get_uid ().
19149         (function_version_hasher::equal):
19150         * cgraph.h (cgraph_node::get_uid): New method.
19151         * ipa-inline.c (update_caller_keys): Use
19152         cgraph_node::get_uid ().
19153         (update_callee_keys): Likewise.
19154         * ipa-utils.c (searchc): Likewise.
19155         (ipa_reduced_postorder): Likewise.
19156         * lto-cgraph.c (input_node): Likewise.
19157         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
19158         * symbol-summary.h (symtab_insertion): Likewise.
19159         (symtab_removal): Likewise.
19160         (symtab_duplication): Likewise.
19161         * tree-pretty-print.c (dump_function_header): Likewise.
19162         * tree-sra.c (convert_callers_for_node): Likewise.
19164 2018-06-08  Martin Liska  <mliska@suse.cz>
19166         * cgraph.c (symbol_table::create_edge): Always assign a new
19167         unique number.
19168         (symbol_table::free_edge): Do not recycle numbers.
19169         * cgraph.h (cgraph_edge::get): New method.
19170         * symbol-summary.h (symtab_removal): Use it.
19171         (symtab_duplication): Likewise.
19172         (call_summary::hashable_uid): Remove.
19174 2018-06-08  Martin Liska  <mliska@suse.cz>
19176         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
19177         (initialize_growth_caches): Remove.
19178         (free_growth_caches): Likewise.
19179         (do_estimate_edge_time): Use edge_growth_cache.
19180         (do_estimate_edge_size): Likewise.
19181         (do_estimate_edge_hints): Likewise.
19182         * ipa-inline.c (reset_edge_caches): Likewise.
19183         (recursive_inlining): Likewise.
19184         (inline_small_functions): Likewise.
19185         * ipa-inline.h (initialize_growth_caches): Remove.
19186         (estimate_edge_size): Likewise.
19187         (estimate_edge_time): Likewise.
19188         (estimate_edge_hints): Likewise.
19189         (reset_edge_growth_cache): Likewise.
19190         * symbol-summary.h (call_summary::remove): New method.
19192 2018-06-08  Martin Liska  <mliska@suse.cz>
19194         * ipa-cp.c (class edge_clone_summary): New summary.
19195         (grow_edge_clone_vectors): Remove.
19196         (ipcp_edge_duplication_hook): Remove.
19197         (class edge_clone_summary_t): New call_summary class.
19198         (ipcp_edge_removal_hook): Remove.
19199         (edge_clone_summary_t::duplicate): New function.
19200         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
19201         (create_specialized_node): Likewise.
19202         (ipcp_driver): Initialize edge_clone_summaries and do not
19203         register hooks.
19205 2018-06-08  Martin Liska  <mliska@suse.cz>
19207         * symbol-summary.h (get): New function.
19208         (call_summary::m_initialize_when_cloning): New class member.
19210 2018-06-08  Martin Liska  <mliska@suse.cz>
19212         * cgraph.c (cgraph_node::remove): Do not recycle uid.
19213         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
19214         (symbol_table::allocate_cgraph_symbol): Do not set uid.
19215         * passes.c (uid_hash_t): Record removed_nodes by their uids.
19216         (remove_cgraph_node_from_order): Use the removed_nodes set.
19217         (do_per_function_toporder): Likwise.
19218         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
19219         instead of summary_uid.
19220         (symtab_removal): Likewise.
19221         (symtab_duplication): Likewise.
19223 2018-06-08  Martin Liska  <mliska@suse.cz>
19225         * ipa-cp.c (ipcp_store_bits_results): Use
19226         ipcp_transformation_sum.
19227         (ipcp_store_vr_results): Likewise.
19228         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
19229         to ...
19230         (ipcp_transformation_initialize): ... this.
19231         (ipa_set_node_agg_value_chain):
19232         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
19233         (write_ipcp_transformation_info): Likewise.
19234         (read_ipcp_transformation_info): Likewise.
19235         (ipcp_update_bits): Likewise.
19236         (ipcp_update_vr): Likewise.
19237         (ipcp_transform_function): Likewise.
19238         * ipa-prop.h: Rename ipcp_transformation_summary to
19239         ipcp_transformation.
19240         (class ipcp_transformation_t): New function summary.
19241         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
19242         (ipa_get_agg_replacements_for_node): Likewise.
19244 2018-06-08  Martin Liska  <mliska@suse.cz>
19246         * ipa-pure-const.c (struct funct_state_d): Do it class instead
19247         of struct.
19248         (class funct_state_summary_t): New function_summary class.
19249         (has_function_state): Remove.
19250         (get_function_state): Likewise.
19251         (set_function_state): Likewise.
19252         (add_new_function): Likewise.
19253         (funct_state_summary_t::insert): New function.
19254         (duplicate_node_data): Remove.
19255         (remove_node_data): Remove.
19256         (funct_state_summary_t::duplicate): New function.
19257         (register_hooks): Create new funct_state_summaries.
19258         (pure_const_generate_summary): Use it.
19259         (pure_const_write_summary): Likewise.
19260         (pure_const_read_summary): Likewise.
19261         (propagate_pure_const): Likewise.
19262         (propagate_nothrow): Likewise.
19263         (dump_malloc_lattice): Likewise.
19264         (propagate_malloc): Likewise.
19265         (execute): Do not register hooks, just remove summary
19266         instead.
19267         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
19268         constructor.
19270 2018-06-08  Martin Liska  <mliska@suse.cz>
19272         * ipa-reference.c (remove_node_data): Remove.
19273         (duplicate_node_data): Likewise.
19274         (class ipa_ref_var_info_summary_t): New class.
19275         (class ipa_ref_opt_summary_t): Likewise.
19276         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
19277         (get_reference_optimization_summary): Use
19278         ipa_ref_opt_sum_summaries.
19279         (set_reference_vars_info): Remove.
19280         (set_reference_optimization_summary): Likewise.
19281         (ipa_init): Create summaries.
19282         (init_function_info): Use function summary.
19283         (ipa_ref_opt_summary_t::duplicate): New function.
19284         (ipa_ref_opt_summary_t::remove): New function.
19285         (get_read_write_all_from_node): Fix GNU coding style.
19286         (propagate): Use function summary.
19287         (write_node_summary_p): Fix GNU coding style.
19288         (stream_out_bitmap): Likewise.
19289         (ipa_reference_read_optimization_summary): Use function summary.
19290         (ipa_reference_c_finalize): Do not release hooks.
19292 2018-06-08  Martin Liska  <mliska@suse.cz>
19294         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
19295         (analyze_function_body): Extract multiple calls of get_create.
19296         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
19297         * ipa-inline.c (recursive_inlining): Use ::get method.
19298         * ipa-inline.h (estimate_edge_growth): Likewise.
19300 2018-06-08  Martin Liska  <mliska@suse.cz>
19302         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
19303         HSA_INVALID.
19304         (hsa_function_summary::hsa_function_summary): Use the new enum
19305         value.
19306         (hsa_gpu_implementation_p): Use hsa_summaries::get.
19307         * hsa-gen.c (hsa_get_host_function): Likewise.
19308         (get_brig_function_name): Likewise.
19309         * ipa-hsa.c (process_hsa_functions): Likewise.
19310         (ipa_hsa_write_summary): Likewise.
19311         * symbol-summary.h (symtab_duplication): Use ::get function/
19312         (get): New function.
19314 2018-06-08  Martin Liska  <mliska@suse.cz>
19316         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
19317         of get.
19318         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
19319         (hsa_register_kernel): Likewise.
19320         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
19321         * hsa-gen.c (hsa_get_host_function): Likewise.
19322         (get_brig_function_name): Likewise.
19323         (generate_hsa): Likewise.
19324         (pass_gen_hsail::execute): Likewise.
19325         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
19326         (devirtualization_time_bonus): Likewise.
19327         (ipcp_propagate_stage): Likewise.
19328         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
19329         (edge_set_predicate): Likewise.
19330         (evaluate_conditions_for_known_args): Likewise.
19331         (evaluate_properties_for_edge): Likewise.
19332         (ipa_fn_summary::reset): Likewise.
19333         (ipa_fn_summary_t::duplicate): Likewise.
19334         (dump_ipa_call_summary): Likewise.
19335         (ipa_dump_fn_summary): Likewise.
19336         (analyze_function_body): Likewise.
19337         (compute_fn_summary): Likewise.
19338         (estimate_edge_devirt_benefit): Likewise.
19339         (estimate_edge_size_and_time): Likewise.
19340         (estimate_calls_size_and_time): Likewise.
19341         (estimate_node_size_and_time): Likewise.
19342         (inline_update_callee_summaries): Likewise.
19343         (remap_edge_change_prob): Likewise.
19344         (remap_edge_summaries): Likewise.
19345         (ipa_merge_fn_summary_after_inlining): Likewise.
19346         (ipa_update_overall_fn_summary): Likewise.
19347         (read_ipa_call_summary): Likewise.
19348         (inline_read_section): Likewise.
19349         (write_ipa_call_summary): Likewise.
19350         (ipa_fn_summary_write): Likewise.
19351         (ipa_free_fn_summary): Likewise.
19352         * ipa-hsa.c (process_hsa_functions): Likewise.
19353         (ipa_hsa_write_summary): Likewise.
19354         (ipa_hsa_read_section): Likewise.
19355         * ipa-icf.c (sem_function::merge): Likewise.
19356         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
19357         (do_estimate_edge_time): Likewise.
19358         (estimate_size_after_inlining): Likewise.
19359         (estimate_growth): Likewise.
19360         (growth_likely_positive): Likewise.
19361         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
19362         (inline_call): Likewise.
19363         * ipa-inline.c (caller_growth_limits): Likewise.
19364         (can_inline_edge_p): Likewise.
19365         (can_inline_edge_by_limits_p): Likewise.
19366         (compute_uninlined_call_time): Likewise.
19367         (compute_inlined_call_time): Likewise.
19368         (want_inline_small_function_p): Likewise.
19369         (edge_badness): Likewise.
19370         (update_caller_keys): Likewise.
19371         (update_callee_keys): Likewise.
19372         (recursive_inlining): Likewise.
19373         (inline_small_functions): Likewise.
19374         (inline_to_all_callers_1): Likewise.
19375         (dump_overall_stats): Likewise.
19376         (early_inline_small_functions): Likewise.
19377         (early_inliner): Likewise.
19378         * ipa-inline.h (estimate_edge_growth): Likewise.
19379         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
19380         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
19381         * ipa-prop.h (IPA_NODE_REF): Likewise.
19382         (IPA_EDGE_REF): Likewise.
19383         * ipa-pure-const.c (malloc_candidate_p): Likewise.
19384         (propagate_malloc): Likewise.
19385         * ipa-split.c (execute_split_functions): Likewise.
19386         * symbol-summary.h: Rename get to get_create.
19387         (get): Likewise.
19388         (get_create): Likewise.
19389         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
19391 2018-06-08  Martin Liska  <mliska@suse.cz>
19393         * symbol-summary.h (release): Move definition out of class
19394         declaration.
19395         (symtab_removal): Likewise.
19396         (symtab_duplication): Likewise.
19398 2018-06-08  Martin Liska  <mliska@suse.cz>
19400         * symbol-summary.h (function_summary): Move constructor
19401         implementation out of class declaration.
19402         (release): Likewise.
19403         (symtab_insertion): Likewise.
19404         (symtab_removal): Likewise.
19405         (symtab_duplication): Likewise.
19406         (get): Likewise.
19408 2018-06-08  Martin Liska  <mliska@suse.cz>
19410         * Makefile.in: Remove support for MPX (macros, related functions,
19411         fields in cgraph_node, ...).
19412         * builtin-types.def (BT_BND): Likewise.
19413         (BT_FN_BND_CONST_PTR): Likewise.
19414         (BT_FN_CONST_PTR_BND): Likewise.
19415         (BT_FN_VOID_PTR_BND): Likewise.
19416         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
19417         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
19418         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
19419         (expand_builtin_mempcpy_with_bounds): Likewise.
19420         (expand_builtin_memset_with_bounds): Likewise.
19421         (expand_builtin_memset_args): Likewise.
19422         (std_expand_builtin_va_start): Likewise.
19423         (expand_builtin): Likewise.
19424         (expand_builtin_with_bounds): Likewise.
19425         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
19426         (DEF_LIB_BUILTIN_CHKP): Likewise.
19427         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
19428         (DEF_CHKP_BUILTIN): Likewise.
19429         (BUILT_IN_MEMCPY): Likewise.
19430         (BUILT_IN_MEMMOVE): Likewise.
19431         (BUILT_IN_MEMPCPY): Likewise.
19432         (BUILT_IN_MEMSET): Likewise.
19433         (BUILT_IN_STPCPY): Likewise.
19434         (BUILT_IN_STRCAT): Likewise.
19435         (BUILT_IN_STRCHR): Likewise.
19436         (BUILT_IN_STRCPY): Likewise.
19437         (BUILT_IN_STRLEN): Likewise.
19438         (BUILT_IN_MEMCPY_CHK): Likewise.
19439         (BUILT_IN_MEMMOVE_CHK): Likewise.
19440         (BUILT_IN_MEMPCPY_CHK): Likewise.
19441         (BUILT_IN_MEMSET_CHK): Likewise.
19442         (BUILT_IN_STPCPY_CHK): Likewise.
19443         (BUILT_IN_STRCAT_CHK): Likewise.
19444         (BUILT_IN_STRCPY_CHK): Likewise.
19445         * calls.c (store_bounds): Likewise.
19446         (emit_call_1): Likewise.
19447         (special_function_p): Likewise.
19448         (maybe_warn_nonstring_arg): Likewise.
19449         (initialize_argument_information): Likewise.
19450         (finalize_must_preallocate): Likewise.
19451         (compute_argument_addresses): Likewise.
19452         (expand_call): Likewise.
19453         * cfgexpand.c (expand_call_stmt): Likewise.
19454         (expand_return): Likewise.
19455         (expand_gimple_stmt_1): Likewise.
19456         (pass_expand::execute): Likewise.
19457         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
19458         (cgraph_node::remove): Likewise.
19459         (cgraph_node::dump): Likewise.
19460         (cgraph_node::verify_node): Likewise.
19461         * cgraph.h (chkp_function_instrumented_p): Likewise.
19462         (symtab_node::get_alias_target): Likewise.
19463         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
19464         (cgraph_local_p): Likewise.
19465         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
19466         (cgraph_edge::rebuild_references): Likewise.
19467         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
19468         (walk_polymorphic_call_targets): Likewise.
19469         (cgraph_node::expand_thunk): Likewise.
19470         (symbol_table::output_weakrefs): Likewise.
19471         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
19472         (ix86_handle_option): Likewise.
19473         * config/i386/constraints.md: Likewise.
19474         * config/i386/i386-builtin-types.def (BND): Likewise.
19475         (VOID): Likewise.
19476         (PVOID): Likewise.
19477         (ULONG): Likewise.
19478         * config/i386/i386-builtin.def (BDESC_END): Likewise.
19479         (BDESC_FIRST): Likewise.
19480         (BDESC): Likewise.
19481         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
19482         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
19483         * config/i386/i386.c (enum reg_class): Likewise.
19484         (ix86_target_string): Likewise.
19485         (ix86_option_override_internal): Likewise.
19486         (ix86_conditional_register_usage): Likewise.
19487         (ix86_valid_target_attribute_inner_p): Likewise.
19488         (ix86_set_indirect_branch_type): Likewise.
19489         (ix86_set_current_function): Likewise.
19490         (ix86_function_arg_regno_p): Likewise.
19491         (init_cumulative_args): Likewise.
19492         (ix86_function_arg_advance): Likewise.
19493         (ix86_function_arg): Likewise.
19494         (ix86_pass_by_reference): Likewise.
19495         (ix86_function_value_regno_p): Likewise.
19496         (ix86_function_value_1): Likewise.
19497         (ix86_function_value_bounds): Likewise.
19498         (ix86_return_in_memory): Likewise.
19499         (ix86_setup_incoming_vararg_bounds): Likewise.
19500         (ix86_va_start): Likewise.
19501         (indirect_thunk_need_prefix): Likewise.
19502         (print_reg): Likewise.
19503         (ix86_print_operand): Likewise.
19504         (ix86_expand_call): Likewise.
19505         (ix86_output_function_return): Likewise.
19506         (reg_encoded_number): Likewise.
19507         (BDESC_VERIFYS): Likewise.
19508         (ix86_init_mpx_builtins): Likewise.
19509         (ix86_init_builtins): Likewise.
19510         (ix86_emit_cmove): Likewise.
19511         (ix86_emit_move_max): Likewise.
19512         (ix86_expand_builtin): Likewise.
19513         (ix86_builtin_mpx_function): Likewise.
19514         (ix86_get_arg_address_for_bt): Likewise.
19515         (ix86_load_bounds): Likewise.
19516         (ix86_store_bounds): Likewise.
19517         (ix86_load_returned_bounds): Likewise.
19518         (ix86_store_returned_bounds): Likewise.
19519         (ix86_class_likely_spilled_p): Likewise.
19520         (ix86_hard_regno_mode_ok): Likewise.
19521         (x86_order_regs_for_local_alloc): Likewise.
19522         (ix86_mitigate_rop): Likewise.
19523         (ix86_bnd_prefixed_insn_p): Likewise.
19524         (ix86_mpx_bound_mode): Likewise.
19525         (ix86_make_bounds_constant): Likewise.
19526         (ix86_initialize_bounds): Likewise.
19527         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
19528         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
19529         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
19530         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
19531         (TARGET_CHKP_BOUND_MODE): Likewise.
19532         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
19533         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
19534         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
19535         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
19536         * config/i386/i386.h (TARGET_MPX): Likewise.
19537         (TARGET_MPX_P): Likewise.
19538         (VALID_BND_REG_MODE): Likewise.
19539         (FIRST_BND_REG): Likewise.
19540         (LAST_BND_REG): Likewise.
19541         (enum reg_class): Likewise.
19542         (BND_REG_P): Likewise.
19543         (BND_REGNO_P): Likewise.
19544         (BNDmode): Likewise.
19545         (ADJUST_INSN_LENGTH): Likewise.
19546         * config/i386/i386.md: Likewise.
19547         * config/i386/i386.opt: Likewise.
19548         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
19549         (defined): Likewise.
19550         (LINK_MPX): Likewise.
19551         (MPX_SPEC): Likewise.
19552         (LIBMPX_SPEC): Likewise.
19553         (LIBMPXWRAPPERS_SPEC): Likewise.
19554         (CHKP_SPEC): Likewise.
19555         * config/i386/predicates.md: Likewise.
19556         * dbxout.c (dbxout_type): Likewise.
19557         * doc/extend.texi: Likewise.
19558         * doc/invoke.texi: Likewise.
19559         * doc/md.texi: Likewise.
19560         * doc/tm.texi: Likewise.
19561         * doc/tm.texi.in: Likewise.
19562         * dwarf2out.c (is_base_type): Likewise.
19563         (gen_formal_types_die): Likewise.
19564         (gen_subprogram_die): Likewise.
19565         (gen_type_die_with_usage): Likewise.
19566         (gen_decl_die): Likewise.
19567         (dwarf2out_late_global_decl): Likewise.
19568         * expr.c (expand_assignment): Likewise.
19569         (emit_storent_insn): Likewise.
19570         (store_expr_with_bounds): Likewise.
19571         (store_expr): Likewise.
19572         (expand_expr_real_1): Likewise.
19573         * expr.h (store_expr_with_bounds): Likewise.
19574         * function.c (use_register_for_decl): Likewise.
19575         (struct bounds_parm_data): Likewise.
19576         (assign_parms_augmented_arg_list): Likewise.
19577         (assign_parm_find_entry_rtl): Likewise.
19578         (assign_parm_is_stack_parm): Likewise.
19579         (assign_parm_load_bounds): Likewise.
19580         (assign_bounds): Likewise.
19581         (assign_parms): Likewise.
19582         (expand_function_start): Likewise.
19583         * gcc.c (CHKP_SPEC): Likewise.
19584         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
19585         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
19586         (wrestrict_dom_walker::check_call): Likewise.
19587         * gimple.c (gimple_build_call_from_tree): Likewise.
19588         * gimple.h (enum gf_mask): Likewise.
19589         (gimple_call_with_bounds_p): Likewise.
19590         (gimple_call_set_with_bounds): Likewise.
19591         * gimplify.c (gimplify_init_constructor): Likewise.
19592         * ipa-cp.c (initialize_node_lattices): Likewise.
19593         (propagate_constants_across_call): Likewise.
19594         (find_more_scalar_values_for_callers_subset): Likewise.
19595         * ipa-hsa.c (process_hsa_functions): Likewise.
19596         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
19597         * ipa-icf.c (sem_function::merge): Likewise.
19598         * ipa-inline.c (early_inliner): Likewise.
19599         * ipa-pure-const.c (warn_function_noreturn): Likewise.
19600         (warn_function_cold): Likewise.
19601         (propagate_pure_const): Likewise.
19602         * ipa-ref.h (enum GTY): Likewise.
19603         * ipa-split.c (find_retbnd): Likewise.
19604         (consider_split): Likewise.
19605         (split_function): Likewise.
19606         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
19607         * ipa.c (walk_polymorphic_call_targets): Likewise.
19608         (symbol_table::remove_unreachable_nodes): Likewise.
19609         (process_references): Likewise.
19610         (cgraph_build_static_cdtor_1): Likewise.
19611         * lto-cgraph.c (lto_output_node): Likewise.
19612         (output_refs): Likewise.
19613         (compute_ltrans_boundary): Likewise.
19614         (input_overwrite_node): Likewise.
19615         (input_node): Likewise.
19616         (input_cgraph_1): Likewise.
19617         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
19618         * passes.c (pass_manager::execute_early_local_passes): Likewise.
19619         (class pass_chkp_instrumentation_passes): Likewise.
19620         (make_pass_chkp_instrumentation_passes): Likewise.
19621         * passes.def: Likewise.
19622         * rtl.h (struct GTY): Likewise.
19623         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
19624         * stor-layout.c (layout_type): Likewise.
19625         * symtab.c: Likewise.
19626         * target.def: Likewise.
19627         * targhooks.c (default_chkp_bound_type): Likewise.
19628         (default_chkp_bound_mode): Likewise.
19629         (default_builtin_chkp_function): Likewise.
19630         (default_chkp_function_value_bounds): Likewise.
19631         (default_chkp_make_bounds_constant): Likewise.
19632         (default_chkp_initialize_bounds): Likewise.
19633         * targhooks.h (default_chkp_bound_type): Likewise.
19634         (default_chkp_bound_mode): Likewise.
19635         (default_builtin_chkp_function): Likewise.
19636         (default_chkp_function_value_bounds): Likewise.
19637         (default_chkp_make_bounds_constant): Likewise.
19638         (default_chkp_initialize_bounds): Likewise.
19639         * toplev.c (compile_file): Likewise.
19640         (process_options): Likewise.
19641         * tree-core.h (DEF_BUILTIN): Likewise.
19642         (DEF_BUILTIN_CHKP): Likewise.
19643         * tree-inline.c (declare_return_variable): Likewise.
19644         (remap_gimple_stmt): Likewise.
19645         (copy_bb): Likewise.
19646         (initialize_inlined_parameters): Likewise.
19647         (expand_call_inline): Likewise.
19648         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
19649         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
19650         (make_pass_ipa_chkp_produce_thunks): Likewise.
19651         (make_pass_chkp): Likewise.
19652         (make_pass_chkp_opt): Likewise.
19653         (make_pass_chkp_instrumentation_passes): Likewise.
19654         * tree-pretty-print.c (dump_generic_node): Likewise.
19655         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
19656         * tree-ssa-dce.c (propagate_necessity): Likewise.
19657         (eliminate_unnecessary_stmts): Likewise.
19658         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
19659         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
19660         * tree-ssa-sccvn.h: Likewise.
19661         * tree-ssa-strlen.c (get_string_length): Likewise.
19662         (valid_builtin_call): Likewise.
19663         (adjust_last_stmt): Likewise.
19664         (handle_builtin_strchr): Likewise.
19665         (handle_builtin_strcpy): Likewise.
19666         (handle_builtin_stxncpy): Likewise.
19667         (handle_builtin_memcpy): Likewise.
19668         (handle_builtin_strcat): Likewise.
19669         (strlen_check_and_optimize_stmt): Likewise.
19670         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
19671         * tree-streamer-in.c: Likewise.
19672         * tree-streamer.c (record_common_node): Likewise.
19673         * tree.c (tree_code_size): Likewise.
19674         (wide_int_to_tree_1): Likewise.
19675         (type_contains_placeholder_1): Likewise.
19676         (build_common_tree_nodes): Likewise.
19677         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
19678         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
19679         (POINTER_BOUNDS_P): Likewise.
19680         (BOUNDED_TYPE_P): Likewise.
19681         (BOUNDED_P): Likewise.
19682         (CALL_WITH_BOUNDS_P): Likewise.
19683         (pointer_bounds_type_node): Likewise.
19684         * value-prof.c (gimple_ic): Likewise.
19685         * var-tracking.c (vt_add_function_parameters): Likewise.
19686         * varasm.c (make_decl_rtl): Likewise.
19687         (assemble_start_function): Likewise.
19688         (output_constant): Likewise.
19689         (maybe_assemble_visibility): Likewise.
19690         * varpool.c (ctor_for_folding): Likewise.
19691         * chkp-builtins.def: Remove.
19692         * ipa-chkp.c: Remove.
19693         * ipa-chkp.h: Remove.
19694         * rtl-chkp.c: Remove.
19695         * rtl-chkp.h: Remove.
19696         * tree-chkp-opt.c: Remove.
19697         * tree-chkp.c: Remove.
19698         * tree-chkp.h: Remove.
19700 2018-06-07  Carl Love  <cel@us.ibm.com>
19702         * config/rs6000/vsx.md (vextract_fp_from_shorth,
19703         vextract_fp_from_shortl): Add BE support.
19705 2018-06-07  Paul Koning  <ni1d@arrl.net>
19707         * compare-elim.c (try_merge_compare): Don't merge compare if
19708         address contains a side effect.
19709         (try_eliminate_compare): Likewise.
19711 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
19713         * config.gcc: Support "tremont".
19714         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
19715         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19716         PROCESSOR_TREMONT.
19717         * config/i386/i386.c (m_TREMONT): Define.
19718         (processor_target_table): Add "tremont".
19719         (PTA_TREMONT): Define.
19720         (ix86_lea_outperforms): Add TARGET_TREMONT.
19721         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
19722         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
19723         and M_INTEL_GOLDMONT_PLUS.
19724         (fold_builtin_cpu): Add "tremont".
19725         (ix86_add_stmt_cost): Add TARGET_TREMONT.
19726         (ix86_option_override_internal): Add "tremont".
19727         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
19728         (processor_type): Add PROCESSOR_TREMONT.
19729         * config/i386/x86-tune.def: Add m_TREMONT.
19730         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
19732 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
19734         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
19735         symbol defined for msp430i* devices to be lower case.
19737 2018-06-07  Richard Biener  <rguenther@suse.de>
19739         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
19740         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
19741         Properly wrap signed arithmetic if overflow wraps.
19743 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
19745         PR tree-optimization/69615
19746         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
19747         of a cast from a same precision integral SSA_NAME in a bb dominated
19748         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
19749         cast to utype if rhs2 has already a compatible type.
19751 2018-06-07  Richard Biener  <rguenther@suse.de>
19753         PR tree-optimization/85935
19754         * graphite-scop-detection.c (find_params_in_bb): Analyze
19755         condition operands with respect to the correct loop.  Assert
19756         the analysis doesn't fail.
19758 2018-06-04  Carl Love  <cel@us.ibm.com>
19760         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
19761         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
19762         as it is slightly cheaper.
19763         (first_match_or_eos_index_<mode>):
19764         Calculate index using natural element order.
19765         (first_match_index_<mode>):
19766         Calculate index using natural element order.
19767         (first_match_or_eos_index_<mode>):
19768         Calculate index using natural order.
19769         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
19770         for BE and LE modes.
19771         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
19772         P9V_BUILTIN_VCLZLSBB_V16QI.
19773         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
19774         specific.
19776 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19778         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
19779         indentation and line wrap for many prototypes.  Add missing
19780         @smallexample directives around block of prototypes for vec_xl and
19781         vec_xst.
19783 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
19785         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
19786         track if we pass or return IEEE 128-bit floating point.
19787         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
19788         C++ mangling that is compatible with GCC 8.1.
19789         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
19790         (init_cumulative_args): Note if we pass or return IEEE 128-bit
19791         floating point types.
19792         (rs6000_function_arg_advance_1): Likewise.
19793         (rs6000_mangle_type): Optionally generate mangled names that match
19794         what GCC 8.1 generated for IEEE 128-bit floating point types.
19795         (rs6000_globalize_decl_name): If we have an external function that
19796         passes or returns IEEE 128-bit types, generate a weak reference
19797         from the mangled name used in GCC 8.1 to the current mangled
19798         name.
19799         (rs6000_init_builtins): Make __ibm128 use the long double type if
19800         long double is IBM extended double.  Make __float128 use the long
19801         double type if long double is IEEE 128-bit.
19803         PR target/85657
19804         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
19805         macro for __ibm128 built-in functions.
19806         (PACK_IF): Add __ibm128 pack/unpack functions.
19807         (UNPACK_IF): Likewise.
19808         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
19809         enable long double built-in functions if long double is IEEE
19810         128-bit floating point.
19811         (rs6000_invalid_builtin): Update long double built-in function
19812         error message.
19813         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
19814         functions, adjust the built-in function to use the long double
19815         built-in function if __ibm128 and long double are the same type.
19816         * doc/extend.texi (PowerPC builtins): Update documention for
19817         __builtin_{,un}pack_longdouble.  Add documentation for
19818         __builtin_{,un}pack_ibm128.
19820 2018-06-06  Jim Wilson  <jimw@sifive.com>
19822         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
19823         (struct machine_function): New field interrupt_mode.
19824         (riscv_handle_type_attribute): New function.  Add forward declaration.
19825         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
19826         (riscv_expand_epilogue): Check interrupt_mode field.
19827         (riscv_set_current_function): Check interrupt attribute args and
19828         set interrupt_mode field.
19829         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
19830         (riscv_sret, riscv_uret): New.
19831         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
19832         new arguments to interrupt attribute.
19834 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
19836         PR target/63177
19837         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
19838         Don't handle -mcpu=power8 if -mpower9-vector is also used.
19840 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19842         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
19843         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
19844         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
19845         several redundant entries.
19847 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
19849         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
19850         type from "rtx" to "rtx_insn *".
19851         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
19852         for local "call_insn", removing cast.
19853         (ix86_expand_call): Likewise, introducing a "call_insn" local.
19855 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
19857         PR tree-optimization/86066
19858         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
19859         for BIT_INSERT_EXPR stores.
19861 2018-06-06  Richard Biener  <rguenther@suse.de>
19863         PR tree-optimization/86062
19864         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
19865         component refs ontop
19866         of to be offsetted base.
19868 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
19870         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
19871         to be static and remove check on interrupt attribute name.
19873 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19875         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
19876         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
19878 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
19880         PR target/79924
19881         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
19882         second argument.
19883         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
19884         Remove second argument, change how error is called.
19885         (aarch64_layout_arg): Remove second argument from
19886         aarch64_err_no_fpadvsimd call.
19887         (aarch64_init_cumulative_args): Ditto.
19888         (aarch64_gimplify_va_arg_expr): Ditto.
19889         * config/aarch64/aarch64.md (mov<mode>): Ditto.
19891 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
19893         * config/i386/i386.md (simple_return_indirect_internal): New expander.
19894         (*simple_return_indirect_internal<mode>): Rename from
19895         simple_return_indirect_internal.  Use W mode iterator.
19896         (rstorssp): New expander.
19897         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
19898         (clrssbsy): New expander.
19899         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
19901 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
19903         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
19904         __typeof__.
19905         (cmse_check_pointed_object): Likewise.
19907 2018-06-05  Martin Liska  <mliska@suse.cz>
19909         PR gcov-profile/47618
19910         * doc/invoke.texi: Document how -fprofile-dir format
19911         is extended.
19913 2018-06-05  Richard Biener  <rguenther@suse.de>
19915         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
19916         removal pretend DOM info isn't available so we do not update
19917         it and only remove edges, not dominated blocks.  Actually free
19918         DOM info in case we removed something.  Remove unreachable blocks.
19919         (mfb_keep_latches): Work with either DOM info or marked backedges.
19920         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
19921         first.  Mark backedges if DOM info isn't available.
19922         (Re-)compute DOM info after cleanup_control_flow_pre.
19924 2018-06-05  Richard Biener  <rguenther@suse.de>
19926         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
19927         (locus_discrim_hasher::hash): Adjust.
19928         (locus_discrim_hasher::equal): Likewise.
19929         (next_discriminator_for_locus): Work on line directly.
19930         (same_line_p): Pass in expanded locus1 as well.
19931         (assign_discriminators): Avoid redundant location expansions.
19933 2018-06-05  Richard Biener  <rguenther@suse.de>
19935         PR tree-optimization/86046
19936         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
19937         if required after clearing TREE_ADDRESSABLE.
19939 2018-06-05  Richard Biener  <rguenther@suse.de>
19941         PR tree-optimization/86047
19942         * tree-ssa-loop.c (for_each_index): Glob handling of all
19943         decls and constants and really handle all of them.
19945 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19947         PR target/81497
19948         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
19949         qualifier_void_pointer and qualifier_const_void_pointer.
19950         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
19951         (arm_init_builtins): Handle the above.
19952         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
19953         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
19954         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
19955         void intrinsics.
19957 2018-06-05  Martin Liska  <mliska@suse.cz>
19959         * auto-profile.c (read_autofdo_file): Do not use
19960         gcov_ctr_summary struct.
19961         (afdo_callsite_hot_enough_for_early_inline): Likewise.
19962         * coverage.c (struct counts_entry): Likewise.
19963         (read_counts_file): Read just single summary entry.
19964         (get_coverage_counts): Use gcov_summary struct.
19965         * coverage.h (get_coverage_counts): Likewise.
19966         * gcov-dump.c (dump_working_sets): Likewise.
19967         (tag_summary): Dump just single summary.
19968         * gcov-io.c (gcov_write_summary): Write just histogram
19969         summary.
19970         (gcov_read_summary): Read just single summary.
19971         (compute_working_sets): Use gcov_summary struct.
19972         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
19973         of GCOV_COUNTERS_SUMMABLE.
19974         (GCOV_COUNTERS_SUMMABLE): Remove.
19975         (GCOV_FIRST_VALUE_COUNTER): Replace with
19976         GCOV_COUNTER_V_INTERVAL.
19977         (struct gcov_ctr_summary): Remove.
19978         (struct gcov_summary): Directly use fields of former
19979         gcov_ctr_summary.
19980         (compute_working_sets): Use gcov_summary struct.
19981         * gcov.c (read_count_file): Do not use ctrs fields.
19982         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
19983         struct.
19984         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
19985         struct.
19986         * profile.c: Likewise.
19987         * profile.h: Likewise.
19989 2018-06-05  Martin Liska  <mliska@suse.cz>
19991         PR gcov-profile/84846
19992         * gcov.c (output_lines): Print working directory only
19993         in intermediate format.
19995 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
19997         * config/s390/s390-builtin-types.def: Add void function type.
19998         * config/s390/s390-builtins.def: Use the function type for the
19999         tbeginc builtin.
20001 2018-06-04  Jim Wilson  <jimw@sifive.com>
20003         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
20004         to int.
20005         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
20006         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
20007         handle EH_RETURN_DATA_REGNO registers properly.
20008         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
20009         (riscv_expand_epilogue): Update comment.  Change argument name and
20010         type.  Update code to use new name and type.  Pass new args to
20011         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
20012         EXCEPTION_RETURN.
20013         * config/riscv/riscv.md (NORMAL_RETURN): New.
20014         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
20015         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
20016         (eh_return): Call gen_eh_return_internal and emit barrier.
20017         (eh_return_internal): Call riscv_expand_epilogue.
20019 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
20021         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
20022         bit_insertion field and declare can_be_merged_into method.
20023         (merged_store_group::can_be_merged_into): New method.
20024         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
20025         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
20026         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
20028 2018-06-04  Richard Biener  <rguenther@suse.de>
20030         PR tree-optimization/85955
20031         * builtins.c (fold_builtin_sincos): Convert pointers to
20032         destination to appropriate type before dereferencing.
20034 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
20036         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
20038 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
20040         * expr.c (expand_expr_real_1): Force the operand into memory if
20041         its TYPE_MODE is BLKmode and if there is no integer mode for
20042         the number of bits being extracted.
20044 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
20046         PR target/85832
20047         PR target/86036
20048         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
20049         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
20051 2018-06-04  Richard Biener  <rguenther@suse.de>
20053         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
20054         (cleanup_tree_cfg_noloop): ... single caller.  Do
20055         start_recording_case_labels later.
20057 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
20059         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
20060         to _IMMINTRIN_H_INCLUDED.
20061         * config/i386/pconfigintrin.h: Ditto.
20062         * config/i386/waitpkgintrin.h: Ditto.
20063         * config/i386/immintrin.h: Add includes for sgxintrin.h,
20064         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
20065         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
20066         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
20067         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
20068         waitpkgintrin.h and cldemoteintrin.h.
20070 2018-06-04  Richard Biener  <rguenther@suse.de>
20072         PR tree-optimization/86038
20073         * tracer.c (find_best_successor): Check probability for
20074         being initialized, bail out if not.
20076 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
20078         PR target/86003
20079         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
20080         of bits to ignore when comparing architectures.
20082 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
20084         PR tree-optimization/69615
20085         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
20086         maximum or minimum of the type, try to merge it also as if
20087         range1 is + [-, x - 1] or + [x + 1, -].
20089         PR c++/86025
20090         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
20092 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
20094         PR tree-optimization/86034
20095         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
20096         the unsigned bitfield type in a bit insertion sequence if it does not
20097         have a larger precision than the bitfield size.
20098         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
20100 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
20102         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
20104 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
20106         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
20107         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
20108         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
20109         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
20111 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
20113         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
20114         Disable -fdelete-null-pointer-checks for ELF toolchain.
20116 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
20117             Kito Cheng  <kito.cheng@gmail.com>
20119         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
20120         (nds32le-*-*, nds32be-*-*): Integrate checking process.
20121         (nds32*-*-*): Add glibc and uclibc conditions.
20122         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
20123         (TARGET_EXCEPT_UNWIND_INFO): Define.
20124         * config/nds32/elf.h: New file.
20125         * config/nds32/linux.h: New file.
20126         * config/nds32/nds32-elf.opt: New file.
20127         * config/nds32/nds32-linux.opt: New file.
20128         * config/nds32/nds32-fp-as-gp.c
20129         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
20130         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
20131         TARGET_LINUX_ABI.
20132         (nds32_asm_file_end): Ditto.
20133         (nds32_print_operand): Ditto.
20134         (nds32_insert_attributes): Ditto.
20135         (nds32_init_libfuncs): New function.
20136         (TARGET_HAVE_TLS): Define.
20137         (TARGET_INIT_LIBFUNCS): Define.
20138         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
20139         spec content.
20140         (TARGET_ELF): Apply different mcmodel setting.
20141         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
20142         been migrated into elf.h and linux.h files.
20143         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
20144         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
20145         (mcmodel): The content has been migrated into nds32-elf.opt and
20146         nds32-linux.opt files.
20147         * config/nds32/t-elf: New file.
20148         * config/nds32/t-linux: New file.
20150 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
20151             Shiva Chen  <shiva0217@gmail.com>
20153         * config/nds32/constants.md (unspec_volatile_element): Add
20154         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
20155         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
20156         optimization.
20157         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
20158         (make_pass_nds32_fp_as_gp): Declare.
20159         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
20160         optmization pass.
20161         (nds32_asm_function_end_prologue): Remove unused asm output.
20162         (nds32_asm_function_begin_epilogue): Remove unused asm output.
20163         (nds32_asm_file_start): Output necessary fp_as_gp information.
20164         (nds32_option_override): Adjust register usage.
20165         (nds32_expand_prologue): Consider fp_as_gp situation.
20166         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
20167         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
20168         (epilogue): Ditto.
20169         (return): Ditto.
20170         (simple_return): Ditto.
20171         (omit_fp_begin): Output special directive for fp_as_gp.
20172         (omit_fp_end): Output special directive for fp_as_gp.
20173         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
20174         mforbid-fp-as-gp): New options.
20176 2018-06-01  Mark Wielaard  <mark@klomp.org>
20178         * dwarf2out.c (dwarf2out_finish): Remove generation of
20179         DW_AT_loclists_base.
20181 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
20183         * gimple-ssa-store-merging.c: Include gimple-fold.h.
20184         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
20185         (struct merged_store_group): Add bit_insertion field.
20186         (dump_char_array): Use standard hexadecimal format.
20187         (merged_store_group::merged_store_group): Set bit_insertion to false.
20188         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
20189         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
20190         also print the mask in the dump file.
20191         (pass_store_merging::gate): Minor tweak.
20192         (imm_store_chain_info::coalesce_immediate): Fix wrong association
20193         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
20194         stores with INTEGER_CST stores.
20195         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
20196         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
20197         and use it throughout.  Generate bit insertion sequences if need be.
20198         (pass_store_merging::process_store): Remove redundant condition.
20199         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
20201 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
20203         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
20204         the 128-bit floating point types.  Fix function comment.
20206 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20208         * config/aarch64/aarch64-simd.md
20209         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
20210         mnemonics.
20211         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
20212         mnemonics.
20214 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
20216         PR tree-optimization/85989
20217         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
20218         variable.
20219         (backprop::intersect_uses): Check it when deciding whether this
20220         is a backedge reference.
20221         (backprop::process_block): Add each phi to m_visited_phis
20222         after visiting it, then clear it at the end.
20224 2018-06-01  Richard Biener  <rguenther@suse.de>
20226         * tree-vectorizer.h (vect_dr_stmt): New function.
20227         (vect_get_load_cost): Adjust.
20228         (vect_get_store_cost): Likewise.
20229         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
20230         Use vect_dr_stmt instead of DR_SMTT.
20231         (vect_record_base_alignments): Likewise.
20232         (vect_calculate_target_alignment): Likewise.
20233         (vect_compute_data_ref_alignment): Likewise and make static.
20234         (vect_update_misalignment_for_peel): Likewise.
20235         (vect_verify_datarefs_alignment): Likewise.
20236         (vector_alignment_reachable_p): Likewise.
20237         (vect_get_data_access_cost): Likewise.  Pass down
20238         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
20239         (vect_get_peeling_costs_all_drs): Likewise.
20240         (vect_peeling_hash_get_lowest_cost): Likewise.
20241         (vect_enhance_data_refs_alignment): Likewise.
20242         (vect_find_same_alignment_drs): Likewise.
20243         (vect_analyze_data_refs_alignment): Likewise.
20244         (vect_analyze_group_access_1): Likewise.
20245         (vect_analyze_group_access): Likewise.
20246         (vect_analyze_data_ref_access): Likewise.
20247         (vect_analyze_data_ref_accesses): Likewise.
20248         (vect_vfa_segment_size): Likewise.
20249         (vect_small_gap_p): Likewise.
20250         (vectorizable_with_step_bound_p): Likewise.
20251         (vect_prune_runtime_alias_test_list): Likewise.
20252         (vect_analyze_data_refs): Likewise.
20253         (vect_supportable_dr_alignment): Likewise.
20254         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
20255         (vect_gen_prolog_loop_niters): Likewise.
20256         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
20257         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
20258         modify DR_STMT.
20259         (vect_recog_mask_conversion_pattern): Likewise.
20260         (vect_try_gather_scatter_pattern): Likewise.
20261         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
20262         to vect_get_store_cost.
20263         (vect_get_store_cost): Get stmt_info instead of DR.
20264         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
20265         (vect_get_load_cost): Get stmt_info instead of DR.
20267 2018-06-01  Richard Biener  <rguenther@suse.de>
20269         PR middle-end/86017
20270         * gimple-fold.c (var_decl_component_p): Also allow offsetted
20271         vars wrapped in MEM_REFs.
20273 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
20275         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
20276         Fix subreg tests so that we only return a choice between
20277         GENERAL_REGS and FP_REGS if the original classes included both.
20279 2018-06-01  Richard Biener  <rguenther@suse.de>
20281         PR ipa/85960
20282         * tree-ssa-structalias.c (get_function_part_constraint):
20283         Handle NULL fi->decl.
20284         (find_func_aliases_for_call): Properly handle indirect
20285         fi from direct call.
20286         (find_func_clobbers): Likewise.
20287         (ipa_pta_execute): Likewise.
20288         (create_variable_info_for): For functions that are ifunc_resolver
20289         resolve to a varinfo that contains the result of the resolver call.
20290         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
20291         aliases.
20293 2018-05-31  Michael Collison  <michael.collison@arm.com>
20295         * config/aarch64/aarch64.md:
20296         (*fix_to_zero_extenddfdi2): New pattern.
20297         * gcc.target/aarch64/fix_extend1.c: New testcase.
20299 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
20301         PR middle-end/78809
20302         PR middle-end/83026
20303         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
20304         and BUILT_IN_STRNCMP_EQ.
20305         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
20306         BUILT_IN_STRNCMP_EQ.
20307         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
20308         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
20309         (gimple_fold_builtin): Likewise.
20310         * tree-ssa-strlen.c (compute_string_length): New function.
20311         (determine_min_obsize): New function.
20312         (handle_builtin_string_cmp): New function to handle calls to
20313         string compare functions.
20314         (strlen_optimize_stmt): Add handling to builtin string compare
20315         calls.
20316         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
20317         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
20318         * tree.c (build_common_builtin_nodes): Add new defines of
20319         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
20321 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
20323         PR target/85984
20324         * bb-reorder.c (pass_partition_blocks::gate): Return false for
20325         functions with naked attribute.
20327 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
20329         * config/i386/sse.md (avx_vec_concat<mode>):
20330         Substitute concat_tg_mode mode attribute with xtg_mode.
20331         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
20332         (concat_tg_mode): Remove mode attribute.
20334 2018-05-31  Martin Sebor  <msebor@redhat.com>
20336         PR c/82063
20337         * calls.c (alloc_max_size): Correct a logic error/typo.
20338         Treat excessive arguments as infinite.  Warn for invalid arguments.
20339         * doc/invoke.texi (-Walloc-size-larger-than): Update.
20341 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
20343         PR target/85829
20344         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
20345         and movx for Haswell.
20347 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
20348             Cesar Philippidis  <cesar@codesourcery.com>
20350         PR middle-end/85879
20351         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
20352         when emitting error on private/firstprivate reductions.
20353         * omp-low.c (lower_omp_target): Avoid reference-type processing
20354         on pointers for firstprivate clause.
20356 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
20358         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
20359         (st1x2): Likewise.
20360         (st1x3): Likewise.
20361         * config/aarch64/aarch64-simd.md
20362         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
20363         (aarch64_ld1_x3_<mode>): Likewise
20364         (aarch64_st1x2<VALLDIF:mode>): Likewise
20365         (aarch64_st1_x2_<mode>): Likewise
20366         (aarch64_st1x3<VALLDIF:mode>): Likewise
20367         (aarch64_st1_x3_<mode>): Likewise
20368         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
20369         (vld1_s8_x3): Likewise.
20370         (vld1_u16_x3): Likewise.
20371         (vld1_s16_x3): Likewise.
20372         (vld1_u32_x3): Likewise.
20373         (vld1_s32_x3): Likewise.
20374         (vld1_u64_x3): Likewise.
20375         (vld1_s64_x3): Likewise.
20376         (vld1_f16_x3): Likewise.
20377         (vld1_f32_x3): Likewise.
20378         (vld1_f64_x3): Likewise.
20379         (vld1_p8_x3): Likewise.
20380         (vld1_p16_x3): Likewise.
20381         (vld1_p64_x3): Likewise.
20382         (vld1q_u8_x3): Likewise.
20383         (vld1q_s8_x3): Likewise.
20384         (vld1q_u16_x3): Likewise.
20385         (vld1q_s16_x3): Likewise.
20386         (vld1q_u32_x3): Likewise.
20387         (vld1q_s32_x3): Likewise.
20388         (vld1q_u64_x3): Likewise.
20389         (vld1q_s64_x3): Likewise.
20390         (vld1q_f16_x3): Likewise.
20391         (vld1q_f32_x3): Likewise.
20392         (vld1q_f64_x3): Likewise.
20393         (vld1q_p8_x3): Likewise.
20394         (vld1q_p16_x3): Likewise.
20395         (vld1q_p64_x3): Likewise.
20396         (vst1_s64_x2): Likewise.
20397         (vst1_u64_x2): Likewise.
20398         (vst1_f64_x2): Likewise.
20399         (vst1_s8_x2): Likewise.
20400         (vst1_p8_x2): Likewise.
20401         (vst1_s16_x2): Likewise.
20402         (vst1_p16_x2): Likewise.
20403         (vst1_s32_x2): Likewise.
20404         (vst1_u8_x2): Likewise.
20405         (vst1_u16_x2): Likewise.
20406         (vst1_u32_x2): Likewise.
20407         (vst1_f16_x2): Likewise.
20408         (vst1_f32_x2): Likewise.
20409         (vst1_p64_x2): Likewise.
20410         (vst1q_s8_x2): Likewise.
20411         (vst1q_p8_x2): Likewise.
20412         (vst1q_s16_x2): Likewise.
20413         (vst1q_p16_x2): Likewise.
20414         (vst1q_s32_x2): Likewise.
20415         (vst1q_s64_x2): Likewise.
20416         (vst1q_u8_x2): Likewise.
20417         (vst1q_u16_x2): Likewise.
20418         (vst1q_u32_x2): Likewise.
20419         (vst1q_u64_x2): Likewise.
20420         (vst1q_f16_x2): Likewise.
20421         (vst1q_f32_x2): Likewise.
20422         (vst1q_f64_x2): Likewise.
20423         (vst1q_p64_x2): Likewise.
20424         (vst1_s64_x3): Likewise.
20425         (vst1_u64_x3): Likewise.
20426         (vst1_f64_x3): Likewise.
20427         (vst1_s8_x3): Likewise.
20428         (vst1_p8_x3): Likewise.
20429         (vst1_s16_x3): Likewise.
20430         (vst1_p16_x3): Likewise.
20431         (vst1_s32_x3): Likewise.
20432         (vst1_u8_x3): Likewise.
20433         (vst1_u16_x3): Likewise.
20434         (vst1_u32_x3): Likewise.
20435         (vst1_f16_x3): Likewise.
20436         (vst1_f32_x3): Likewise.
20437         (vst1_p64_x3): Likewise.
20438         (vst1q_s8_x3): Likewise.
20439         (vst1q_p8_x3): Likewise.
20440         (vst1q_s16_x3): Likewise.
20441         (vst1q_p16_x3): Likewise.
20442         (vst1q_s32_x3): Likewise.
20443         (vst1q_s64_x3): Likewise.
20444         (vst1q_u8_x3): Likewise.
20445         (vst1q_u16_x3): Likewise.
20446         (vst1q_u32_x3): Likewise.
20447         (vst1q_u64_x3): Likewise.
20448         (vst1q_f16_x3): Likewise.
20449         (vst1q_f32_x3): Likewise.
20450         (vst1q_f64_x3): Likewise.
20451         (vst1q_p64_x3): Likewise.
20453 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
20455         * config/msp430/msp430.c (msp430_output_labelref): Prepend
20456         user_label_prefix to name.
20458         * tree-core.h: Update comment about the format of NAME string
20459         passed to handler in attribute_spec.
20461         * config/msp430/msp430.md: Remove erroneous subreg expression from
20462         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
20463         zero_extend{q,h}isi2.
20465 2018-05-30  Borislav Petkov  <bp@suse.de>
20467         * doc/extend.texi: Document some architecture specific
20468         constraints and sort entries.
20470 2018-05-30  Martin Sebor  <msebor@redhat.com>
20472         PR middle-end/85369
20473         * builtins.c (expand_builtin_stpcpy_1): New function.
20474         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
20475         only if the former succeeds.
20477 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
20479         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
20480         in saphira.
20482 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
20484         * doc/invoke.texi (-flinker-output): Document
20486 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
20488         * passes.c (ipa_write_summaries): Only modify statements if body
20489         is in memory.
20490         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
20491         incrementally linking.
20492         (ipa_passes): Likewise.
20493         * lto-cgraph.c (lto_output_node): When incrementally linking do not
20494         pass down resolution info.
20495         * common.opt (flag_incremental_link): Update info.
20496         * gcc.c (plugin specs): Turn flinker-output=* to
20497         -plugin-opt=-linker-output-known
20498         * toplev.c (compile_file): Also cut compilation when doing incremental
20499         link.
20500         * flag-types. (enum lto_partition_model): Add
20501         LTO_LINKER_OUTPUT_NOLTOREL.
20502         (invoke.texi): Add -flinker-output docs.
20503         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
20504         link same way as WPA; do not stream in dead initializers.
20506         * dwarf2out.c (dwarf2out_die_ref_for_decl,
20507         darf2out_register_external_decl): Support incremental link.
20509 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
20511         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
20513 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
20515         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
20516         it down to simple_object_copy_lto_debug_sections.
20517         (run_gcc): Determine incremental LTO link time and configure
20518         lto1 into non-wpa mode, disable renaming of debug sections.
20520 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20522         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
20523         descriptions of various incorrectly documented functions.
20525 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
20527         Revert:
20528         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
20529         address check not strict.
20531 2018-05-30  Richard Biener  <rguenther@suse.de>
20533         PR tree-optimization/85964
20534         * tracer.c (better_p): Drop initialized count check, we only
20535         call the function with initialized counts now.
20536         (find_best_successor): Do find a best edge if one
20537         has uninitialized count.
20538         (find_best_predecessor): Likewise.  Do BB frequency check only
20539         if count is initialized.
20541 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
20543         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
20544         (aarch64_ldrstr_offset_compare): New.
20545         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
20546         load/store orderings.
20547         (aarch64_gen_adjusted_ldpstp): Likewise.
20549 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
20551         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
20552         Check for subset of GENERAL_REGS and FP_REGS.
20553         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
20554         r=w alternative.
20556 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
20558         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
20559         and wi::to_poly_offset.  Add the current offset and then check
20560         whether the sum fits, rather than using an unchecked addition of
20561         a checked term.  Check for a shwi rather than a uhwi.
20562         * expr.c (get_bit_range): Use tree_to_poly_uint64.
20563         (store_constructor): Use poly_int_tree_p.
20564         (expand_expr_real_1): Likewise.
20565         * function.c (assign_temp): Likewise.
20566         * fold-const.c (const_binop): Use poly_int_tree_p and
20567         wi::to_poly_offset.
20568         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
20569         division.
20570         * ipa-icf-gimple.c (func_checker::compare_operand): Use
20571         to_poly_offset for MEM offsets.
20572         * ipa-icf.c (sem_variable::equals): Likewise.
20573         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
20574         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
20575         wi::to_poly_offset for BIT_FIELD_REF offsets.
20576         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
20577         wi::to_poly_offset.
20578         * var-tracking.c (emit_note_insn_var_location): Use
20579         tree_to_poly_uint64.
20581 2018-05-29  Jim Wilson  <jimw@sifive.com>
20583         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
20585 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
20587         PR target/85950
20588         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
20589         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
20590         sequence.
20591         (sse4_1_round<mode>2): Use nonimmediate_operand
20592         for operand 1 predicate.
20594 2018-05-29  Martin Sebor  <msebor@redhat.com>
20595             Richard Biener  <rguenther@suse.de>
20597         PR testsuite/85888
20598         * calls.c (get_size_range): Call determine_value_range instead
20599         of get_value_range..
20600         * tree-vrp.h (determine_value_range): Declared new function.
20601         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
20603 2018-05-29  Richard Biener  <rguenther@suse.de>
20605         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
20606         sure to use non-pattern stmts for get_earlier_stmt arguments.
20607         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
20608         called on pattern stmts.
20609         (get_later_stmt): Likewise.
20611 2018-05-29  Martin Liska  <mliska@suse.cz>
20613         PR gcov-profile/85759
20614         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
20615         env variables.
20617 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
20619         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
20620         VEC_UNPACK_*_EXPR.
20621         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
20622         VEC_PACK_*_EXPR.
20624         PR target/85918
20625         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
20626         VEC_PACK_FLOAT_EXPR): New tree codes.
20627         * tree-pretty-print.c (op_code_prio): Handle
20628         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
20629         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
20630         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
20631         * tree-inline.c (estimate_operator_cost): Likewise.
20632         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
20633         * fold-const.c (const_binop): Likewise.
20634         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
20635         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
20636         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
20637         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
20638         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
20639         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
20640         * expr.c (expand_expr_real_2): Likewise.
20641         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
20642         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
20643         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
20644         optabs.
20645         * optabs.c (expand_widen_pattern_expr): For
20646         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
20647         sign from result type rather than operand's type.
20648         (expand_binop_directly): For vec_packu_float_optab and
20649         vec_packs_float_optab allow result type to be different from operand's
20650         type.
20651         * optabs-tree.c (optab_for_tree_code): Handle
20652         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
20653         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
20654         * tree-vect-generic.c (expand_vector_operations_1):  Handle
20655         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
20656         VEC_PACK_FLOAT_EXPR.
20657         * tree-vect-stmts.c (supportable_widening_operation): Handle
20658         FIX_TRUNC_EXPR.
20659         (supportable_narrowing_operation): Handle FLOAT_EXPR.
20660         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
20661         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
20662         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
20663         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
20664         mode attributes.
20665         (vec_pack<floatprefix>_float_<mode>): New expander.
20666         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
20667         attributes.
20668         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
20669         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
20670         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
20671         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
20672         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
20673         Document.
20674         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
20675         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
20676         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
20677         VEC_PACK_FLOAT_EXPR): Document.
20679 2018-05-29  Richard Biener  <rguenther@suse.de>
20681         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
20682         member.
20683         (stmt_vec_info_vec): Make pointer.
20684         (init_stmt_vec_info_vec): Remove.
20685         (free_stmt_vec_info_vec): Likewise.
20686         (set_stmt_vec_info_vec): New function.
20687         (free_stmt_vec_infos): Likewise.
20688         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
20689         (set_vinfo_for_stmt): Likewise.
20690         (get_earlier_stmt): Likewise.
20691         (get_later_stmt): Likewise.
20692         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
20693         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
20694         (vec_info::~vec_info): Free stmt_vec_infos.
20695         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
20696         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
20697         (pass_slp_vectorize::execute): Likewise.
20698         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
20699         (free_stmt_vec_info_vec): Likewise.
20700         (set_stmt_vec_info_vec): New function.
20701         (free_stmt_vec_infos): Likewise.
20702         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
20703         the global stmt_vec_info_vec.
20704         * tree-parloops.c (gather_scalar_reductions): Use
20705         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
20706         vector.
20708 2018-05-29  Richard Biener  <rguenther@suse.de>
20710         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
20712 2018-05-29  Martin Liska  <mliska@suse.cz>
20713             David Malcolm  <dmalcolm@redhat.com>
20715         * vec.c (test_reverse): New.
20716         (vec_c_tests): Add new test.
20717         * vec.h (vl_ptr>::reverse): New function.
20719 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
20721         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
20723         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
20724         and later.
20726 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
20728         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
20730 2018-05-28  Richard Biener  <rguenther@suse.de>
20732         PR tree-optimization/85933
20733         * tree-vect-data-refs.c (vect_record_base_alignments): Only
20734         look at stmts marked as vectorizable.
20736 2018-05-28  Richard Biener  <rguenther@suse.de>
20738         PR tree-optimization/85934
20739         * tree-vect-generic.c (expand_vector_operations_1): Hoist
20740         vector boolean check before scalar optimization.
20742 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
20744         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
20745         for armv5te.
20747 2018-05-28  Mark Wielaard  <mark@klomp.org>
20749         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
20750         if it is an expression containing a minus sign.
20752 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
20754         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
20756 2018-05-27  Paul Koning  <ni1d@arrl.net>
20758         * config/pdp11/pdp11.md (truncsihi2): Remove.
20760 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
20761             Chung-Ju Wu  <jasonwucj@gmail.com>
20763         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
20764         implementation.
20765         (unaligned_store_dw): Ditto.
20766         * config/nds32/nds32-memory-manipulation.c
20767         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
20768         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
20769         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
20770         (emit_setmem_word_loop): Rename to ...
20771         (emit_setmem_doubleword_loop): ... this.
20772         (nds32_gen_dup_4_byte_to_word_value): New function.
20773         (nds32_gen_dup_8_byte_to_double_word_value): New function.
20774         (nds32_expand_setmem_loop): Refine implementation.
20775         (nds32_expand_setmem_loop_v3m): Ditto.
20776         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
20777         pattern.
20779 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
20781         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
20783 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
20785         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
20786         (nds32_init_machine_status): Initialize machine->attr_naked_p and
20787         machine->attr_no_prologue_p.
20788         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
20789         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
20790         (nds32_expand_epilogue): Consider attr_naked_p.
20791         (nds32_expand_epilogue_v3pop): Likewise.
20792         (nds32_can_use_return_insn): Likewise.
20793         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
20794         attr_no_prologue_p fields.
20795         * config/nds32/nds32.opt (mret-in-naked-func): New option.
20797 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
20799         PR target/85918
20800         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
20801         attributes.
20802         * config/i386/sse.md
20803         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
20804         Rename to ...
20805         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
20806         ... this.
20807         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
20808         Rename to ...
20809         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
20810         ... this.
20811         (*<floatsuffix>floatv2div2sf2): Rename to ...
20812         (*float<floatunssuffix>v2div2sf2): ... this.
20813         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
20814         (float<floatunssuffix>v2div2sf2_mask): ... this.
20815         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
20816         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
20817         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
20818         to ...
20819         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
20820         ... this.
20821         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
20822         Rename to ...
20823         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
20824         ... this.
20825         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
20826         Rename to ...
20827         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
20828         ... this.
20829         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
20830         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
20831         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
20832         gen_ufix_truncv8dfv8si2.
20833         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
20834         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
20835         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
20836         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
20837         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
20838         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
20839         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
20840         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
20842 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
20844         PR target/85900
20845         PR target/85345
20846         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
20848 2018-05-25  Jim Wilson  <jimw@sifive.com>
20850         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
20851         * config/riscv/riscv.c (struct machine_function): Add
20852         interrupt_handler_p and attribute_checked_p fields.
20853         (riscv_attribute_table): Add interrupt.
20854         (riscv_interrupt_type_p): New.
20855         (riscv_save_reg_p): Save extra regs for interrupt handler.
20856         (riscv_use_save_libcall): Return false  for interrupt handler.
20857         (riscv_first_stack_step): Add forward declaration.
20858         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
20859         for interrupt handler with large frame.  Use it for saved reg list.
20860         (riscv_expand_prologue): Move flag_stack_usage_info support to
20861         eliminate duplication.
20862         (riscv_expand_epilogue): Generate mret for interrupt handler.
20863         (riscv_epilogue_uses): New.
20864         (riscv_can_use_return_insn): Return false for interrupt handler.
20865         (riscv_function_ok_for_sibcall): Likewise.
20866         (riscv_set_current_function): Add interrupt handler support.
20867         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
20868         * config/riscv/riscv.md (UNSPECV_MRET): New.
20869         (GP_REGNUM): New.
20870         (riscv_frflags, riscv_fsflags): Use tab after opcode.
20871         (riscv_mret): New.
20872         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
20874 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
20876         PR tree-optimization/85712
20877         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
20878         this candidate has already been replaced in-situ by a copy.
20880 2018-05-25  Jason Merrill  <jason@redhat.com>
20882         PR c++/80485 - inline function non-zero address.
20883         * symtab.c (nonzero_address): Check DECL_COMDAT.
20885 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
20887         PR target/83628
20888         * config/alpha/alpha.md (ashlsi3): New insn pattern.
20889         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
20890         extension of SImode operation.  Use const123_operand predicate.
20891         (*saddsi_1): Remove.
20892         (*saddl_se_1): Ditto.
20893         (*ssubsi_1): Ditto.
20894         (*ssubl_se_1): Ditto.
20895         * config/alpha/predicates.md (const123_operand): New predicate.
20896         * config/alpha/constraints.md (P): Use IN_RANGE.
20898 2018-05-25  Richard Biener  <rguenther@suse.de>
20900         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
20901         defaulted to true.
20902         (ref_maybe_used_by_stmt_p): Likewise.
20903         (stmt_may_clobber_ref_p): Likewise.
20904         (stmt_may_clobber_ref_p_1): Likewise.
20905         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
20906         and pass it along.
20907         (ref_maybe_used_by_stmt_p): Likewise.
20908         (stmt_may_clobber_ref_p): Likewise.
20909         (stmt_may_clobber_ref_p_1): Likewise.
20910         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
20911         the alias oracle to disambiguate DRs with stmts DR analysis
20912         couldn't handle.
20913         (vect_analyze_data_refs): Do not give up on not analyzable
20914         DRs for BB vectorization.  Remove code truncating the dataref
20915         vector.
20917 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
20919         PR target/85832
20920         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
20921         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
20922         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
20924 2018-05-25  Richard Biener  <rguenther@suse.de>
20926         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
20927         function, combining stmt data ref gathering and fatal analysis
20928         parts.
20929         (vect_analyze_data_refs): Remove now redudnant code and simplify.
20930         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
20931         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
20932         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
20933         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
20935 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
20937         PR tree-optimization/85720
20938         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
20939         SCC if all partitions are builtins.
20940         (version_loop_by_alias_check): New parameter.  Generate cancelable
20941         runtime alias check if all partitions are builtins.
20942         (distribute_loop): Update call to above function.
20944 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
20946         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
20947         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
20948         (parm_default_def_partition_arg): Ditto.
20949         (set_parm_default_def_partition): Ditto.
20950         (get_parm_default_def_partitions): Ditto and make it static.
20951         (get_undefined_value_partitions): Ditto and make it static.
20952         (remove_ssa_form): Refactor call to init_var_map here.
20953         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
20954         computation for loop region.
20955         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
20956         (register_default_def): Delete.
20957         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
20958         (parm_default_def_partition_arg): Ditto.
20959         (set_parm_default_def_partition): Ditto.
20960         (get_parm_default_def_partitions): Ditto and make it static.
20961         (get_undefined_value_partitions): Ditto and make it static.
20962         (coalesce_with_default, coalesce_with_default): Update comment.
20963         (create_coalesce_list_for_region): New func factored out from
20964         create_outofssa_var_map.
20965         (populate_coalesce_list_for_outofssa): New func factored out from
20966         create_outofssa_var_map and coalesce_ssa_name.
20967         (create_outofssa_var_map): Delete.
20968         (coalesce_ssa_name): Refactor to support live range computation.
20969         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
20970         (get_parm_default_def_partitions): Delete.
20971         (get_undefined_value_partitions): Ditto.
20972         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
20973         computation for loop region.
20974         (new_tree_live_info, loe_visit_block): Ditto.
20975         (live_worklist, set_var_live_on_entry): Ditto.
20976         (calculate_live_on_exit, verify_live_on_entry): Ditto.
20977         * tree-ssa-live.h (struct _var_map): New fields.
20978         (init_var_map): Change decl.
20979         (region_contains_p): New.
20981 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
20983         * tree-ssa-live.h (live_merge_and_clear): Delete.
20985 2018-05-25  Richard Biener  <rguenther@suse.de>
20987         PR c++/85912
20988         * tree-dump.c (dequeue_and_dump): Remove access to removed
20989         operand 2 of a SWITCH_EXPR.
20991 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
20993         * doc/sourcebuild.texi (vect_double_cond_arith): Include
20994         multiplication and division.
20995         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
20996         (cond_udiv@var{m}, cond_umod@var{m}): Document.
20997         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
20998         (cond_udiv_optab, cond_umod_optab): New optabs.
20999         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
21000         (IFN_COND_RDIV): New internal functions.
21001         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
21002         TRUNC_MOD_EXPR and RDIV_EXPR.
21003         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
21004         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
21005         New unspecs.
21006         (SVE_INT_BINARY): Include mult.
21007         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
21008         (optab, sve_int_op): Handle mult.
21009         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
21010         UNSPEC_COND_DIV.
21011         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
21012         for SVE_INT_BINARY_SD.
21014 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
21016         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
21017         (optab, sve_int_op): Handle div and udiv.
21018         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
21019         for SVE_INT_BINARY_SD.
21020         (*<optab><mode>3): New insn for the same.
21022 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
21024         * tree-vect-patterns.c: Include predict.h.
21025         (vect_recog_divmod_pattern): Restrict check for division support
21026         to when optimizing for size.
21028 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
21030         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
21031         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
21032         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
21033         (gimple_match_op::set_op): Likewise.
21034         (gimple_resimplify4): Declare.
21035         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
21036         (expr::gen_transform): Likewise.
21037         (decision_tree::gen): Generate a simplification routine for 4 operands.
21038         * gimple-match-head.c (gimple_simplify): Add an overload for
21039         4 operands.  In the top-level function, handle up to 4 call
21040         arguments and call gimple_resimplify4.
21041         (gimple_resimplify4): New function.
21042         (build_call_internal): Pass a fourth operand.
21043         (maybe_push_to_seq): Likewise.
21044         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
21045         Fold VEC_COND_EXPRs of an operation and a default value into
21046         an IFN_COND_* function if possible.
21047         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
21048         New unspecs.
21049         (SVE_COND_FP_BINARY): Include them.
21050         (optab, sve_fp_op): Handle them.
21051         (SVE_INT_BINARY_REV): New code iterator.
21052         (SVE_COND_FP_BINARY_REV): New int iterator.
21053         (commutative): New int attribute.
21054         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
21055         Declare.
21056         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
21057         function.
21058         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
21059         (*cond_<optab><mode>): New patterns for reversed operands.
21061 2018-05-25  Richard Biener  <rguenther@suse.de>
21063         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
21064         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
21065         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
21066         (STMT_VINFO_GROUPED_ACCESS): Adjust.
21067         * tree-vect-data-refs.c (everywhere): Adjust users.
21068         * tree-vect-loop.c (everywhere): Likewise.
21069         * tree-vect-slp.c (everywhere): Likewise.
21070         * tree-vect-stmts.c (everywhere): Likewise.
21071         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
21073 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
21075         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
21076         Rename to...
21077         (gcc_cv_as_section_exclude): ... this.
21078         Try Solaris as #exclude syntax.
21079         * configure: Regenerate.
21080         * config.in: Regenerate.
21081         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
21082         SECTION_EXCLUDE.
21083         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
21084         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
21086         * varasm.c (default_elf_asm_named_section): Don't check if
21087         HAVE_GAS_SECTION_EXCLUDE is defined.
21089 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
21091         * doc/md.texi: Update the documentation of the cond_* optabs
21092         to mention the new final operand.  Fix GET_MODE_NUNITS call.
21093         Describe the scalar case too.
21094         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
21095         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
21096         instead of 2.
21097         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
21098         (get_conditional_internal_fn): Update comment.
21099         * tree-vect-loop.c (vectorizable_reduction): Pass the original
21100         accumulator value as a final argument to conditional functions.
21101         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
21102         a define_expand and add an "else" operand.  Assert for now that
21103         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
21104         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
21105         (*cond_<optab><mode>): New patterns.
21106         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
21107         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
21108         (UNSPEC_COND_EOR): Delete.
21109         (optab): Remove associated mappings.
21110         (SVE_INT_BINARY): New code iterator.
21111         (sve_int_op): Remove int attribute and add "minus" to the code
21112         attribute.
21113         (SVE_COND_INT_OP): Delete.
21114         (SVE_COND_FP_OP): Rename to...
21115         (SVE_COND_FP_BINARY): ...this.
21117 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
21119         * optabs.c (can_reuse_operands_p): New function.
21120         (maybe_legitimize_operands): Try to reuse the results for
21121         earlier operands.
21123 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
21125         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
21126         Add {q} suffix to insn mnemonic.
21128 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
21130         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
21131         (msp430_warn_func_return): New.
21133 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
21135         * fold-const.c (tree_nonzero_bits): New function.
21136         * fold-const.h (tree_nonzero_bits): Likewise.
21137         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
21138         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
21140 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
21142         PR target/85900
21143         PR target/85345
21144         * varasm.c (assemble_alias): Check ifunc_resolver only on
21145         FUNCTION_DECL.
21147 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
21149         PR target/85903
21150         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
21151         when memory input operand is handled.
21153 2018-05-24  Luis Machado  <luis.machado@linaro.org>
21155         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
21156         global.
21157         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
21159 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
21161         * match.pd: Delay FMA folds until after vectorization.
21163 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
21165         PR target/83009
21166         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
21167         address check not strict.
21169 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
21171         * gimple-match.h (gimple_match_op): New class.
21172         (mprts_hook): Replace parameters with a gimple_match_op *.
21173         (maybe_build_generic_op): Likewise.
21174         (gimple_simplified_result_is_gimple_val): Replace parameters with
21175         a const gimple_match_op *.
21176         (gimple_simplify): Replace code_helper * and tree * parameters with
21177         a gimple_match_op * parameter.
21178         (gimple_resimplify1): Replace code_helper *, tree and tree *
21179         parameters with a gimple_match_op * parameter.
21180         (gimple_resimplify2): Likewise.
21181         (gimple_resimplify3): Likewise.
21182         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
21183         parameters with a gimple_match_op * parameter.
21184         * gimple-match-head.c (gimple_simplify): Change prototypes of
21185         auto-generated functions to take a gimple_match_op * instead of
21186         separate code_helper * and tree * parameters.  Make the same
21187         change in the top-level overload and update calls to the
21188         gimple_resimplify routines.  Update calls to the auto-generated
21189         functions and to maybe_push_res_to_seq in the publicly-facing
21190         operation-specific gimple_simplify overloads.
21191         (gimple_match_op::MAX_NUM_OPS): Define.
21192         (gimple_resimplify1): Replace rcode and ops with a single res_op
21193         parameter.  Update call to gimple_simplify.
21194         (gimple_resimplify2): Likewise.
21195         (gimple_resimplify3): Likewise.
21196         (mprts_hook): Replace parameters with a gimple_match_op *.
21197         (maybe_build_generic_op): Likewise.
21198         (build_call_internal): Replace type, nargs and ops with
21199         a gimple_match_op *.
21200         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
21201         with a single gimple_match_op *.  Update calls to mprts_hook,
21202         build_call_internal and gimple_simplified_result_is_gimple_val.
21203         Factor out code that is common to the tree_code and combined_fn cases.
21204         * genmatch.c (expr::gen_transform): Replace tem_code and
21205         tem_ops with a gimple_match_op called tem_op.  Update calls
21206         to the gimple_resimplify functions and maybe_push_res_to_seq.
21207         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
21208         res_ops.  Update call to the gimple_resimplify functions.
21209         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
21210         (decision_tree::gen): Make the functions take a gimple_match_op *
21211         called res_op instead of separate res_code and res_ops parameters.
21212         Update call accordingly.
21213         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
21214         and ops with a single res_op parameter.  Update calls to
21215         maybe_build_generic_op and maybe_push_res_to_seq.
21216         (fold_stmt_1): Update calls to gimple_simplify and
21217         replace_stmt_with_simplification.
21218         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
21219         and gimple_simplified_result_is_gimple_val.
21220         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
21221         gimple_simplify.
21222         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
21223         with a gimple_match_op *.
21224         (vn_nary_build_or_lookup): Likewise.  Update call to
21225         vn_nary_build_or_lookup_1.
21226         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
21227         gimple_match_op *.  Update calls to the gimple_resimplify routines
21228         and to gimple_simplified_result_is_gimple_val.
21229         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
21230         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
21231         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
21232         (visit_nary_op): Likewise.
21233         (visit_reference_op_load): Likewise.
21235 2018-05-23  Luis Machado  <luis.machado@linaro.org>
21237         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
21238         modifier for printing the step amount.
21240 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
21242         PR target/78849
21243         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
21244         types.
21246 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
21248         * doc/sourcebuild.texi (Endianness): New subsubsection.
21250 2018-05-23  Luis Machado  <luis.machado@linaro.org>
21252         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
21253         <prefetch_dynamic_strides>: New const bool field.
21254         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
21255         prefetch_dynamic_strides.
21256         (exynosm1_prefetch_tune): Likewise.
21257         (thunderxt88_prefetch_tune): Likewise.
21258         (thunderx_prefetch_tune): Likewise.
21259         (thunderx2t99_prefetch_tune): Likewise.
21260         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
21261         false.
21262         (aarch64_override_options_internal): Update to set
21263         PARAM_PREFETCH_DYNAMIC_STRIDES.
21264         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
21265         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
21266         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
21267         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
21268         prefetch-dynamic-strides setting.
21270 2018-05-23  Luis Machado  <luis.machado@linaro.org>
21272         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
21273         <minimum_stride>: New const int field.
21274         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
21275         minimum_stride field defaulting to -1.
21276         (exynosm1_prefetch_tune): Likewise.
21277         (thunderxt88_prefetch_tune): Likewise.
21278         (thunderx_prefetch_tune): Likewise.
21279         (thunderx2t99_prefetch_tune): Likewise.
21280         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
21281         <default_opt_level>: Set to 3.
21282         (aarch64_override_options_internal): Update to set
21283         PARAM_PREFETCH_MINIMUM_STRIDE.
21284         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
21285         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
21286         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
21287         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
21288         stride is constant and is below the minimum stride threshold.
21290 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21292         * config/arm/arm-cpus.in (mode26): Delete.
21293         (armv4): Delete mode26 reference.
21294         * config/arm/arm.c (arm_configure_build_target): Delete use of
21295         isa_bit_mode26.
21297 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
21299         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
21300         New insn pattern.
21301         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
21302         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
21303         for non-SSE modes.
21304         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
21305         (floatunsdidf2): Ditto.
21307 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
21309         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
21310         (fixuns_trunc<mode>si2_avx512f): Ditto.
21311         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
21312         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
21313         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
21315 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
21317         PR rtl-optimization/79985
21318         * df-scan.c (df_insn_refs_collect): Remove special case for
21319         global registers and asm statements.
21321 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
21323         * extend.texi (Global Register Variables): Rewrite the bullet list.
21324         Note that the register is available for allocation. Note that access
21325         via inline asm must use constraints. Add note about async-signal
21326         handlers. Remove paragraph about automagic register selection.
21328 2018-05-23  Richard Biener  <rguenther@suse.de>
21330         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
21331         of fixed offset from memset VN.
21333 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
21335         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
21336         first_interp field.
21337         (alloc_cand_and_find_basis): Initialize first_interp field.
21338         (slsr_process_mul): Modify first_interp field.
21339         (slsr_process_add): Likewise.
21340         (slsr_process_cast): Modify first_interp field for each new
21341         interpretation.
21342         (slsr_process_copy): Likewise.
21343         (dump_candidate): Dump first_interp field.
21344         (replace_mult_candidate): Process all interpretations, not just
21345         subsequent ones.
21346         (replace_rhs_if_not_dup): Likewise.
21347         (replace_one_candidate): Likewise.
21349 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
21351         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
21352         Add new boolean.
21353         (aarch64_needs_frame_chain): New function.
21354         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
21356 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
21358         PR target/84882
21359         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
21360         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
21361         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
21362         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
21363         as true for strict-align.
21364         (aarch64_can_inline_p): Perform checks even when callee has no
21365         attributes to check for strict alignment.
21366         * doc/extend.texi (AArch64 Function Attributes): Document
21367         no-strict-align.
21368         * doc/invoke.texi: (AArch64 Options): Likewise.
21370 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
21372         PR tree-optimization/85853
21373         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
21374         the handling of the root of the node to...
21375         (vect_slp_analyze_node_operations_1): ...this new function,
21376         and run the whole thing with the child nodes' def types
21377         set according to their SLP node's def type.
21379 2018-05-23  Richard Biener  <rguenther@suse.de>
21381         PR middle-end/85874
21382         * tree-data-ref.c (create_runtime_alias_checks): Defer
21383         and ignore overflow warnings.
21385 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
21387         PR tree-optimization/85822
21388         * tree-vrp.c (is_masked_range_test): Fix handling of negative
21389         constants.
21391 2018-05-23  Richard Biener  <rguenther@suse.de>
21393         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
21394         memset constants via native_interpret_expr.
21396 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
21398         PR target/85345
21399         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
21400         attribute.
21401         (cgraph_node::create_alias): Likewise.
21402         (cgraph_node::get_availability): Check ifunc_resolver instead
21403         of looking up ifunc attribute.
21404         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
21405         * varasm.c (do_assemble_alias): Likewise.
21406         (assemble_alias): Likewise.
21407         (default_binds_local_p_3): Likewise.
21408         * cgraph.h (cgraph_node): Add ifunc_resolver.
21409         (cgraph_node::only_called_directly_or_aliased_p): Return false
21410         for IFUNC resolver.
21411         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
21412         attribute.
21413         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
21414         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
21415         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
21416         instead of looking up ifunc attribute.
21418 2018-05-22  Luis Machado  <luis.machado@linaro.org>
21420         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
21422 2018-05-22  Martin Sebor  <msebor@redhat.com>
21424         PR middle-end/85359
21425         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
21426         only when expasion succeeds.
21427         (expand_builtin_strcmp): Same.
21428         (expand_builtin_strncmp): Same.
21430 2018-05-22  Martin Sebor  <msebor@redhat.com>
21432         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
21434 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
21435             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21437         * config/aarch64/aarch64-ldpstp.md: Replace uses of
21438         aarch64_mem_pair_operand with memory_operand and delete operand swapping
21439         code.
21440         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
21441         Add check for legitimate_address.
21442         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
21443         (aarch64_swap_ldrstr_operands): New.
21444         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
21445         Define prototype.
21447 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
21448             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21450         * config/aarch64/aarch64.md: New patterns to generate stp
21451         and ldp.
21452         (store_pair_sw, store_pair_dw): New patterns to generate stp for
21453         single words and double words.
21454         (load_pair_sw, load_pair_dw): Likewise.
21455         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
21456         Delete.
21457         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
21458         Delete.
21459         * config/aarch64/aarch64-ldpstp.md: Modify peephole
21460         for different mode ldpstp and add peephole for merged zero stores.
21461         Likewise for loads.
21462         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
21463         Add size check.
21464         (aarch64_gen_store_pair): Rename calls to match new patterns.
21465         (aarch64_gen_load_pair): Rename calls to match new patterns.
21466         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
21467         (load_pair<DREG:mode><DREG2:mode>): ... This.
21468         (store_pair<mode>): Rename to...
21469         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
21470         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
21471         New mode iterators.
21472         (V_INT_EQUIV): Handle SImode.
21473         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
21474         New predicate.
21476 2018-05-22  Martin Sebor  <msebor@redhat.com>
21478         PR c/85623
21479         * calls.c (maybe_warn_nonstring_arg): Use string length to set
21480         or ajust the presumed bound on an operation to avoid unnecessary
21481         warnings.
21483 2018-05-22  Martin Sebor  <msebor@redhat.com>
21485         PR tree-optimization/85826
21486         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
21487         assuming that a DECL necesarily has a constant size.
21489 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
21491         PR middle-end/85862
21492         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
21494 2018-05-22  Richard Biener  <rguenther@suse.de>
21496         PR tree-optimization/85834
21497         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
21498         non-constant and non-zero memset arguments.
21500 2018-05-22  Martin Liska  <mliska@suse.cz>
21502         PR ipa/85607
21503         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
21505 2018-05-22  Richard Biener  <rguenther@suse.de>
21507         PR tree-optimization/85863
21508         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
21509         comparisons when vectype is specified.
21510         (vectorizable_condition): Do not specify vectype for
21511         vect_is_simple_cond when SLP vectorizing.
21513 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
21515         PR target/85657
21516         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
21517         define __ibm128 as long double.
21518         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
21519         as a distinct type when IEEE 128-bit support is enabled.
21520         (init_float128_ieee): Fix up conversions between IFmode and IEEE
21521         128-bit types to use the correct functions.
21522         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
21523         convert between 128-bit floating point types that have different
21524         modes but the same representation, instead of using gen_lowpart to
21525         makean alias.
21526         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
21527         KFmode.
21528         (IFKF_reg): New attributes to give the register constraints for
21529         IFmode and KFmode.
21530         (extend<mode>tf2_internal): New insns to mark an explicit
21531         conversion between 128-bit floating point types that have a
21532         different mode but share the same representation.
21534 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
21536         PR tree-optimization/85814
21537         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
21538         a null return from get_strinfo when unsharing the next
21539         strinfo in the chain.
21541 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
21543         PR gcc/84923
21544         * varasm.c (weak_finish): Clean up weak_decls.
21546 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21548         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
21549         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
21550         UNSPEC_UADALP values.
21551         * config/aarch64/iterators.md (ABAL): New int iterator.
21552         (ABDL2): Likewise.
21553         (ADALP): Likewise.
21554         (sur): Add mappings for the above.
21555         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
21556         New define_insn.
21557         (aarch64_<sur>abal<mode>_4): Likewise.
21558         (aarch64_<sur>adalp<mode>_3): Likewise.
21559         (<sur>sadv16qi): New define_expand.
21561 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
21563         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
21564         (*movdf_internal): Ditto.
21565         (*rcpsf2_sse): Ditto.
21566         (*rsqrtsf2_sse): Ditto.
21567         (*sqrt<mode>2_sse): Ditto.
21569 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
21571         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
21572         eor3q<mode>4.
21573         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
21574         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
21575         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
21576         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
21577         vbcaxq_s64): New.
21578         * config/aarch64/arm_neon.h: Likewise.
21579         * config/aarch64/iterators.md (VQ_I): New.
21581 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
21583         * config.gcc: Add arc/t-multilib-linux to tmake_file for
21584         arc*-*-linux*.
21585         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
21586         MULTILIB_DIRNAMES
21588 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
21590         * config/nds32/constraints.md (S): New constraint.
21591         * config/nds32/nds32.md (call_internal): Use constraint S.
21592         (call_value_internal): Likewise.
21593         (sibcall_internal): Likewise.
21594         (sibcall_value_internal): Likewise.
21596 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
21597             Chung-Ju Wu  <jasonwucj@gmail.com>
21599         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
21600         into consideration.
21602 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
21603             Chung-Ju Wu  <jasonwucj@gmail.com>
21605         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
21606         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
21607         (nds32_rtx_costs_impl): Simplify.
21608         (nds32_address_cost_impl): Simplify.
21609         (nds32_init_rtx_costs): New function.
21610         (nds32_rtx_costs_speed_prefer): Likewise.
21611         (nds32_rtx_costs_size_prefer): Likewise.
21612         (nds32_address_cost_speed_prefer): Likewise.
21613         (nds32_address_cost_speed_fwprop): Likewise.
21614         (nds32_address_cost_size_prefer): Likewise.
21615         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
21616         * config/nds32/nds32.c (nds32_option_override): Use
21617         nds32_init_rtx_costs function.
21619 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
21621         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
21622         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
21623         (TARGET_PIPELINE_N8): Likewise.
21624         (TARGET_PIPELINE_N10): Likewise.
21625         (TARGET_PIPELINE_N13): Likewise.
21626         (TARGET_PIPELINE_GRAYWOLF): Likewise.
21628 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
21630         * config/nds32/nds32-fpu.md: Update copyright year.
21632 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
21634         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
21636 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
21638         * config/nds32/nds32.c
21639         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
21640         * config/nds32/nds32.opt (minline-asm-r15): New option.
21642 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
21644         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
21645         MASK_HW_ABS.
21646         * config/nds32/nds32.md (abssi2): New pattern.
21648 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
21650         * config/i386/i386.md (rex64namesuffix): New mode attribute.
21651         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
21652         Merge insn pattern from sse_cvtsi2ss<round_name> and
21653         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
21654         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
21655         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
21656         using SWI48 mode iterator.
21657         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
21658         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
21659         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
21660         pattern from sse_cvttss2si<round_saeonly_name>
21661         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
21662         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
21663         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
21664         using SWI48 mode iterator.
21665         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
21666         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
21667         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
21668         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
21669         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
21670         using SWI48 mode iterator.
21671         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
21672         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
21673         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
21674         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
21675         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
21676         SWI48 mode iterator.
21677         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
21678         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
21679         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
21680         pattern from sse_cvttsd2si<round_saeonly_name>
21681         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
21683 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
21685         * config/nds32/nds32-md-auxiliary.c
21686         (nds32_valid_smw_lwm_base_p): Refine.
21687         (nds32_output_smw_single_word): Refine.
21688         (nds32_output_smw_double_word): New.
21689         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
21691 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
21693         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
21694         (nds32_output_stack_pop): Refine.
21695         (nds32_expand_unaligned_load): Refine.
21696         (nds32_expand_unaligned_store): Refine.
21698 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
21699             Chung-Ju Wu  <jasonwucj@gmail.com>
21701         * config/nds32/constants.md: Add TP_REGNUM constant.
21702         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
21703         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
21704         UNSPEC_ADD32.
21705         * config/nds32/nds32-doubleword.md: Consider flag_pic.
21706         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
21707         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
21708         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
21709         and PIC code generation.
21710         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
21711         code generation.
21712         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
21713         optimization.
21714         * config/nds32/nds32.md: Support TLS and PIC.
21715         * config/nds32/nds32.c: Support TLS and PIC.
21716         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
21717         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
21718         predicate.
21720 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
21722         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
21723         mode with E_ prefix.
21725 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
21726             Chung-Ju Wu  <jasonwucj@gmail.com>
21728         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
21729         * config/nds32/nds32-md-auxiliary.c
21730         (symbolic_reference_mentioned_p): New.
21731         (nds32_legitimize_ict_address): New.
21732         (nds32_expand_ict_move): New.
21733         (nds32_indirect_call_referenced_p): New.
21734         (nds32_symbol_binds_local_p): Delete.
21735         (nds32_long_call_p): Modify.
21736         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
21737         * config/nds32/nds32-protos.h
21738         (symbolic_reference_mentioned_p): Declare.
21739         (nds32_legitimize_ict_address): Declare.
21740         (nds32_expand_ict_move): Declare.
21741         (nds32_indirect_call_referenced_p): Declare.
21742         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
21743         (nds32_relax_group): Use nds32_ict_const_p as condition.
21744         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
21745         (nds32_asm_file_start): Output ict_model directive in asm code.
21746         (nds32_legitimate_address_p): Consider indirect call.
21747         (nds32_print_operand): Consider indirect call.
21748         (nds32_print_operand_address): Consider indirect call.
21749         (nds32_insert_attributes): Handle "indirect_call" attribute.
21750         (TARGET_LEGITIMATE_ADDRESS_P): Define.
21751         (TARGET_LEGITIMATE_CONSTANT_P): Define.
21752         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
21753         (TARGET_DELEGITIMIZE_ADDRESS): Define.
21754         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
21755         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
21756         (TARGET_ICT_MODEL_SMALL): Define.
21757         (TARGET_ICT_MODEL_LARGE): Define.
21758         * config/nds32/nds32.md (movsi): Consider ict model.
21759         (call, call_value): Consider ict model.
21760         (sibcall, sibcall_value): Consider ict model.
21761         * config/nds32/nds32.opt (mict-model): New option.
21762         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
21763         model.
21765 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
21766             Monk Chiang  <sh.chiang04@gmail.com>
21767             Jim Wilson <jimw@sifive.com>
21769         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
21770         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
21771         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
21772         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
21773         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
21774         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
21775         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
21776         compute save_libcall_adjustment properly.
21777         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
21778         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
21779         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
21780         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
21781         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
21782         (ABI_SPEC): Handle mabi=ilp32e.
21783         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
21784         (RVE): Add RVE mask.
21785         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
21786         <-march>: Add rv32e as an example.
21788 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
21790         PR c++/82899
21791         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
21792         (intra_create_variable_infos): Handle C++ constructors.
21794 2018-05-18  Martin Liska  <mliska@suse.cz>
21796         * passes.def: Remove a redundant pass.
21798 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
21800         PR bootstrap/85838
21801         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
21803 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21805         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
21806         (ARMv4): Update.
21807         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
21808         (ARMv6m): Update.
21809         (armv2, armv2a, armv3, armv3m): Delete architectures.
21810         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
21811         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
21812         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
21813         Delete cpus.
21814         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
21815         (*mulsidi3adddi): Likewise.
21816         (mulsidi3): Likewise.
21817         (*mulsidi3_nov6): Likewise.
21818         (umulsidi3): Likewise.
21819         (umulsidi3_nov6): Likewise.
21820         (umaddsidi4): Likewise.
21821         (*umulsidi3adddi): Likewise.
21822         (smulsi3_highpart): Likewise.
21823         (*smulsi3_highpart_nov6): Likewise.
21824         (umulsi3_highpart): Likewise.
21825         (*umulsi3_highpart_nov6): Likewise.
21826         * config/arm/arm.h (arm_arch3m): Delete.
21827         * config/arm/arm.c (arm_arch3m): Delete.
21828         (arm_option_override_internal): Update armv3-related comment.
21829         (arm_configure_build_target): Delete use of isa_bit_mode32.
21830         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
21831         (arm_rtx_costs_internal): Delete check of arm_arch3m.
21832         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
21833         (mulsa3): Likewise.
21834         (mulusa3): Likewise.
21835         * config/arm/arm-protos.h (arm_arch3m): Delete.
21836         * config/arm/arm-tables.opt: Regenerate.
21837         * config/arm/arm-tune.md: Likewise.
21838         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
21839         deleted architectures.
21841 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21843         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
21844         (armv5t, armv5te): New features.
21845         (ARMv5, ARMv5e): Delete fgroups.
21846         (ARMv5t, ARMv5te): Adjust for above changes.
21847         (ARMv6m): Likewise.
21848         (armv5, armv5e): Delete arches.
21849         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
21850         arm_arch5.
21851         (*call_reg_arm): Likewise.
21852         (*call_value_reg_armv5): Likewise.
21853         (*call_value_reg_arm): Likewise.
21854         (*call_symbol): Likewise.
21855         (*call_value_symbol): Likewise.
21856         (*sibcall_insn): Likewise.
21857         (*sibcall_value_insn): Likewise.
21858         (clzsi2): Likewise.
21859         (prefetch): Likewise.
21860         (define_split and define_peephole2 dependent on arm_arch5):
21861         Likewise.
21862         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
21863         arm_arch5e.
21864         (TARGET_ARM_QBIT): Likewise.
21865         (TARGET_DSP_MULTIPLY): Likewise.
21866         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
21867         (arm_arch5, arm_arch5e): Delete.
21868         (arm_arch5t, arm_arch5te): Declare.
21869         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
21870         (arm_arch5t): Declare.
21871         (arm_option_reconfigure_globals): Update for the above.
21872         (arm_options_perform_arch_sanity_checks): Update comment, replace
21873         use of arm_arch5 with arm_arch5t.
21874         (use_return_insn): Likewise.
21875         (arm_emit_call_insn): Likewise.
21876         (output_return_instruction): Likewise.
21877         (arm_final_prescan_insn): Likewise.
21878         (arm_coproc_builtin_available): Likewise.
21879         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
21880         arm_arch5e with arm_arch5t and arm_arch5te.
21881         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
21882         (arm_arch5t, arm_arch5te): Declare.
21883         * config/arm/arm-tables.opt: Regenerate.
21884         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
21885         * config/arm/t-multilib: Likewise.
21886         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
21887         instead of arm_arch5.
21888         (*call_reg_thumb1): Likewise.
21889         (*call_value_reg_thumb1_v5): Likewise.
21890         (*call_value_reg_thumb1): Likewise.
21891         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
21892         unreachable path.
21893         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
21895 2018-05-18  Martin Liska  <mliska@suse.cz>
21897         PR gcov-profile/84846
21898         * doc/gcov.texi: Document -t option of gcov tool.
21900 2018-05-18  Martin Liska  <mliska@suse.cz>
21902         PR gcov-profile/84846
21903         * gcov.c (print_usage): Add new -t option.
21904         (process_args): Handle the option.
21905         (generate_results): Use stdout as output when requested by
21906         the option.
21908 2018-05-18  Martin Liska  <mliska@suse.cz>
21910         PR gcov-profile/84846
21911         * coverage.c (coverage_init): Write PWD to .gcno file.
21912         * doc/gcov.texi: Document how working directory is printed.
21913         * gcov-dump.c (dump_gcov_file): Print PWD.
21914         * gcov.c (output_intermediate_file): Likewise.
21915         (read_graph_file): Read PWD string.
21916         (output_lines): Print PWD.
21918 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21920         PR middle-end/85817
21921         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
21922         for retval and return false if all args to phi are zero.
21924 2018-05-18  Richard Biener  <rguenther@suse.de>
21926         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
21927         method.
21928         (evrp_dom_walker::before_dom_children): Call it.
21930 2018-05-18  Richard Biener  <rguenther@suse.de>
21932         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
21933         results when processing array refs with variable index.
21935 2018-05-18  Toon Moene  <toon@moene.org>
21937         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
21938         directly after that of -floop-interchange. Indicate that both
21939         options are enabled by default when specifying -O3.
21941 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21943         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
21944         iterator.  Delete separate integer-mode vec_set<mode> expander.
21945         (aarch64_simd_vec_setv2di): Delete.
21946         (vec_setv2di): Delete.
21947         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
21948         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
21949         the "w, r" alternative.
21951 2018-05-18  Martin Liska  <mliska@suse.cz>
21953         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
21954         * tree-pass.h (make_pass_lower_switch_O0): New function.
21955         * tree-switch-conversion.c (node_has_low_bound): Remove.
21956         (node_has_high_bound): Likewise.
21957         (node_is_bounded): Likewise.
21958         (class pass_lower_switch): Make it a template type and create
21959         two instances.
21960         (pass_lower_switch::execute): Add template argument.
21961         (make_pass_lower_switch): New function.
21962         (make_pass_lower_switch_O0): New function.
21963         (do_jump_if_equal): Remove.
21964         (emit_case_nodes): Simplify to just handle all 3 cases and leave
21965         all the hard work to tree optimization passes.
21967 2018-05-18  Martin Liska  <mliska@suse.cz>
21969         * dbgcnt.c (limit_low): Renamed from limit.
21970         (limit_high): New variable.
21971         (dbg_cnt_is_enabled): Check for upper limit.
21972         (dbg_cnt): Adjust dumping.
21973         (dbg_cnt_set_limit_by_index): Add new argument for high
21974         value.
21975         (dbg_cnt_set_limit_by_name): Likewise.
21976         (dbg_cnt_process_single_pair): Parse new format.
21977         (dbg_cnt_process_opt): Use strtok.
21978         (dbg_cnt_list_all_counters): Remove 'value' and add
21979         'limit_high'.
21980         * doc/invoke.texi: Document changes.
21982 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
21984         * doc/sourcebuild.texi (scalar_all_fma): Document.
21985         * tree.def (FMA_EXPR): Delete.
21986         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
21987         * internal-fn.c (ternary_direct): New macro.
21988         (expand_ternary_optab_fn): Likewise.
21989         (direct_ternary_optab_supported_p): Likewise.
21990         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
21991         * builtins.c (fold_builtin_fma): Delete.
21992         (fold_builtin_3): Don't call it.
21993         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
21994         * expr.c (expand_expr_real_2): Likewise.
21995         * fold-const.c (operand_equal_p): Likewise.
21996         (fold_ternary_loc): Likewise.
21997         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
21998         * gimple.c (DEFTREECODE): Likewise.
21999         * gimplify.c (gimplify_expr): Likewise.
22000         * optabs-tree.c (optab_for_tree_code): Likewise.
22001         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
22002         * tree-eh.c (operation_could_trap_p): Likewise.
22003         (stmt_could_throw_1_p): Likewise.
22004         * tree-inline.c (estimate_operator_cost): Likewise.
22005         * tree-pretty-print.c (dump_generic_node): Likewise.
22006         (op_code_prio): Likewise.
22007         * tree-ssa-loop-im.c (stmt_cost): Likewise.
22008         * tree-ssa-operands.c (get_expr_operands): Likewise.
22009         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
22010         * fold-const-call.h (fold_fma): Delete.
22011         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
22012         CFN_FNMA and CFN_FNMS.
22013         (fold_fma): Delete.
22014         * genmatch.c (combined_fn): New enum.
22015         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
22016         (commutative_op): New function.
22017         (commutate): Use it.  Handle more than 2 operands.
22018         (dt_operand::gen_gimple_expr): Use commutative_op.
22019         (parser::parse_expr): Allow :c to be used with non-binary
22020         operators if the commutative operand is known.
22021         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
22022         CFN_FMS, CFN_FNMA and CFN_FNMS.
22023         (backprop::process_assign_use): Remove FMA_EXPR handling.
22024         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
22025         (gen_hsa_fma): New function.
22026         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
22027         IFN_FNMA and IFN_FNMS.
22028         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
22029         * gimple-fold.h (follow_all_ssa_edges): Declare.
22030         * gimple-fold.c (follow_all_ssa_edges): New function.
22031         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
22032         gimple_build interface and use follow_all_ssa_edges to fold the result.
22033         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
22034         instead of checking for optabs directly.
22035         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
22036         rather than FMA_EXPRs.
22037         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
22038         call to IFN_FMA instead of an FMA_EXPR.
22040 2018-05-17  Jim Wilson  <jimw@sifive.com>
22042         * expr.c (do_tablejump): When converting index to Pmode, if we have a
22043         sign extended promoted subreg, and the range does not have the sign bit
22044         set, then do a sign extend.
22046         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
22047         test, check for sign extended subreg and/or constant operands, and
22048         do a sign extend in that case.
22050 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
22052         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
22053         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
22054         Add untyped.
22055         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
22056         Change logics_shift_reg to logics_shift_imm.
22057         (thunderx2t99_fp_loadpair_basic): Delete.
22058         (thunderx2t99_fp_storepair_basic): Delete.
22059         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
22060         (thunderx2t99_asimd_polynomial): Delete.
22061         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
22062         and neon_fp_mul_d_scalar_q.
22063         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
22064         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
22065         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
22066         (thunderx2t99_asimd_lut): Add missing tbl types.
22067         (thunderx2t99_asimd_ext): Delete.
22068         (thunderx2t99_asimd_load1_1_mult): Delete.
22069         (thunderx2t99_asimd_load1_2_mult): Delete.
22070         (thunderx2t99_asimd_load1_ldp): New.
22071         (thunderx2t99_asimd_load1): New.
22072         (thunderx2t99_asimd_load2): Add missing *load2* types.
22073         (thunderx2t99_asimd_load3): New.
22074         (thunderx2t99_asimd_load4): New.
22075         (thunderx2t99_asimd_store1_1_mult): Delete.
22076         (thunderx2t99_asimd_store1_2_mult): Delete.
22077         (thunderx2t99_asimd_store2_mult): Delete.
22078         (thunderx2t99_asimd_store2_onelane): Delete.
22079         (thunderx2t99_asimd_store_stp): New.
22080         (thunderx2t99_asimd_store1): New.
22081         (thunderx2t99_asimd_store2): New.
22082         (thunderx2t99_asimd_store3): New.
22083         (thunderx2t99_asimd_store4): New.
22085 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
22087         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
22088         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
22090 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
22091             Segher Boessenkool  <segher@kernel.crashing.org>
22093         PR target/85698
22094         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
22095         operand.
22097 2018-05-17  Richard Biener  <rguenther@suse.de>
22099         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
22100         for pruning loop and prune defs feeding only already visited PHIs.
22102 2018-05-17  Richard Biener  <rguenther@suse.de>
22104         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
22106 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
22107             Richard Biener  <rguenther@suse.de>
22109         PR tree-optimization/85793
22110         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
22111         for VMAT_ELEMENTWISE.
22113 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
22115         * internal-fn.h (lookup_internal_fn): Declare
22116         * internal-fn.c (lookup_internal_fn): New function.
22117         * gimple.c (gimple_build_call_from_tree): Handle calls to
22118         internal functions.
22119         * gimple-pretty-print.c (dump_gimple_call): Print "." before
22120         internal function names.
22121         * tree-pretty-print.c (dump_generic_node): Likewise.
22122         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
22124 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
22126         * gimple-fold.h (gimple_build): Make the function forms take
22127         combined_fn rather than built_in_function.
22128         (gimple_simplify): Likewise.
22129         * gimple-match-head.c (gimple_simplify): Likewise.
22130         * gimple-fold.c (gimple_build): Likewise.
22131         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
22132         rather than gimple_build_call_internal.
22133         (get_initial_defs_for_reduction): Likewise.
22134         (vect_create_epilog_for_reduction): Likewise.
22135         (vectorizable_live_operation): Likewise.
22137 2018-05-17  Martin Liska  <mliska@suse.cz>
22139         * gimple-ssa-sprintf.c (format_directive): Do not use
22140         space in between 'G_' and '('.
22142 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
22144         PR target/85323
22145         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
22146         even if the mask is not all ones.
22148         PR target/85323
22149         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
22150         vector.
22151         (ix86_gimple_fold_builtin): Likewise.
22153         PR target/85323
22154         * config/i386/i386.c: Include tree-vector-builder.h.
22155         (ix86_vector_shift_count): New function.
22156         (ix86_fold_builtin): Fold shift builtins by scalar count.
22157         (ix86_gimple_fold_builtin): Likewise.
22159         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
22160         _mm512_setzero): New intrinsics.
22162 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
22163             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22165         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
22166         code generation for cases where splatting a value is not useful.
22167         * simplify-rtx.c (simplify_ternary_operation): Simplify
22168         vec_merge across a vec_duplicate and a paradoxical subreg forming
22169         a vector mode to a vec_concat.
22171 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
22173         * config.gcc: Support "goldmont-plus".
22174         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
22175         "goldmont-plus".
22176         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
22177         PROCESSOR_GOLDMONT_PLUS.
22178         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
22179         (processor_target_table): Add "goldmont-plus".
22180         (PTA_GOLDMONT_PLUS): Define.
22181         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
22182         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
22183         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
22184         (fold_builtin_cpu): Add "goldmont-plus".
22185         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
22186         (ix86_option_override_internal): Add "goldmont-plus".
22187         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
22188         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
22189         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
22190         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
22192 2018-05-17  Richard Biener  <rguenther@suse.de>
22194         PR tree-optimization/85757
22195         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
22196         remove defs that only feed that PHI from further processing.
22198 2018-05-16  Jim Wilson  <jimw@sifive.com>
22200         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
22201         asterisk to name.
22202         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
22204 2018-05-16  Mark Wielaard  <mark@klomp.org>
22206         * dwarf2out.c (count_index_strings): New function.
22207         (output_indirect_strings): Call count_index_strings and generate
22208         header for dwarf_version >= 5.
22210 2018-05-16  Mark Wielaard  <mark@klomp.org>
22212         * dwarf2out.c (dwarf_FORM): New function.
22213         (set_indirect_string): Use dwarf_FORM.
22214         (reset_indirect_string): Likewise.
22215         (size_of_die): Likewise.
22216         (value_format): Likewise.
22217         (output_die): Likewise.
22218         (add_skeleton_AT_string): Likewise.
22219         (output_macinfo_op): Likewise.
22220         (index_string): Likewise.
22221         (output_index_string_offset): Likewise.
22222         (output_index_string): Likewise.
22223         (count_index_strings): Likewise.
22225 2018-05-16  Carl Love  <cel@us.ibm.com>
22227         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
22228         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
22230 2018-05-16  Martin Jambor  <mjambor@suse.cz>
22232         * ipa-prop.c (ipa_free_all_edge_args): Remove.
22233         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
22235 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
22237         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
22238         (fnma<mode>4): Likewise.
22239         (fms<mode>4): Likewise.
22240         (fnms<mode>4): Likewise.
22241         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
22242         (aarch64_fnma<mode>4): Likewise.
22243         (aarch64_fms<mode>4): Likewise.
22244         (aarch64_fnms<mode>4): Likewise.
22245         (aarch64_fnmadd<mode>4): Likewise.
22247 2018-05-16  Jason Merrill  <jason@redhat.com>
22249         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
22251 2018-05-16  Richard Biener  <rguenther@suse.de>
22253         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
22254         (dump_stmt_cost): Declare.
22255         (add_stmt_cost): Dump cost we add.
22256         (add_stmt_costs): New function.
22257         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
22258         No longer exported.
22259         (vect_analyze_stmt): Adjust prototype.
22260         (vectorizable_condition): Likewise.
22261         (vectorizable_live_operation): Likewise.
22262         (vectorizable_reduction): Likewise.
22263         (vectorizable_induction): Likewise.
22264         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
22265         cost vector to pass to vectorizable_ and record afterwards.
22266         (vect_model_reduction_cost): Take cost vector argument and adjust.
22267         (vect_model_induction_cost): Likewise.
22268         (vectorizable_reduction): Likewise.
22269         (vectorizable_induction): Likewise.
22270         (vectorizable_live_operation): Likewise.
22271         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
22272         SLP_TREE_NUMBER_OF_VEC_STMTS.
22273         (vect_analyze_slp_cost_1): Remove.
22274         (vect_analyze_slp_cost): Likewise.
22275         (vect_slp_analyze_node_operations): Take visited args and
22276         a target cost vector.  Avoid processing already visited stmt sets.
22277         (vect_slp_analyze_operations): Use a local cost vector to gather
22278         costs and register those of non-discarded instances.
22279         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
22280         (vect_schedule_slp_instance): Remove copying of
22281         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
22282         zero.
22283         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
22284         adding cost.  Record cost entry location.
22285         (vect_prologue_cost_for_slp_op): Function to compute cost of
22286         a constant or invariant generated for SLP vect in the prologue,
22287         split out from vect_analyze_slp_cost_1.
22288         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
22289         (vect_model_promotion_demotion_cost): Likewise.
22290         (vect_model_store_cost): Likewise, make static.
22291         (vect_model_load_cost): Likewise.
22292         (vectorizable_bswap): Add cost vector arg and adjust.
22293         (vectorizable_call): Likewise.
22294         (vectorizable_simd_clone_call): Likewise.
22295         (vectorizable_conversion): Likewise.
22296         (vectorizable_assignment): Likewise.
22297         (vectorizable_shift): Likewise.
22298         (vectorizable_operation): Likewise.
22299         (vectorizable_store): Likewise.
22300         (vectorizable_load): Likewise.
22301         (vectorizable_condition): Likewise.
22302         (vectorizable_comparison): Likewise.
22303         (can_vectorize_live_stmts): Likewise.
22304         (vect_analyze_stmt): Likewise.
22305         (vect_transform_stmt): Adjust calls to vectorizable_*.
22306         * tree-vectorizer.c: Include gimple-pretty-print.h.
22307         (dump_stmt_cost): New function.
22309 2018-05-16  Richard Biener  <rguenther@suse.de>
22311         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
22312         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
22313         * tree-ssa-dse.c: Include tree-ssa-loop.h.
22314         (check_name): New callback.
22315         (dse_classify_store): Track cycles via a visited bitmap of PHI
22316         defs and simplify handling of in-loop and across loop dead stores
22317         and properly fail for loop-variant refs.  Handle byte-tracking with
22318         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
22319         limiting the walk.
22321 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
22323         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
22324         (vect_get_mask_type_for_stmt): Likewise.
22325         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
22326         split out from...
22327         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
22328         to determine the statement's vector type and the vector type that
22329         should be used for calculating nunits.  Deal with cases in which
22330         the type has to be deferred.
22331         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
22332         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
22333         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
22334         (vect_determine_vf_for_stmt): New functions, split out from...
22335         (vect_determine_vectorization_factor): ...here.
22336         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
22337         (vect_get_mask_type_for_stmt): New functions, split out from
22338         vect_determine_vectorization_factor.
22340 2018-05-16  Richard Biener  <rguenther@suse.de>
22342         * tree-cfg.c (verify_gimple_assign_ternary): Properly
22343         verify the [VEC_]COND_EXPR embedded comparison.
22345 2018-05-15  Martin Sebor  <msebor@redhat.com>
22347         PR tree-optimization/85753
22348         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
22349         RECORD_TYPE in addition to ARRAY_TYPE.
22351 2018-05-15  Martin Sebor  <msebor@redhat.com>
22353         PR middle-end/85643
22354         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
22356 2018-05-15  Richard Biener  <rguenther@suse.de>
22358         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
22359         add by_clobber_p one.  Change algorithm to collect all defs
22360         representing uses we need to walk and try reducing them to
22361         a single one before failing.
22362         (dse_dom_walker::dse_optimize_stmt): Adjust.
22364 2018-05-13  Mark Wielaard  <mark@klomp.org>
22366         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
22367         (size_of_loc_descr): Likewise.
22368         (output_loc_operands): Likewise.
22369         (output_loc_operands_raw): Likewise.
22370         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
22371         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
22372         (hash_loc_operands): Likewise.
22373         (compare_loc_operands): Likewise.
22375 2018-05-14  Mark Wielaard  <mark@klomp.org>
22377         * dwarf2out.c (count_index_addrs): New function.
22378         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
22380 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
22382         PR tree-optimization/83648
22383         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
22384         return value as malloc candidate.
22386 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
22388         PR ipa/85734
22389         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
22390         param as true in call to suggest_attribute.
22392 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
22394         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
22395         -mreadonly-in-sdata.
22397 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22399         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
22400         New pattern.
22401         (aarch64_crypto_aesd_fused): Likewise.
22403 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
22405         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
22406         (movsi_aarch64): Likewise.
22407         (load_pairsi): Likewise.
22408         (load_pairdi): Likewise.
22409         (store_pairsi): Likewise.
22410         (store_pairdi): Likewise.
22411         (load_pairsf): Likewise.
22412         (load_pairdf): Likewise.
22413         (store_pairsf): Likewise.
22414         (store_pairdf): Likewise.
22415         (zero_extend): Likewise.
22416         (trunc): Swap alternatives.
22417         (fcvt_target): Add '?' to prefer w over r.
22419 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
22421         PR target/85756
22422         * config/i386/i386.md: Disallow non-commutative arithmetics in
22423         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
22424         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
22425         in the peephole2 before it.
22427 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
22429         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
22430         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
22431         (ix86_handle_option): Handle -mcldemote.
22432         * config.gcc: New header.
22433         * config/i386/cldemoteintrin.h: New file.
22434         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
22435         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
22436         -mcldemote.
22437         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
22438         OPTION_MASK_ISA_CLDEMOTE.
22439         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
22440         (ix86_valid_target_attribute_inner_p): Ditto.
22441         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
22442         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
22443         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
22444         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
22445         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
22446         (cldemote): New.
22447         * config/i386/i386.opt: Add -mcldemote.
22448         * config/i386/x86intrin.h: New header.
22449         * doc/invoke.texi: Add -mcldemote.
22451 2018-05-14  Richard Biener  <rguenther@suse.de>
22453         * doc/match-and-simplify.texi: Adjust :s documentation.
22455 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
22457         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
22458         intended memcpy size.
22459         (REORDER_45): Likewise.
22461 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
22463         * sort.cc: New file.
22464         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
22465         * vec.c (qsort_chk): Use gcc_qsort.
22466         * Makefile.in (OBJS-libcommon): Add sort.o.
22467         (build/sort.o): New target.  Use it...
22468         (BUILD_RTL): ... here, and...
22469         (build/gencfn-macros): ... here, and...
22470         (build/genmatch): ... here.
22472 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
22473             Chung-Ju Wu  <jasonwucj@gmail.com>
22475         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
22476         * config/nds32/nds32-graywolf.md: New file.
22477         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
22478         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
22479         pipeline.
22480         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
22481         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
22482         * config/nds32/nds32.md (pipeline_model): Add graywolf.
22483         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
22484         * config/nds32/pipelines.md: Include n15 settings.
22486 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
22487             Chung-Ju Wu  <jasonwucj@gmail.com>
22489         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
22490         * config/nds32/nds32-n13.md: New file.
22491         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
22492         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
22493         pipeline.
22494         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
22495         * config/nds32/nds32.md (pipeline_model): Add n13.
22496         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
22497         * config/nds32/pipelines.md: Include n13 settings.
22499 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
22500             Chung-Ju Wu  <jasonwucj@gmail.com>
22502         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
22503         * config/nds32/nds32-n10.md: New file.
22504         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
22505         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
22506         pipeline.
22507         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
22508         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
22509         * config/nds32/nds32.md (pipeline_model): Add n10.
22510         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
22511         * config/nds32/pipelines.md: Include n10 settings.
22513 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
22514             Kito Cheng  <kito.cheng@gmail.com>
22515             Chung-Ju Wu  <jasonwucj@gmail.com>
22517         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
22518         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
22519         Add enum values for DSP extension instructions.
22520         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
22521         New constraints.
22522         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
22523         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
22524         New code iterators.
22525         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
22526         * config/nds32/nds32-dspext.md: New file for DSP implementation.
22527         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
22528         * config/nds32/nds32-intrinsic.md: Likewise.
22529         * config/nds32/nds32_intrinsic.h: Likewise.
22530         * config/nds32/nds32-md-auxiliary.c: Likewise.
22531         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
22532         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
22533         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
22534         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
22535         * config/nds32/nds32-protos.h: New declarations for DSP extension.
22536         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
22537         TYPE_DMAC in switch statement.
22538         * config/nds32/nds32.c: New checking and implementation for DSP
22539         extension instructions.
22540         * config/nds32/nds32.h: Likewise.
22541         * config/nds32/nds32.md: Likewise.
22542         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
22543         * config/nds32/predicates.md: Implement new predicates for DSP
22544         extension.
22546 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
22548         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
22549         Reformat alternatives and attributes so it is easier to identify
22550         which constraints/attributes go with which instruction.
22551         (mov<mode>_hardfloat32, FMOVE64): Likewise.
22552         (mov<mode>_softfloat32, FMOVE64): Likewise.
22553         (mov<mode>_hardfloat64, FMOVE64): Likewise.
22554         (mov<mode>_softfloat64, FMOVE64): Likewise.
22556 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
22558         * doc/extend.texi (PowerPC Built-in Functions): Rename this
22559         subsection.
22560         (Basic PowerPC Built-in Functions): The new name of the
22561         subsection previously known as "PowerPC Built-in Functions".
22562         (Basic PowerPC Built-in Functions Available on all Configurations):
22563         New subsubsection.
22564         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
22565         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
22566         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
22567         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
22569 2018-05-11  Martin Jambor  <mjambor@suse.cz>
22571         PR ipa/85655
22572         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
22573         single const.
22575 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
22577         PR target/85733
22578         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
22580 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
22582         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
22583         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
22584         (ix86_handle_option): Handle -mwaitpkg.
22585         * config.gcc: New header.
22586         * config/i386/cpuid.h (bit_WAITPKG): New bit.
22587         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
22588         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
22589         function type.
22590         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
22591         OPTION_MASK_ISA_WAITPKG.
22592         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
22593         (ix86_option_override_internal): Add PTA_WAITPKG.
22594         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
22595         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
22596         IX86_BUILTIN_TPAUSE.
22597         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
22598         __builtin_ia32_umwait and __builtin_ia32_tpause.
22599         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
22600         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
22601         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
22602         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
22603         UNSPECV_TPAUSE): New.
22604         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
22605         * config/i386/i386.opt: Add -mwaitpkg.
22606         * config/i386/waitpkgintrin.h: New file.
22607         * config/i386/x86intrin.h: New header.
22608         * doc/invoke.texi: Add -mwaitpkg.
22610 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
22612         PR target/85606
22613         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
22614         equivalent.
22615         (cortex-m0): Use armv6s-m isa.
22616         (cortex-m0plus): Likewise.
22617         (cortex-m1): Likewise.
22618         (cortex-m0.small-multiply): Likewise.
22619         (cortex-m0plus.small-multiply): Likewise.
22620         (cortex-m1.small-multiply): Likewise.
22622 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
22623             Jakub Jelinek  <jakub@redhat.com>
22625         PR tree-optimization/85692
22626         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
22627         source permute as well.
22629 2018-05-11  Martin Liska  <mliska@suse.cz>
22631         PR sanitizer/85556
22632         * doc/extend.texi: Document LLVM style format for no_sanitize
22633         attribute.
22635 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
22637         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
22638         mode_supports_vsx_dform_quad to mode_supports_dq_form.
22639         (mode_supports_vsx_dform_quad): Likewise.
22640         (mode_supports_vmx_dform): Move these functions to be next to the
22641         other mode_supports functions.
22642         (mode_supports_dq_form): Likewise.
22643         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
22644         mode_supports_dq_form.
22645         (reg_offset_addressing_ok_p): Likewise.
22646         (offsettable_ok_by_alignment): Likewise.
22647         (rs6000_legitimate_offset_address_p): Likewise.
22648         (legitimate_lo_sum_address_p): Likewise.
22649         (rs6000_legitimize_address): Likewise.
22650         (rs6000_legitimize_reload_address): Likewise.
22651         (rs6000_secondary_reload_inner): Likewise.
22652         (rs6000_preferred_reload_class): Likewise.
22653         (rs6000_output_move_128bit): Likewise.
22655 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
22657         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
22658         Generate SImode target register for null target.
22659         <case IX86_BUILTIN_XGETBV>: Ditto.
22660         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
22661         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
22663 2018-05-10  Carl Love  <cel@us.ibm.com>
22665         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
22666         dcbtt and dcbtstt if operands[2] is 0.
22668 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
22670         PR target/85693
22671         * config/i386/sse.md (usadv64qi): New expander.
22673 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
22675         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
22676         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
22677         -maltivec=be support.
22678         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
22679         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
22680         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
22681         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
22682         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
22683         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
22684         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
22685         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
22686         altivec_vsumsws): Adjust.
22687         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
22688         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
22689         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
22690         support.
22691         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
22692         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
22693         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
22694         (altivec_lve<VI_char>x): Delete expand.
22695         (*altivec_lve<VI_char>x_internal): Rename to...
22696         (altivec_lve<VI_char>x): ... this.
22697         (altivec_lvxl_<mode>): Delete expand.
22698         (*altivec_lvxl_<mode>_internal): Rename to ...
22699         (altivec_lvxl_<mode>): ... this.
22700         (altivec_stvxl_<mode>): Delete expand.
22701         (*altivec_stvxl_<mode>_internal): Rename to ...
22702         (altivec_stvxl_<mode>): ... this.
22703         (altivec_stve<VI_char>x): Delete expand.
22704         (*altivec_stve<VI_char>x_internal): Rename to ...
22705         (altivec_stve<VI_char>x): ... this.
22706         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
22707         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
22708         reduc_plus_scal_<mode>): Adjust.
22709         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
22710         comment.
22711         (rs6000_cpu_cpp_builtins): Adjust.
22712         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
22713         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
22714         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
22715         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
22716         -maltivec=be support.
22717         (rs6000_split_vec_extract_var): Adjust.
22718         (rs6000_split_v4si_init): Adjust.
22719         (swap_selector_for_mode): Delete.
22720         (altivec_expand_lvx_be, altivec_expand_stvx_be,
22721         altivec_expand_stvex_be): Delete.
22722         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
22723         -maltivec=be support.
22724         (rs6000_gimple_fold_builtin): Ditto.
22725         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
22726         Adjust.
22727         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
22728         (TARGET_DIRECT_MOVE_64BIT): Adjust.
22729         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
22730         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
22731         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
22732         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
22733         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
22734         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
22735         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
22736         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
22737         anonymous split): Adjust.
22738         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
22739         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
22741 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
22743         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
22744         when --with-gxx-include-dir is also specified.
22745         * configure: Regenerate.
22747 2018-05-09  Jim Wilson  <jimw@sifive.com>
22749         PR target/84797
22750         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
22751         * config/riscv/t-withmultilib: New.
22752         * config/riscv/withmultilib.h: New.
22753         * doc/install.texi: Document RISC-V --with-multilib-list support.
22755 2018-05-09  Richard Biener  <rguenther@suse.de>
22757         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
22758         vector.
22759         (vect_bb_vectorization_profitable_p): Adjust.  Compute
22760         actual scalar cost using the cost vector and the add_stmt_cost
22761         machinery.
22763 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
22765         PR rtl-optimization/85645
22766         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
22767         in the REG_CFA_REGISTER note for LR, don't leave it empty.
22769 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
22771         PR rtl-optimization/85645
22772         * shrink-wrap.c (spread_components): Return a boolean saying if
22773         anything was changed.
22774         (try_shrink_wrapping_separate): Iterate spread_components until
22775         nothing changes anymore.
22777 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
22779         PR rtl-optimization/85645
22780         * regrename.c (build_def_use): Also kill the chains that include the
22781         destination of a REG_CFA_REGISTER note.
22783 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
22785         PR rtl-optimization/85645
22786         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
22787         insn that has a REG_CFA_REGISTER note.
22789 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
22791         * cfgexpand.c (expand_clobber): New function.
22792         (expand_gimple_stmt_1): Use it.
22793         * tree-vect-stmts.c (vect_clobber_variable): New function,
22794         split out from...
22795         (vectorizable_simd_clone_call): ...here.
22796         (vectorizable_store): Emit a clobber either side of an
22797         IFN_STORE_LANES sequence.
22798         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
22800 2018-05-09  Tom de Vries  <tom@codesourcery.com>
22802         PR target/85626
22803         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
22804         (define_insn "trap_if_false"): Add exit after trap.
22806 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
22808         PR rtl-optimization/85638
22809         * bb-reorder.c: Include common/common-target.h.
22810         (create_forwarder_block): New function extracted from...
22811         (fix_up_crossing_landing_pad): ...here.  Rename into...
22812         (dw2_fix_up_crossing_landing_pad): ...this.
22813         (sjlj_fix_up_crossing_landing_pad): New function.
22814         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
22815         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
22816         from both partitions and exit the loop after one iteration.
22818 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
22820         Revert:
22821         * doc/extend.texi (PowerPC Built-in Functions): Rename this
22822         subsection.
22823         (Basic PowerPC Built-in Functions): The new name of the
22824         subsection previously known as "PowerPC Built-in Functions".
22825         (Basic PowerPC Built-in Functions Available on all Configurations):
22826         New subsubsection.
22827         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
22828         subsubsection.
22829         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
22830         subsubsection.
22831         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
22832         subsubsection.
22833         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
22834         subsubsection.
22836 2018-05-08  Jim Wilson  <jimw@sifive.com>
22838         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
22839         (LD_EMUL_SUFFIX): New.
22840         (LINK_SPEC): Use it.
22842 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
22844         * doc/extend.texi (PowerPC Built-in Functions): Rename this
22845         subsection.
22846         (Basic PowerPC Built-in Functions): The new name of the
22847         subsection previously known as "PowerPC Built-in Functions".
22848         (Basic PowerPC Built-in Functions Available on all Configurations):
22849         New subsubsection.
22850         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
22851         subsubsection.
22852         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
22853         subsubsection.
22854         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
22855         subsubsection.
22856         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
22857         subsubsection.
22859 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
22861         PR target/85683
22862         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
22863         after cmpelim optimization.
22865 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
22867         * config.gcc: Support "goldmont".
22868         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
22869         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
22870         PROCESSOR_GOLDMONT.
22871         * config/i386/i386.c (m_GOLDMONT): Define.
22872         (processor_target_table): Add "goldmont".
22873         (PTA_GOLDMONT): Define.
22874         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
22875         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
22876         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
22877         (fold_builtin_cpu): Add "goldmont".
22878         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
22879         (ix86_option_override_internal): Add "goldmont".
22880         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
22881         (processor_type): Add PROCESSOR_GOLDMONT.
22882         * config/i386/i386.md: Add CPU "glm".
22883         * config/i386/glm.md: New file.
22884         * config/i386/x86-tune.def: Add m_GOLDMONT.
22885         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
22887 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
22889         PR target/85572
22890         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
22891         E_V4DImode.
22892         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
22893         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
22894         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
22896         PR target/85317
22897         * config/i386/i386.c (ix86_fold_builtin): Handle
22898         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
22900         PR target/85480
22901         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
22902         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
22904 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
22906         PR target/85658
22907         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
22908         (check_arch): Likewise.
22909         (check_fpu): Return the result rather than printing it.
22910         (end arch): Fix operator precedence.
22911         (end cpu): Likewise.
22912         (END): Print the result from check_fpu.
22914 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
22915             Alan Hayward  <alan.hayward@arm.com>
22916             David Sherwood  <david.sherwood@arm.com>
22918         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
22919         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
22920         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
22921         (*fcmuo<mode>_and): New patterns.
22923 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
22925         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
22926         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
22927         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
22928         (cmp_op, sve_imm_con): New code attributes.
22929         (SVE_COND_INT_CMP, imm_con): Delete.
22930         (cmp_op): Remove above unspecs from int attribute.
22931         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
22932         to...
22933         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
22934         comparison-specific unspecs.
22935         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
22936         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
22937         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
22938         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
22939         (*vec_fcm<cmp_op><mode>): Rename to...
22940         (*fcm<cmp_op><mode>): ...this and adjust likewise.
22941         (*vec_fcmuo<mode>): Rename to...
22942         (*fcmuo<mode>): ...this and adjust likewise.
22943         (*pred_fcm<cmp_op><mode>): New pattern.
22944         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
22945         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
22946         functions.
22947         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
22948         and UNORDERED.
22949         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
22950         (aarch64_emit_sve_predicated_cond): New function.
22951         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
22952         (aarch64_emit_unspec_cond_or): Replace with...
22953         (aarch64_emit_sve_or_conds): ...this new function.  Use
22954         aarch64_emit_sve_ptrue_op for the individual comparisons and
22955         aarch64_emit_binop to OR them together.
22956         (aarch64_emit_inverted_unspec_cond): Replace with...
22957         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
22958         aarch64_emit_sve_ptrue_op for the comparison and
22959         aarch64_emit_unop to invert the result.
22960         (aarch64_expand_sve_vec_cmp_float): Update after the above
22961         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
22963 2018-05-07  Nathan Sidwell  <nathan@acm.org>
22965         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
22966         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
22967         (Backwards Compatibility): Likewise.
22969 2018-05-07  Luis Machado  <luis.machado@linaro.org>
22971         PR bootstrap/85681
22972         Revert:
22973         2018-05-07  Luis Machado  <luis.machado@linaro.org>
22975         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
22976         <prefetch_dynamic_strides>: New const bool field.
22977         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
22978         prefetch_dynamic_strides.
22979         (exynosm1_prefetch_tune): Likewise.
22980         (thunderxt88_prefetch_tune): Likewise.
22981         (thunderx_prefetch_tune): Likewise.
22982         (thunderx2t99_prefetch_tune): Likewise.
22983         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
22984         to false.
22985         (aarch64_override_options_internal): Update to set
22986         PARAM_PREFETCH_DYNAMIC_STRIDES.
22987         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
22988         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
22989         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
22990         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
22991         prefetch-dynamic-strides setting.
22993         2018-05-07  Luis Machado  <luis.machado@linaro.org>
22995         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
22996         <minimum_stride>: New const int field.
22997         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
22998         minimum_stride field.
22999         (exynosm1_prefetch_tune): Likewise.
23000         (thunderxt88_prefetch_tune): Likewise.
23001         (thunderx_prefetch_tune): Likewise.
23002         (thunderx2t99_prefetch_tune): Likewise.
23003         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
23004         (aarch64_override_options_internal): Update to set
23005         PARAM_PREFETCH_MINIMUM_STRIDE.
23006         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
23007         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
23008         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
23009         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
23010         stride is constant and is below the minimum stride threshold.
23012 2018-05-07  Luis Machado  <luis.machado@linaro.org>
23014         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
23015         to 512.
23017 2018-05-07  Luis Machado  <luis.machado@linaro.org>
23019         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
23020         <prefetch_dynamic_strides>: New const bool field.
23021         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
23022         prefetch_dynamic_strides.
23023         (exynosm1_prefetch_tune): Likewise.
23024         (thunderxt88_prefetch_tune): Likewise.
23025         (thunderx_prefetch_tune): Likewise.
23026         (thunderx2t99_prefetch_tune): Likewise.
23027         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
23028         to false.
23029         (aarch64_override_options_internal): Update to set
23030         PARAM_PREFETCH_DYNAMIC_STRIDES.
23031         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
23032         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
23033         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
23034         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
23035         prefetch-dynamic-strides setting.
23037 2018-05-07  Luis Machado  <luis.machado@linaro.org>
23039         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
23040         <minimum_stride>: New const int field.
23041         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
23042         minimum_stride field.
23043         (exynosm1_prefetch_tune): Likewise.
23044         (thunderxt88_prefetch_tune): Likewise.
23045         (thunderx_prefetch_tune): Likewise.
23046         (thunderx2t99_prefetch_tune): Likewise.
23047         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
23048         (aarch64_override_options_internal): Update to set
23049         PARAM_PREFETCH_MINIMUM_STRIDE.
23050         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
23051         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
23052         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
23053         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
23054         stride is constant and is below the minimum stride threshold.
23056 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
23058         PR c++/85659
23059         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
23060         the type is addressable.  Don't force op into register if it has
23061         BLKmode.
23063 2018-05-05  Roland McGrath  <mcgrathr@google.com>
23065         PR other/77609
23066         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
23067         any section for which we don't know a specific type it should have,
23068         regardless of name.  Previously this was done only for the exact
23069         names ".init_array", ".fini_array", and ".preinit_array".
23070         (default_elf_asm_named_section): Add comment about
23071         relationship with default_section_type_flags and SECTION_NOTYPE.
23072         (get_section): Don't consider it a type conflict if one side has
23073         SECTION_NOTYPE and the other doesn't, as long as neither has the
23074         SECTION_BSS et al used in the default_section_type_flags logic.
23076 2018-05-05  Tom de Vries  <tom@codesourcery.com>
23078         PR target/85653
23079         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
23080         (workaround_barsyncs): New function.
23081         (nvptx_reorg): Use workaround_barsyncs.
23082         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
23083         (define_expand "nvptx_membar_cta"): New define_expand.
23084         (define_insn "*nvptx_membar_cta"): New insn.
23086 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
23088         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
23089         To improve optimization opportunities.
23090         * builtin-types.def: The new needed builtin types for the above.
23092 2018-05-04  Richard Biener  <rguenther@suse.de>
23094         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
23095         * gimple-ssa-store-merging.c
23096         (imm_store_chain_info::output_merged_store): Remove redundant create,
23097         release split_store vector contents on failure.
23098         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
23099         scalar stmt vector on cache hit.
23101 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
23103         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
23104         Xilinx FP support.
23105         * config.gcc (powerpc-xilinx-eabi*): Remove.
23106         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
23107         support.
23108         (fusion_addis_mem_combo_load): Ditto.
23109         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
23110         FP support.
23111         (rs6000_cpu_cpp_builtins): Ditto.
23112         * config/rs6000/rs6000-linux.c
23113         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
23114         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
23115         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
23116         support.
23117         (rs6000_setup_reg_addr_masks): Ditto.
23118         (rs6000_init_hard_regno_mode_ok): Ditto.
23119         (rs6000_option_override_internal): Ditto.
23120         (legitimate_lo_sum_address_p): Ditto.
23121         (rs6000_legitimize_address): Ditto.
23122         (rs6000_legitimize_reload_address): Ditto.
23123         (rs6000_legitimate_address_p): Ditto.
23124         (abi_v4_pass_in_fpr): Ditto.
23125         (setup_incoming_varargs): Ditto.
23126         (rs6000_gimplify_va_arg): Ditto.
23127         (rs6000_split_multireg_move): Ditto.
23128         (rs6000_savres_strategy): Ditto.
23129         (rs6000_emit_prologue_components): Ditto.
23130         (rs6000_emit_epilogue_components): Ditto.
23131         (rs6000_emit_prologue): Ditto.
23132         (rs6000_emit_epilogue): Ditto.
23133         (rs6000_elf_file_end): Ditto.
23134         (rs6000_function_value): Ditto.
23135         (rs6000_libcall_value): Ditto.
23136         * config/rs6000/rs6000.h: Ditto.
23137         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
23138         (TARGET_MINMAX): ... this.  New.
23139         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
23140         * config/rs6000/rs6000.md: Remove Xilinx FP support.
23141         (*movsi_internal1_single): Delete.
23142         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
23143         mfpu=, mxilinx-fpu): Delete.
23144         * config/rs6000/singlefp.h: Delete.
23145         * config/rs6000/sysv4.h: Remove Xilinx FP support.
23146         * config/rs6000/t-rs6000: Ditto.
23147         * config/rs6000/t-xilinx: Delete.
23148         * config/rs6000/titan.md: Adjust for fp_type removal.
23149         * config/rs6000/vsx.md: Remove Xilinx FP support.
23150         (VStype_simple): Delete.
23151         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
23152         * config/rs6000/xfpu.h: Delete.
23153         * config/rs6000/xfpu.md: Delete.
23154         * config/rs6000/xilinx.h: Delete.
23155         * config/rs6000/xilinx.opt: Delete.
23156         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
23157         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
23159 2018-05-04  Tom de Vries  <tom@codesourcery.com>
23161         PR libgomp/85639
23162         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
23163         if ignore == 0.
23165 2018-05-04  Richard Biener  <rguenther@suse.de>
23167         PR middle-end/85627
23168         * tree-complex.c (update_complex_assignment): We are always in SSA form.
23169         (expand_complex_div_wide): Likewise.
23170         (expand_complex_operations_1): Likewise.
23171         (expand_complex_libcall): Preserve EH info of the original stmt.
23172         (tree_lower_complex): Handle removed blocks.
23173         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
23174         on complex multiplication and division libcall builtins.
23176 2018-05-04  Richard Biener  <rguenther@suse.de>
23178         PR middle-end/85574
23179         * fold-const.c (negate_expr_p): Restrict negation of operand
23180         zero of a division to when we know that can happen without
23181         overflow.
23182         (fold_negate_expr_1): Likewise.
23184 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
23186         PR libstdc++/85466
23187         * real.h (real_nextafter): Declare.
23188         * real.c (real_nextafter): New function.
23189         * fold-const-call.c (fold_const_nextafter): New function.
23190         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
23191         CASE_CFN_NEXTTOWARD.
23192         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
23193         even when arg1_mode is different from arg0_mode.
23195 2018-05-03  Nathan Sidwell  <nathan@acm.org>
23197         * doc/extend.texi (Deprecated Features): Remove
23198         -ffriend-injection.
23199         (Backwards Compatibility): Likewise.
23200         * doc/invoke.texi (C++ Language Options): Likewise.
23201         (C++ Dialect Options): Likewise.
23203 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
23205         PR target/85530
23206         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
23207         _mm512_mask_mullox_epi64): New intrinsics.
23209 2018-05-03  Tom de Vries  <tom@codesourcery.com>
23211         PR testsuite/85106
23212         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
23213         dump files): Add offload-tree.
23215 2018-05-03  Richard Biener  <rguenther@suse.de>
23217         PR tree-optimization/85615
23218         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
23219         to loops not nested in BBs loop father to avoid creating multi-entry
23220         loops.
23222 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23224         PR tree-optimization/70291
23225         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
23226         arguments.  Change return type to tree.  Emit libcall as a new
23227         statement rather than replacing existing one when inplace_p is true.
23228         (expand_complex_multiplication_components): New function.
23229         (expand_complex_multiplication): Expand floating-point complex
23230         multiplication using the above.
23231         (expand_complex_division): Rename inner_type parameter to type.
23232         Update expand_complex_libcall call-site.
23233         (expand_complex_operations_1): Update expand_complex_multiplication
23234         and expand_complex_division call-sites.
23236 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
23238         PR target/85582
23239         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
23240         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
23241         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
23242         the highest significant bit of the shift count mask is clear.  In
23243         check whether and[sq]i3 is needed verify that all significant bits
23244         of the shift count other than the highest are set.
23246 2018-05-02  Tom de Vries  <tom@codesourcery.com>
23248         PR libgomp/82428
23249         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
23250         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
23251         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
23252         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
23253         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
23254         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
23255         __builtin_goacc_parlevel_size.
23257 2018-05-02  Richard Biener  <rguenther@suse.de>
23259         PR tree-optimization/85597
23260         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
23261         do not use split vect_get_vec_defs call but call vect_get_slp_defs
23262         directly.
23264 2018-05-02  Tom de Vries  <tom@codesourcery.com>
23266         PR testsuite/85106
23267         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
23268         dump files): Add ltrans-tree.
23270 2018-05-02  Tom de Vries  <tom@codesourcery.com>
23272         PR testsuite/85106
23273         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
23274         dump files): Add wpa-ipa.
23276 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
23278         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
23279         powerpc*-*-linux*paired* target.
23280         * config/rs6000/750cl.h: Delete.
23281         * config/rs6000/paired.h: Delete.
23282         * config/rs6000/paired.md: Delete.
23283         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
23284         float support.
23285         * config/rs6000/rs6000-builtin.def: Remove paired float support.
23286         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
23287         comment.  Remove paired float support.
23288         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
23289         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
23290         VECTOR_PAIRED.
23291         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
23292         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
23293         declarations.
23294         * config/rs6000/rs6000.c: Remove paired float support.
23295         (paired_expand_vector_init, paired_expand_vector_move,
23296         paired_emit_vector_compare, paired_emit_vector_cond_expr,
23297         (paired_expand_lv_builtin, paired_expand_stv_builtin,
23298         paired_expand_builtin, paired_expand_predicate_builtin,
23299         paired_init_builtins): Delete.
23300         * config/rs6000/rs6000.h: Remove paired float support.
23301         * config/rs6000/rs6000.md: Remove paired float support.
23302         (move_from_CR_ov_bit): Delete.
23303         * config/rs6000/rs6000.opt (mpaired): Delete.
23304         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
23305         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
23307 2018-05-02  Richard Biener  <rguenther@suse.de>
23309         PR middle-end/85567
23310         * gimplify.c (gimplify_save_expr): When in SSA form allow
23311         SAVE_EXPRs to compute to SSA vars.
23313 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
23315         PR target/85582
23316         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
23317         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
23318         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
23319         clobber operands[2], instead use a new pseudo.  Formatting fixes.
23321 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
23323         PR tree-optimization/85586
23324         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
23325         exit early for statements in the same group if the accesses are
23326         not strided.
23328 2018-05-02  Tom de Vries  <tom@codesourcery.com>
23330         PR lto/85451
23331         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
23332         error message.
23334 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
23336         PR tree-optimization/85143
23337         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
23339 2018-05-01  Tom de Vries  <tom@codesourcery.com>
23341         PR lto/85451
23342         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
23343         not found" error message.
23345 2018-05-01  Tom de Vries  <tom@codesourcery.com>
23347         PR other/83786
23348         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
23349         * vec.c (test_ordered_remove_if): New function.
23350         (vec_c_tests): Call test_ordered_remove_if.
23351         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
23352         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
23353         * tree-vect-patterns.c (vect_pattern_recog_1): Use
23354         VEC_ORDERED_REMOVE_IF.
23356 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
23358         PR tree-optimization/82665
23359         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
23360         pointer subtraction where arguments come from a memchr call.
23362 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
23364         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
23365         --push-state --as-needed and --pop-state instead of --as-needed and
23366         --no-as-needed if ld supports it.
23367         * configure: Regenerated.
23369         PR web/85578
23370         * doc/install.texi2html: Replace _002d with - and _002a with * in
23371         generated html files using sed.
23373 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
23375         PR c++/85523
23376         * gcc-rich-location.c (blank_line_before_p): New function.
23377         (use_new_line): New function.
23378         (gcc_rich_location::add_fixit_insert_formatted): New function.
23379         * gcc-rich-location.h
23380         (gcc_rich_location::add_fixit_insert_formatted): New function.
23382 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
23384         * selftest.c (assert_streq): Rename "expected" and "actual" to
23385         "val1" and "val2".  Extend NULL-handling to cover both inputs
23386         symmetrically, while still requiring both to be non-NULL for a pass.
23387         * selftest.h (assert_streq): Rename "expected" and "actual" to
23388         "val1" and "val2".
23389         (ASSERT_EQ): Likewise.
23390         (ASSERT_EQ_AT): Likewise.
23391         (ASSERT_KNOWN_EQ): Likewise.
23392         (ASSERT_KNOWN_EQ_AT): Likewise.
23393         (ASSERT_NE): Likewise.
23394         (ASSERT_MAYBE_NE): Likewise.
23395         (ASSERT_MAYBE_NE_AT): Likewise.
23396         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
23397         the assertion to pass.
23398         (ASSERT_STREQ_AT): Likewise.
23400 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
23402         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
23403         interaction with -pie.
23405 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
23407         * selftest.h: Fix alphabetization of per-source-file selftest
23408         declarations.
23410 2018-04-30  Jason Merrill  <jason@redhat.com>
23412         PR c++/61982 - dead stores to destroyed objects.
23413         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
23414         of clobber.
23416 2018-04-30  Jason Merrill  <jason@redhat.com>
23418         * tree.c (build_clobber): New.
23419         * tree.h: Declare it.
23420         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
23422 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
23424         * diagnostic-show-locus.c (layout::layout): Update for
23425         location_get_source_line returning a char_span.
23426         (struct char_span): Move to input.h.
23427         (struct correction): Update for fields in char_span becoming
23428         private.
23429         (struct source_line): Update for location_get_source_line
23430         returning a char_span.
23431         (layout::print_line): Likewise.
23432         * edit-context.c (edited_file::print_content): Likewise.
23433         (edited_file::print_diff_hunk): Likewise.
23434         (edited_file::print_run_of_changed_lines): Likewise.
23435         (edited_file::get_num_lines): Likewise.
23436         (edited_line::edited_line): Likewise.
23437         * final.c (asm_show_source): Likewise.
23438         * input.c (location_get_source_line): Convert return type
23439         from const char * to char_span, losing the final "line_len"
23440         param.
23441         (dump_location_info): Update for the above.
23442         (get_substring_ranges_for_loc): Likewise.  Use a char_span
23443         when handling the literal within the line.
23444         (test_reading_source_line): Update for location_get_source_line
23445         returning a char_span.
23446         * input.h (class char_span): Move here from
23447         diagnostic-show-locus.c, converting from a struct to a class.
23448         Make data members private.
23449         (char_span::operator bool): New.
23450         (char_span::length): New.
23451         (char_span::get_buffer): New.
23452         (char_span::operator[]): New.
23453         (char_span::subspan): Make const.
23454         (char_span::xstrdup): New.
23455         (location_get_source_line): Convert return type from const char *
23456         to char_span, losing the final "line_size" param.
23458 2018-04-30  Jan Hubicka  <jh@suse.cz>
23460         * lto-wrapper.c (ltrans_priorities): New static var.
23461         (cmp_priority): New.
23462         (run_gcc): Read priorities and if doing parallel build order
23463         the Makefile by them.
23465 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
23467         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
23469 2018-04-30  Richard Biener  <rguenther@suse.de>
23471         * tree-cfg.c (verify_address): Remove base argument, add
23472         flag whether to check TREE_ADDRESSABLE and do that.
23473         (verify_expr): Remove.
23474         (verify_types_in_gimple_reference): Add pieces from verify_expr.
23475         (verify_gimple_assign_single): Likewise.
23476         (verify_gimple_switch): Likewise.
23477         (verify_expr_location_1): Dereference tp once.  Add (disabled)
23478         piece from verify_expr.
23479         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
23481 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
23483         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
23485 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
23487         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
23488         (small_data_pattern): Likewise.
23489         (arc_rewrite_small_data): Likewise.
23490         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
23491         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
23492         (get_symbol_alignment): New function.
23493         (legitimate_small_data_address_p): Likewise.
23494         (legitimate_scaled_address): Update, call
23495         legitimate_small_data_address_p.
23496         (output_sdata): New static variable.
23497         (arc_print_operand): Update how we handle small data operands.
23498         (arc_print_operand_address): Likewise.
23499         (arc_legitimate_address_p): Update, use
23500         legitimate_small_data_address_p.
23501         (arc_rewrite_small_data_p): Remove.
23502         (arc_rewrite_small_data_1): Likewise.
23503         (arc_rewrite_small_data): Likewise.
23504         (small_data_pattern): Likewise.
23505         (compact_sda_memory_operand): Update to use
23506         legitimate_small_data_address_p and get_symbol_alignment.
23507         (prepare_move_operands): Don't rewite sdata pattern.
23508         (prepare_extend_operands): Remove.
23509         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
23510         pattern.
23511         (zero_extendqisi2): Likewise.
23512         (zero_extendhisi2): Likewise.
23513         (extendqihi2): Likewise.
23514         (extendqisi2): Likewise.
23515         (extendhisi2): Likewise.
23516         (addsi3): Likewise.
23517         (subsi3): Likewise.
23518         (andsi3): Likewise.
23519         * config/arc/constraints.md (Usd): Change it to memory constraint.
23521 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
23523         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
23524         as source of std instructions.
23525         * config/arc/arc.md (movsi_insn): Update pattern predicate to
23526         allow 6-bit constants as source for store instructions.
23527         (movdi_insn): Update instruction pattern to allow 6-bit constants
23528         as source for store instructions.
23530 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
23532         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
23534 2018-04-30  Nathan Sidwell  <nathan@acm.org>
23535             Sandra Loosemore <sandra@codesourcery.com>
23537         * dumpfile.c (dump_open): Allow '-' for stdout.
23538         * doc/invoke.texi (Developer Options): Document dump filename
23539         determination early.  Document stdin/stdout selection.
23541 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
23543         Microblaze Target: PIC data text relative
23545         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
23546         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
23547         Add declaration.
23548         * config/microblaze/microblaze.h (microblaze_constant_address_p):
23549         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
23550         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
23551         New addressing mode for data-text relative position indepenedent code.
23552         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
23553         'ADDRESS_SYMBOLIC_TXT_REL'.
23554         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
23555         (microblaze_legitimate_pic_operand): Exclude function calls from
23556         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
23557         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
23558         addresses cases.
23559         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
23560         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
23561         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
23562         for 'address + offset'.
23563         (microblaze_expand_prologue): Add new function prologue call for
23564         'r20' assignation.
23565         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
23566         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
23567         table in case of TARGET_PIC_DATA_TEXT_REL.
23568         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
23569         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
23570         Add new macros 'UNSPEC_TEXT',
23571         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
23572         + exclude function calls from 'UNSPEC_PLT' in case of data text
23573         relative mode.
23574         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
23575         new target hook for generating address diff vector tables in case of
23576         flag_pic.
23577         * doc/tm.texi : Regenerate.
23578         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
23579         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
23580         of addr diff vector generation.
23581         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
23582         target hook definition.
23583         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
23584         Add default function for generate_pic_addr_diff_vec -> flag_pic.
23585         * doc/invoke.texi (Add new pic option): Add new microblaze pic
23586         option for data text relative.
23588 2018-04-30  Richard Biener  <rguenther@suse.de>
23590         * tree-chrec.h (evolution_function_is_constant_p): Remove
23591         redundant check.
23592         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
23594 2018-04-30  Richard Biener  <rguenther@suse.de>
23596         PR bootstrap/85571
23597         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
23599 2018-04-30  Richard Biener  <rguenther@suse.de>
23601         PR tree-optimization/28364
23602         PR tree-optimization/85275
23603         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
23604         copying first exit test.
23606 2018-04-28  Mark Wielaard  <mark@klomp.org>
23608         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
23609         dwarf_version >= 5.
23610         (dwarf_AT): Handle DW_AT_addr_base.
23611         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
23613 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
23615         PR target/84431
23616         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
23617         (*ashl<dwi>3_doubleword_mask_1): Ditto.
23618         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
23619         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
23621 2018-04-28  Richard Biener  <rguenther@suse.de>
23623         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
23624         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
23625         to reflect use.  Only add interesting stmts.
23627 2018-04-27  Martin Jambor  <mjambor@suse.cz>
23629         PR ipa/85549
23630         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
23631         the jump function allows for passing through aggregate values.
23633 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
23635         * input.h (in_system_header_at): Convert from macro to inline
23636         function.
23637         (from_macro_expansion_at): Likewise.
23638         (from_macro_definition_at): Likewise.
23640 2018-04-27  Jeff Law  <law@redhat.com>
23642         * config.gcc: Mark tile* targets as deprecated/obsolete.
23644 2018-04-27  Richard Biener  <rguenther@suse.de>
23646         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
23647         fix for ILP32.
23649 2018-04-27  Richard Biener  <rguenther@suse.de>
23651         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
23653 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
23655         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
23656         with Yd constraint. Set "preferred_for_speed" attribute from
23657         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
23658         with Yd constraint.
23659         (*movdi_internal): Ditto.
23660         (movti_interunit splitters): Remove
23661         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
23662         (movdi_interunit splitters): Ditto.
23663         * config/i386/constraints.md (Ye): Remove.
23664         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
23666 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23668         PR target/85512
23669         * config/aarch64/constraints.md (Usg): Limit to 31.
23670         (Usj): Limit to 63.
23672 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
23674         PR tree-optimization/85529
23675         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
23676         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
23677         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
23678         zero extension or masking of the MSB bit.
23679         (optimize_range_tests): Add FIRST_BB argument, pass it through
23680         to optimize_range_tests_var_bound.
23681         (maybe_optimize_range_tests, reassociate_bb): Adjust
23682         optimize_range_tests callers.
23684 2018-04-26  Richard Biener  <rguenther@suse.de>
23685             Jakub Jelinek  <jakub@redhat.com>
23687         * cgraph.h (symbol_table): Just declare debug method here.
23688         * symtab.c (symbol_table::debug): Define.
23690 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
23692         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
23694 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
23696         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
23697         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
23698         (*movdi_internal): Substitute Yi and Yj constraint with x
23699         and Ym and Yn constraint with y constraint.  Update "isa"
23700         attribute and set "preferred_for_speed" attribute from
23701         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
23702         (*movsi_internal): Ditto.
23703         (*movdf_internal): Ditto.
23704         (*movsf_internal): Ditto.
23705         (*zero_extendsidi2): Ditto.
23706         * config/i386/sse.md (vec_set<mode>_0): Ditto.
23707         (sse2_loadld): Ditto.
23708         (*vec_extract<ssevecmodelower>_0): Ditto.
23709         (*vec_extractv4si_0_zext_sse4): Ditto.
23710         (vec_concatv2di): Ditto.
23711         (*vec_dup<mode>): Ditto.
23712         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
23713         * config/i386/constraints.md (Yi): Remove.
23714         (Yj): Remove.
23715         (Ym): Remove.
23716         (Yn): Remove.
23718 2018-04-26  Nathan Sidwell  <nathan@acm.org>
23720         * dumpfile.c (dump_open): New.
23721         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
23722         (dump_finish): Detect stdio/stderr by value not name.
23724 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
23726         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
23728 2018-04-26  Tom de Vries  <tom@codesourcery.com>
23730         PR target/84952
23731         * config/nvptx/nvptx.c (verify_neutering_jumps)
23732         (verify_neutering_labels): New function
23733         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
23735 2018-04-26  Tom de Vries  <tom@codesourcery.com>
23737         PR target/84025
23738         * config/nvptx/nvptx.c (needs_neutering_p): New function.
23739         (nvptx_single): Use needs_neutering_p to skip over insns that do not
23740         need neutering.
23742 2018-04-26  Richard Biener <rguenther@suse.de>
23743             Tom de Vries  <tom@codesourcery.com>
23745         PR lto/85422
23746         * lto-streamer-out.c (output_function): Fixup loops if required to match
23747         discovery done in the reader.
23749 2018-04-26  Richard Biener  <rguenther@suse.de>
23751         PR tree-optimization/85116
23752         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
23753         have a loop exit from the single latch predecessor.  Remove
23754         case of header with just condition.
23755         (ch_base::copy_headers): Exclude infinite loops from any
23756         processing.
23757         (pass_ch::execute): Record exits.
23759 2018-04-26  Richard Biener  <rguenther@suse.de>
23761         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
23762         prologue cost vector and pass it to vect_get_load_cost.
23763         (vect_get_peeling_costs_all_drs): Likewise.
23764         (vect_peeling_hash_get_lowest_cost): Likewise.
23765         (vect_enhance_data_refs_alignment): Likewise.
23767 2018-04-26  Richard Biener  <rguenther@suse.de>
23769         PR middle-end/85450
23770         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
23771         checking of integer<->pointer conversions.
23772         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
23773         sign-/zero-extending pointer types.
23774         (expand_omp_for_static_chunk): Likewise.
23776 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
23777             Jean Lee  <xiaoyur347@gmail.com>
23779         * config/mips/mips.c (mips_asan_shadow_offset): New function.
23780         (TARGET_ASAN_SHADOW_OFFSET): Define.
23781         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
23782         true for -fsanitize=address.
23784 2018-04-25  Mark Wielaard  <mark@klomp.org>
23786         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
23787         shorter ones.
23789 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
23791         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
23792         than "alu", remove explicit "memory" and "imm_disp" attributes.
23793         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
23795         PR middle-end/85414
23796         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
23797         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
23798         gen_lowpart_no_emit.
23800 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
23802         PR target/85473
23803         * config/i386/i386.c (ix86_expand_builtin): Change memory
23804         operand to XI, extend p0 to Pmode.
23805         * config/i386/i386.md: Change unspec volatile and operand
23806         1 mode to XI, change operand 0 mode to P.
23808 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
23810         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
23811         GET_MODE_MASK before any checking.
23812         (nds32_can_use_bset_p): Likewise.
23813         (nds32_can_use_btgl_p): Likewise.
23815 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
23817         * config/nds32/nds32-doubleword.md: New define_split pattern for
23818         illegal register number.
23820 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
23822         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
23824 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
23826         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
23828 2018-04-25  Richard Biener  <rguenther@suse.de>
23830         * lto-streamer.h (LTO_major_version): Bump to 8.
23832 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
23834         * BASE-VER: Set to 9.0.0.
23836 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
23838         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
23839         in __abskf2 and __powikf2.
23841 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23843         PR target/85512
23844         * config/aarch64/constraints.md (Usg, Usj): New constraints.
23845         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
23846         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
23847         Use the above on operand 2.  Reindent.
23848         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
23850 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
23852         PR target/85485
23853         * common/config/i386/i386-common.c (ix86_handle_option): Don't
23854         handle OPT_mcet.
23855         * config/i386/i386.opt (mcet): Removed.
23856         * doc/install.texi: Remove -mcet documentation.
23857         * doc/invoke.texi: Likewise.
23859 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
23861         PR target/85485
23862         * doc/install.texi: Remove -mcet from bootstrap-cet.
23864 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
23866         PR target/85511
23867         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
23868         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
23869         if TARGET_64BIT.
23871         PR target/85503
23872         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
23873         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
23874         containing a CONST_VECTOR.
23876 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
23878         * doc/install.texi: Update newlib dependency for nvptx.
23880 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
23882         PR target/85508
23883         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
23884         instead of INTVAL when shifting x left.
23886 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
23888         PR tree-optimization/85478
23889         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
23890         vect_grouped_store_supported for single element vectors.
23892 2018-04-24  Richard Biener  <rguenther@suse.de>
23894         PR target/85491
23895         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
23896         load cost increase to the case of non-constant step.
23898 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
23900         PR target/84828
23901         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
23902         destination if any_malformed_asm.
23904 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
23906         PR middle-end/85496
23907         * expr.c (store_field): In the bitfield case, if the value comes from
23908         a function call and is returned in registers by means of a PARALLEL,
23909         do not change the mode of the temporary unless BLKmode and VOIDmode.
23911 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
23913         PR rtl-optimization/85423
23914         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
23915         dependencies to debug insns when the previous insn is non-debug.
23917 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
23919         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
23920         enums into a single definition.
23921         (fls): Fix predicates and printing.
23922         (seti): Likewise.
23924 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
23926         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
23927         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
23928         and short u6 immediate.
23929         (check_if_valid_sleep_operand): Remove.
23930         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
23932 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
23934         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
23935         flag_always_save_lp condition.
23936         * config/nds32/nds32.opt (malways-save-lp): New option.
23938 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
23940         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
23941         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
23942         * config/nds32/nds32.h
23943         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
23944         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
23946 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
23948         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
23949         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
23951 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
23952             Chung-Ju Wu  <jasonwucj@gmail.com>
23954         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
23955         Declare.
23956         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
23957         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
23959 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
23961         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
23963 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
23965         * config/nds32/nds32-protos.h (nds32_data_alignment,
23966         nds32_local_alignment): Declare.
23967         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
23968         nds32_local_alignment): New functions.
23969         (TARGET_CONSTANT_ALIGNMENT): Define.
23970         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
23972 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
23974         * config/nds32/nds32.c
23975         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
23976         (TARGET_MODES_TIEABLE_P): Likewise.
23978 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
23980         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
23981         level Ofast and Og.
23983 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
23984             Chung-Ju Wu  <jasonwucj@gmail.com>
23986         * config/nds32/constants.md (unspec_volatile_element): Add enum values
23987         for unaligned access.
23988         * config/nds32/nds32-intrinsic.c: Implementation of expanding
23989         unaligned access.
23990         * config/nds32/nds32-intrinsic.md: Likewise.
23991         * config/nds32/nds32_intrinsic.h: Likewise.
23992         * config/nds32/nds32.h (nds32_builtins): Likewise.
23993         * config/nds32/nds32.opt (munaligned-access): New option.
23994         * config/nds32/nds32.c (nds32_asm_file_start): Display
23995         flag_unaligned_access status.
23997 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
23999         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
24000         -mno-relax is present.
24001         * config/riscv/linux.h (LINK_SPEC): Ditto.
24003 2018-04-20  Martin Sebor  <msebor@redhat.com>
24005         PR c/85365
24006         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
24007         for null pointers.
24008         (gimple_fold_builtin_stxcpy_chk): Same.
24009         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
24011 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
24013         PR target/85456
24014         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
24015         __powikf2 when long double is IEEE 128-bit.
24017 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
24019         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
24020         step to make sure stack always aligned.
24022 2018-04-20  Carl Love  <cel@us.ibm.com>
24024         PR target/83402
24025         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
24026         size check for arg0.
24028 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
24029             Tom de Vries  <tom@codesourcery.com>
24031         PR target/85445
24032         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
24033         Emit insns for calls too.
24034         (nvptx_find_par): Always look for worker-level predecessor insn.
24035         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
24036         calls.
24037         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
24038         (nvptx_process_pars): Propagate frames for calls.
24040 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
24042         PR target/85469
24043         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
24044         Removed.
24045         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
24046         (ix86_handle_option): Don't handle OPT_mibt.
24047         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
24048         __SHSTK__.
24049         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
24050         has_ibt and ibt.
24051         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
24052         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
24053         (ix86_target_macros): Define __CET__ with flag_cf_protection
24054         for -fcf-protection.
24055         * config/i386/i386.c (isa2_opts): Remove -mibt.
24056         * config/i386/i386.h (TARGET_IBT): Removed.
24057         (TARGET_IBT_P): Likewise.
24058         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
24059         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
24060         * config/i386/i386.opt (mcet): Update help message.
24061         (mshstk): Likewise.
24062         (mibt): Removed.
24063         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
24064         -mcet as an alias for -mshstk.
24066 2018-04-20  Richard Biener <rguenther@suse.de>
24068         PR middle-end/85475
24069         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
24070         complexity by forcing a single use of the multiply operand.
24072 2018-04-20  Martin Jambor  <mjambor@suse.cz>
24074         ipa/85449
24075         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
24076         recursion dependency to only apply to non-clones.
24078 2018-04-20  Martin Jambor  <mjambor@suse.cz>
24080         ipa/85447
24081         * ipa-cp.c (create_specialized_node): Check that clones of
24082         self-recursive edges exist during IPA-CP.
24084 2018-04-19  Toon Moene  <toon@moene.org>
24086         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
24087         by -O3.
24089 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
24091         PR tree-optimization/85467
24092         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
24093         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
24094         VECTOR_CST element to type.
24096 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
24098         PR target/85397
24099         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
24100         * config/i386/i386.md (builtin_setjmp_setup): Removed.
24101         (builtin_longjmp): Likewise.
24102         (save_stack_nonlocal): New pattern.
24103         (restore_stack_nonlocal): Likewise.
24105 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
24107         PR target/85404
24108         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
24109         Replace ASM_OUTPUT_LABEL with fprintf.
24111 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
24113         PR target/85417
24114         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
24115         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
24116         * config/i386/i386-c.c (ix86_target_macros_internal): Also
24117         define __IBT__ and __SHSTK__ for -fcf-protection.
24118         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
24119         TARGET_IBT.
24120         (ix86_trampoline_init): Likewise.
24121         (x86_output_mi_thunk): Likewise.
24122         (ix86_notrack_prefixed_insn_p): Likewise.
24123         (ix86_option_override_internal): Don't disallow -fcf-protection.
24124         * config/i386/i386.md (rdssp<mode>): Also enable for
24125         -fcf-protection.
24126         (incssp<mode>): Likewise.
24127         (nop_endbr): Likewise.
24128         * config/i386/i386.opt (mcet): Change help message to built-in
24129         functions only.
24130         (mibt): Likewise.
24131         (mshstk): Likewise.
24132         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
24133         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
24134         enable CET built-in functions.
24136 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
24138         * common/config/i386/i386-common.c
24139         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
24140         OPTION_MASK_ISA_MOVDIRI_UNSET,
24141         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
24142         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
24143         * config.gcc (movdirintrin.h): New header.
24144         * config/i386/cpuid.h (bit_MOVDIRI,
24145         bit_MOVDIR64B): New bits.
24146         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
24147         and -mmvodir64b.
24148         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
24149         (VOID, PVOID, PCVOID)): New function types.
24150         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
24151         __builtin_ia32_directstoreu_u64,
24152         __builtin_ia32_movdir64b): New builtins.
24153         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
24154         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
24155         and -mmovdiri.
24156         (ix86_valid_target_attribute_inner_p): Ditto.
24157         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
24158         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
24159         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
24160         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
24161         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
24162         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
24163         (movdiri<mode>, movdir64b_<mode>): New.
24164         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
24165         * config/i386/immintrin.h: Include movdirintrin.h.
24166         * config/i386/movdirintrin.h: New file.
24167         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
24169 2018-04-19  Richard Biener  <rguenther@suse.de>
24171         PR middle-end/85455
24172         * cfg.c (clear_bb_flags): When loop state says we have
24173         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
24175 2018-04-19  Richard Biener  <rguenther@suse.de>
24177         PR tree-optimization/84737
24178         * tree-vect-data-refs.c (vect_copy_ref_info): New function
24179         copying restrict info.
24180         (vect_setup_realignment): Use it.
24181         * tree-vectorizer.h (vect_copy_ref_info): Declare.
24182         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
24183         the first DR to all generated stores.
24184         (vectorizable_load): Likewise for loads.
24186 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
24188         PR tree-optimization/85446
24189         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
24190         the integral and pointer types to have the same precision.
24192         * doc/install.texi: Document --disable-cet being the default and
24193         --enable-cet=auto.
24195 2018-04-18  Martin Liska  <mliska@suse.cz>
24197         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
24198         style.
24200 2018-04-18  Martin Liska  <mliska@suse.cz>
24202         Revert
24203         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
24205         PR ipa/83983
24206         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
24207         arguments if they are comparable.
24209 2018-04-18  Martin Liska  <mliska@suse.cz>
24211         Revert
24212         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
24214         PR lto/84805
24215         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
24216         incomplete types.
24218 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
24220         PR target/85388
24221         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
24222         ENDBR after calling __morestack.
24224 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
24226         PR jit/85384
24227         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
24228         by using gcc_base_ver to generate a gcc_driver_version, and use
24229         it when generating GCC_DRIVER_NAME.
24230         * configure: Regenerate.
24232 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
24234         PR target/81084
24235         * config.gcc: Obsolete powerpc*-*-*spe*.
24237 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
24239         PR debug/84637
24240         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
24241         (stabstr_D): Change type of unum from unsigned int to
24242         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
24243         type.
24245 2018-04-17  Jim Wilson  <jimw@sifive.com>
24247         PR 84856
24248         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
24249         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
24250         Set arg_pointer_offset after using pretend_args_size.
24252 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
24254         PR rtl-optimization/85431
24255         * dse.c (record_store): Ignore zero width stores.
24257         PR sanitizer/85230
24258         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
24259         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
24260         __builtin_stack_restore rather than after it.
24261         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
24262         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
24263         argument instead of virtual_dynamic_stack_rtx.
24265 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
24267         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
24268         New prototype.
24269         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
24270         Add note to error message to explain internal mapping of overloaded
24271         built-in function name to non-overloaded built-in function name.
24272         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
24273         function.
24275 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
24277         PR target/85424
24278         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
24279         where the inputs overlap with the output.
24281 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
24283         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
24284         (=v, v) alternative and explicit "memory" attribute.
24285         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
24286         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
24287         attributes.
24288         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
24289         "sselog1" type instead of "sselog".
24290         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
24291         "sselog".  Remove explicit "memory" attribute.
24292         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
24293         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
24294         attributes.
24295         (vec_extract_hi_v32hi): Merge all alternatives into one, use
24296         "sselog1" type instead of "sselog".  Remove explicit "memory"
24297         attribute.
24298         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
24299         use "sselog1" type instead of "sselog".  Remove explicit "memory"
24300         attribute.
24301         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
24302         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
24303         attributes.
24304         (vec_extract_hi_v64qi): Merge all alternatives into one, use
24305         "sselog1" type instead of "sselog".  Remove explicit "memory"
24306         attribute.
24307         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
24308         use "sselog1" type instead of "sselog".  Remove explicit "memory"
24309         attribute.
24311         PR target/85430
24312         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
24314         PR middle-end/85414
24315         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
24316         on a SUBREG.
24318 2018-04-17  Martin Jambor  <mjambor@suse.cz>
24320         PR ipa/85421
24321         * ipa-cp.c (create_specialized_node): Call
24322         expand_all_artificial_thunks if necessary.
24324 2018-04-17  Martin Liska  <mliska@suse.cz>
24326         PR lto/85405
24327         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
24328         in message, remote space in between '_G' and '('.
24330 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
24332         PR target/85281
24333         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
24334         avx512f_vmcmp<mode>3<round_saeonly_name>,
24335         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
24336         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
24337         avx512f_rndscale<mode><round_saeonly_name>,
24338         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
24339         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
24340         Use %<iptr>2 instead of %2 for -masm=intel.
24341         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
24342         avx512f_vcvttss2usi<round_saeonly_name>,
24343         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
24344         -masm=intel.
24345         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
24346         avx512f_vcvttsd2usi<round_saeonly_name>,
24347         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
24348         Use %q1 instead of %1 for -masm=intel.
24349         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
24350         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
24351         of %3 for -masm=intel.
24352         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
24353         -masm=intel.
24354         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
24355         -masm=intel.
24356         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
24357         -masm=intel.
24358         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
24359         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
24360         %g1.
24361         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
24362         -masm=intel.
24363         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
24364         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
24365         %g1 and one with %0 and %1.
24366         (avx512er_vmrcp28<mode><round_saeonly_name>,
24367         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
24368         %1 for -masm=intel.
24369         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
24370         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
24371         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
24372         of %0 and %{%4%} for -masm=intel.
24373         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
24374         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
24375         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
24376         order of %0 and %{%5%}%{z%} for -masm=intel.
24378 2018-04-17  Jan Hubicka  <jh@suse.cz>
24380         PR lto/85405
24381         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
24383 2018-04-17  Martin Liska  <mliska@suse.cz>
24385         PR ipa/85329
24386         * multiple_target.c (create_dispatcher_calls): Set apostrophes
24387         for target_clone error message.  Make default implementation
24388         clone to be a local declaration.
24389         (separate_attrs): Add new argument and check for an empty
24390         string.
24391         (expand_target_clones): Handle it.
24392         (ipa_target_clone): Make redirection just for target_clones
24393         functions.
24395 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
24396             Tom de Vries  <tom@codesourcery.com>
24398         PR middle-end/84955
24399         * omp-expand.c (expand_oacc_for): Add dummy false branch for
24400         tiled basic blocks without omp continue statements.
24402 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
24404         PR target/83660
24405         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
24406         vec_extract expression as having side effects to make sure it gets
24407         a cleanup point.
24409 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
24411         PR target/85403
24412         * config/i386/i386.c (get_builtin_code_for_version): Check
24413         error_mark_node.
24415 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
24417         PR target/84331
24418         * config.gcc: Support "skylake".
24419         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
24420         PROCESSOR_SKYLAKE.
24421         * config/i386/i386.c (m_SKYLAKE): Define.
24422         (processor_target_table): Add "skylake".
24423         (ix86_option_override_internal): Add "skylake".
24424         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
24425         PROCESSOR_CANNONLAKE.
24426         (get_builtin_code_for_version): Fix priority for
24427         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
24428         PROCESSOR_SKYLAKE-AVX512.
24429         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
24430         (processor_type): Add PROCESSOR_SKYLAKE.
24432 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
24433             Jason Merrill  <jason@redhat.com>
24435         PR c++/85112
24436         * convert.c (convert_to_integer_1): Use direct recursion for
24437         enumeral types and types with a precision less than the number
24438         of bits in their mode.
24440 2018-04-16  Julia Koval  <julia.koval@intel.com>
24442         PR target/84413
24443         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
24444         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
24446 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
24448         PR target/85293
24449         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
24450         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
24451         and -mno-direct-move.
24453 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
24455         PR target/83402
24456         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
24457         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
24458         Ensure negative shifts result in {0}.
24460 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
24462         PR rtl-optimization/79916
24463         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
24464         regs (if any) to define how to gnerate SD moves when LRA is in
24465         progress.
24467 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
24469         PR rtl-optimization/85393
24470         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
24471         * except.c (expand_dw2_landing_pad_for_region): Make static.
24472         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
24473         a label and unconditional jump to old_bb, rather than
24474         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
24475         basic block.
24477         PR rtl-optimization/85376
24478         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
24479         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
24480         instead of a specific value.
24482 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
24483             Bin Cheng  <bin.cheng@arm.com>
24485         PR tree-optimization/82965
24486         PR tree-optimization/83991
24487         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
24488         by_profile_only parameter.
24489         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
24490         information if the loop was predicted to iterate too many times.
24491         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
24493 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
24495         PR lto/71991
24496         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
24497         always inline.
24499 2018-04-13  Martin Liska  <mliska@suse.cz>
24500             Jakub Jelinek  <jakub@redhat.com>
24502         PR middle-end/81657
24503         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
24504         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
24505         * builtins.c (expand_builtin_memory_copy_args): Use
24506         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
24507         handle dest_addr == pc_rtx.
24509 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
24511         PR target/85291
24512         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
24513         asked to not generate direct moves.
24514         (fix_trunc<mode>si2_stfiwx): Similar.
24515         (fix_trunc<mode>si2_internal): Similar.
24517 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
24519         PR debug/83157
24520         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
24521         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
24522         lookup if dest in some wider mode is known to be const0_rtx and
24523         if so, record permanent equivalence for it to be ZERO_EXTEND of
24524         the narrower mode destination.
24526 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
24528         * lto-streamer-out.c (output_function): Revert 259346.
24529         * omp-expand.c (expand_oacc_for): Likewise.
24531 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
24533         PR rtl-optimization/85354
24534         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
24535         * sel-sched.c (sel_global_init): ... here.
24537 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
24539         PR target/85238
24540         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
24541         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
24542         mode for PE-COFF targets.
24543         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
24544         (i386_pe_asm_lto_end): Likewise.
24545         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
24546         (TARGET_ASM_LTO_END): Likewise.
24547         * config/i386/winnt.c (saved_debug_info_level): New static variable.
24548         (i386_pe_asm_lto_start): New function.
24549         (i386_pe_asm_lto_end): Likewise.
24551 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
24552             Richard Biener  <rguenther@suse.de>
24554         PR middle-end/84955
24555         * lto-streamer-out.c (output_function): Fix CFG loop state before
24556         streaming out.
24557         * omp-expand.c (expand_oacc_for): Handle calls to internal
24558         functions like regular functions.
24560 2018-04-12  Richard Biener  <rguenther@suse.de>
24562         PR lto/85371
24563         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
24564         for the early LTO debug to properly generate references to it
24565         during DIE emission.  Do not re-use that for the skeleton for
24566         split-dwarf.
24567         (dwarf2out_early_finish): Likewise.
24569 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
24571         PR target/85328
24572         * config/i386/sse.md
24573         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
24574         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
24575         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
24576         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
24577         and output is a reg, avoid creating invalid lowpart subreg, but
24578         instead split into a 512-bit move.  Don't split if not AVX512VL,
24579         input is xmm16+ reg and output is a mem.
24580         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
24581         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
24582         xmm16+ reg and output is a mem.
24584 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24586         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
24587         also for flag_dwarf2_cfi_asm.
24589 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
24591         PR rtl-optimization/85342
24592         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
24593         a bool scalar var inside of the loop instead.  Don't try to update
24594         recog_data.operand after failed apply_change_group.
24596 2018-04-12  Tom de Vries  <tom@codesourcery.com>
24598         PR target/85296
24599         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
24600         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
24601         array with flexible array member as array without given dimension.
24602         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
24603         argument for undefined param to true.
24605 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
24607         PR target/85321
24608         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
24609         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
24610         from PowerPC section.
24611         * config/rs6000/sysv4.opt (mcall-): Improve help text.
24612         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
24613         help text that is too long.
24614         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
24615         help text that is too long.
24616         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
24617         help text that is too long.
24619 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
24621         * config/alpha/alpha.md (stack_probe_internal): Rename
24622         from "probe_stack".  Update all callers.
24624 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
24626         PR rtl-optimization/84566
24627         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
24628         sched_macro_fuse_insns.
24630 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
24632         PR target/84301
24633         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
24634         (compute_block_dependences): ... from here.
24636 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
24638         PR tree-optimization/85331
24639         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
24640         from int to HOST_WIDE_INT.
24642 2018-04-11  Martin Jambor  <mjambor@suse.cz>
24644         PR ipa/84149
24645         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
24646         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
24647         not the same as the source val.
24648         (cgraph_edge_brings_value_p): New parameter.
24649         (gather_edges_for_value): Pass destination value to
24650         cgraph_edge_brings_value_p.
24651         (perhaps_add_new_callers): Likewise.
24652         (get_info_about_necessary_edges): Likewise and exclude values brought
24653         only by self-recursive edges.
24654         (create_specialized_node): Redirect only clones of self-calling edges.
24655         (+self_recursive_pass_through_p): New function.
24656         (find_more_scalar_values_for_callers_subset): Use it.
24657         (find_aggregate_values_for_callers_subset): Likewise.
24658         (known_aggs_to_agg_replacement_list): Removed.
24659         (decide_whether_version_node): Re-calculate known constants for all
24660         remaining context clones.
24662 2018-04-11  Richard Biener  <rguenther@suse.de>
24664         PR lto/85339
24665         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
24666         from early DWARF output.
24667         (dwarf2out_early_finish): Output line info unconditionally into
24668         early DWARF and add reference to it.
24670 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
24672         PR target/85281
24673         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
24674         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
24675         other than V2DFmode using iptr mode attribute.
24676         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
24678 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
24680         PR rtl-optimization/84659
24681         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
24683 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
24685         PR debug/85302
24686         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
24687         SIZEP is NULL.
24688         (output_loc_list): Pass address of a dummy size variable even in the
24689         locview handling loop.
24690         (index_location_lists): Add comment on why skip_loc_list_entry can't
24691         call size_of_locs.
24693 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
24695         PR target/85261
24696         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
24697         into register.
24699 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
24701         PR target/85321
24702         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
24703         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
24704         and -mstring-compare-inline-limit.
24706 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
24708         PR target/85287
24709         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
24710         for stack clash protection in a register whenever we need it to be in
24711         a register.
24713 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
24715         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
24716         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
24718 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
24720         PR target/85321
24721         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
24722         the help text.
24723         (mlong-double-): Ditto.
24724         * config/rs6000/sysv4.opt (msdata=): Ditto.
24725         (mtls-size=): Ditto.
24727 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
24729         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
24730         erroneous entries for
24731         "vector int vec_ldl (int, long int *)", and
24732         "vector unsigned int vec_ldl (int, unsigned long int *)".
24733         Add comments and entries for
24734         "vector bool char vec_ldl (int, bool char *)",
24735         "vector bool short vec_ldl (int, bool short *)",
24736         "vector bool int vec_ldl (int, bool int *)",
24737         "vector bool long long vec_ldl (int, bool long long *)",
24738         "vector pixel vec_ldl (int, pixel *)",
24739         "vector long long vec_ldl (int, long long *)",
24740         "vector unsigned long long vec_ldl (int, unsigned long long *)".
24741         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
24742         type tree bool_long_long_type_node and correct definition of
24743         bool_V2DI_type_node to make reference to this new type tree.
24744         (rs6000_mangle_type): Replace erroneous reference to
24745         bool_long_type_node with bool_long_long_type_node.
24746         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
24747         comments to emphasize sign distinctions for char and int types and
24748         replace RS6000_BTI_bool_long constant with
24749         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
24750         use of RS6000_BTI_pixel.
24751         (bool_long_type_node): Remove this macro definition.
24752         (bool_long_long_type_node): New macro definition
24754 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
24756         PR rtl-optimization/85300
24757         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
24758         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
24759         simplify_unary_operation fails.
24761 2018-04-10  Martin Liska  <mliska@suse.cz>
24763         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
24764         cgraph_edge and ipa_ref.
24766 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
24768         PR target/85177
24769         PR target/85255
24770         * config/i386/sse.md
24771         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
24772         computation of the VEC_MERGE selector from mask.
24773         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
24774         Fix decoding of the VEC_MERGE selector into mask.
24776 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
24778         PR tree-optimization/85286
24779         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
24781 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
24783         * final.c (final_1): Set insn_last_address as well as
24784         insn_current_address.
24786 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24788         PR target/85173
24789         * explow.c (emit_stack_probe): Call validize_mem on memory location
24790         before passing it to gen_probe_stack.  Create address operand and
24791         legitimize it for the probe_stack_address case.
24793 2018-04-09  Jan Hubicka  <jh@suse.cz>
24795         PR lto/85078
24796         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
24797         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
24798         * tree.c (free_lang_data_in_type): Fix handling of binfos;
24799         walk basetypes.
24800         (free_lang_data): Rebuild type inheritance graph.
24802 2018-04-09  Martin Sebor  <msebor@redhat.com>
24804         * invoke.texi (-finline-small-functions): Mention other optimization
24805         options.
24806         (-findirect-inlining, -fpartial-inlining): Same.
24807         (-finline-functions-called-once): Same.
24808         (-freorder-blocks-and-partition): Same.
24810 2018-04-09  Jan Hubicka  <jh@suse.cz>
24812         PR rtl/84058
24813         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
24814         jumps; choose last target that matches the criteria (i.e.
24815         no partition changes for non-crossing jumps).
24816         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
24817         support for redirecting crossing jumps to non-crossing.
24819 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
24821         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
24822         also for naked functions.
24824 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
24826         * config/arc/arc.md (add_shift): New pattern.
24827         (add_shift2): Likewise.
24828         (sub_shift): Likewise.
24829         (sub_shift_cmp0_noout): Likewise.
24830         (compare_si_ashiftsi): Likewise.
24831         (xbfu_cmp0_noout): New combine pattern.
24832         (xbfu_cmp0"): Likewise.
24833         (movsi_set_cc_insn): Place the predicable variant first.
24834         (commutative_binary_cmp0_noout): Remove clobber.
24835         (commutative_binary_cmp0): New pattern.
24836         (noncommutative_binary_cmp0): Likewise.
24837         (noncommutative_binary_cmp0_noout): Likewise.
24838         (noncommutative_binary_comparison_result_used): Removed.
24839         (rsub_cmp0): New pattern.
24840         (rsub_cmp0_noout): Likewise.
24841         (extzvsi): Changed, keep only meaningful variants.
24842         (SQH, SEZ): New iterators.
24843         (SQH_postfix): New mode attribute.
24844         (SEZ_prefix): New code attribute.
24845         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
24846         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
24847         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
24848         of numerical value.
24849         (noncommutative_operator): Check the availability of barrel
24850         shifter option.
24852 2018-04-09  Richard Biener  <rguenther@suse.de>
24854         PR tree-optimization/85284
24855         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
24856         Only use the niter constraining form of simple_iv when the exit
24857         is always executed.
24859 2018-04-09  Tom de Vries  <tom@codesourcery.com>
24861         PR target/84041
24862         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
24863         (define_expand "*memory_barrier"): New define_expand.
24864         (define_insn "memory_barrier"): New insn.
24866 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
24868         PR rtl-optimization/80463
24869         PR rtl-optimization/83972
24870         PR rtl-optimization/83480
24872         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
24873         correct producer for the insn.
24874         (tidy_control_flow): Fixup seqnos in case of debug insns.
24876 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
24878         PR rtl-optimization/83913
24880         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
24881         different sched-times when merging exprs.
24883 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
24885         PR rtl-optimization/83962
24887         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
24888         tidy_fallthru_edge and tidy_control_flow.
24890 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
24892         PR rtl-optimization/83530
24894         * sel-sched.c (force_next_insn): New global variable.
24895         (remove_insn_for_debug): When force_next_insn is true, also leave only
24896         next insn in the ready list.
24897         (sel_sched_region): When the region wasn't scheduled, make another pass
24898         over it with force_next_insn set to 1.
24900 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
24902         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
24903         into tm_file.
24904         * config/nds32/constants.md (unspec_volatile_element): Add enum values
24905         for interrupt control.
24906         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
24907         functions for interrupt control.
24908         * config/nds32/nds32-intrinsic.md: Likewise.
24909         * config/nds32/nds32_intrinsic.h: Likewise.
24910         * config/nds32/nds32.h (nds32_builtins): Likewise.
24912 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
24914         * config/nds32/nds32.c (nds32_init_machine_status,
24915         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
24916         strict_aligned_p field.
24917         (nds32_expand_to_rtl_hook): New function.
24918         (TARGET_EXPAND_TO_RTL_HOOK): Define.
24919         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
24921 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
24922             Chung-Ju Wu  <jasonwucj@gmail.com>
24924         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
24925         * config/nds32/nds32-n7.md: New file.
24926         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
24927         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
24928         pipeline.
24929         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
24930         * config/nds32/nds32.md (pipeline_model): Add n7.
24931         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
24932         * config/nds32/pipelines.md: Include n7 settings.
24934 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
24935             Chung-Ju Wu  <jasonwucj@gmail.com>
24937         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
24938         * config/nds32/nds32-e8.md: New file.
24939         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
24940         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
24941         pipeline.
24942         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
24943         * config/nds32/nds32.md (pipeline_model): Add e8.
24944         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
24945         * config/nds32/pipelines.md: Include e8 settings.
24947 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
24948             Chung-Ju Wu  <jasonwucj@gmail.com>
24950         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
24951         * config/nds32/nds32-n8.md: New file.
24952         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
24953         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
24954         pipeline.
24955         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
24956         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
24957         * config/nds32/nds32.md (pipeline_model): Add n8.
24958         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
24959         * config/nds32/pipelines.md: Include n8 settings.
24961 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
24962             Chung-Ju Wu  <jasonwucj@gmail.com>
24964         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
24965         * config/nds32/nds32-n9-2r1w.md: New file.
24966         * config/nds32/nds32-n9-3r2w.md: New file.
24967         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
24968         nds32_register_ports): New or modify for cpu n9.
24969         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
24970         pipeline.
24971         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
24972         * config/nds32/nds32-utils.c: New file.
24973         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
24974         TARGET_MUL_SLOW): Define.
24975         * config/nds32/nds32.md (pipeline_model): New attribute.
24976         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
24977         New options that support cpu n9.
24978         * config/nds32/pipelines.md: Include n9 settings.
24979         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
24981 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
24983         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
24984         information if necessary.
24985         (output_cond_branch_compare_zero): Likewise.
24986         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
24987         (nds32_target_alignment): Refine for alignment.
24988         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
24989         (FUNCTION_BOUNDARY): Modify.
24990         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
24991         align case.
24992         * config/nds32/nds32.opt (malways-align, malign-functions): New.
24994 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
24996         * config/nds32/constants.md (unspec_volatile_element): Add values for
24997         TLB operation and data prefetch.
24998         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
24999         functions for TLB operation and data prefetch.
25000         * config/nds32/nds32-intrinsic.md: Likewise.
25001         * config/nds32/nds32_intrinsic.h: Likewise.
25002         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
25003         (nds32_print_operand): Likewise.
25004         * config/nds32/nds32.h (nds32_builtins): Likewise.
25006 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
25007         Andrew Pinski <pinsika@gcc.gnu.org>
25009         PR middle-end/82976
25010         * match.pd: Use constant_boolean_node of correct type instead of
25011         boolean_true_node or boolean_false_node for simplifying
25012         pointer comparisons to zero.
25014 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
25016         PR tree-optimization/80021
25017         * tree.c (verify_type_variant): Make error call in verify_variant_match
25018         translatable and remove final full stop.
25020 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
25022         * config/nds32/constants.md (unspec_volatile_element): Add
25023         UNSPEC_VOLATILE_EH_RETURN.
25024         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
25025         nds32_output_stack_pop): Support dwarf exception handling process.
25026         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
25027         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
25028         exception handling process.
25029         (nds32_compute_stack_frame): Likewise.
25030         (nds32_return_addr_rtx): Likewise.
25031         (nds32_initial_elimination_offset): Likewise.
25032         (nds32_expand_prologue): Likewise.
25033         (nds32_expand_epilogue): Likewise.
25034         (nds32_dynamic_chain_address): New function.
25035         * config/nds32/nds32.h (machine_function): Add fields for dwarf
25036         exception handling.
25037         (DYNAMIC_CHAIN_ADDRESS): Define.
25038         (EH_RETURN_DATA_REGNO): Define.
25039         (EH_RETURN_STACKADJ_RTX): Define.
25040         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
25041         patterns for dwarf exception handling.
25043 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
25045         * config/nds32/nds32.h: Clean up obsolete macros.
25047 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
25049         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
25050         Add enum values for particular instructions.
25051         * config/nds32/nds32-intrinsic.c: Implementation of expanding
25052         particular intrinsic functions.
25053         * config/nds32/nds32-intrinsic.md: Likewise.
25054         * config/nds32/nds32_intrinsic.h: Likewise.
25055         * config/nds32/nds32.h (nds32_builtins): Likewise.
25056         * config/nds32/nds32.md (type): Add pbsad and pbsada.
25057         (btst, ave): New patterns for particular instructions.
25059 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
25061         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
25062         Add enum values for atomic load/store and memory sync.
25063         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
25064         and memory sync.
25065         * config/nds32/nds32-intrinsic.md: Likewise.
25066         * config/nds32/nds32_intrinsic.h: Likewise.
25067         * config/nds32/nds32.h (nds32_builtins): Likewise.
25069 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
25071         PR tree-optimization/85257
25072         * fold-const.c (native_encode_vector): If not all elts could fit
25073         and off is -1, return 0 rather than offset.
25074         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
25075         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
25076         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
25077         adjust buffer in native_interpret_expr call.
25079 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
25081         * config/nds32/constants.md (unspec_volatile_element): Add cache
25082         control enum values.
25083         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
25084         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
25085         * config/nds32/nds32.c (nds32_cctl_names): New.
25086         (nds32_print_operand): Handle cache control register names.
25087         * config/nds32/nds32.h (nds32_builtins): New enum values.
25088         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
25089         macros.
25090         * config/nds32/nds32.md (type): Add mmu.
25091         * config/nds32/pipelines.md (simple_insn): Add mmu.
25093 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
25095         * config/nds32/nds32.md (type): Remove call.
25096         * config/nds32/pipelines.md (simple_insn): Likewise.
25098 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
25100         * config/nds32/constants.md (unspec_volatile_element): Add
25101         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
25102         UNSPEC_VOLATILE_FMFCFG.
25103         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
25104         description for fmfcfg and fmfcsr.
25105         (bdesc_1arg): Add fmtcsr.
25106         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
25107         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
25108         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
25109         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
25110         unspec_fmfcfg): New patterns.
25111         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
25112         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
25113         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
25114         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
25115         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
25116         __nds32__fmfcfg): Define.
25118 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
25120         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
25121         intrinsic register names.
25122         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
25123         intrinsic register enum values and macros.
25125 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
25127         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
25128         for load/store addressing form.
25129         (nds32_print_operand_address): Likewise.
25131 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
25133         PR target/85196
25134         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
25135         based on LABEL_REF.  Remove useless assertion.
25136         (pic_address_needs_scratch): Fix formatting.
25137         (sparc_legitimize_pic_address): Minor tweaks.
25138         (sparc_delegitimize_address): Adjust assertion accordingly.
25139         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
25140         into symbolic_operand.
25141         (movsi_high_pic_label_ref): Likewise.
25142         (movsi_lo_sum_pic_label_ref): Likewise.
25143         (movdi_pic_label_ref): Likewise.
25144         (movdi_high_pic_label_ref): Likewise.
25145         (movdi_lo_sum_pic_label_ref): Likewise.
25147 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
25149         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
25150         custom LIB_SPEC setup.
25152 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
25153             Kito Cheng  <kito.cheng@gmail.com>
25155         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
25156         * config/riscv/freebsd.h: New.
25158 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
25160         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
25161         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
25162         file.
25164 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
25165             Kito Cheng  <kito.cheng@gmail.com>
25167         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
25168         nds32_output_call, nds32_symbol_binds_local_p): New functions.
25169         * config/nds32/nds32-protos.h (nds32_output_call,
25170         nds32_output_return): Declare.
25171         * config/nds32/nds32.md: Refine all the call and return patterns.
25173 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
25175         PR debug/85252
25176         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
25177         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
25179         PR rtl-optimization/84872
25180         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
25181         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
25182         EDGE_CROSSING edge.
25184 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
25186         * expr.c (copy_blkmode_to_reg): Revert 254862.
25187         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
25189 2018-04-06  Richard Biener  <rguenther@suse.de>
25191         PR middle-end/85244
25192         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
25193         after seeing a component reference with an adjacent field.  Treat
25194         refs to arrays at struct end of external decls similar to
25195         refs to unconstrained commons.
25197 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
25199         PR sanitizer/85213
25200         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
25201         look through SAVE_EXPRs with non-side-effects argument.  Adjust
25202         recursive calls.
25203         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
25204         save_p here.
25206 2018-04-06  Richard Biener  <rguenther@suse.de>
25208         PR middle-end/85180
25209         * alias.c (find_base_term): New wrapper around find_base_term
25210         unwinding CSELIB_VAL_PTR changes.
25211         (find_base_term): Do not restore CSELIB_VAL_PTR during the
25212         recursion.
25214 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
25216         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
25217         instructions.
25218         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
25219         constant definitions.
25220         ("nop"): lr 0,0 -> nopr r0
25221         ("nop_lr0", "nop_lr1"): New insn definitions.
25223 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
25225         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
25226         NDS32_V3PUSH_AVAILABLE_P macro.
25228 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
25229             Chung-Ju Wu  <jasonwucj@gmail.com>
25231         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
25232         (nds32*-*-*): Add float and fpu_config into supported_defaults.
25233         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
25234         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
25235         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
25236         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
25237         * config/nds32/constraints.md: New constraints and checking for hard
25238         float configuration.
25239         * config/nds32/iterators.md: New mode iterator and attribute for hard
25240         float configuration.
25241         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
25242         patterns.
25243         * config/nds32/nds32-fpu.md: New file.
25244         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
25245         deal with hard float code generation.
25246         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
25247         ARCH_V3S.
25248         (abi_type, float_reg_number): New enum type.
25249         * config/nds32/nds32-predicates.c: New predicates for hard float.
25250         * config/nds32/nds32-protos.h: Declare functions for hard float.
25251         * config/nds32/nds32.c: Implementation for hard float configuration.
25252         * config/nds32/nds32.h: Definitions for hard float configuration.
25253         * config/nds32/nds32.md: Include hard float machine description and
25254         modify patterns for hard float configuration.
25255         * config/nds32/nds32.opt: New options for hard float configuration.
25256         * config/nds32/predicates.md: New predicates for hard float
25257         configuration.
25259 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
25261         * common/config/nds32/nds32-common.c
25262         (nds32_option_optimization_table): Enable -mreleax-hint by default.
25264 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
25266         PR middle-end/85195
25267         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
25268         CONSTRUCTOR_ELT (ctor, ...)->value.
25270 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
25272         PR target/85193
25273         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
25275 2018-04-05  Tom de Vries  <tom@codesourcery.com>
25277         PR target/85204
25278         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
25279         cond jump.
25281 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
25282             Kito Cheng  <kito.cheng@gmail.com>
25284         * config/nds32/constraints.md (U33): Fine-tune checking condition.
25285         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
25286         * config/nds32/nds32.h (nds32_16bit_address_type): Add
25287         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
25289 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
25290             Kito Cheng  <kito.cheng@gmail.com>
25292         * config/nds32/constraints.md (Ufe): New memory constraint.
25293         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
25294         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
25295         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
25296         operands.
25297         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
25298         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
25300 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
25302         * config/nds32/nds32.md: Use optimize_size in the condition for
25303         alu-shift instructions.
25305 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
25307         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
25309 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
25311         * config/nds32/nds32.md (negsi2): Refine pattern.
25313 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
25314             Chung-Ju Wu  <jasonwucj@gmail.com>
25316         * config/nds32/iterators.md (shift_rotate): New code iterator.
25317         (shift): New code attribute.
25318         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
25319         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
25320         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
25321         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
25322         bit-wise operations.
25323         (andsi3, *andsi3): Ditto.
25324         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
25325         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
25326         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
25327         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
25328         nds32_ior_operand, nds32_xor_operand): New predicates.
25330 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
25332         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
25333         (addsi3, subsi3): ... this.
25335 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
25337         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
25339 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
25341         * config/nds32/nds32.md: Adjust indention.
25343 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
25345         * config/nds32/nds32.md (feature): New attribute.
25347 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
25349         * config/nds32/nds32.md (subtype): New attribute.
25351 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
25353         PR target/85203
25354         * config/arm/arm-builtins.c (arm_expand_builtin): Change
25355         expansion to perform a bitwise AND of the argument followed by a
25356         boolean negation of the result.
25358 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
25360         PR rtl-optimization/84878
25361         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
25362         the basic block.  Assert the use reference is not artificial and that
25363         it has an associated insn.
25365 2018-04-04  Michael Matz  <matz@suse.de>
25367         * builtins.c (compute_objsize): Pass correct operand
25368         to array_at_struct_end_p.
25370 2018-04-04  Richard Biener  <rguenther@suse.de>
25372         PR lto/85176
25373         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
25374         from contexts for DINFO_LEVEL_TERSE and below.
25376 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
25378         * config/nds32/nds32-doubleword.md (move_<mode>): Require
25379         resiter_operand condition.
25380         * config/nds32/nds32.md (*move<mode>): Ditto.
25382 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
25383             Monk Chiang  <sh.chiang04@gmail.com>
25385         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
25387 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
25389         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
25391 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
25392             Kito Cheng  <kito.cheng@gmail.com>
25394         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
25395         nds32_cond_code_str, output_cond_branch,
25396         output_cond_branch_compare_zero, nds32_expand_cbranch,
25397         nds32_expand_cstore, nds32_expand_movcc,
25398         nds32_output_cbranchsi4_equality_zero,
25399         nds32_output_cbranchsi4_equality_reg,
25400         nds32_output_cbranchsi4_equality_reg_or_const_int,
25401         nds32_output_cbranchsi4_greater_less_zero: New functions.
25402         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
25403         nds32_expand_cstore, nds32_expand_movcc,
25404         nds32_output_cbranchsi4_equality_zero,
25405         nds32_output_cbranchsi4_equality_reg,
25406         nds32_output_cbranchsi4_equality_reg_or_const_int,
25407         nds32_output_cbranchsi4_greater_less_zero): Declare.
25408         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
25409         nds32_rimm11s_operand): New predicates.
25410         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
25411         * config/nds32/nds32.md: Rewrite all the branch and conditional move
25412         patterns.
25414 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
25416         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
25417         * config/nds32/nds32.md: Ditto.
25418         * config/nds32/pipelines.md: Ditto.
25420 2018-04-04  Richard Biener  <rguenther@suse.de>
25422         PR tree-optimization/85168
25423         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
25424         propagating abnormals.
25426 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
25428         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
25430 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
25431             Kito Cheng  <kito.cheng@gmail.com>
25433         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
25434         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
25435         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
25436         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
25437         * config/nds32/nds32.md (sibcall_internal): New.
25438         (sibcall_register): Remove.
25439         (sibcall_immediate): Remove.
25440         (sibcall_value_internal): New.
25441         (sibcall_value_register): Remove.
25442         (sibcall_value_immediate): Remove.
25443         * config/nds32/predicates.md (nds32_general_register_operand): New.
25444         (nds32_call_address_operand): New.
25446 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
25448         PR rtl-optimization/85167
25449         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
25450         bb_defs if *split_p, instead preinitialize it to NULL.
25452         PR tree-optimization/85156
25453         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
25454         evaluating the argument multiple times.
25456 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
25458         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
25459         than vector.
25460         (_mm_cvtpd_ps): Likewise.
25461         (_mm_cvttpd_epi32): Likewise.
25462         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
25463         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
25464         vector, pixel, and bool following altivec.h include.
25466 2018-04-03  Martin Sebor  <msebor@redhat.com>
25468         * doc/extend.texi (Common Function Attributes): Clarify.
25469         (const attribute): Likewise.
25470         (pure attribute): Likewise.
25472 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
25474         PR target/85169
25475         * config/i386/i386.c (ix86_expand_vector_set): Use
25476         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
25478 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
25480         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
25481         instructions when changing rounding bits to preserve precision bits
25482         in the x87 control word.
25484 2018-04-03  Martin Liska  <mliska@suse.cz>
25486         PR tree-optimization/82491
25487         * rtl.h (strip_offset_and_add): Replace += suboffset with
25488         poly_uint64 () + suboffset.
25490 2018-03-29  Martin Liska  <mliska@suse.cz>
25491             Martin Jambor  <mjambor@suse.cz>
25493         PR ipa/84947
25494         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
25495         param_type is not an integral or pointer type.
25497 2018-04-03  Richard Biener  <rguenther@suse.de>
25499         * sese.h (recompute_all_dominators): Remove.
25501 2018-04-02  Martin Sebor  <msebor@redhat.com>
25503         * doc/invoke.texi (-Wrestrict): Fix typos.
25505 2018-04-02  Jim Wilson  <jimw@sifive.com>
25507         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
25508         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
25509         (<optab>di3, <optab>si3_extend): Likewise.
25510         (<optab>si3_mask, <optab>si3_mask_1): New.
25511         (<optab>di3_mask, <optab>di3_mask_1): New.
25512         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
25513         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
25514         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
25516 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
25518         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
25519         example.
25521 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
25523         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
25524         (nds32_canonicalize_comparison): New function.
25526 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
25527             Kito Cheng  <kito.cheng@gmail.com>
25528             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
25530         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
25531         * config/nds32/constants.md (unspec_volatile_element): Add
25532         UNSPEC_VOLATILE_RELAX_GROUP.
25533         * config/nds32/nds32-relax-opt.c: New file.
25534         * config/nds32/nds32-predicates.c
25535         (nds32_symbol_load_store_p): New function.
25536         * config/nds32/nds32-protos.h
25537         (nds32_symbol_load_store_p): Declare function.
25538         (make_pass_nds32_relax_opt): Declare new rtl pass function.
25539         * config/nds32/nds32.c
25540         (nds32_register_pass): New function to register pass.
25541         (nds32_register_passes): New function to register passes.
25542         * config/nds32/nds32.md (relax_group): New pattern.
25543         * config/nds32/nds32.opt (mrelax-hint): New option.
25544         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
25546 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
25548         * config/nds32/t-nds32: Modify files dependency.
25550 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
25552         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
25553         (PROFILE_HOOK): Define its implementation.
25555 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
25557         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
25558         type and 32-bit size.
25560 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
25562         PR middle-end/85090
25563         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
25564         (V_128_256): New mode iterator.
25565         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
25566         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
25567         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
25568         of V.
25569         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
25570         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
25572 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
25574         PR target/83315
25575         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
25576         NaN inputs correctly.
25578 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
25580         PR target/80546
25581         * config/rs6000/vsx.md (??r): New mode attribute.
25582         (*vsx_mov<mode>_64bit): Use it.
25583         (*vsx_mov<mode>_32bit): Likewise.
25585 2018-03-30  Martin Sebor  <msebor@redhat.com>
25587         PR tree-optimization/84818
25588         * builtins.c (check_access): Use warning_n.
25590 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
25592         PR target/83822
25593         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
25594         condition.
25595         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
25596         condition.
25598 2018-03-30  Julia Koval  <julia.koval@intel.com>
25600         PR target/84413
25601         * x86-tune.def (movx, partial_reg_dependency): Enable for
25602         m_SKYLAKE_AVX512.
25604 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
25606         PR inline-asm/84985
25607         * lra-constraints.c (process_alt_operands): Move setting
25608         this_alternative_matches below.
25610 2018-03-29  Martin Liska  <mliska@suse.cz>
25612         PR lto/84995.
25613         * doc/invoke.texi: Document how LTO works with debug info.
25614         Describe auto-load support of binutils.  Mention 'x86-64'
25615         as valid option value of -march option.
25617 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
25619         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
25621         PR c/85094
25622         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
25623         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
25624         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
25625         checking.
25627 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
25629         PR target/84912
25630         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
25631         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
25632         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
25633         for RS6000_BTM_POWERPC64.
25634         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
25635         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
25636         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
25637         definition.
25638         (DIVDE): Use it.
25639         (DIVDEU): Likewise.
25641 2018-03-28  Carl Love  <cel@us.ibm.com>
25643         Revert
25644         2017-09-27  Carl Love  <cel@us.ibm.com>
25646         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
25647         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
25648         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
25649         fctiw instruction.
25651 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25653         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
25654         instead of __vector bool.
25655         (_mm_max_pu8): Likewise.
25656         (_mm_min_pi16): Likewise.
25658 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
25660         PR target/84912
25661         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
25662         (DIVWEUO): Likewise.
25663         (DIVDEO): Likewise.
25664         (DIVDEUO): Likewise.
25665         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
25666         DIVWEUO and DIVDEUO.
25667         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
25668         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
25669         (div_extend): Likewise.
25670         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
25671         builtin function.
25672         (__builtin_divweuo): Likewise.
25673         (__builtin_divdeo): Likewise.
25674         (__builtin_divdeuo): Likewise.
25676 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
25678         PR target/85095
25679         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
25680         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
25682         PR tree-optimization/82004
25683         * gimple-match-head.c (optimize_pow_to_exp): New function.
25684         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
25685         Don't fold to exp if optimize_pow_to_exp is false.
25687 2018-03-28  Martin Liska  <mliska@suse.cz>
25689         PR other/84819
25690         * calls.c (initialize_argument_information): Fix trailing space.
25691         * common.opt: Fix typo and provide better explanation for
25692         -fsanitize-coverage option.
25693         * config/i386/i386.opt: Fix typo.
25695 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
25696             Martin Liska  <mliska@suse.cz>
25698         PR sanitizer/85081
25699         * gimplify.c (asan_poison_variable): Don't do the check for
25700         gimplify_omp_ctxp here.
25701         (gimplify_decl_expr): Do it here.
25702         (gimplify_target_expr): Likewise.
25704 2018-03-28  Martin Liska  <mliska@suse.cz>
25706         PR target/84988
25707         * config/i386/i386.c (ix86_function_arg_advance): Do not call
25708         chkp_type_bounds_count if MPX is not enabled.
25710 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
25712         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
25714 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
25716         PR target/84914
25717         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
25718         function to create the function decl for complex long double
25719         multiply and divide for -mabi=ieeelongdouble.
25720         (init_float128_ieee): Call it.
25722 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
25724         PR target/85044
25725         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
25726         -fcf-protection=branch -mibt.
25727         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
25729 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
25731         PR target/81863
25732         * config/arm/arm.c (arm_valid_symbolic_address): Handle
25733         arm_word_relocations.
25735 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
25737         PR target/85056
25738         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
25739         extern array declarations.
25741 2018-03-27  Richard Biener  <rguenther@suse.de>
25743         PR middle-end/84067
25744         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
25745         explicit single_use checks.
25747 2018-03-27  Richard Biener  <rguenther@suse.de>
25749         PR tree-optimization/85082
25750         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
25751         Valueize the VUSE.
25753 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
25755         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
25756         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
25757         Turn on fasynchronous-unwind-tables and funwind-tables.
25759 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
25761         PR target/85073
25762         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
25763         (*bmi_blsr_<mode>_ccz): Ditto.
25765 2018-03-26  Tom de Vries  <tom@codesourcery.com>
25767         PR tree-optimization/85063
25768         * omp-general.c (offloading_function_p): New function.  Factor out
25769         of ...
25770         * omp-offload.c (pass_omp_target_link::gate): ... here.
25771         * omp-general.h (offloading_function_p): Declare.
25772         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
25773         with attribute omp declare target for offloading functions.
25775 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
25777         PR tree-optimization/84005
25778         * tree-data-ref.h (get_base_for_alignment): Declare.
25779         * tree-data-ref.c (get_base_for_alignment_1): New function.
25780         (get_base_for_alignment): Likewise.
25781         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
25782         get_base_for_alignment to find a suitable base object, instead
25783         of always using drb->base_address.
25785 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
25787         PR inline-asm/85022
25788         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
25789         known size by default.
25791 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
25793         PR inline-asm/85030
25794         * lra-constraints.c (process_alt_operands): Don't match BLKmode
25795         and non BLKmode operands.
25797 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25799         PR target/85026
25800         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
25801         Clean up attributes.
25803 2018-03-23  Richard Biener  <rguenther@suse.de>
25805         PR debug/85020
25806         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
25807         we are going to emit early debug for LTO.
25809 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
25811         PR inline-asm/85034
25812         * function.c (match_asm_constraints_1): Don't optimize if input
25813         doesn't satisfy general_operand predicate for output's mode.
25815         PR inline-asm/85022
25816         * alias.c (write_dependence_p): Don't require for x_canonicalized
25817         non-VOIDmode if x has VOIDmode.
25819         PR sanitizer/85029
25820         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
25821         just don't try to optimize it rather than assert it never happens.
25823 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
25825         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
25826         macro expansions for definition of ST_INTERNAL_<mode> and
25827         LD_INTERNAL_<mode> builtins.
25828         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
25829         Remove prototype.
25830         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
25831         function.
25832         (altivec_expand_st_builtin): Likewise.
25833         (altivec_expand_builtin): Remove calls to deleted functions.
25834         (rs6000_address_for_altivec): Delete this function.
25835         * config/rs6000/vector.md: Remove expands for
25836         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
25838 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
25840         PR target/84826
25841         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
25842         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
25843         re-computing once computed.
25844         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
25845         (arm_init_machine_status): Initialize
25846         machine->static_chain_stack_bytes.
25848 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
25850         PR target/84760
25851         * doc/extend.texi: Add four new prototypes for vec_ld.
25852         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
25853         definitions for more logical presentation.
25854         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
25855         entries for V1TI variants of __builtin_altivec_ld builtin.
25856         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
25857         handling of V1TI variant of LVX icode pattern.
25858         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
25859         (rs6000_gimple_fold_builtin): Likewise.
25860         (altivec_init_builtins): Add code to define
25861         __builtin_altivec_lvx_v1ti function.
25863 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
25865         PR inline-asm/84941
25866         * function.c (match_asm_constraints_1): Don't do the optimization
25867         if input isn't a REG, SUBREG, MEM or constant.
25869 2018-03-22  Tom de Vries  <tom@codesourcery.com>
25871         PR tree-optimization/84956
25872         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
25873         bb_has_abnormal_pred.
25875 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
25877         PR sanitizer/85018
25878         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
25879         DECL_INITIAL (decl) to decl at the end.
25880         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
25881         adjust the comment.
25883 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
25885         * doc/extend.texi (__builtin_tgmath): Document when complex
25886         integer types are treated as _Complex _Float64.
25888 2018-03-21  Tom de Vries  <tom@codesourcery.com>
25890         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
25892 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
25894         PR tree-optimization/84960
25895         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
25896         if it is ENTRY block, move them into single succ of ENTRY in that case.
25898 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
25900         PR tree-optimization/84811
25901         * poly-int.h (poly_span_traits): Remove the T3 parameter and
25902         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
25903         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
25904         (known_subrange_p): Update accordingly.  Cast each value involved
25905         in the size comparison, rather than casting the result of the
25906         subtraction.
25908 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
25910         PR tree-optimization/84982
25911         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
25912         by flipping the least significant bit rather than all bits from
25913         bitpos to bitpos + bitsize - 1.
25915 2018-03-21  Nathan Sidwell  <nathan@acm.org>
25917         * doc/extend.texi (Deprecated Features): Remove mention of
25918         long-deleted deprecations.
25920 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
25922         PR jit/84288
25923         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
25924         * configure: Regenerate.
25926 2018-03-21  Tom de Vries  <tom@codesourcery.com>
25928         PR tree-optimization/83126
25929         * tree-parloops.c (num_phis): New function.
25930         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
25932 2018-03-21  Nathan Sidwell  <nathan@acm.org>
25934         * doc/extend.texi (Deprecated Features): Update deprecated flags,
25935         mention anon-struct/union members and trailing attributes.
25937 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
25939         PR tree-optimization/84969
25940         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
25941         builtin memset partitions if they set different rhs values.
25943 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
25945         PR rtl-optimization/84989
25946         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
25947         VEC_DUPLICATE with scalar result mode.
25949 2018-03-21  Martin Liska  <mliska@suse.cz>
25951         PR ipa/84963
25952         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
25953         not intended return statement.
25955 2018-03-21  Martin Liska  <mliska@suse.cz>
25957         PR target/84988
25958         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
25959         (chkp_find_bound_slots_1): Limit number of iterations.
25961 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
25963         PR target/84838
25964         * Minor grammar fixes for x86 options.
25966 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
25968         PR debug/84875
25969         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
25970         holding REG_CFA_RESTORE notes, instead turn them into a USE.
25972 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
25974         PR target/83789
25975         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
25976         (altivec_lvx_<mode>_1op): Likewise.
25977         (altivec_stvx_<mode>_2op): Likewise.
25978         (altivec_stvx_<mode>_1op): Likewise.
25979         (altivec_lvx_<VM2:mode>): New define_expand.
25980         (altivec_stvx_<VM2:mode>): Likewise.
25981         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
25982         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
25983         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
25984         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
25985         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
25986         (rs6000_gen_lvx): Likewise.
25987         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
25988         (altivec_expand_stv_builtin): Likewise.
25989         (altivec_expand_builtin): Likewise.
25990         * config/rs6000/vector.md: Likewise.
25992 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25994         PR target/82518
25995         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
25996         BYTES_BIG_ENDIAN.
25998 2018-03-20  Richard Biener  <rguenther@suse.de>
26000         PR target/84986
26001         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
26002         sign-conversions as zero, fall back to standard scalar_stmt
26003         cost for the rest.
26005 2018-03-20  Martin Liska  <mliska@suse.cz>
26007         PR ipa/84825
26008         * predict.c (rebuild_frequencies): Handle case when we have
26009         PROFILE_ABSENT, but flag_guess_branch_prob is false.
26011 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
26013         PR target/84990
26014         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
26015         flag_section_anchors.
26016         * varasm.c (use_blocks_for_decl_p): Remove hack for
26017         dw2_force_const_mem.
26019         PR target/84845
26020         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
26021         to ...
26022         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
26023         be created, use lowpart_subreg of operands[0] rather than operands[0]
26024         itself.
26025         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
26026         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
26027         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
26028         and n constraint instead of aarch64_shift_imm_di and Usd.
26029         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
26030         (*aarch64_<optab>_reg_minus<mode>3): ... this.
26032 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
26034         PR target/82989
26035         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
26036         to favor GPR over NEON registers.
26037         (<shift>di3_neon): Likewise.
26039 2018-03-20  Tom de Vries  <tom@codesourcery.com>
26041         PR target/84952
26042         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
26043         (nvptx_process_pars): Emit bar.sync asap and alap.
26045 2018-03-20  Tom de Vries  <tom@codesourcery.com>
26047         PR target/84954
26048         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
26049         seen_label if seen_label is already set.
26051 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
26053         PR target/84945
26054         * config/i386/i386.c (fold_builtin_cpu): For features above 31
26055         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
26056         Use 1U instead of 1.  Formatting fixes.
26058         PR c/84953
26059         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
26060         instead of TREE_TYPE (s1) for the return value.
26062 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
26064         PR tree-optimization/84946
26065         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
26066         bitsize + bitsize in poly_uint64 rather than poly_int64.
26068         PR sanitizer/78651
26069         * dwarf2asm.c: Include fold-const.c.
26070         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
26071         of decl rather than decl itself.
26073         PR rtl-optimization/84643
26074         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
26076 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
26078         PR sanitizer/78651
26079         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
26080         calling assemble_variable.
26082 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
26084         PR target/81647
26085         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
26086         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
26088 2018-03-19  Jim Wilson  <jimw@sifive.com>
26090         PR bootstrap/84856
26091         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
26092         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
26093         (riscv_first_stack_step): Likewise.
26094         (riscv_option_override): Use STACK_BOUNDARY instead of
26095         MIN_STACK_BOUNDARY.
26096         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
26097         MIN_STACK_BOUNDARY.
26098         (BIGGEST_ALIGNMENT): Set to 128.
26099         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
26100         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
26101         STACK_BOUNDARY.
26103 2018-03-19  Richard Biener  <rguenther@suse.de>
26105         PR tree-optimization/84933
26106         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
26107         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
26109 2018-03-19  Richard Biener  <rguenther@suse.de>
26111         PR tree-optimization/84859
26112         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
26113         (cond_if_else_store_replacement): Perform sinking operation on
26114         single-store BBs regardless of MAX_STORES_TO_SINK setting.
26115         Generalize what a BB with a single eligible store is.
26117 2018-03-19  Richard Biener  <rguenther@suse.de>
26119         PR tree-optimization/84929
26120         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
26121         chrec_is_positive against non-chrec arg.
26123 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
26125         PR target/84711
26126         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
26128 2018-03-18  Martin Liska  <mliska@suse.cz>
26130         PR rtl-optimization/84635
26131         * regrename.c (build_def_use): Use matches_mode only when
26132         matches >= 0.
26134 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
26136         PR tree-optimization/84913
26137         * tree-vect-loop.c (vectorizable_reduction): Don't try to
26138         vectorize chains of COND_EXPRs.
26140 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
26142         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
26144 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
26146         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
26148 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
26150         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
26152 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
26153             Kito Cheng  <kito.cheng@gmail.com>
26155         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
26156         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
26157         (nds32_adjust_reg_alloc_order): New function.
26158         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
26160 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
26162         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
26163         nds32_print_operand, nds32_print_operand_address): Use
26164         HOST_WIDE_INT_PRINT_DEC instead.
26166 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
26168         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
26170 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
26172         PR target/84902
26173         * config/i386/i386.c (initial_ix86_tune_features,
26174         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
26175         unsigned long long.
26176         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
26177         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
26178         rather than 1u << ix86_tune.  Formatting fix.
26179         (ix86_option_override_internal): Change ix86_arch_mask from
26180         unsigned int to unsigned HOST_WIDE_INT, initialize to
26181         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
26182         (ix86_function_specific_restore): Likewise.
26184 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
26186         PR target/84899
26187         * postreload.c (reload_combine_recognize_pattern): Perform
26188         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
26189         truncate_int_for_mode the result for the destination's mode.
26191         PR c/84909
26192         * hsa-gen.c (mem_type_for_type): Fix comment typo.
26193         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
26194         Likewise.
26195         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
26196         Likewise.
26198 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
26200         PR target/84876
26201         * lra-assigns.c (lra_split_hard_reg_for): Don't use
26202         regno_allocno_class_array and sorted_pseudos.
26203         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
26204         insns where regno is used.
26206 2018-03-16  Martin Liska  <mliska@suse.cz>
26208         PR ipa/84833
26209         * multiple_target.c (create_dispatcher_calls): Redirect
26210         reference in the symbol table.
26212 2018-03-16  Martin Liska  <mliska@suse.cz>
26214         PR ipa/84722
26215         * multiple_target.c (create_dispatcher_calls): Redirect also
26216         an alias.
26218 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
26220         PR c++/79937
26221         PR c++/82410
26222         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
26223         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
26224         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
26226 2018-03-16  Julia Koval  <julia.koval@intel.com>
26228         * doc/invoke.texi (Skylake Server): Add CLWB.
26229         Cannonlake): Remove CLWB.
26231 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
26233         PR tree-optimization/84841
26234         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
26235         1 << 3.
26236         (FLOAT_ONE_CONST_TYPE): Define.
26237         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
26238         (sort_by_operand_rank): Put entries with higher constant_type last
26239         rather than first to match comments.
26241 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
26243         * config/nios2/nios2.md (movsi_internal): Fix thinko in
26244         split predicate.
26246 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
26248         PR c++/79085
26249         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
26250         check and use address of target always.
26252 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
26254         PR target/84574
26255         * config/i386/i386.c (indirect_thunk_needed): Update comments.
26256         (indirect_thunk_bnd_needed): Likewise.
26257         (indirect_thunks_used): Likewise.
26258         (indirect_thunks_bnd_used): Likewise.
26259         (indirect_return_needed): New.
26260         (indirect_return_bnd_needed): Likewise.
26261         (output_indirect_thunk_function): Add a bool argument for
26262         function return.
26263         (output_indirect_thunk_function): Don't generate alias for
26264         function return thunk.
26265         (ix86_code_end): Call output_indirect_thunk_function to generate
26266         function return thunks.
26267         (ix86_output_function_return): Set indirect_return_bnd_needed
26268         and indirect_return_needed instead of indirect_thunk_bnd_needed
26269         and indirect_thunk_needed.
26271 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
26273         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
26274         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
26275         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
26277 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
26278             Paul Hua <paul.hua.gm@gmail.com>
26280         PR c/84852
26281         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
26283 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
26285         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
26286         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
26287         resp. SFmode cases.
26289 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
26291         PR target/84711
26292         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
26293         instead of GET_MODE_SIZE when comparing Units.
26295 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
26297         PR target/68256
26298         * varasm.c (hash_section): Return an unchangeble hash value
26299         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
26300         Return !aarch64_can_use_per_function_literal_pools_p ().
26302 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
26304         PR target/84860
26305         * optabs.c (emit_conditional_move): Pass address of cmode's copy
26306         rather than address of cmode as last argument to prepare_cmp_insn.
26308 2018-03-15  Julia Koval  <julia.koval@intel.com>
26310         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
26311         F_AVX512VNNI, F_AVX512BITALG): New.
26313 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
26315         PR target/83451
26316         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
26317         insn for floating-point loads and stores.
26319 2018-03-14  Carl Love  <cel@us.ibm.com>
26321         * config/rs6000/rs6000-c.c: Add macro definitions for
26322         ALTIVEC_BUILTIN_VEC_PERMXOR.
26323         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
26324         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
26325         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
26326         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
26327         UNSPEC_VPERMXOR.
26328         * config/doc/extend.texi: Add prototypes for vec_permxor.
26330 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
26332         PR c/84852
26333         * diagnostic-show-locus.c (class layout_point): Convert m_line
26334         from int to linenum_type.
26335         (line_span::comparator): Use linenum "compare" function when
26336         comparing line numbers.
26337         (test_line_span): New function.
26338         (layout_range::contains_point): Convert param "row" from int to
26339         linenum_type.
26340         (layout_range::intersects_line_p): Likewise.
26341         (layout::will_show_line_p): Likewise.
26342         (layout::print_source_line): Likewise.
26343         (layout::should_print_annotation_line_p): Likewise.
26344         (layout::print_annotation_line): Likewise.
26345         (layout::print_leading_fixits): Likewise.
26346         (layout::annotation_line_showed_range_p): Likewise.
26347         (struct line_corrections): Likewise for field m_row.
26348         (line_corrections::line_corrections): Likewise for param "row".
26349         (layout::print_trailing_fixits): Likewise.
26350         (layout::get_state_at_point): Likewise.
26351         (layout::get_x_bound_for_row): Likewise.
26352         (layout::print_line): Likewise.
26353         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
26354         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
26355         * input.c (selftest::test_linenum_comparisons): New function.
26356         (selftest::input_c_tests): Call it.
26357         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
26358         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
26359         * selftest.h (ASSERT_GT): New macro.
26360         (ASSERT_GT_AT): New macro.
26361         (ASSERT_LT): New macro.
26362         (ASSERT_LT_AT): New macro.
26364 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
26366         PR rtl-optimization/84780
26367         * combine.c (distribute_links): Don't make a link based on pc_rtx.
26369 2018-03-14  Martin Liska  <mliska@suse.cz>
26371         * tree.c (record_node_allocation_statistics): Use
26372         get_stats_node_kind.
26373         (get_stats_node_kind): New function extracted from
26374         record_node_allocation_statistics.
26375         (free_node): Use get_stats_node_kind.
26377 2018-03-14  Richard Biener  <rguenther@suse.de>
26379         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
26380         that the value-set of ANTIC_IN doesn't grow.
26382         Revert
26383         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
26384         member.
26385         (BB_VISITED_WITH_VISITED_SUCCS): New define.
26386         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
26388 2018-03-14  Julia Koval  <julia.koval@intel.com>
26390         * config.gcc (icelake-client, icelake-server): New.
26391         (icelake): Remove.
26392         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
26393         (initial_ix86_arch_features): Ditto.
26394         (PTA_SKYLAKE): Add SGX.
26395         (PTA_ICELAKE): Remove.
26396         (PTA_ICELAKE_CLIENT): New.
26397         (PTA_ICELAKE_SERVER): New.
26398         (ix86_option_override_internal): Split up icelake on icelake client and
26399         icelake server.
26400         (get_builtin_code_for_version): Ditto.
26401         (fold_builtin_cpu): Ditto.
26402         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
26403         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
26404         * config/i386/i386.h (processor_type): Ditto.
26405         * doc/invoke.texi: Ditto.
26407 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
26409         PR sanitizer/83392
26410         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
26411         INTEGER_CST offset, add it together with bitpos / 8 and
26412         sign extend based on POINTER_SIZE.
26414         PR target/84844
26415         Revert
26416         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
26418         PR target/78090
26419         * config/i386/constraints.md (Yc): New register constraint.
26420         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
26421         Use Yc constraint for alternative 2 of operand 0.  Remove
26422         preferred_for_speed attribute.
26424 2018-03-14  Richard Biener  <rguenther@suse.de>
26426         PR tree-optimization/84830
26427         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
26428         with the old one to avoid oscillations.
26430 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
26432         PR target/83712
26433         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
26434         pseudos.
26435         (assign_by_spills): Return a flag of reload assignment failure.
26436         Do not process the reload assignment failures.  Do not spill other
26437         reload pseudos if they has the same reg class.  Update n if
26438         necessary.
26439         (lra_assign): Add a return arg.  Set up from the result of
26440         assign_by_spills call.
26441         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
26442         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
26443         usage_insns if it is not NULL.
26444         (spill_hard_reg_in_range): New function.
26445         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
26446         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
26447         function prototypes.
26448         (lra_assign): Change prototype.
26449         * lra.c (lra): Add code to deal with fails by splitting hard reg
26450         live ranges.
26452 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
26454         * config/riscv/riscv.opt (mrelax): New option.
26455         * config/riscv/riscv.c (riscv_file_start): Emit ".option
26456         "norelax" when riscv_mrelax is disabled.
26457         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
26459 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
26461         PR target/84743
26462         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
26463         reassociation for int modes.
26465 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
26467         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
26468         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
26469         for big-endian.
26470         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
26471         * config/aarch64/aarch64-sve.md
26472         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
26473         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
26474         (*extend<mode><Vwide>2): Rename to...
26475         (aarch64_sve_extend<mode><Vwide>2): ...this.
26476         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
26477         renaming the old pattern to...
26478         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
26479         unsigned packs.
26480         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
26481         define_expand, renaming the old pattern to...
26482         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
26483         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
26484         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
26485         account when deciding which SVE instruction the optab should use.
26486         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
26488 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
26490         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
26491         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
26492         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
26493         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
26494         (tlsdesc_small_<mode>): Turn a define_expand and use
26495         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
26496         (tlsdesc_small_advsimd_<mode>): ...this.
26497         (tlsdesc_small_sve_<mode>): New pattern.
26499 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
26501         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
26502         (UNSPEC_UMUL_HIGHPART): New constants.
26503         (MUL_HIGHPART): New int iteraor.
26504         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
26505         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
26506         define_expand.
26507         (*<su>mul<mode>3_highpart): New define_insn.
26509 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
26511         PR lto/84805
26512         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
26513         incomplete types.
26515 2018-03-13  Martin Liska  <mliska@suse.cz>
26517         PR ipa/84658.
26518         * (sem_item_optimizer::sem_item_optimizer): Initialize new
26519         vector.
26520         (sem_item_optimizer::~sem_item_optimizer): Release it.
26521         (sem_item_optimizer::merge_classes): Register variable aliases.
26522         (sem_item_optimizer::fixup_pt_set): New function.
26523         (sem_item_optimizer::fixup_points_to_sets): Likewise.
26524         * ipa-icf.h: Declare new variables and functions.
26526 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
26528         PR middle-end/84834
26529         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
26530         integer_pow2p@2 and test integer_pow2p in condition.
26531         (A < 0 ? C : 0): Similarly for @1.
26533         PR middle-end/84831
26534         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
26535         characters starting at p contain '\0' character, don't look beyond
26536         that.
26538         PR target/84827
26539         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
26540         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
26542         PR target/84828
26543         * reg-stack.c (change_stack): Change update_end var from int to
26544         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
26545         also call set_block_for_insn on the newly added insns and rescan.
26547         PR target/84786
26548         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
26549         on the last operand.
26551         PR c++/84704
26552         * tree.c (stabilize_reference_1): Return save_expr (e) for
26553         STATEMENT_LIST even if it doesn't have side-effects.
26555 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
26557         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
26559 2018-03-12  Renlin Li  <renlin.li@arm.com>
26561         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
26562         aarch64_output_scalar_simd_mov_immediate.
26564 2018-03-12  Martin Sebor  <msebor@redhat.com>
26566         PR tree-optimization/83456
26567         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
26568         for perfectly overlapping calls to memcpy.
26569         (gimple_fold_builtin_memory_chk): Same.
26570         (gimple_fold_builtin_strcpy): Handle no-warning.
26571         (gimple_fold_builtin_stxcpy_chk): Same.
26572         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
26574 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
26576         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
26577         parameter.  Use it for SFmode.
26578         (rs6000_function_arg_advance_1): Adjust.
26579         (rs6000_function_arg): Adjust.
26580         (rs6000_gimplify_va_arg): Pass false for that new parameter.
26582 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
26584         PR rtl-optimization/84169
26585         PR rtl-optimization/84780
26586         * combine.c (can_combine_p): Check for a 2-insn combination whether
26587         the destination register is used between the two insns, too.
26589 2018-03-12  Richard Biener  <rguenther@suse.de>
26591         PR tree-optimization/84803
26592         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
26593         for refs DR analysis didn't process.
26595 2018-03-12  Richard Biener  <rguenther@suse.de>
26597         PR tree-optimization/84777
26598         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
26599         force-vectorize loops ignore whether we are optimizing for size.
26601 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
26603         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
26604         (TARGET_MD_ASM_ADJUST): Define.
26606 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
26607             Kito Cheng  <kito.cheng@gmail.com>
26608             Chung-Ju Wu  <jasonwucj@gmail.com>
26610         * config/nds32/nds32.c (nds32_compute_stack_frame,
26611         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
26612         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
26613         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
26614         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
26615         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
26616         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
26617         * config/nds32/nds32.md (prologue, epilogue): Use macro
26618         NDS32_V3PUSH_AVAILABLE_P to do checking.
26620 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
26622         PR debug/58150
26623         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
26624         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
26625         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
26626         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
26627         addition of most attributes on !orig_type_die or the attribute not
26628         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
26630 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
26631             Chung-Ju Wu  <jasonwucj@gmail.com>
26633         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
26634         __NDS32_VH__ macro.
26635         * config/nds32/nds32.opt (mvh): New option.
26637 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
26638             Chung-Ju Wu  <jasonwucj@gmail.com>
26640         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
26641         function.
26642         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
26643         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
26644         definition.
26646 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
26647             Chung-Ju Wu  <jasonwucj@gmail.com>
26649         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
26650         function.
26651         * config/nds32/nds32-multiple.md (strlensi): New pattern.
26652         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
26654 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
26655             Kito Cheng  <kito.cheng@gmail.com>
26656             Chung-Ju Wu  <jasonwucj@gmail.com>
26658         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
26659         UNSPEC_FFMISM and UNSPEC_FLMISM.
26660         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
26661         for ffb, ffmism and flmism.
26662         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
26663         (unspec_ffmism): Ditto.
26664         (unspec_flmism): Ditto.
26665         (nds32_expand_builtin_impl): Check if string extension is available.
26666         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
26667         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
26669 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
26671         Reverting patch:
26672         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
26674         PR target/83712
26675         * lra-assigns.c (assign_by_spills): Return a flag of reload
26676         assignment failure.  Do not process the reload assignment
26677         failures.  Do not spill other reload pseudos if they has the same
26678         reg class.
26679         (lra_assign): Add a return arg.  Set up from the result of
26680         assign_by_spills call.
26681         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
26682         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
26683         usage_insns if it is not NULL.
26684         (spill_hard_reg_in_range): New function.
26685         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
26686         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
26687         function prototypes.
26688         (lra_assign): Change prototype.
26689         * lra.c (lra): Add code to deal with fails by splitting hard reg
26690         live ranges.
26692 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
26694         PR target/84807
26695         * config/i386/i386.opt: Replace Enforcment with Enforcement.
26697 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
26699         PR debug/84620
26700         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
26701         (dw_val_node): Add val_symbolic_view.
26702         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
26703         (symview_upper_bound): New.
26704         (new_line_info_table): Initialize symviews_since_reset.
26705         (dwarf2out_source_line): Count symviews_since_reset and set
26706         symview_upper_bound.
26707         (dw_val_equal_p): Handle symview.
26708         (add_AT_symview): New.
26709         (print_dw_val): Handle symview.
26710         (attr_checksum, attr_checksum_ordered): Likewise.
26711         (same_dw_val_p, size_of_die): Likewise.
26712         (value_format, output_die): Likewise.
26713         (add_high_low_attributes): Use add_AT_symview for entry_view.
26714         (dwarf2out_finish): Reset symview_upper_bound, clear
26715         zero_view_p.
26717 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
26719         PR target/83969
26720         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
26721         Add strict argument and use it.
26722         (rs6000_split_multireg_move): Update for new strict argument.
26723         (mem_operand_gpr): Disallow all non-offsettable addresses.
26724         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
26726 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
26728         PR target/84772
26729         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
26730         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
26731         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
26733         PR c++/84767
26734         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
26735         decl, use remap_type if we want to use the type.
26737 2018-03-09  Martin Sebor  <msebor@redhat.com>
26739         PR tree-optimization/84526
26740         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
26741         Remove dead code.
26742         (builtin_access::generic_overlap): Be prepared to handle non-array
26743         base objects.
26745 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
26747         PR rtl-optimization/84682
26748         * lra-constraints.c (process_address_1): Check is_address flag
26749         for address constraints.
26750         (process_alt_operands): Likewise.
26751         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
26752         preprocess_constraints.
26753         * recog.h (preprocess_constraints): Add oploc parameter.
26754         Adjust callers.
26755         * recog.c (preprocess_constraints): Test address_operand for
26756         CT_ADDRESS constraints.
26758 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
26760         PR target/83712
26761         * lra-assigns.c (assign_by_spills): Return a flag of reload
26762         assignment failure.  Do not process the reload assignment
26763         failures.  Do not spill other reload pseudos if they has the same
26764         reg class.
26765         (lra_assign): Add a return arg.  Set up from the result of
26766         assign_by_spills call.
26767         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
26768         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
26769         usage_insns if it is not NULL.
26770         (spill_hard_reg_in_range): New function.
26771         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
26772         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
26773         function prototypes.
26774         (lra_assign): Change prototype.
26775         * lra.c (lra): Add code to deal with fails by splitting hard reg
26776         live ranges.
26778 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26780         PR target/83193
26781         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
26782         Accept complain bool parameter.  Only emit errors if it is true.
26783         (arm_parse_cpu_option_name): Likewise.
26784         (arm_target_thumb_only): Adjust callers of the above.
26785         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
26786         prototype to take a default true bool parameter.
26787         (arm_parse_arch_option_name): Likewise.
26789 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
26790             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
26792         PR jit/64089
26793         PR jit/84288
26794         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
26795         * configure: Regenerate.
26796         * configure.ac ("linker --version-script option"): New.
26797         ("linker soname option"): New.
26799 2018-03-09  Richard Biener  <rguenther@suse.de>
26801         PR tree-optimization/84775
26802         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
26803         immediate uses of predicate stmts and mark them modified.
26805         Revert
26806         PR tree-optimization/84178
26807         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
26808         to caller.
26809         (version_loop_for_if_conversion): Delay update_ssa call.
26810         (tree_if_conversion): Delay update_ssa until after predicate
26811         insertion.
26813 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
26815         PR target/84763
26816         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
26817         when the function accesses prior frames.
26819 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
26821         PR debug/84456
26822         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
26823         gen_llsym, otherwise call maybe_gen_llsym.
26825         PR inline-asm/84742
26826         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
26827         has ',' character inside of it.
26829 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26831         PR target/84748
26832         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
26833         as clobbering CC_REGNUM.
26835 2018-03-08  Richard Biener  <rguenther@suse.de>
26837         PR middle-end/84552
26838         * tree-scalar-evolution.c: Include tree-into-ssa.h.
26839         (follow_copies_to_constant): Do not follow SSA names registered
26840         for update.
26842 2018-03-08  Richard Biener  <rguenther@suse.de>
26844         PR tree-optimization/84178
26845         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
26846         to caller.
26847         (version_loop_for_if_conversion): Delay update_ssa call.
26848         (tree_if_conversion): Delay update_ssa until after predicate
26849         insertion.
26851 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
26853         PR tree-optimization/84178
26854         * tree-if-conv.c (release_bb_predicate): Remove the
26855         the assertion that the stmts have NULL use_ops.
26856         Discard the statements, asserting that they haven't
26857         yet been added to a BB.
26859 2018-03-08  Richard Biener  <rguenther@suse.de>
26861         PR tree-optimization/84746
26862         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
26863         (phi_translate): Pass in destination ANTIC_OUT set.
26864         (phi_translate_1): Likewise.  For a simplified result lookup
26865         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
26866         (phi_translate_set): Adjust.
26867         (do_pre_regular_insertion): Likewise.
26868         (do_pre_partial_partial_insertion): Likewise.
26870 2018-03-08  Martin Liska  <mliska@suse.cz>
26872         PR gcov-profile/84735
26873         * doc/gcov.texi: Document usage of profile files.
26874         * gcov-io.h: Document changes in the format.
26876 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
26878         PR debug/84404
26879         PR debug/84408
26880         * dwarf2out.c (struct dw_line_info_table): Update comments for
26881         view == -1.
26882         (FORCE_RESET_NEXT_VIEW): New.
26883         (FORCE_RESETTING_VIEW_P): New.
26884         (RESETTING_VIEW_P): Check for -1 too.
26885         (ZERO_VIEW_P): Likewise.
26886         (new_line_info_table): Force-reset next view.
26887         (dwarf2out_begin_function): Likewise.
26888         (dwarf2out_source_line): Simplify zero_view_p initialization.
26889         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
26890         view directly.  Omit view when omitting .loc at line 0.
26892 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
26894         PR tree-optimization/84740
26895         * tree-switch-conversion.c (process_switch): Call build_constructors
26896         only if info.phi_count is non-zero.
26898         PR tree-optimization/84739
26899         * tree-tailcall.c (find_tail_calls): Check call arguments against
26900         DECL_ARGUMENTS (current_function_decl) rather than
26901         DECL_ARGUMENTS (func) when checking for tail recursion.
26903 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
26905         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
26906         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
26907         Volker Reichelt's entry and add entries for people that perform
26908         GCC fuzzy testing and report numerous bugs.
26910 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
26912         PR target/82411
26913         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
26914         readonly data in sdata, if that is disabled.
26915         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
26916         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
26917         -mreadonly-in-sdata option.
26919 2018-03-07  Martin Sebor  <msebor@redhat.com>
26921         PR tree-optimization/84468
26922         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
26923         basic block when looking for nul assignment.
26925 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
26927         PR target/84277
26928         * except.h (output_function_exception_table): Adjust prototype.
26929         * except.c (output_function_exception_table): Remove FNNAME parameter
26930         and add SECTION parameter.  Ouput one part of the table at a time.
26931         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
26932         the first part of the exception table and emit unwind directives.
26933         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
26934         (i386_pe_seh_cold_init): Likewise.
26935         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
26936         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
26937         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
26938         (ix86_output_call_insn): Emit a nop in one more case for SEH.
26939         * config/i386/winnt.c: Include except.h.
26940         (struct seh_frame_state): Add reg_offset, after_prologue and
26941         in_cold_section fields.
26942         (i386_pe_seh_end_prologue): Set seh->after_prologue.
26943         (i386_pe_seh_cold_init): New function.
26944         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
26945         to seh->in_cold_section.
26946         (seh_emit_push): Record the offset of the push.
26947         (seh_emit_save): Record the offet of the save.
26948         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
26949         Test seh->after_prologue to disregard the epilogue.
26950         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
26951         (i386_pe_end_cold_function): New function.
26953 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
26955         PR fortran/84565
26956         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
26957         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
26959         PR c++/84704
26960         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
26961         on tmp_var.
26962         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
26963         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
26965         PR middle-end/84723
26966         * multiple_target.c: Include tree-inline.h and intl.h.
26967         (expand_target_clones): Diagnose and fail if node->definition and
26968         !tree_versionable_function_p (node->decl).
26970 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
26972         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
26973         sprint_ul.
26974         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
26975         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
26976         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
26978 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
26980         PR target/84710
26981         * combine.c (try_combine): Use reg_or_subregno instead of handling
26982         just paradoxical SUBREGs and REGs.
26984 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
26986         * config/arc/arc.c (arc_finalize_pic): Remove function.
26987         (arc_must_save_register): We use single base PIC register, remove
26988         checks to save/restore the PIC register.
26989         (arc_expand_prologue): Likewise.
26990         * config/arc/arc-protos.h (arc_set_default_type_attributes):
26991         Remove.
26992         (arc_verify_short): Likewise.
26993         (arc_attr_type): Likewise.
26994         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
26995         (walk_stores): Likewise.
26996         (arc_address_cost): Make it static.
26997         (arc_verify_short): Likewise.
26998         (branch_dest): Likewise.
26999         (arc_attr_type): Likewise.
27000         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
27001         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
27002         (arc_final_prescan_insn): Remove inserting the nops due to
27003         hardware hazards.  It is done in reorg step.
27004         (insn_length_variant_t): Remove.
27005         (insn_length_parameters_t): Likewise.
27006         (arc_insn_length_parameters): Likewise.
27007         (arc_get_insn_variants): Likewise.
27008         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
27010 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
27012         PR inline-asm/84683
27013         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
27014         assertion failure.
27016         PR tree-optimization/84687
27017         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
27018         on new_node->decl.
27019         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
27021 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
27023         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
27024         Rename to ppc_speculation_barrier.
27025         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
27026         __builtin_ppc_speculation_barrier.
27028 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
27030         PR target/84700
27031         * combine.c (combine_simplify_rtx): Don't try to simplify if
27032         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
27033         are equal to x.
27035 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
27037         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
27038         to 32 bytes when compiling for POWER9.
27040 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
27042         PR target/84564
27043         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
27044         regparm >= 3 with no arg reg available also for calls with
27045         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
27047         PR target/84524
27048         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
27049         orig,vex.
27050         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
27052 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
27054         PR target/84264
27055         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
27057 2018-03-05  Richard Biener  <rguenther@suse.de>
27059         PR tree-optimization/84486
27060         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
27061         When inserting a __builtin_assume_aligned call set the LHS
27062         SSA name alignment info accordingly.
27064 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
27066         PR tree-optimization/84114
27067         * config/aarch64/aarch64.c (aarch64_reassociation_width)
27068         Avoid reassociation of FLOAT_MODE addition.
27070 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
27072         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
27073         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
27074         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
27075         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
27076         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
27077         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
27078         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
27079         and -mwbnoinvd.
27080         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
27081         __builtin_ia32_wbinvd): New builtins.
27082         (SPECIAL_ARGS2): New.
27083         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
27084         (SPECIAL_ARGS2): New.
27085         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
27086         (ix86_valid_target_attribute_inner_p): Ditto.
27087         (ix86_init_mmx_sse_builtins): Add special_args2.
27088         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
27089         TARGET_WBNOINVD_P): New.
27090         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
27091         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
27092         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
27093         * config/i386/immintrin.h (_wbinvd): New intrinsic.
27094         * config/i386/pconfigintrin.h: New file.
27095         * config/i386/wbnoinvdintrin.h: Ditto.
27096         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
27097         wbnoinvdintrin.h.
27098         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
27100 2018-03-05  Richard Biener  <rguenther@suse.de>
27102         PR tree-optimization/84670
27103         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
27104         member.
27105         (BB_VISITED_WITH_VISITED_SUCCS): New define.
27106         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
27107         (compute_antic_aux): Only assert the number of values in ANTIC_IN
27108         doesn't grow if all successors (recursively) were visited at least
27109         once.
27111 2018-03-05  Richard Biener  <rguenther@suse.de>
27113         PR tree-optimization/84650
27114         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
27115         if executed in the loop pipeline.
27117 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
27119         * doc/configfiles.texi (Configuration Files): Move info about
27120         conditionalizing $target-protos.h to...
27121         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
27122         differs from $target-protos.h.
27124 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
27125             Chung-Ju Wu  <jasonwucj@gmail.com>
27127         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
27128         * config/nds32/nds32-multiple.md (setmemsi): Define.
27129         * config/nds32/nds32-memory-manipulation.c
27130         (nds32_gen_dup_4_byte_to_word_value): New.
27131         (emit_setmem_word_loop): New.
27132         (emit_setmem_byte_loop): New.
27133         (nds32_expand_setmem_loop): New.
27134         (nds32_expand_setmem_loop_v3m): New.
27135         (nds32_expand_setmem_unroll): New.
27136         (nds32_expand_setmem): New.
27138 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
27139             Chung-Ju Wu  <jasonwucj@gmail.com>
27141         * config/nds32/nds32-memory-manipulation.c
27142         (nds32_emit_load_store): New.
27143         (nds32_emit_post_inc_load_store): New.
27144         (nds32_emit_mem_move): New.
27145         (nds32_emit_mem_move_block): New.
27146         (nds32_expand_movmemsi_loop_unknown_size): New.
27147         (nds32_expand_movmemsi_loop_known_size): New.
27148         (nds32_expand_movmemsi_loop): New.
27149         (nds32_expand_movmemsi_unroll): New.
27150         (nds32_expand_movmemqi): Rename ...
27151         (nds32_expand_movmemsi): ... to this.
27152         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
27153         (movmemsi): ... to this.
27154         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
27155         (nds32_expand_movmemsi): ... to this.
27157 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
27158             Monk Chiang  <sh.chiang04@gmail.com>
27159             Chung-Ju Wu  <jasonwucj@gmail.com>
27161         * config/nds32/nds32-protos.h
27162         (nds32_expand_load_multiple): New arguments.
27163         (nds32_expand_store_multiple): Ditto.
27164         (nds32_valid_multiple_load_store): Rename ...
27165         (nds32_valid_multiple_load_store_p): ... to this.
27166         * config/nds32/nds32-memory-manipulation.c
27167         (nds32_expand_load_multiple): Refine implementation.
27168         (nds32_expand_store_multiple): Ditto.
27169         * config/nds32/nds32-multiple.md
27170         (load_multiple): Update nds32_expand_load_multiple interface.
27171         (store_multiple): Update nds32_expand_store_multiple interface.
27172         * config/nds32/nds32-predicates.c
27173         (nds32_valid_multiple_load_store): Rename ...
27174         (nds32_valid_multiple_load_store_p): ... to this and refine
27175         implementation.
27176         * config/nds32/predicates.md
27177         (nds32_load_multiple_and_update_address_operation): New predicate.
27178         (nds32_store_multiple_and_update_address_operation): New predicate.
27180 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
27181             Chung-Ju Wu  <jasonwucj@gmail.com>
27183         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
27184         (combo): New attribute.
27185         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
27187 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
27189         * config/nds32/nds32.opt: Change -mcmodel= default value.
27191 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
27192             Monk Chiang  <sh.chiang04@gmail.com>
27193             Chung-Ju Wu  <jasonwucj@gmail.com>
27195         * config/nds32/constants.md (unspec_element): New enum.
27196         * config/nds32/constraints.md (Umw): New constraint.
27197         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
27198         * config/nds32/nds32-intrinsic.md: Likewise.
27199         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
27200         (nds32_valid_smw_lwm_base_p): New.
27201         (nds32_output_smw_single_word): New.
27202         (nds32_output_lmw_single_word): New.
27203         (nds32_expand_unaligned_load): New.
27204         (nds32_expand_unaligned_store): New.
27205         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
27206         (nds32_output_smw_single_word): Declare.
27207         (nds32_output_lmw_single_word): Declare.
27208         (nds32_expand_unaligned_load): Declare.
27209         (nds32_expand_unaligned_store): Declare.
27210         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
27211         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
27212         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
27213         NDS32_BUILTIN_UASTORE_DW.
27214         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
27215         predicate.
27217 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
27218             Kito Cheng  <kito.cheng@gmail.com>
27219             Chung-Ju Wu  <jasonwucj@gmail.com>
27221         * config/nds32/nds32-intrinsic.c
27222         (nds32_expand_builtin_null_ftype_reg): Delete.
27223         (nds32_expand_builtin_reg_ftype_imm): Ditto.
27224         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
27225         (nds32_read_argument): New.
27226         (nds32_legitimize_target): Ditto.
27227         (nds32_legitimize_argument): Ditto.
27228         (nds32_check_constant_argument): Ditto.
27229         (nds32_expand_unop_builtin): Ditto.
27230         (nds32_expand_unopimm_builtin): Ditto.
27231         (nds32_expand_binop_builtin): Ditto.
27232         (nds32_builtin_decl_impl): Ditto.
27233         (builtin_description): Ditto.
27234         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
27235         (nds32_init_builtins_impl): Ditto.
27236         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
27237         (nds32_builtin_decl): New.
27238         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
27239         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
27241 2018-03-02  Jeff Law  <law@redhat.com>
27243         * reorg.c (stop_search_p): Handle DEBUG_INSN.
27244         (redundant_insn, fill_simple_delay_slots): Likewise.
27245         (fill_slots_from_thread): Likewise.
27246         * resource.c (mark_referenced_resources): Likewise.
27247         (mark_set_resources, find_dead_or_set_registers): Likewise.
27249 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
27251         * substring-locations.h (format_warning_va): Formatting fix for
27252         ATTRIBUTE_GCC_DIAG.
27253         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
27254         argument.
27255         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
27256         * substring-locations.c: Include intl.h.
27257         (format_warning_va): Turned into small wrapper around
27258         format_warning_n_va, renamed to ...
27259         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
27260         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
27261         use ngettext.
27262         (format_warning_at_substring_n): New function.
27263         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
27264         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
27265         format_warning_at_substring with just a shorter name instead of
27266         const function pointer.
27267         (fmtwarn_n): New function.
27268         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
27269         appropriate, get rid of all the fmtstr temporaries, move conditionals
27270         with G_() wrapped string literals directly into fmtwarn arguments,
27271         cast dir.len to (int), formatting fixes.
27273 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
27275         * doc/invoke.texi: Remove "Cilk Plus" references.
27277 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
27278             Richard Biener  <rguenther@suse.de>
27280         PR ipa/84628
27281         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
27282         for error or warning attributes if CALL_FROM_THUNK_P is set.
27283         Formatting fixes.
27285 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
27287         PR target/56540
27288         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
27289         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
27291         PR target/56540
27292         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
27293         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
27295         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
27296         instead of -1U in last predictors element's probability member.
27298 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
27300         PR ipa/83983
27301         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
27302         arguments if they are comparable.
27304 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
27306         PR tree-optimization/84634
27307         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
27308         masks and masked_loop_p with a single loop_masks, making sure it's
27309         null for bb vectorization.
27311 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
27313         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
27314         (vect_analyze_data_ref_access): Use loop->safe_len rather than
27315         loop->force_vectorize to check whether there is no alias.
27317 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
27319         PR target/84614
27320         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
27321         prototypes.
27322         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
27323         comments.
27324         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
27325         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
27326         instead of a loop around prev_real_insn.
27327         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
27328         prev_real_insn.
27330         PR inline-asm/84625
27331         * config/i386/i386.c (ix86_print_operand): Use conditional
27332         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
27333         zero vector.
27335 2018-03-02  Richard Biener  <rguenther@suse.de>
27337         PR tree-optimization/84427
27338         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
27339         (bitmap_set_subtract_values): Rewrite to handle multiple
27340         exprs per value.
27341         (clean): Likewise.
27342         (prune_clobbered_mems): Likewise.
27343         (phi_translate): Take edge instead of pred/phiblock.
27344         (phi_translate_1): Likewise.
27345         (phi_translate_set): Likewise.  Insert all translated
27346         exprs for a value into the set, keeping possibly multiple
27347         expressions per value.
27348         (compute_antic_aux): Adjust for phi_translate changes.
27349         When intersecting union the expressions and prune those
27350         not in the final value set, keeping possibly multiple
27351         expressions per value.  Do not use value-insertion
27352         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
27353         all expressions.  Add verification that the value-sets
27354         only shrink during iteration.
27355         (compute_partial_antic_aux): Adjust for the phi_translate changes.
27356         (do_pre_regular_insertion): Likewise.
27357         (do_pre_partial_partial_insertion): Likewise.
27359 2018-03-02  Richard Biener  <rguenther@suse.de>
27361         PR target/82005
27362         * config/darwin.c (saved_debug_info_level): New static global.
27363         (darwin_asm_lto_start): Disable debug info generation for LTO out.
27364         (darwin_asm_lto_end): Restore debug info generation settings.
27366 2018-03-01  Martin Liska  <mliska@suse.cz>
27368         PR sanitizer/82484
27369         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
27370         volatile arguments.
27372 2018-03-01  Richard Biener  <rguenther@suse.de>
27374         PR debug/84645
27375         * dwarf2out.c (gen_variable_die): Properly handle late VLA
27376         type annotation with LTO when debug was disabled at compile-time.
27378 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
27380         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
27381         XINT with INTVAL.
27382         (mips_final_postscan_insn): Likewise.
27384 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
27386         PR rtl-optimization/84528
27387         * alias.c (init_alias_target): Add commentary.
27388         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
27389         a unique base value if the frame pointer is not eliminated
27390         to the stack pointer.
27392 2018-03-01  Tom de Vries  <tom@codesourcery.com>
27394         PR rtl-optimization/83327
27395         * lra-int.h (hard_regs_spilled_into): Declare.
27396         * lra.c (hard_regs_spilled_into): Define.
27397         (init_reg_info): Init hard_regs_spilled_into.
27398         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
27399         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
27400         (process_bb_lives): Handle hard_regs_spilled_into.
27401         (lra_create_live_ranges_1): Before doing liveness propagation, clear
27402         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
27404 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
27406         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
27407         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
27408         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
27409         * config/rs6000/aix72.h: New file.
27411 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
27413         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
27414         instead of warning_at with conditional singular and plural messages
27415         where possible.
27417         PR target/52991
27418         * stor-layout.c (update_alignment_for_field): For
27419         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
27420         && !DECL_PACKED (field), do the alignment update, just use
27421         only desired_align instead of MAX (type_align, desired_align)
27422         as the alignment.
27423         (place_field): Don't do known_align < desired_align handling
27424         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
27425         is non-NULL, instead do it after rli->prev_field handling and
27426         only if not within a bitfield word.  For DECL_PACKED (field)
27427         use type_align of BITS_PER_UNIT.
27429 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
27431         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
27432         superfluous parentheses and trailing spaces.
27434 2018-02-28  Richard Biener  <rguenther@suse.de>
27436         PR tree-optimization/84584
27437         * graphite-scop-detection.c (scop_detection::add_scop): Discard
27438         SCoPs with fake exit edge.
27440 2018-02-28  Martin Liska  <mliska@suse.cz>
27442         PR testsuite/84597
27443         * timevar.c (timer::print): Fix format to properly print 100%
27444         values.
27446 2018-02-28  Richard Biener  <rguenther@suse.de>
27448         PR middle-end/84607
27449         * genmatch.c (capture_info::walk_match): Do not mark
27450         captured expressions without operands as expr_p given
27451         they act more like predicates and should be subject to
27452         "lost tail" side-effect preserving.
27454 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
27456         PR rtl-optimization/81611
27457         * auto-inc-dec.c (attempt_change): Move dead note from
27458         mem_insn if it's the next use of regno
27459         (find_address): Take address use of reg holding
27460         non-incremented value.  Add parm to limit search to the named
27461         reg only.
27462         (merge_in_block): Attempt to use a mem insn that is the next
27463         use of the original regno.
27465 2018-02-27  Martin Sebor  <msebor@redhat.com>
27467         PR c++/83871
27468         * doc/invoke.texi (-Wmissing-attributes): New option.
27469         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
27471 2018-02-27  Martin Sebor  <msebor@redhat.com>
27473         PR translation/84207
27474         * diagnostic-core.h (warning_n, error_n, inform_n): Change
27475         n argument to unsigned HOST_WIDE_INT.
27476         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
27477         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
27478         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
27479         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
27481 2018-02-27  Richard Biener  <rguenther@suse.de>
27483         PR tree-optimization/84512
27484         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
27485         Do not use the estimate returned from record_stmt_cost for
27486         the scalar iteration cost but sum properly using add_stmt_cost.
27488 2018-02-27  Richard Biener  <rguenther@suse.de>
27490         PR tree-optimization/84466
27491         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
27492         Adjust last change to less strictly validate use operands.
27494 2018-02-27  Martin Liska  <mliska@suse.cz>
27496         PR gcov-profile/84548
27497         * gcov.c (process_file): Allow partial overlap and consider it
27498         also as group functions.
27499         (output_lines): Properly calculate range of lines for a group.
27501 2018-02-27  Martin Liska  <mliska@suse.cz>
27503         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
27504         'ggc' suffixes.  Change first column width.
27505         (timer::print): Fix formatting of the column.
27507 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
27509         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
27510         preserve inline entry blocks for the sake of debug inline
27511         entry point markers alone.
27512         (remove_unused_locals): Suggest in comments a better place to
27513         force the preservation of inline entry blocks that are
27514         otherwise unused, but do not preserve them.
27516 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
27518         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
27520 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
27522         PR target/84039
27523         * config/i386/constraints.md (Bs): Replace
27524         ix86_indirect_branch_register with
27525         TARGET_INDIRECT_BRANCH_REGISTER.
27526         (Bw): Likewise.
27527         * config/i386/i386.md (indirect_jump): Likewise.
27528         (tablejump): Likewise.
27529         (*sibcall_memory): Likewise.
27530         (*sibcall_value_memory): Likewise.
27531         Peepholes of indirect call and jump via memory: Likewise.
27532         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
27533         (*sibcall_value_GOT_32): Likewise.
27534         * config/i386/predicates.md (indirect_branch_operand): Likewise.
27535         (GOT_memory_operand): Likewise.
27536         (call_insn_operand): Likewise.
27537         (sibcall_insn_operand): Likewise.
27538         (GOT32_symbol_operand): Likewise.
27539         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
27541 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
27543         PR rtl-optimization/83496
27544         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
27545         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
27546         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
27547         redundant insn, if any.
27548         (relax_delay_slots): Likewise.
27549         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
27551 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
27553         PR tree-optimization/83965
27554         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
27555         that grouped statements are part of a reduction chain.  Return
27556         true if the statement is not marked as a reduction itself but
27557         is part of a group.
27558         (vect_recog_dot_prod_pattern): Don't check whether the statement
27559         is part of a group here.
27560         (vect_recog_sad_pattern): Likewise.
27561         (vect_recog_widen_sum_pattern): Likewise.
27563 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
27565         PR debug/84545
27566         * final.c (rest_of_clean_state): Also look for calls inside sequences.
27568 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
27570         PR target/84530
27571         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
27572         the bool argument.
27573         (ix86_output_indirect_function_return): New prototype.
27574         (ix86_split_simple_return_pop_internal): Likewise.
27575         * config/i386/i386.c (indirect_return_via_cx): New.
27576         (indirect_return_via_cx_bnd): Likewise.
27577         (indirect_thunk_name): Handle return va CX_REG.
27578         (output_indirect_thunk_function): Create alias for
27579         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
27580         (ix86_output_indirect_jmp): Remove the bool argument.
27581         (ix86_output_indirect_function_return): New function.
27582         (ix86_split_simple_return_pop_internal): Likewise.
27583         * config/i386/i386.md (*indirect_jump): Don't pass false
27584         to ix86_output_indirect_jmp.
27585         (*tablejump_1): Likewise.
27586         (simple_return_pop_internal): Change it to define_insn_and_split.
27587         Call ix86_split_simple_return_pop_internal to split it for
27588         -mfunction-return=.
27589         (simple_return_indirect_internal): Call
27590         ix86_output_indirect_function_return instead of
27591         ix86_output_indirect_jmp.
27593 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
27595         PR bootstrap/84405
27596         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
27597         memset and value initialization afterwards.
27599 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
27601         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
27603 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
27605         PR target/84521
27606         * common/config/aarch64/aarch64-common.c
27607         (aarch_option_optimization_table[]): Switch
27608         off fomit-frame-pointer
27610 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
27611             Chung-Ju Wu  <jasonwucj@gmail.com>
27613         * config/nds32/nds32-multiple.md (load_multiple): Disallow
27614         volatile memory.
27615         (store_multiple): Ditto.
27617 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
27619         * config.gcc: Add --with-cpu support for nds32 target.
27620         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
27621         * config/nds32/nds32.opt: Add -mcpu= option.
27623 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
27625         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
27626         isel=yes): Warn for these deprecated options.
27628 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
27630         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
27631         ISA_2_5_MASKS_EMBEDDED.
27633 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
27635         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
27636         p->max as pointers rather than using iterative_hash_expr.
27638 2018-02-23  Carl Love  <cel@us.ibm.com>
27640         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
27641         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
27642         BU_P8V_OVERLOAD_2.
27643         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
27644         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
27645         P8V_BUILTIN_VEC_VUNSIGNED2.
27647 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
27649         PR target/81572
27650         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
27651         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
27652         LRA_UNKNOWN_ALT.
27653         * lra-constraints.c (curr_insn_transform): Set up
27654         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
27655         LRA_UNKNOWN_ALT.
27656         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
27657         * lra-eliminations.c (spill_pseudos): Ditto.
27658         (process_insn_for_elimination): Ditto.
27659         * lra-lives.c (reg_early_clobber_p): Use the new macros.
27660         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
27661         LRA_NON_CLOBBERED_ALT.
27663 2018-02-22  Martin Sebor  <msebor@redhat.com>
27665         PR tree-optimization/84480
27666         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
27667         to maybe_diag_stxncpy_trunc.  Call it.
27668         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
27669         from gimple_fold_builtin_strcpy.  Print inlining stack.
27670         (handle_builtin_stxncpy): Print inlining stack.
27671         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
27673 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
27675         PR target/84176
27676         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
27677         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
27678         and -fcheck-pointer-bounds are used together.
27679         (indirect_thunk_prefix): New enum.
27680         (indirect_thunk_need_prefix): New function.
27681         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
27682         "_nt" instead of "_bnd" for NOTRACK prefix.
27683         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
27684         (output_indirect_thunk_function): Likewise.
27685         (): Likewise.
27686         (ix86_code_end): Update output_indirect_thunk_function calls.
27687         (ix86_output_indirect_branch_via_reg): Replace
27688         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
27689         (ix86_output_indirect_branch_via_push): Likewise.
27690         (ix86_output_function_return): Likewise.
27691         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
27692         incompatible with -fcf-protection=branch and
27693         -fcheck-pointer-bounds.
27695 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
27697         PR target/83335
27698         * config/aarch64/aarch64.c (aarch64_print_address_internal):
27699         Change gcc_assert call to output_operand_lossage.
27701 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
27703         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
27705 2018-02-22  DJ Delorie  <dj@redhat.com>
27706             Sebastian Perta  <sebastian.perta@renesas.com>
27707             Oleg Endo  <olegendo@gcc.gnu.org>
27709         * config/rx/rx.c (rx_rtx_costs): New function.
27710         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
27712 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
27714         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
27716 2018-02-22  Martin Liska  <mliska@suse.cz>
27718         PR driver/83193
27719         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
27720         Add "native" as a possible value.
27722 2018-02-22  Martin Liska  <mliska@suse.cz>
27724         PR driver/83193
27725         * config/i386/i386.c (ix86_option_override_internal):
27726         Add "native" as a possible value for -march and -mtune.
27728 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
27730         PR target/84502
27731         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
27732         to all type variants.
27734         PR tree-optimization/84503
27735         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
27736         width as info->bitpos + info->bitsize - start.
27737         (merged_store_group::merge_overlapping): Simplify width computation.
27738         (check_no_overlap): New function.
27739         (imm_store_chain_info::try_coalesce_bswap): Compute expected
27740         start + width and last_order of the group, fail if check_no_overlap
27741         fails.
27742         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
27743         to group if check_no_overlap fails.
27745 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
27747         * config/rs6000/altivec.md: Delete contraint arguments to
27748         define_expand, define_split, and define_peephole2, and in
27749         define_insn_and_split if always unused.
27750         * config/rs6000/darwin.md: Ditto.
27751         * config/rs6000/dfp.md: Ditto.
27752         * config/rs6000/rs6000.md: Ditto.
27753         * config/rs6000/sync.md: Ditto.
27754         * config/rs6000/vector.md: Ditto.
27755         * config/rs6000/vsx.md: Ditto.
27757 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
27759         * config/rs6000/altivec.md: Write output control strings as braced
27760         blocks instead of double-quoted strings.
27761         * config/rs6000/darwin.md: Ditto.
27762         * config/rs6000/rs6000.md: Ditto.
27763         * config/rs6000/vector.md: Ditto.
27764         * config/rs6000/vsx.md: Ditto.
27766 2018-02-21  Jason Merrill  <jason@redhat.com>
27768         PR c++/84314 - ICE with templates and fastcall attribute.
27769         * attribs.c (build_type_attribute_qual_variant): Remove assert.
27771 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
27773         * ipa-cp.c (determine_versionability): Fix comment typos.
27775 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
27777         PR c/84229
27778         * ipa-cp.c (determine_versionability): Do not version functions caling
27779         va_arg_pack.
27781 2018-02-21  Martin Liska  <mliska@suse.cz>
27783         PR driver/83193
27784         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
27785         Add "native" as a possible value.
27786         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
27787         the macro when native cpu detection is available.
27789 2018-02-21  Martin Liska  <mliska@suse.cz>
27791         PR driver/83193
27792         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
27793         Add "native" as a possible value.
27794         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
27795         when native cpu detection is available.
27797 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
27798             Martin Sebor  <msebor@redhat.com>
27800         PR tree-optimization/84478
27801         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
27802         false.
27803         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
27804         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
27805         support which is conservatively correct, for 2 only stay conservative
27806         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
27807         argument to the 2 argument get_range_strlen, adjust 6 arg
27808         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
27809         false.
27810         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
27811         (gimple_fold_builtin_strlen): Pass true as last argument to
27812         get_range_strlen.
27814 2018-02-20  Martin Sebor  <msebor@redhat.com>
27816         PR middle-end/84095
27817         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
27818         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
27819         (builtin_memref::builtin_memref): Factor out parts into
27820         set_base_and_offset and call it.
27822 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
27824         PR middle-end/84406
27825         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
27826         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
27827         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
27828         search at the associated MODE_INT.
27830 2018-02-20  Jeff Law  <law@redhat.com>
27832         PR middle-end/82123
27833         PR tree-optimization/81592
27834         PR middle-end/79257
27835         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
27836         for range data rather than using global data.
27837         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
27838         range data rather than using global data.
27839         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
27840         pass it to children as needed.
27841         (struct directive::fmtresult): Similarly.
27842         (struct directive::set_width): Similarly.
27843         (struct directive::set_precision): Similarly.
27844         (format_integer, format_directive, parse_directive): Similarly.
27845         (format_none): Accept unnamed vr_values parameter.
27846         (format_percent, format_floating, format_character): Similarly.
27847         (format_string, format_plain): Similarly.
27848         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
27849         the EVRP range analyzer for range data rather than using global data.
27850         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
27851         gimple-ssa-evrp-analyze.h
27852         (class sprintf_dom_walker): Add after_dom_children member function.
27853         Add evrp_range_analyzer member.
27854         (sprintf_dom_walker::before_dom_children): Call into the EVRP
27855         range analyzer as needed.
27856         (sprintf_dom_walker::after_dom_children): New member function.
27857         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
27858         if not optimizing.
27859         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
27860         (evrp_range_analyzer::pop_to_marker): Likewise.
27862 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
27864         PR tree-optimization/84419
27865         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
27866         with the required type if its current type is compatible but
27867         different.
27869 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
27871         PR middle-end/82004
27872         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
27873         after vectorization.
27875 2018-02-20  Martin Liska  <mliska@suse.cz>
27877         PR driver/83193
27878         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
27879         possible values if we don't have a hint.
27881 2018-02-20  Martin Liska  <mliska@suse.cz>
27883         PR c/84310
27884         PR target/79747
27885         * final.c (shorten_branches): Build align_tab array with one
27886         more element.
27887         * opts.c (finish_options): Add alignment option limit check.
27888         (MAX_CODE_ALIGN): Likewise.
27889         (MAX_CODE_ALIGN_VALUE): Likewise.
27890         * doc/invoke.texi: Document maximum allowed option value for
27891         all -falign-* options.
27893 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
27895         PR target/84146
27896         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
27897         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
27898         * var-tracking.c (emit_note_insn_var_location): Remove all references
27899         to NOTE_INSN_CALL_ARG_LOCATION.
27900         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
27901         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
27902         Use copy_rtx_if_shared.
27903         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
27904         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
27905         (dwarf2out_var_location): Remove handling of
27906         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
27907         on call_insn.
27908         * final.c (final_scan_insn): Remove all references to
27909         NOTE_INSN_CALL_ARG_LOCATION.
27910         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
27911         before dumping final insns.
27912         * except.c (emit_note_eh_region_end): Remove all references to
27913         NOTE_INSN_CALL_ARG_LOCATION.
27914         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
27915         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
27916         * config/arc/arc.c (hwloop_optimize): Likewise.
27917         * config/arm/arm.c (create_fix_barrier): Likewise.
27918         * config/s390/s390.c (s390_chunkify_start): Likewise.
27919         * config/sh/sh.c (find_barrier): Likewise.
27920         * config/i386/i386.c (rest_of_insert_endbranch,
27921         ix86_seh_fixup_eh_fallthru): Likewise.
27922         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
27923         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
27924         * config/frv/frv.c (frv_function_prologue): Likewise.
27925         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
27926         reg note.
27927         (note_outside_basic_block_p): Remove all references to
27928         NOTE_INSN_CALL_ARG_LOCATION.
27929         * gengtype.c (adjust_field_rtx_def): Likewise.
27930         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
27931         Likewise.
27932         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
27933         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
27935         PR c++/84444
27936         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
27937         is ADDR_EXPR.
27939         PR tree-optimization/84452
27940         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
27941         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
27942         is NULL.
27944 2018-02-19  Martin Liska  <mliska@suse.cz>
27946         PR sanitizer/82183
27947         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
27949 2018-02-19  Martin Liska  <mliska@suse.cz>
27950             Richard Sandiford  <richard.sandiford@linaro.org>
27952         PR tree-optimization/82491
27953         * gimple-fold.c (get_base_constructor): Make earlier bail out
27954         to prevent ubsan.
27956 2018-02-19  Carl Love  <cel@us.ibm.com>
27958         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
27959         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
27960         BU_P8V_OVERLOAD_1.
27961         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
27962         P8V_BUILTIN_VEC_NEG.
27964 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
27966         * config/rl78/rl78.md (movdf): New define expand.
27968 2018-02-19  Martin Liska  <mliska@suse.cz>
27970         PR other/80589
27971         * doc/invoke.texi: Fix typo.
27972         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
27974 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
27976         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
27977         handle rs6000_single_float and rs6000_double_float specially for
27978         e500 family CPUs.
27980 2018-02-16  Jeff Law  <law@redhat.com>
27982         * config/rx/rx.c (add_pop_cfi_notes): New function.;
27983         (pop_regs): Use it.
27985 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
27987         PR ipa/84425
27988         * ipa-inline.c (inline_small_functions): Fix a typo.
27990 2018-02-16  Nathan Sidwell  <nathan@acm.org>
27992         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
27994 2018-02-16  Carl Love  <cel@us.ibm.com>
27996         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
27997         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
27998         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
27999         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
28000         expansion to P8V_BUILTIN_VEC_FLOAT2.
28002 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
28004         PR rtl-optimization/70023
28005         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
28006         src_regno into account.
28008 2018-02-16  Carl Love  <cel@us.ibm.com>
28010         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
28011         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
28012         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
28013         * config/rs6000/rs6000.c: Remove case statements for
28014         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
28015         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
28016         and P9V_BUILTIN_VEC_VINSERT4B.
28017         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
28018         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
28019         * config/rs6000/vsx.md:
28020         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
28021         vec_insert4b.
28023 2018-02-16  Carl Love  <cel@us.ibm.com>
28025         * config/rs6000/altivec.h: Add builtin names vec_extract4b
28026         vec_insert4b.
28027         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
28028         definitions.
28029         * config/rs6000/rs6000-c.c: Add the definitions for
28030         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
28031         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
28032         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
28033         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
28034         definition for insert4b and define insn *insert3b_internal.
28035         * doc/extend.texi: Add documentation for vec_extract4b.
28037 2018-02-16  Nathan Sidwell  <nathan@acm.org>
28039         * doc/extend.texi (Backwards Compatibility): Mention friend
28040         injection.  Note for-scope is deprecated.
28041         * doc/invoke.texi (-ffriend-injection): Deprecate.
28043 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
28045         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
28046         that moved to I2, also allow destinations that are a paradoxical
28047         subreg (instead of a normal reg).
28049 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
28051         PR target/83831
28052         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
28053         to QImode.
28055 2018-02-16  Richard Biener  <rguenther@suse.de>
28057         PR tree-optimization/84037
28058         PR tree-optimization/84016
28059         PR target/82862
28060         * config/i386/i386.c (ix86_builtin_vectorization_cost):
28061         Adjust vec_construct for the fact we need additional higher latency
28062         128bit inserts for AVX256 and AVX512 vector builds.
28063         (ix86_add_stmt_cost): Scale vector construction cost for
28064         elementwise loads.
28066 2018-02-16  Richard Biener  <rguenther@suse.de>
28068         PR tree-optimization/84417
28069         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
28070         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
28071         (non_rewritable_lvalue_p): Likewise, use poly-ints.
28073 2018-02-16  Martin Liska  <mliska@suse.cz>
28075         PR sanitizer/84307
28076         * internal-fn.def (ASAN_CHECK): Set proper flags.
28077         (ASAN_MARK): Likewise.
28079 2018-02-16  Julia Koval  <julia.koval@intel.com>
28081         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
28082         from PTA_CANNONLAKE.
28084 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
28086         PR target/84272
28087         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
28088         Use ++iter rather than iter++ for std::list iterators.
28089         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
28090         defer deleting them until all nodes in the forest are processed.  Do
28091         free even leaf nodes.  Change to_process into auto_vec.
28093         PR bootstrap/84405
28094         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
28095         * vec.h (vec_default_construct): Use memset instead of placement new
28096         if BROKEN_VALUE_INITIALIZATION is defined.
28097         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
28098         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
28099         is defined.
28101         PR rtl-optimization/83723
28102         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
28103         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
28104         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
28105         recursive calls.
28106         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
28107         callers.
28108         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
28110 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
28112         PR rtl-optimization/81443
28113         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
28114         from inner REGs to paradoxical SUBREGs.
28116 2018-02-16  Richard Biener  <rguenther@suse.de>
28118         PR tree-optimization/84399
28119         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
28120         For operands we can analyze at their definition make sure we can
28121         analyze them at each use as well.
28123 2018-02-16  Richard Biener  <rguenther@suse.de>
28125         PR tree-optimization/84190
28126         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
28127         volatile accesses if the decl isn't volatile.
28129 2018-02-15  Jason Merrill  <jason@redhat.com>
28131         PR c++/84314 - ICE with templates and fastcall attribute.
28132         * attribs.c (build_type_attribute_qual_variant): Don't clobber
28133         TYPE_CANONICAL on an existing type.
28135 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
28137         PR tree-optimization/84383
28138         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
28139         dstoff nor call operand_equal_p if dstbase is NULL.
28141         PR tree-optimization/84334
28142         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
28143         also a CONSTANT_CLASS_P, punt.
28145 2018-02-14  Jim Wilson  <jimw@sifive.com>
28147         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
28148         first SMALL_OPERAND check.  New local min_second_step.  Move assert
28149         to where locals are set.  Add TARGET_RVC support.
28150         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
28152 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
28154         * doc/invoke.texi: Correct -Wformat-overflow code sample.
28156 2018-02-14  Martin Sebor  <msebor@redhat.com>
28158         PR tree-optimization/83698
28159         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
28160         arrays constrain the offset range to their bounds.
28161         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
28162         (builtin_access::overlap): Avoid setting the size of overlap if it's
28163         already been set.
28164         (maybe_diag_overlap): Also consider arrays when deciding what values
28165         of offsets to include in diagnostics.
28167 2018-02-14  Martin Sebor  <msebor@redhat.com>
28169         PR c/84108
28170         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
28171         that correspond to the kind of a declaration.
28173 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
28175         PR target/83984
28176         * config/pa/pa.md: Load address of PIC label using the linkage table
28177         if the label is nonlocal.
28179 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
28181         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
28182         warning message if user requests -maltivec=be.
28183         * doc/invoke.texi: Document deprecation of -maltivec=be.
28185 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
28187         PR target/84220
28188         * config/rs6000/rs6000-c.c: Update definitions for
28189         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
28190         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
28192 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
28194         PR target/84239
28195         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
28196         add _get_ssp intrinsics. Remove argument from
28197         __builtin_ia32_rdssp[d|q].
28198         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
28199         * config/i386/i386-builtin.def: Remove argument from
28200         __builtin_ia32_rdssp[d|q].
28201         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
28202         ix86_expand_special_args_builtin for _rdssp[d|q].
28203         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
28204         Clear register before usage.
28205         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
28206         Add documentation for new _get_ssp and _inc_ssp intrinsics.
28208 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
28210         PR tree-optimization/84357
28211         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
28212         operand 1 of an ARRAY_REF too.
28214 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
28216         PR target/83831
28217         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
28218         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
28219         declarations.
28220         (set_of_reg): New struct.
28221         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
28222         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
28223         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
28224         functions.
28225         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
28226         Split into bitclr, bitset, bitinvert patterns if appropriate.
28227         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
28228         use rx_fuse_in_memory_bitop.
28229         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
28230         to named insn, correct maximum insn length.
28232 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
28234         PR target/79242
28235         * machmode.def: Define a complex mode for PARTIAL_INT.
28236         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
28237         MODE_PARTIAL_INT.
28238         * doc/rtl.texi: Document CSPImode.
28239         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
28240         handling.
28241         (msp430_hard_regno_nregs_with_padding): Likewise.
28243 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
28245         PR target/84279
28246         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
28248 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
28250         PR rtl-optimization/84169
28251         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
28252         we generated a parallel as new i3 and we split that to new i2 and i3
28253         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
28254         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
28255         those to i2, not i1.  Partially rewrite this scan code.
28257 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
28259         PR c/82210
28260         * stor-layout.c (place_field): For variable length fields, adjust
28261         offset_align afterwards not just based on the field's alignment,
28262         but also on the size.
28264         PR middle-end/84309
28265         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
28266         of exps and logs in the use_exp2 case.
28268 2018-02-13  Jeff Law  <law@redhat.com>
28270         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
28271         entry for "vector".
28273         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
28274         ARGS as unused.
28276 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
28278         PR debug/84342
28279         PR debug/84319
28280         * common.opt (gas-loc-support, gas-locview-support): New.
28281         (ginline-points, ginternal-reset-location-views): New.
28282         * doc/invoke.texi: Document them.  Use @itemx where intended.
28283         (gvariable-location-views): Adjust.
28284         * target.def (reset_location_view): New.
28285         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
28286         (TARGET_RESET_LOCATION_VIEW): New.
28287         * doc/tm.texi: Rebuilt.
28288         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
28289         (dwarf2out_default_as_locview_support): New.
28290         (output_asm_line_debug_info): Use option variables.
28291         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
28292         (output_loc_list): Likewise.
28293         (add_high_low_attributes): Check option variables.
28294         Don't output entry view attribute in strict mode.
28295         (gen_inlined_subroutine_die): Check option variables.
28296         (dwarf2out_inline_entry): Likewise.
28297         (init_sections_and_labels): Likewise.
28298         (dwarf2out_early_finish): Likewise.
28299         (maybe_reset_location_view): New, from...
28300         (dwarf2out_var_location): ... here.  Call it.
28301         * debug.h (dwarf2out_default_as_loc_support): Declare.
28302         (dwarf2out_default_as_locview_support): Declare.
28303         * hooks.c (hook_int_rtx_insn_0): New.
28304         * hooks.h (hook_int_rtx_insn_0): Declare.
28305         * toplev.c (process_options): Take -gas-loc-support and
28306         -gas-locview-support from dwarf2out.  Enable
28307         -gvariable-location-views by default only with locview
28308         assembler support.  Enable -ginternal-reset-location-views by
28309         default only if the target defines the corresponding hook.
28310         Enable -ginline-points by default if location views are
28311         enabled; force it disabled if statement frontiers are
28312         disabled.
28313         * tree-inline.c (expand_call_inline): Check option variables.
28314         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
28316 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
28318         PR tree-optimization/84321
28319         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
28320         handling.  Also check whether the anti-range contains any values
28321         that satisfy the mask; switch to a VR_RANGE if not.
28323 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
28325         PR sanitizer/84340
28326         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
28328 2018-02-13  Martin Jambor  <mjambor@suse.cz>
28330         PR c++/83990
28331         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
28332         of call statements, also set location of a load to a temporary.
28334 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
28336         * config/rl78/rl78.c (add_vector_labels): New function.
28337         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
28338         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
28339         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
28340         which checks that no arguments are passed.
28341         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
28342         * doc/extend.texi: Documentation for the new attribute.
28344 2018-02-13  Andreas Schwab  <schwab@suse.de>
28346         * config/riscv/linux.h (CPP_SPEC): Define.
28348 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
28350         PR target/84335
28351         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
28352         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
28353         OPTION_MASK_ISA_AES as first argument to def_builtin_const
28354         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
28355         instead of OPTION_MASK_ISA_PCLMUL as first argument to
28356         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
28357         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
28358         temporarily for AES and PCLMUL builtins.
28360         PR tree-optimization/84339
28361         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
28362         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
28363         Formatting fixes.
28365         PR middle-end/84309
28366         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
28367         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
28368         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
28369         inline function.
28370         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
28371         inline function.
28372         * omp-simd-clone.h: New file.
28373         * omp-simd-clone.c: Include omp-simd-clone.h.
28374         (expand_simd_clones): No longer static.
28375         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
28376         cgraph.h and omp-simd-clone.h.
28377         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
28378         (vect_recog_widen_shift_pattern): Formatting fix.
28379         (vect_pattern_recog_1): Don't check optab for calls.
28381         PR target/84336
28382         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
28383         operands[2] into a REG before using gen_lowpart on it.
28385 2018-02-12  Jeff Law  <law@redhat.com>
28387         PR target/83760
28388         * config/sh/sh.c (find_barrier): Consider a sibling call
28389         a barrier as well.
28391         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
28392         successfully back substituting a reg.
28394 2018-02-12  Richard Biener  <rguenther@suse.de>
28396         PR tree-optimization/84037
28397         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
28398         parameter, move visited init to caller.
28399         (vect_slp_analyze_operations): Separate cost from validity
28400         check, initialize visited once for all instances.
28401         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
28402         for all instances.
28403         * tree-vect-stmts.c (vect_model_simple_cost): Make early
28404         out an assert.
28405         (vect_model_promotion_demotion_cost): Likewise.
28406         (vectorizable_bswap): Guard cost modeling with !slp_node
28407         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
28408         SLP stmts.
28409         (vectorizable_call): Likewise.
28410         (vectorizable_conversion): Likewise.
28411         (vectorizable_assignment): Likewise.
28412         (vectorizable_shift): Likewise.
28413         (vectorizable_operation): Likewise.
28414         (vectorizable_store): Likewise.
28415         (vectorizable_load): Likewise.
28416         (vectorizable_condition): Likewise.
28417         (vectorizable_comparison): Likewise.
28419 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
28421         PR sanitizer/84307
28422         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
28423         (ASAN_MARK): Fix fnspec to account for return value, change pointer
28424         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
28426 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
28428         PR middle-end/83665
28429         * params.def (inline-min-speedup): Increase from 8 to 15.
28430         (max-inline-insns-auto): Decrease from 40 to 30.
28431         * ipa-split.c (consider_split): Add some buffer for function to
28432         be considered inlining candidate.
28433         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
28434         default values.
28436 2018-02-12  Richard Biener  <rguenther@suse.de>
28438         PR tree-optimization/84037
28439         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
28440         matched stmts if we cannot swap the non-matched ones.
28442 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
28444         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
28445         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
28446         _mm_maskz_scalef_round_ss): New intrinsics.
28447         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
28448         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
28449         __builtin_ia32_scalefss_round): Remove.
28450         (__builtin_ia32_scalefsd_mask_round,
28451         __builtin_ia32_scalefss_mask_round): New intrinsics.
28452         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
28453         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
28454         ((match_operand:VF_128 2 "<round_nimm_predicate>"
28455         "<round_constraint>")): Changed to ...
28456         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
28457         "<round_scalar_constraint>")): ... this.
28458         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
28459         %0, %1, %2<round_op3>}"): Changed to ...
28460         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
28461         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
28462         %2<round_scalar_mask_op3>}"): ... this.
28463         * config/i386/subst.md (round_scalar_nimm_predicate): New.
28465 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
28467         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
28468         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
28469         (_mm_maskz_sqrt_round_ss): New intrinsics.
28470         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
28471         (__builtin_ia32_sqrtsd_mask_round)
28472         (__builtin_ia32_sqrtss_mask_round): New builtins.
28473         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
28474         (__builtin_ia32_sqrtss_round): Remove.
28475         (__builtin_ia32_sqrtsd_mask_round)
28476         (__builtin_ia32_sqrtss_mask_round): New builtins.
28477         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
28478         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
28479         ((match_operand:VF_128 1 "vector_operand"
28480         "xBm,<round_constraint>")): Changed to ...
28481         ((match_operand:VF_128 1 "vector_operand"
28482         "xBm,<round_scalar_constraint>")): ... this.
28483         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
28484         %0, %2, %<iptr>1<round_op3>}): Changed to ...
28485         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
28486         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
28487         %<iptr>1<round_scalar_mask_op3>}): ... this.
28488         ((set_attr "prefix" "<round_prefix>")): Changed to ...
28489         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
28491 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
28493         PR target/84266
28494         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
28495         Cast vec_cmpeq result to correct type.
28496         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
28497         Cast vec_cmpgt result to correct type.
28499 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
28501         * final.c (final_scan_insn_1): Renamed from...
28502         (final_scan_insn): ... this.  New wrapper, to recover
28503         seen from the outermost call in recursive ones.
28504         * config/sparc/sparc.c (output_return): Drop seen from call.
28505         (output_sibcall): Likewise.
28506         * config/visium/visium.c (output_branch): Likewise.
28508 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
28510         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
28511         function label.
28513 2018-02-10  Alan Modra  <amodra@gmail.com>
28515         PR target/84300
28516         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
28517         Specify LR as an input.
28519 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
28521         PR sanitizer/83987
28522         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
28523         remove_member_access_dummy_vars): New functions.
28524         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
28525         lower_omp_1, execute_lower_omp): Use them.
28527         PR rtl-optimization/84308
28528         * shrink-wrap.c (spread_components): Release todo vector.
28530 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
28532         PR rtl-optimization/57193
28533         * ira-color.c (struct allocno_color_data): Add member
28534         conflict_allocno_hard_prefs.
28535         (update_conflict_allocno_hard_prefs): New.
28536         (bucket_allocno_compare_func): Add a preference based on
28537         conflict_allocno_hard_prefs.
28538         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
28539         (color_allocnos): Remove a dead code.  Initiate
28540         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
28542 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
28544         PR target/84226
28545         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
28546         constraint from =wa to wa.  Avoid a subreg on the output operand,
28547         instead use a pseudo and subreg it in a move.
28548         (p9_xxbrd_<mode>): Changed to ...
28549         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
28550         (p9_xxbrd_v2df): New expander.
28551         (p9_xxbrw_<mode>): Changed to ...
28552         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
28553         (p9_xxbrw_v4sf): New expander.
28555 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
28557         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
28559 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
28561         PR target/83926
28562         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
28563         multiply in 32-bit mode.
28564         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
28565         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
28566         mode.
28568 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
28570         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
28571         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
28572         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
28573         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
28575 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
28577         PR lto/84213
28578         * dwarf2out.c (is_trivial_indirect_ref): New function.
28579         (dwarf2out_late_global_decl): Do not generate a location
28580         attribute for variables that have a non-trivial DECL_VALUE_EXPR
28581         and that are not defined in the current unit.
28583 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
28585         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
28586         instead of a libcall for UNORDERED.
28588 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
28590         PR target/82641
28591         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
28592         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
28594 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
28596         PR target/PR84295
28597         * config/s390/s390.c (s390_set_current_function): Invoke
28598         s390_indirect_branch_settings also if fndecl didn't change.
28600 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
28602         * config/rs6000/rs6000.md (blockage): Set length to zero.
28604 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
28606         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
28608 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
28610         PR sanitizer/84285
28611         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
28612         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
28613         -static-lib*san.
28615         PR debug/84252
28616         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
28617         PARALLEL incoming that failed vt_get_decl_and_offset check.
28619         PR middle-end/84237
28620         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
28621         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
28622         TREE_READONLY bit.
28623         (get_variable_section): For decls in named .bss* sections pass true as
28624         second argument to bss_initializer_p.
28626 2018-02-09  Marek Polacek  <polacek@redhat.com>
28627             Jakub Jelinek  <jakub@redhat.com>
28629         PR c++/83659
28630         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
28631         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
28632         Sync some changes from cxx_fold_indirect_ref.
28634 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
28636         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
28637         markers.
28638         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
28639         (BLOCK_INLINE_ENTRY_LABEL): New.
28640         (dwarf2out_var_location): Disregard inline entry markers.
28641         (inline_entry_data): New struct.
28642         (inline_entry_data_hasher): New hashtable type.
28643         (inline_entry_data_hasher::hash): New.
28644         (inline_entry_data_hasher::equal): New.
28645         (inline_entry_data_table): New variable.
28646         (add_high_low_attributes): Add DW_AT_entry_pc and
28647         DW_AT_GNU_entry_view attributes if a pending entry is found
28648         in inline_entry_data_table.  Add old entry_pc attribute only
28649         if debug nonbinding markers are disabled.
28650         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
28651         markers are enabled.
28652         (block_within_block_p, dwarf2out_inline_entry): New.
28653         (dwarf2out_finish): Check that no entries remained in
28654         inline_entry_data_table.
28655         * final.c (reemit_insn_block_notes): Handle inline entry notes.
28656         (final_scan_insn, notice_source_line): Likewise.
28657         (rest_of_clean_state): Skip inline entry markers.
28658         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
28659         markers.
28660         * gimple.c (gimple_build_debug_inline_entry): New.
28661         * gimple.h (enum gimple_debug_subcode): Add
28662         GIMPLE_DEBUG_INLINE_ENTRY.
28663         (gimple_build_debug_inline_entry): Declare.
28664         (gimple_debug_inline_entry_p): New.
28665         (gimple_debug_nonbind_marker_p): Adjust.
28666         * insn-notes.def (INLINE_ENTRY): New.
28667         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
28668         inline entry marker notes.
28669         (print_insn): Likewise.
28670         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
28671         (INSN_DEBUG_MARKER_KIND): Likewise.
28672         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
28673         * tree-inline.c (expand_call_inline): Build and insert
28674         debug_inline_entry stmt.
28675         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
28676         inline entry blocks early, if nonbind markers are enabled.
28677         (dump_scope_block): Dump fragment info.
28678         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
28679         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
28680         (gimple_build_debug_inline_entry): New.
28681         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
28682         Enable/disable inline entry points too.
28683         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
28684         (DEBUG_INSN): Describe inline entry markers.
28686         * common.opt (gvariable-location-views): New.
28687         (gvariable-location-views=incompat5): New.
28688         * config.in: Rebuilt.
28689         * configure: Rebuilt.
28690         * configure.ac: Test assembler for view support.
28691         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
28692         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
28693         * dwarf2out.c (var_loc_view): New typedef.
28694         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
28695         (dwarf2out_locviews_in_attribute): New.
28696         (dwarf2out_locviews_in_loclist): New.
28697         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
28698         (enum dw_line_info_opcode): Add LI_adv_address.
28699         (struct dw_line_info_table): Add view.
28700         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
28701         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
28702         (zero_view_p): New variable.
28703         (ZERO_VIEW_P): New macro.
28704         (output_asm_line_debug_info): New.
28705         (struct var_loc_node): Add view.
28706         (add_AT_view_list, AT_loc_list): New.
28707         (add_var_loc_to_decl): Add view param.  Test it against last.
28708         (new_loc_list): Add view params.  Record them.
28709         (AT_loc_list_ptr): Handle loc and view lists.
28710         (view_list_to_loc_list_val_node): New.
28711         (print_dw_val): Handle dw_val_class_view_list.
28712         (size_of_die): Likewise.
28713         (value_format): Likewise.
28714         (loc_list_has_views): New.
28715         (gen_llsym): Set vl_symbol too.
28716         (maybe_gen_llsym, skip_loc_list_entry): New.
28717         (dwarf2out_maybe_output_loclist_view_pair): New.
28718         (output_loc_list): Output view list or entries too.
28719         (output_view_list_offset): New.
28720         (output_die): Handle dw_val_class_view_list.
28721         (output_dwarf_version): New.
28722         (output_compilation_unit_header): Use it.
28723         (output_skeleton_debug_sections): Likewise.
28724         (output_rnglists, output_line_info): Likewise.
28725         (output_pubnames, output_aranges): Update version comments.
28726         (output_one_line_info_table): Output view numbers in asm comments.
28727         (dw_loc_list): Determine current endview, pass it to new_loc_list.
28728         Call maybe_gen_llsym.
28729         (loc_list_from_tree_1): Adjust.
28730         (add_AT_location_description): Create view list attribute if
28731         needed, check it's absent otherwise.
28732         (convert_cfa_to_fb_loc_list): Adjust.
28733         (maybe_emit_file): Call output_asm_line_debug_info for test.
28734         (dwarf2out_var_location): Reset views as needed.  Precompute
28735         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
28736         attribute.  Set view.
28737         (new_line_info_table): Reset next view.
28738         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
28739         (dwarf2out_source_line): Likewise.  Output view resets and labels to
28740         the assembler, or select appropriate line info opcodes.
28741         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
28742         (optimize_string_length): Catch it.  Adjust.
28743         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
28744         dw_val_class_view_list, and remove it if no longer needed.
28745         (hash_loc_list): Hash view numbers.
28746         (loc_list_hasher::equal): Compare them.
28747         (optimize_location_lists): Check whether a view list symbol is
28748         needed, and whether the locview attribute is present, and
28749         whether they match.  Remove the locview attribute if no longer
28750         needed.
28751         (index_location_lists): Call skip_loc_list_entry for test.
28752         (dwarf2out_finish): Call output_asm_line_debug_info for test.
28753         Use output_dwarf_version.
28754         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
28755         (struct dw_val_node): Add val_view_list.
28756         * final.c (SEEN_NEXT_VIEW): New.
28757         (set_next_view_needed): New.
28758         (clear_next_view_needed): New.
28759         (maybe_output_next_view): New.
28760         (final_start_function): Rename to...
28761         (final_start_function_1): ... this.  Take pointer to FIRST,
28762         add SEEN parameter.  Emit param bindings in the initial view.
28763         (final_start_function): Reintroduce SEEN-less interface.
28764         (final): Rename to...
28765         (final_1): ... this.  Take SEEN parameter.  Output final pending
28766         next view at the end.
28767         (final): Reintroduce seen-less interface.
28768         (final_scan_insn): Output pending next view before switching
28769         sections or ending a block.  Mark the next view as needed when
28770         outputting variable locations.  Notify debug backend of section
28771         changes, and of location view changes.
28772         (rest_of_handle_final): Adjust.
28773         * toplev.c (process_options): Autodetect value for debug variable
28774         location views option.  Warn on incompat5 without -gdwarf-5.
28775         * doc/invoke.texi (gvariable-location-views): New.
28776         (gvariable-location-views=incompat5): New.
28777         (gno-variable-location-views): New.
28779 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
28781         PR tree-optimization/84136
28782         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
28783         that the result of find_edge is non-NULL.
28785 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
28787         PR target/83008
28788         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
28789         storing integer register in SImode.  Fix cost of 256 and 512
28790         byte aligned SSE register store.
28792 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
28794         * config/i386/i386.c (ix86_multiplication_cost): Fix
28795         multiplication cost for TARGET_AVX512DQ.
28797 2018-02-08  Marek Polacek  <polacek@redhat.com>
28799         PR tree-optimization/84238
28800         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
28801         get_range_strlen.
28803 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
28805         PR tree-optimization/84265
28806         * tree-vect-stmts.c (vectorizable_store): Don't treat
28807         VMAT_CONTIGUOUS accesses as grouped.
28808         (vectorizable_load): Likewise.
28810 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
28812         PR tree-optimization/81635
28813         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
28814         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
28815         (test_round_for_mask): New functions.
28816         (wide_int_cc_tests): Call test_round_for_mask.
28817         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
28818         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
28819         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
28820         range returned by get_range_info.
28822 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
28824         PR ipa/81360
28825         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
28826         * symtab.c: Include builtins.h
28827         (symtab_node::output_to_lto_symbol_table_p): Move here
28828         from lto-streamer-out.c:output_symbol_p.
28829         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
28830         (output_symbol_p): Move all logic to symtab.c
28831         (produce_symtab): Update.
28833 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
28835         * config/s390/s390-opts.h (enum indirect_branch): Define.
28836         * config/s390/s390-protos.h (s390_return_addr_from_memory)
28837         (s390_indirect_branch_via_thunk)
28838         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
28839         (enum s390_indirect_branch_type): Define.
28840         * config/s390/s390.c (struct s390_frame_layout, struct
28841         machine_function): Remove.
28842         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
28843         (indirect_branch_table_label_no, indirect_branch_table_name):
28844         Define variables.
28845         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
28846         (enum s390_indirect_branch_option): Define.
28847         (s390_return_addr_from_memory): New function.
28848         (s390_handle_string_attribute): New function.
28849         (s390_attribute_table): Add new attribute handler.
28850         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
28851         (s390_indirect_branch_via_thunk): New function.
28852         (s390_indirect_branch_via_inline_thunk): New function.
28853         (s390_function_ok_for_sibcall): When jumping via thunk disallow
28854         sibling call optimization for non z10 compiles.
28855         (s390_emit_call): Force indirect branch target to be a single
28856         register.  Add r1 clobber for non-z10 compiles.
28857         (s390_emit_epilogue): Emit return jump via return_use expander.
28858         (s390_reorg): Handle JUMP_INSNs as execute targets.
28859         (s390_option_override_internal): Perform validity checks for the
28860         new command line options.
28861         (s390_indirect_branch_attrvalue): New function.
28862         (s390_indirect_branch_settings): New function.
28863         (s390_set_current_function): Invoke s390_indirect_branch_settings.
28864         (s390_output_indirect_thunk_function):  New function.
28865         (s390_code_end): Implement target hook.
28866         (s390_case_values_threshold): Implement target hook.
28867         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
28868         macros.
28869         * config/s390/s390.h (struct s390_frame_layout)
28870         (struct machine_function): Move here from s390.c.
28871         (TARGET_INDIRECT_BRANCH_NOBP_RET)
28872         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
28873         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
28874         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
28875         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
28876         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
28877         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
28878         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
28879         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
28880         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
28881         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
28882         (mnemonic attribute): Add values which aren't recognized
28883         automatically.
28884         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
28885         pattern for branch conversion.  Fix mnemonic attribute.
28886         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
28887         indirect branch via thunk if requested.
28888         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
28889         ("*indirect_jump"): Disable for branch conversion using out of
28890         line thunks.
28891         ("indirect_jump_via_thunk<mode>_z10")
28892         ("indirect_jump_via_thunk<mode>")
28893         ("indirect_jump_via_inlinethunk<mode>_z10")
28894         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
28895         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
28896         ("casesi_jump_via_inlinethunk<mode>_z10")
28897         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
28898         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
28899         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
28900         ("*indirect2_jump"): Disable for branch conversion.
28901         ("casesi_jump"): Turn into expander and expand patterns for branch
28902         conversion.
28903         ("return_use"): New expander.
28904         ("*return"): Emit return via thunk and rename it to ...
28905         ("*return<mode>"): ... this one.
28906         * config/s390/s390.opt: Add new options and and enum for the
28907         option values.
28909 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
28911         * lra-constraints.c (match_reload): Unconditionally use
28912         gen_lowpart_SUBREG, rather than selecting between that
28913         and equivalent gen_rtx_SUBREG code.
28915 2018-02-08  Richard Biener  <rguenther@suse.de>
28917         PR tree-optimization/84233
28918         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
28919         changed flag instead of boguously re-using phi_inserted.
28921 2018-02-08  Martin Jambor  <mjambor@suse.cz>
28923         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
28924         static local variables.
28926 2018-02-08  Richard Biener  <rguenther@suse.de>
28928         PR tree-optimization/84278
28929         * tree-vect-stmts.c (vectorizable_store): When looking for
28930         smaller vector types to perform grouped strided loads/stores
28931         make sure the mode is supported by the target.
28932         (vectorizable_load): Likewise.
28934 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
28936         * config/aarch64/aarch64.c (aarch64_components_for_bb):
28937         Increase LDP/STP opportunities by adding adjacent callee-saves.
28939 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
28941         PR rtl-optimization/84068
28942         PR rtl-optimization/83459
28943         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
28945 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
28947         PR tree-optimization/84224
28948         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
28949         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
28950         non-zero arguments.
28952 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
28954         PR target/84113
28955         * config/rs6000/altivec.md (*restore_world): Remove LR use.
28956         * config/rs6000/predicates.md (restore_world_operation): Adjust op
28957         count, remove one USE.
28959 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
28961         * doc/install.texi (Configuration): Document the
28962         --with-long-double-format={ibm,ieee} PowerPC configuration
28963         options.
28965         PR target/84154
28966         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
28967         Convert from define_expand to be define_insn_and_split.  Rework
28968         float/double/_Float128 conversions to QI/HI/SImode to work with
28969         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
28970         conversions to QI/HImode types did a store and then a load to
28971         truncate the value.  For conversions to VSX registers, don't split
28972         the insn, instead emit the code directly.  Use the code iterator
28973         any_fix to combine signed and unsigned conversions.
28974         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
28975         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
28976         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
28977         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
28978         (fix_<mode>di2_hw): Likewise.
28979         (fixuns_<mode>di2_hw): Likewise.
28980         (fix_<mode>si2_hw): Likewise.
28981         (fixuns_<mode>si2_hw): Likewise.
28982         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
28983         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
28984         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
28985         fix<uns>_trunc<SFDF:mode>si2_p8.
28986         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
28987         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
28988         (fix<uns>_<mode>_mem): Likewise.
28989         (fctiw<u>z_<mode>_mem): Likewise.
28990         (fix<uns>_<mode>_mem): Likewise.
28991         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
28992         the register allocator from doing a direct move to the GPRs to do
28993         a store, and instead use the ISA 3.0 store byte/half-word from
28994         vector register instruction.  For IEEE 128-bit floating point,
28995         also optimize stores of 32-bit ints.
28996         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
28998 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
29000         * genextract.c (push_pathstr_operand): New function to support
29001         [a-zA-Z].
29002         (walk_rtx): Call push_pathstr_operand.
29003         (print_path): Support [a-zA-Z].
29005 2018-02-07  Richard Biener  <rguenther@suse.de>
29007         PR tree-optimization/84037
29008         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
29009         (cse_and_gimplify_to_preheader): Declare.
29010         (vect_get_place_in_interleaving_chain): Likewise.
29011         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
29012         ivexpr_map.
29013         (_loop_vec_info::~_loop_vec_info): Delete it.
29014         (cse_and_gimplify_to_preheader): New function.
29015         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
29016         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
29017         (vectorizable_load): Likewise.  For grouped stores always base
29018         the IV on the first element.
29019         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
29020         condition before gimplifying.
29022 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
29024         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
29025         *DIV_EXPR and *MOD_EXPR.
29027 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
29029         PR target/84248
29030         * config/i386/i386.c (ix86_option_override_internal): Mask out
29031         the CF_SET bit when checking -fcf-protection.
29033 2018-02-07  Tom de Vries  <tom@codesourcery.com>
29035         PR libgomp/84217
29036         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
29037         enough.
29039 2018-02-07  Richard Biener  <rguenther@suse.de>
29041         PR tree-optimization/84204
29042         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
29043         this place.
29045         PR tree-optimization/84205
29046         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
29047         special-case isl_ast_op_zdiv_r.
29049         PR tree-optimization/84223
29050         * graphite-scop-detection.c (gather_bbs::before_dom_children):
29051         Only add conditions from within the region.
29052         (gather_bbs::after_dom_children): Adjust.
29054 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
29056         PR target/84209
29057         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
29058         * config/avr/avr.md: Only post-reload split REG-REG moves if
29059         either register is GENERAL_REG_P.
29061 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
29063         PR tree-optimization/84235
29064         * tree-ssa-scopedtables.c
29065         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
29066         if the subtraction is performed in floating point type where NaNs are
29067         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
29068         build 1.  Formatting fix.
29070 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
29072         PR target/84146
29073         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
29074         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
29075         and skip it regardless of bb boundaries.  Use CALL_P macro,
29076         don't test INSN_P (insn) together with CALL_P or JUMP_P check
29077         unnecessarily, formatting fix.
29079 2018-02-06  Michael Collison  <michael.collison@arm.com>
29081         * config/arm/thumb2.md:
29082         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
29083         (*thumb_mov_notscc): Ditto.
29085 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
29087         PR target/84154
29088         * config/rs6000/rs6000.md (su code attribute): Use "u" for
29089         unsigned_fix, not "s".
29091 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
29093         * configure.ac (gcc_fn_eh_frame_ro): New function.
29094         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
29095         correct .eh_frame permissions.
29096         * configure: Regenerate.
29098 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
29100         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
29101         irrelevant options.
29103 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29105         * config/rs6000/rs6000.c (rs6000_option_override_internal):
29106         Display warning message for -mno-speculate-indirect-jumps.
29108 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
29110         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
29111         Undocumented.
29112         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
29114 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
29116         PR tree-optimization/84225
29117         * tree-eh.c (find_trapping_overflow): Only call
29118         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
29120 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
29122         PR target/84145
29123         * config/i386/i386.c: Reimplement the check of possible options
29124         -mibt/-mshstk conbination. Change error messages.
29125         * doc/invoke.texi: Fix a typo: remove extra '='.
29127 2018-02-06  Marek Polacek  <polacek@redhat.com>
29129         PR tree-optimization/84228
29130         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
29132 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
29134         PR target/82641
29135         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
29136         emitted arch directives.
29137         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
29138         __ARM_FEATURE_COPROC before changing architectures.
29140 2018-02-06  Richard Biener  <rguenther@suse.de>
29142         * config/i386/i386.c (print_reg): Fix typo.
29143         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
29145 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
29147         * configure: Regenerate.
29149 2018-02-05  Martin Sebor  <msebor@redhat.com>
29151         PR tree-optimization/83369
29152         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
29153         inlining context.
29155 2018-02-05  Martin Liska  <mliska@suse.cz>
29157         * doc/invoke.texi: Cherry-pick upstream r323995.
29159 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
29161         * ira.c (ira_init_register_move_cost): Adjust comment.
29163 2018-02-05  Martin Liska  <mliska@suse.cz>
29165         PR gcov-profile/84137
29166         * doc/gcov.texi: Fix typo in documentation.
29168 2018-02-05  Martin Liska  <mliska@suse.cz>
29170         PR gcov-profile/83879
29171         * doc/gcov.texi: Document necessity of --dynamic-list-data when
29172         using dlopen functionality.
29174 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
29176         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
29177         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
29178         _mm_maskz_range_ss, _mm_mask_range_round_ss,
29179         _mm_maskz_range_round_ss): New intrinsics.
29180         (__builtin_ia32_rangesd128_round)
29181         (__builtin_ia32_rangess128_round): Remove.
29182         (__builtin_ia32_rangesd128_mask_round,
29183         __builtin_ia32_rangess128_mask_round): New builtins.
29184         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
29185         __builtin_ia32_rangess128_round): Remove.
29186         (__builtin_ia32_rangesd128_mask_round,
29187         __builtin_ia32_rangess128_mask_round): New builtins.
29188         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
29189         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
29190         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
29191         "<round_saeonly_constraint>")): Changed to ...
29192         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
29193         "<round_saeonly_scalar_constraint>")): ... this.
29194         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
29195         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
29196         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
29197         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
29198         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
29200 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
29202         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
29203         options.
29204         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
29205         Remove all values except native, 8540 and 8548.
29207 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
29209         * config/i386/i386.c (ix86_output_function_return): Pass
29210         INVALID_REGNUM, instead of -1, as invalid register number to
29211         indirect_thunk_name and output_indirect_thunk.
29213 2018-02-02  Julia Koval  <julia.koval@intel.com>
29215         * config.gcc: Add -march=icelake.
29216         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
29217         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
29218         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
29219         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
29220         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
29221         (processor_target_table): Add icelake.
29222         (ix86_option_override_internal): Handle new PTAs.
29223         (get_builtin_code_for_version): Handle icelake.
29224         (M_INTEL_COREI7_ICELAKE): New.
29225         (fold_builtin_cpu): Handle icelake.
29226         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
29227         * doc/invoke.texi: Add -march=icelake.
29229 2018-02-02  Julia Koval  <julia.koval@intel.com>
29231         * config/i386/i386.c (ix86_option_override_internal): Change flags type
29232         to wide_int_bitmask.
29233         * wide-int-bitmask.h: New.
29235 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
29237         PR target/84066
29238         * config/i386/i386.md: Replace Pmode with word_mode in
29239         builtin_setjmp_setup and builtin_longjmp to support x32.
29241 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
29243         PR target/56010
29244         PR target/83743
29245         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
29246         #include "opts.h".
29247         (rs6000_supported_cpu_names): New static variable.
29248         (linux_cpu_translation_table): Likewise.
29249         (elf_platform) <cpu>: Define new static variable and use it.
29250         Translate kernel AT_PLATFORM name to canonical name if needed.
29251         Error if platform name is unknown.
29253 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
29255         PR target/84089
29256         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
29258 2018-02-01  Jeff Law  <law@redhat.com>
29260         PR target/84128
29261         * config/i386/i386.c (release_scratch_register_on_entry): Add new
29262         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
29263         the scratch if RELEASE_VIA_POP is false.
29264         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
29265         If we have to save a temporary register, decrement SIZE appropriately.
29266         Pass new arguments to release_scratch_register_on_entry.
29267         (ix86_adjust_stack_and_probe): Likewise.
29268         (ix86_emit_probe_stack_range): Pass new arguments to
29269         release_scratch_register_on_entry.
29271 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
29273         PR rtl-optimization/84157
29274         * combine.c (change_zero_ext): Use REG_P predicate in
29275         front of HARD_REGISTER_P predicate.
29277 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
29279         * config/avr/avr.c (avr_option_override): Move disabling of
29280         -fdelete-null-pointer-checks to...
29281         * common/config/avr/avr-common.c (avr_option_optimization_table):
29282         ...here.
29284 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
29286         PR tree-optimization/81635
29287         * tree-data-ref.c (split_constant_offset_1): For types that
29288         wrap on overflow, try to use range info to prove that wrapping
29289         cannot occur.
29291 2018-02-01  Renlin Li  <renlin.li@arm.com>
29293         PR target/83370
29294         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
29295         TAILCALL_ADDR_REGS.
29296         (aarch64_register_move_cost): Likewise.
29297         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
29298         TAILCALL_ADDR_REGS.
29299         (REG_CLASS_NAMES): Likewise.
29300         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
29301         TAILCALL_ADDR_REGS. Remove IP registers.
29302         * config/aarch64/aarch64.md (Ucs): Update register constraint.
29304 2018-02-01  Richard Biener  <rguenther@suse.de>
29306         * domwalk.h (dom_walker::dom_walker): Add additional constructor
29307         for specifying RPO order and allow NULL for that.
29308         * domwalk.c (dom_walker::dom_walker): Likewise.
29309         (dom_walker::walk): Handle NULL RPO order.
29310         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
29311         in RPO order.
29312         (rewrite_update_dom_walker): Likewise.
29313         (mark_def_dom_walker): Likewise.
29315 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
29317         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
29318         (aarch64_maybe_expand_sve_subreg_move): Declare.
29319         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
29320         * config/aarch64/predicates.md (aarch64_any_register_operand): New
29321         predicate.
29322         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
29323         that are semantically a reverse operation.
29324         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
29325         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
29326         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
29327         functions.
29328         (aarch64_can_change_mode_class): For big-endian, forbid changes
29329         between two SVE modes if they have different element sizes.
29331 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
29333         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
29334         the TImode handling for big-endian targets.
29336 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
29338         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
29339         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
29340         not just bytes.
29341         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
29342         Remove BSWAP handing for big-endian targets and use the form of
29343         LD1RQ appropariate for the mode.
29345 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
29347         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
29348         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
29349         duplicated element.
29351 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
29353         PR tearget/83845
29354         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
29355         check for operands that need to go through aarch64_sve_reload_be.
29357 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
29359         PR tree-optimization/81661
29360         PR tree-optimization/84117
29361         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
29362         * tree-eh.c: Include gimplify.h.
29363         (find_trapping_overflow, replace_trapping_overflow,
29364         rewrite_to_non_trapping_overflow): New functions.
29365         * tree-vect-loop.c: Include tree-eh.h.
29366         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
29367         * tree-data-ref.c: Include tree-eh.h.
29368         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
29370 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
29372         PR rtl-optimization/84123
29373         * combine.c (change_zero_ext): Check if hard register satisfies
29374         can_change_dest_mode before calling gen_lowpart_SUBREG.
29376 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
29378         PR target/82444
29379         * ira.c (ira_init_register_move_cost): Remove assert.
29381 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
29383         PR rtl-optimization/84071
29384         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
29385         * doc/tm.texi: Regenerate.
29387 2018-01-31  Richard Biener  <rguenther@suse.de>
29389         PR tree-optimization/84132
29390         * tree-data-ref.c (analyze_miv_subscript): Properly
29391         check whether evolution_function_is_affine_multivariate_p
29392         before calling gcd_of_steps_may_divide_p.
29394 2018-01-31  Julia Koval  <julia.koval@intel.com>
29396         PR target/83618
29397         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
29398         * config/i386/i386.md (rdpid_rex64) New.
29399         (rdpid): Make 32bit only.
29401 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
29403         PR lto/84105
29404         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
29405         an IDENTIFIER_NODE for FUNCTION_TYPE's.
29407 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
29409         Revert
29410         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
29412         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
29414 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
29416         PR rtl-optimization/84071
29417         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
29418         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
29420 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
29422         * config/arc/arc.c (arc_handle_aux_attribute): New function.
29423         (arc_attribute_table): Add 'aux' attribute.
29424         (arc_in_small_data_p): Consider aux like variables.
29425         (arc_is_aux_reg_p): New function.
29426         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
29427         (arc_get_aux_arg): New function.
29428         (prepare_move_operands): Handle aux-register access.
29429         (arc_handle_aux_attribute): New function.
29430         * doc/extend.texi (ARC Variable attributes): Add subsection.
29432 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
29434         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
29435         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
29436         (arc_attribute_table): Add 'uncached' attribute.
29437         (arc_print_operand): Print '.di' flag for uncached memory
29438         accesses.
29439         (arc_in_small_data_p): Do not consider for small data the uncached
29440         types.
29441         (arc_is_uncached_mem_p): New function.
29442         * config/arc/predicates.md (compact_store_memory_operand): Check
29443         for uncached memory accesses.
29444         (nonvol_nonimm_operand): Likewise.
29445         * doc/extend.texi (ARC Type Attribute): New subsection.
29447 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
29449         PR c/84100
29450         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
29451         falign-loops=): Add Optimization flag.
29453 2018-01-30  Jeff Law  <law@redhat.com>
29455         PR target/84064
29456         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
29457         INT_REGISTERS_SAVED.  Check it prior to calling
29458         get_scratch_register_on_entry.
29459         (ix86_adjust_stack_and_probe): Similarly.
29460         (ix86_emit_probe_stack_range): Similarly.
29461         (ix86_expand_prologue): Corresponding changes.
29463 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
29465         PR target/40411
29466         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
29467         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
29469 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
29471         PR target/84112
29472         * lra-constraints.c (curr_insn_transform): Process AND in the
29473         address.
29475 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
29477         PR rtl-optimization/83986
29478         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
29479         dependence against last_pending_memory_flush in addition to
29480         pending_jump_insns.
29482 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
29484         PR tree-optimization/81611
29485         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
29486         copies.
29488 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
29490         PR target/83758
29491         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
29492         a reg rtx.
29494 2018-01-30  Richard Biener  <rguenther@suse.de>
29495             Jakub Jelinek  <jakub@redhat.com>
29497         PR tree-optimization/84111
29498         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
29499         inner loops added during recursion, as they don't have up-to-date
29500         SSA form.
29502 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
29504         PR ipa/81360
29505         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
29506         (can_inline_edge_by_limits_p): ... here.
29507         (can_early_inline_edge_p, check_callers,
29508         update_caller_keys, update_callee_keys, recursive_inlining,
29509         add_new_edges_to_heap, speculation_useful_p,
29510         inline_small_functions,
29511         inline_small_functions, flatten_function,
29512         inline_to_all_callers_1): Update.
29514 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
29516         * profile-count.c (profile_count::combine_with_ipa_count): Handle
29517         zeros correctly.
29519 2018-01-30  Richard Biener  <rguenther@suse.de>
29521         PR tree-optimization/83008
29522         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
29523         invariant and constant vector uses in stmts when they need
29524         more than one stmt.
29526 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
29528         PR bootstrap/84017
29529         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
29530         * configure: Regenerate.
29532 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
29534         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
29535         pattern.
29536         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
29537         Use gen_rtx_REG rather than gen_lowpart.
29539 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
29541         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
29542         rather than 0 when creating partial subregs.
29544 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
29546         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
29547         of usage.
29549 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
29551         PR target/81550
29552         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
29553         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
29554         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
29555         flags.  This restores the settings used before the 2017-07-24.
29556         Turning off pre increment/decrement/modify allows IVOPTS to
29557         optimize DF/SF loops where the index is an int.
29559 2018-01-29  Richard Biener  <rguenther@suse.de>
29560             Kelvin Nilsen  <kelvin@gcc.gnu.org>
29562         PR bootstrap/80867
29563         * tree-vect-stmts.c (vectorizable_call): Don't call
29564         targetm.vectorize_builtin_md_vectorized_function if callee is
29565         NULL.
29567 2018-01-22  Carl Love  <cel@us.ibm.com>
29569         * doc/extend.tex: Fix typo in second arg in
29570         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
29572 2018-01-29  Richard Biener  <rguenther@suse.de>
29574         PR tree-optimization/84086
29575         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
29576         (flush_ssaname_freelist): When SSA names were released reset
29577         the SCEV hash table.
29579 2018-01-29  Richard Biener  <rguenther@suse.de>
29581         PR tree-optimization/84057
29582         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
29583         removed paths when removing edges.
29585 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
29587         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
29588         -mfunction-return=@var{choice}.
29590 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
29592         PR diagnostic/84034
29593         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
29594         Handle CR like TAB.
29595         (layout::print_source_line): Likewise.
29596         (test_get_line_width_without_trailing_whitespace): Add test cases.
29598 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
29600         PR middle-end/84040
29601         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
29602         debug insns.
29604 2018-01-26  Jim Wilson  <jimw@sifive.com>
29606         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
29608         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
29609         specified.
29611 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
29613         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
29614         and CMP + SUB-immediate -> SUBS.
29616 2018-01-26  Martin Sebor  <msebor@redhat.com>
29618         PR tree-optimization/83896
29619         * tree-ssa-strlen.c (get_string_len): Rename...
29620         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
29621         Avoid assuming length is constant.
29622         (handle_char_store): Use HOST_WIDE_INT for string length.
29624 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
29626         PR target/81763
29627         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
29628         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
29630 2018-01-26  Richard Biener  <rguenther@suse.de>
29632         PR rtl-optimization/84003
29633         * dse.c (record_store): Only record redundant stores when
29634         the earlier store aliases at least all accesses the later one does.
29636 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
29638         PR rtl-optimization/83985
29639         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
29640         REG_CFA_RESTORE insns.
29641         (delete_unmarked_insns): Don't ignore separate shrink wrapping
29642         REG_CFA_RESTORE insns here.
29644         PR c/83989
29645         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
29646         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
29648 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
29650         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
29651         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
29652         (arc_init): Likewise.
29653         (arc_override_options): Likewise.
29654         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
29655         value.
29656         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
29657         support.
29658         * config/arc/arc.h (TARGET_DBNZ): Define.
29659         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
29660         properly set the tune attribute.
29661         (dbnz): Use TARGET_DBNZ guard.
29662         * config/arc/arc.opt (mtune): Add core3 option.
29664 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
29666         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
29667         recognize new pic like addresses.
29668         (arc_delegitimize_address): Clean up.
29670 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
29672         * config/arc/arc-arches.def: Option mrf16 valid for all
29673         architectures.
29674         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
29675         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
29676         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
29677         * config/arc/arc-tables.opt: Regenerate.
29678         * config/arc/arc.c (arc_conditional_register_usage): Handle
29679         reduced register file case.
29680         (arc_file_start): Set must have build attributes.
29681         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
29682         mrf16 option value.
29683         * config/arc/arc.opt (mrf16): Add new option.
29684         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
29685         * config/arc/genmultilib.awk: Handle new mrf16 option.
29686         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
29687         * config/arc/t-multilib: Regenerate.
29688         * doc/invoke.texi (ARC Options): Document mrf16 option.
29690 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
29692         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
29693         * config/arc/arc.c (arc_handle_secure_attribute): New function.
29694         (arc_attribute_table): Add 'secure_call' attribute.
29695         (arc_print_operand): Print secure call operand.
29696         (arc_function_ok_for_sibcall): Don't optimize tail calls when
29697         secure.
29698         (arc_is_secure_call_p): New function.  * config/arc/arc.md
29699         (call_i): Add support for sjli instruction.
29700         (call_value_i): Likewise.
29701         * config/arc/constraints.md (Csc): New constraint.
29703 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
29704             John Eric Martin  <John.Martin@emmicro-us.com>
29706         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
29707         * config/arc/arc.c (_arc_jli_section): New struct.
29708         (arc_jli_section): New type.
29709         (rc_jli_sections): New static variable.
29710         (arc_handle_jli_attribute): New function.
29711         (arc_attribute_table): Add jli_always and jli_fixed attribute.
29712         (arc_file_end): New function.
29713         (TARGET_ASM_FILE_END): Define.
29714         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
29715         (arc_add_jli_section): New function.
29716         (jli_call_scan): Likewise.
29717         (arc_reorg): Call jli_call_scan.
29718         (arc_output_addsi): Remove 'S' from printing asm operand.
29719         (arc_is_jli_call_p): New function.
29720         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
29721         operand.
29722         (movhi_insn): Likewise.
29723         (movsi_insn): Likewise.
29724         (movsi_set_cc_insn): Likewise.
29725         (loadqi_update): Likewise.
29726         (load_zeroextendqisi_update): Likewise.
29727         (load_signextendqisi_update): Likewise.
29728         (loadhi_update): Likewise.
29729         (load_zeroextendhisi_update): Likewise.
29730         (load_signextendhisi_update): Likewise.
29731         (loadsi_update): Likewise.
29732         (loadsf_update): Likewise.
29733         (movsicc_insn): Likewise.
29734         (bset_insn): Likewise.
29735         (bxor_insn): Likewise.
29736         (bclr_insn): Likewise.
29737         (bmsk_insn): Likewise.
29738         (bicsi3_insn): Likewise.
29739         (cmpsi_cc_c_insn): Likewise.
29740         (movsi_ne): Likewise.
29741         (movsi_cond_exec): Likewise.
29742         (clrsbsi2): Likewise.
29743         (norm_f): Likewise.
29744         (normw): Likewise.
29745         (swap): Likewise.
29746         (divaw): Likewise.
29747         (flag): Likewise.
29748         (sr): Likewise.
29749         (kflag): Likewise.
29750         (ffs): Likewise.
29751         (ffs_f): Likewise.
29752         (fls): Likewise.
29753         (call_i): Remove 'S' asm letter, add jli instruction.
29754         (call_value_i): Likewise.
29755         * config/arc/arc.op (mjli-always): New option.
29756         * config/arc/constraints.md (Cji): New constraint.
29757         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
29758         operand.
29759         (subsf3_fpx): Likewise.
29760         (mulsf3_fpx): Likewise.
29761         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
29762         asm operand.
29763         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
29764         function attrbutes.
29765         * doc/invoke.texi (ARC): Document mjli-always option.
29767 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
29769         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
29770         avoid addition with 0 and use incw and decw where possible.
29772 2018-01-26  Richard Biener  <rguenther@suse.de>
29774         PR tree-optimization/81082
29775         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
29776         association if it requires casting to unsigned.
29777         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
29778         from fold_plusminus_mult_expr to catch important cases late when
29779         range info is available.
29781 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
29783         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
29784         * configure.ac (hidden_linkonce): New test.
29785         * configure: Regenerate.
29786         * config.in: Regenerate.
29788 2018-01-26  Julia Koval  <julia.koval@intel.com>
29790         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
29791         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
29792         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
29793         _mm_mask_bitshuffle_epi64_mask): Fix type.
29794         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
29795         USI_FTYPE_V4DI_V4DI_USI): Remove.
29796         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
29797         __builtin_ia32_vpshufbitqmb256_mask,
29798         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
29799         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
29800         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
29802 2018-01-26  Alan Modra  <amodra@gmail.com>
29804         PR target/84033
29805         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
29806         UNSPEC_VBPERMQ.  Sort other unspecs.
29808 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
29810         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
29812 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
29814         PR middle-end/83055
29815         * predict.c (drop_profile): Do not push/pop cfun; update also
29816         node->count.
29817         (handle_missing_profiles): Fix logic looking for zero profiles.
29819 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
29821         PR middle-end/83977
29822         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
29823         on functions with #pragma omp declare simd or functions with simd
29824         attribute.
29825         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
29826         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
29827         Remove trailing \n from warning_at calls.
29829 2018-01-25  Tom de Vries  <tom@codesourcery.com>
29831         PR target/84028
29832         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
29833         for neutered workers.
29835 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
29837         PR target/68467
29838         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
29839         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
29841 2018-01-24  Jeff Law  <law@redhat.com>
29843         PR target/83994
29844         * i386.c (get_probe_interval): Move to earlier point.
29845         (ix86_compute_frame_layout): If -fstack-clash-protection and
29846         the frame is larger than the probe interval, then use pushes
29847         to save registers rather than reg->mem moves.
29848         (ix86_expand_prologue): Remove conditional for int_registers_saved
29849         assertion.
29851 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
29853         PR target/84014
29854         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
29855         min/max for never referenced object.
29857 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
29859         PR middle-end/83977
29860         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
29861         here.
29862         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
29863         attributes from DECL_ATTRIBUTES (decl) without affecting
29864         DECL_ATTRIBUTES (current_function_decl).
29865         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
29866         functions with non-NULL DECL_ABSTRACT_ORIGIN.
29868 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
29870         PR tree-optimization/83979
29871         * fold-const.c (fold_comparison): Use constant_boolean_node
29872         instead of boolean_{true,false}_node.
29874 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
29876         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
29877         with zero counts.
29879 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29881         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
29882         Simplify the clause that sets the length attribute.
29883         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
29884         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
29885         clause that sets the length attribute.
29886         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
29888 2018-01-24  Tom de Vries  <tom@codesourcery.com>
29890         PR target/83589
29891         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
29892         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
29893         Add strict parameter.
29894         (prevent_branch_around_nothing): Insert dummy insn between branch to
29895         label and label with no ptx insn inbetween.
29896         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
29898 2018-01-24  Tom de Vries  <tom@codesourcery.com>
29900         PR target/81352
29901         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
29902         for neutered threads in warp.
29903         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
29905 2018-01-24  Richard Biener  <rguenther@suse.de>
29907         PR tree-optimization/83176
29908         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
29909         operands.
29911 2018-01-24  Richard Biener  <rguenther@suse.de>
29913         PR tree-optimization/82819
29914         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
29915         code generating pluses that are no-ops in the target precision.
29917 2018-01-24  Richard Biener  <rguenther@suse.de>
29919         PR middle-end/84000
29920         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
29922 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
29924         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
29925         to merge probabilities.
29926         * predict.c (probably_never_executed): Also mark as cold functions
29927         with global 0 profile and guessed local profile.
29928         * profile-count.c (profile_probability::combine_with_count): New
29929         member function.
29930         * profile-count.h (profile_probability::operator*,
29931         profile_probability::operator*=, profile_probability::operator/,
29932         profile_probability::operator/=): Reduce precision to adjusted
29933         and set value to guessed on contradictory divisions.
29934         (profile_probability::combine_with_freq): Remove.
29935         (profile_probability::combine_wiht_count): Declare.
29936         (profile_count::force_nonzero):: Set to adjusted.
29937         (profile_count::probability_in):: Set quality to adjusted.
29938         * tree-ssa-tail-merge.c (replace_block_by): Use
29939         combine_with_count.
29941 2018-01-23  Andrew Waterman  <andrew@sifive.com>
29942             Jim Wilson  <jimw@sifive.com>
29944         * config/riscv/riscv.c (riscv_stack_boundary): New.
29945         (riscv_option_override): Set riscv_stack_boundary.  Handle
29946         riscv_preferred_stack_boundary_arg.
29947         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
29948         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
29949         (STACK_BOUNDARY): Set to riscv_stack_boundary.
29950         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
29951         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
29952         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
29954 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
29956         PR target/83905
29957         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
29958         of struct ix86_frame.
29959         (ix86_expand_epilogue): Likewise.  Add a local variable for
29960         the reg_save_offset field in struct ix86_frame.
29962 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
29964         PR tree-optimization/82604
29965         * tree-loop-distribution.c (enum partition_kind): New enum item
29966         PKIND_PARTIAL_MEMSET.
29967         (partition_builtin_p): Support above new enum item.
29968         (generate_code_for_partition): Ditto.
29969         (compute_access_range): Differentiate cases that equality can be
29970         proven at all loops, the innermost loops or no loops.
29971         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
29972         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
29973         (finalize_partitions, distribute_loop): Don't fuse partition of
29974         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
29975         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
29976         parloop is enabled.
29978 2018-01-23  Martin Liska  <mliska@suse.cz>
29980         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
29981         order to ignore the predictor.
29982         (PRED_POLYMORPHIC_CALL): Likewise.
29983         (PRED_RECURSIVE_CALL): Likewise.
29985 2018-01-23  Martin Liska  <mliska@suse.cz>
29987         * tree-profile.c (tree_profiling): Print function header to
29988         aware reader which function we are working on.
29989         * value-prof.c (gimple_find_values_to_profile): Do not print
29990         not interesting value histograms.
29992 2018-01-23  Martin Liska  <mliska@suse.cz>
29994         * profile-count.h (enum profile_quality): Add
29995         profile_uninitialized as the first value. Do not number values
29996         as they are zero based.
29997         (profile_count::verify): Update sanity check.
29998         (profile_probability::verify): Likewise.
30000 2018-01-23  Nathan Sidwell  <nathan@acm.org>
30002         * doc/invoke.texi (ffor-scope): Deprecate.
30004 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
30006         PR tree-optimization/83510
30007         * domwalk.c (set_all_edges_as_executable): New function.
30008         (dom_walker::dom_walker): Convert bool param
30009         "skip_unreachable_blocks" to enum reachability.  Move setup of
30010         edge flags to set_all_edges_as_executable and only do it when
30011         reachability is REACHABLE_BLOCKS.
30012         * domwalk.h (enum dom_walker::reachability): New enum.
30013         (dom_walker::dom_walker): Convert bool param
30014         "skip_unreachable_blocks" to enum reachability.
30015         (set_all_edges_as_executable): New decl.
30016         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
30017         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
30018         "reachability".
30019         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
30020         but converting true to REACHABLE_BLOCKS.
30021         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
30022         * tree-vrp.c
30023         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
30024         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
30025         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
30026         REACHABLE_BLOCKS.
30027         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
30028         if check_all_array_refs will be called.
30030 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
30032         * tree.c (selftest::test_location_wrappers): Add more test
30033         coverage.
30035 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
30037         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
30038         (selftest::test_bit_in_range): Likewise.
30040 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
30042         PR testsuite/83888
30043         * doc/sourcebuild.texi (vect_float): Say that the selector
30044         only describes the situation when -funsafe-math-optimizations is on.
30045         (vect_float_strict): Document.
30047 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
30049         PR tree-optimization/83965
30050         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
30051         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
30052         instead of checking only for a reduction.
30053         (vect_recog_widen_sum_pattern): Likewise.
30055 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
30057         * predict.c (probably_never_executed): Only use precise profile info.
30058         (compute_function_frequency): Skip after inlining hack since we now
30059         have quality checking.
30061 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
30063         * profile-count.h (profile_probability::very_unlikely,
30064         profile_probability::unlikely, profile_probability::even): Set
30065         precision to guessed.
30067 2018-01-23  Richard Biener  <rguenther@suse.de>
30069         PR tree-optimization/83963
30070         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
30071         Properly terminate dominator walk when crossing the exit edge not
30072         when visiting its source block.
30074 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
30076         PR c++/83918
30077         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
30078         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
30080 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
30082         PR tree-optimization/83957
30083         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
30084         semicolon after for body surrounded by braces.
30086         PR tree-optimization/83081
30087         * profile-count.h (profile_probability::split): New method.
30088         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
30089         Use profile_probability::split.
30090         (do_compare_rtx_and_jump): Fix adjustment of probabilities
30091         when splitting a single conditional jump into 2.
30093 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
30095         PR tree-optimization/69452
30096         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
30097         decl.
30099 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
30101         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
30102         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
30103         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
30105 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
30107         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
30108         declaration.
30109         * config/rl78/rl78.md (movdi): New define_expand.
30110         * config/rl78/rl78.c (rl78_split_movdi): New function.
30112 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
30114         PR target/83862
30115         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
30116         no longer used.
30117         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
30118         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
30119         128-bit to produce an UNSPEC move to get the double word with the
30120         signbit and then a shift directly to do signbit.
30121         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
30122         implementation with a new version that just does either a direct
30123         move or a regular move.  Move memory interface to separate insns.
30124         Move insns so they are next to the expander.
30125         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
30126         with signbit move.  Split big and little endian case.
30127         (signbit<mode>2_dm_mem_le): Likewise.
30128         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
30129         (signbit<mode>2_dm2): Likewise.
30131 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
30133         * config/rl78/rl78.md (anddi3): New define_expand.
30135 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
30137         * config/rl78/rl78.md (umindi3): New define_expand.
30139 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
30141         * config/rl78/rl78.md (smindi3): New define_expand.
30143 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
30145         * config/rl78/rl78.md (smaxdi3): New define_expand.
30147 2018-01-22  Carl Love  <cel@us.ibm.com>
30149         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
30150         LVX_V1TI): Add macro expansion.
30151         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
30152         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
30153         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
30154         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
30155         Change check to determine if the instruction is a byte reversing
30156         entry.  Fix typo in comment.
30157         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
30158         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
30159         Add def_builtin calls for new builtins.
30160         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
30161         Add define_insn expansion.
30163 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
30165         * config/rl78/rl78.md (umaxdi3): New define_expand.
30167 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
30169         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
30170         for non-QImode registers.
30172 2018-01-22  Richard Biener  <rguenther@suse.de>
30174         PR tree-optimization/83963
30175         * graphite-scop-detection.c (scop_detection::get_sese): Delay
30176         including the loop exit block.
30177         (scop_detection::merge_sese): Likewise.
30178         (scop_detection::add_scop): Do it here instead.
30180 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
30182         * doc/sourcebuild.texi (arm_softfloat): Document.
30184 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
30186         PR gcc/77734
30187         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
30188         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
30189         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
30191 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
30192             David Edelsohn  <dje.gcc@gmail.com>
30194         PR target/83946
30195         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
30196         Change "crset eq" to "crset 2".
30197         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
30198         (*call_indirect_aix<mode>_nospec): Likewise.
30199         (*call_value_indirect_aix<mode>_nospec): Likewise.
30200         (*call_indirect_elfv2<mode>_nospec): Likewise.
30201         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
30202         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
30203         change assembly output from . to $.
30204         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
30205         (indirect_jump<mode>_nospec): Change assembly output from . to $.
30206         (*tablejump<mode>_internal1_nospec): Likewise.
30208 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
30210         PR target/80870
30211         * config/sh/sh_optimize_sett_clrt.cc:
30212         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
30214 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
30216         PR tree-optimization/83940
30217         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
30218         offset_dt to vect_constant_def rather than vect_unknown_def_type.
30219         (vect_check_load_store_mask): Add a mask_dt_out parameter and
30220         use it to pass back the definition type.
30221         (vect_check_store_rhs): Likewise rhs_dt_out.
30222         (vect_build_gather_load_calls): Add a mask_dt argument and use
30223         it instead of a call to vect_is_simple_use.
30224         (vectorizable_store): Update calls to vect_check_load_store_mask
30225         and vect_check_store_rhs.  Use the dt returned by the latter instead
30226         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
30227         instead of calls to vect_is_simple_use.  Pass the scalar rather
30228         than the vector operand to vect_is_simple_use when handling
30229         second and subsequent copies of an rhs value.
30230         (vectorizable_load): Update calls to vect_check_load_store_mask
30231         and vect_build_gather_load_calls.  Use the cached mask_dt and
30232         gs_info.offset_dt instead of calls to vect_is_simple_use.
30234 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
30236         PR middle-end/83945
30237         * tree-emutls.c: Include gimplify.h.
30238         (lower_emutls_2): New function.
30239         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
30240         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
30241         it before further processing.
30243         PR target/83930
30244         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
30245         UINTVAL (trueop1) instead of INTVAL (op1).
30247 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
30249         PR debug/81570
30250         PR debug/83728
30251         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
30252         INCOMING_FRAME_SP_OFFSET if not defined.
30253         (scan_trace): Add ENTRY argument.  If true and
30254         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
30255         emit a note to adjust the CFA offset.
30256         (create_cfi_notes): Adjust scan_trace callers.
30257         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
30258         INCOMING_FRAME_SP_OFFSET in the CIE.
30259         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
30260         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
30261         Likewise.
30262         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
30263         * doc/tm.texi: Regenerated.
30265 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
30267         PR rtl-optimization/83147
30268         * lra-constraints.c (remove_inheritance_pseudos): Use
30269         lra_substitute_pseudo_within_insn.
30271 2018-01-19  Tom de Vries  <tom@codesourcery.com>
30272             Cesar Philippidis  <cesar@codesourcery.com>
30274         PR target/83920
30275         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
30277 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
30279         PR target/83790
30280         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
30281         spaces for function labels.
30283 2018-01-19  Martin Liska  <mliska@suse.cz>
30285         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
30286         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
30287         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
30288         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
30289         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
30290         (PRED_CONST_RETURN): Change from 69 to 65.
30291         (PRED_NULL_RETURN): Change from 91 to 71.
30292         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
30293         (PRED_LOOP_GUARD): Change from 66 to 73.
30295 2018-01-19  Martin Liska  <mliska@suse.cz>
30297         * predict.c (predict_insn_def): Add new assert.
30298         (struct branch_predictor): Change type to signed integer.
30299         (test_prediction_value_range): Amend test to cover
30300         PROB_UNINITIALIZED.
30301         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
30302         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
30303         (PRED_LOOP_ITERATIONS_MAX): Likewise.
30304         (PRED_LOOP_IV_COMPARE): Likewise.
30305         * predict.h (PROB_UNINITIALIZED): Define new constant.
30307 2018-01-19  Martin Liska  <mliska@suse.cz>
30309         * predict.c (dump_prediction): Add new format for
30310         analyze_brprob.py script which is enabled with -details
30311         suboption.
30312         * profile-count.h (precise_p): New function.
30314 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
30316         PR tree-optimization/83922
30317         * tree-vect-loop.c (vect_verify_full_masking): Return false if
30318         there are no statements that need masking.
30319         (vect_active_double_reduction_p): New function.
30320         (vect_analyze_loop_operations): Use it when handling phis that
30321         are not in the loop header.
30323 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
30325         PR tree-optimization/83914
30326         * tree-vect-loop.c (vectorizable_induction): Don't convert
30327         init_expr or apply the peeling adjustment for inductions
30328         that are nested within the vectorized loop.
30330 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
30332         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
30333         instead of NEG.
30335 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
30337         PR sanitizer/81715
30338         PR testsuite/83882
30339         * function.h (gimplify_parameters): Add gimple_seq * argument.
30340         * function.c: Include gimple.h and options.h.
30341         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
30342         for the added local temporaries if needed.
30343         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
30344         if there are any parameter cleanups, wrap whole body into a
30345         try/finally with the cleanups.
30347 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
30349         PR target/82964
30350         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
30351         Use GET_MODE_CLASS for scalar floating point.
30353 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
30355         PR ipa/82256
30356         patch by PaX Team
30357         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
30358         Fix call of call_cgraph_insertion_hooks.
30360 2018-01-18  Martin Sebor  <msebor@redhat.com>
30362         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
30364 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
30366         PR ipa/83619
30367         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
30368         frequencies.
30370 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
30372         PR other/70268
30373         * common.opt: (-ffile-prefix-map): New option.
30374         * opts.c (common_handle_option): Defer it.
30375         * opts-global.c (handle_common_deferred_options): Handle it.
30376         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
30377         * file-prefix-map.h: New file.
30378         (remap_debug_filename, add_debug_prefix_map): ...here.
30379         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
30380         * final.c (debug_prefix_map, add_debug_prefix_map
30381         remap_debug_filename): Move to...
30382         * file-prefix-map.c: New file.
30383         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
30384         generalize, get rid of alloca(), use strrchr() instead of strchr().
30385         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
30386         Implement in terms of add_prefix_map().
30387         (remap_macro_filename, remap_debug_filename): Implement in term of
30388         remap_filename().
30389         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
30390         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
30391         * dbxout.c: Include file-prefix-map.h.
30392         * varasm.c: Likewise.
30393         * vmsdbgout.c: Likewise.
30394         * xcoffout.c: Likewise.
30395         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
30396         * doc/cppopts.texi (-fmacro-prefix-map): Document.
30397         * doc/invoke.texi (-ffile-prefix-map): Document.
30398         (-fdebug-prefix-map): Update description.
30400 2018-01-18  Martin Liska  <mliska@suse.cz>
30402         * config/i386/i386.c (indirect_thunk_name): Document that also
30403         lfence is emitted.
30404         (output_indirect_thunk): Document why both instructions
30405         (pause and lfence) are generated.
30407 2018-01-18  Richard Biener  <rguenther@suse.de>
30409         PR tree-optimization/83887
30410         * graphite-scop-detection.c
30411         (scop_detection::get_nearest_dom_with_single_entry): Remove.
30412         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
30413         (scop_detection::merge_sese): Re-implement with a flood-fill
30414         algorithm that properly finds a SESE region if it exists.
30416 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
30418         PR c/61240
30419         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
30420         pointer_diff optimizations use view_convert instead of convert.
30422 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
30424         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
30425         Generate different code for -mno-speculate-indirect-jumps.
30426         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
30427         (*call_indirect_aix<mode>): Disable for
30428         -mno-speculate-indirect-jumps.
30429         (*call_indirect_aix<mode>_nospec): New define_insn.
30430         (*call_value_indirect_aix<mode>): Disable for
30431         -mno-speculate-indirect-jumps.
30432         (*call_value_indirect_aix<mode>_nospec): New define_insn.
30433         (*sibcall_nonlocal_sysv<mode>): Generate different code for
30434         -mno-speculate-indirect-jumps.
30435         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
30437 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
30439         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
30440         long double type, set the flags for noting the default long double
30441         type, even if we don't pass or return a long double type.
30443 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
30445         PR ipa/83051
30446         * ipa-inline.c (flatten_function): Do not overwrite final inlining
30447         failure.
30449 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
30451         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
30452         support for merge[hl].
30453         (fold_mergehl_helper): New helper function.
30454         (tree-vector-builder.h): New #include for tree_vector_builder usage.
30455         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
30456         (altivec_vmrglw_direct): Add xxmrglw insn.
30458 2018-01-17  Andrew Waterman  <andrew@sifive.com>
30460         * config/riscv/riscv.c (riscv_conditional_register_usage): If
30461         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
30463 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
30465         PR lto/83121
30466         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
30467         call the lto_location_cache before reading the
30468         DECL_SOURCE_LOCATION of the types.
30470 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
30471             Richard Sandiford  <richard.sandiford@linaro.org>
30473         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
30474         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
30475         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
30476         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
30477         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
30478         Add declaration.
30479         * config/aarch64/constraints.md (aarch64_movti_operand):
30480         Limit immediates.
30481         * config/aarch64/predicates.md (Uti): Add new constraint.
30483 2018-01-17  Carl Love  <cel@us.ibm.com>
30485         * config/rs6000/vsx.md (define_expand xl_len_r,
30486         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
30487         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
30488         lxvll.
30489         (define_expand, define_insn): Move the shift left from  the
30490         define_insn to the define_expand for lxvl and stxvl instructions.
30491         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
30492         and XL_LEN_R definitions to PURE.
30494 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
30496         * config/i386/i386.c (indirect_thunk_name): Declare regno
30497         as unsigned int.  Compare regno with INVALID_REGNUM.
30498         (output_indirect_thunk): Ditto.
30499         (output_indirect_thunk_function): Ditto.
30500         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
30501         in the call to output_indirect_thunk_function.
30503 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
30505         PR middle-end/83884
30506         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
30507         rather than the size of inner_type to determine the stack slot size
30508         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
30510 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
30512         PR target/83546
30513         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
30514         to PTA_SILVERMONT.
30516 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
30518         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
30519         endian Linux systems to optionally enable multilibs for selecting
30520         the long double type if the user configured an explicit type.
30521         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
30522         have no long double multilibs if not defined.
30523         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
30524         warn if the user used -mabi={ieee,ibm}longdouble and we built
30525         multilibs for long double.
30526         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
30527         appropriate multilib option.
30528         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
30529         multilib options.
30530         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
30531         for building long double multilibs.
30532         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
30534 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
30536         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
30537         copies.
30539         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
30540         64 bits.
30541         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
30542         128 bits.
30544         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
30545         variables.
30547         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
30548         return value.
30550 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
30552         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
30553         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
30555 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
30557         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
30558         different rtl trees depending on TARGET_64BIT.
30559         (rs6000_gen_lvx): Likewise.
30561 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
30563         * config/visium/visium.md (nop): Tweak comment.
30564         (hazard_nop): Likewise.
30566 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
30568         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
30569         -mspeculate-indirect-jumps.
30570         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
30571         for -mno-speculate-indirect-jumps.
30572         (*call_indirect_elfv2<mode>_nospec): New define_insn.
30573         (*call_value_indirect_elfv2<mode>): Disable for
30574         -mno-speculate-indirect-jumps.
30575         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
30576         (indirect_jump): Emit different RTL for
30577         -mno-speculate-indirect-jumps.
30578         (*indirect_jump<mode>): Disable for
30579         -mno-speculate-indirect-jumps.
30580         (*indirect_jump<mode>_nospec): New define_insn.
30581         (tablejump): Emit different RTL for
30582         -mno-speculate-indirect-jumps.
30583         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
30584         (tablejumpsi_nospec): New define_expand.
30585         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
30586         (tablejumpdi_nospec): New define_expand.
30587         (*tablejump<mode>_internal1): Disable for
30588         -mno-speculate-indirect-jumps.
30589         (*tablejump<mode>_internal1_nospec): New define_insn.
30590         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
30591         option.
30593 2018-01-16  Artyom Skrobov tyomitch@gmail.com
30595         * caller-save.c (insert_save): Drop unnecessary parameter.  All
30596         callers updated.
30598 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
30599             Richard Biener  <rguenth@suse.de>
30601         PR libgomp/83590
30602         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
30603         return early, inline manually is_gimple_sizepos.  Make sure if we
30604         call gimplify_expr we don't end up with a gimple constant.
30605         * tree.c (variably_modified_type_p): Don't return true for
30606         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
30607         * gimplify.h (is_gimple_sizepos): Remove.
30609 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
30611         PR tree-optimization/83857
30612         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
30613         vectorizable_live_operation for pure SLP statements.
30614         (vectorizable_live_operation): Handle PHIs.
30616 2018-01-16  Richard Biener  <rguenther@suse.de>
30618         PR tree-optimization/83867
30619         * tree-vect-stmts.c (vect_transform_stmt): Precompute
30620         nested_in_vect_loop_p since the scalar stmt may get invalidated.
30622 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
30624         PR c/83844
30625         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
30626         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
30627         If off is not INTEGER_CST, issue a may not be aligned warning
30628         rather than isn't aligned.  Use isn%'t rather than isn't.
30629         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
30630         into MULT_EXPR.
30631         <case MULT_EXPR>: Improve the case when bottom and one of the
30632         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
30633         operand, in that case check if the other operand is multiple of
30634         bottom divided by the INTEGER_CST operand.
30636 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
30638         PR target/83858
30639         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
30640         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
30641         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
30642         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
30643         * config/pa/pa.c (pa_function_arg_advance): Likewise.
30644         (pa_function_arg, pa_arg_partial_bytes): Likewise.
30645         (pa_function_arg_size): New function.
30647 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
30649         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
30650         in a separate statement.
30652 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
30654         PR tree-optimization/83847
30655         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
30656         group gathers and scatters.
30658 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
30660         PR rtl-optimization/86620
30661         * params.def (max-sched-ready-insns): Bump minimum value to 1.
30663         PR rtl-optimization/83213
30664         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
30665         to last if both are JUMP_INSNs.
30667         PR tree-optimization/83843
30668         * gimple-ssa-store-merging.c
30669         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
30670         store_immediate_info for bswap/nop orig_stores.
30672 2018-01-15  Andrew Waterman  <andrew@sifive.com>
30674         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
30675         !TARGET_MUL.
30676         <UDIV>: Increase cost if !TARGET_DIV.
30678 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
30680         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
30681         (define_attr "cr_logical_3op"): New.
30682         (cceq_ior_compare): Adjust.
30683         (cceq_ior_compare_complement): Adjust.
30684         (*cceq_rev_compare): Adjust.
30685         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
30686         (is_cracked_insn): Adjust.
30687         (insn_must_be_first_in_group): Adjust.
30688         * config/rs6000/40x.md: Adjust.
30689         * config/rs6000/440.md: Adjust.
30690         * config/rs6000/476.md: Adjust.
30691         * config/rs6000/601.md: Adjust.
30692         * config/rs6000/603.md: Adjust.
30693         * config/rs6000/6xx.md: Adjust.
30694         * config/rs6000/7450.md: Adjust.
30695         * config/rs6000/7xx.md: Adjust.
30696         * config/rs6000/8540.md: Adjust.
30697         * config/rs6000/cell.md: Adjust.
30698         * config/rs6000/e300c2c3.md: Adjust.
30699         * config/rs6000/e500mc.md: Adjust.
30700         * config/rs6000/e500mc64.md: Adjust.
30701         * config/rs6000/e5500.md: Adjust.
30702         * config/rs6000/e6500.md: Adjust.
30703         * config/rs6000/mpc.md: Adjust.
30704         * config/rs6000/power4.md: Adjust.
30705         * config/rs6000/power5.md: Adjust.
30706         * config/rs6000/power6.md: Adjust.
30707         * config/rs6000/power7.md: Adjust.
30708         * config/rs6000/power8.md: Adjust.
30709         * config/rs6000/power9.md: Adjust.
30710         * config/rs6000/rs64.md: Adjust.
30711         * config/rs6000/titan.md: Adjust.
30713 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
30715         * config/i386/predicates.md (indirect_branch_operand): Rewrite
30716         ix86_indirect_branch_register logic.
30718 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
30720         * config/i386/constraints.md (Bs): Update
30721         ix86_indirect_branch_register check.  Don't check
30722         ix86_indirect_branch_register with GOT_memory_operand.
30723         (Bw): Likewise.
30724         * config/i386/predicates.md (GOT_memory_operand): Don't check
30725         ix86_indirect_branch_register here.
30726         (GOT32_symbol_operand): Likewise.
30728 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
30730         * config/i386/predicates.md (constant_call_address_operand):
30731         Rewrite ix86_indirect_branch_register logic.
30732         (sibcall_insn_operand): Likewise.
30734 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
30736         * config/i386/constraints.md (Bs): Replace
30737         ix86_indirect_branch_thunk_register with
30738         ix86_indirect_branch_register.
30739         (Bw): Likewise.
30740         * config/i386/i386.md (indirect_jump): Likewise.
30741         (tablejump): Likewise.
30742         (*sibcall_memory): Likewise.
30743         (*sibcall_value_memory): Likewise.
30744         Peepholes of indirect call and jump via memory: Likewise.
30745         * config/i386/i386.opt: Likewise.
30746         * config/i386/predicates.md (indirect_branch_operand): Likewise.
30747         (GOT_memory_operand): Likewise.
30748         (call_insn_operand): Likewise.
30749         (sibcall_insn_operand): Likewise.
30750         (GOT32_symbol_operand): Likewise.
30752 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
30754         PR middle-end/83837
30755         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
30756         type rather than type addr's type points to.
30757         (expand_omp_atomic_mutex): Likewise.
30758         (expand_omp_atomic): Likewise.
30760 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
30762         PR target/83839
30763         * config/i386/i386.c (output_indirect_thunk_function): Use
30764         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
30765         for  __x86_return_thunk.
30767 2018-01-15  Richard Biener  <rguenther@suse.de>
30769         PR middle-end/83850
30770         * expmed.c (extract_bit_field_1): Fix typo.
30772 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
30774         PR target/83687
30775         * config/arm/iterators.md (VF): New mode iterator.
30776         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
30777         Remove integer-related logic from pattern.
30778         (neon_vabd<mode>_3): Likewise.
30780 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
30782         PR middle-end/82694
30783         * common.opt (fstrict-overflow): No longer an alias.
30784         (fwrapv-pointer): New option.
30785         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
30786         also for pointer types based on flag_wrapv_pointer.
30787         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
30788         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
30789         opts->x_flag_wrapv got set.
30790         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
30791         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
30792         POINTER_TYPE_OVERFLOW_UNDEFINED.
30793         * match.pd: Likewise in address comparison pattern.
30794         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
30796 2018-01-15  Richard Biener  <rguenther@suse.de>
30798         PR lto/83804
30799         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
30800         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
30801         Reset type names to their identifier if their TYPE_DECL doesn't
30802         have linkage (and thus is used for ODR and devirt).
30803         (save_debug_info_for_decl): Remove.
30804         (save_debug_info_for_type): Likewise.
30805         (add_tree_to_fld_list): Adjust.
30806         * tree-pretty-print.c (dump_generic_node): Make dumping of
30807         type names more robust.
30809 2018-01-15  Richard Biener  <rguenther@suse.de>
30811         * BASE-VER: Bump to 8.0.1.
30813 2018-01-14  Martin Sebor  <msebor@redhat.com>
30815         PR other/83508
30816         * builtins.c (check_access): Avoid warning when the no-warning bit
30817         is set.
30819 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
30821         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
30822         * ira-color (allocno_hard_regs_compare): Likewise.
30824 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
30826         PR target/83013
30827         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
30828         Use .pushsection/.popsection.
30830 2018-01-14  Martin Sebor  <msebor@redhat.com>
30832         PR c++/81327
30833         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
30835 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
30837         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
30838         entry from extra_headers.
30839         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
30840         extra_headers, make the list bitwise identical to the i?86-*-* one.
30842 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
30844         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
30845         -mcmodel=large with -mindirect-branch=thunk,
30846         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
30847         -mfunction-return=thunk-extern.
30848         * doc/invoke.texi: Document -mcmodel=large is incompatible with
30849         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
30850         -mfunction-return=thunk and -mfunction-return=thunk-extern.
30852 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
30854         * config/i386/i386.c (print_reg): Print the name of the full
30855         integer register without '%'.
30856         (ix86_print_operand): Handle 'V'.
30857         * doc/extend.texi: Document 'V' modifier.
30859 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
30861         * config/i386/constraints.md (Bs): Disallow memory operand for
30862         -mindirect-branch-register.
30863         (Bw): Likewise.
30864         * config/i386/predicates.md (indirect_branch_operand): Likewise.
30865         (GOT_memory_operand): Likewise.
30866         (call_insn_operand): Likewise.
30867         (sibcall_insn_operand): Likewise.
30868         (GOT32_symbol_operand): Likewise.
30869         * config/i386/i386.md (indirect_jump): Call convert_memory_address
30870         for -mindirect-branch-register.
30871         (tablejump): Likewise.
30872         (*sibcall_memory): Likewise.
30873         (*sibcall_value_memory): Likewise.
30874         Disallow peepholes of indirect call and jump via memory for
30875         -mindirect-branch-register.
30876         (*call_pop): Replace m with Bw.
30877         (*call_value_pop): Likewise.
30878         (*sibcall_pop_memory): Replace m with Bs.
30879         * config/i386/i386.opt (mindirect-branch-register): New option.
30880         * doc/invoke.texi: Document -mindirect-branch-register option.
30882 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
30884         * config/i386/i386-protos.h (ix86_output_function_return): New.
30885         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
30886         set function_return_type.
30887         (indirect_thunk_name): Add ret_p to indicate thunk for function
30888         return.
30889         (output_indirect_thunk_function): Pass false to
30890         indirect_thunk_name.
30891         (ix86_output_indirect_branch_via_reg): Likewise.
30892         (ix86_output_indirect_branch_via_push): Likewise.
30893         (output_indirect_thunk_function): Create alias for function
30894         return thunk if regno < 0.
30895         (ix86_output_function_return): New function.
30896         (ix86_handle_fndecl_attribute): Handle function_return.
30897         (ix86_attribute_table): Add function_return.
30898         * config/i386/i386.h (machine_function): Add
30899         function_return_type.
30900         * config/i386/i386.md (simple_return_internal): Use
30901         ix86_output_function_return.
30902         (simple_return_internal_long): Likewise.
30903         * config/i386/i386.opt (mfunction-return=): New option.
30904         (indirect_branch): Mention -mfunction-return=.
30905         * doc/extend.texi: Document function_return function attribute.
30906         * doc/invoke.texi: Document -mfunction-return= option.
30908 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
30910         * config/i386/i386-opts.h (indirect_branch): New.
30911         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
30912         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
30913         with local indirect jump when converting indirect call and jump.
30914         (ix86_set_indirect_branch_type): New.
30915         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
30916         (indirectlabelno): New.
30917         (indirect_thunk_needed): Likewise.
30918         (indirect_thunk_bnd_needed): Likewise.
30919         (indirect_thunks_used): Likewise.
30920         (indirect_thunks_bnd_used): Likewise.
30921         (INDIRECT_LABEL): Likewise.
30922         (indirect_thunk_name): Likewise.
30923         (output_indirect_thunk): Likewise.
30924         (output_indirect_thunk_function): Likewise.
30925         (ix86_output_indirect_branch_via_reg): Likewise.
30926         (ix86_output_indirect_branch_via_push): Likewise.
30927         (ix86_output_indirect_branch): Likewise.
30928         (ix86_output_indirect_jmp): Likewise.
30929         (ix86_code_end): Call output_indirect_thunk_function if needed.
30930         (ix86_output_call_insn): Call ix86_output_indirect_branch if
30931         needed.
30932         (ix86_handle_fndecl_attribute): Handle indirect_branch.
30933         (ix86_attribute_table): Add indirect_branch.
30934         * config/i386/i386.h (machine_function): Add indirect_branch_type
30935         and has_local_indirect_jump.
30936         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
30937         to true.
30938         (tablejump): Likewise.
30939         (*indirect_jump): Use ix86_output_indirect_jmp.
30940         (*tablejump_1): Likewise.
30941         (simple_return_indirect_internal): Likewise.
30942         * config/i386/i386.opt (mindirect-branch=): New option.
30943         (indirect_branch): New.
30944         (keep): Likewise.
30945         (thunk): Likewise.
30946         (thunk-inline): Likewise.
30947         (thunk-extern): Likewise.
30948         * doc/extend.texi: Document indirect_branch function attribute.
30949         * doc/invoke.texi: Document -mindirect-branch= option.
30951 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
30953         PR ipa/83051
30954         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
30956 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
30958         * ipa-inline.c (want_inline_small_function_p): Return false if
30959         inlining has already failed with CIF_FINAL_ERROR.
30960         (update_caller_keys): Call want_inline_small_function_p before
30961         can_inline_edge_p.
30962         (update_callee_keys): Likewise.
30964 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
30966         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
30967         New function.
30968         (rs6000_quadword_masked_address_p): Likewise.
30969         (quad_aligned_load_p): Likewise.
30970         (quad_aligned_store_p): Likewise.
30971         (const_load_sequence_p): Add comment to describe the outer-most loop.
30972         (mimic_memory_attributes_and_flags): New function.
30973         (rs6000_gen_stvx): Likewise.
30974         (replace_swapped_aligned_store): Likewise.
30975         (rs6000_gen_lvx): Likewise.
30976         (replace_swapped_aligned_load): Likewise.
30977         (replace_swapped_load_constant): Capitalize argument name in
30978         comment describing this function.
30979         (rs6000_analyze_swaps): Add a third pass to search for vector loads
30980         and stores that access quad-word aligned addresses and replace
30981         with stvx or lvx instructions when appropriate.
30982         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
30983         New function prototype.
30984         (rs6000_quadword_masked_address_p): Likewise.
30985         (rs6000_gen_lvx): Likewise.
30986         (rs6000_gen_stvx): Likewise.
30987         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
30988         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
30989         when memory address is aligned.
30990         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
30991         this split to select lvx instruction when memory address is aligned.
30992         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
30993         instruction when memory address is aligned.
30994         (*vsx_le_perm_load_v16qi): Likewise.
30995         (four unnamed splitters): Modify to select the stvx instruction
30996         when memory is aligned.
30998 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
31000         * predict.c (determine_unlikely_bbs): Handle correctly BBs
31001         which appears in the queue multiple times.
31003 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31004             Alan Hayward  <alan.hayward@arm.com>
31005             David Sherwood  <david.sherwood@arm.com>
31007         * tree-vectorizer.h (vec_lower_bound): New structure.
31008         (_loop_vec_info): Add check_nonzero and lower_bounds.
31009         (LOOP_VINFO_CHECK_NONZERO): New macro.
31010         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
31011         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
31012         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
31013         fields.  Make seg_len the distance travelled, not including the
31014         access size.
31015         (dr_direction_indicator): Declare.
31016         (dr_zero_step_indicator): Likewise.
31017         (dr_known_forward_stride_p): Likewise.
31018         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
31019         tree-ssanames.h.
31020         (runtime_alias_check_p): Allow runtime alias checks with
31021         variable strides.
31022         (operator ==): Compare access_size and align.
31023         (prune_runtime_alias_test_list): Rework for new distinction between
31024         the access_size and seg_len.
31025         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
31026         segment lengths.
31027         (get_segment_min_max): New function.
31028         (create_intersect_range_checks): Use it.
31029         (dr_step_indicator): New function.
31030         (dr_direction_indicator): Likewise.
31031         (dr_zero_step_indicator): Likewise.
31032         (dr_known_forward_stride_p): Likewise.
31033         * tree-loop-distribution.c (data_ref_segment_size): Return
31034         DR_STEP * (niters - 1).
31035         (compute_alias_check_pairs): Update call to the dr_with_seg_len
31036         constructor.
31037         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
31038         (vect_preserves_scalar_order_p): New function, split out from...
31039         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
31040         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
31041         (vect_vfa_access_size): New function.
31042         (vect_vfa_align): Likewise.
31043         (vect_compile_time_alias): Take access_size_a and access_b arguments.
31044         (dump_lower_bound): New function.
31045         (vect_check_lower_bound): Likewise.
31046         (vect_small_gap_p): Likewise.
31047         (vectorizable_with_step_bound_p): Likewise.
31048         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
31049         depencies if the vectorization factor is 1.  Convert the checks
31050         for nonzero steps into checks on the bounds of DR_STEP.  Try using
31051         a bunds check for variable steps if the minimum required step is
31052         relatively small. Update calls to the dr_with_seg_len
31053         constructor and to vect_compile_time_alias.
31054         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
31055         function.
31056         (vect_loop_versioning): Call it.
31057         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
31058         when retrying.
31059         (vect_estimate_min_profitable_iters): Account for any bounds checks.
31061 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31062             Alan Hayward  <alan.hayward@arm.com>
31063             David Sherwood  <david.sherwood@arm.com>
31065         * doc/sourcebuild.texi (vect_scatter_store): Document.
31066         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
31067         optabs.
31068         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
31069         Document.
31070         * genopinit.c (main): Add supports_vec_scatter_store and
31071         supports_vec_scatter_store_cached to target_optabs.
31072         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
31073         IFN_MASK_SCATTER_STORE.
31074         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
31075         functions.
31076         * internal-fn.h (internal_store_fn_p): Declare.
31077         (internal_fn_stored_value_index): Likewise.
31078         * internal-fn.c (scatter_store_direct): New macro.
31079         (expand_scatter_store_optab_fn): New function.
31080         (direct_scatter_store_optab_supported_p): New macro.
31081         (internal_store_fn_p): New function.
31082         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
31083         IFN_MASK_SCATTER_STORE.
31084         (internal_fn_mask_index): Likewise.
31085         (internal_fn_stored_value_index): New function.
31086         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
31087         for scatter stores.
31088         * optabs-query.h (supports_vec_scatter_store_p): Declare.
31089         * optabs-query.c (supports_vec_scatter_store_p): New function.
31090         * tree-vectorizer.h (vect_get_store_rhs): Declare.
31091         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
31092         true for scatter stores.
31093         (vect_gather_scatter_fn_p): Handle scatter stores too.
31094         (vect_check_gather_scatter): Consider using scatter stores if
31095         supports_vec_scatter_store_p.
31096         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
31097         scatter stores too.
31098         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
31099         internal_fn_stored_value_index.
31100         (check_load_store_masking): Handle scatter stores too.
31101         (vect_get_store_rhs): Make public.
31102         (vectorizable_call): Use internal_store_fn_p.
31103         (vectorizable_store): Handle scatter store internal functions.
31104         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
31105         when deciding whether the end of the group has been reached.
31106         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
31107         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
31108         (mask_scatter_store<mode>): New insns.
31110 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31111             Alan Hayward  <alan.hayward@arm.com>
31112             David Sherwood  <david.sherwood@arm.com>
31114         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
31115         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
31116         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
31117         function.
31118         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
31119         Use vect_truncate_gather_scatter_offset if we can't treat the
31120         operation as a normal gather load or scatter store.
31121         (get_group_load_store_type): Take the gather_scatter_info
31122         as argument.  Try using a gather load or scatter store for
31123         single-element groups.
31124         (get_load_store_type): Update calls to get_group_load_store_type
31125         and vect_use_strided_gather_scatters_p.
31127 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31128             Alan Hayward  <alan.hayward@arm.com>
31129             David Sherwood  <david.sherwood@arm.com>
31131         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
31132         optional tree argument.
31133         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
31134         null target hooks.
31135         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
31136         but continue to use the current value as a fallback.
31137         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
31138         to compare the updates.
31139         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
31140         (get_load_store_type): Use it when handling a strided access.
31141         (vect_get_strided_load_store_ops): New function.
31142         (vect_get_data_ptr_increment): Likewise.
31143         (vectorizable_load): Handle strided gather loads.  Always pass
31144         a step to vect_create_data_ref_ptr and bump_vector_ptr.
31146 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31147             Alan Hayward  <alan.hayward@arm.com>
31148             David Sherwood  <david.sherwood@arm.com>
31150         * doc/md.texi (gather_load@var{m}): Document.
31151         (mask_gather_load@var{m}): Likewise.
31152         * genopinit.c (main): Add supports_vec_gather_load and
31153         supports_vec_gather_load_cached to target_optabs.
31154         * optabs-tree.c (init_tree_optimization_optabs): Use
31155         ggc_cleared_alloc to allocate target_optabs.
31156         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
31157         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
31158         functions.
31159         * internal-fn.h (internal_load_fn_p): Declare.
31160         (internal_gather_scatter_fn_p): Likewise.
31161         (internal_fn_mask_index): Likewise.
31162         (internal_gather_scatter_fn_supported_p): Likewise.
31163         * internal-fn.c (gather_load_direct): New macro.
31164         (expand_gather_load_optab_fn): New function.
31165         (direct_gather_load_optab_supported_p): New macro.
31166         (direct_internal_fn_optab): New function.
31167         (internal_load_fn_p): Likewise.
31168         (internal_gather_scatter_fn_p): Likewise.
31169         (internal_fn_mask_index): Likewise.
31170         (internal_gather_scatter_fn_supported_p): Likewise.
31171         * optabs-query.c (supports_at_least_one_mode_p): New function.
31172         (supports_vec_gather_load_p): Likewise.
31173         * optabs-query.h (supports_vec_gather_load_p): Declare.
31174         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
31175         and memory_type field.
31176         (NUM_PATTERNS): Bump to 15.
31177         * tree-vect-data-refs.c: Include internal-fn.h.
31178         (vect_gather_scatter_fn_p): New function.
31179         (vect_describe_gather_scatter_call): Likewise.
31180         (vect_check_gather_scatter): Try using internal functions for
31181         gather loads.  Recognize existing calls to a gather load function.
31182         (vect_analyze_data_refs): Consider using gather loads if
31183         supports_vec_gather_load_p.
31184         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
31185         (vect_get_gather_scatter_offset_type): Likewise.
31186         (vect_convert_mask_for_vectype): Likewise.
31187         (vect_add_conversion_to_patterm): Likewise.
31188         (vect_try_gather_scatter_pattern): Likewise.
31189         (vect_recog_gather_scatter_pattern): New pattern recognizer.
31190         (vect_vect_recog_func_ptrs): Add it.
31191         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
31192         internal_fn_mask_index and internal_gather_scatter_fn_p.
31193         (check_load_store_masking): Take the gather_scatter_info as an
31194         argument and handle gather loads.
31195         (vect_get_gather_scatter_ops): New function.
31196         (vectorizable_call): Check internal_load_fn_p.
31197         (vectorizable_load): Likewise.  Handle gather load internal
31198         functions.
31199         (vectorizable_store): Update call to check_load_store_masking.
31200         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
31201         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
31202         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
31203         (aarch64_gather_scale_operand_d): New predicates.
31204         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
31205         (mask_gather_load<mode>): New insns.
31207 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31208             Alan Hayward  <alan.hayward@arm.com>
31209             David Sherwood  <david.sherwood@arm.com>
31211         * optabs.def (fold_left_plus_optab): New optab.
31212         * doc/md.texi (fold_left_plus_@var{m}): Document.
31213         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
31214         * internal-fn.c (fold_left_direct): Define.
31215         (expand_fold_left_optab_fn): Likewise.
31216         (direct_fold_left_optab_supported_p): Likewise.
31217         * fold-const-call.c (fold_const_fold_left): New function.
31218         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
31219         * tree-parloops.c (valid_reduction_p): New function.
31220         (gather_scalar_reductions): Use it.
31221         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
31222         (vect_finish_replace_stmt): Declare.
31223         * tree-vect-loop.c (fold_left_reduction_fn): New function.
31224         (needs_fold_left_reduction_p): New function, split out from...
31225         (vect_is_simple_reduction): ...here.  Accept reductions that
31226         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
31227         (vect_force_simple_reduction): Also store the reduction type in
31228         the assignment's STMT_VINFO_REDUC_TYPE.
31229         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
31230         (merge_with_identity): New function.
31231         (vect_expand_fold_left): Likewise.
31232         (vectorize_fold_left_reduction): Likewise.
31233         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
31234         scalar phi in place for it.  Check for target support and reject
31235         cases that would reassociate the operation.  Defer the transform
31236         phase to vectorize_fold_left_reduction.
31237         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
31238         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
31239         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
31241 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31243         * tree-if-conv.c (predicate_mem_writes): Remove redundant
31244         call to ifc_temp_var.
31246 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31247             Alan Hayward  <alan.hayward@arm.com>
31248             David Sherwood  <david.sherwood@arm.com>
31250         * target.def (legitimize_address_displacement): Take the original
31251         offset as a poly_int.
31252         * targhooks.h (default_legitimize_address_displacement): Update
31253         accordingly.
31254         * targhooks.c (default_legitimize_address_displacement): Likewise.
31255         * doc/tm.texi: Regenerate.
31256         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
31257         as an argument, moving assert of ad->disp == ad->disp_term to...
31258         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
31259         Try calling targetm.legitimize_address_displacement before expanding
31260         the address rather than afterwards, and adjust for the new interface.
31261         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
31262         Match the new hook interface.  Handle SVE addresses.
31263         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
31264         new hook interface.
31266 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31268         * Makefile.in (OBJS): Add early-remat.o.
31269         * target.def (select_early_remat_modes): New hook.
31270         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
31271         * doc/tm.texi: Regenerate.
31272         * targhooks.h (default_select_early_remat_modes): Declare.
31273         * targhooks.c (default_select_early_remat_modes): New function.
31274         * timevar.def (TV_EARLY_REMAT): New timevar.
31275         * passes.def (pass_early_remat): New pass.
31276         * tree-pass.h (make_pass_early_remat): Declare.
31277         * early-remat.c: New file.
31278         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
31279         function.
31280         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
31282 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31283             Alan Hayward  <alan.hayward@arm.com>
31284             David Sherwood  <david.sherwood@arm.com>
31286         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
31287         vfm1 with a bound_epilog parameter.
31288         (vect_do_peeling): Update calls accordingly, and move the prologue
31289         call earlier in the function.  Treat the base bound_epilog as 0 for
31290         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
31291         this base when peeling for gaps.
31292         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
31293         with fully-masked loops.
31294         (vect_estimate_min_profitable_iters): Handle the single peeled
31295         iteration in that case.
31297 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31298             Alan Hayward  <alan.hayward@arm.com>
31299             David Sherwood  <david.sherwood@arm.com>
31301         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
31302         single-element interleaving even if the size is not a power of 2.
31303         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
31304         accesses for single-element interleaving if the group size is
31305         not a power of 2.
31307 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31308             Alan Hayward  <alan.hayward@arm.com>
31309             David Sherwood  <david.sherwood@arm.com>
31311         * doc/md.texi (fold_extract_last_@var{m}): Document.
31312         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
31313         * optabs.def (fold_extract_last_optab): New optab.
31314         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
31315         * internal-fn.c (fold_extract_direct): New macro.
31316         (expand_fold_extract_optab_fn): Likewise.
31317         (direct_fold_extract_optab_supported_p): Likewise.
31318         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
31319         * tree-vect-loop.c (vect_model_reduction_cost): Handle
31320         EXTRACT_LAST_REDUCTION.
31321         (get_initial_def_for_reduction): Do not create an initial vector
31322         for EXTRACT_LAST_REDUCTION reductions.
31323         (vectorizable_reduction): Leave the scalar phi in place for
31324         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
31325         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
31326         epilogue code for EXTRACT_LAST_REDUCTION and defer the
31327         transform phase to vectorizable_condition.
31328         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
31329         split out from...
31330         (vect_finish_stmt_generation): ...here.
31331         (vect_finish_replace_stmt): New function.
31332         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
31333         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
31334         pattern.
31335         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
31337 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31338             Alan Hayward  <alan.hayward@arm.com>
31339             David Sherwood  <david.sherwood@arm.com>
31341         * doc/md.texi (extract_last_@var{m}): Document.
31342         * optabs.def (extract_last_optab): New optab.
31343         * internal-fn.def (EXTRACT_LAST): New internal function.
31344         * internal-fn.c (cond_unary_direct): New macro.
31345         (expand_cond_unary_optab_fn): Likewise.
31346         (direct_cond_unary_optab_supported_p): Likewise.
31347         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
31348         loops using EXTRACT_LAST.
31349         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
31350         (extract_last_<mode>): ...this optab.
31351         (vec_extract<mode><Vel>): Update accordingly.
31353 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31354             Alan Hayward  <alan.hayward@arm.com>
31355             David Sherwood  <david.sherwood@arm.com>
31357         * target.def (empty_mask_is_expensive): New hook.
31358         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
31359         * doc/tm.texi: Regenerate.
31360         * targhooks.h (default_empty_mask_is_expensive): Declare.
31361         * targhooks.c (default_empty_mask_is_expensive): New function.
31362         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
31363         if the target says that empty masks are expensive.
31364         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
31365         New function.
31366         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
31368 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31369             Alan Hayward  <alan.hayward@arm.com>
31370             David Sherwood  <david.sherwood@arm.com>
31372         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
31373         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
31374         (vect_use_loop_mask_for_alignment_p): New function.
31375         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
31376         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
31377         niters_skip argument.  Make sure that the first niters_skip elements
31378         of the first iteration are inactive.
31379         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
31380         Update call to vect_set_loop_masks_directly.
31381         (get_misalign_in_elems): New function, split out from...
31382         (vect_gen_prolog_loop_niters): ...here.
31383         (vect_update_init_of_dr): Take a code argument that specifies whether
31384         the adjustment should be added or subtracted.
31385         (vect_update_init_of_drs): Likewise.
31386         (vect_prepare_for_masked_peels): New function.
31387         (vect_do_peeling): Skip prologue peeling if we're using a mask
31388         instead.  Update call to vect_update_inits_of_drs.
31389         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
31390         mask_skip_niters.
31391         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
31392         alignment.  Do not include the number of peeled iterations in
31393         the minimum threshold in that case.
31394         (vectorizable_induction): Adjust the start value down by
31395         LOOP_VINFO_MASK_SKIP_NITERS iterations.
31396         (vect_transform_loop): Call vect_prepare_for_masked_peels.
31397         Take the number of skipped iterations into account when calculating
31398         the loop bounds.
31399         * tree-vect-stmts.c (vect_gen_while_not): New function.
31401 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31402             Alan Hayward  <alan.hayward@arm.com>
31403             David Sherwood  <david.sherwood@arm.com>
31405         * doc/sourcebuild.texi (vect_fully_masked): Document.
31406         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
31407         default value to 0.
31408         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
31409         split out from...
31410         (vect_analyze_loop_2): ...here. Don't check the vectorization
31411         factor against the number of loop iterations if the loop is
31412         fully-masked.
31414 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31415             Alan Hayward  <alan.hayward@arm.com>
31416             David Sherwood  <david.sherwood@arm.com>
31418         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
31419         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
31420         (dump_groups): Update accordingly.
31421         (iv_use::mem_type): New member variable.
31422         (address_p): New function.
31423         (record_use): Add a mem_type argument and initialize the new
31424         mem_type field.
31425         (record_group_use): Add a mem_type argument.  Use address_p.
31426         Remove obsolete null checks of base_object.  Update call to record_use.
31427         (find_interesting_uses_op): Update call to record_group_use.
31428         (find_interesting_uses_cond): Likewise.
31429         (find_interesting_uses_address): Likewise.
31430         (get_mem_type_for_internal_fn): New function.
31431         (find_address_like_use): Likewise.
31432         (find_interesting_uses_stmt): Try find_address_like_use before
31433         calling find_interesting_uses_op.
31434         (addr_offset_valid_p): Use the iv mem_type field as the type
31435         of the addressed memory.
31436         (add_autoinc_candidates): Likewise.
31437         (get_address_cost): Likewise.
31438         (split_small_address_groups_p): Use address_p.
31439         (split_address_groups): Likewise.
31440         (add_iv_candidate_for_use): Likewise.
31441         (autoinc_possible_for_pair): Likewise.
31442         (rewrite_groups): Likewise.
31443         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
31444         (determine_group_iv_cost): Update after split of USE_ADDRESS.
31445         (get_alias_ptr_type_for_ptr_address): New function.
31446         (rewrite_use_address): Rewrite address uses in calls that were
31447         identified by find_address_like_use.
31449 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31450             Alan Hayward  <alan.hayward@arm.com>
31451             David Sherwood  <david.sherwood@arm.com>
31453         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
31454         TARGET_MEM_REFs.
31455         * gimple-expr.h (is_gimple_addressable: Likewise.
31456         * gimple-expr.c (is_gimple_address): Likewise.
31457         * internal-fn.c (expand_call_mem_ref): New function.
31458         (expand_mask_load_optab_fn): Use it.
31459         (expand_mask_store_optab_fn): Likewise.
31461 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31462             Alan Hayward  <alan.hayward@arm.com>
31463             David Sherwood  <david.sherwood@arm.com>
31465         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
31466         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
31467         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
31468         (cond_umax@var{mode}): Document.
31469         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
31470         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
31471         (cond_umin_optab, cond_umax_optab): New optabs.
31472         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
31473         (COND_IOR, COND_XOR): New internal functions.
31474         * internal-fn.h (get_conditional_internal_fn): Declare.
31475         * internal-fn.c (cond_binary_direct): New macro.
31476         (expand_cond_binary_optab_fn): Likewise.
31477         (direct_cond_binary_optab_supported_p): Likewise.
31478         (get_conditional_internal_fn): New function.
31479         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
31480         Cope with reduction statements that are vectorized as calls rather
31481         than assignments.
31482         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
31483         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
31484         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
31485         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
31486         (UNSPEC_COND_EOR): New unspecs.
31487         (optab): Add mappings for them.
31488         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
31489         (sve_int_op, sve_fp_op): New int attributes.
31491 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31492             Alan Hayward  <alan.hayward@arm.com>
31493             David Sherwood  <david.sherwood@arm.com>
31495         * optabs.def (while_ult_optab): New optab.
31496         * doc/md.texi (while_ult@var{m}@var{n}): Document.
31497         * internal-fn.def (WHILE_ULT): New internal function.
31498         * internal-fn.h (direct_internal_fn_supported_p): New override
31499         that takes two types as argument.
31500         * internal-fn.c (while_direct): New macro.
31501         (expand_while_optab_fn): New function.
31502         (convert_optab_supported_p): Likewise.
31503         (direct_while_optab_supported_p): New macro.
31504         * wide-int.h (wi::udiv_ceil): New function.
31505         * tree-vectorizer.h (rgroup_masks): New structure.
31506         (vec_loop_masks): New typedef.
31507         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
31508         and fully_masked_p.
31509         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
31510         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
31511         (vect_max_vf): New function.
31512         (slpeel_make_loop_iterate_ntimes): Delete.
31513         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
31514         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
31515         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
31516         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
31517         internal-fn.h, stor-layout.h and optabs-query.h.
31518         (vect_set_loop_mask): New function.
31519         (add_preheader_seq): Likewise.
31520         (add_header_seq): Likewise.
31521         (interleave_supported_p): Likewise.
31522         (vect_maybe_permute_loop_masks): Likewise.
31523         (vect_set_loop_masks_directly): Likewise.
31524         (vect_set_loop_condition_masked): Likewise.
31525         (vect_set_loop_condition_unmasked): New function, split out from
31526         slpeel_make_loop_iterate_ntimes.
31527         (slpeel_make_loop_iterate_ntimes): Rename to..
31528         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
31529         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
31530         (vect_do_peeling): Update call accordingly.
31531         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
31532         loops.
31533         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
31534         mask_compare_type, can_fully_mask_p and fully_masked_p.
31535         (release_vec_loop_masks): New function.
31536         (_loop_vec_info): Use it to free the loop masks.
31537         (can_produce_all_loop_masks_p): New function.
31538         (vect_get_max_nscalars_per_iter): Likewise.
31539         (vect_verify_full_masking): Likewise.
31540         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
31541         retries, and free the mask rgroups before retrying.  Check loop-wide
31542         reasons for disallowing fully-masked loops.  Make the final decision
31543         about whether use a fully-masked loop or not.
31544         (vect_estimate_min_profitable_iters): Do not assume that peeling
31545         for the number of iterations will be needed for fully-masked loops.
31546         (vectorizable_reduction): Disable fully-masked loops.
31547         (vectorizable_live_operation): Likewise.
31548         (vect_halve_mask_nunits): New function.
31549         (vect_double_mask_nunits): Likewise.
31550         (vect_record_loop_mask): Likewise.
31551         (vect_get_loop_mask): Likewise.
31552         (vect_transform_loop): Handle the case in which the final loop
31553         iteration might handle a partial vector.  Call vect_set_loop_condition
31554         instead of slpeel_make_loop_iterate_ntimes.
31555         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
31556         (check_load_store_masking): New function.
31557         (prepare_load_store_mask): Likewise.
31558         (vectorizable_store): Handle fully-masked loops.
31559         (vectorizable_load): Likewise.
31560         (supportable_widening_operation): Use vect_halve_mask_nunits for
31561         booleans.
31562         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
31563         (vect_gen_while): New function.
31564         * config/aarch64/aarch64.md (umax<mode>3): New expander.
31565         (aarch64_uqdec<mode>): New insn.
31567 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31568             Alan Hayward  <alan.hayward@arm.com>
31569             David Sherwood  <david.sherwood@arm.com>
31571         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
31572         (reduc_xor_scal_optab): New optabs.
31573         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
31574         (reduc_xor_scal_@var{m}): Document.
31575         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
31576         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
31577         internal functions.
31578         * fold-const-call.c (fold_const_call): Handle them.
31579         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
31580         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
31581         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
31582         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
31583         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
31584         (UNSPEC_XORV): New unspecs.
31585         (optab): Add entries for them.
31586         (BITWISEV): New int iterator.
31587         (bit_reduc_op): New int attributes.
31589 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31590             Alan Hayward  <alan.hayward@arm.com>
31591             David Sherwood  <david.sherwood@arm.com>
31593         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
31594         * internal-fn.def (VEC_SHL_INSERT): New internal function.
31595         * optabs.def (vec_shl_insert_optab): New optab.
31596         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
31597         (duplicate_and_interleave): Likewise.
31598         * tree-vect-loop.c: Include internal-fn.h.
31599         (neutral_op_for_slp_reduction): New function, split out from
31600         get_initial_defs_for_reduction.
31601         (get_initial_def_for_reduction): Handle option 2 for variable-length
31602         vectors by loading the neutral value into a vector and then shifting
31603         the initial value into element 0.
31604         (get_initial_defs_for_reduction): Replace the code argument with
31605         the neutral value calculated by neutral_op_for_slp_reduction.
31606         Use gimple_build_vector for constant-length vectors.
31607         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
31608         but the first group_size elements have a neutral value.
31609         Use duplicate_and_interleave otherwise.
31610         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
31611         Update call to get_initial_defs_for_reduction.  Handle SLP
31612         reductions for variable-length vectors by creating one vector
31613         result for each scalar result, with the elements associated
31614         with other scalar results stubbed out with the neutral value.
31615         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
31616         Require IFN_VEC_SHL_INSERT for double reductions on
31617         variable-length vectors, or SLP reductions that have
31618         a neutral value.  Require can_duplicate_and_interleave_p
31619         support for variable-length unchained SLP reductions if there
31620         is no neutral value, such as for MIN/MAX reductions.  Also require
31621         the number of vector elements to be a multiple of the number of
31622         SLP statements when doing variable-length unchained SLP reductions.
31623         Update call to vect_create_epilog_for_reduction.
31624         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
31625         and remove initial values.
31626         (duplicate_and_interleave): Make public.
31627         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
31628         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
31630 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31631             Alan Hayward  <alan.hayward@arm.com>
31632             David Sherwood  <david.sherwood@arm.com>
31634         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
31635         (can_duplicate_and_interleave_p): New function.
31636         (vect_get_and_check_slp_defs): Take the vector of statements
31637         rather than just the current one.  Remove excess parentheses.
31638         Restriction rejectinon of vect_constant_def and vect_external_def
31639         for variable-length vectors to boolean types, or types for which
31640         can_duplicate_and_interleave_p is false.
31641         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
31642         (duplicate_and_interleave): New function.
31643         (vect_get_constant_vectors): Use gimple_build_vector for
31644         constant-length vectors and suitable variable-length constant
31645         vectors.  Use duplicate_and_interleave for other variable-length
31646         vectors.  Don't defer the update when inserting new statements.
31648 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31649             Alan Hayward  <alan.hayward@arm.com>
31650             David Sherwood  <david.sherwood@arm.com>
31652         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
31653         min_profitable_iters doesn't go negative.
31655 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31656             Alan Hayward  <alan.hayward@arm.com>
31657             David Sherwood  <david.sherwood@arm.com>
31659         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
31660         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
31661         * optabs.def (vec_mask_load_lanes_optab): New optab.
31662         (vec_mask_store_lanes_optab): Likewise.
31663         * internal-fn.def (MASK_LOAD_LANES): New internal function.
31664         (MASK_STORE_LANES): Likewise.
31665         * internal-fn.c (mask_load_lanes_direct): New macro.
31666         (mask_store_lanes_direct): Likewise.
31667         (expand_mask_load_optab_fn): Handle masked operations.
31668         (expand_mask_load_lanes_optab_fn): New macro.
31669         (expand_mask_store_optab_fn): Handle masked operations.
31670         (expand_mask_store_lanes_optab_fn): New macro.
31671         (direct_mask_load_lanes_optab_supported_p): Likewise.
31672         (direct_mask_store_lanes_optab_supported_p): Likewise.
31673         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
31674         parameter.
31675         (vect_load_lanes_supported): Likewise.
31676         * tree-vect-data-refs.c (strip_conversion): New function.
31677         (can_group_stmts_p): Likewise.
31678         (vect_analyze_data_ref_accesses): Use it instead of checking
31679         for a pair of assignments.
31680         (vect_store_lanes_supported): Take a masked_p parameter.
31681         (vect_load_lanes_supported): Likewise.
31682         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
31683         vect_store_lanes_supported and vect_load_lanes_supported.
31684         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
31685         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
31686         parameter.  Don't allow gaps for masked accesses.
31687         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
31688         and vect_load_lanes_supported.
31689         (get_load_store_type): Take a masked_p parameter and update
31690         call to get_group_load_store_type.
31691         (vectorizable_store): Update call to get_load_store_type.
31692         Handle IFN_MASK_STORE_LANES.
31693         (vectorizable_load): Update call to get_load_store_type.
31694         Handle IFN_MASK_LOAD_LANES.
31696 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31697             Alan Hayward  <alan.hayward@arm.com>
31698             David Sherwood  <david.sherwood@arm.com>
31700         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
31701         modes for SVE.
31702         * config/aarch64/aarch64-protos.h
31703         (aarch64_sve_struct_memory_operand_p): Declare.
31704         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
31705         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
31706         (VPRED, vpred): Handle SVE structure modes.
31707         * config/aarch64/constraints.md (Utx): New constraint.
31708         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
31709         (aarch64_sve_struct_nonimmediate_operand): New predicates.
31710         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
31711         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
31712         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
31713         structure modes.  Split into pieces after RA.
31714         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
31715         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
31716         New patterns.
31717         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
31718         SVE structure modes.
31719         (aarch64_classify_address): Likewise.
31720         (sizetochar): Move earlier in file.
31721         (aarch64_print_operand): Handle SVE register lists.
31722         (aarch64_array_mode): New function.
31723         (aarch64_sve_struct_memory_operand_p): Likewise.
31724         (TARGET_ARRAY_MODE): Redefine.
31726 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31727             Alan Hayward  <alan.hayward@arm.com>
31728             David Sherwood  <david.sherwood@arm.com>
31730         * target.def (array_mode): New target hook.
31731         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
31732         * doc/tm.texi: Regenerate.
31733         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
31734         * hooks.c (hook_optmode_mode_uhwi_none): New function.
31735         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
31736         targetm.array_mode.
31737         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
31738         type sizes.
31740 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31741             Alan Hayward  <alan.hayward@arm.com>
31742             David Sherwood  <david.sherwood@arm.com>
31744         * fold-const.c (fold_binary_loc): Check the argument types
31745         rather than the result type when testing for a vector operation.
31747 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31749         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
31750         * doc/tm.texi: Regenerate.
31752 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31753             Alan Hayward  <alan.hayward@arm.com>
31754             David Sherwood  <david.sherwood@arm.com>
31756         * doc/invoke.texi (-msve-vector-bits=): Document new option.
31757         (sve): Document new AArch64 extension.
31758         * doc/md.texi (w): Extend the description of the AArch64
31759         constraint to include SVE vectors.
31760         (Upl, Upa): Document new AArch64 predicate constraints.
31761         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
31762         enum.
31763         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
31764         (msve-vector-bits=): New option.
31765         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
31766         SVE when these are disabled.
31767         (sve): New extension.
31768         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
31769         modes.  Adjust their number of units based on aarch64_sve_vg.
31770         (MAX_BITSIZE_MODE_ANY_MODE): Define.
31771         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
31772         aarch64_addr_query_type.
31773         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
31774         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
31775         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
31776         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
31777         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
31778         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
31779         (aarch64_simd_imm_zero_p): Delete.
31780         (aarch64_check_zero_based_sve_index_immediate): Declare.
31781         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
31782         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
31783         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
31784         (aarch64_sve_float_mul_immediate_p): Likewise.
31785         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
31786         rather than an rtx.
31787         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
31788         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
31789         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
31790         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
31791         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
31792         (aarch64_regmode_natural_size): Likewise.
31793         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
31794         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
31795         left one place.
31796         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
31797         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
31798         for VG and the SVE predicate registers.
31799         (V_ALIASES): Add a "z"-prefixed alias.
31800         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
31801         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
31802         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
31803         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
31804         (REG_CLASS_NAMES): Add entries for them.
31805         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
31806         and the predicate registers.
31807         (aarch64_sve_vg): Declare.
31808         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
31809         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
31810         (REGMODE_NATURAL_SIZE): Define.
31811         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
31812         SVE macros.
31813         * config/aarch64/aarch64.c: Include cfgrtl.h.
31814         (simd_immediate_info): Add a constructor for series vectors,
31815         and an associated step field.
31816         (aarch64_sve_vg): New variable.
31817         (aarch64_dbx_register_number): Handle VG and the predicate registers.
31818         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
31819         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
31820         (VEC_ANY_DATA, VEC_STRUCT): New constants.
31821         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
31822         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
31823         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
31824         (aarch64_get_mask_mode): New functions.
31825         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
31826         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
31827         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
31828         predicate modes and predicate registers.  Explicitly restrict
31829         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
31830         to store a vector mode if it is recognized by
31831         aarch64_classify_vector_mode.
31832         (aarch64_regmode_natural_size): New function.
31833         (aarch64_hard_regno_caller_save_mode): Return the original mode
31834         for predicates.
31835         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
31836         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
31837         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
31838         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
31839         functions.
31840         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
31841         does not overlap dest if the function is frame-related.  Handle
31842         SVE constants.
31843         (aarch64_split_add_offset): New function.
31844         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
31845         them aarch64_add_offset.
31846         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
31847         and update call to aarch64_sub_sp.
31848         (aarch64_add_cfa_expression): New function.
31849         (aarch64_expand_prologue): Pass extra temporary registers to the
31850         functions above.  Handle the case in which we need to emit new
31851         DW_CFA_expressions for registers that were originally saved
31852         relative to the stack pointer, but now have to be expressed
31853         relative to the frame pointer.
31854         (aarch64_output_mi_thunk): Pass extra temporary registers to the
31855         functions above.
31856         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
31857         IP0 and IP1 values for SVE frames.
31858         (aarch64_expand_vec_series): New function.
31859         (aarch64_expand_sve_widened_duplicate): Likewise.
31860         (aarch64_expand_sve_const_vector): Likewise.
31861         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
31862         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
31863         into the register, rather than emitting a SET directly.
31864         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
31865         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
31866         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
31867         (offset_9bit_signed_scaled_p): New functions.
31868         (aarch64_replicate_bitmask_imm): New function.
31869         (aarch64_bitmask_imm): Use it.
31870         (aarch64_cannot_force_const_mem): Reject expressions involving
31871         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
31872         (aarch64_classify_index): Handle SVE indices, by requiring
31873         a plain register index with a scale that matches the element size.
31874         (aarch64_classify_address): Handle SVE addresses.  Assert that
31875         the mode of the address is VOIDmode or an integer mode.
31876         Update call to aarch64_classify_symbol.
31877         (aarch64_classify_symbolic_expression): Update call to
31878         aarch64_classify_symbol.
31879         (aarch64_const_vec_all_in_range_p): New function.
31880         (aarch64_print_vector_float_operand): Likewise.
31881         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
31882         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
31883         and the FP immediates 1.0 and 0.5.
31884         (aarch64_print_address_internal): Handle SVE addresses.
31885         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
31886         (aarch64_regno_regclass): Handle predicate registers.
31887         (aarch64_secondary_reload): Handle big-endian reloads of SVE
31888         data modes.
31889         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
31890         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
31891         (aarch64_convert_sve_vector_bits): New function.
31892         (aarch64_override_options): Use it to handle -msve-vector-bits=.
31893         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
31894         rather than an rtx.
31895         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
31896         Handle SVE vector and predicate modes.  Accept VL-based constants
31897         that need only one temporary register, and VL offsets that require
31898         no temporary registers.
31899         (aarch64_conditional_register_usage): Mark the predicate registers
31900         as fixed if SVE isn't available.
31901         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
31902         Return true for SVE vector and predicate modes.
31903         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
31904         rather than an unsigned int.  Handle SVE modes.
31905         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
31906         SVE modes.
31907         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
31908         if SVE is enabled.
31909         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
31910         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
31911         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
31912         (aarch64_sve_float_mul_immediate_p): New functions.
31913         (aarch64_sve_valid_immediate): New function.
31914         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
31915         Explicitly reject structure modes.  Check for INDEX constants.
31916         Handle PTRUE and PFALSE constants.
31917         (aarch64_check_zero_based_sve_index_immediate): New function.
31918         (aarch64_simd_imm_zero_p): Delete.
31919         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
31920         vector modes.  Accept constants in the range of CNT[BHWD].
31921         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
31922         ask for an Advanced SIMD mode.
31923         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
31924         (aarch64_simd_vector_alignment): Handle SVE predicates.
31925         (aarch64_vectorize_preferred_vector_alignment): New function.
31926         (aarch64_simd_vector_alignment_reachable): Use it instead of
31927         the vector size.
31928         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
31929         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
31930         functions.
31931         (MAX_VECT_LEN): Delete.
31932         (expand_vec_perm_d): Add a vec_flags field.
31933         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
31934         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
31935         (aarch64_evpc_ext): Don't apply a big-endian lane correction
31936         for SVE modes.
31937         (aarch64_evpc_rev): Rename to...
31938         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
31939         (aarch64_evpc_rev_global): New function.
31940         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
31941         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
31942         MAX_VECT_LEN.
31943         (aarch64_evpc_sve_tbl): New function.
31944         (aarch64_expand_vec_perm_const_1): Update after rename of
31945         aarch64_evpc_rev.  Handle SVE permutes too, trying
31946         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
31947         than aarch64_evpc_tbl.
31948         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
31949         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
31950         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
31951         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
31952         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
31953         (aarch64_expand_sve_vcond): New functions.
31954         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
31955         of aarch64_vector_mode_p.
31956         (aarch64_dwarf_poly_indeterminate_value): New function.
31957         (aarch64_compute_pressure_classes): Likewise.
31958         (aarch64_can_change_mode_class): Likewise.
31959         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
31960         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
31961         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
31962         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
31963         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
31964         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
31965         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
31966         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
31967         constraints.
31968         (Dn, Dl, Dr): Accept const as well as const_vector.
31969         (Dz): Likewise.  Compare against CONST0_RTX.
31970         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
31971         of "vector" where appropriate.
31972         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
31973         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
31974         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
31975         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
31976         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
31977         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
31978         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
31979         (v_int_equiv): Extend to SVE modes.
31980         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
31981         mode attributes.
31982         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
31983         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
31984         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
31985         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
31986         (SVE_COND_FP_CMP): New int iterators.
31987         (perm_hilo): Handle the new unpack unspecs.
31988         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
31989         attributes.
31990         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
31991         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
31992         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
31993         (aarch64_equality_operator, aarch64_constant_vector_operand)
31994         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
31995         (aarch64_sve_nonimmediate_operand): Likewise.
31996         (aarch64_sve_general_operand): Likewise.
31997         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
31998         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
31999         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
32000         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
32001         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
32002         (aarch64_sve_float_arith_immediate): Likewise.
32003         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
32004         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
32005         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
32006         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
32007         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
32008         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
32009         (aarch64_sve_float_arith_operand): Likewise.
32010         (aarch64_sve_float_arith_with_sub_operand): Likewise.
32011         (aarch64_sve_float_mul_operand): Likewise.
32012         (aarch64_sve_vec_perm_operand): Likewise.
32013         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
32014         (aarch64_mov_operand): Accept const_poly_int and const_vector.
32015         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
32016         as well as const_vector.
32017         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
32018         in file.  Use CONST0_RTX and CONSTM1_RTX.
32019         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
32020         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
32021         Use aarch64_simd_imm_zero.
32022         * config/aarch64/aarch64-sve.md: New file.
32023         * config/aarch64/aarch64.md: Include it.
32024         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
32025         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
32026         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
32027         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
32028         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
32029         (sve): New attribute.
32030         (enabled): Disable instructions with the sve attribute unless
32031         TARGET_SVE.
32032         (movqi, movhi): Pass CONST_POLY_INT operaneds through
32033         aarch64_expand_mov_immediate.
32034         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
32035         CNT[BHSD] immediates.
32036         (movti): Split CONST_POLY_INT moves into two halves.
32037         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
32038         Split additions that need a temporary here if the destination
32039         is the stack pointer.
32040         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
32041         (*add<mode>3_poly_1): New instruction.
32042         (set_clobber_cc): New expander.
32044 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
32046         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
32047         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
32048         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
32049         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
32050         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
32051         Change innermode from fixed_mode_size to machine_mode.
32052         (simplify_subreg): Update call accordingly.  Handle a constant-sized
32053         subreg of a variable-length CONST_VECTOR.
32055 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
32056             Alan Hayward  <alan.hayward@arm.com>
32057             David Sherwood  <david.sherwood@arm.com>
32059         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
32060         (add_offset_to_base): New function, split out from...
32061         (create_mem_ref): ...here.  When handling a scale other than 1,
32062         check first whether the address is valid without the offset.
32063         Add it into the base if so, leaving the index and scale as-is.
32065 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
32067         PR c++/83778
32068         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
32069         fold_for_warn before checking if arg2 is INTEGER_CST.
32071 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
32073         * config/rs6000/predicates.md (load_multiple_operation): Delete.
32074         (store_multiple_operation): Delete.
32075         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
32076         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
32077         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
32078         guarded by TARGET_STRING.
32079         (rs6000_output_load_multiple): Delete.
32080         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
32081         OPTION_MASK_STRING / TARGET_STRING handling.
32082         (print_operand) <'N', 'O'>: Add comment that these are unused now.
32083         (const rs6000_opt_masks) <"string">: Change mask to 0.
32084         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
32085         (MASK_STRING): Delete.
32086         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
32087         parts.  Simplify.
32088         (load_multiple): Delete.
32089         (*ldmsi8): Delete.
32090         (*ldmsi7): Delete.
32091         (*ldmsi6): Delete.
32092         (*ldmsi5): Delete.
32093         (*ldmsi4): Delete.
32094         (*ldmsi3): Delete.
32095         (store_multiple): Delete.
32096         (*stmsi8): Delete.
32097         (*stmsi7): Delete.
32098         (*stmsi6): Delete.
32099         (*stmsi5): Delete.
32100         (*stmsi4): Delete.
32101         (*stmsi3): Delete.
32102         (movmemsi_8reg): Delete.
32103         (corresponding unnamed define_insn): Delete.
32104         (movmemsi_6reg): Delete.
32105         (corresponding unnamed define_insn): Delete.
32106         (movmemsi_4reg): Delete.
32107         (corresponding unnamed define_insn): Delete.
32108         (movmemsi_2reg): Delete.
32109         (corresponding unnamed define_insn): Delete.
32110         (movmemsi_1reg): Delete.
32111         (corresponding unnamed define_insn): Delete.
32112         * config/rs6000/rs6000.opt (mno-string): New.
32113         (mstring): Replace by deprecation warning stub.
32114         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
32116 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
32118         * regrename.c (regrename_do_replace): If replacing the same
32119         reg multiple times, try to reuse last created gen_raw_REG.
32121         PR debug/81155
32122         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
32123         main to workaround a bug in GDB.
32125 2018-01-12  Tom de Vries  <tom@codesourcery.com>
32127         PR target/83737
32128         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
32130 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
32132         PR rtl-optimization/80481
32133         * ira-color.c (get_cap_member): New function.
32134         (allocnos_conflict_by_live_ranges_p): Use it.
32135         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
32136         (setup_slot_coalesced_allocno_live_ranges): Ditto.
32138 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
32140         PR target/83628
32141         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
32142         (*saddl_se_1): Ditto.
32143         (*ssubsi_1): Ditto.
32144         (*ssubl_se_1): Ditto.
32146 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
32148         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
32149         rather than wi::to_widest for DR_INITs.
32150         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
32151         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
32152         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
32153         INTEGER_CSTs.
32154         (vect_analyze_group_access_1): Note that here.
32156 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
32158         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
32159         polynomial type sizes.
32161 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
32163         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
32164         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
32165         (gimple_add_tmp_var): Likewise.
32167 2018-01-12  Martin Liska  <mliska@suse.cz>
32169         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
32170         (gimple_alloc_sizes): Likewise.
32171         (dump_gimple_statistics): Use PRIu64 in printf format.
32172         * gimple.h: Change uint64_t to int.
32174 2018-01-12  Martin Liska  <mliska@suse.cz>
32176         * tree-core.h: Use uint64_t instead of int.
32177         * tree.c (tree_node_counts): Likewise.
32178         (tree_node_sizes): Likewise.
32179         (dump_tree_statistics): Use PRIu64 in printf format.
32181 2018-01-12  Martin Liska  <mliska@suse.cz>
32183         * Makefile.in: As qsort_chk is implemented in vec.c, add
32184         vec.o to linkage of gencfn-macros.
32185         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
32186         passing the info to record_node_allocation_statistics.
32187         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
32188         and pass the info.
32189         * ggc-common.c (struct ggc_usage): Add operator== and use
32190         it in operator< and compare function.
32191         * mem-stats.h (struct mem_usage): Likewise.
32192         * vec.c (struct vec_usage): Remove operator< and compare
32193         function. Can be simply inherited.
32195 2018-01-12  Martin Jambor  <mjambor@suse.cz>
32197         PR target/81616
32198         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
32199         * tree-ssa-math-opts.c: Include domwalk.h.
32200         (convert_mult_to_fma_1): New function.
32201         (fma_transformation_info): New type.
32202         (fma_deferring_state): Likewise.
32203         (cancel_fma_deferring): New function.
32204         (result_of_phi): Likewise.
32205         (last_fma_candidate_feeds_initial_phi): Likewise.
32206         (convert_mult_to_fma): Added deferring logic, split actual
32207         transformation to convert_mult_to_fma_1.
32208         (math_opts_dom_walker): New type.
32209         (math_opts_dom_walker::after_dom_children): New method, body moved
32210         here from pass_optimize_widening_mul::execute, added deferring logic
32211         bits.
32212         (pass_optimize_widening_mul::execute): Moved most of code to
32213         math_opts_dom_walker::after_dom_children.
32214         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
32215         * config/i386/i386.c (ix86_option_override_internal): Added
32216         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
32218 2018-01-12  Richard Biener  <rguenther@suse.de>
32220         PR debug/83157
32221         * dwarf2out.c (gen_variable_die): Do not reset old_die for
32222         inline instance vars.
32224 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
32226         PR target/81819
32227         * config/rx/rx.c (rx_is_restricted_memory_address):
32228         Handle SUBREG case.
32230 2018-01-12  Richard Biener  <rguenther@suse.de>
32232         PR tree-optimization/80846
32233         * target.def (split_reduction): New target hook.
32234         * targhooks.c (default_split_reduction): New function.
32235         * targhooks.h (default_split_reduction): Declare.
32236         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
32237         target requests first reduce vectors by combining low and high
32238         parts.
32239         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
32240         (get_vectype_for_scalar_type_and_size): Export.
32241         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
32242         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
32243         * doc/tm.texi: Regenerate.
32244         * config/i386/i386.c (ix86_split_reduction): Implement
32245         TARGET_VECTORIZE_SPLIT_REDUCTION.
32247 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
32249         PR target/83368
32250         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
32251         in PIC mode except for TARGET_VXWORKS_RTP.
32252         * config/sparc/sparc.c: Include cfgrtl.h.
32253         (TARGET_INIT_PIC_REG): Define.
32254         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
32255         (sparc_pic_register_p): New predicate.
32256         (sparc_legitimate_address_p): Use it.
32257         (sparc_legitimize_pic_address): Likewise.
32258         (sparc_delegitimize_address): Likewise.
32259         (sparc_mode_dependent_address_p): Likewise.
32260         (gen_load_pcrel_sym): Remove 4th parameter.
32261         (load_got_register): Adjust call to above.  Remove obsolete stuff.
32262         (sparc_expand_prologue): Do not call load_got_register here.
32263         (sparc_flat_expand_prologue): Likewise.
32264         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
32265         (sparc_use_pseudo_pic_reg): New function.
32266         (sparc_init_pic_reg): Likewise.
32267         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
32268         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
32270 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
32272         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
32273         Add item for branch_cost.
32275 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
32277         PR rtl-optimization/83565
32278         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
32279         not extend the result to a larger mode for rotate operations.
32280         (num_sign_bit_copies1): Likewise.
32282 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
32284         PR target/40411
32285         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
32286         -symbolic.
32287         Use values-Xc.o for -pedantic.
32288         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
32290 2018-01-12  Martin Liska  <mliska@suse.cz>
32292         PR ipa/83054
32293         * ipa-devirt.c (final_warning_record::grow_type_warnings):
32294         New function.
32295         (possible_polymorphic_call_targets): Use it.
32296         (ipa_devirt): Likewise.
32298 2018-01-12  Martin Liska  <mliska@suse.cz>
32300         * profile-count.h (enum profile_quality): Use 0 as invalid
32301         enum value of profile_quality.
32303 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
32305         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
32306         -mext-string options.
32308 2018-01-12  Richard Biener  <rguenther@suse.de>
32310         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
32311         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
32312         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
32313         Likewise.
32314         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
32316 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
32318         * configure.ac (--with-long-double-format): Add support for the
32319         configuration option to change the default long double format on
32320         PowerPC systems.
32321         * config.gcc (powerpc*-linux*-*): Likewise.
32322         * configure: Regenerate.
32323         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
32324         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
32325         used without modification.
32327 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
32329         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
32330         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
32331         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
32332         MISC_BUILTIN_SPEC_BARRIER.
32333         (rs6000_init_builtins): Likewise.
32334         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
32335         enum value.
32336         (speculation_barrier): New define_insn.
32337         * doc/extend.texi: Document __builtin_speculation_barrier.
32339 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
32341         PR target/83203
32342         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
32343         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
32344         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
32345         iterators.
32346         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
32347         integral modes instead of "ss" and "sd".
32348         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
32349         vectors with 32-bit and 64-bit elements.
32350         (vecdupssescalarmodesuffix): New mode attribute.
32351         (vec_dup<mode>): Use it.
32353 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
32355         PR target/83330
32356         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
32357         frame if argument is passed on stack.
32359 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
32361         PR target/82682
32362         * ree.c (combine_reaching_defs): Optimize also
32363         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
32364         reg2=any_extend(exp); reg1=reg2;, formatting fix.
32366 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
32368         PR middle-end/83189
32369         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
32371 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
32373         PR middle-end/83718
32374         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
32375         after they are computed.
32377 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
32379         PR tree-optimization/83695
32380         * gimple-loop-linterchange.cc
32381         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
32382         reset cached scev information after interchange.
32383         (pass_linterchange::execute): Remove call to scev_reset_htab.
32385 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
32387         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
32388         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
32389         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
32390         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
32391         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
32392         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
32393         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
32394         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
32395         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
32396         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
32397         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
32398         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
32399         (V_lane_reg): Likewise.
32400         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
32401         New define_expand.
32402         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
32403         (vfmal_lane_low<mode>_intrinsic,
32404         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
32405         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
32406         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
32407         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
32408         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
32409         vfmsl_lane_high<mode>_intrinsic): New define_insns.
32411 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
32413         * config/arm/arm-cpus.in (fp16fml): New feature.
32414         (ALL_SIMD): Add fp16fml.
32415         (armv8.2-a): Add fp16fml as an option.
32416         (armv8.3-a): Likewise.
32417         (armv8.4-a): Add fp16fml as part of fp16.
32418         * config/arm/arm.h (TARGET_FP16FML): Define.
32419         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
32420         when appropriate.
32421         * config/arm/arm-modes.def (V2HF): Define.
32422         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
32423         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
32424         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
32425         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
32426         vfmsl_low, vfmsl_high): New set of builtins.
32427         * config/arm/iterators.md (PLUSMINUS): New code iterator.
32428         (vfml_op): New code attribute.
32429         (VFMLHALVES): New int iterator.
32430         (VFML, VFMLSEL): New mode attributes.
32431         (V_reg): Define mapping for V2HF.
32432         (V_hi, V_lo): New mode attributes.
32433         (VF_constraint): Likewise.
32434         (vfml_half, vfml_half_selector): New int attributes.
32435         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
32436         define_expand.
32437         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
32438         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
32439         New define_insn.
32440         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
32441         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
32442         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
32443         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
32444         documentation.
32445         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
32446         Document new effective target and option set.
32448 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
32450         * config/arm/arm-cpus.in (armv8_4): New feature.
32451         (ARMv8_4a): New fgroup.
32452         (armv8.4-a): New arch.
32453         * config/arm/arm-tables.opt: Regenerate.
32454         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
32455         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
32456         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
32457         Add matching rules for -march=armv8.4-a and extensions.
32458         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
32460 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
32462         PR target/81821
32463         * config/rx/rx.md (BW): New mode attribute.
32464         (sync_lock_test_and_setsi): Add mode suffix to insn output.
32466 2018-01-11  Richard Biener  <rguenther@suse.de>
32468         PR tree-optimization/83435
32469         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
32470         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
32471         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
32473 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
32474             Alan Hayward  <alan.hayward@arm.com>
32475             David Sherwood  <david.sherwood@arm.com>
32477         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
32478         field.
32479         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
32480         (aarch64_print_address_internal): Use it to check for a zero offset.
32482 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
32483             Alan Hayward  <alan.hayward@arm.com>
32484             David Sherwood  <david.sherwood@arm.com>
32486         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
32487         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
32488         Return a poly_int64 rather than a HOST_WIDE_INT.
32489         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
32490         rather than a HOST_WIDE_INT.
32491         * config/aarch64/aarch64.h (aarch64_frame): Protect with
32492         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
32493         hard_fp_offset, frame_size, initial_adjust, callee_offset and
32494         final_offset from HOST_WIDE_INT to poly_int64.
32495         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
32496         to_constant when getting the number of units in an Advanced SIMD
32497         mode.
32498         (aarch64_builtin_vectorized_function): Check for a constant number
32499         of units.
32500         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
32501         GET_MODE_SIZE.
32502         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
32503         attribute instead of GET_MODE_NUNITS.
32504         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
32505         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
32506         GET_MODE_SIZE for fixed-size registers.
32507         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
32508         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
32509         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
32510         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
32511         (aarch64_print_operand, aarch64_print_address_internal)
32512         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
32513         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
32514         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
32515         Handle polynomial GET_MODE_SIZE.
32516         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
32517         wider than SImode without modification.
32518         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
32519         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
32520         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
32521         passing and returning SVE modes.
32522         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
32523         rather than GEN_INT.
32524         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
32525         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
32526         (aarch64_allocate_and_probe_stack_space): Likewise.
32527         (aarch64_layout_frame): Cope with polynomial offsets.
32528         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
32529         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
32530         polynomial offsets.
32531         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
32532         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
32533         poly_int64 rather than a HOST_WIDE_INT.
32534         (aarch64_get_separate_components, aarch64_process_components)
32535         (aarch64_expand_prologue, aarch64_expand_epilogue)
32536         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
32537         (aarch64_anchor_offset): New function, split out from...
32538         (aarch64_legitimize_address): ...here.
32539         (aarch64_builtin_vectorization_cost): Handle polynomial
32540         TYPE_VECTOR_SUBPARTS.
32541         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
32542         GET_MODE_NUNITS.
32543         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
32544         number of elements from the PARALLEL rather than the mode.
32545         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
32546         rather than GET_MODE_BITSIZE.
32547         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
32548         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
32549         (aarch64_expand_vec_perm_const_1): Handle polynomial
32550         d->perm.length () and d->perm elements.
32551         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
32552         Apply to_constant to d->perm elements.
32553         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
32554         polynomial CONST_VECTOR_NUNITS.
32555         (aarch64_move_pointer): Take amount as a poly_int64 rather
32556         than an int.
32557         (aarch64_progress_pointer): Avoid temporary variable.
32558         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
32559         the mode attribute instead of GET_MODE.
32561 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
32562             Alan Hayward  <alan.hayward@arm.com>
32563             David Sherwood  <david.sherwood@arm.com>
32565         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
32566         x exists before using it.
32567         (aarch64_add_constant_internal): Rename to...
32568         (aarch64_add_offset_1): ...this.  Replace regnum with separate
32569         src and dest rtxes.  Handle the case in which they're different,
32570         including when the offset is zero.  Replace scratchreg with an rtx.
32571         Use 2 additions if there is no spare register into which we can
32572         move a 16-bit constant.
32573         (aarch64_add_constant): Delete.
32574         (aarch64_add_offset): Replace reg with separate src and dest
32575         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
32576         Use aarch64_add_offset_1.
32577         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
32578         an rtx rather than an int.  Take the delta as a poly_int64
32579         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
32580         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
32581         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
32582         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
32583         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
32584         and aarch64_add_sp.
32585         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
32586         aarch64_add_constant.
32588 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
32590         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
32591         Use scalar_float_mode.
32593 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
32595         * config/aarch64/aarch64-simd.md
32596         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
32597         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
32598         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
32599         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
32600         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
32601         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
32602         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
32603         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
32604         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
32605         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
32607 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
32609         PR target/83514
32610         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
32611         targ_options->x_arm_arch_string is non NULL.
32613 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
32615         * config/aarch64/aarch64.h
32616         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
32618 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
32620         PR target/82096
32621         * expmed.c (emit_store_flag_force): Swap if const op0
32622         and change VOIDmode to mode of op0.
32624 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
32626         PR rtl-optimization/83761
32627         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
32628         than bytes to mode_for_size.
32630 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
32632         PR middle-end/83189
32633         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
32634         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
32635         profile.
32637 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
32639         PR middle-end/83575
32640         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
32641         when in layout mode.
32642         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
32643         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
32644         partition fixup.
32646 2018-01-10  Michael Collison  <michael.collison@arm.com>
32648         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
32649         * config/aarch64/aarch64-option-extension.def: Add
32650         AARCH64_OPT_EXTENSION of 'fp16fml'.
32651         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
32652         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
32653         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
32654         * config/aarch64/constraints.md (Ui7): New constraint.
32655         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
32656         (VFMLA_SEL_W): Ditto.
32657         (f16quad): Ditto.
32658         (f16mac1): Ditto.
32659         (VFMLA16_LOW): New int iterator.
32660         (VFMLA16_HIGH): Ditto.
32661         (UNSPEC_FMLAL): New unspec.
32662         (UNSPEC_FMLSL): Ditto.
32663         (UNSPEC_FMLAL2): Ditto.
32664         (UNSPEC_FMLSL2): Ditto.
32665         (f16mac): New code attribute.
32666         * config/aarch64/aarch64-simd-builtins.def
32667         (aarch64_fmlal_lowv2sf): Ditto.
32668         (aarch64_fmlsl_lowv2sf): Ditto.
32669         (aarch64_fmlalq_lowv4sf): Ditto.
32670         (aarch64_fmlslq_lowv4sf): Ditto.
32671         (aarch64_fmlal_highv2sf): Ditto.
32672         (aarch64_fmlsl_highv2sf): Ditto.
32673         (aarch64_fmlalq_highv4sf): Ditto.
32674         (aarch64_fmlslq_highv4sf): Ditto.
32675         (aarch64_fmlal_lane_lowv2sf): Ditto.
32676         (aarch64_fmlsl_lane_lowv2sf): Ditto.
32677         (aarch64_fmlal_laneq_lowv2sf): Ditto.
32678         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
32679         (aarch64_fmlalq_lane_lowv4sf): Ditto.
32680         (aarch64_fmlsl_lane_lowv4sf): Ditto.
32681         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
32682         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
32683         (aarch64_fmlal_lane_highv2sf): Ditto.
32684         (aarch64_fmlsl_lane_highv2sf): Ditto.
32685         (aarch64_fmlal_laneq_highv2sf): Ditto.
32686         (aarch64_fmlsl_laneq_highv2sf): Ditto.
32687         (aarch64_fmlalq_lane_highv4sf): Ditto.
32688         (aarch64_fmlsl_lane_highv4sf): Ditto.
32689         (aarch64_fmlalq_laneq_highv4sf): Ditto.
32690         (aarch64_fmlsl_laneq_highv4sf): Ditto.
32691         * config/aarch64/aarch64-simd.md:
32692         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
32693         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
32694         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
32695         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
32696         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
32697         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
32698         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
32699         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
32700         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
32701         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
32702         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
32703         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
32704         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
32705         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
32706         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
32707         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
32708         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
32709         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
32710         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
32711         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
32712         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
32713         (vfmlsl_low_u32): Ditto.
32714         (vfmlalq_low_u32): Ditto.
32715         (vfmlslq_low_u32): Ditto.
32716         (vfmlal_high_u32): Ditto.
32717         (vfmlsl_high_u32): Ditto.
32718         (vfmlalq_high_u32): Ditto.
32719         (vfmlslq_high_u32): Ditto.
32720         (vfmlal_lane_low_u32): Ditto.
32721         (vfmlsl_lane_low_u32): Ditto.
32722         (vfmlal_laneq_low_u32): Ditto.
32723         (vfmlsl_laneq_low_u32): Ditto.
32724         (vfmlalq_lane_low_u32): Ditto.
32725         (vfmlslq_lane_low_u32): Ditto.
32726         (vfmlalq_laneq_low_u32): Ditto.
32727         (vfmlslq_laneq_low_u32): Ditto.
32728         (vfmlal_lane_high_u32): Ditto.
32729         (vfmlsl_lane_high_u32): Ditto.
32730         (vfmlal_laneq_high_u32): Ditto.
32731         (vfmlsl_laneq_high_u32): Ditto.
32732         (vfmlalq_lane_high_u32): Ditto.
32733         (vfmlslq_lane_high_u32): Ditto.
32734         (vfmlalq_laneq_high_u32): Ditto.
32735         (vfmlslq_laneq_high_u32): Ditto.
32736         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
32737         (AARCH64_FL_FOR_ARCH8_4): New.
32738         (AARCH64_ISA_F16FML): New ISA flag.
32739         (TARGET_F16FML): New feature flag for fp16fml.
32740         (doc/invoke.texi): Document new fp16fml option.
32742 2018-01-10  Michael Collison  <michael.collison@arm.com>
32744         * config/aarch64/aarch64-builtins.c:
32745         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
32746         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
32747         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
32748         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
32749         (AARCH64_ISA_SHA3): New ISA flag.
32750         (TARGET_SHA3): New feature flag for sha3.
32751         * config/aarch64/iterators.md (sha512_op): New int attribute.
32752         (CRYPTO_SHA512): New int iterator.
32753         (UNSPEC_SHA512H): New unspec.
32754         (UNSPEC_SHA512H2): Ditto.
32755         (UNSPEC_SHA512SU0): Ditto.
32756         (UNSPEC_SHA512SU1): Ditto.
32757         * config/aarch64/aarch64-simd-builtins.def
32758         (aarch64_crypto_sha512hqv2di): New builtin.
32759         (aarch64_crypto_sha512h2qv2di): Ditto.
32760         (aarch64_crypto_sha512su0qv2di): Ditto.
32761         (aarch64_crypto_sha512su1qv2di): Ditto.
32762         (aarch64_eor3qv8hi): Ditto.
32763         (aarch64_rax1qv2di): Ditto.
32764         (aarch64_xarqv2di): Ditto.
32765         (aarch64_bcaxqv8hi): Ditto.
32766         * config/aarch64/aarch64-simd.md:
32767         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
32768         (aarch64_crypto_sha512su0qv2di): Ditto.
32769         (aarch64_crypto_sha512su1qv2di): Ditto.
32770         (aarch64_eor3qv8hi): Ditto.
32771         (aarch64_rax1qv2di): Ditto.
32772         (aarch64_xarqv2di): Ditto.
32773         (aarch64_bcaxqv8hi): Ditto.
32774         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
32775         (vsha512h2q_u64): Ditto.
32776         (vsha512su0q_u64): Ditto.
32777         (vsha512su1q_u64): Ditto.
32778         (veor3q_u16): Ditto.
32779         (vrax1q_u64): Ditto.
32780         (vxarq_u64): Ditto.
32781         (vbcaxq_u16): Ditto.
32782         * config/arm/types.md (crypto_sha512): New type attribute.
32783         (crypto_sha3): Ditto.
32784         (doc/invoke.texi): Document new sha3 option.
32786 2018-01-10  Michael Collison  <michael.collison@arm.com>
32788         * config/aarch64/aarch64-builtins.c:
32789         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
32790         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
32791         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
32792         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
32793         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
32794         (AARCH64_ISA_SM4): New ISA flag.
32795         (TARGET_SM4): New feature flag for sm4.
32796         * config/aarch64/aarch64-simd-builtins.def
32797         (aarch64_sm3ss1qv4si): Ditto.
32798         (aarch64_sm3tt1aq4si): Ditto.
32799         (aarch64_sm3tt1bq4si): Ditto.
32800         (aarch64_sm3tt2aq4si): Ditto.
32801         (aarch64_sm3tt2bq4si): Ditto.
32802         (aarch64_sm3partw1qv4si): Ditto.
32803         (aarch64_sm3partw2qv4si): Ditto.
32804         (aarch64_sm4eqv4si): Ditto.
32805         (aarch64_sm4ekeyqv4si): Ditto.
32806         * config/aarch64/aarch64-simd.md:
32807         (aarch64_sm3ss1qv4si): Ditto.
32808         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
32809         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
32810         (aarch64_sm4eqv4si): Ditto.
32811         (aarch64_sm4ekeyqv4si): Ditto.
32812         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
32813         (sm3part_op): Ditto.
32814         (CRYPTO_SM3TT): Ditto.
32815         (CRYPTO_SM3PART): Ditto.
32816         (UNSPEC_SM3SS1): New unspec.
32817         (UNSPEC_SM3TT1A): Ditto.
32818         (UNSPEC_SM3TT1B): Ditto.
32819         (UNSPEC_SM3TT2A): Ditto.
32820         (UNSPEC_SM3TT2B): Ditto.
32821         (UNSPEC_SM3PARTW1): Ditto.
32822         (UNSPEC_SM3PARTW2): Ditto.
32823         (UNSPEC_SM4E): Ditto.
32824         (UNSPEC_SM4EKEY): Ditto.
32825         * config/aarch64/constraints.md (Ui2): New constraint.
32826         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
32827         * config/arm/types.md (crypto_sm3): New type attribute.
32828         (crypto_sm4): Ditto.
32829         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
32830         (vsm3tt1aq_u32): Ditto.
32831         (vsm3tt1bq_u32): Ditto.
32832         (vsm3tt2aq_u32): Ditto.
32833         (vsm3tt2bq_u32): Ditto.
32834         (vsm3partw1q_u32): Ditto.
32835         (vsm3partw2q_u32): Ditto.
32836         (vsm4eq_u32): Ditto.
32837         (vsm4ekeyq_u32): Ditto.
32838         (doc/invoke.texi): Document new sm4 option.
32840 2018-01-10  Michael Collison  <michael.collison@arm.com>
32842         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
32843         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
32844         (AARCH64_FL_FOR_ARCH8_4): New.
32845         (AARCH64_FL_V8_4): New flag.
32846         (doc/invoke.texi): Document new armv8.4-a option.
32848 2018-01-10  Michael Collison  <michael.collison@arm.com>
32850         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
32851         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
32852         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
32853         * config/aarch64/aarch64-option-extension.def: Add
32854         AARCH64_OPT_EXTENSION of 'sha2'.
32855         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
32856         (crypto): Disable sha2 and aes if crypto disabled.
32857         (crypto): Enable aes and sha2 if enabled.
32858         (simd): Disable sha2 and aes if simd disabled.
32859         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
32860         New flags.
32861         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
32862         (TARGET_SHA2): New feature flag for sha2.
32863         (TARGET_AES): New feature flag for aes.
32864         * config/aarch64/aarch64-simd.md:
32865         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
32866         conditional on TARGET_AES.
32867         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
32868         (aarch64_crypto_sha1hsi): Make pattern conditional
32869         on TARGET_SHA2.
32870         (aarch64_crypto_sha1hv4si): Ditto.
32871         (aarch64_be_crypto_sha1hv4si): Ditto.
32872         (aarch64_crypto_sha1su1v4si): Ditto.
32873         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
32874         (aarch64_crypto_sha1su0v4si): Ditto.
32875         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
32876         (aarch64_crypto_sha256su0v4si): Ditto.
32877         (aarch64_crypto_sha256su1v4si): Ditto.
32878         (doc/invoke.texi): Document new aes and sha2 options.
32880 2018-01-10  Martin Sebor  <msebor@redhat.com>
32882         PR tree-optimization/83781
32883         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
32884         as string arrays.
32886 2018-01-11  Martin Sebor  <msebor@gmail.com>
32887             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
32889         PR tree-optimization/83501
32890         PR tree-optimization/81703
32892         * tree-ssa-strlen.c (get_string_cst): Rename...
32893         (get_string_len): ...to this.  Handle global constants.
32894         (handle_char_store): Adjust.
32896 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
32897             Jim Wilson  <jimw@sifive.com>
32899         * config/riscv/riscv-protos.h (riscv_output_return): New.
32900         * config/riscv/riscv.c (struct machine_function): New naked_p field.
32901         (riscv_attribute_table, riscv_output_return),
32902         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
32903         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
32904         (riscv_compute_frame_info): Only compute frame->mask if not a naked
32905         function.
32906         (riscv_expand_prologue): Add early return for naked function.
32907         (riscv_expand_epilogue): Likewise.
32908         (riscv_function_ok_for_sibcall): Return false for naked function.
32909         (riscv_set_current_function): New.
32910         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
32911         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
32912         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
32913         * doc/extend.texi (RISC-V Function Attributes): New.
32915 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
32917         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
32918         check for 128-bit long double before checking TCmode.
32919         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
32920         128-bit long doubles before checking TFmode or TCmode.
32921         (FLOAT128_IBM_P): Likewise.
32923 2018-01-10  Martin Sebor  <msebor@redhat.com>
32925         PR tree-optimization/83671
32926         * builtins.c (c_strlen): Unconditionally return zero for the empty
32927         string.
32928         Use -Warray-bounds for warnings.
32929         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
32930         for non-constant array indices with COMPONENT_REF, arrays of
32931         arrays, and pointers to arrays.
32932         (gimple_fold_builtin_strlen): Determine and set length range for
32933         non-constant character arrays.
32935 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
32937         PR middle-end/81897
32938         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
32939         empty blocks.
32941 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
32943         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
32945 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
32947         PR target/83399
32948         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
32949         VECTOR_MEM_ALTIVEC_OR_VSX_P.
32950         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
32951         indexed_or_indirect_operand predicate.
32952         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
32953         (*vsx_le_perm_load_v8hi): Likewise.
32954         (*vsx_le_perm_load_v16qi): Likewise.
32955         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
32956         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
32957         (*vsx_le_perm_store_v8hi): Likewise.
32958         (*vsx_le_perm_store_v16qi): Likewise.
32959         (eight unnamed splitters): Likewise.
32961 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
32963         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
32964         * config/rs6000/emmintrin.h: Likewise.
32965         * config/rs6000/mmintrin.h: Likewise.
32966         * config/rs6000/xmmintrin.h: Likewise.
32968 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
32970         PR c++/43486
32971         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
32972         "public_flag".
32973         * tree.c (tree_nop_conversion): Return true for location wrapper
32974         nodes.
32975         (maybe_wrap_with_location): New function.
32976         (selftest::check_strip_nops): New function.
32977         (selftest::test_location_wrappers): New function.
32978         (selftest::tree_c_tests): Call it.
32979         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
32980         (maybe_wrap_with_location): New decl.
32981         (EXPR_LOCATION_WRAPPER_P): New macro.
32982         (location_wrapper_p): New inline function.
32983         (tree_strip_any_location_wrapper): New inline function.
32985 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
32987         PR target/83735
32988         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
32989         stack_realign_offset for the largest alignment of stack slot
32990         actually used.
32991         (ix86_find_max_used_stack_alignment): New function.
32992         (ix86_finalize_stack_frame_flags): Use it.  Set
32993         max_used_stack_alignment if we don't realign stack.
32994         * config/i386/i386.h (machine_function): Add
32995         max_used_stack_alignment.
32997 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
32999         * config/arm/arm.opt (-mbranch-cost): New option.
33000         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
33001         account.
33003 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
33005         PR target/83629
33006         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
33007         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
33009 2018-01-10  Richard Biener  <rguenther@suse.de>
33011         PR debug/83765
33012         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
33013         early out so it also covers the case where we have a non-NULL
33014         origin.
33016 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
33018         PR tree-optimization/83753
33019         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
33020         for non-strided grouped accesses if the number of elements is 1.
33022 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
33024         PR target/81616
33025         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
33026         * i386.h (TARGET_USE_GATHER): Define.
33027         * x86-tune.def (X86_TUNE_USE_GATHER): New.
33029 2018-01-10  Martin Liska  <mliska@suse.cz>
33031         PR bootstrap/82831
33032         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
33033         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
33034         partitioning.
33035         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
33036         CLEANUP_NO_PARTITIONING is not set.
33038 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
33040         * doc/rtl.texi: Remove documentation of (const ...) wrappers
33041         for vectors, as a partial revert of r254296.
33042         * rtl.h (const_vec_p): Delete.
33043         (const_vec_duplicate_p): Don't test for vector CONSTs.
33044         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
33045         * expmed.c (make_tree): Likewise.
33047         Revert:
33048         * common.md (E, F): Use CONSTANT_P instead of checking for
33049         CONST_VECTOR.
33050         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
33051         checking for CONST_VECTOR.
33053 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
33055         PR middle-end/83575
33056         * predict.c (force_edge_cold): Handle in more sane way edges
33057         with no prediction.
33059 2018-01-09  Carl Love  <cel@us.ibm.com>
33061         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
33062         V4SI, V4SF types.
33063         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
33064         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
33065         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
33066         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
33067         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
33068         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
33069         * config/rs6000/rs6000-protos.h: Add extern defition for
33070         rs6000_generate_float2_double_code.
33071         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
33072         function.
33073         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
33074         (float2_v2df): Add define_expand.
33076 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
33078         PR target/83628
33079         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
33080         op_mode in the force_to_mode call.
33082 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
33084         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
33085         instead of checking each element individually.
33086         (aarch64_evpc_uzp): Likewise.
33087         (aarch64_evpc_zip): Likewise.
33088         (aarch64_evpc_ext): Likewise.
33089         (aarch64_evpc_rev): Likewise.
33090         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
33091         instead of checking each element individually.  Return true without
33092         generating rtl if
33093         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
33094         whether all selected elements come from the same input, instead of
33095         checking each element individually.  Remove calls to gen_rtx_REG,
33096         start_sequence and end_sequence and instead assert that no rtl is
33097         generated.
33099 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
33101         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
33102         order of HIGH and CONST checks.
33104 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
33106         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
33107         if the destination isn't an SSA_NAME.
33109 2018-01-09  Richard Biener  <rguenther@suse.de>
33111         PR tree-optimization/83668
33112         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
33113         move prologue...
33114         (canonicalize_loop_form): ... here, renamed from ...
33115         (canonicalize_loop_closed_ssa_form): ... this and amended to
33116         swap successor edges for loop exit blocks to make us use
33117         the RPO order we need for initial schedule generation.
33119 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
33121         PR tree-optimization/64811
33122         * match.pd: When optimizing comparisons with Inf, avoid
33123         introducing or losing exceptions from comparisons with NaN.
33125 2018-01-09  Martin Liska  <mliska@suse.cz>
33127         PR sanitizer/82517
33128         * asan.c (shadow_mem_size): Add gcc_assert.
33130 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
33132         Don't save registers in main().
33134         PR target/83738
33135         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
33136         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
33137         * config/avr/avr.c (avr_set_current_function): Don't error if
33138         naked, OS_task or OS_main are specified at the same time.
33139         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
33140         OS_main.
33141         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
33142         attribute.
33143         * common/config/avr/avr-common.c (avr_option_optimization_table):
33144         Switch on -mmain-is-OS_task for optimizing compilations.
33146 2018-01-09  Richard Biener  <rguenther@suse.de>
33148         PR tree-optimization/83572
33149         * graphite.c: Include cfganal.h.
33150         (graphite_transform_loops): Connect infinite loops to exit
33151         and remove fake edges at the end.
33153 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
33155         * ipa-inline.c (edge_badness): Revert accidental checkin.
33157 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
33159         PR ipa/80763
33160         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
33161         symbols; not inline clones.
33163 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
33165         PR target/83507
33166         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
33167         hard registers.  Formatting fixes.
33169         PR preprocessor/83722
33170         * gcc.c (try_generate_repro): Pass
33171         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
33172         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
33173         do_report_bug.
33175 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
33176             Kito Cheng  <kito.cheng@gmail.com>
33178         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
33179         (riscv_leaf_function_p): Delete.
33180         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
33182 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
33184         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
33185         function.
33186         (do_ifelse): New function.
33187         (do_isel): New function.
33188         (do_sub3): New function.
33189         (do_add3): New function.
33190         (do_load_mask_compare): New function.
33191         (do_overlap_load_compare): New function.
33192         (expand_compare_loop): New function.
33193         (expand_block_compare): Call expand_compare_loop() when appropriate.
33194         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
33195         option description.
33196         (-mblock-compare-inline-loop-limit): New option.
33198 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
33200         PR target/83677
33201         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
33202         Reverse order of second and third operands in first alternative.
33203         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
33204         of first and second elements in UNSPEC_VPERMR vector.
33205         (altivec_expand_vec_perm_le): Likewise.
33207 2018-01-08  Jeff Law  <law@redhat.com>
33209         PR rtl-optimizatin/81308
33210         * tree-switch-conversion.c (cfg_altered): New file scoped static.
33211         (process_switch): If group_case_labels makes a change, then set
33212         cfg_altered.
33213         (pass_convert_switch::execute): If a switch is converted, then
33214         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
33216         PR rtl-optimization/81308
33217         * recog.c (split_all_insns): Conditionally cleanup the CFG after
33218         splitting insns.
33220 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
33222         PR target/83663 - Revert r255946
33223         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
33224         generation for cases where splatting a value is not useful.
33225         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
33226         across a vec_duplicate and a paradoxical subreg forming a vector
33227         mode to a vec_concat.
33229 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
33231         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
33232         -march=armv8.3-a variants.
33233         * config/arm/t-multilib: Likewise.
33234         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
33236 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
33238         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
33239         to generate rtl.
33240         (cceq_ior_compare_complement): Give it a name so I can use it, and
33241         change boolean_or_operator predicate to boolean_operator so it can
33242         be used to generate a crand.
33243         (eqne): New code iterator.
33244         (bd/bd_neg): New code_attrs.
33245         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
33246         a single define_insn.
33247         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
33248         decrement (bdnzt/bdnzf/bdzt/bdzf).
33249         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
33250         with the new names of the branch decrement patterns, and added the
33251         names of the branch decrement conditional patterns.
33253 2018-01-08  Richard Biener  <rguenther@suse.de>
33255         PR tree-optimization/83563
33256         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
33257         cache.
33259 2018-01-08  Richard Biener  <rguenther@suse.de>
33261         PR middle-end/83713
33262         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
33264 2018-01-08  Richard Biener  <rguenther@suse.de>
33266         PR tree-optimization/83685
33267         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
33268         references to abnormals.
33270 2018-01-08  Richard Biener  <rguenther@suse.de>
33272         PR lto/83719
33273         * dwarf2out.c (output_indirect_strings): Handle empty
33274         skeleton_debug_str_hash.
33275         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
33277 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
33279         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
33280         (emit_store_direct): Likewise.
33281         (arc_trampoline_adjust_address): Likewise.
33282         (arc_asm_trampoline_template): New function.
33283         (arc_initialize_trampoline): Use asm_trampoline_template.
33284         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
33285         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
33286         * config/arc/arc.md (flush_icache): Delete pattern.
33288 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
33290         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
33291         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
33292         munaligned-access.
33294 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
33296         PR target/83681
33297         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
33298         by not USED_FOR_TARGET.
33299         (make_pass_resolve_sw_modes): Likewise.
33301 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
33303         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
33304         USED_FOR_TARGET.
33306 2018-01-08  Richard Biener  <rguenther@suse.de>
33308         PR middle-end/83580
33309         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
33311 2018-01-08  Richard Biener  <rguenther@suse.de>
33313         PR middle-end/83517
33314         * match.pd ((t * 2) / 2) -> t): Add missing :c.
33316 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
33318         PR middle-end/81897
33319         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
33320         basic blocks with a small number of successors.
33321         (convert_control_dep_chain_into_preds): Improve handling of
33322         forwarder blocks.
33323         (dump_predicates): Split apart into...
33324         (dump_pred_chain): ...here...
33325         (dump_pred_info): ...and here.
33326         (can_one_predicate_be_invalidated_p): Add debugging printfs.
33327         (can_chain_union_be_invalidated_p): Improve check for invalidation
33328         of paths.
33329         (uninit_uses_cannot_happen): Avoid unnecessary if
33330         convert_control_dep_chain_into_preds yielded nothing.
33332 2018-01-06  Martin Sebor  <msebor@redhat.com>
33334         PR tree-optimization/83640
33335         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
33336         subtracting negative offset from size.
33337         (builtin_access::overlap): Adjust offset bounds of the access to fall
33338         within the size of the object if possible.
33340 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
33342         PR rtl-optimization/83699
33343         * expmed.c (extract_bit_field_1): Restrict the vector usage of
33344         extract_bit_field_as_subreg to cases in which the extracted
33345         value is also a vector.
33347         * lra-constraints.c (process_alt_operands): Test for the equivalence
33348         substitutions when detecting a possible reload cycle.
33350 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
33352         PR debug/83480
33353         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
33354         by default if flag_selective_schedling{,2}.  Formatting fixes.
33356         PR rtl-optimization/83682
33357         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
33358         if it has non-VECTOR_MODE element mode.
33359         (vec_duplicate_p): Likewise.
33361         PR middle-end/83694
33362         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
33363         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
33365 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
33367         PR target/83604
33368         * config/i386/i386-builtin.def
33369         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
33370         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
33371         Require also OPTION_MASK_ISA_AVX512F in addition to
33372         OPTION_MASK_ISA_GFNI.
33373         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
33374         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
33375         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
33376         to OPTION_MASK_ISA_GFNI.
33377         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
33378         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
33379         OPTION_MASK_ISA_AVX512BW.
33380         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
33381         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
33382         addition to OPTION_MASK_ISA_GFNI.
33383         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
33384         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
33385         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
33386         to OPTION_MASK_ISA_GFNI.
33387         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
33388         a requirement for all ISAs rather than any of them with a few
33389         exceptions.
33390         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
33391         processing.
33392         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
33393         bitmasks to be enabled with 3 exceptions, instead of requiring any
33394         enabled ISA with lots of exceptions.
33395         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
33396         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
33397         Change avx512bw in isa attribute to avx512f.
33398         * config/i386/sgxintrin.h: Add license boilerplate.
33399         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
33400         to __AVX512F__ and __AVX512VL to __AVX512VL__.
33401         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
33402         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
33403         defined.
33404         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
33405         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
33406         temporarily sse2 rather than sse if not enabled already.
33408         PR target/83604
33409         * config/i386/sse.md (VI248_VLBW): Rename to ...
33410         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
33411         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
33412         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
33413         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
33414         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
33415         mode iterator instead of VI248_VLBW.
33417 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
33419         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
33420         (record_modified): Skip clobbers; add debug output.
33421         (param_change_prob): Use sreal frequencies.
33423 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
33425         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
33426         punt for user-aligned variables.
33428 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
33430         * tree-chrec.c (chrec_contains_symbols): Return true for
33431         POLY_INT_CST.
33433 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
33435         PR target/82439
33436         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
33437         of (x|y) == x for BICS pattern.
33439 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
33441         PR tree-optimization/83605
33442         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
33443         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
33444         can throw.
33446 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
33448         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
33449         * config/epiphany/rtems.h: New file.
33451 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
33452             Uros Bizjak  <ubizjak@gmail.com>
33454         PR target/83554
33455         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
33456         QIreg_operand instead of register_operand predicate.
33457         * config/i386/i386.c (ix86_rop_should_change_byte_p,
33458         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
33459         comments instead of -fmitigate[-_]rop.
33461 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
33463         PR bootstrap/81926
33464         * cgraphunit.c (symbol_table::compile): Switch to text_section
33465         before calling assembly_start debug hook.
33466         * run-rtl-passes.c (run_rtl_passes): Likewise.
33467         Include output.h.
33469 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
33471         * tree-vrp.c (extract_range_from_binary_expr_1): Check
33472         range_int_cst_p rather than !symbolic_range_p before calling
33473         extract_range_from_multiplicative_op_1.
33475 2018-01-04  Jeff Law  <law@redhat.com>
33477         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
33478         redundant test in assertion.
33480 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
33482         * doc/rtl.texi: Document machine_mode wrapper classes.
33484 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
33486         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
33487         using tree_to_uhwi.
33489 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
33491         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
33492         the VEC_PERM_EXPR fold to fail.
33494 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
33496         PR debug/83585
33497         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
33498         to switched_sections.
33500 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
33502         PR target/83680
33503         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
33504         test for d.testing.
33506 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
33508         PR target/83387
33509         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
33510         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
33512 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
33514         PR debug/83666
33515         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
33516         is BLKmode and bitpos not zero or mode change is needed.
33518 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
33520         PR target/83675
33521         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
33522         TARGET_VIS2.
33524 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
33526         PR target/83628
33527         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
33528         instead of MULT rtx.  Update all corresponding splitters.
33529         (*saddl_se): Ditto.
33530         (*ssub<modesuffix>): Ditto.
33531         (*ssubl_se): Ditto.
33532         (*cmp_sadd_di): Update split patterns.
33533         (*cmp_sadd_si): Ditto.
33534         (*cmp_sadd_sidi): Ditto.
33535         (*cmp_ssub_di): Ditto.
33536         (*cmp_ssub_si): Ditto.
33537         (*cmp_ssub_sidi): Ditto.
33538         * config/alpha/predicates.md (const23_operand): New predicate.
33539         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
33540         Look for ASHIFT, not MULT inner operand.
33541         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
33543 2018-01-04  Martin Liska  <mliska@suse.cz>
33545         PR gcov-profile/83669
33546         * gcov.c (output_intermediate_file): Add version to intermediate
33547         gcov file.
33548         * doc/gcov.texi: Document new field 'version' in intermediate
33549         file format. Fix location of '-k' option of gcov command.
33551 2018-01-04  Martin Liska  <mliska@suse.cz>
33553         PR ipa/82352
33554         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
33556 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
33558         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
33560 2018-01-03  Martin Sebor  <msebor@redhat.com>
33562         PR tree-optimization/83655
33563         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
33564         checking calls with invalid arguments.
33566 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33568         * tree-vect-stmts.c (vect_get_store_rhs): New function.
33569         (vectorizable_mask_load_store): Delete.
33570         (vectorizable_call): Return false for masked loads and stores.
33571         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
33572         instead of gimple_assign_rhs1.
33573         (vectorizable_load): Handle IFN_MASK_LOAD.
33574         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
33576 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33578         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
33579         split out from..,
33580         (vectorizable_mask_load_store): ...here.
33581         (vectorizable_load): ...and here.
33583 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33585         * tree-vect-stmts.c (vect_build_all_ones_mask)
33586         (vect_build_zero_merge_argument): New functions, split out from...
33587         (vectorizable_load): ...here.
33589 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33591         * tree-vect-stmts.c (vect_check_store_rhs): New function,
33592         split out from...
33593         (vectorizable_mask_load_store): ...here.
33594         (vectorizable_store): ...and here.
33596 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33598         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
33599         split out from...
33600         (vectorizable_mask_load_store): ...here.
33602 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33604         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
33605         (vect_model_store_cost): Take a vec_load_store_type instead of a
33606         vect_def_type.
33607         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
33608         (vect_model_store_cost): Take a vec_load_store_type instead of a
33609         vect_def_type.
33610         (vectorizable_mask_load_store): Update accordingly.
33611         (vectorizable_store): Likewise.
33612         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
33614 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33616         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
33617         IFN_MASK_LOAD calls here rather than...
33618         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
33620 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33621             Alan Hayward  <alan.hayward@arm.com>
33622             David Sherwood  <david.sherwood@arm.com>
33624         * expmed.c (extract_bit_field_1): For vector extracts,
33625         fall back to extract_bit_field_as_subreg if vec_extract
33626         isn't available.
33628 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33629             Alan Hayward  <alan.hayward@arm.com>
33630             David Sherwood  <david.sherwood@arm.com>
33632         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
33633         they are variable or constant sized.
33634         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
33635         slots for constant-sized data.
33637 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33638             Alan Hayward  <alan.hayward@arm.com>
33639             David Sherwood  <david.sherwood@arm.com>
33641         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
33642         handling COND_EXPRs with boolean comparisons, try to find a better
33643         basis for the mask type than the boolean itself.
33645 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33647         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
33648         is calculated and how it can be overridden.
33649         * genmodes.c (max_bitsize_mode_any_mode): New variable.
33650         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
33651         if defined.
33652         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
33653         if nonzero.
33655 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33656             Alan Hayward  <alan.hayward@arm.com>
33657             David Sherwood  <david.sherwood@arm.com>
33659         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
33660         Remove the mode argument.
33661         (aarch64_simd_valid_immediate): Remove the mode and inverse
33662         arguments.
33663         * config/aarch64/iterators.md (bitsize): New iterator.
33664         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
33665         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
33666         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
33667         aarch64_simd_valid_immediate.
33668         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
33669         (aarch64_reg_or_bic_imm): Likewise.
33670         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
33671         with an insn_type enum and msl with a modifier_type enum.
33672         Replace element_width with a scalar_mode.  Change the shift
33673         to unsigned int.  Add constructors for scalar_float_mode and
33674         scalar_int_mode elements.
33675         (aarch64_vect_float_const_representable_p): Delete.
33676         (aarch64_can_const_movi_rtx_p)
33677         (aarch64_simd_scalar_immediate_valid_for_move)
33678         (aarch64_simd_make_constant): Update call to
33679         aarch64_simd_valid_immediate.
33680         (aarch64_advsimd_valid_immediate_hs): New function.
33681         (aarch64_advsimd_valid_immediate): Likewise.
33682         (aarch64_simd_valid_immediate): Remove mode and inverse
33683         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
33684         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
33685         and aarch64_float_const_representable_p on the result.
33686         (aarch64_output_simd_mov_immediate): Remove mode argument.
33687         Update call to aarch64_simd_valid_immediate and use of
33688         simd_immediate_info.
33689         (aarch64_output_scalar_simd_mov_immediate): Update call
33690         accordingly.
33692 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33693             Alan Hayward  <alan.hayward@arm.com>
33694             David Sherwood  <david.sherwood@arm.com>
33696         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
33697         (mode_nunits): Likewise CONST_MODE_NUNITS.
33698         * machmode.def (ADJUST_NUNITS): Document.
33699         * genmodes.c (mode_data::need_nunits_adj): New field.
33700         (blank_mode): Update accordingly.
33701         (adj_nunits): New variable.
33702         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
33703         parameter.
33704         (emit_mode_size_inline): Set need_bytesize_adj for all modes
33705         listed in adj_nunits.
33706         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
33707         listed in adj_nunits.  Don't emit case statements for such modes.
33708         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
33709         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
33710         nothing if adj_nunits is nonnull.
33711         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
33712         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
33713         (emit_mode_fbit): Update use of print_maybe_const_decl.
33714         (emit_move_size): Likewise.  Treat the array as non-const
33715         if adj_nunits.
33716         (emit_mode_adjustments): Handle adj_nunits.
33718 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33720         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
33721         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
33722         (VECTOR_MODES): Use it.
33723         (make_vector_modes): Take the prefix as an argument.
33725 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33726             Alan Hayward  <alan.hayward@arm.com>
33727             David Sherwood  <david.sherwood@arm.com>
33729         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
33730         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
33731         for MODE_VECTOR_BOOL.
33732         * machmode.def (VECTOR_BOOL_MODE): Document.
33733         * genmodes.c (VECTOR_BOOL_MODE): New macro.
33734         (make_vector_bool_mode): New function.
33735         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
33736         MODE_VECTOR_BOOL.
33737         * lto-streamer-in.c (lto_input_mode_table): Likewise.
33738         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
33739         Likewise.
33740         * stor-layout.c (int_mode_for_mode): Likewise.
33741         * tree.c (build_vector_type_for_mode): Likewise.
33742         * varasm.c (output_constant_pool_2): Likewise.
33743         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
33744         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
33745         for MODE_VECTOR_BOOL.
33746         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
33747         of mode class checks.
33748         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
33749         instead of a list of mode class checks.
33750         (expand_vector_scalar_condition): Likewise.
33751         (type_for_widest_vector_mode): Handle BImode as an inner mode.
33753 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33754             Alan Hayward  <alan.hayward@arm.com>
33755             David Sherwood  <david.sherwood@arm.com>
33757         * machmode.h (mode_size): Change from unsigned short to
33758         poly_uint16_pod.
33759         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
33760         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
33761         or if measurement_type is not polynomial.
33762         (fixed_size_mode::includes_p): Check for constant-sized modes.
33763         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
33764         return a poly_uint16 rather than an unsigned short.
33765         (emit_mode_size): Change the type of mode_size from unsigned short
33766         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
33767         (emit_mode_adjustments): Cope with polynomial vector sizes.
33768         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
33769         for GET_MODE_SIZE.
33770         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
33771         for GET_MODE_SIZE.
33772         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
33773         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
33774         * caller-save.c (setup_save_areas): Likewise.
33775         (replace_reg_with_saved_mem): Likewise.
33776         * calls.c (emit_library_call_value_1): Likewise.
33777         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
33778         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
33779         (gen_lowpart_for_combine): Likewise.
33780         * convert.c (convert_to_integer_1): Likewise.
33781         * cse.c (equiv_constant, cse_insn): Likewise.
33782         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
33783         (cselib_subst_to_values): Likewise.
33784         * dce.c (word_dce_process_block): Likewise.
33785         * df-problems.c (df_word_lr_mark_ref): Likewise.
33786         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
33787         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
33788         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
33789         (rtl_for_decl_location): Likewise.
33790         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
33791         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
33792         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
33793         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
33794         (expand_expr_real_1): Likewise.
33795         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
33796         (pad_below): Likewise.
33797         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
33798         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
33799         * ira.c (get_subreg_tracking_sizes): Likewise.
33800         * ira-build.c (ira_create_allocno_objects): Likewise.
33801         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
33802         (ira_sort_regnos_for_alter_reg): Likewise.
33803         * ira-costs.c (record_operand_costs): Likewise.
33804         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
33805         (resolve_simple_move): Likewise.
33806         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
33807         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
33808         (lra_constraints): Likewise.
33809         (CONST_POOL_OK_P): Reject variable-sized modes.
33810         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
33811         (add_pseudo_to_slot, lra_spill): Likewise.
33812         * omp-low.c (omp_clause_aligned_alignment): Likewise.
33813         * optabs-query.c (get_best_extraction_insn): Likewise.
33814         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
33815         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
33816         (expand_mult_highpart, valid_multiword_target_p): Likewise.
33817         * recog.c (offsettable_address_addr_space_p): Likewise.
33818         * regcprop.c (maybe_mode_change): Likewise.
33819         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
33820         * regrename.c (build_def_use): Likewise.
33821         * regstat.c (dump_reg_info): Likewise.
33822         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
33823         (find_reloads, find_reloads_subreg_address): Likewise.
33824         * reload1.c (eliminate_regs_1): Likewise.
33825         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
33826         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
33827         (simplify_binary_operation_1, simplify_subreg): Likewise.
33828         * targhooks.c (default_function_arg_padding): Likewise.
33829         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
33830         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
33831         (verify_gimple_assign_ternary): Likewise.
33832         * tree-inline.c (estimate_move_cost): Likewise.
33833         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
33834         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
33835         (get_address_cost_ainc): Likewise.
33836         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
33837         (vect_supportable_dr_alignment): Likewise.
33838         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
33839         (vectorizable_reduction): Likewise.
33840         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
33841         (vectorizable_operation, vectorizable_load): Likewise.
33842         * tree.c (build_same_sized_truth_vector_type): Likewise.
33843         * valtrack.c (cleanup_auto_inc_dec): Likewise.
33844         * var-tracking.c (emit_note_insn_var_location): Likewise.
33845         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
33846         (ADDR_VEC_ALIGN): Likewise.
33848 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33849             Alan Hayward  <alan.hayward@arm.com>
33850             David Sherwood  <david.sherwood@arm.com>
33852         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
33853         unsigned short.
33854         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
33855         or if measurement_type is polynomial.
33856         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
33857         * combine.c (make_extraction): Likewise.
33858         * dse.c (find_shift_sequence): Likewise.
33859         * dwarf2out.c (mem_loc_descriptor): Likewise.
33860         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
33861         (extract_bit_field, extract_low_bits): Likewise.
33862         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
33863         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
33864         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
33865         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
33866         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
33867         * reload.c (find_reloads): Likewise.
33868         * reload1.c (alter_reg): Likewise.
33869         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
33870         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
33871         * tree-if-conv.c (predicate_mem_writes): Likewise.
33872         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
33873         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
33874         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
33875         * valtrack.c (dead_debug_insert_temp): Likewise.
33876         * varasm.c (mergeable_constant_section): Likewise.
33877         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
33879 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33880             Alan Hayward  <alan.hayward@arm.com>
33881             David Sherwood  <david.sherwood@arm.com>
33883         * expr.c (expand_assignment): Cope with polynomial mode sizes
33884         when assigning to a CONCAT.
33886 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33887             Alan Hayward  <alan.hayward@arm.com>
33888             David Sherwood  <david.sherwood@arm.com>
33890         * machmode.h (mode_precision): Change from unsigned short to
33891         poly_uint16_pod.
33892         (mode_to_precision): Return a poly_uint16 rather than an unsigned
33893         short.
33894         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
33895         or if measurement_type is not polynomial.
33896         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
33897         in which the mode is already known to be a scalar_int_mode.
33898         * genmodes.c (emit_mode_precision): Change the type of mode_precision
33899         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
33900         initializer.
33901         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
33902         for GET_MODE_PRECISION.
33903         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
33904         for GET_MODE_PRECISION.
33905         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
33906         as polynomial.
33907         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
33908         (expand_field_assignment, make_extraction): Likewise.
33909         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
33910         (get_last_value): Likewise.
33911         * convert.c (convert_to_integer_1): Likewise.
33912         * cse.c (cse_insn): Likewise.
33913         * expr.c (expand_expr_real_1): Likewise.
33914         * lra-constraints.c (simplify_operand_subreg): Likewise.
33915         * optabs-query.c (can_atomic_load_p): Likewise.
33916         * optabs.c (expand_atomic_load): Likewise.
33917         (expand_atomic_store): Likewise.
33918         * ree.c (combine_reaching_defs): Likewise.
33919         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
33920         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
33921         * tree.h (type_has_mode_precision_p): Likewise.
33922         * ubsan.c (instrument_si_overflow): Likewise.
33924 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33925             Alan Hayward  <alan.hayward@arm.com>
33926             David Sherwood  <david.sherwood@arm.com>
33928         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
33929         polynomial numbers of units.
33930         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
33931         (valid_vector_subparts_p): New function.
33932         (build_vector_type): Remove temporary shim and take the number
33933         of units as a poly_uint64 rather than an int.
33934         (build_opaque_vector_type): Take the number of units as a
33935         poly_uint64 rather than an int.
33936         * tree.c (build_vector_from_ctor): Handle polynomial
33937         TYPE_VECTOR_SUBPARTS.
33938         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
33939         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
33940         (build_vector_from_val): If the number of units is variable,
33941         use build_vec_duplicate_cst for constant operands and
33942         VEC_DUPLICATE_EXPR otherwise.
33943         (make_vector_type): Remove temporary is_constant ().
33944         (build_vector_type, build_opaque_vector_type): Take the number of
33945         units as a poly_uint64 rather than an int.
33946         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
33947         VECTOR_CST_NELTS.
33948         * cfgexpand.c (expand_debug_expr): Likewise.
33949         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
33950         (store_constructor, expand_expr_real_1): Likewise.
33951         (const_scalar_mask_from_tree): Likewise.
33952         * fold-const-call.c (fold_const_reduction): Likewise.
33953         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
33954         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
33955         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
33956         (fold_relational_const): Likewise.
33957         (native_interpret_vector): Likewise.  Change the size from an
33958         int to an unsigned int.
33959         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
33960         TYPE_VECTOR_SUBPARTS.
33961         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
33962         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
33963         duplicating a non-constant operand into a variable-length vector.
33964         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
33965         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
33966         * ipa-icf.c (sem_variable::equals): Likewise.
33967         * match.pd: Likewise.
33968         * omp-simd-clone.c (simd_clone_subparts): Likewise.
33969         * print-tree.c (print_node): Likewise.
33970         * stor-layout.c (layout_type): Likewise.
33971         * targhooks.c (default_builtin_vectorization_cost): Likewise.
33972         * tree-cfg.c (verify_gimple_comparison): Likewise.
33973         (verify_gimple_assign_binary): Likewise.
33974         (verify_gimple_assign_ternary): Likewise.
33975         (verify_gimple_assign_single): Likewise.
33976         * tree-pretty-print.c (dump_generic_node): Likewise.
33977         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
33978         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
33979         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
33980         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
33981         (vect_shift_permute_load_chain): Likewise.
33982         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
33983         (expand_vector_condition, optimize_vector_constructor): Likewise.
33984         (lower_vec_perm, get_compute_type): Likewise.
33985         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
33986         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
33987         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
33988         (vect_recog_mask_conversion_pattern): Likewise.
33989         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
33990         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
33991         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
33992         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
33993         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
33994         (vectorizable_shift, vectorizable_operation, vectorizable_store)
33995         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
33996         (supportable_widening_operation): Likewise.
33997         (supportable_narrowing_operation): Likewise.
33998         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
33999         Likewise.
34000         * varasm.c (output_constant): Likewise.
34002 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34003             Alan Hayward  <alan.hayward@arm.com>
34004             David Sherwood  <david.sherwood@arm.com>
34006         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
34007         so that both the length == 3 and length != 3 cases set up their
34008         own permute vectors.  Add comments explaining why we know the
34009         number of elements is constant.
34010         (vect_permute_load_chain): Likewise.
34012 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34013             Alan Hayward  <alan.hayward@arm.com>
34014             David Sherwood  <david.sherwood@arm.com>
34016         * machmode.h (mode_nunits): Change from unsigned char to
34017         poly_uint16_pod.
34018         (ONLY_FIXED_SIZE_MODES): New macro.
34019         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
34020         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
34021         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
34022         New typedefs.
34023         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
34024         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
34025         or if measurement_type is not polynomial.
34026         * genmodes.c (ZERO_COEFFS): New macro.
34027         (emit_mode_nunits_inline): Make mode_nunits_inline return a
34028         poly_uint16.
34029         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
34030         Use ZERO_COEFFS when emitting initializers.
34031         * data-streamer.h (bp_pack_poly_value): New function.
34032         (bp_unpack_poly_value): Likewise.
34033         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
34034         for GET_MODE_NUNITS.
34035         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
34036         for GET_MODE_NUNITS.
34037         * tree.c (make_vector_type): Remove temporary shim and make
34038         the real function take the number of units as a poly_uint64
34039         rather than an int.
34040         (build_vector_type_for_mode): Handle polynomial nunits.
34041         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
34042         * emit-rtl.c (const_vec_series_p_1): Likewise.
34043         (gen_rtx_CONST_VECTOR): Likewise.
34044         * fold-const.c (test_vec_duplicate_folding): Likewise.
34045         * genrecog.c (validate_pattern): Likewise.
34046         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
34047         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
34048         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
34049         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
34050         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
34051         * rtlanal.c (subreg_get_info): Likewise.
34052         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
34053         (vect_grouped_load_supported): Likewise.
34054         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
34055         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
34056         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
34057         (simplify_const_unary_operation, simplify_binary_operation_1)
34058         (simplify_const_binary_operation, simplify_ternary_operation)
34059         (test_vector_ops_duplicate, test_vector_ops): Likewise.
34060         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
34061         instead of CONST_VECTOR_NUNITS.
34062         * varasm.c (output_constant_pool_2): Likewise.
34063         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
34064         explicit-encoded elements in the XVEC for variable-length vectors.
34066 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34068         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
34070 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34071             Alan Hayward  <alan.hayward@arm.com>
34072             David Sherwood  <david.sherwood@arm.com>
34074         * coretypes.h (fixed_size_mode): Declare.
34075         (fixed_size_mode_pod): New typedef.
34076         * builtins.h (target_builtins::x_apply_args_mode)
34077         (target_builtins::x_apply_result_mode): Change type to
34078         fixed_size_mode_pod.
34079         * builtins.c (apply_args_size, apply_result_size, result_vector)
34080         (expand_builtin_apply_args_1, expand_builtin_apply)
34081         (expand_builtin_return): Update accordingly.
34083 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34085         * cse.c (hash_rtx_cb): Hash only the encoded elements.
34086         * cselib.c (cselib_hash_rtx): Likewise.
34087         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
34088         CONST_VECTOR encoding.
34090 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
34091             Jeff Law  <law@redhat.com>
34093         PR target/83641
34094         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
34095         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
34096         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
34097         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
34099         PR target/83641
34100         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
34101         explicitly probe *sp in a noreturn function if there were any callee
34102         register saves or frame pointer is needed.
34104 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
34106         PR debug/83621
34107         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
34108         BLKmode for ternary, binary or unary expressions.
34110         PR debug/83645
34111         * var-tracking.c (delete_vta_debug_insn): New inline function.
34112         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
34113         insns from get_insns () to NULL instead of each bb separately.
34114         Use delete_vta_debug_insn.  No longer static.
34115         (vt_debug_insns_local, variable_tracking_main_1): Adjust
34116         delete_vta_debug_insns callers.
34117         * rtl.h (delete_vta_debug_insns): Declare.
34118         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
34119         instead of variable_tracking_main.
34121 2018-01-03  Martin Sebor  <msebor@redhat.com>
34123         PR tree-optimization/83603
34124         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
34125         arguments past the endof the argument list in functions declared
34126         without a prototype.
34127         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
34128         Avoid checking when arguments are null.
34130 2018-01-03  Martin Sebor  <msebor@redhat.com>
34132         PR c/83559
34133         * doc/extend.texi (attribute const): Fix a typo.
34134         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
34135         issuing -Wsuggest-attribute for void functions.
34137 2018-01-03  Martin Sebor  <msebor@redhat.com>
34139         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
34140         offset_int::from instead of wide_int::to_shwi.
34141         (maybe_diag_overlap): Remove assertion.
34142         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
34143         * gimple-ssa-sprintf.c (format_directive): Same.
34144         (parse_directive): Same.
34145         (sprintf_dom_walker::compute_format_length): Same.
34146         (try_substitute_return_value): Same.
34148 2018-01-03  Jeff Law  <law@redhat.com>
34150         PR middle-end/83654
34151         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
34152         non-constant residual for zero at runtime and avoid probing in
34153         that case.  Reorganize code for trailing problem to mirror handling
34154         of the residual.
34156 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
34158         PR tree-optimization/83501
34159         * tree-ssa-strlen.c (get_string_cst): New.
34160         (handle_char_store): Call get_string_cst.
34162 2018-01-03  Martin Liska  <mliska@suse.cz>
34164         PR tree-optimization/83593
34165         * tree-ssa-strlen.c: Include tree-cfg.h.
34166         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
34167         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
34168         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
34169         to false.
34170         (strlen_dom_walker::before_dom_children): Call
34171         gimple_purge_dead_eh_edges. Dump tranformation with details
34172         dump flags.
34173         (strlen_dom_walker::before_dom_children): Update call by adding
34174         new argument cleanup_eh.
34175         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
34177 2018-01-03  Martin Liska  <mliska@suse.cz>
34179         PR ipa/83549
34180         * cif-code.def (VARIADIC_THUNK): New enum value.
34181         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
34182         thunks.
34184 2018-01-03  Jan Beulich  <jbeulich@suse.com>
34186         * sse.md (mov<mode>_internal): Tighten condition for when to use
34187         vmovdqu<ssescalarsize> for TI and OI modes.
34189 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
34191         Update copyright years.
34193 2018-01-03  Martin Liska  <mliska@suse.cz>
34195         PR ipa/83594
34196         * ipa-visibility.c (function_and_variable_visibility): Skip
34197         functions with noipa attribure.
34199 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
34201         * gcc.c (process_command): Update copyright notice dates.
34202         * gcov-dump.c (print_version): Ditto.
34203         * gcov.c (print_version): Ditto.
34204         * gcov-tool.c (print_version): Ditto.
34205         * gengtype.c (create_file): Ditto.
34206         * doc/cpp.texi: Bump @copying's copyright year.
34207         * doc/cppinternals.texi: Ditto.
34208         * doc/gcc.texi: Ditto.
34209         * doc/gccint.texi: Ditto.
34210         * doc/gcov.texi: Ditto.
34211         * doc/install.texi: Ditto.
34212         * doc/invoke.texi: Ditto.
34214 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34216         * vector-builder.h (vector_builder::m_full_nelts): Change from
34217         unsigned int to poly_uint64.
34218         (vector_builder::full_nelts): Update prototype accordingly.
34219         (vector_builder::new_vector): Likewise.
34220         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
34221         (vector_builder::operator ==): Likewise.
34222         (vector_builder::finalize): Likewise.
34223         * int-vector-builder.h (int_vector_builder::int_vector_builder):
34224         Take the number of elements as a poly_uint64 rather than an
34225         unsigned int.
34226         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
34227         from unsigned int to poly_uint64.
34228         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
34229         (vec_perm_indices::new_vector): Likewise.
34230         (vec_perm_indices::length): Likewise.
34231         (vec_perm_indices::nelts_per_input): Likewise.
34232         (vec_perm_indices::input_nelts): Likewise.
34233         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
34234         number of elements per input as a poly_uint64 rather than an
34235         unsigned int.  Use the original encoding for variable-length
34236         vectors, rather than clamping each individual element.
34237         For the second and subsequent elements in each pattern,
34238         clamp the step and base before clamping their sum.
34239         (vec_perm_indices::series_p): Handle polynomial element counts.
34240         (vec_perm_indices::all_in_range_p): Likewise.
34241         (vec_perm_indices_to_tree): Likewise.
34242         (vec_perm_indices_to_rtx): Likewise.
34243         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
34244         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
34245         (tree_vector_builder::new_binary_operation): Handle polynomial
34246         element counts.  Return false if we need to know the number
34247         of elements at compile time.
34248         * fold-const.c (fold_vec_perm): Punt if the number of elements
34249         isn't known at compile time.
34251 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34253         * vec-perm-indices.h (vec_perm_builder): Change element type
34254         from HOST_WIDE_INT to poly_int64.
34255         (vec_perm_indices::element_type): Update accordingly.
34256         (vec_perm_indices::clamp): Handle polynomial element_types.
34257         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
34258         (vec_perm_indices::all_in_range_p): Likewise.
34259         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
34260         than shwi trees.
34261         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
34262         polynomial vec_perm_indices element types.
34263         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
34264         * fold-const.c (fold_vec_perm): Likewise.
34265         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
34266         * tree-vect-generic.c (lower_vec_perm): Likewise.
34267         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
34268         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
34269         element type to HOST_WIDE_INT.
34271 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34272             Alan Hayward  <alan.hayward@arm.com>
34273             David Sherwood  <david.sherwood@arm.com>
34275         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
34276         rather than an int.  Use plus_constant.
34277         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
34278         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
34280 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34281             Alan Hayward  <alan.hayward@arm.com>
34282             David Sherwood  <david.sherwood@arm.com>
34284         * calls.c (emit_call_1, expand_call): Change struct_value_size from
34285         a HOST_WIDE_INT to a poly_int64.
34287 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34288             Alan Hayward  <alan.hayward@arm.com>
34289             David Sherwood  <david.sherwood@arm.com>
34291         * calls.c (load_register_parameters): Cope with polynomial
34292         mode sizes.  Require a constant size for BLKmode parameters
34293         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
34294         forces a parameter to be padded at the lsb end in order to
34295         fill a complete number of words, require the parameter size
34296         to be ordered wrt UNITS_PER_WORD.
34298 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34299             Alan Hayward  <alan.hayward@arm.com>
34300             David Sherwood  <david.sherwood@arm.com>
34302         * reload1.c (spill_stack_slot_width): Change element type
34303         from unsigned int to poly_uint64_pod.
34304         (alter_reg): Treat mode sizes as polynomial.
34306 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34307             Alan Hayward  <alan.hayward@arm.com>
34308             David Sherwood  <david.sherwood@arm.com>
34310         * reload.c (complex_word_subreg_p): New function.
34311         (reload_inner_reg_of_subreg, push_reload): Use it.
34313 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34314             Alan Hayward  <alan.hayward@arm.com>
34315             David Sherwood  <david.sherwood@arm.com>
34317         * lra-constraints.c (process_alt_operands): Reject matched
34318         operands whose sizes aren't ordered.
34319         (match_reload): Refer to this check here.
34321 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34322             Alan Hayward  <alan.hayward@arm.com>
34323             David Sherwood  <david.sherwood@arm.com>
34325         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
34326         that the mode size is in the set {1, 2, 4, 8, 16}.
34328 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34329             Alan Hayward  <alan.hayward@arm.com>
34330             David Sherwood  <david.sherwood@arm.com>
34332         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
34333         Use plus_constant instead of gen_rtx_PLUS.
34335 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34336             Alan Hayward  <alan.hayward@arm.com>
34337             David Sherwood  <david.sherwood@arm.com>
34339         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
34340         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
34341         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
34342         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
34343         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
34344         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
34345         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
34346         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
34347         * config/i386/i386.c (ix86_push_rounding): ...this new function.
34348         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
34349         a poly_int64.
34350         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
34351         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
34352         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
34353         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
34354         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
34355         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
34356         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
34357         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
34358         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
34359         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
34360         function.
34361         * expr.c (emit_move_resolve_push): Treat the input and result
34362         of PUSH_ROUNDING as a poly_int64.
34363         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
34364         (emit_push_insn): Likewise.
34365         * lra-eliminations.c (mark_not_eliminable): Likewise.
34366         * recog.c (push_operand): Likewise.
34367         * reload1.c (elimination_effects): Likewise.
34368         * rtlanal.c (nonzero_bits1): Likewise.
34369         * calls.c (store_one_arg): Likewise.  Require the padding to be
34370         known at compile time.
34372 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34373             Alan Hayward  <alan.hayward@arm.com>
34374             David Sherwood  <david.sherwood@arm.com>
34376         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
34377         Use plus_constant instead of gen_rtx_PLUS.
34379 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34380             Alan Hayward  <alan.hayward@arm.com>
34381             David Sherwood  <david.sherwood@arm.com>
34383         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
34384         rather than an int.
34386 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34387             Alan Hayward  <alan.hayward@arm.com>
34388             David Sherwood  <david.sherwood@arm.com>
34390         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
34391         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
34392         via stack temporaries.  Treat the mode size as polynomial too.
34394 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34395             Alan Hayward  <alan.hayward@arm.com>
34396             David Sherwood  <david.sherwood@arm.com>
34398         * expr.c (expand_expr_real_2): When handling conversions involving
34399         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
34400         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
34401         as a poly_uint64 too.
34403 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34404             Alan Hayward  <alan.hayward@arm.com>
34405             David Sherwood  <david.sherwood@arm.com>
34407         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
34409 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34410             Alan Hayward  <alan.hayward@arm.com>
34411             David Sherwood  <david.sherwood@arm.com>
34413         * combine.c (can_change_dest_mode): Handle polynomial
34414         REGMODE_NATURAL_SIZE.
34415         * expmed.c (store_bit_field_1): Likewise.
34416         * expr.c (store_constructor): Likewise.
34417         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
34418         and polynomial REGMODE_NATURAL_SIZE.
34419         (gen_lowpart_common): Likewise.
34420         * reginfo.c (record_subregs_of_mode): Likewise.
34421         * rtlanal.c (read_modify_subreg_p): Likewise.
34423 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34424             Alan Hayward  <alan.hayward@arm.com>
34425             David Sherwood  <david.sherwood@arm.com>
34427         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
34428         numbers of elements.
34430 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34431             Alan Hayward  <alan.hayward@arm.com>
34432             David Sherwood  <david.sherwood@arm.com>
34434         * match.pd: Cope with polynomial numbers of vector elements.
34436 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34437             Alan Hayward  <alan.hayward@arm.com>
34438             David Sherwood  <david.sherwood@arm.com>
34440         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
34441         in a POINTER_PLUS_EXPR.
34443 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34444             Alan Hayward  <alan.hayward@arm.com>
34445             David Sherwood  <david.sherwood@arm.com>
34447         * omp-simd-clone.c (simd_clone_subparts): New function.
34448         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
34449         (ipa_simd_modify_function_body): Likewise.
34451 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34452             Alan Hayward  <alan.hayward@arm.com>
34453             David Sherwood  <david.sherwood@arm.com>
34455         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
34456         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
34457         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
34458         (expand_vector_condition, vector_element): Likewise.
34459         (subparts_gt): New function.
34460         (get_compute_type): Use subparts_gt.
34461         (count_type_subparts): Delete.
34462         (expand_vector_operations_1): Use subparts_gt instead of
34463         count_type_subparts.
34465 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34466             Alan Hayward  <alan.hayward@arm.com>
34467             David Sherwood  <david.sherwood@arm.com>
34469         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
34470         (vect_compile_time_alias): ...this new function.  Do the calculation
34471         on poly_ints rather than trees.
34472         (vect_prune_runtime_alias_test_list): Update call accordingly.
34474 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34475             Alan Hayward  <alan.hayward@arm.com>
34476             David Sherwood  <david.sherwood@arm.com>
34478         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
34479         numbers of units.
34480         (vect_schedule_slp_instance): Likewise.
34482 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34483             Alan Hayward  <alan.hayward@arm.com>
34484             David Sherwood  <david.sherwood@arm.com>
34486         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
34487         constant and extern definitions for variable-length vectors.
34488         (vect_get_constant_vectors): Note that the number of units
34489         is known to be constant.
34491 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34492             Alan Hayward  <alan.hayward@arm.com>
34493             David Sherwood  <david.sherwood@arm.com>
34495         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
34496         of units as polynomial.  Choose between WIDE and NARROW based
34497         on multiple_p.
34499 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34500             Alan Hayward  <alan.hayward@arm.com>
34501             David Sherwood  <david.sherwood@arm.com>
34503         * tree-vect-stmts.c (simd_clone_subparts): New function.
34504         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
34506 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34507             Alan Hayward  <alan.hayward@arm.com>
34508             David Sherwood  <david.sherwood@arm.com>
34510         * tree-vect-stmts.c (vectorizable_call): Treat the number of
34511         vectors as polynomial.  Use build_index_vector for
34512         IFN_GOMP_SIMD_LANE.
34514 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34515             Alan Hayward  <alan.hayward@arm.com>
34516             David Sherwood  <david.sherwood@arm.com>
34518         * tree-vect-stmts.c (get_load_store_type): Treat the number of
34519         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
34520         for variable-length vectors.
34521         (vectorizable_mask_load_store): Treat the number of units as
34522         polynomial, asserting that it is constant if the condition has
34523         already been enforced.
34524         (vectorizable_store, vectorizable_load): Likewise.
34526 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34527             Alan Hayward  <alan.hayward@arm.com>
34528             David Sherwood  <david.sherwood@arm.com>
34530         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
34531         of units as polynomial.  Punt if we can't tell at compile time
34532         which vector contains the final result.
34534 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34535             Alan Hayward  <alan.hayward@arm.com>
34536             David Sherwood  <david.sherwood@arm.com>
34538         * tree-vect-loop.c (vectorizable_induction): Treat the number
34539         of units as polynomial.  Punt on SLP inductions.  Use an integer
34540         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
34541         cast of such a series for variable-length floating-point
34542         reductions.
34544 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34545             Alan Hayward  <alan.hayward@arm.com>
34546             David Sherwood  <david.sherwood@arm.com>
34548         * tree.h (build_index_vector): Declare.
34549         * tree.c (build_index_vector): New function.
34550         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
34551         of units as polynomial, forcibly converting it to a constant if
34552         vectorizable_reduction has already enforced the condition.
34553         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
34554         to create a {1,2,3,...} vector.
34555         (vectorizable_reduction): Treat the number of units as polynomial.
34556         Choose vectype_in based on the largest scalar element size rather
34557         than the smallest number of units.  Enforce the restrictions
34558         relied on above.
34560 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34561             Alan Hayward  <alan.hayward@arm.com>
34562             David Sherwood  <david.sherwood@arm.com>
34564         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
34565         number of units as polynomial.
34567 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34568             Alan Hayward  <alan.hayward@arm.com>
34569             David Sherwood  <david.sherwood@arm.com>
34571         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
34572         * target.def (autovectorize_vector_sizes): Return the vector sizes
34573         by pointer, using vector_sizes rather than a bitmask.
34574         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
34575         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
34576         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
34577         Likewise.
34578         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
34579         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
34580         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
34581         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
34582         * omp-general.c (omp_max_vf): Likewise.
34583         * omp-low.c (omp_clause_aligned_alignment): Likewise.
34584         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
34585         * tree-vect-loop.c (vect_analyze_loop): Likewise.
34586         * tree-vect-slp.c (vect_slp_bb): Likewise.
34587         * doc/tm.texi: Regenerate.
34588         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
34589         to a poly_uint64.
34590         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
34591         the vector size as a poly_uint64 rather than an unsigned int.
34592         (current_vector_size): Change from an unsigned int to a poly_uint64.
34593         (get_vectype_for_scalar_type): Update accordingly.
34594         * tree.h (build_truth_vector_type): Take the size and number of
34595         units as a poly_uint64 rather than an unsigned int.
34596         (build_vector_type): Add a temporary overload that takes
34597         the number of units as a poly_uint64 rather than an unsigned int.
34598         * tree.c (make_vector_type): Likewise.
34599         (build_truth_vector_type): Take the number of units as a poly_uint64
34600         rather than an unsigned int.
34602 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34603             Alan Hayward  <alan.hayward@arm.com>
34604             David Sherwood  <david.sherwood@arm.com>
34606         * target.def (get_mask_mode): Take the number of units and length
34607         as poly_uint64s rather than unsigned ints.
34608         * targhooks.h (default_get_mask_mode): Update accordingly.
34609         * targhooks.c (default_get_mask_mode): Likewise.
34610         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
34611         * doc/tm.texi: Regenerate.
34613 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34614             Alan Hayward  <alan.hayward@arm.com>
34615             David Sherwood  <david.sherwood@arm.com>
34617         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
34618         * omp-general.c (omp_max_vf): Likewise.
34619         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
34620         (expand_omp_simd): Handle polynomial safelen.
34621         * omp-low.c (omplow_simd_context): Add a default constructor.
34622         (omplow_simd_context::max_vf): Change from int to poly_uint64.
34623         (lower_rec_simd_input_clauses): Update accordingly.
34624         (lower_rec_input_clauses): Likewise.
34626 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34627             Alan Hayward  <alan.hayward@arm.com>
34628             David Sherwood  <david.sherwood@arm.com>
34630         * tree-vectorizer.h (vect_nunits_for_cost): New function.
34631         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
34632         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
34633         (vect_analyze_slp_cost): Likewise.
34634         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
34635         (vect_model_load_cost): Likewise.
34637 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34638             Alan Hayward  <alan.hayward@arm.com>
34639             David Sherwood  <david.sherwood@arm.com>
34641         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
34642         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
34643         from an unsigned int * to a poly_uint64_pod *.
34644         (calculate_unrolling_factor): New function.
34645         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
34647 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34648             Alan Hayward  <alan.hayward@arm.com>
34649             David Sherwood  <david.sherwood@arm.com>
34651         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
34652         from an unsigned int to a poly_uint64.
34653         (_loop_vec_info::slp_unrolling_factor): Likewise.
34654         (_loop_vec_info::vectorization_factor): Change from an int
34655         to a poly_uint64.
34656         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
34657         (vect_get_num_vectors): New function.
34658         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
34659         (vect_get_num_copies): Use vect_get_num_vectors.
34660         (vect_analyze_data_ref_dependences): Change max_vf from an int *
34661         to an unsigned int *.
34662         (vect_analyze_data_refs): Change min_vf from an int * to a
34663         poly_uint64 *.
34664         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
34665         than an unsigned HOST_WIDE_INT.
34666         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
34667         (vect_analyze_data_ref_dependence): Change max_vf from an int *
34668         to an unsigned int *.
34669         (vect_analyze_data_ref_dependences): Likewise.
34670         (vect_compute_data_ref_alignment): Handle polynomial vf.
34671         (vect_enhance_data_refs_alignment): Likewise.
34672         (vect_prune_runtime_alias_test_list): Likewise.
34673         (vect_shift_permute_load_chain): Likewise.
34674         (vect_supportable_dr_alignment): Likewise.
34675         (dependence_distance_ge_vf): Take the vectorization factor as a
34676         poly_uint64 rather than an unsigned HOST_WIDE_INT.
34677         (vect_analyze_data_refs): Change min_vf from an int * to a
34678         poly_uint64 *.
34679         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
34680         vfm1 as a poly_uint64 rather than an int.  Make the same change
34681         for the returned bound_scalar.
34682         (vect_gen_vector_loop_niters): Handle polynomial vf.
34683         (vect_do_peeling): Likewise.  Update call to
34684         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
34685         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
34686         be constant.
34687         * tree-vect-loop.c (vect_determine_vectorization_factor)
34688         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
34689         (vect_get_known_peeling_cost): Likewise.
34690         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
34691         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
34692         (vect_transform_loop): Likewise.  Use the lowest possible VF when
34693         updating the upper bounds of the loop.
34694         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
34695         rather than an int.
34696         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
34697         polynomial unroll factors.
34698         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
34699         (vect_make_slp_decision): Likewise.
34700         (vect_supported_load_permutation_p): Likewise, and polynomial
34701         vf too.
34702         (vect_analyze_slp_cost): Handle polynomial vf.
34703         (vect_slp_analyze_node_operations): Likewise.
34704         (vect_slp_analyze_bb_1): Likewise.
34705         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
34706         than an unsigned HOST_WIDE_INT.
34707         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
34708         (vectorizable_load): Handle polynomial vf.
34709         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
34710         a poly_uint64.
34711         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
34713 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34714             Alan Hayward  <alan.hayward@arm.com>
34715             David Sherwood  <david.sherwood@arm.com>
34717         * match.pd: Handle bit operations involving three constants
34718         and try to fold one pair.
34720 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34722         * tree-vect-loop-manip.c: Include gimple-fold.h.
34723         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
34724         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
34725         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
34726         Add a path that uses a step of VF instead of 1, but disable it
34727         for now.
34728         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
34729         and niters_no_overflow parameters.  Update calls to
34730         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
34731         Create a new SSA name if the latter choses to use a ste other
34732         than zero, and return it via niters_vector_mult_vf_var.
34733         * tree-vect-loop.c (vect_transform_loop): Update calls to
34734         vect_do_peeling, vect_gen_vector_loop_niters and
34735         slpeel_make_loop_iterate_ntimes.
34736         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
34737         (vect_gen_vector_loop_niters): Update declarations after above changes.
34739 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
34741         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
34742         128-bit round to integer instructions.
34743         (ceil<mode>2): Likewise.
34744         (btrunc<mode>2): Likewise.
34745         (round<mode>2): Likewise.
34747 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
34749         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
34750         unaligned VSX load/store on P8/P9.
34751         (expand_block_clear): Allow the use of unaligned VSX
34752         load/store on P8/P9.
34754 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
34756         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
34757         New function.
34758         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
34759         swap associated with both a load and a store.
34761 2018-01-02  Andrew Waterman  <andrew@sifive.com>
34763         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
34764         * config/riscv/riscv.md (clear_cache): Use it.
34766 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
34768         * web.c: Remove out-of-date comment.
34770 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34772         * expr.c (fixup_args_size_notes): Check that any existing
34773         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
34774         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
34775         (emit_single_push_insn): ...here.
34777 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34779         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
34780         (const_vector_encoded_nelts): New function.
34781         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
34782         (const_vector_int_elt, const_vector_elt): Declare.
34783         * emit-rtl.c (const_vector_int_elt_1): New function.
34784         (const_vector_elt): Likewise.
34785         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
34786         of CONST_VECTOR_ELT.
34788 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34790         * expr.c: Include rtx-vector-builder.h.
34791         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
34792         directly on the tree encoding.
34793         (const_vector_from_tree): Likewise.
34794         * optabs.c: Include rtx-vector-builder.h.
34795         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
34796         sequence of "u" values.
34797         * vec-perm-indices.c: Include rtx-vector-builder.h.
34798         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
34799         directly on the vec_perm_indices encoding.
34801 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34803         * doc/rtl.texi (const_vector): Describe new encoding scheme.
34804         * Makefile.in (OBJS): Add rtx-vector-builder.o.
34805         * rtx-vector-builder.h: New file.
34806         * rtx-vector-builder.c: Likewise.
34807         * rtl.h (rtx_def::u2): Add a const_vector field.
34808         (CONST_VECTOR_NPATTERNS): New macro.
34809         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
34810         (CONST_VECTOR_DUPLICATE_P): Likewise.
34811         (CONST_VECTOR_STEPPED_P): Likewise.
34812         (CONST_VECTOR_ENCODED_ELT): Likewise.
34813         (const_vec_duplicate_p): Check for a duplicated vector encoding.
34814         (unwrap_const_vec_duplicate): Likewise.
34815         (const_vec_series_p): Check for a non-duplicated vector encoding.
34816         Say that the function only returns true for integer vectors.
34817         * emit-rtl.c: Include rtx-vector-builder.h.
34818         (gen_const_vec_duplicate_1): Delete.
34819         (gen_const_vector): Call gen_const_vec_duplicate instead of
34820         gen_const_vec_duplicate_1.
34821         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
34822         (gen_const_vec_duplicate): Use rtx_vector_builder.
34823         (gen_const_vec_series): Likewise.
34824         (gen_rtx_CONST_VECTOR): Likewise.
34825         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
34826         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
34827         Build a new vector rather than modifying a CONST_VECTOR in-place.
34828         (handle_special_swappables): Update call accordingly.
34829         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
34830         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
34831         Build a new vector rather than modifying a CONST_VECTOR in-place.
34832         (handle_special_swappables): Update call accordingly.
34834 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34836         * simplify-rtx.c (simplify_const_binary_operation): Use
34837         CONST_VECTOR_ELT instead of XVECEXP.
34839 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34841         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
34842         the selector elements to be different from the data elements
34843         if the selector is a VECTOR_CST.
34844         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
34845         ssizetype for the selector.
34847 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34849         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
34850         before testing each element individually.
34851         * tree-vect-generic.c (lower_vec_perm): Likewise.
34853 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34855         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
34856         * selftest-run-tests.c (selftest::run_tests): Call it.
34857         * vector-builder.h (vector_builder::operator ==): New function.
34858         (vector_builder::operator !=): Likewise.
34859         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
34860         (vec_perm_indices::all_from_input_p): New function.
34861         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
34862         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
34863         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
34864         instead of reading the VECTOR_CST directly.  Detect whether both
34865         vector inputs are the same before constructing the vec_perm_indices,
34866         and update the number of inputs argument accordingly.  Use the
34867         utility functions added above.  Only construct sel2 if we need to.
34869 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34871         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
34872         the broadcast of the low byte.
34873         (expand_mult_highpart): Use an explicit encoding for the permutes.
34874         * optabs-query.c (can_mult_highpart_p): Likewise.
34875         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
34876         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
34877         (vectorizable_bswap): Likewise.
34878         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
34879         explicit encoding for the power-of-2 permutes.
34880         (vect_permute_store_chain): Likewise.
34881         (vect_grouped_load_supported): Likewise.
34882         (vect_permute_load_chain): Likewise.
34884 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34886         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
34887         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
34888         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
34889         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
34890         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
34891         (vect_gen_perm_mask_any): Likewise.
34893 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34895         * int-vector-builder.h: New file.
34896         * vec-perm-indices.h: Include int-vector-builder.h.
34897         (vec_perm_indices): Redefine as an int_vector_builder.
34898         (auto_vec_perm_indices): Delete.
34899         (vec_perm_builder): Redefine as a stand-alone class.
34900         (vec_perm_indices::vec_perm_indices): New function.
34901         (vec_perm_indices::clamp): Likewise.
34902         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
34903         (vec_perm_indices::new_vector): New function.
34904         (vec_perm_indices::new_expanded_vector): Update for new
34905         vec_perm_indices class.
34906         (vec_perm_indices::rotate_inputs): New function.
34907         (vec_perm_indices::all_in_range_p): Operate directly on the
34908         encoded form, without computing elided elements.
34909         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
34910         encoding.  Update for new vec_perm_indices class.
34911         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
34912         the given vec_perm_builder.
34913         (expand_vec_perm_var): Update vec_perm_builder constructor.
34914         (expand_mult_highpart): Use vec_perm_builder instead of
34915         auto_vec_perm_indices.
34916         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
34917         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
34918         or double series encoding as appropriate.
34919         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
34920         vec_perm_indices instead of auto_vec_perm_indices.
34921         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
34922         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
34923         (vect_permute_store_chain): Likewise.
34924         (vect_grouped_load_supported): Likewise.
34925         (vect_permute_load_chain): Likewise.
34926         (vect_shift_permute_load_chain): Likewise.
34927         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
34928         (vect_transform_slp_perm_load): Likewise.
34929         (vect_schedule_slp_instance): Likewise.
34930         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
34931         (vectorizable_mask_load_store): Likewise.
34932         (vectorizable_bswap): Likewise.
34933         (vectorizable_store): Likewise.
34934         (vectorizable_load): Likewise.
34935         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
34936         vec_perm_indices instead of auto_vec_perm_indices.  Use
34937         tree_to_vec_perm_builder to read the vector from a tree.
34938         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
34939         vec_perm_builder instead of a vec_perm_indices.
34940         (have_whole_vector_shift): Use vec_perm_builder and
34941         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
34942         truncation to calc_vec_perm_mask_for_shift.
34943         (vect_create_epilog_for_reduction): Likewise.
34944         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
34945         from auto_vec_perm_indices to vec_perm_indices.
34946         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
34947         instead of changing individual elements.
34948         (aarch64_vectorize_vec_perm_const): Use new_vector to install
34949         the vector in d.perm.
34950         * config/arm/arm.c (expand_vec_perm_d::perm): Change
34951         from auto_vec_perm_indices to vec_perm_indices.
34952         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
34953         instead of changing individual elements.
34954         (arm_vectorize_vec_perm_const): Use new_vector to install
34955         the vector in d.perm.
34956         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
34957         Update vec_perm_builder constructor.
34958         (rs6000_expand_interleave): Likewise.
34959         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
34960         (rs6000_expand_interleave): Likewise.
34962 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34964         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
34965         to qimode could truncate the indices.
34966         * optabs.c (expand_vec_perm_var): Likewise.
34968 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34970         * Makefile.in (OBJS): Add vec-perm-indices.o.
34971         * vec-perm-indices.h: New file.
34972         * vec-perm-indices.c: Likewise.
34973         * target.h (vec_perm_indices): Replace with a forward class
34974         declaration.
34975         (auto_vec_perm_indices): Move to vec-perm-indices.h.
34976         * optabs.h: Include vec-perm-indices.h.
34977         (expand_vec_perm): Delete.
34978         (selector_fits_mode_p, expand_vec_perm_var): Declare.
34979         (expand_vec_perm_const): Declare.
34980         * target.def (vec_perm_const_ok): Replace with...
34981         (vec_perm_const): ...this new hook.
34982         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
34983         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
34984         * doc/tm.texi: Regenerate.
34985         * optabs.def (vec_perm_const): Delete.
34986         * doc/md.texi (vec_perm_const): Likewise.
34987         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
34988         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
34989         expand_vec_perm for constant permutation vectors.  Assert that
34990         the mode of variable permutation vectors is the integer equivalent
34991         of the mode that is being permuted.
34992         * optabs-query.h (selector_fits_mode_p): Declare.
34993         * optabs-query.c: Include vec-perm-indices.h.
34994         (selector_fits_mode_p): New function.
34995         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
34996         is defined, instead of checking whether the vec_perm_const_optab
34997         exists.  Use targetm.vectorize.vec_perm_const instead of
34998         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
34999         fit in the vector mode before using a variable permute.
35000         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
35001         vec_perm_indices instead of an rtx.
35002         (expand_vec_perm): Replace with...
35003         (expand_vec_perm_const): ...this new function.  Take the selector
35004         as a vec_perm_indices rather than an rtx.  Also take the mode of
35005         the selector.  Update call to shift_amt_for_vec_perm_mask.
35006         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
35007         Use vec_perm_indices::new_expanded_vector to expand the original
35008         selector into bytes.  Check whether the indices fit in the vector
35009         mode before using a variable permute.
35010         (expand_vec_perm_var): Make global.
35011         (expand_mult_highpart): Use expand_vec_perm_const.
35012         * fold-const.c: Includes vec-perm-indices.h.
35013         * tree-ssa-forwprop.c: Likewise.
35014         * tree-vect-data-refs.c: Likewise.
35015         * tree-vect-generic.c: Likewise.
35016         * tree-vect-loop.c: Likewise.
35017         * tree-vect-slp.c: Likewise.
35018         * tree-vect-stmts.c: Likewise.
35019         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
35020         Delete.
35021         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
35022         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
35023         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
35024         (aarch64_vectorize_vec_perm_const): ...this new function.
35025         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
35026         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
35027         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
35028         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
35029         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
35030         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
35031         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
35032         into...
35033         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
35034         check for NEON modes.
35035         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
35036         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
35037         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
35038         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
35039         into...
35040         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
35041         the old VEC_PERM_CONST conditions.
35042         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
35043         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
35044         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
35045         (ia64_vectorize_vec_perm_const_ok): Merge into...
35046         (ia64_vectorize_vec_perm_const): ...this new function.
35047         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
35048         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
35049         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
35050         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
35051         * config/mips/mips.c (mips_expand_vec_perm_const)
35052         (mips_vectorize_vec_perm_const_ok): Merge into...
35053         (mips_vectorize_vec_perm_const): ...this new function.
35054         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
35055         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
35056         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
35057         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
35058         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
35059         (rs6000_expand_vec_perm_const): Delete.
35060         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
35061         Delete.
35062         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
35063         (altivec_expand_vec_perm_const_le): Take each operand individually.
35064         Operate on constant selectors rather than rtxes.
35065         (altivec_expand_vec_perm_const): Likewise.  Update call to
35066         altivec_expand_vec_perm_const_le.
35067         (rs6000_expand_vec_perm_const): Delete.
35068         (rs6000_vectorize_vec_perm_const_ok): Delete.
35069         (rs6000_vectorize_vec_perm_const): New function.
35070         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
35071         an element count and rtx array.
35072         (rs6000_expand_extract_even): Update call accordingly.
35073         (rs6000_expand_interleave): Likewise.
35074         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
35075         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
35076         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
35077         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
35078         (rs6000_expand_vec_perm_const): Delete.
35079         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
35080         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
35081         (altivec_expand_vec_perm_const_le): Take each operand individually.
35082         Operate on constant selectors rather than rtxes.
35083         (altivec_expand_vec_perm_const): Likewise.  Update call to
35084         altivec_expand_vec_perm_const_le.
35085         (rs6000_expand_vec_perm_const): Delete.
35086         (rs6000_vectorize_vec_perm_const_ok): Delete.
35087         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
35088         reference to the SPE evmerge intructions.
35089         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
35090         an element count and rtx array.
35091         (rs6000_expand_extract_even): Update call accordingly.
35092         (rs6000_expand_interleave): Likewise.
35093         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
35094         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
35095         new function.
35096         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
35098 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
35100         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
35101         vector mode and that that mode matches the mode of the data
35102         being permuted.
35103         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
35104         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
35105         directly using expand_vec_perm_1 when forcing selectors into
35106         registers.
35107         (expand_vec_perm_var): New function, split out from expand_vec_perm.
35109 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
35111         * optabs-query.h (can_vec_perm_p): Delete.
35112         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
35113         * optabs-query.c (can_vec_perm_p): Split into...
35114         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
35115         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
35116         particular selector is valid.
35117         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
35118         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
35119         (vect_grouped_load_supported): Likewise.
35120         (vect_shift_permute_load_chain): Likewise.
35121         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
35122         (vect_transform_slp_perm_load): Likewise.
35123         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
35124         (vectorizable_bswap): Likewise.
35125         (vect_gen_perm_mask_checked): Likewise.
35126         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
35127         implementations of variable permutation vectors into account
35128         when deciding which selector to use.
35129         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
35130         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
35131         with a false third argument.
35132         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
35133         to test whether the constant selector is valid and can_vec_perm_var_p
35134         to test whether a variable selector is valid.
35136 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
35138         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
35139         * optabs-query.c (can_vec_perm_p): Likewise.
35140         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
35141         instead of vec_perm_indices.
35142         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
35143         (vect_gen_perm_mask_checked): Likewise,
35144         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
35145         (vect_gen_perm_mask_checked): Likewise,
35147 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
35149         * optabs-query.h (qimode_for_vec_perm): Declare.
35150         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
35151         (qimode_for_vec_perm): ...this new function.
35152         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
35154 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
35156         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
35157         does not have a conditional at the top.
35159 2018-01-02  Richard Biener  <rguenther@suse.de>
35161         * ipa-inline.c (big_speedup_p): Fix expression.
35163 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
35165         PR target/81616
35166         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
35167         for generic 4->6.
35169 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
35171         PR target/81616
35172         Generic tuning.
35173         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
35174         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
35175         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
35176         cond_taken_branch_cost 3->4.
35178 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
35180         PR tree-optimization/83581
35181         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
35182         TODO_cleanup_cfg if any changes have been made.
35184         PR middle-end/83608
35185         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
35186         convert_modes if target mode has the right side, but different mode
35187         class.
35189         PR middle-end/83609
35190         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
35191         last argument when extracting from CONCAT.  If either from_real or
35192         from_imag is NULL, use expansion through memory.  If result is not
35193         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
35194         the parts directly to inner mode, if even that fails, use expansion
35195         through memory.
35197         PR middle-end/83623
35198         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
35199         check for bswap in mode rather than HImode and use that in expand_unop
35200         too.
35202 Copyright (C) 2018 Free Software Foundation, Inc.
35204 Copying and distribution of this file, with or without modification,
35205 are permitted in any medium without royalty provided the copyright
35206 notice and this notice are preserved.