gimple-ssa-evrp-analyze.h (class evrp_range_analyzer): Add m_update_global_ranges...
[official-gcc.git] / gcc / ChangeLog
blob9ee432d2260489705dfa0a67f766111d5b75637b
1 2018-12-07  Jeff Law  <law@redhat.com>
3         PR middle-end/87813
4         * gimple-ssa-evrp-analyze.h (class evrp_range_analyzer): Add
5         m_update_global_ranges member.  Add corresponding argument to ctor.
6         * gimple-ssa-evrp-analyze.c
7         (evrp_range_analyzer::evrp_range_analyzer): Add new argument and
8         initialize m_update_global_ranges.
9         (evrp_range_analyzer::set_ssa_range_info): Assert that we are
10         updating global ranges.
11         (evrp_range_analyzer::record_ranges_from_incoming_edge): Only
12         update global ranges if explicitly requested.
13         (evrp_range_analyzer::record_ranges_from_phis): Similarly.
14         (evrp_range_analyzer::record_ranges_from_stmt): Similarly.
15         * gimple-ssa-evrp.c (evrp_dom_walker): Pass new argument to
16         evrp_range_analyzer ctor.
17         * gimple-ssa-sprintf.c (sprintf_dom_walker): Similarly.
18         * tree-ssa-dom.c (dom_opt_dom_walker): Similarly.
20 2018-12-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum):
23         Add SVE_NOT_IMPLEMENTED value.
24         * config/aarch64/aarch64-protos.h (struct tune_params): Add sve_width
25         field.
26         * config/aarch64/aarch64.c (generic_tunings,cortexa35_tunings,
27         cortexa53_tunings, cortexa57_tunings, cortexa72_tunings,
28         cortexa73_tunings, exynosm1_tunings, thunderx_tunings,
29         thunderx_tunings, tsv110_tunings, xgene1_tunings, qdf24xx_tunings,
30         saphira_tunings, thunderx2t99_tunings, emag_tunings):
31         Specify sve_width.
32         (aarch64_estimated_poly_value): Define.
33         (TARGET_ESTIMATED_POLY_VALUE): Define.
35 2018-12-07  Paul A. Clarke  <pc@us.ibm.com>
37         PR target/88408
38         * config/rs6000/mmintrin.h (_mm_packs_pu16): Correctly use "__vector".
40 2018-12-07  Vladimir Makarov  <vmakarov@redhat.com>
42         PR rtl-optimization/88349
43         * ira-costs.c (record_operand_costs): Check bigger reg class on
44         NO_REGS.
46 2018-12-07  Richard Sandiford  <richard.sandiford@arm.com>
48         * config/aarch64/aarch64-sve.md (*mul<mode>3, *v<optab><mode>3):
49         Split the patterns after reload if we don't need the predicate
50         operand.
51         (*post_ra_mul<mode>3, *post_ra_v<optab><mode>3): New patterns.
53 2018-12-07  Richard Sandiford  <richard.sandiford@arm.com>
55         * config/aarch64/iterators.md (SVE_UNPRED_FP_BINARY): New code
56         iterator.
57         (sve_fp_op): Handle minus and mult.
58         * config/aarch64/aarch64-sve.md (*add<mode>3, *sub<mode>3)
59         (*mul<mode>3): Split the patterns after reload if we don't
60         need the predicate operand.
61         (*post_ra_<sve_fp_op><mode>3): New pattern.
63 2018-12-07  Bin Cheng  <bin.cheng@linux.alibaba.com>
65         * profile-count.h (profile_count::oeprator>=): Fix typo by inverting
66         return condition when *this is precise zero.
68 2018-12-07  Jakub Jelinek  <jakub@redhat.com>
70         PR target/85593
71         * final.c (rest_of_handle_final): Don't call collect_fn_hard_reg_usage
72         for functions with naked attribute.
74         PR c/88367
75         * tree-vrp.c (extract_range_from_binary_expr): For POINTER_PLUS_EXPR
76         with -fno-delete-null-pointer-checks, set_nonnull only if the pointer
77         is non-NULL and offset is known to have most significant bit clear.
78         * vr-values.c (vr_values::vrp_stmt_computes_nonzero): For ADDR_EXPR
79         of MEM_EXPR, return true if the MEM_EXPR has non-zero offset with
80         most significant bit clear.  If offset does have most significant bit
81         set and -fno-delete-null-pointer-checks, don't return true even if
82         the base pointer is non-NULL.
84 2018-12-06  Alexandre Oliva  <aoliva@redhat.com>
86         * cselib.c (cselib_record_sets): Skip strict low part sets
87         with NULL src_elt.
89 2018-12-06  Paul A. Clarke  <pc@us.ibm.com>
91         PR target/88316
92         * config/rs6000/smmintrin.h: New file.
93         * config.gcc: Add smmintrin.h to extra_headers for powerpc*-*-*.
95 2018-12-06  Paul A. Clarke  <pc@us.ibm.com>
97         PR target/88316
98         * config/rs6000/mmintrin.h (_mm_unpackhi_pi8): Fix for big-endian.
99         (_mm_unpacklo_pi8): Likewise.
100         (_mm_mulhi_pi16): Likewise.
101         (_mm_packs_pi16): Fix for big-endian. Use preferred API.
102         (_mm_packs_pi32): Likewise.
103         (_mm_packs_pu16): Likewise.
104         * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix for big-endian.
105         (_mm_cvtss_si64): Likewise.
106         (_mm_cvtpi32x2_ps): Likewise.
107         (_mm_shuffle_ps): Likewise.
108         (_mm_movemask_pi8): Likewise.
109         (_mm_mulhi_pu16): Likewise.
110         (_mm_sad_pu8): Likewise.
111         (_mm_sad_pu8): Likewise.
112         (_mm_cvtpu16_ps): Fix for big-endian. Use preferred API.
113         (_mm_cvtpu8_ps): Likewise.
114         (_mm_movemask_ps): Better #else case for big-endian (no functional
115         change).
116         (_mm_shuffle_pi16): Likewise.
117         * config/rs6000/emmintrin.h (_mm_movemask_pd): Fix for big-endian.
118         Better #else case for big-endian (no functional change).
119         (_mm_movemask_epi8): Likewise.
120         (_mm_shufflehi_epi16): Likewise.
121         (_mm_shufflelo_epi16): Likewise.
122         (_mm_shuffle_epi32): Likewise.
123         (_mm_mul_epu32): Fix for big-endian.
124         (_mm_bsrli_si128): Likewise.
125         (_mm_cvtps_pd): Better #else case for big endian.
126         (_mm_mulhi_epi16): Likewise.
127         (_mm_mul_epu32): Likewise.
128         (_mm_slli_si128): Likewise.
129         (_mm_sll_epi16): Likewise.
130         (_mm_sll_epi32): Likewise.
131         (_mm_sra_epi16): Likewise.
132         (_mm_sra_epi32): Likewise.
133         (_mm_srl_epi16): Likewise.
134         (_mm_srl_epi32): Likewise.
135         (_mm_mulhi_epu16): Likewise.
136         (_mm_sad_epu8): Likewise.
137         * config/rs6000/pmmintrin.h (_mm_hadd_ps): Fix for big-endian.
138         (_mm_sub_ps): Likewise.
139         * config/rs6000/mmintrin.h (_mm_cmpeq_pi8): Fix for 32-bit mode.
140         * gcc/config/rs6000/tmmintrin.h (_mm_alignr_epi8): Use ENDIAN
141         macros consistently (no functional changes).
142         (_mm_alignr_pi8): Likewise.
144 2018-12-06  Iain Sandoe  <iain@sandoe.co.uk>
146         PR c++/87380
147         * config/darwin.h (TARGET_WEAK_NOT_IN_ARCHIVE_TOC) Remove, use the
148         default.
149         * config/rs6000/darwin7.h (TARGET_WEAK_NOT_IN_ARCHIVE_TOC): New.
151 2018-12-06  Vladimir Makarov  <vmakarov@redhat.com>
153         PR target/88282
154         * ira.c (ira_init_register_move_cost): Use info from
155         hard_regno_mode_ok instead of contains_reg_of_mode.
156         * ira-costs.c (contains_reg_of_mode): Don't use cost from bigger
157         hard register class for some fixed hard registers.
159 2018-12-06  Segher Boessenkool  <segher@kernel.crashing.org>
161         * doc/extend.texi (Using Assembly Language with C): Document asm inline.
162         (Size of an asm): Fix typo.  Document asm inline.
163         * gimple-pretty-print.c (dump_gimple_asm): Handle asm inline.
164         * gimple.h (enum gf_mask): Add GF_ASM_INLINE.
165         (gimple_asm_set_volatile): Fix typo.
166         (gimple_asm_inline_p): New.
167         (gimple_asm_set_inline): New.
168         * gimplify.c (gimplify_asm_expr): Propagate the asm inline flag from
169         tree to gimple.
170         * ipa-icf-gimple.c (func_checker::compare_gimple_asm): Compare the
171         gimple_asm_inline_p flag, too.
172         * tree-core.h (tree_base): Document that protected_flag is ASM_INLINE_P
173         in an ASM_EXPR.
174         * tree-inline.c (estimate_num_insns): If gimple_asm_inline_p return
175         a minimum size for an asm.
176         * tree.h (ASM_INLINE_P): New.
178 2018-12-06  Segher Boessenkool  <segher@kernel.crashing.org>
180         PR inline-asm/55681
181         * doc/extend.texi (Basic Asm): Update grammar.
182         (Extended Asm): Update grammar.
184 2018-12-06  Iain Sandoe  <iain@sandoe.co.uk>
186         PR target/78444
187         * config/i386/darwin.h (STACK_BOUNDARY): Remove macro.
188         * config/i386/i386.c (ix86_compute_frame_layout): Ensure at least 128b
189         stack alignment in non-leaf functions.
191 2018-12-06  Jakub Jelinek  <jakub@redhat.com>
193         PR target/87598
194         * config/aarch64/aarch64.c (aarch64_print_address_internal): Don't
195         call output_operand_lossage on VOIDmode CONST_INTs.  After
196         output_operand_lossage do return false.
198 2018-12-06  Richard Biener  <rguenther@suse.de>
200         * df-problems.c (df_rd_local_compute): Use bitmap_release.
201         (df_live_free): Likewise.
202         (df_md_local_compute): Likewise.
203         (df_md_free): Release df_md_scratch bitmap.
204         * loop-invariant.c (calculate_loop_reg_pressure): Use
205         bitmap_release.
206         * sched-deps.c (true_dependency_cache, output_dependency_cache,
207         anti_dependency_cache, control_dependency_cache,
208         spec_dependency_cache): Use bitmap instead of bitmap_head *.
209         * sched-ebb.c (schedule_ebbs_init): Initialize non-GTY
210         dont_calc_deps as bitmap allocated from obstack not GC.
211         (schedule_ebbs_finish): Use bitmap_release.
212         * sched-rgn.c (schedule_insns): Initialize non-GTY
213         not_in_df as bitmap allocated from obstack not GC.
214         Use bitmap_release.
215         * sel-sched.c (_forced_ebb_heads): Remove premature optimization.
216         (sel_region_init): Allocate forced_ebb_heads.
217         (sel_region_finish): Free forced_ebb_heads.
219 2018-12-06  Richard Biener  <rguenther@suse.de>
221         * bitmap.c (bitmap_head::crashme): Define.
222         * bitmap.h (bitmap_head): Add constexpr default constructor
223         poisoning the obstack member.
224         (bitmap_head::crashme): Declare.
225         (bitmap_release): New function clearing a bitmap and poisoning
226         the obstack member.
227         * gengtype.c (main): Make it recognize CONSTEXPR.
228         * lra-constraints.c (lra_inheritance): Use bitmap_release
229         instead of bitmap_clear.
230         * ira.c (ira): Work around class-memaccess warning.
231         * regrename.c (create_new_chain): Likewise.
233 2018-12-06  Jakub Jelinek  <jakub@redhat.com>
235         PR tree-optimization/85726
236         * generic-match-head.c (optimize_successive_divisions_p): New function.
237         * gimple-match-head.c (optimize_successive_divisions_p): Likewise.
238         * match.pd: Don't combine successive divisions if they aren't exact
239         and optimize_successive_divisions_p is false.
241         PR fortran/88304
242         * tree-nested.c (convert_nonlocal_reference_stmt): Remove clobbers
243         for non-local automatic decls.
245 2018-12-05  David Edelsohn  <dje.gcc@gmail.com>
247         * config/rs6000/aix72.h (ASM_DEFAULT_SPEC): Match Power7 processor
248         default. 
250 2018-12-05  Uros Bizjak  <ubizjak@gmail.com>
252         * dwarf2out.c (field_byte_offset): Remove
253         #ifdef PCC_BITFIELD_TYPE_MATTERS check.
255 2018-12-05  Richard Biener  <rguenther@suse.de>
256             Martin Sebor  <msebor@redhat.com>
258         PR c/87028
259         * calls.c (get_attr_nonstring_decl): Avoid setting *REF to
260         SSA_NAME_VAR.
261         * gcc/gimple-low.c (lower_stmt): Fold builtin calls here.
262         * gimplify (maybe_fold_stmt): Avoid folding builtin calls.
264 2018-12-05  Iain Sandoe  <iain@sandoe.co.uk>
266         * configure.ac (gcc_cv_otool): Set.
267         * configure: Regenerate.
269 2018-12-05  Uros Bizjak  <ubizjak@gmail.com>
271         * config/i386/cygming.h (PCC_BITFIELD_TYPE_MATTERS): Remove.
272         (GROUP_BITFIELDS_BY_ALIGN): Ditto.
274 2018-12-05  Richard Sandiford  <richard.sandiford@arm.com>
276         PR tree-optimization/88064
277         * tree-vect-patterns.c (vect_convert_input): Convert the result of
278         an existing cast if it has the right width but the wrong sign.
279         Do not test the signedness of the required result when
280         considering whether to split an existing cast; instead split to
281         a type with the same signedness as the source of the cast, then
282         convert it to the opposite signedness where necessary.
283         (vect_recog_over_widening_pattern): Handle sign changes between
284         the final PLUS_EXPR and the RSHIFT_EXPR.
285         (vect_recog_average_pattern): Use an unsigned operation when
286         truncating an addition, subtraction or multiplication.  Cast the
287         result back to the "real" signedness before promoting.
289 2018-12-05  Richard Biener  <rguenther@suse.de>
291         PR tree-optimization/86637
292         * tree-vectorizer.c (pass_slp_vectorize::execute): Reset
293         vect_location at the end.
295 2018-12-05  Jakub Jelinek  <jakub@redhat.com>
297         PR tree-optimization/87360
298         * gimple-loop-jam.c (tree_loop_unroll_and_jam): On failure to analyze
299         data dependencies, don't return false, just continue.  Formatting
300         fixes.
301         (merge_loop_tree, bb_prevents_fusion_p, unroll_jam_possible_p,
302         fuse_loops): Formatting fixes.
304         PR sanitizer/88333
305         * cfgexpand.c (expand_stack_vars): If asan_vec is empty, start with
306         aligning frame offset to ASAN_RED_ZONE_SIZE bytes.
308 2018-12-05  Xianmiao Qu  <xianmiao_qu@c-sky.com>
310         * config.gcc (csky-*-linux-gnu*): Force .init_array support.
312 2018-12-05  Segher Boessenkool  <segher@kernel.crashing.org>
314         * config/rs6000/rs6000.c (rs6000_function_arg): Only do the special
315         aggregate handling on actual AIX, not on somewhat similar systems.
316         (rs6000_arg_partial_bytes): Ditto.
318 2018-12-04  Vladimir Makarov  <vmakarov@redhat.com>
320         PR rtl-optimization/88317
321         * lra-constraints.c (split_reg): Don't set up check_only_regs if
322         we are outside the inheritance pass.
324 2018-12-04  Jan Hubicka  <hubicka@ucw.cz>
326         * ipa-prop.c (jump_function_useful_p): New.
327         (ipa_read_node_info): Do not allocated useless jump functions.
329 2018-12-04  David Malcolm  <dmalcolm@redhat.com>
331         PR c/82967
332         * spellcheck.c (selftest::test_suggestions): Add another assertion.
334 2018-12-04  Martin Sebor  <msebor@redhat.com>
336         * doc/extend.texi (__builtin_has_attribute): Fix typo.
338 2018-12-04  Jakub Jelinek  <jakub@redhat.com>
340         PR target/88188
341         * config/rs6000/rs6000.c (ccr_bit): Return -1 instead of assertion
342         failures.
343         (print_operand): Use REG_P instead of GET_CODE == REG.
344         <case 'D'>: Also check CR_REGNO_P (REGNO (x)).
345         <case 't'>: Likewise.  Remove GET_MODE check.
346         * config/rs6000/rs6000.md (scc patterns): Assert ccr_bit didn't
347         return -1.
349 2018-12-04  Martin Sebor  <msebor@redhat.com>
351         * doc/extend.texi (attribute aligned): Expand.
353 2018-12-04  David Edelsohn  <dje.gcc@gmail.com>
355         PR target/61976
356         * config/rs6000/rs6000.c (rs6000_function_arg): Don't pass aggregates
357         in FPRs on AIX.
358         (rs6000_arg_partial_bytes): Same.
360 2018-12-04  Vladimir Makarov  <vmakarov@redhat.com>
362         PR target/88282
363         * ira-costs.c (exec): Try bigger class to use smaller register
364         move cost.
366 2018-12-04  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
368         PR ipa/88297
369         * ipa-cp.c (create_specialized_node): Track clone counters by
370         node assembler names.
371         (ipcp_driver): Change type of clone_num_suffixes key to const char*.
373 2018-12-04  Richard Biener  <rguenther@suse.de>
375         * tree-vect-loop.c (vect_transform_loop): Fix epilogue iterations
376         for epilogue vectorization.
378 2018-12-04  Richard Biener  <rguenther@suse.de>
380         PR tree-optimization/88301
381         * tree-vrp.c (register_edge_assert_for_2): Fix sign-conversion
382         issues in last commit.
384 2018-12-04  Richard Biener  <rguenther@suse.de>
386         PR tree-optimization/88315
387         * tree-vect-loop.c (get_initial_defs_for_reduction): Simplify
388         and fix initialization vector for SAD and DOT_PROD SLP reductions.
390 2018-12-03  Sandra Loosemore  <sandra@codesourcery.com>
392         PR c/59039
393         * doc/extend.texi (Nonlocal gotos): New section.
395 2018-12-03  Uros Bizjak  <ubizjak@gmail.com>
397         * config/i386/sse.md (vec_concatv2df): Change (v,xm,C)
398         alternative to (v,vm,c).
400 2018-12-03  Segher Boessenkool  <segher@kernel.crashing.org>
402         * gcc/config.gcc (Unsupported targets): Add powerpc*-*-linux*paired*.
403         (powerpc*-*-linux*): Don't handle it here.
405 2018-12-03  Jeff Law  <law@redhat.com>
407         * config/h8300/h8300.md (<code>qi3_1): Add gcc_unreachable to keep
408         warnings quiet.
410         * config/h8300/h8300.md (low byte masking peepholes): Only accept
411         nonimmediate_operand for the to-be-masked operand.
413 2018-12-03  Richard Biener  <rguenther@suse.de>
415         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
416         allow expected function-pointer cast re-instantiation.
418 2018-12-03  Ilya Leoshkevich  <iii@linux.ibm.com>
420         * common/config/s390/s390-common.c (s390_option_init_struct):
421         Use section anchors by default.
422         * config/s390/s390.c (s390_check_symref_alignment): Handle
423         anchors.
424         (TARGET_MAX_ANCHOR_OFFSET): Use short displacement.
425         * output.h (assemble_align): Pass `align' as unsigned int, so
426         that the value 0x80000000, which corresponds to `aligned(1 <<
427         28)', would pass the `align > BITS_PER_UNIT' check.
428         * varasm.c (assemble_align): Likewise.
430 2018-12-03  Julian Brown  <julian@codesourcery.com>
432         * tree-pretty-print.c (dump_omp_clause): Make default case
433         gcc_unreachable.
435 2018-12-03  Richard Biener  <rguenther@suse.de>
437         PR tree-optimization/88301
438         * tree-vrp.c (register_edge_assert_for_2): Handle conversions
439         that do not change the value by registering the same assert
440         for the operand.
442 2018-12-03  Richard Biener  <rguenther@suse.de>
444         * tree-vect-loop.c (vect_transform_loop): Properly compute
445         upper bound for the epilogue when doing epilogue vectorization.
447 2018-12-03  Ilya Leoshkevich  <iii@linux.ibm.com>
449         PR target/80080
450         * cfgcleanup.c (class pass_postreload_jump): New pass.
451         (pass_postreload_jump::execute): Likewise.
452         (make_pass_postreload_jump): Likewise.
453         * passes.def: Add pass_postreload_jump before
454         pass_postreload_cse.
455         * tree-pass.h (make_pass_postreload_jump): New pass.
457 2018-12-02  Uros Bizjak  <ubizjak@gmail.com>
459         * config/i386/i386.c (inline_memory_move_cost): Correctly
460         compute number of TFmode GPR moves.
462 2018-12-02  Jakub Jelinek  <jakub@redhat.com>
464         PR target/88278
465         * config/i386/sse.md (*vec_concatv4sf_0, *vec_concatv4si_0): New insns.
467 2018-12-02  Jeff Law  <law@redhat.com>
469         * config/h8300/h8300.md (call, call_value): Drop mode from
470         operand containing number of bytes pushed.
471         (call_insn, call_value_insn): Use mode iterator for number
472         of bytes pushed operand.  Make pattern name vary appropriately.
474 2018-12-02  Jan Hubicka  <jh@suse.cz>
476         * bb-reorer.c (find_rarely_executed_basic_blocks_and_crossin_edges):
477         trust precise profiles.
479 2018-12-02  Jakub Jelinek  <jakub@redhat.com>
481         * tree-nested.c (convert_nonlocal_omp_clauses,
482         convert_local_omp_clauses): Handle OMP_CLAUSE_IN_REDUCTION,
483         OMP_CLAUSE_TASK_REDUCTION and OMP_CLAUSE__SIMT_ clauses.
484         (convert_nonlocal_reference_stmt, convert_local_reference_stmt):
485         Convert clauses for GIMPLE_OMP_TASKGROUP.
487         * omp-low.c (check_omp_nesting_restrictions): Allow cancel or
488         cancellation point with taskgroup clause inside of taskloop.  Consider
489         a taskloop construct without nogroup clause as implicit taskgroup for
490         diagnostics if cancel/cancellation point with taskgroup clause is
491         closely nested inside of taskgroup region.
493         PR sanitizer/88291
494         * asan.c (asan_clear_shadow): Move assert that len is multiple of 4
495         to the start of the function.
496         (asan_emit_stack_protection): When emitting clearing sequence for
497         epilogue, align offset down to ASAN_RED_ZONE_SIZE granularity,
498         add last_size_aligned which is last_size padded to multiples of
499         ASAN_RED_ZONE_SIZE and emit asan_clear_shadow always on 4 byte
500         boundaries.
502 2018-12-01  Jakub Jelinek  <jakub@redhat.com>
504         PR sanitizer/88289
505         * asan.c (asan_redzone_buffer::flush_redzone_payload): Fix up
506         an off-by-one for BYTES_BIG_ENDIAN.
508         PR target/54589
509         * combine.c (find_split_point): For invalid memory address
510         nonobj + obj + const, if reg + obj + const is valid addressing
511         mode, split at nonobj.  Use if rather than else if for the
512         fallback.  Comment fixes.
514 2018-11-30  Indu Bhagat  <indu.bhagat@oracle.com>
516         * coverage.c (get_coverage_counts): Use from_function_decl for precise
517         function location.
518         * profile-count.c (profile_count::dump): Add handling for precise
519         profile quality.
520         * profile.c (compute_branch_probabilities): Rely on exec_counts instead
521         of profile_info to set profile_status of function.
522         (branch_prob): Do not set profile_status of function based on
523         profile_info. Done above based on exec_counts.
525 2018-11-30  Jakub Jelinek  <jakub@redhat.com>
527         PR tree-optimization/88274
528         * tree-ssa-reassoc.c (optimize_range_tests_xor,
529         optimize_range_tests_diff): If type has smaller precision than
530         corresponding mode or if it has non-standard min/max, compute
531         everything in a standard type for the precision.
533         PR testsuite/85368
534         * params.def (PARAM_LOGICAL_OP_NON_SHORT_CIRCUIT): New param.
535         * tree-ssa-ifcombine.c (ifcombine_ifandif): If
536         --param logical-op-non-short-circuit is present, override
537         LOGICAL_OP_NON_SHORT_CIRCUIT value from the param.
538         * fold-const.c (fold_range_test, fold_truth_andor): Likewise.
540 2018-11-30  Jeff Law  <law@redhat.com>
542         * optabs.c (expand_binop): Use "machine_mode" rather than
543         "enum machine mode" in most recent change.
545 2018-11-30  Wilco Dijkstra  <wdijkstr@arm.com>
547         PR middle-end/64242
548         * builtins.c (expand_builtin_longjmp): Use a temporary when restoring
549         the frame pointer.
550         (expand_builtin_nonlocal_goto): Likewise.
552 2018-11-30  David Malcolm  <dmalcolm@redhat.com>
554         * diagnostic-core.h (emit_diagnostic): New decl.
555         * diagnostic.c (emit_diagnostic): New overload, taking a
556         rich_location *.
558 2018-11-30  David Malcolm  <dmalcolm@redhat.com>
560         * pretty-print.c (class selftest::test_pretty_printer): New
561         subclass of pretty_printer.
562         (selftest::test_prefixes_and_wrapping): New test.
563         (selftest::pretty_print_c_tests): Call it.
565 2018-11-30  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
567         Minimize clone counter memory usage in create_virtual_clone.
568         * cgraph.h (clone_function_name): Add a variant that takes a
569         tree decl.
570         * cgraph.h (cgraph_node::create_virtual_clone): Add a new
571         argument: num_suffix.
572         * cgraphclones.c (cgraph_node::create_virtual_clone): Pass
573         num_suffix to clone_function_name.
574         (clone_function_name): Add a variant that takes a tree decl.
575         * ipa-cp.c (create_specialized_node): Keep track of clone
576         counters in clone_num_suffixes hash map.
577         (ipcp_driver): Free the counter hash map.
578         * ipa-hsa.c (process_hsa_functions): Creates at most one hsa
579         clone per function.
581 2018-11-30  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
582         Make function assembly more independent.
584         This is achieved by having clone_function_name assign unique clone
585         numbers for each function independently.
587         * cgraphclones.c: Replaced clone_fn_id_num with clone_fn_ids;
588         hash map.
589         (clone_function_name_numbered): Use clone_fn_ids.
591 2018-11-30  Vladimir Makarov  <vmakarov@redhat.com>
593         PR rtl-optimization/88179
594         * lra-constraints.c (address_eliminator::address_eliminator):
595         Don't eleminate regs in illegitimate address.
597 2018-11-30  David Malcolm  <dmalcolm@redhat.com>
599         PR preprocessor/88257
600         * input.c (get_substring_ranges_for_loc): Fix indentation.
601         Bulletproof against getting a different files back from
602         linemap_resolve_location and expand_location_to_spelling_point.
604 2018-11-30  Alexander Monakov  <amonakov@ispras.ru>
606         PR gcov-profile/88279
607         * tree-profile.c (init_ic_make_global_vars): Call
608         decl_default_tls_model for variable and not it's type.
610 2018-11-30  Sam Tebbs  <sam.tebbs@arm.com>
612         * config/arm/arm.h (TARGET_DOTPROD): Add TARGET_VFP5 constraint.
614 2018-11-30  Martin Liska  <mliska@suse.cz>
616         PR sanitizer/81715
617         * asan.c (asan_shadow_cst): Remove, partially transform
618         into flush_redzone_payload.
619         (RZ_BUFFER_SIZE): New.
620         (struct asan_redzone_buffer): New.
621         (asan_redzone_buffer::emit_redzone_byte): Likewise.
622         (asan_redzone_buffer::flush_redzone_payload): Likewise.
623         (asan_redzone_buffer::flush_if_full): Likewise.
624         (asan_emit_stack_protection): Use asan_redzone_buffer class
625         that is responsible for proper aligned stores and flushing
626         of shadow memory payload.
627         * asan.h (ASAN_MIN_RED_ZONE_SIZE): New.
628         (asan_var_and_redzone_size): Likewise.
629         * cfgexpand.c (expand_stack_vars): Use smaller alignment
630         (ASAN_MIN_RED_ZONE_SIZE) in order to make shadow memory
631         for automatic variables more compact.
633 2018-11-30  Alan Modra  <amodra@gmail.com>
635         * config/rs6000/predicates.md (easy_fp_constant): Avoid long
636         dependent insn sequences.
637         * config/rs6000/rs6000.c (num_insns_constant): Support long
638         double constants.
639         * config/rs6000/rs6000.md (mov<mode>_softfloat <FMOVE128>): Adjust
640         length attribute.
642 2018-11-30  Alan Modra  <amodra@gmail.com>
644         * config/rs6000/rs6000.c (num_insns_constant_gpr): Renamed from
645         num_insns_constant_wide.  Make static.  Revise comment.
646         (num_insns_constant_multi): New function.
647         (num_insns_constant): Formatting.  Correct CONST_WIDE_INT
648         calculation.  Simplify and extract code common to both
649         CONST_INT and CONST_DOUBLE.  Add gcc_unreachable for unhandled
650         const_double modes.
651         * config/rs6000/rs6000-protos.h (num_insns_const_wide): Delete.
653 2018-11-30  Richard Biener  <rguenther@suse.de>
655         PR tree-optimization/88274
656         * tree-vrp.c (ranges_from_anti_range): Fix handling of
657         TYPE_MIN/MAX_VALUE.
659 2018-11-29  Andi Kleen  <ak@linux.intel.com>
661         * config/i386/i386.c (current_fentry_section): Add.
662         (x86_function_profiler): Handle fentry section.
663         (ix86_attribute_table): Add fentry section.
664         * config/i386/i386.opt: Add -mfentry-section.
665         * doc/extend.texi: Document fentry_section attribute.
666         * doc/invoke.texi: Document -mfentry-section.
668 2018-11-29  Andi Kleen  <ak@linux.intel.com>
670         * config/i386/i386.c (x86_print_call_or_nop): Handle nop name.
671         (current_fentry_name): Add.
672         (x86_function_profiler): Handle fentry_name attribute.
673         (ix86_handle_fentry_name): Add.
674         (ix86_attribute_table): Add fentry_name.
675         * config/i386/i386.opt: Add -mfentry-name
676         * doc/extend.texi: Document fentry_name.
677         * doc/invoke.texi: Document minstrument-return.
679 2018-11-29  Andi Kleen  <ak@linux.intel.com>
681         * config/i386/i386-opts.h (enum instrument_return): Add.
682         * config/i386/i386.c (output_return_instrumentation): Add.
683         (ix86_output_function_return): Call output_return_instrumentation.
684         (ix86_output_call_insn): Call output_return_instrumentation.
685         * config/i386/i386.opt: Add -minstrument-return=.
686         * doc/invoke.texi (-minstrument-return): Document.
688 2018-11-29  Eric Botcazou  <ebotcazou@adacore.com>
690         PR target/87807
691         * config/sparc/sparc-modes.def: Minor tweak.
692         * config/sparc/sparc.c: Minor reordering.
693         (sparc_pass_by_reference): Move around.
694         (traverse_record_type): Change offset from HOST_WIDE_INT to int.
695         (classify_registers): Likewise for bitpos.
696         (function_arg_slotno): Remove dead test and tweak comments.
697         <MODE_RANDOM>: Remove useless assertion and test whether the
698         parameter is named in order to pass it in FP registers.  Return
699         the regno for floating-point vector types.
700         (compute_int_layout): Change bitpos from HOST_WIDE_INT to int.
701         (compute_fp_layout): Likewise.
702         (count_registers): Likewise.
703         (assign_int_registers): Likewise.
704         (assign_fp_registers): Likewise.
705         (assign_registers): Likewise.
706         (function_arg_record_value): Change size from HOST_WIDE_INT to int
707         and use CEIL_NWORDS to compute the number of registers.
708         (function_arg_union_value): Minor tweaks.
709         (function_arg_vector_value): Add slotno and named parameters, use
710         CEIL_NWORDS to compute the number of registers.
711         (sparc_function_arg_1): Rework handling of vector types.  Change
712         size from HOST_WIDE_INT to int.
713         (sparc_arg_partial_bytes): Rework handling of 32-bit ABI and deal
714         with vector types for the 64-bt ABI.
715         (sparc_function_arg_advance): Likewise.
716         (sparc_return_in_memory): Add reference to -fpcc-struct-return.
717         (sparc_struct_value_rtx): Return NULL_RTX instead of 0.
718         (sparc_function_value_1): Rework handling of vector types.  Change
719         size from HOST_WIDE_INT to int.
721 2018-11-29  Jakub Jelinek  <jakub@redhat.com>
723         PR target/88152
724         * config/i386/sse.md (*<sse>_movmsk<ssemodesuffix><avxsizesuffix>_lt,
725         *<sse>_movmsk<ssemodesuffix><avxsizesuffix>_zext_lt,
726         *<sse>_movmsk<ssemodesuffix><avxsizesuffix>_shift,
727         *<sse>_movmsk<ssemodesuffix><avxsizesuffix>_zext_shift,
728         *<sse2_avx2>_pmovmskb_lt, *<sse2_avx2>_pmovmskb_zext_lt): New
729         define_insn_and_split patterns.
731         PR target/54700
732         * config/i386/sse.md
733         (*<sse4_1>_blendv<ssemodesuffix><avxsizesuffix>_lt,
734         *<sse4_1>_blendv<ssefltmodesuffix><avxsizesuffix>_ltint,
735         *<sse4_1_avx2>_pblendvb_lt): Change define_insn into
736         define_insn_and_split.
738 2018-11-29  Peter Bergner  <bergner@linux.ibm.com>
740         PR target/87496
741         * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
742         -mabi=ieeelongdouble without both -mpopcntd and -mvsx.
744 2018-11-29  Uros Bizjak  <ubizjak@gmail.com>
746         * config/i386/i386.c (inline_memory_move_cost):
747         Check "in" for 2 in MMX_CLASS_P case.
748         * config/i386/mmx.md (*mov<mode>_internal): Correct
749         TARGET_INTER_UNIT_MOVES_FROM_VEC and TARGET_INTER_UNIT_MOVES_TO_VEC
750         alternatives in preferred_for_speed attribute calculation.
752 2018-11-29  Martin Sebor  <msebor@redhat.com>
754         PR c/88172
755         PR testsuite/88208
756         * doc/extend.texi (attribute constructor): Clarify.
758 2018-11-29  Martin Liska  <mliska@suse.cz>
760         PR middle-end/88246
761         * builtins.c (expand_movstr): Fix thinko introduced
762         when switching to the new enum.
764 2018-11-29  qing zhao  <qing.zhao@oracle.com>
766         * cif-code.def (EXTERN_LIVE_ONLY_STATIC): New CIF code.
767         * common.opt: Add -flive-patching flag.
768         * doc/invoke.texi: Document -flive-patching.
769         * flag-types.h (enum live_patching_level): New enum.
770         * ipa-inline.c (can_inline_edge_p): Disable external functions from
771         inlining when flag_live_patching is LIVE_PATCHING_INLINE_ONLY_STATIC.
772         * opts.c (control_options_for_live_patching): New function.
773         (finish_options): Make flag_live_patching incompatible with flag_lto.
774         Control IPA optimizations based on different levels of
775         flag_live_patching.
777 2018-11-29  Giuliano Belinassi  <giuliano.belinassi@usp.br>
779         * match.pd (sinh (atanh (x))): New simplification rules.
780         (cosh (atanh (x))): Likewise.
782 2018-11-29  Jakub Jelinek  <jakub@redhat.com>
784         PR target/54700
785         * config/i386/sse.md (ssebytemode): Add V16SI, V8SI and V4SI entries.
786         (ssefltmodesuffix, ssefltvecmode): New define_mode_attrs.
787         (*<sse4_1>_blendv<ssemodesuffix><avxsizesuffix>_lt,
788         *<sse4_1>_blendv<ssefltmodesuffix><avxsizesuffix>_ltint,
789         *<sse4_1_avx2>_pblendvb_lt): New define_insns.
791         PR target/88152
792         * tree.h (build_uniform_cst, uniform_integer_cst_p): Declare.
793         * tree.c (build_uniform_cst, uniform_integer_cst_p): New functions.
794         * match.pd (define_predicates): Add uniform_integer_cst_p.
795         (cmp @0 INTEGER_CST@1, cmp (convert?@2 @0) INTEGER_CST@1): Adjust
796         so that it works also for vector comparisons with uniform constants
797         with INTEGER_CST element.
799         PR target/88234
800         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): For
801         vec_add and vec_sub builtins, perform PLUS_EXPR or MINUS_EXPR
802         in unsigned_type_for instead of vector integral type where overflow
803         doesn't wrap.
805 2018-11-29  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
807         There can be at most one .resolver clone per function
808         * config/rs6000/rs6000.c (make_resolver_func): Generate
809         resolver symbol with clone_function_name instead of
810         clone_function_name_numbered.
812 2018-11-29  Richard Biener  <rguenther@suse.de>
814         PR tree-optimization/88243
815         * tree-vect-patterns.c (vect_mark_pattern_stmts): Set the def
816         type of all pattern-sequence stmts to vect_internal_def.
818 2018-11-29  Andre Vieira  <andre.simoesdiasvieira@arm.com>
820         PR target/88224
821         * config/arm/arm-cpus.in (armv7-r): Add FP16conv configurations.
822         (cortex-r7, cortex-r8): Update default and add new configuration.
823         * doc/invoke.texi (armv7-r): Add two new vfp options.
824         (nofp.dp): Add cortex-r7 and cortex-r8 to the list of targets that
825         support this option.
827 2018-11-29  Alan Modra  <amodra@gmail.com>
829         * config/rs6000/rs6000.c (rs6000_emit_move): Disable long
830         double split for targets other than Darwin.
832 2018-11-29  Alan Modra  <amodra@gmail.com>
834         * config/rs6000/rs6000.md (movdi_internal64): Correct lengths.
836 2018-11-29  Alan Modra  <amodra@gmail.com>
838         * config/rs6000/predicates.md (easy_fp_constant): Remove code
839         dealing with integers in const_double.  Assert on unexpected
840         modes.  Delete superfluous ABI_V4 test.
841         * config/rs6000/rs6000.c (rs6000_emit_move): Comment fixes.
842         Don't call easy_fp_constant for Pmode.
843         (rs6000_hash_constant): Remove code dealing with integers in
844         const_double.
845         (rs6000_legitimate_constant_p): Likewise.
846         (output_toc): Formatting, use CONST_DOUBLE_P.
848 2018-11-29  Alan Modra  <amodra@gmail.com>
850         * config/rs6000/constraints.md (G, H): Comment on purpose of
851         constraint.  Correct mode comments and "G" mode test.
852         * config/rs6000/rs6000.md (movdi_internal32): Remove "GH" from
853         alternative handling "F".  Add length attr.  Formatting.
854         (mov<mode>_softfloat <FMOVE128>): Delete "GH" from
855         alternative, and move "F" to separate alternative.  Correct
856         insn lengths.
858 2018-11-29  Alan Modra  <amodra@gmail.com>
860         * config/rs6000/predicates.md (easy_vector_constant): Don't call
861         easy_fp_constant.
863 2018-11-29  Alan Modra  <amodra@gmail.com>
865         * config.in (HAVE_AS_PLTSEQ): Add.
866         * config/rs6000/predicates.md (indirect_call_operand): New.
867         * config/rs6000/rs6000-protos.h (rs6000_pltseq_template),
868         (rs6000_sibcall_sysv): Declare.
869         * config/rs6000/rs6000.c (init_cumulative_args): Set cookie
870         CALL_LONG for -fno-plt.
871         (print_operand <T, z, 0>): Handle UNSPEC_PLTSEQ.
872         (rs6000_indirect_call_template_1): Emit .reloc directives for
873         UNSPEC_PLTSEQ calls.
874         (rs6000_pltseq_template): New function.
875         (rs6000_longcall_ref): Add arg parameter.  Use PLT16 insns if
876         relocs supported by assembler.  Move SYMBOL_REF test to callers.
877         (rs6000_call_aix): Adjust rs6000_longcall_ref call.  Package
878         insns in UNSPEC_PLTSEQ, preserving original func_desc.
879         (rs6000_call_sysv): Likewise.
880         (rs6000_sibcall_sysv): New function.
881         * config/rs6000/rs6000.h (HAVE_AS_PLTSEQ): Provide default.
882         * config/rs6000/rs6000.md (UNSPEC_PLTSEQ, UNSPEC_PLT16_HA,
883         UNSPEC_PLT16_LO): New.
884         (pltseq_tocsave, pltseq_plt16_ha, pltseq_plt16_lo, pltseq_mtctr): New.
885         (call_indirect_nonlocal_sysv): Don't differentiate zero from non-zero
886         cookie in constraints.  Test explicitly for flags in length attr.
887         Handle unspec operand 1.
888         (call_value_indirect_nonlocal_sysv): Likewise.
889         (call_indirect_aix, call_value_indirect_aix): Handle unspec operand 1.
890         (call_indirect_elfv2, call_value_indirect_elfv2): Likewise.
891         (sibcall, sibcall_value): Use rs6000_sibcall_sysv.
892         (sibcall_indirect_nonlocal_sysv): New pattern.
893         (sibcall_value_indirect_nonlocal_sysv): Likewise.
894         (sibcall_nonlocal_sysv, sibcall_value_nonlocal_sysv): Remove indirect
895         call alternatives.
896         * configure.ac: Check for gas plt sequence marker support.
897         * configure: Regenerate.
899 2018-11-29  Alan Modra  <amodra@gmail.com>
901         * config/rs6000/predicates.md (unspec_tls): New.
902         * config/rs6000/rs6000-protos.h (rs6000_call_template),
903         (rs6000_sibcall_template): Update prototype.
904         (rs6000_longcall_ref): Delete.
905         (rs6000_call_sysv): Declare.
906         * config/rs6000/rs6000.c (edit_tls_call_insn): New function.
907         (global_tlsarg): New variable.
908         (rs6000_legitimize_tls_address): Rewrite __tls_get_addr call
909         handling.
910         (print_operand): Extract UNSPEC_TLSGD address operand.
911         (rs6000_call_template, rs6000_sibcall_template): Remove arg
912         parameter, extract from second call operand instead.
913         (rs6000_longcall_ref): Make static, localize vars.
914         (rs6000_call_aix): Rename parameter to reflect new usage.  Take
915         tlsarg from global_tlsarg.  Don't create unused rtl or nop insns.
916         (rs6000_sibcall_aix): Rename parameter to reflect new usage.  Take
917         tlsarg from global_tlsarg.
918         (rs6000_call_sysv): New function.
919         * config/rs6000/rs6000.md: Adjust rs6000_call_template and
920         rs6000_sibcall_template throughout.
921         (tls_gd_aix, tls_gd_sysv, tls_gd_call_aix, tls_gd_call_sysv): Delete.
922         (tls_ld_aix, tls_ld_sysv, tls_ld_call_aix, tls_ld_call_sysv): Delete.
923         (tls_gdld_nomark): New insn.
924         (tls_gd): Swap operand order.  Simplify mode selection.
925         (tls_gd_high, tls_gd_low): Swap operand order.
926         (tls_ld): Remove const_int 0 vector element from UNSPEC_TLSLD.
927         Simplify mode selection.
928         (tls_ld_high, tls_ld_low): Similarly adjust UNSPEC_TLSLD.
929         (call, call_value): Don't assert for second call operand.
930         Use rs6000_call_sysv.
932 2018-11-29  Alan Modra  <amodra@gmail.com>
934         * config/rs6000/darwin.md (call_indirect_nonlocal_darwin64),
935         (call_nonlocal_darwin64, call_value_indirect_nonlocal_darwin64),
936         (call_value_nonlocal_darwin64): Remove constraints from second call
937         arg, the rounded_stack_size_rtx arg.
938         * config/rs6000/rs6000.md (tls_gd_aix, tls_gd_sysv, tls_gd_call_aix),
939         (tls_gd_call_sysv, tls_ld_aix, tls_ld_sysv, tls_ld_call_aix),
940         (tls_ld_call_sysv, call_local32, call_local64, call_value_local32),
941         (call_value_local64, call_indirect_nonlocal_sysv),
942         (call_nonlocal_sysv, call_nonlocal_sysv_secure),
943         (call_value_indirect_nonlocal_sysv, call_value_nonlocal_sysv),
944         (call_value_nonlocal_sysv_secure, call_local_aix),
945         (call_value_local_aix, call_nonlocal_aix, call_value_nonlocal_aix),
946         (call_indirect_aix, call_value_indirect_aix, call_indirect_elfv2),
947         (call_value_indirect_elfv2, sibcall_local32, sibcall_local64),
948         (sibcall_value_local32, sibcall_value_local64, sibcall_aix),
949         (sibcall_value_aix): Likewise.
951 2018-11-29  Alan Modra  <amodra@gmail.com>
953         * config/rs6000/rs6000.md (TLSmode): Delete mode iterator.  Replace
954         with P throughout except for call mems which should use SI.
955         (tls_abi_suffix, tls_sysv_suffix, tls_insn_suffix): Delete mode
956         attributes.  Replace with bits, mode and ptrload respectively.
958 2018-11-29  Alan Modra  <amodra@gmail.com>
960         * config/rs6000/rs6000-protos.h (rs6000_indirect_call_template),
961         (rs6000_indirect_sibcall_template): Declare.
962         * config/rs6000/rs6000.c (rs6000_indirect_call_template_1),
963         (rs6000_indirect_call_template, rs6000_indirect_sibcall_template):
964         New functions.
965         * config/rs6000/rs6000.md (call_indirect_nonlocal_sysv),
966         (call_value_indirect_nonlocal_sysv, sibcall_nonlocal_sysv),
967         (call_indirect_aix, call_value_indirect_aix): Use
968         rs6000_indirect_call_template and rs6000_indirect_sibcall_template.
969         call_indirect_elfv2, call_value_indirect_elfv2): Likewise, and
970         handle both speculation and non-speculation cases.
971         (call_indirect_aix_nospec, call_value_indirect_aix_nospec): Delete.
972         (call_indirect_elfv2_nospec, call_value_indirect_elfv2_nospec): Delete.
974 2018-11-29  Alan Modra  <amodra@gmail.com>
976         * config/rs6000/rs6000-protos.h (rs6000_call_template): Declare.
977         (rs6000_sibcall_template): Declare.
978         (macho_call_template): Rename from output_call.
979         * config/rs6000/rs6000.c (rs6000_call_template_1): New function.
980         (rs6000_call_template, rs6000_sibcall_template): Likewise.
981         (macho_call_template): Rename from output_call.
982         * config/rs6000/rs6000.md (tls_gd_aix, tls_gd_sysv),
983         (tls_gd_call_aix, tls_gd_call_sysv, tls_ld_aix, tls_ld_sysv),
984         (tls_ld_call_aix, tls_ld_call_sysv, call_nonlocal_sysv),
985         (call_nonlocal_sysv_secure, call_value_nonlocal_sysv),
986         (call_value_nonlocal_sysv_secure, call_nonlocal_aix),
987         (call_value_nonlocal_aix): Use rs6000_call_template and update
988         occurrences of output_call to macho_call_template.
989         (sibcall_nonlocal_sysv, sibcall_value_nonlocal_sysv, sibcall_aix),
990         (sibcall_value_aix): Use rs6000_sibcall_template.
992 2018-11-28  Aaron Sawdey  <acsawdey@linux.ibm.com>
994         * config/rs6000/rs6000-string.c (expand_block_clear): Change how
995         we determine if unaligned vsx is ok.
997 2018-11-28  Jan Hubicka  <jh@suse.cz>
999         * predict.c (determine_unlikely_bbs): Forward declare; also determine
1000         edges that are always known to be taken because it is only likely
1001         edge out of given BB.
1002         (tree_estimate_probability): Call before profile guessing to get bit
1003         of extra precision.
1005 2018-11-28  Jan Hubicka  <jh@suse.cz>
1007         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Handle
1008         profile_probability::always better.
1010 2018-11-28  Jan Hubicka  <jh@suse.cz>
1012         * profile-count.h (profile_count::split): Give better result when
1013         splitting profile_probability::always.
1015 2018-11-28  Vladimir Makarov  <vmakarov@redhat.com>
1017         PR target/88207
1018         * ira-costs.c (scan_one_insn): Process subregs when updating costs
1019         for pseudos and allocnos from insn.
1021 2018-11-28  David Edelsohn  <dje.gcc@gmail.com>
1023         * config/rs6000/aix72.h: Update to match aix71.h changes.
1025 2018-11-28  Jeff Law  <law@redhat.com>
1027         * config/h8300/constraints.md: Add "C" constraint for call insns.
1028         * config/h8300/h8300.md (call, call_value): Turn into a define_expand
1029         and define_insn pair.  Move invalid call targets into a register in
1030         the expander and fix constraints in the matching pattern.
1031         * config/h8300/predicates.md (call_expander_operand): Renamed from
1032         call_insn_operand.  Reject things we shouldn't be trying to handle.
1033         (call_insn_operand): New predicate for use by the call/call_value
1034         insns.
1035         (small_call_insn_operand): Update appropriately.
1037 2018-11-28  Sam Tebbs  <sam.tebbs@arm.com>
1039         * config/aarch64/aarch64.c (aarch64_process_target_attr): Replace
1040         calls to strtok with strtok_r.
1042 2018-11-28  Richard Biener  <rguenther@suse.de>
1044         PR tree-optimization/88223
1045         * tree-ssa-sccvn.c (vn_reference_lookup_3): When skipping
1046         over a stored-same value may-alias store make sure to consider
1047         partial overlaps which are valid when TBAA reasonings do not
1048         apply and byte-granular overlaps are possible at all.
1050 2018-11-28  Richard Biener  <rguenther@suse.de>
1052         PR tree-optimization/88217
1053         * vr-values.c (vr_values::extract_range_from_phi_node): Make
1054         sure to handle results > +INF and < -INF correctly when
1055         trying to drop down to +INF - 1 or -INF + 1.
1057 2018-11-28  Alan Modra  <amodra@gmail.com>
1059         * xcoffout.c (do_block): Signed/unsigned warning fix.
1061 2018-11-28  Richard Biener  <rguenther@suse.de>
1063         PR tree-optimization/79351
1064         * tree-ssa-sccvn.c (vn_reference_lookup_3): For assignments from
1065         empty CONSTRUCTORs ensure the store is at a constant position.
1067 2018-11-28  Richard Biener  <rguenther@suse.de>
1069         PR tree-optimization/88229
1070         * tree-ssa.c (non_rewritable_mem_ref_base): Check DECL_SIZE_UNIT
1071         is an INTEGER_CST before accessing it so.
1073 2018-11-28  Sam Tebbs  <sam.tebbs@arm.com>
1075         * doc/invoke.texi (-mtune=): Remove obsolete CPU names.
1077 2018-11-28  Jakub Jelinek  <jakub@redhat.com>
1079         PR target/88189
1080         * config/i386/i386.c (ix86_expand_sse_movcc): Handle DFmode and
1081         SFmode using sse4_1_blendvs[sd] with TARGET_SSE4_1.  Formatting fixes.
1082         * config/i386/sse.md (sse4_1_blendv<ssemodesuffix>): New pattern.
1084 2018-11-27  Martin Liska  <mliska@suse.cz>
1086         * gcov.c (generate_results): Append current_working_directory
1087         only when exists.
1089 2018-11-27  Mike Gulick  <mgulick@mathworks.com>
1091         PR preprocessor/83173
1092         * input.c (dump_location_info): Dump reason and included_from
1093         fields from line_map_ordinary struct.  Fix indentation when
1094         location > 5 digits.
1095         * diagnostic-show-locus.c (num_digits, num_digits): Move to
1096         diagnostic.c to allow it to be utilized by input.c.
1097         * diagnostic.c (num_digits, selftest::test_num_digits): Moved
1098         here.
1099         (selftest::diagnostic_c_tests): Run selftest::test_num_digits.
1100         * diagnostic.h (num_digits): Add extern definition.
1102 2018-11-27  Fredrik Noring  <noring@nocrew.org>
1104         * config/mips/mips.c (mips_reorg_process_insns)
1105         (mips_option_override): Handle `-mfix-r5900'.
1106         * config/mips/mips.h (ASM_SPEC): Add `mfix-r5900' and
1107         `mno-fix-r5900'.
1108         * config/mips/mips.opt (mfix-r5900): New option.
1109         * doc/invoke.texi: Document the `r5900' processor name, and
1110         `-mfix-r5900' and `-mno-fix-r5900' options.
1112 2018-11-27  Jakub Jelinek  <jakub@redhat.com>
1114         PR target/88188
1115         * config/rs6000/rs6000.c (print_operand) <case 'D'>: Use
1116         output_operand_lossage instead of gcc_assert.
1117         <case 't'>: Likewise.
1118         <case 'z'>: Likewise.
1119         <case 'V'>: Use output_operand_lossage instead of gcc_unreachable.
1121 2018-11-27  Jeff Law  <law@redhat.com>
1123         * config/riscv/riscv (riscv_block_mvoe_straight): Use RETURN_BEGIN
1124         in call to move_by_pieces.
1126         * config/sh/sh-mem.c (expand_block_move): Use RETURN_BEGIN in call
1127         to move_by_pieces.
1129         * config/lm32/lm32.c (lm32_block_move_inline): Use RETURN_BEGIN in
1130         call to move_by_pieces.
1132         * config/mips/mips.c (mips_block_move_straight): Use RETURN_BEGIN
1133         in call to move_by_pieces.
1135         * config/microblaze/microblaze.c (microblaze_block_move_straight): Use
1136         RETURN_BEGIN in call to move_by_pieces.
1137         (microblaze_expand_block_move): Likewise.
1139 2018-11-27  Tamar Christina  <tamar.christina@arm.com>
1141         * doc/md.texi (xorsign): Document it.
1143 2018-11-27  Martin Liska  <mliska@suse.cz>
1145         * config/gnu-user.h (TARGET_F951_OPTIONS): New.
1146         * gcc.c (find_fortran_preinclude_file): New function
1147         to handle Fortran pre-include.
1149 2018-11-27  Martin Liska  <mliska@suse.cz>
1151         * asan.c (asan_emit_stack_protection): Use new enum values
1152         instead of int constants.
1153         * builtins.c (expand_builtin_memory_copy_args): Replace int
1154         type with memop_ret enum type.
1155         (expand_builtin_mempcpy_args): Likewise.
1156         (expand_builtin_memcpy): Use new enum values
1157         instead of int constants. Likewise.
1158         (expand_builtin_mempcpy): Likewise.
1159         (expand_movstr): Likewise.
1160         (expand_builtin_strcpy_args): Likewise.
1161         (expand_builtin_stpcpy_1): Likewise.
1162         (expand_builtin_strncpy): Likewise.
1163         (expand_builtin_memset_args): Likewise.
1164         * expr.c (move_by_pieces_d::finish_endp): Rename to ...
1165         (move_by_pieces_d::finish_retmode): ... this.
1166         (move_by_pieces): Change last argument type to memop_ret.
1167         (store_by_pieces): Use new enum values
1168         instead of int constants.
1169         (emit_block_move_hints): Likewise.
1170         (emit_push_insn): Likewise.
1171         (store_expr): Likewise.
1172         * expr.h (store_by_pieces): Change int to newly added enum
1173         type.
1174         * rtl.h (enum memop_ret): Define.
1175         (move_by_pieces): Use the enum type.
1177 2018-11-27  Alan Modra  <amodra@gmail.com>
1179         * config/rs6000/aix71.h (ASM_SPEC): Don't select default -maix64
1180         cpu here.
1181         (ASM_CPU_SPEC): Do so here.  Rewrite using if .. else if .. specs
1182         form.  Error on missing -mcpu case.
1183         * config/rs6000/driver-rs6000.c (asm_names <_AIX>): Update NULL case.
1184         (asm_names <!_AIX>): Add missing cpus.  Update NULL case.  Apply
1185         PR63177 fix for -mcpu=power8 and -mcpu=powerpc64le.
1186         * config/rs6000/rs6000.h (ASM_CPU_SPEC): Rewrite using if ..
1187         else if .. specs form.  Error on missing -mcpu case.  Don't output
1188         duplicate -maltivec.  Apply PR63177 fix for -mcpu=powerpc64le.
1190 2018-11-26  David Malcolm  <dmalcolm@redhat.com>
1192         * dump-context.h (dump_context::dump_loc): Convert 1st param from
1193         dump_flags_t to const dump_metadata_t &.  Convert 2nd param from
1194         const dump_location_t & to const dump_user_location_t &.
1195         (dump_context::dump_loc_immediate): Convert 2nd param from
1196         const dump_location_t & to const dump_user_location_t &.
1197         (dump_context::dump_gimple_stmt): Convert 1st param from
1198         dump_flags_t to const dump_metadata_t &.
1199         (dump_context::void dump_gimple_stmt_loc): Likewise; convert
1200         2nd param from const dump_location_t & to
1201         const dump_user_location_t &.
1202         (dump_context::dump_gimple_expr): Convert 1st param from
1203         dump_flags_t to const dump_metadata_t &.
1204         (dump_context::dump_gimple_expr_loc): Likewise; convert
1205         2nd param from const dump_location_t & to
1206         const dump_user_location_t &.
1207         (dump_context::dump_generic_expr): Convert 1st param from
1208         dump_flags_t to const dump_metadata_t &.
1209         (dump_context::dump_generic_expr_loc): Likewise; convert
1210         2nd param from const dump_location_t & to
1211         const dump_user_location_t &.
1212         (dump_context::dump_printf_va): Convert 1st param from
1213         dump_flags_t to const dump_metadata_t &.
1214         (dump_context::dump_printf_loc_va): Likewise; convert
1215         2nd param from const dump_location_t & to
1216         const dump_user_location_t &.
1217         (dump_context::dump_dec): Convert 1st param from
1218         dump_flags_t to const dump_metadata_t &.
1219         (dump_context::dump_symtab_node): Likewise.
1220         (dump_context::begin_scope): Split out 2nd param into
1221         user and impl locations.
1222         (dump_context::ensure_pending_optinfo): Add metadata param.
1223         (dump_context::begin_next_optinfo): Replace dump_location_t param
1224         with metadata and user location.
1225         * dumpfile.c (dump_context::dump_loc): Convert 1st param from
1226         dump_flags_t to const dump_metadata_t &.  Convert 2nd param from
1227         const dump_location_t & to const dump_user_location_t &.
1228         (dump_context::dump_loc_immediate): Convert 2nd param from
1229         const dump_location_t & to const dump_user_location_t &.
1230         (dump_context::dump_gimple_stmt): Convert 1st param from
1231         dump_flags_t to const dump_metadata_t &.
1232         (dump_context::void dump_gimple_stmt_loc): Likewise; convert
1233         2nd param from const dump_location_t & to
1234         const dump_user_location_t &.
1235         (dump_context::dump_gimple_expr): Convert 1st param from
1236         dump_flags_t to const dump_metadata_t &.
1237         (dump_context::dump_gimple_expr_loc): Likewise; convert
1238         2nd param from const dump_location_t & to
1239         const dump_user_location_t &.
1240         (dump_context::dump_generic_expr): Convert 1st param from
1241         dump_flags_t to const dump_metadata_t &.
1242         (dump_context::dump_generic_expr_loc): Likewise; convert
1243         2nd param from const dump_location_t & to
1244         const dump_user_location_t &.
1245         (dump_context::dump_printf_va): Convert 1st param from
1246         dump_flags_t to const dump_metadata_t &.
1247         (dump_context::dump_printf_loc_va): Likewise; convert
1248         2nd param from const dump_location_t & to
1249         const dump_user_location_t &.
1250         (dump_context::dump_dec): Convert 1st param from
1251         dump_flags_t to const dump_metadata_t &.
1252         (dump_context::dump_symtab_node): Likewise.
1253         (dump_context::begin_scope): Split out 2nd param into
1254         user and impl locations.
1255         (dump_context::ensure_pending_optinfo): Add metadata param.
1256         (dump_context::begin_next_optinfo): Replace dump_location_t param
1257         with metadata and user location.
1258         (dump_gimple_stmt): Convert 1st param from dump_flags_t to
1259         const dump_metadata_t &.
1260         (dump_gimple_stmt_loc): Likewise; convert 2nd param from
1261         const dump_location_t & to const dump_user_location_t &.
1262         (dump_gimple_expr): Convert 1st param from dump_flags_t to
1263         const dump_metadata_t &.
1264         (dump_gimple_expr_loc): Likewise; convert 2nd param from
1265         const dump_location_t & to const dump_user_location_t &.
1266         (dump_generic_expr): Convert 1st param from dump_flags_t to
1267         const dump_metadata_t &.
1268         (dump_generic_expr_loc): Likewise; convert 2nd param from
1269         const dump_location_t & to const dump_user_location_t &.
1270         (dump_printf): Convert 1st param from dump_flags_t to
1271         const dump_metadata_t &.
1272         (dump_printf_loc): Likewise; convert 2nd param from
1273         const dump_location_t & to const dump_user_location_t &.
1274         (dump_dec): Convert 1st param from dump_flags_t to
1275         const dump_metadata_t &.
1276         (dump_symtab_node): Likewise.
1277         (dump_begin_scope): Split out 2nd param into user and impl
1278         locations.
1279         (selftest::assert_impl_location_eq): New function.
1280         (ASSERT_IMPL_LOCATION_EQ): New macro.
1281         (selftest::test_impl_location): Update to use
1282         ASSERT_IMPL_LOCATION_EQ.
1283         (selftest::test_capture_of_dump_calls): Convert "loc" to
1284         dump_user_location_t.  Add ASSERT_IMPL_LOCATION_EQ throughout,
1285         verifying line numbers of dump emissions.
1286         * dumpfile.h (class dump_metadata_t): New class.
1287         (dump_printf): Convert 1st param from dump_flags_t to
1288         const dump_metadata_t &.
1289         (dump_printf_loc): Likewise; convert 2nd param from
1290         const dump_location_t & to const dump_user_location_t &.
1291         (dump_generic_expr_loc): Likewise.
1292         (dump_generic_expr): Convert 1st param from dump_flags_t to
1293         const dump_metadata_t &.
1294         (dump_gimple_stmt_loc): Likewise; convert 2nd param from
1295         const dump_location_t & to const dump_user_location_t &.
1296         (dump_gimple_stmt): Convert 1st param from dump_flags_t to
1297         const dump_metadata_t &.
1298         (dump_gimple_expr_loc): Likewise; convert 2nd param from
1299         const dump_location_t & to const dump_user_location_t &.
1300         (dump_gimple_expr): Convert 1st param from dump_flags_t to
1301         const dump_metadata_t &.
1302         (dump_symtab_node): Likewise.
1303         (dump_dec): Likewise.
1304         (dump_begin_scope): Split out 2nd param into user and impl
1305         locations.
1306         (auto_dump_scope::auto_dump_scope): Split "loc" param into a user
1307         location and impl_location, and capture the impl_location.
1308         (AUTO_DUMP_SCOPE): Rename param from LOC to USER_LOC.
1309         * loop-unroll.c (report_unroll): Update for changes to
1310         dump_printf_loc and dump_printf.
1311         * opt-problem.cc (opt_problem::opt_problem): Update for change to
1312         dump_loc.
1313         * optinfo-emit-json.cc
1314         (selftest::test_building_json_from_dump_calls): Convert "loc" from
1315         dump_location_t to dump_user_location_t.
1316         * optinfo.cc (optinfo::emit_for_opt_problem): Update for change in
1317         dump_loc_immediate.
1318         * profile.c (compute_branch_probabilities): Update for change to
1319         dump_printf_loc.
1320         * selftest.h (ASSERT_STR_CONTAINS_AT): New macro.
1321         * tree-vect-slp.c (vect_print_slp_tree): Update for change to
1322         dump_printf_loc.
1324 2018-11-27  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1326         * doc/sourcebuild.texi: Document check_effective_target_int_eq_float
1327         and check_effective_target_ptr_eq_long.
1329 2018-11-27  Alan Modra  <amodra@gmail.com>
1331         * config.gcc (powerpc*-*-freebsd*, powerpc-*-netbsd*),
1332         (powerpc-*-eabisimaltivec*, powerpc-*-eabisim*, powerpc-*-elf*),
1333         (powerpc-*-eabialtivec*, powerpc-*-eabi*, powerpc-*-rtems*),
1334         (powerpc-wrs-vxworks*, powerpc-*-lynxos*, powerpcle-*-elf*),
1335         (powerpcle-*-eabisim*, powerpcle-*-eabi*): Add gnu-user.h to tm_file.
1336         * config/rs6000/freebsd.h (CPLUSPLUS_CPP_SPEC),
1337         (LINK_GCC_C_SEQUENCE_SPEC): Undef.
1338         (ASM_APP_ON, ASM_APP_OFF): Don't define.
1339         * config/rs6000/freebsd64.h (ASM_APP_ON, ASM_APP_OFF): Don't define.
1340         * config/rs6000/lynx.h (ASM_APP_ON, ASM_APP_OFF): Don't define.
1341         * config/rs6000/linux64.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
1342         * config/rs6000/netbsd.h (CPLUSPLUS_CPP_SPEC),
1343         (LINK_GCC_C_SEQUENCE_SPEC): Undef.
1344         * config/rs6000/rtems.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
1345         * config/rs6000/sysv4.h (GNU_USER_TARGET_CRTI): Redefine.
1346         (GNU_USER_TARGET_CRTN): Redefine.
1347         (CC1_SPEC): Use GNU_USER_TARGET_CC1_SPEC.
1348         (LIB_LINUX_SPEC): Use GNU_USER_TARGET_LIB_SPEC.
1349         (CRTOFFLOADBEGIN, CRTOFFLOADEND): Don't define.
1350         (STARTFILE_LINUX_SPEC): Define as GNU_USER_TARGET_STARTFILE_SPEC.
1351         (ENDFILE_LINUX_SPEC): Define as GNU_USER_TARGET_ENDFILE_SPEC.
1352         (UCLIBC_DYNAMIC_LINKER, CHOOSE_DYNAMIC_LINKER): Don't define.
1353         (LINK_EH_SPEC): Don't define.
1355 2018-11-26  Martin Sebor  <msebor@redhat.com>
1357         PR 87756
1358         * expr.c (string_constant): Handle top-level decls of all character
1359         types and subobjects of narrow character type.
1361 2018-11-27  Alan Modra  <amodra@gmail.com>
1363         * config.gcc (powerpc*-*-linux*): Add linux.h to tm_file.
1364         * config/rs6000/linux.h (TARGET_OS_CPP_BUILTINS): Use
1365         GNU_USER_TARGET_OS_CPP_BUILTINS.
1366         (RS6000_ABI_NAME): Define.
1367         * config/rs6000/linux64.h (TARGET_OS_CPP_BUILTINS): Use
1368         GNU_USER_TARGET_OS_CPP_BUILTINS.
1369         (MUSL_DYNAMIC_LINKER32): Undef before defining.
1370         (UCLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER64): Don't define.
1371         (CHOOSE_DYNAMIC_LINKER): Don't define.
1372         (GNU_USER_DYNAMIC_LINKER32, GNU_USER_DYNAMIC_LINKER64): Don't define.
1373         * config/rs6000/sysv4.h (MUSL_DYNAMIC_LINKER): Undef before defining.
1374         (CHOOSE_DYNAMIC_LINKER, GNU_USER_DYNAMIC_LINKER): Only define when
1375         not already defined.
1376         (CPP_OS_LINUX_SPEC): Remove defines and asserts handled by
1377         TARGET_OS_CPP_BUILTINS.
1379 2018-11-26  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1381         * doc/sourcebuild.texi: Document check_effective_target_newlib_nano_io.
1383 2018-11-26  Jakub Jelinek  <jakub@redhat.com>
1385         PR target/88195
1386         * config/i386/i386.c (def_builtin2): If tcode == VOID_FTYPE_UINT64
1387         and !TARGET_64BIT, return NULL_TREE.
1389         PR c++/86900
1390         * dwarf2out.c (secname_for_decl): For functions with
1391         DECL_SECTION_NAME if in_cold_section_p, try to return
1392         current_function_section's name if it is a named section.
1394 2018-11-26  Maya Rashish  <coypu@sdf.org>
1396         PR target/58397
1397         * config.host (*-*-netbsd*): Use x-netbsd and host-netbsd.o.
1398         * config/x-netbsd: New file.
1399         * config/host-netbsd: New file.
1401 2018-11-26  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1403         * doc/sourcebuild.texi: Document check_effective_target_size20plus.
1404         Clarify documentation for check_effective_target_size32plus.
1406 2018-11-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
1408         * config/rs6000/rs6000-string.c (expand_cmp_vec_sequence): Rename
1409         and modify expand_strncmp_vec_sequence.
1410         (emit_final_compare_vec): Rename and modify emit_final_str_compare_vec.
1411         (generate_6432_conversion): New function.
1412         (expand_block_compare): Add support for vsx.
1413         (expand_block_compare_gpr): New function.
1414         * config/rs6000/rs6000.opt (rs6000_block_compare_inline_limit): Increase
1415         default limit to 63 because of more compact vsx code.
1417 2018-11-26  Uros Bizjak  <ubizjak@gmail.com>
1419         PR target/88178
1420         * config/i386/i386.c (dbx_register_map): Use IGNORED_DWARF_REGNUM
1421         for registers for which no debug information can be generated.
1422         Use INVALID_REGNUM for non-existent registers.
1423         (dbx64_register_map): Ditto.
1424         (svr4_dbx_register_map): Ditto.
1426 2018-11-26  Sandra Loosemore  <sandra@codesourcery.com>
1428         PR c/57182
1429         * doc/invoke.texi (Optimize Options): Document that
1430         -freorder-functions also uses "hot" and "cold" attributes.
1432 2018-11-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1434         * config/aarch64/aarch64.c (aarch64_mangle_type): Fix typo in comment.
1436 2018-11-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1438         * config/arm/types.md (mul64): Rename to...
1439         (widen_mul64): ... This.
1440         * config/arm/arm-generic.md: Rename mul64 to widen_mul64.
1441         * config/arm/cortex-a15.md: Likewise.
1442         * config/arm/cortex-a5.md: Likewise.
1443         * config/arm/cortex-a53.md: Likewise.
1444         * config/arm/cortex-a57.md: Likewise.
1445         * config/arm/cortex-a7.md: Likewise.
1446         * config/arm/cortex-m4.md: Likewise.
1447         * config/arm/exynos-m1.md: Likewise.
1448         * config/arm/marvell-pj4.md: Likewise.
1449         * config/arm/xgene1.md: Likewise.
1451 2018-11-26  Richard Biener  <rguenther@suse.de>
1453         PR tree-optimization/88182
1454         * tree-vect-loop.c (vectorizable_reduction): Pick up single
1455         correct reduc_def_info.
1456         * tree-vect-slp.c (vect_analyze_slp_instance): Set
1457         STMT_VINFO_REDUC_DEF of the first stmt.
1459 2018-11-26  Andreas Krebbel  <krebbel@linux.ibm.com>
1461         * doc/invoke.texi: Document z14/arch12 -march option.
1463 2018-11-25  Sandra Loosemore  <sandra@codesourcery.com>
1465         PR c/57166
1466         * doc/invoke.texi (Option Summary): Add -Wmissing-noreturn.
1467         (Warning Options): Likewise.
1469 2018-11-25  Sandra Loosemore  <sandra@codesourcery.com>
1471         PR web/79738
1472         * doc/extend.texi (Common Function Attributes): Clarify that
1473         functions with "const" attribute can read const global variables.
1475 2018-11-26  Alan Modra  <amodra@gmail.com>
1477         * config/rs6000/rs6000.h (OBJECT_PEF, TARGET_MACOS): Delete.
1479 2018-11-25  Sandra Loosemore  <sandra@codesourcery.com>
1481         PR other/54265
1482         * doc/extend.texi (Common Variable Attributes): Use preferred
1483         placement of type attributes in examples, plus whitespace fixes.
1484         (Type Attributes): Clarify why placement of attributes
1485         immediately after struct/union/enum keyword is preferred.
1486         (Common Type Attributes): Use preferred placement of type
1487         attributes in examples, plus more whitespace fixes.
1489 2018-11-25  Paul Koning  <ni1d@arrl.net>
1491         * config/pdp11/pdp11.h (TARGET_HAS_NO_HW_DIVIDE): Define.
1493 2018-11-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1495         * doc/sourcebuild.texi (Effective-Target Keywords, Environment
1496         attributes): Document d_runtime.
1498 2018-11-25  Vladimir Makarov  <vmakarov@redhat.com>
1500         PR bootstrap/88157
1501         * ira-costs.c (record_operand_costs): Initiate register move cost
1502         for mode.
1504 2018-11-23  Jeff Law  <law@redhat.com>
1506         PR rtl-optimization/87468
1507         * tree-ssa-threadupdate.c (create_block_for_threading): Clear
1508         EDGE_IGNORE on all outgoing edges of the duplicate block.
1510 2018-11-23  Vladimir Makarov  <vmakarov@redhat.com>
1512         PR bootstrap/88157
1513         * ira-costs.c (record_operand_costs): Use bigger hard reg class if
1514         its mode does not fit to the original class.
1516 2018-11-23  Martin Sebor  <msebor@redhat.com>
1518         PR tree-optimization/87756
1519         * expr.c (string_constant): Synthesize a string literal from
1520         the address of a constant character.
1521         * tree.c (build_string_literal): Add an argument.
1522         * tree.h (build_string_literal): Same.
1524 2018-11-23  Christoph Muellner  <christoph.muellner@theobroma-systems.com>
1526         * config/aarch64/aarch64-cores.def: Define emag.
1527         * config/aarch64/aarch64-tune.md: Regenerated with emag.
1528         * config/aarch64/aarch64.c (emag_tunings): New struct.
1529         * doc/invoke.texi: Document mtune value.
1531 2018-11-23  Christoph Muellner  <christoph.muellner@theobroma-systems.com>
1532             Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
1534         * config/aarch64/aarch64.c (xgene1_tunings): Optimize Xgene1 tunings
1535         for GCC 9.
1536         * config/aarch64/aarch64.c (xgene1_tunings): Add Xgene1 specific
1537         prefetch tunings.
1538         * config/aarch64/aarch64.c (xgene1_addrcost_table): Correct the post-modify
1539         costs.
1540         * config/arm/aarch-cost-tables.h (xgene1_extra_costs): Update the cost table
1541         for XGene1.
1543 2018-11-23  Richard Biener  <rguenther@suse.de>
1545         PR tree-optimization/88149
1546         * tree-vect-slp.c (vect_slp_analyze_node_operations): Detect
1547         the case where there are two different def types for the
1548         same operand at different operand position in the same stmt.
1550 2018-23-11  Mihail Ionescu  <mihail.ionescu@arm.com>
1552         * config/arm/arm.c (arm_expand_compare_and_swap): Simplify and call
1553         gen_atomic_compare_swap_1.
1554         (arm_evpc_neon_vuzp): Likewise gen_neon_vuzp_internal.
1555         (arm_evpc_neon_vtrn): Likewise gen_neon_vtrn_internal.
1556         (arm_evpc_neon_vext): Likewise gen_neon_vext_internal.
1557         (arm_evpc_neon_vzip): Likewise gen_neon_vzip_internal.
1558         (arm_evpc_neon_vrev): Replace the function pointer and simplify the mode
1559         checks.
1560         * config/arm/arm.md (neon_vext<mode>),
1561         (neon_vrev64<mode>, neon_vrev32<mode>),
1562         (neon_vrev16<mode>, neon_vtrn<mode>_internal),
1563         (neon_vzip<mode>_internal, neon_vuzp<mode>_internal): Add an '@'character
1564         before the pattern name.
1565         * config/arm/sync.md:
1566         (atomic_compare_and_swap<CCSI:arch><NARROW:mode>_1),
1567         (atomic_compare_and_swap<CCSI:arch><SIDI:mode>_1): Likewise.
1569 2018-11-23  Jakub Jelinek  <jakub@redhat.com>
1571         PR tree-optimization/86614
1572         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return early
1573         if TREE_NO_WARNING is set on ref.ref.
1575 2018-11-22  Sandra Loosemore  <sandra@codesourcery.com>
1576             Alan Coopersmith  <alan.coopersmith@oracle.com>
1578         PR c/53608
1579         * doc/extend.texi (Designated Inits): Clarify handling of multiple
1580         initializers for unions.
1582 2018-11-22  Jan Hubicka  <jh@suse.cz>
1584         PR lto/88142
1585         * ipa-devirt.c (type_variants_equivalent_p): Drop warn and warned
1586         parameters; do not warn here.
1587         (odr_subtypes_equivalent_p): Likewise.
1588         (warn_odr): Fix typo.
1589         (warn_types_mismatch): Do not output confused warnings on integer types.
1590         (odr_types_equivalent_p): Update.
1592 2018-11-22  Jakub Jelinek  <jakub@redhat.com>
1594         * config/i386/i386.c (ix86_option_override_internal,
1595         ix86_can_inline_p, classify_argument, construct_container,
1596         ix86_expand_prologue, ix86_expand_split_stack_prologue,
1597         ix86_expand_carry_flag_compare, expand_set_or_movmem_via_loop,
1598         expand_setmem_epilogue_via_loop, promote_duplicated_reg,
1599         ix86_expand_set_or_movmem, ix86_init_builtins_va_builtins_abi):
1600         Formatting fixes.
1602         * config/i386/i386.c (ix86_option_override_internal): For
1603         stack_protector_guard related options, use opts_set->x_ instead
1604         of global_options_set. and prefix options with opts->x_ .  Move
1605         defaults for offset and reg into else block.
1607 2018-11-22  Uros Bizjak  <ubizjak@gmail.com>
1609         * config/i386/i386.c (ix86_check_avx_upper_register):
1610         Return true for all SSE registers with mode bitsize > 128.
1612 2018-11-22  Vladimir Makarov  <vmakarov@redhat.com>
1614         PR rtl-optimization/87718
1615         * ira-costs.c: Remove trailing white-spaces.
1616         (record_operand_costs): Add a special treatment for moves
1617         involving a hard register.
1619 2018-11-22  Uros Bizjak  <ubizjak@gmail.com>
1621         * config/i386/i386.c (ix86_avx_emit_vzeroupper): Remove.
1622         (ix86_emit_mode_set) <case AVX_U128>: Emit vzeroupper here.
1624 2018-11-22  Martin Liska  <mliska@suse.cz>
1626         * common/config/i386/i386-common.c (processor_names): Add
1627         static assert and add missing "znver2".
1628         (ix86_get_valid_option_values): Add checking assert for null
1629         values and add "native" value if feasible.
1630         * config/i386/i386.h: Do not declare size of processor_names.
1631         * common/config/i386/i386-common.c:
1632         * config/i386/i386.c: Add static assert for size
1633         of processor_cost_table.
1635 2018-11-22  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
1637         * target-insns.def (stack_protect_combined_set): Define new standard
1638         pattern name.
1639         (stack_protect_combined_test): Likewise.
1640         * cfgexpand.c (stack_protect_prologue): Try new
1641         stack_protect_combined_set pattern first.
1642         * function.c (stack_protect_epilogue): Try new
1643         stack_protect_combined_test pattern first.
1644         * config/arm/arm.c (require_pic_register): Add pic_reg and compute_now
1645         parameters to control which register to use as PIC register and force
1646         reloading PIC register respectively.  Insert in the stream of insns if
1647         possible.
1648         (legitimize_pic_address): Expose above new parameters in prototype and
1649         adapt recursive calls accordingly.  Use pic_reg if non null instead of
1650         cached one.
1651         (arm_load_pic_register): Add pic_reg parameter and use it if non null.
1652         (arm_legitimize_address): Adapt to new legitimize_pic_address
1653         prototype.
1654         (thumb_legitimize_address): Likewise.
1655         (arm_emit_call_insn): Adapt to require_pic_register prototype change.
1656         (arm_expand_prologue): Adapt to arm_load_pic_register prototype change.
1657         (thumb1_expand_prologue): Likewise.
1658         * config/arm/arm-protos.h (legitimize_pic_address): Adapt to prototype
1659         change.
1660         (arm_load_pic_register): Likewise.
1661         * config/arm/predicated.md (guard_addr_operand): New predicate.
1662         (guard_operand): New predicate.
1663         * config/arm/arm.md (movsi expander): Adapt to legitimize_pic_address
1664         prototype change.
1665         (builtin_setjmp_receiver expander): Adapt to thumb1_expand_prologue
1666         prototype change.
1667         (stack_protect_combined_set): New expander..
1668         (stack_protect_combined_set_insn): New insn_and_split pattern.
1669         (stack_protect_set_insn): New insn pattern.
1670         (stack_protect_combined_test): New expander.
1671         (stack_protect_combined_test_insn): New insn_and_split pattern.
1672         (arm_stack_protect_test_insn): New insn pattern.
1673         * config/arm/thumb1.md (thumb1_stack_protect_test_insn): New insn pattern.
1674         * config/arm/unspecs.md (UNSPEC_SP_SET): New unspec.
1675         (UNSPEC_SP_TEST): Likewise.
1676         * doc/md.texi (stack_protect_combined_set): Document new standard
1677         pattern name.
1678         (stack_protect_set): Clarify that the operand for guard's address is
1679         legal.
1680         (stack_protect_combined_test): Document new standard pattern name.
1681         (stack_protect_test): Clarify that the operand for guard's address is
1682         legal.
1684 2018-11-22  Richard Biener  <rguenther@suse.de>
1686         PR tree-optimization/88148
1687         * tree-ssa-loop-niter.c (simplify_replace_tree): Get optional
1688         valueization callback parameter and handle it.
1689         * tree-ssa-loop-niter.h (simplify_replace_tree): Export.
1690         * tree-ssa-sccvn.c (process_bb): Eliminate in loop niter trees.
1692 2018-11-22  Richard Biener  <rguenther@suse.de>
1694         PR lto/87229
1695         PR lto/88112
1696         * lto-streamer-out.c (lto_is_streamable): Allow CALL_EXPRs
1697         which can appear in size expressions.
1698         * tree-streamer-in.c (unpack_ts_base_value_fields): Stream
1699         CALL_EXPR_BY_DESCRIPTOR.
1700         (streamer_read_tree_bitfields): Stream CALL_EXPR_IFN.
1701         * tree-streamer-out.c (pack_ts_base_value_fields): Stream
1702         CALL_EXPR_BY_DESCRIPTOR.
1703         (streamer_write_tree_bitfields): Stream CALL_EXPR_IFN.
1705         Revert
1706         PR lto/87229
1707         * tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
1708         sizepos values.
1710 2018-11-22  Richard Biener  <rguenther@suse.de>
1712         PR tree-optimization/88069
1713         * tree-ssa-sccvn.c (visit_phi): Tweak previous fix to not
1714         apply to default defs.
1716 2018-11-22  Jakub Jelinek  <jakub@redhat.com>
1718         PR target/85644
1719         PR target/86832
1720         * config/i386/i386.c (ix86_option_override_internal): Default
1721         ix86_stack_protector_guard to SSP_TLS only if TARGET_THREAD_SSP_OFFSET
1722         is defined.
1723         * config/i386/i386.md (stack_protect_set, stack_protect_set_<mode>,
1724         stack_protect_test, stack_protect_test_<mode>): Use empty condition
1725         instead of TARGET_SSP_TLS_GUARD.
1727 2018-11-22  Martin Liska  <mliska@suse.cz>
1729         PR sanitizer/88017
1730         * config/i386/i386.c (ix86_option_override_internal): Error
1731         about usage -mabi=ms and -fsanitize=thread.
1733 2018-11-21  Uros Bizjak  <ubizjak@gmail.com>
1735         Revert the revert:
1736         2013-10-26  Vladimir Makarov  <vmakarov@redhat.com>
1738         Revert:
1739         2013-10-25  Vladimir Makarov  <vmakarov@redhat.com>
1741         * lra-spills.c (lra_final_code_change): Remove useless move insns.
1743 2018-11-21  Uros Bizjak  <ubizjak@gmail.com>
1745         PR middle-end/88129
1746         * function.c (expand_function_end): Do not emit extra blockage insn.
1748 2018-11-21  Lokesh Janghel  <lokeshjanghel91@gmail.com>
1750         PR target/85667
1751         * config/i386/i386.c (function_value_ms_64): Return AX_REG instead
1752         of FIRST_SSE_REG for 4 or 8 byte modes.
1754 2018-11-21  Jan Hubicka  <jh@suse.cz>
1756         PR lto/87957
1757         * tree.c (fld_decl_context): Break out from ...
1758         (free_lang_data_in_decl): ... here; free TREE_PUBLIC, TREE_PRIVATE
1759         DECL_ARTIFICIAL of TYPE_DECL; do not free TREE_TYPE of TYPE_DECL.
1760         (fld_incomplete_type_of): Build copy of TYP_DECL.
1761         * ipa-devirt.c (free_enum_values): Rename to ...
1762         (free_odr_warning_data): ... this one; free also duplicated TYPE_DECLs
1763         and TREE_TYPEs of TYPE_DECLs.
1764         (get_odr_type): Initialize odr_vtable_hash if needed.
1766 2018-11-21  Alexandre Oliva <oliva@adacore.com>
1768         * final.c (compute_discriminator): Declare.  Renamed from...
1769         (maybe_set_discriminator): ... this.  Set and return a local.
1770         (override_discriminator): New.
1771         (final_scan_insn_1): Set it.
1772         (notice_source_line): Adjust.  Always set discriminator.
1774 2018-11-21  Jakub Jelinek  <jakub@redhat.com>
1776         PR target/87839
1777         * config/aarch64/atomics.md (@aarch64_compare_and_swap<mode>): Use
1778         rIJ constraint for aarch64_plus_operand rather than rn.
1780 2018-11-21  Renlin Li  <renlin.li@arm.com>
1782         PR middle-end/84877
1783         * explow.h (get_dynamic_stack_size): Declare it as external.
1784         * explow.c (record_new_stack_level): Remove function static attribute.
1785         * function.c (assign_stack_local_1): Dynamically align the stack slot
1786         addr for parameter copy on the stack.
1788 2018-11-21  Richard Biener  <rguenther@suse.de>
1790         PR bootstrap/88133
1791         * bitmap.c (bitmap_last_set_bit): Refactor to avoid warning.
1792         * Makefile.in (bitmap.o-warn): Remove again.
1794 2018-11-20  Jeff Law  <law@redhat.com>
1796         PR tree-optimization/88069
1797         * tree-ssa-dom.c (record_equivalences_from_phis): Propagate away
1798         degenerate virtual PHIs.
1800 2018-11-21  H.J. Lu  <hongjiu.lu@intel.com>
1802         PR target/87317
1803         * config/i386/sse.md (sse4_1_<code>v8qiv8hi2<mask_name>): Replace
1804         nonimmediate_operand with register_operand.
1805         (avx2_<code>v8qiv8si2<mask_name>): Likewise.
1806         (sse4_1_<code>v4qiv4si2<mask_name>): Likewise.
1807         (sse4_1_<code>v4hiv4si2<mask_name>): Likewise.
1808         (sse4_1_<code>v2qiv2di2<mask_name>): Likewise.
1809         (avx512f_<code>v8qiv8di2<mask_name>): Likewise.
1810         (avx2_<code>v4qiv4di2<mask_name>): Likewise.
1811         (avx2_<code>v4hiv4di2<mask_name>): Likewise.
1812         (sse4_1_<code>v2hiv2di2<mask_name>): Likewise.
1813         (sse4_1_<code>v2siv2di2<mask_name>): Likewise.
1814         (*sse4_1_<code>v8qiv8hi2<mask_name>_1): New pattern.
1815         (*sse4_1_<code>v8qiv8hi2<mask_name>_2): Likewise.
1816         (*avx2_<code>v8qiv8si2<mask_name>_1): Likewise.
1817         (*avx2_<code>v8qiv8si2<mask_name>_2): Likewise.
1818         (*sse4_1_<code>v4qiv4si2<mask_name>_1): Likewise.
1819         (*sse4_1_<code>v4qiv4si2<mask_name>_2): Likewise.
1820         (*sse4_1_<code>v4hiv4si2<mask_name>_1): Likewise.
1821         (*sse4_1_<code>v4hiv4si2<mask_name>_2): Likewise.
1822         (*avx512f_<code>v8qiv8di2<mask_name>_1): Likewise.
1823         (*avx512f_<code>v8qiv8di2<mask_name>_2): Likewise.
1824         (*avx2_<code>v4qiv4di2<mask_name>_1): Likewise.
1825         (*avx2_<code>v4qiv4di2<mask_name>_2): Likewise.
1826         (*avx2_<code>v4hiv4di2<mask_name>_1): Likewise.
1827         (*avx2_<code>v4hiv4di2<mask_name>_2): Likewise.
1828         (*sse4_1_<code>v2hiv2di2<mask_name>_1): Likewise.
1829         (*sse4_1_<code>v2hiv2di2<mask_name>_2): Likewise.
1830         (*sse4_1_<code>v2siv2di2<mask_name>_1): Likewise.
1831         (*sse4_1_<code>v2siv2di2<mask_name>_2): Likewise.
1833 2018-11-21  H.J. Lu  <hongjiu.lu@intel.com>
1835         * read-rtl.c (apply_subst_iterator): Handle define_split and
1836         define_insn_and_split.
1838 2018-11-21  Jakub Jelinek  <jakub@redhat.com>
1840         PR rtl-optimization/87817
1841         * config/i386/i386.md (bmi2_bzhi_<mode>3, *bmi2_bzhi_<mode>3,
1842         *bmi2_bzhi_<mode>3_1, *bmi2_bzhi_<mode>3_1_ccz): Use IF_THEN_ELSE
1843         in the pattern to avoid triggering UB when operands[2] is zero.
1844         (tbm_bextri_<mode>): New expander.  Renamed the old define_insn to ...
1845         (*tbm_bextri_<mode>): ... this.
1847 2018-11-21  Tom de Vries  <tdevries@suse.de>
1849         PR driver/79855
1850         * params.def (HOT_BB_COUNT_FRACTION): Terminate help message with
1851         period.
1853 2018-11-21  Andreas Krebbel  <krebbel@linux.ibm.com>
1855         * configure.ac: Add check for Binutils to determine whether vector
1856         load/store alignments hints are being supported.
1857         * config.in: Regenerate.
1858         * configure: Regenerate.
1859         * config/s390/s390.c (print_operand): Support new output
1860         modifier A.
1861         * config/s390/s390.md ("movti"): Append alignment hint output
1862         using the new output modifier 'A'.
1863         * config/s390/vector.md ("mov<mode>", "*vec_tf_to_v1tf")
1864         ("*vec_ti_to_v1ti"): Likewise.
1866 2018-11-20  Martin Sebor  <msebor@redhat.com>
1868         * doc/extend.texi (Other Builtins): Add __builtin_has_attribute.
1870 2018-11-20  Jan Hubicka  <hubicka@ucw.cz>
1872         PR lto/84044
1873         * ipa-devirt.c (odr_types_equivalent_p): Use operand_equal_p to
1874         compare ENUM values.
1876 2018-11-20  Jakub Jelinek  <jakub@redhat.com>
1878         PR tree-optimization/87895
1879         * omp-simd-clone.c (ipa_simd_modify_function_body): When removing
1880         or replacing GIMPLE_RETURN, set EDGE_FALLTHRU on the edge to EXIT.
1881         (simd_clone_adjust): Don't set EDGE_FALLTHRU here. In a loop that
1882         redirects edges to EXIT to edges to incr_bb, iterate while EXIT
1883         has any preds and always use EDGE_PRED (, 0).
1885 2018-11-20  Uros Bizjak  <ubizjak@gmail.com>
1887         PR target/88070
1888         * mode-switching.c (create_pre_exit): After reload, always split the
1889         fallthrough edge to the exit block.
1891 2018-11-20  Jan Hubicka  <hubicka@ucw.cz>
1893         * ipa-devirt.c (add_type_duplicate): Do not ICE on incomplete enums.
1894         * tree.c (build_array_type_1): Forward declare.
1895         (fld_type_variant_equal_p): Add INNER_TYPE parameter.
1896         (fld_type_variant): Likewise.
1897         (fld_simplified_types): New hash.
1898         (fld_process_array_type): New function.
1899         (fld_incomplete_type_of): Handle array and enumeration types.
1900         (fld_simplified_type): Handle simplification of arrays.
1901         (free_lang_data): Allocate and free simplified types hash.
1903 2018-11-20  Jan Hubicka  <hubicka@ucw.cz>
1905         PR lto/87957
1906         * ipa-devirt.c (odr_subtypes_equivalent_p): Report ODR violation
1907         when sybtype already violates ODR.
1908         (get_odr_type): Do not ICE when insert is false and type duplicate
1909         is not registered yet.
1910         (register_odr_type): Be sure to register subtypes first.
1912 2018-11-20  Andreas Krebbel  <krebbel@linux.ibm.com>
1914         * config/s390/s390.md ("clztidi2"): Swap the RTX's written to the
1915         DImode parts of the target operand.
1917 2018-11-20  Nathan Sidwell  <nathan@acm.org>
1919         PR 87926
1920         * Makefile.in (bitmap.o-warn): Use -Wno-error=array-bounds.
1922 2018-11-20  Jan Hubicka  <hubicka@ucw.cz>
1924         PR lto/87997
1925         * tree.c (free_lang_data_in_cgraph): Add argument fld; break out
1926         type checking to...
1927         (free_lang_data) ... here; update call of free_lang_data_in_cgraph.
1929 2018-11-20  Jan Hubicka  <hubicka@ucw.cz>
1931         PR ipa/87706
1932         * ipa-fnsummary.c (pass_ipa_fnsummary): Do not remove functions
1933         * ipa.c (possible_inline_candidate_p): Break out from ..
1934         (process_references): ... here ; drop before_inlining_p;
1935         cleanup handling of alises.
1936         (walk_polymorphic_call_targets): Likewise.
1937         (symbol_table::remove_unreachable_nodes): Likewise.
1938         * passes.c (pass_data_ipa_remove_symbols): New structure.
1939         (pass_ipa_remove_symbols): New pass.
1940         (make_pass_ipa_remove_symbols): New function.
1941         * tree-pass.h (make_pass_ipa_remove_symbols): Declare.
1942         * passes.def (pass_ipa_remove_symbols): Schedule after early passes.
1944 2018-11-20  Richard Biener  <rguenther@suse.de>
1946         * tree-vect-stmts.c (vectorizable_condition): Do not get
1947         at else_clause vect def for EXTRACT_LAST_REDUCTION.  Remove
1948         pointless vect_is_simple_use calls.
1950 2018-11-20  Richard Biener  <rguenther@suse.de>
1952         PR tree-optimization/88074
1953         * tree-ssa-dom.c (pass_dominator::execute): Do not walk
1954         backedges.
1956 2018-11-20  Richard Biener  <rguenther@suse.de>
1958         PR tree-optimization/88069
1959         * tree-ssa-sccvn.c (visit_phi): Do not value-number to unvisited
1960         virtual PHI arguments.
1962 2018-11-20  Ilya Leoshkevich  <iii@linux.ibm.com>
1964         PR target/88083
1965         * config/s390/s390.md: Skip LT(G) peephole when literal pool is
1966         involved.
1967         * rtl.h (contains_constant_pool_address_p): New function.
1968         * rtlanal.c (contains_constant_pool_address_p): Likewise.
1970 2018-11-20  Richard Biener  <rguenther@suse.de>
1972         PR middle-end/83215
1973         * alias.c (component_uses_parent_alias_set_from): Remove
1974         alias-set zero and TYPE_TYPELESS_STORAGE case both already
1975         handled in other ways.
1977 2018-11-20  Richard Biener  <rguenther@suse.de>
1979         PR tree-optimization/88087
1980         * tree-ssa-pre.c (create_expression_by_pieces): Re-materialize
1981         call fntype.
1982         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Remember
1983         call fntype.
1985 2018-11-20  Richard Biener  <rguenther@suse.de>
1987         PR middle-end/88089
1988         * tree-data-ref.c (lambda_matrix_right_hermite): Use abs_hwi.
1990 2018-11-19  Jan Hubicka  <hubicka@ucw.cz>
1992         PR lto/87957
1993         * ipa-devirt.c (free_enum_values): Do not ICE on ODR vilations.
1995 2018-11-19  Sandra Loosemore  <sandra@codesourcery.com>
1997         PR driver/50250
1998         * doc/invoke.texi (Link Options): Mention shared libraries
1999         in documentation for the -l option.  Simplify discussion and
2000         point to the system linker documentation for details.
2002 2018-11-19  Peter Bergner  <bergner@linux.ibm.com>
2004         PR rtl-optimization/88033
2005         * ira-lives.c (non_conflicting_reg_copy_p): Skip copies from a register
2006         to itself.  Use HARD_REGISTER_NUM_P.
2008 2018-11-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2010         * tree-vect-loop.c (vect_transform_loop): Disable further unrolling
2011         of the loop if vf is non-constant.
2013 2018-11-19  David Malcolm  <dmalcolm@redhat.com>
2015         PR tree-optimization/87025
2016         * dumpfile.c (dump_context::begin_scope): Call end_any_optinfo
2017         immediately after creating the scope optinfo.
2018         (selftest::test_pr87025): New function.
2019         (selftest::dumpfile_c_tests): Call it.
2020         * optinfo-emit-json.cc (optrecord_json_writer::pop_scope): Assert
2021         that we're not popping the top-level records array.
2022         * optinfo.cc (optinfo::handle_dump_file_kind): Assert that we're
2023         not changing the kind of a "scope" optinfo.
2025 2018-11-19  David Malcolm  <dmalcolm@redhat.com>
2027         PR tree-optimization/87025
2028         * dump-context.h: Include "optinfo.h".
2029         (class optrecord_json_writer): New forward decl.
2030         (dump_context::forcibly_enable_optinfo_p): Delete.
2031         (dump_context::optinfo_enabled_p): New member function.
2032         (dump_context::optimization_records_enabled_p): New member
2033         function.
2034         (dump_context::set_json_writer): New member function.
2035         (dump_context::emit_optinfo): New member function.
2036         (dump_context::m_forcibly_enable_optinfo): Delete.
2037         (dump_context::m_json_writer): New member data.
2038         * dumpfile.c (dump_context::set_json_writer): New member function.
2039         (dump_context::finish_any_json_writer): New member function.
2040         (dump_context::end_scope): Replace call to
2041         optimization_records_maybe_pop_dump_scope with call to
2042         m_json_writer->pop_scope.
2043         (dump_context::optinfo_enabled_p): New member function.
2044         (dump_context::end_any_optinfo): Replace call to optinfo::emit with call
2045         to dump_context::emit_optinfo.
2046         (dump_context::emit_optinfo): New member function.
2047         (temp_dump_context::temp_dump_context): Replace
2048         m_forcibly_enable_optinfo with call to set_json_writer.
2049         (temp_dump_context::~temp_dump_context): Clean up any json writer.
2050         * optinfo-emit-json.cc (class optrecord_json_writer): Move to
2051         optinfo-emit-json.h
2052         (the_json_writer): Delete.
2053         (optimization_records_start): Delete.
2054         (optimization_records_finish): Delete.
2055         (optimization_records_enabled_p): Delete, in favor of
2056         dump_context::optimization_records_enabled_p.
2057         (optimization_records_maybe_record_optinfo): Delete.
2058         (optimization_records_maybe_pop_dump_scope): Delete.
2059         * optinfo-emit-json.h: Include "json.h".  Delete forward
2060         decl of opt_pass.
2061         (optimization_records_start): Delete.
2062         (optimization_records_finish): Delete.
2063         (optimization_records_enabled_p): Delete.
2064         (optimization_records_maybe_record_optinfo): Delete.
2065         (optimization_records_maybe_pop_dump_scope): Delete.
2066         (class optrecord_json_writer): Move here from
2067         optinfo-emit-json.cc.
2068         * optinfo.cc (optinfo::emit_for_opt_problem): Replace call
2069         to optinfo::emit with call to dump_context::emit_optinfo.
2070         (optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
2071         (optinfo_enabled_p): Delete, in favor of
2072         dump_context::optinfo_enabled_p.
2073         (optinfo_wants_inlining_info_p): Update for conversion o
2074         optimization_records_enabled_p to a member function of
2075         dump_context.
2076         * optinfo.h (optinfo_enabled_p): Delete, in favor of
2077         dump_context::optinfo_enabled_p.
2078         (optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
2079         * toplev.c: Include "dump-context.h".
2080         (compile_file): Replace call to optimization_records_finish with
2081         dump_context::finish_any_json_writer.
2082         (do_compile): Replace call to optimization_records_start with
2083         conditionally creating a optrecord_json_writer for the
2084         dump_context.
2086 2018-11-19  Jakub Jelinek  <jakub@redhat.com>
2088         PR tree-optimization/88071
2089         * tree-vect-loop.c (vectorize_fold_left_reduction): Pass true instead
2090         of false as last argument to gsi_remove.
2091         * tree-vect-stmts.c (vect_finish_replace_stmt): Pass true instead of
2092         false as last argument to gsi_replace.
2094         PR debug/87039
2095         * omp-expand.c: Don't include debug.h.
2096         (adjust_context_and_scope): Add REGION argument.  Find DECL_CONTEXT
2097         from innermost outer parallel, task, teams or target that has a
2098         child_fn set, or, if there is no such outer region, use
2099         current_function_decl.  Do the DECL_CONTEXT adjustment regardless of
2100         whether a suitable BLOCK is found or not.
2101         (expand_parallel_call, expand_teams_call): Don't call
2102         adjust_context_and_scope here.
2103         (grid_expand_target_grid_body): Revert 2017-01-25 changes.
2104         (expand_omp_taskreg, expand_omp_target): Likewise.  Call
2105         adjust_context_and_scope.
2106         * dwarf2out.c (dwarf2out_early_global_decl): For
2107         decl_function_context recurse instead of calling dwarf2out_decl.
2109 2018-11-20  Eric Botcazou  <ebotcazou@adacore.com>
2111         PR rtl-optimization/85925
2112         * rtl.h (word_register_operation_p): New predicate.
2113         * combine.c (record_dead_and_set_regs_1): Only apply specific handling
2114         for WORD_REGISTER_OPERATIONS targets to word_register_operation_p RTX.
2115         * rtlanal.c (nonzero_bits1): Likewise.  Adjust couple of comments.
2116         (num_sign_bit_copies1): Likewise.
2118 2018-11-19  Richard Biener  <rguenther@suse.de>
2120         PR lto/87229
2121         * tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
2122         sizepos values.
2124 2018-11-19  Eric Botcazou  <ebotcazou@adacore.com>
2126         * compare-elim.c (struct comparison): Add not_in_a field.
2127         (is_not): New static function.
2128         (strip_not): Likewise.
2129         (conforming_compare): Handle a NOT in the first operand.
2130         (can_eliminate_compare): Likewise.
2131         (find_comparison_dom_walker::before_dom_children): Likewise.
2132         (try_eliminate_compare): Likewise.
2133         * config/visium/visium.md (negsi2_insn_set_carry): Turn into...
2134         (neg<mode>2_insn_set_carry): ...this and add missing NEG operation.
2136 2018-11-19  Jonathan Wakely  <jwakely@redhat.com>
2138         * doc/extend.texi (Common Type Attributes): Fix typos.
2140 2018-11-19  Martin Liska  <mliska@suse.cz>
2142         PR gcov-profile/88045
2143         * coverage.c (coverage_begin_function): Add assert.
2145 2018-11-18  Sandra Loosemore  <sandra@codesourcery.com>
2147         PR other/40498
2148         * doc/extend.texi (Common Function Attributes): Document that
2149         no_instrument_function applies to -p and -pg, too.
2150         * doc/invoke.texi (Instrumentation Options): Add cross-references
2151         to docs for -p, -pg, and -finstrument-functions.
2153 2018-11-18  Alan Modra  <amodra@gmail.com>
2155         * config/gnu-user.h (GNU_USER_TARGET_CRTI): Define.
2156         (GNU_USER_TARGET_STARTFILE_SPEC): Use it here.
2157         (GNU_USER_TARGET_CRTN): Define.
2158         (GNU_USER_TARGET_ENDFILE_SPEC): Use it here.
2159         (GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC): Define.
2161 2018-11-18  Alan Modra  <amodra@gmail.com>
2163         * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Delete
2164         !HAVE_LD_PIE variant.
2165         (GNU_USER_TARGET_ENDFILE_SPEC): Likewise.
2167 2018-11-17  Nick Clifton  <nickc@redhat.com>
2168             Sandra Loosemore  <sandra@codesourcery.com>
2170         PR driver/31357
2171         * doc/invoke.texi (Overall Options): Document that --help and
2172         --help=<value> options cannot be combined.
2174 2018-11-17  Jim Wilson  <jimw@sifive.com>
2176         * config/riscv/riscv.c (epilogue_cfa_sp_offset): New.
2177         (riscv_restore_reg): If restoring HARD_FRAME_POINTER_REGNUM, and
2178         epilogue_cfa_sp_offset set, then add REG_CFA_DEF_CFA regnote.
2179         (riscv_expand_epilogue): Initialize epilogue_cfa_sp_offset.  Set it
2180         to step2 if frame_pointer_needed and step1 is 0.
2182 2018-11-17  Sandra Loosemore  <sandra@codesourcery.com>
2184         PR c++/4225
2185         * doc/cpp.texi (System Headers): Add note about implicit
2186         extern "C" block on targets that define SYSTEM_IMPLICIT_EXTERN_C.
2188 2018-11-17  Sandra Loosemore  <sandra@codesourcery.com>
2190         PR c++/4025
2191         * doc/invoke.texi (C++ Dialect Options): Clarify usage of
2192         -fno-implicit-templates.
2194 2018-11-17  Jakub Jelinek  <jakub@redhat.com>
2196         PR tree-optimization/87546
2197         * tree-vect-patterns.c (vect_look_through_possible_promotion): Add
2198         min_precision variable, initially set it to orig_precision, only does
2199         something if op_type's precision is <= min_precision and update
2200         min_precision whenever calling set_op.
2202 2018-11-16  Jan Hubicka  <hubicka@ucw.cz>
2204         PR ipa/87957
2205         * ipa-devirt.c (warn_odr): Look for main variant to get TYPE_DECL.
2207 2018-11-16  Sandra Loosemore  <sandra@codesourcery.com>
2209         * doc/invoke.texi (Option Summary): Fix whitespace and line
2210         breaks in @gccoptlist environments.
2211         (Warning Options): Likewise.
2212         (Optimize Options): Likewise.
2213         (PowerPC SPE Options): Likewise.
2214         (RS/6000 and PowerPC Options): Likewise.
2216 2018-11-16  Jeff Law  <law@redhat.com>
2218         * config/mn10300/mn10300.md (adddi3_degenerate): Remove bogus
2219         gcc_assert.
2221 2018-11-16  Sandra Loosemore  <sandra@codesourcery.com>
2223         PR middle-end/23197
2224         * doc/invoke.texi (Optimize Options): Update options enabled by
2225         fprofile-generate, -fprofile-use, and -fauto-profile.
2227 2018-11-16  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2229         PR target/87927
2230         * target-def.h: Initialize TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP.
2231         Add them to the TARGET_ASM_{,UN}ALIGNED_INT_OP structs.
2232         * target.def: Enumerate TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP in
2233         the byte_op hook.
2234         * target.h: Add psi, pdi, pti to struct asm_int_op definition.
2235         * targhooks.c (default_print_patchable_function_entry): Assert
2236         asm_int_op does not return a NULL string.
2237         * varasm.c (integer_asm_op): Return the op for a partial int type
2238         when the requested size does not correspond to an integer type.
2239         * config/msp430/msp430.c: Initialize TARGET_ASM_{,UN}ALIGNED_PSI_OP.
2240         * doc/tm.texi: Regenerate.
2242 2018-11-12  Jason Merrill  <jason@redhat.com>
2244         * gimplify.c (gimplify_case_label_expr): Handle hot/cold attributes.
2246 2018-11-16  Michael Meissner  <meissner@linux.ibm.com>
2248         * config/rs6000/constraints.md (wF constraint): Remove power9
2249         fusion documentation.  Just document wF's use for power8 fusion.
2250         * config/rs6000/predicates.md (p9_fusion_reg_operand): Delete.
2251         (fusion_gpr_addis): Delete power9 fusion support.  Change power8
2252         fusion support to require the upper 12 bits to be all 0's or all
2253         1's.
2254         (fusion_gpr_mem_load): Add comment.
2255         (fusion_addis_mem_combo_load): Remove power9 fusion support.
2256         (fusion_addis_mem_combo_store): Delete.
2257         (fusion_offsettable_mem_operand): Delete.
2258         * config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Do not set
2259         power8 fusion here.
2260         (ISA_3_0_MASKS_SERVER): Delete power9 fusion.
2261         (POWERPC_MASKS): Delete power9 fusion.
2262         * config/rs6000/rs6000-protos.h (emit_fusion_load_store): Delete.
2263         (fusion_p9_p): Delete.
2264         (expand_fusion_p9_load): Delete.
2265         (expand_fusion_p9_store): Delete.
2266         (emit_fusion_p9_load): Delete.
2267         (emit_fusion_p9_store): Delete.
2268         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Delete power9
2269         fusion support.
2270         (rs6000_option_override_internal): Set power8 fusion based on
2271         whether we are tuning for power8.  Delete power9 fusion support.
2272         (rs6000_opt_masks): Delete -mpower9-fusion switch.
2273         (emit_fusion_load): Rename emit_fusion_load_store to
2274         emit_fusion_load, and drop fusion store support.  Update callers.
2275         (emit_fusion_load_store): Likewise.
2276         (emit_fusion_gpr_load): Likewise.
2277         (fusion_p9_p): Delete.
2278         (expand_fusion_p9_load): Delete.
2279         (expand_fusion_p9_store): Delete.
2280         (emit_fusion_p9_load): Delete.
2281         (emit_fusion_p9_store): Delete.
2282         * config/rs6000/rs6000.md (UNSPEC_FUSION_P9): Delete.
2283         (GPR_FUSION): Delete.
2284         (FPR_FUSION): Delete.
2285         (power9 fusion peephole2s): Delete.
2286         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Delete.
2287         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Delete.
2288         (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_load): Delete.
2289         (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_store): Delete.
2290         (fusion_p9_<mode>_constant): Delete.
2291         * config/rs6000/rs6000.opt (-mpower9-fusion): Delete undocumented
2292         power9 fusion switch.
2293         * doc/md.texi (PowerPC constraints): Update wF constraint
2294         documentation for power8 fusion only.
2296 2018-11-16  Jakub Jelinek  <jakub@redhat.com>
2298         PR rtl-optimization/87475
2299         * cfgrtl.c (patch_jump_insn): Allow redirection failure for
2300         CROSSING_JUMP_P insns.
2301         (cfg_layout_redirect_edge_and_branch): Don't ICE if ret is NULL.
2303 2018-11-16  Uros Bizjak  <ubizjak@gmail.com>
2305         PR target/88051
2306         * config/i386/i386.md (floatunsdidf2): Allow only 64bit AVX512F targets.
2307         * config/i386/sse.md (UNSPEC_MOVDI_TO_SSE): New UNSPEC.
2308         (movdi_to_sse): Rewrite using UNSPEC_MOVDI_TO_SSE unspec.
2310 2018-11-16  Jakub Jelinek  <jakub@redhat.com>
2312         PR middle-end/88032
2313         * optabs.c (expand_binop): For op0_mode use GET_MODE (op0), unless it
2314         is VOIDmode, in which case use int_mode.  Similarly for op1_mode.
2316 2018-11-16  Eric Botcazou  <ebotcazou@adacore.com>
2318         * tree-switch-conversion.h (switch_decision_tree::emit_case_nodes): Add
2319         location_t parameter.
2320         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
2321         (switch_decision_tree::do_jump_if_equal): Likewise.
2322         * tree-switch-conversion.c (switch_decision_tree::emit): Pass location
2323         of switch statement to emit_case_nodes.
2324         (switch_decision_tree::emit_cmp_and_jump_insns): Add LOC parameter and
2325         set it on the newly built GIMPLE comparison statement.
2326         (switch_decision_tree::do_jump_if_equal): Likewise.
2327         (switch_decision_tree::emit_case_nodes): Add LOC parameter and pass it
2328         in calls to do_jump_if_equal as well as recursive calls.
2330 2018-11-16  Andi Kleen  <ak@linux.intel.com>
2332         * config/i386/i386.md: Allow memory operands to ptwrite.
2334 2018-11-16  Michael Matz  <matz@suse.de>
2336         * system.h (PRsa): New macro.
2337         (SIZE_AMOUNT): Cast number to uint64_t.
2338         * alloc-pool.h (pool_usage::dump): Don't use %zu but PRsa.
2339         (pool_usage::dump_footer): Likewise and also use PRIu64.
2340         * bitmap.h (bitmap_usage::dump): Likewise.
2341         * ggc-common.c (ggc_usage::dump): Likewise.
2342         * ggc-page.c (ggc_print_statistics): Likewise.
2343         * input.c (dump_line_table_statistics): Likewise.
2344         * mem-stats.h (mem_usage::dump): Likewise.
2345         (mem_usage::dump_footer): Likewise.
2346         * rtl.c (dump_rtx_statistics): Likewise.
2347         * tree-cfg.c (dump_cfg_stats): Likewise.
2348         * tree-dfa.c (dump_dfa_stats): Likewise.
2349         * tree-phinodes.c (phinodes_print_statistics): Likewise.
2350         * tree-ssanames (ssanames_print_statistics): Likewise.
2351         * vec.c (vec_usage::dump): Likewise.
2352         (vec_usage::dump_footer): Likewise.
2354 2018-11-16  Richard Biener  <rguenther@suse.de>
2356         PR tree-optimization/88011
2357         * tree-vrp.c (extract_range_from_binary_expr): Fix error in
2358         replacing set_value_range_to_undefined and
2359         set_value_range_to_varying with method calls.
2361 2018-11-16  Ilya Leoshkevich  <iii@linux.ibm.com>
2363         * config/s390/s390.md
2364         (*r<noxa>sbg_<mode>_srl_bitmask): Do not delegate arithmetic to
2365         assembler.
2366         (*r<noxa>sbg_<mode>_sll): Likewise.
2367         (*r<noxa>sbg_<mode>_srl): Likewise.
2368         (*r<noxa>sbg_sidi_srl): New pattern.
2370 2018-11-16  Jerome Lambourg  <lambourg@adacore.com>
2372         * config/vxworks.h (TARGET_VXWORKS_HAVE_CTORS_DTORS): New macro.
2373         Default to TARGET_VXWORKS_RTP.
2374         (SUPPORTS_INIT_PRIORITY): Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
2375         of TARGET_VXWORKS_RTP.
2376         * config/vxworksae.h: Also define TARGET_VXWORKS_HAVE_CTORS_DTORS.
2377         * config/vxworks.c: Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
2378         of TARGET_VXWORKS_RTP to set targetm.have_ctors_dtors.
2380 2018-11-15  Sandra Loosemore  <sandra@codesourcery.com>
2382         PR c++/25759
2383         * doc/extend.texi (Common Type Attributes): Make it explicit
2384         that attribute "packed" can apply to C++ classes.
2386 2018-11-15  Martin Sebor  <msebor@redhat.com>
2388         PR c++/87541
2389         PR c++/87542
2390         * tree.c (type_argument_type): New function.
2391         * tree.h (type_argument_type): Declare it.
2392         * gcc/doc/extend.texi (alloc_align): Update and clarify.
2393         (alloc_size, nonnull, sentinel): Same.
2395 2018-11-15  Andrew Stubbs  <ams@codesourcery.com>
2396             Kwok Cheung Yeung  <kcy@codesourcery.com>
2398         * tree-vect-stmts.c (vectorizable_store): Don't ICE when
2399         int_mode_for_size fails.
2400         (vectorizable_load): Likewise.
2402 2018-11-15  David Malcolm  <dmalcolm@redhat.com>
2404         * doc/ux.texi (Group logically-related diagnostics): Move
2405         discussion of auto_diagnostic_group into this new subsection.
2406         Give an example of where this grouping is used.
2408 2018-11-15  David Malcolm  <dmalcolm@redhat.com>
2410         PR other/19165
2411         * Makefile.in (OBJS): Move json.o to...
2412         (OBJS-libcommon): ...here and add diagnostic-format-json.o.
2413         * common.opt (fdiagnostics-format=): New option.
2414         (diagnostics_output_format): New enum.
2415         * diagnostic-format-json.cc: New file.
2416         * diagnostic.c (default_diagnostic_final_cb): New function, taken
2417         from start of diagnostic_finish.
2418         (diagnostic_initialize): Initialize final_cb to
2419         default_diagnostic_final_cb.
2420         (diagnostic_finish): Move "being treated as errors" messages to
2421         default_diagnostic_final_cb.  Call any final_cb.
2422         (default_diagnostic_finalizer): Add diagnostic_t param.
2423         (diagnostic_report_diagnostic): Pass "orig_diag_kind" to
2424         diagnostic_finalizer callback.
2425         * diagnostic.h (enum diagnostics_output_format): New enum.
2426         (diagnostic_finalizer_fn): Reimplement, adding diagnostic_t param.
2427         (struct diagnostic_context): Add "final_cb".
2428         (default_diagnostic_finalizer): Add diagnostic_t param.
2429         (diagnostic_output_format_init): New decl.
2430         * doc/invoke.texi (-fdiagnostics-format): New option.
2431         * dwarf2out.c (gen_producer_string): Ignore
2432         OPT_fdiagnostics_format_.
2433         * gcc.c (driver_handle_option): Handle OPT_fdiagnostics_format_.
2434         * lto-wrapper.c (append_diag_options): Ignore it.
2435         * opts.c (common_handle_option): Handle it.
2437 2018-11-15  David Malcolm  <dmalcolm@redhat.com>
2439         PR tree-optimization/88015
2440         * graphite-isl-ast-to-gimple.c
2441         (translate_isl_ast_to_gimple::scop_to_isl_ast): Add missing check
2442         for dump_enabled_p.
2443         * graphite-sese-to-poly.c (build_poly_scop): Likewise.
2445 2018-11-15  Richard Biener  <rguenther@suse.de>
2447         PR middle-end/88029
2448         * gimple.c (gimple_call_flags): Union flags from decl, type
2449         and call fntype.
2450         * trans-mem.c (is_tm_pure_call): Simplify.
2452 2018-11-15  Richard Biener  <rguenther@suse.de>
2454         PR tree-optimization/88031
2455         * tree-vect-loop.c (vectorizable_reduction): Move check
2456         for multiple types earlier so we get the expected dump.
2457         Simplify calls to vectorizable_condition.
2458         * tree-vect-stmts.h (vectorizable_condition): Update prototype.
2459         * tree-vect-stmts.c (vectorizable_condition): Instead of
2460         reduc_def and reduc_index take just a flag.  Simplify
2461         code-generation now that we can rely on the defs being set up.
2462         (vectorizable_comparison): Remove unused argument.
2464 2018-11-15  Richard Biener  <rguenther@suse.de>
2466         PR tree-optimization/88030
2467         * tree-complex.c (need_eh_cleanup): New global.
2468         (update_complex_assignment): Mark blocks that need EH update.
2469         (expand_complex_comparison): Likewise.
2470         (tree_lower_complex): Allocate and deallocate need_eh_cleanup,
2471         perform EH cleanup and schedule CFG cleanup if that did anything.
2473 2018-11-15  Jakub Jelinek  <jakub@redhat.com>
2475         PR rtl-optimization/88018
2476         * cfgrtl.c (fixup_abnormal_edges): Guard moving insns to fallthru edge
2477         on the presence of fallthru edge, rather than if it is a USE or not.
2479 2018-11-15  Richard Biener  <rguenther@suse.de>
2481         PR middle-end/87917
2482         * tree-data-ref.c (analyze_miv_subscript): Guard calls to
2483         analyze_subscript_affine_affine properly.
2485 2018-11-15  Xianmiao Qu  <xianmiao_qu@c-sky.com>
2487         * config/csky/csky-linux-elf.h (LINUX_DYNAMIC_LINKER): Remove.
2488         (GLIBC_DYNAMIC_LINKER): Define.
2489         (LINUX_TARGET_LINK_SPEC): Update the dynamic linker's name.
2491 2018-11-15  Bin Cheng  <bin.cheng@linux.alibaba.com>
2493         PR tree-optimization/84648
2494         * tree-ssa-loop-niter.c (adjust_cond_for_loop_until_wrap): New.
2495         (number_of_iterations_cond): Adjust exit cond for loop-until-wrap case
2496         by calling adjust_cond_for_loop_until_wrap.
2498 2018-11-15  Sandra Loosemore  <sandra@codesourcery.com>
2500         PR other/56334
2501         * doc/extend.texi (Common Function Attributes): Clarify linker
2502         restrictions on "aligned" attribute.
2503         (Common Variable Attributes): Likewise.  Mention that linker
2504         restrictions don't apply to stack-allocated variables.
2506 2018-11-15  Joern Rennecke  <joern.rennecke@riscy-ip.com>
2508         * gensupport.c (add_predicate_code): Properly handle ZERO_EXTRACT
2509         as an lvalue.
2511 2018-11-14  Sandra Loosemore  <sandra@codesourcery.com>
2513         PR lto/55102
2514         PR lto/56700
2515         * doc/invoke.texi (Optimize Options): Remove bad example about
2516         interaction between -flto and -O.  Replace it with a note that
2517         you need to compile with -O and not just link.  Copy-edit -flto
2518         discussion to reduce verbiage and improve flow.
2520 2018-11-14  Sandra Loosemore  <sandra@codesourcery.com>
2522         PR middle-end/59658
2523         * doc/invoke.texi (Optimize Options): Clarify that -O0 and -Og
2524         also suppress many optimizations.  Alphabetize option lists for
2525         -O1, -O2, and -Os.  Add list of options disabled with -Og, and
2526         correct documentation for those options to say that.
2527         * opts.c (default_options_table): Sort table by level and option
2528         name, to make it easier to correlate to the manual.
2530 2018-11-14  Uros Bizjak  <ubizjak@gmail.com>
2532         * config/i386/i386.c (ix86_print_operand_address_as): Simplify
2533         printing of the names of segment registers.
2535 2018-11-14  Nathan Sidwell  <nathan@acm.org>
2537         PR debug/88006
2538         PR debug/87462
2539         * dwarf2out.c (dwarf2out_finish): Apply resolve_addr to comdat
2540         type list.
2542 2018-11-14  David Malcolm  <dmalcolm@redhat.com>
2544         * Makefile.in (CFLAGS-optinfo-emit-json.o): Add $(ZLIBINC).
2546 2018-11-14  Jakub Jelinek  <jakub@redhat.com>
2548         P1236R1 - Signed integers are two's complement
2549         * doc/invoke.texi (Wshift-overflow): Adjust documentation for c++2a.
2551         PR bootstrap/86739
2552         * hash-map.h (hash_map::iterator::reference_pair): New class.
2553         (hash_map::iterator::operator*): Return it rather than std::pair.
2555 2018-11-14  Jeff Law  <law@redhat.com>
2557         * optabs.c (expand_binop): Pass INT_MODE to operand_subword_force
2558         iff the operand is a constant.
2560 2018-11-14  Aldy Hernandez  <aldyh@redhat.com>
2562         * gimple-ssa-evrp-analyze.c
2563         (evrp_range_analyzer::record_ranges_from_incoming_edge): Rename
2564         ignore_equivs_equal_p to equal_p.
2565         * ipa-cp.c (meet_with_1): Use equal_p instead of
2566         ignore_equivs_equal_p.
2567         * ipa-prop.c (ipa_vr_ggc_hash_traits::equal): Same.
2568         * tree-vrp.c (value_range::ignore_equivs_equal_p): Remove.
2569         (value_range::operator==): Remove.
2570         (value_range::operator!=): Remove.
2571         (vrp_prop::visit_stmt): Use equal_p.
2572         * tree-vrp.h (value_range): Remove operator==, operator!=,
2573         ignore_equivs_equal_p.
2574         * vr-values.c (update_value_range): Use equal_p.
2576 2018-11-14  Michael Matz  <matz@suse.de>
2578         PR middle-end/86575
2579         * gimplify.c (collect_fallthrough_labels): Add new argument,
2580         return location via that, don't modify statements.
2581         (warn_implicit_fallthrough_r): Adjust call, don't use
2582         statement location directly.
2584 2018-11-14  Richard Biener  <rguenther@suse.de>
2586         PR middle-end/87985
2587         * tree-data-ref.c (split_constant_offset): Add wrapper
2588         allocating a cache hash-map.
2589         (split_constant_offset_1): Cache results of expanding
2590         expressions from SSA def stmts.
2592 2018-11-14  Richard Biener  <rguenther@suse.de>
2594         PR middle-end/88021
2595         * tree-data-ref.c (lambda_matrix_row_add): Change const1 argument
2596         to lambda_int.
2597         (lambda_vector_mult_const): Likewise.
2598         (lambda_matrix_right_hermite): Use lambda_int temporaries.
2600 2018-11-14  Wilco Dijkstra  <wdijkstr@arm.com>
2601             Jackson Woodruff  <jackson.woodruff@arm.com>
2603         PR 71026/tree-optimization
2604         * match.pd: Simplify floating point comparisons.
2606 2018-11-14  Jakub Jelinek  <jakub@redhat.com>
2608         PR rtl-optimization/87817
2609         * config/i386/i386.c (ix86_fold_builtin): For _bzhi_u{32,64} if
2610         last argument has low 8 bits clear, fold to 0.
2612 2018-11-14  Iain Sandoe  <iain@sandoe.co.uk>
2614         * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Cast
2615         MAX_OFILE_ALIGNMENT as needed.
2617 2018-11-14  Richard Biener  <rguenther@suse.de>
2619         PR tree-optimization/88019
2620         * graphite-isl-ast-to-gimple.c (ternary_op_to_tree): Rewrite
2621         COND_EXPR arguments to non-trapping overflow.
2623 2018-11-14  Claudiu Zissulescu  <claziss@synopsys.com>
2625         * config/arc/arc.h (reg_class): Reorder registers classes, remove
2626         unused register classes.
2627         (REG_CLASS_NAMES): Likewise.
2628         (REG_CLASS_CONTENTS): Likewise.
2629         (FIXED_REGISTERS): Make lp_count fixed.
2630         (BASE_REG_CLASS): Remove ACC16_BASE_REGS reference.
2631         (PROGRAM_COUNTER_REGNO): Remove.
2632         * config/arc/arc.c (arc_conditional_register_usage): Remove unused
2633         register classes, use constants for register numbers, remove
2634         reg_class_contents references.
2635         (arc_process_double_reg_moves): Add asserts.
2636         (arc_secondary_reload): Remove LPCOUNT_REG reference, use
2637         lra_in_progress predicate.
2638         (arc_init_reg_tables): Remove unused register classes.
2639         (arc_register_move_cost): Likewise.
2640         (arc_preferred_reload_class): Likewise.
2641         (hwloop_optimize): Update rtx patterns involving lp_count register.
2642         (arc_return_address_register): Rename ILINK1, INLINK2 regnums macros.
2643         * config/arc/constraints.md ("c"): Choose between GENERAL_REGS and
2644         CHEAP_CORE_REGS.  Former one will be used for LRA.
2645         ("Rac"): Choose between GENERAL_REGS and ALL_CORE_REGS.  Former
2646         one will be used for LRA.
2647         ("w"): Choose between GENERAL_REGS and WRITABLE_CORE_REGS.  Former
2648         one will be used for LRA.
2649         ("W"): Choose between GENERAL_REGS and MPY_WRITABLE_CORE_REGS.
2650         Former one will be used for LRA.
2651         ("f"): Delete constraint.
2652         ("k"): Likewise.
2653         ("e"): Likewise.
2654         ("l"): Change it from register constraint to constraint.
2655         * config/arc/arc.md (movqi_insn): Remove unsed lp_count constraints.
2656         (movhi_insn): Likewise.
2657         (movsi_insn): Update pattern.
2658         (arc_lp): Likewise.
2659         (dbnz): Likewise.
2660         (stack_tie): Remove 'b' constraint letter.
2661         (R4_REG): Define.
2662         (R9_REG, R15_REG, R16_REG, R25_REG): Likewise.
2663         (R32_REG, R40_REG, R41_REG, R42_REG, R43_REG, R44_REG): Likewise.
2664         (R57_REG, R59_REG, PCL_REG): Likewise.
2665         (ILINK1_REGNUM): Renamed to ILINK1_REG.
2666         (ILINK2_REGNUM): Renamed to ILINK2_REG.
2667         (Rgp): Remove.
2668         (SP_REGS): Likewise.
2669         (Rcw): Remove unused reg classes.
2670         * config/arc/predicates.md (dest_reg_operand): Just default on
2671         register_operand predicate.
2672         (mpy_dest_reg_operand): Likewise.
2673         (move_dest_operand): Use macros instead of constants.
2674         * config/arc/arc.opt (mlra): Switch to lra as default.
2676 2018-11-14  Richard Biener  <rguenther@suse.de>
2678         PR tree-optimization/87974
2679         * tree-vect-loop.c (vectorizable_reduction): When computing
2680         the vectorized reduction PHI vector type ignore constant
2681         and external defs.
2683 2018-11-14  Jakub Jelinek  <jakub@redhat.com>
2685         PR tree-optimization/87977
2686         * tree-ssa-math-opts.c (optimize_recip_sqrt): Don't reuse division
2687         stmt, build a new one and replace the old one with it.  Formatting fix.
2688         Call release_ssa_name (x) if !has_other_use and !delete_div.
2689         (pass_cse_reciprocals::execute): Before calling optimize_recip_sqrt
2690         verify lhs of stmt is still def.
2692 2018-11-13  Peter Bergner  <bergner@linux.ibm.com>
2694         PR rtl-optimization/87507
2695         * lower-subreg.c (operand_for_swap_move_operator): New function.
2696         (simple_move): Strip simple operators.
2697         (find_pseudo_copy): Likewise.
2698         (resolve_operand_for_swap_move_operator): New function.
2699         (resolve_simple_move): Strip simple operators and swap operands.
2701 2018-11-13  Jakub Jelinek  <jakub@redhat.com>
2703         PR tree-optimization/87898
2704         * omp-simd-clone.c (ipa_simd_modify_stmt_ops): Formatting fix.
2705         (ipa_simd_modify_function_body): Remove debug stmts where the first
2706         argument was changed into a non-decl.
2708 2018-11-13  Peter Bergner  <bergner@linux.ibm.com>
2710         PR rtl-optimization/87899
2711         * lra-lives.c (start_living): Update white space in comment.
2712         (enum point_type): New.
2713         (sparseset_contains_pseudos_p): New function.
2714         (update_pseudo_point): Likewise.
2715         (make_hard_regno_live): Use HARD_REGISTER_NUM_P macro.
2716         (make_hard_regno_dead): Likewise.  Remove ignore_reg_for_conflicts
2717         handling.  Move early exit after adding conflicts.
2718         (mark_pseudo_live): Use HARD_REGISTER_NUM_P macro.  Add early exit
2719         if regno is already live.  Remove all handling of program points.
2720         (mark_pseudo_dead): Use HARD_REGISTER_NUM_P macro.  Add early exit
2721         after adding conflicts.  Remove all handling of program points and
2722         ignore_reg_for_conflicts.
2723         (mark_regno_live): Use HARD_REGISTER_NUM_P macro.  Remove return value
2724         and do not guard call to mark_pseudo_live.
2725         (mark_regno_dead): Use HARD_REGISTER_NUM_P macro.  Remove return value
2726         and do not guard call to mark_pseudo_dead.
2727         (check_pseudos_live_through_calls): Use HARD_REGISTER_NUM_P macro.
2728         (process_bb_lives): Use HARD_REGISTER_NUM_P and HARD_REGISTER_P macros.
2729         Use new function update_pseudo_point.  Handle register copies by
2730         removing the source register from the live set.  Handle INOUT operands.
2731         Update to the next program point using the unused_set, dead_set and
2732         start_dying sets.
2733         (lra_create_live_ranges_1): Use HARD_REGISTER_NUM_P macro.
2735 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
2737         * builtins.c: Replace "source_location" with "location_t".
2738         * diagnostic-show-locus.c: Likewise.
2739         * diagnostic.c: Likewise.
2740         * dumpfile.c: Likewise.
2741         * gcc-rich-location.h: Likewise.
2742         * genmatch.c: Likewise.
2743         * gimple.h: Likewise.
2744         * gimplify.c: Likewise.
2745         * input.c: Likewise.
2746         * input.h: Likewise.  Eliminate the typedef.
2747         * omp-expand.c: Likewise.
2748         * selftest.h: Likewise.
2749         * substring-locations.h (get_source_location_for_substring):
2750         Rename to...
2751         (get_location_within_string): ...this.
2752         * tree-cfg.c: Replace "source_location" with "location_t".
2753         * tree-cfgcleanup.c: Likewise.
2754         * tree-diagnostic.c: Likewise.
2755         * tree-into-ssa.c: Likewise.
2756         * tree-outof-ssa.c: Likewise.
2757         * tree-parloops.c: Likewise.
2758         * tree-phinodes.c: Likewise.
2759         * tree-phinodes.h: Likewise.
2760         * tree-ssa-loop-ivopts.c: Likewise.
2761         * tree-ssa-loop-manip.c: Likewise.
2762         * tree-ssa-phiopt.c: Likewise.
2763         * tree-ssa-phiprop.c: Likewise.
2764         * tree-ssa-threadupdate.c: Likewise.
2765         * tree-ssa.c: Likewise.
2766         * tree-ssa.h: Likewise.
2767         * tree-vect-loop-manip.c: Likewise.
2769 2018-11-13  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
2771         * doc/extend.texi: Fix typo in the weakref description.
2773 2018-11-13  Richard Biener  <rguenther@suse.de>
2775         PR tree-optimization/86991
2776         * tree-vect-loop.c (vect_is_slp_reduction): Delay reduction
2777         group building until we have successfully detected the SLP
2778         reduction.
2779         (vect_is_simple_reduction): Remove fixup code here.
2781 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
2783         * dumpfile.c (VERIFY_DUMP_ENABLED_P): New macro.
2784         (dump_gimple_stmt): Use it.
2785         (dump_gimple_stmt_loc): Likewise.
2786         (dump_gimple_expr): Likewise.
2787         (dump_gimple_expr_loc): Likewise.
2788         (dump_generic_expr): Likewise.
2789         (dump_generic_expr_loc): Likewise.
2790         (dump_printf): Likewise.
2791         (dump_printf_loc): Likewise.
2792         (dump_dec): Likewise.
2793         (dump_dec): Likewise.
2794         (dump_hex): Likewise.
2795         (dump_symtab_node): Likewise.
2796         * gimple-loop-interchange.cc (tree_loop_interchange::interchange):
2797         Guard dump call with dump_enabled_p.
2798         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl): Likewise.
2799         * graphite-optimize-isl.c (optimize_isl): Likewise.
2800         * graphite.c (graphite_transform_loops): Likewise.
2801         * tree-loop-distribution.c (pass_loop_distribution::execute): Likewise.
2802         * tree-parloops.c (parallelize_loops): Likewise.
2803         * tree-ssa-loop-niter.c (number_of_iterations_exit): Likewise.
2804         * tree-vect-data-refs.c (vect_analyze_group_access_1): Likewise.
2805         (vect_prune_runtime_alias_test_list): Likewise.
2806         * tree-vect-loop.c (vect_update_vf_for_slp): Likewise.
2807         (vect_estimate_min_profitable_iters): Likewise.
2808         * tree-vect-slp.c (vect_record_max_nunits): Likewise.
2809         (vect_build_slp_tree_2): Likewise.
2810         (vect_supported_load_permutation_p): Likewise.
2811         (vect_slp_analyze_operations): Likewise.
2812         (vect_slp_analyze_bb_1): Likewise.
2813         (vect_slp_bb): Likewise.
2814         * tree-vect-stmts.c (vect_analyze_stmt): Likewise.
2815         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.
2816         (pass_slp_vectorize::execute): Likewise.
2817         (increase_alignment): Likewise.
2819 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
2821         PR ipa/87955
2822         * ipa-inline.c (report_inline_failed_reason): Guard calls to
2823         cl_target_option_print_diff and cl_optimization_print_diff with
2824         if (dump_file).
2826 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
2828         * doc/invoke.texi (-fsave-optimization-record): Note that the
2829         output is compressed.
2830         * optinfo-emit-json.cc: Include <zlib.h>.
2831         (optrecord_json_writer::write): Compress the output.
2833 2018-11-13  Aldy Hernandez  <aldyh@redhat.com>
2835         * tree-vrp.c (value_range_base::dump): Dump type.
2836         Do not use INF nomenclature for 1-bit types.
2837         (dump_value_range): Group all variants to common dumping code.
2838         (debug): New overloaded functions for value_ranges.
2839         (value_range_base::dump): Remove no argument version.
2840         (value_range::dump): Same.
2842 2018-11-13  Richard Biener  <rguenther@suse.de>
2844         PR tree-optimization/87931
2845         * tree-vect-loop.c (vect_is_simple_reduction): Restrict
2846         nested cycles we support to latch computations vectorizable_reduction
2847         handles.
2849 2018-11-13  Martin Liska  <mliska@suse.cz>
2851         PR tree-optimization/87885
2852         * cfghooks.c (account_profile_record): Rename
2853         to ...
2854         (profile_record_check_consistency): ... this.
2855         Calculate missing num_mismatched_freq_in.
2856         (profile_record_account_profile): New function
2857         that calculates time and size of a function.
2858         * cfghooks.h (struct profile_record): Remove
2859         all tuples.
2860         (struct cfg_hooks): Remove after_pass flag.
2861         (account_profile_record): Rename to ...
2862         (profile_record_check_consistency): ... this.
2863         (profile_record_account_profile): New.
2864         * cfgrtl.c (rtl_account_profile_record): Remove
2865         after_pass flag.
2866         * passes.c (check_profile_consistency): Do only
2867         checking.
2868         (account_profile): Calculate size and time of
2869         function only.
2870         (pass_manager::dump_profile_report): Reformat
2871         output.
2872         (execute_one_ipa_transform_pass): Call
2873         consistency check before clean upand call account_profile
2874         after a clean up is done.
2875         (execute_one_pass): Call check_profile_consistency and
2876         account_profile instead of using after_pass flag..
2877         * tree-cfg.c (gimple_account_profile_record): Likewise.
2879 2018-11-13  Martin Liska  <mliska@suse.cz>
2881         PR sanitizer/87930
2882         * config/i386/i386.c (ix86_option_override_internal): Error
2883         about usage -mabi=ms and -fsanitize={,kernel-}address.
2885 2018-11-13  Andre Vieira  <andre.simoesdiasvieira@arm.com>
2887         * config/aarch64/aarch64.c
2888         (aarch64_vectorize_preferred_vector_alignment): Change return type to
2889         poly_uint64.
2890         (aarch64_simd_vector_alignment_reachable): Adapt to preferred vector
2891         alignment being a poly int.
2892         * doc/tm.texi (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Change
2893         return type to poly_uint64.
2894         * target.def (default_preferred_vector_alignment): Likewise.
2895         * targhooks.c (default_preferred_vector_alignment): Likewise.
2896         * targhooks.h (default_preferred_vector_alignment): Likewise.
2897         * tree-vect-data-refs.c (vect_calculate_target_alignment): Likewise.
2898         (vect_compute_data_ref_alignment): Adapt to vector alignment being a
2899         poly int.
2900         (vect_update_misalignment_for_peel): Likewise.
2901         (vect_enhance_data_refs_alignment): Likewise.
2902         (vect_find_same_alignment_drs): Likewise.
2903         (vect_duplicate_ssa_name_ptr_info): Likewise.
2904         (vect_setup_realignment): Likewise.
2905         (vect_can_force_dr_alignment_p): Change alignment parameter type to
2906         poly_uint64.
2907         * tree-vect-loop-manip.c (get_misalign_in_elems): Learn to construct a
2908         mask with a compile time variable vector alignment.
2909         (vect_gen_prolog_loop_niters): Adapt to vector alignment being a poly
2910         int.
2911         (vect_do_peeling): Exit early if vector alignment is not constant.
2912         * tree-vect-stmts.c (ensure_base_align): Adapt to vector alignment being
2913         a poly int.
2914         (vectorizable_store): Likewise.
2915         (vectorizable_load): Likweise.
2916         * tree-vectorizer.h (struct dr_vec_info): Make target_alignment field a
2917         poly_uint64.
2918         (vect_known_alignment_in_bytes): Adapt to vector alignment being a
2919         poly int.
2920         (vect_can_force_dr_alignment_p): Change alignment parameter type to
2921         poly_uint64.
2923 2018-11-13  Richard Biener  <rguenther@suse.de>
2925         PR tree-optimization/87962
2926         * tree-vect-loop.c (vect_is_simple_reduction): More reliably
2927         detect outer reduction for disqualifying in-loop uses.
2929 2018-11-13  Richard Biener  <rguenther@suse.de>
2931         PR tree-optimization/87967
2932         * tree-vect-loop.c (vect_transform_loop): Also copy PHIs
2933         for constants for the scalar loop.
2935 2018-11-13  Alan Modra  <amodra@gmail.com>
2937         * config/rs6000/linux64.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Exclude
2938         integer constants when -mcmodel=medium.
2940 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
2942         * config/arc/arc.h (FUNCTION_PROFILER): Redefine to empty.
2943         * config/arc/elf.h (PROFILE_HOOK): Define.
2944         * config/arc/linux.h (PROFILE_HOOK): Likewise.
2946 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
2948         * config/arc/arc.c (hwloop_optimize): Bailout when detecting a
2949         jump table data in the text section.
2951 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
2953         * config/arc/arc.c (arc_eh_return_address_location): Repurpose it
2954         to fit the eh_return pattern.
2955         * config/arc/arc.md (eh_return): Define.
2956         (VUNSPEC_ARC_EH_RETURN): Likewise.
2957         * config/arc/arc-protos.h (arc_eh_return_address_location): Match
2958         new implementation.
2959         * config/arc/arc.h (EH_RETURN_HANDLER_RTX): Remove it.
2962 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
2964         * common/config/arc/arc-common.c (arc_option_optimization_table):
2965         Millicode optimization is default on for size optimizations.
2966         * config/arc/arc-protos.h (arc_check_multi): New function.
2967         * config/arc/arc.c (RTX_OK_FOR_OFFSET_P): Rearange.
2968         (ENTER_LEAVE_START_REG): Define.
2969         (ENTER_LEAVE_END_REG): Likewise.
2970         (arc_override_options): Disable millicode when long calls option
2971         is on.
2972         (arc_frame_info): Change it from int to bool.
2973         (arc_compute_frame_size): Clean up.
2974         (arc_save_restore): Remove.
2975         (frame_save_reg): New function.
2976         (frame_restore_reg): Likewise.
2977         (arc_enter_leave_p): Likewise.
2978         (arc_save_callee_saves): Likewise.
2979         (arc_restore_callee_saves): Likewise.
2980         (arc_save_callee_enter): Likewise.
2981         (arc_restore_callee_leave): Likewise.
2982         (arc_save_callee_milli): Likewise.
2983         (arc_restore_callee_milli): Likewise.
2984         (arc_expand_prologue): Reimplement to emit enter/leave
2985         instructions.
2986         (arc_expand_epilogue): Likewise.
2987         (arc_check_multi): New function.
2988         * config/arc/arc.md (push_multi_fp): New pattern.
2989         (push_multi_fp_blink): Likewise.
2990         (pop_multi_fp): Likewise.
2991         (pop_multi_fp_blink): Likewise.
2992         (pop_multi_fp_ret): Likewise.
2993         (pop_multi_fp_blink_ret): Likewise.
2994         * config/arc/arc.opt (mmillicode): Update option.
2995         (mcode-density-frame): New option.
2996         * config/arc/predicates.md (push_multi_operand): New predicate.
2997         (pop_multi_operand): Likewise.
2998         * doc/invoke.texi (ARC): Update ARC options information.
3001 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
3003         * config/arc/arc-protos.h (gen_operands_ldd_std): Add.
3004         * config/arc/arc.c (operands_ok_ldd_std): New function.
3005         (mem_ok_for_ldd_std): Likewise.
3006         (gen_operands_ldd_std): Likewise.
3007         * config/arc/arc.md: Add peephole2 rules for std/ldd.
3009 2018-11-13  Eric Botcazou  <ebotcazou@adacore.com>
3011         * toplev.c (output_stack_usage): Turn test on flag_stack_usage into
3012         test on stack_usage_file.
3013         (lang_dependent_init): Do not open the .su file if generating LTO.
3015 2018-11-13  Jakub Jelinek  <jakub@redhat.com>
3017         PR rtl-optimization/87918
3018         * simplify-rtx.c (simplify_merge_mask): For COMPARISON_P, use
3019         simplify_gen_relational rather than simplify_gen_binary.
3021 2018-11-13  Richard Biener  <rguenther@suse.de>
3023         * tree-ssanames.h (set_range_info): Use value_range_base.
3024         (get_range_info): Likewise.
3025         * tree-ssanames.c (set_range_info): Likewise.
3026         (get_range_info): Likewise.
3027         * tree-vrp.c (value_range_base::union_helper): Split
3028         out common parts of value_range[_base]::union_.
3029         (value_range_base::union_): Update.
3030         (value_range::union_): Likewise.
3031         (determine_value_range_1): Use value_range_base.
3032         (determine_value_range): Likewise.
3033         * tree-vrp.h (value_range_base::union_helper): Move ...
3034         (value_range::union_helper): ... from here.
3036 2018-11-13  Alan Modra  <amodra@gmail.com>
3038         * config/rs6000/rs6000.c (rs6000_secondary_reload_inner): Negate
3039         offset for PRE_DEC.
3040         (rs6000_secondary_reload_gpr): Don't call find_replacement.
3042 2018-11-13  Sandra Loosemore  <sandra@codesourcery.com>
3044         PR middle-end/59634
3045         * doc/invoke.texi (Optimize Options): Clarify that the
3046         l1-cache-line-size, l1-cache-size, and l2-cache-size parameters
3047         apply to data cache size.
3049 2018-11-13  Alan Modra  <amodra@gmail.com>
3051         * config/rs6000/predicates.md (logical_const_operand),
3052         (logical_operand): Correct comment.
3053         * config/rs6000/rs6000.c (rs6000_emit_prologue): Comment fix.
3055 2018-11-13  Alan Modra  <amodra@gmail.com>
3057         * config/rs6000/rs6000.md (addsi3_high): Prefix with '*'.
3059 2018-11-13  Alan Modra  <amodra@gmail.com>
3061         * gcc/doc/md.texi (Machine Constraints): Correct rs6000 h constraint
3062         description.
3063         * config/rs6000/rs6000.md (movsi_internal1): Delete MT%0 case
3064         covered by alternative.
3065         (movcc_internal1): Ignore h for register preference.
3066         (mov<mode>_hardfloat64): Likewise.
3067         (mov<mode>_softfloat): Ignore c, l, h for register preference.
3069 2018-11-12  Sandra Loosemore  <sandra@codesourcery.com>
3071         PR preprocessor/47823
3072         * doc/cpp.texi (Alternatives to Wrapper #ifndef): Move #pragma once
3073         documentation to...
3074         (Pragmas): ...here.
3075         * doc/extend.texi (Pragmas): Note additional pragmas documented
3076         in the CPP manual.
3078 2018-11-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
3080         PR middle-end/86677
3081         PR middle-end/87528
3082         * tree-scalar-evolution.c (expression_expensive_p): Make
3083         BUILTIN POPCOUNT as expensive when backend does not define it.
3085 2018-11-12  Fredrik Noring  <noring@nocrew.org>
3087         * config.gcc: Update with-llsc defaults for MIPS r5900.
3089 2018-11-12  Martin Liska  <mliska@suse.cz>
3091         PR gcov-profile/87442
3092         * common.opt: Add -fprofile-filter-files and -fprofile-exclude-files
3093         options.
3094         * doc/invoke.texi: Document them.
3095         * tree-profile.c (parse_profile_filter): New.
3096         (parse_profile_file_filtering): Likewise.
3097         (release_profile_file_filtering): Likewise.
3098         (include_source_file_for_profile): Likewise.
3099         (tree_profiling): Filter source files based on the
3100         newly added options.
3102 2018-11-12  Martin Liska  <mliska@suse.cz>
3104         PR target/87903
3105         * doc/extend.texi: Add missing values for __builtin_cpu_is and
3106         __builtin_cpu_supports for x86 target.
3108 2018-11-12  Sandra Loosemore  <sandra@codesourcery.com>
3110         PR middle-end/21110
3111         * doc/rtl.texi (Constants): Clarify that mode of "high" doesn't
3112         have to be Pmode.
3113         (Arithmetic): Likewise for "lo_sum".
3115 2018-11-12  Renlin Li  <renlin.li@arm.com>
3117         PR target/87815
3118         * dse.c (get_stored_val): Add check for compile-time constantness
3119         of gap.
3121 2018-11-12  Sudakshina Das  <sudi.das@arm.com>
3123         * config/arm/arm-cpus.in (armv8_5, sb, predres): New features.
3124         (ARMv8_5a): New fgroup.
3125         (armv8.5-a): New arch.
3126         (armv8-a, armv8.1-a, armv8.2-a, armv8.3-a, armv8.4-a): New options
3127         sb and predres.
3128         * config/arm/arm-tables.opt: Regenerate.
3129         * config/arm/t-aprofile: Add matching rules for -march=armv8.5-a
3130         * config/arm/t-arm-elf (all_v8_archs): Add armv8.5-a.
3131         * config/arm/t-multilib (v8_5_a_simd_variants): New variable.
3132         Add matching rules for -march=armv8.5-a and extensions.
3133         * doc/invoke.texi (ARM options): Document -march=armv8.5-a.
3134         Add sb and predres to all armv8-a except armv8.5-a.
3136 2018-11-12  Richard Biener  <rguenther@suse.de>
3138         * tree-vrp.h (value_range[_base]::set): Make public.  Provide
3139         overload for single value.
3140         (value_range[_base]::set_nonnull): New.
3141         (value_range[_base]::set_null): Likewise.
3142         (value_range): Document bitmap copying behavior, mark
3143         copy constructor and assignment operator deleted.
3144         (value_range::move): New.
3145         (value_range::set_and_canonicalize): Default bitmap to zero.
3146         (set_value_range_to_nonnull): Remove.
3147         (set_value_range_to_null): Likewise.
3148         (set_value_range): Likewise.
3149         (set_value_range_to_value): Likewise.
3150         (extract_range_from_unary_expr): Work on value_range_base.
3151         (extract_range_from_binary_expr_1): Likewise.  Rename to...
3152         (extract_range_from_binary_expr): ... this.
3153         * tree-vrp.c (value_range::update): Clear equiv bitmap
3154         if required.
3155         (value_range::move): New, move equiv bitmap.
3156         (value_range_base::set_undefined): Avoid assignment.
3157         (value_range::set_undefined): Likewise.
3158         (value_range_base::set_varying): Likewise.
3159         (value_range::set_varying): Likewise.
3160         (set_value_range): Remove.
3161         (value_range_base::set): New overload for value.
3162         (value_range::set): Likewise.
3163         (set_value_range_to_nonnull): Remove.
3164         (value_range_base::set_nonnull): New.
3165         (value_range::set_nonnull): Likewise.
3166         (set_value_range_to_null): Remove.
3167         (value_range_base::set_null): New.
3168         (value_range::set_null): Likewise.
3169         (range_is_null): Work on value_range_base.
3170         (range_is_nonnull): Likewise.
3171         (ranges_from_anti_range): Likewise.
3172         (extract_range_into_wide_ints): Likewise.
3173         (extract_range_from_multiplicative_op): Likewise.
3174         (extract_range_from_binary_expr): Likewise.  Update for API changes.
3175         (extract_range_from_unary_expr): Likewise.  Remove OBJ_TYPE_REF
3176         handling.
3177         (value_range::intersect_helper): Avoid copy and assignment.
3178         (value_range::union_helper): Likewise.
3179         (determine_value_range_1): Adjust.
3180         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
3181         Avoid assignment by using move.
3182         (evrp_range_analyzer::record_ranges_from_stmt): Avoid assignment.
3183         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
3184         Likewise.
3185         * tree-ssanames.c (get_range_info): Likewise.
3186         * vr-values.h (vr_values::get_vr_for_comparison): Adjust API.
3187         * vr-values.c (vr_values::get_value_range): Adjust.
3188         (vr_values::update_value_range): Likewise.
3189         (symbolic_range_based_on_p): Work on value_range_base.
3190         (vr_values::extract_range_from_binary_expr): Use value_range_base.
3191         (vr_values::extract_range_from_unary_expr): Likewise.
3192         (vr_values::extract_range_from_cond_expr): Avoid assignment.
3193         (vr_values::extract_range_from_comparison): Adjust.
3194         (vr_values::check_for_binary_op_overflow): Use value_range_base.
3195         (vr_values::extract_range_basic): Adjust.
3196         (vr_values::adjust_range_with_scev): Likewise.
3197         (vr_values::vrp_visit_assignment_or_call): Likewise.
3198         (vr_values::get_vr_for_comparison): Change API to avoid
3199         assignment and copy construction.
3200         (vr_values::compare_name_with_value): Adjust accordingly.
3201         (vr_values::compare_names): Likewise.
3202         (vr_values::extract_range_from_phi_node): Avoid assignment and
3203         bogus in-place modify of equiv bitmap.
3204         (vr_values::simplify_bit_ops_using_ranges): Use value_range_base.
3205         * ipa-prop.c (ipa_compute_jump_functions_for_edge): Adjust
3206         for extract_range_from_unary_expr API change.
3207         * ipa-cp.c (ipa_vr_operation_and_type_effects): Likewise.
3209 2018-11-12  Eric Botcazou  <ebotcazou@adacore.com>
3211         * config/mcore/mcore.h (WORD_REGISTER_OPERATIONS): Remove duplicate.
3213 2018-11-12  Richard Biener  <rguenther@suse.de>
3215         * tree-vrp.h (value_range_base::symbolic_p,
3216         value_range_base::constant_p, value_range_base::zero_p,
3217         value_range_base::singleton_p): Move from value_range.
3218         (value_range::dump): Add.
3219         * gimple-ssa-evrp-analyze.c
3220         (evrp_range_analyzer::record_ranges_from_phis): Use set_varying.
3221         * ipa-cp.c (ipcp_vr_lattice::print): Use dump_value_range.
3222         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
3223         Use set_varying.
3224         * tree-vrp.c (value_range::symbolic_p): Move to value_range_base.
3225         (value_range::constant_p): Likewise.
3226         (value_range::singleton_p): Likewise.
3227         (value_range_base::dump): Add.
3228         (set_value_range_to_undefined): Remove.
3229         (set_value_range_to_varying): Likewise.
3230         (range_int_cst_p): Take value_range_base argument.
3231         (range_int_cst_singleton_p): Likewise.
3232         (value_range_constant_singleton): Likewise.
3233         (vrp_set_zero_nonzero_bits): Likewise.
3234         (extract_range_from_multiplicative_op): Use set_varying.
3235         (extract_range_from_binary_expr_1): Likewise. Use set_undefined.
3236         (extract_range_from_unary_expr): Likewise.
3237         (dump_value_range_base): Change to overload of dump_value_range.
3238         (vrp_prop::vrp_initialize): Use set_varying and set_undefined.
3239         (vrp_prop::visit_stmt): Likewise.
3240         (value_range::intersect_helper): Likewise.
3241         (value_range::union_helper): Likewise.
3242         (determine_value_range_1): Likewise.
3244 2018-11-12  Richard Biener  <rguenther@suse.de>
3246         * tree-vrp.c (set_value_range_to_nonnull): Clear equiv.
3247         (set_value_range_to_null): Likewise.
3248         * vr-values.c (vr_values::extract_range_from_comparison):
3249         Clear equiv for constant singleton ranges.
3251 2018-11-12 Wei Xiao <wei3.xiao@intel.com>
3253         * config/i386/sse.md: Combine VFIXUPIMM* patterns
3254         (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
3255         (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
3256         (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Remove.
3257         (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
3258         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
3259         (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Remove.
3261 2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>
3263         PR c/69502
3264         * doc/extend.texi (Common Type Attributes): For the align type
3265         attribute, copy language about decreasing alignment from the
3266         corresponding variable attribute.
3268 2018-11-11  Xianmiao Qu  <xianmiao_qu@c-sky.com>
3270         * config/csky/csky.md (*fpuv2_nmulsf3_1, *fpuv2_nmuldf3_1): Handle
3271         -frounding-math.
3273 2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>
3275         PR c++/43105
3276         * doc/invoke.texi (C++ Dialect Options): Add warning about mixing
3277         -frtti and -fno-rtti code.
3279 2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>
3281         PR c/26366
3282         * doc/extend.texi (Other Builtins): Document probability associated
3283         with __builtin_expect.
3285 2018-11-11  Uros Bizjak  <ubizjak@gmail.com>
3287         PR target/87928
3288         * config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI
3289         instead of (TARGET_64BIT && ix86_abi == MS_ABI).
3290         * config/i386/darwin.h (STACK_BOUNDARY): Ditto.
3291         * config/i386/cygming.h (STACK_BOUNDARY): Remove.
3293 2018-11-11  Xianmiao Qu  <xianmiao_qu@c-sky.com>
3295         * config/csky/csky-linux-elf.h (CC1_SPEC): Support -profile.
3297 2018-11-11  Xianmiao Qu  <xianmiao_qu@c-sky.com>
3299         * config/csky/csky.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
3301 2018-11-11  Richard Biener  <rguenther@suse.de>
3303         * tree-vrp.h (class value_range_base): New base class for
3304         value_range containing all but the m_equiv member.
3305         (dump_value_range_base): Add.
3306         (range_includes_zero_p): Work on value_range_base.
3307         * tree-vrp.c (value_range_base::set): Split out base handling
3308         from...
3309         (value_range::set): this.
3310         (value_range::set_equiv): New.
3311         (value_range_base::value_range_base): New constructors.
3312         (value_range_base::check): Split out base handling from...
3313         (value_range::check): this.
3314         (value_range::equal_p): Refactor in terms of
3315         ignore_equivs_equal_p which is now member of the base.
3316         (value_range_base::set_undefined): New.
3317         (value_range_base::set_varying): Likewise.
3318         (value_range_base::dump):Split out base handling from...
3319         (value_range::dump): this.
3320         (value_range_base::set_and_canonicalize): Split out base handling
3321         from...
3322         (value_range::set_and_canonicalize): this.
3323         (value_range_base::union_): New.
3324         * ipa-prop.h (struct ipa_jump_func): Use value_range_base *
3325         for m_vr.
3326         * ipa-cp.c (class ipcp_vr_lattice): Use value_range_base
3327         instead of value_range everywhere.
3328         (ipcp_vr_lattice::print): Use dump_value_range_base.
3329         (ipcp_vr_lattice::meet_with): Adjust.
3330         (ipcp_vr_lattice::meet_with_1): Likewise.
3331         (ipa_vr_operation_and_type_effects): Likewise.
3332         (propagate_vr_across_jump_function): Likewise.
3333         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Likewise.
3334         (ipa_get_value_range): Likewise.
3335         (ipa_set_jfunc_vr): Likewise.
3336         (ipa_compute_jump_functions_for_edge): Likewise.
3338 2018-11-10  Sandra Loosemore  <sandra@codesourcery.com>
3340         PR middle-end/65703
3341         * doc/invoke.texi (Optimize Options): Add @opindex entries
3342         for the positive forms of -fno-xxx and -mno-xxx options
3343         that were lacking them.
3345 2018-11-10  Segher Boessenkool  <segher@kernel.crashing.org>
3347         * combine.c (make_more_copies): Only make an intermediate copy if the
3348         dest of a move is a pseudo.
3350 2018-11-09  Maya Rashish  <coypu@sdf.org>
3352         PR target/87221
3353         * config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): Use crtbeginS.o for PIE.
3354         (NETBSD_ENDFILE_SPEC): Use crtendS.o for PIE.
3356 2018-11-09  Sandra Loosemore  <sandra@codesourcery.com>
3358         PR driver/41179
3359         PR middle-end/65703
3360         * doc/invoke.texi (Optimize Options): Clarify default behavior
3361         for -fno-toplevel-reorder, -fno-defer-pop, and -fno-branch-count-reg.
3363 2018-11-09  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3365         PR tree-optimization/87940
3366         * expr.c (string_constant): Don't strip NOPS in subexpressions.
3367         Fold PLUS_EXPR correctly.
3369 2018-11-09  Ilya Leoshkevich  <iii@linux.ibm.com>
3371         PR target/87762
3372         * config/s390/s390.c (s390_safe_relative_long_p): New function.
3373         (annotate_constant_pool_refs): Skip insns which support
3374         relative addressing.
3375         (annotate_constant_pool_refs_1): New helper function.
3376         (find_constant_pool_ref): Skip insns which support relative
3377         addression.
3378         (find_constant_pool_ref_1): New helper function.
3379         (replace_constant_pool_ref): Skip insns which support
3380         relative addressing.
3381         (replace_constant_pool_ref_1): New helper function.
3382         (s390_mainpool_start): Adapt to the new signature.
3383         (s390_mainpool_finish): Likewise.
3384         (s390_chunkify_start): Likewise.
3385         (s390_chunkify_finish): Likewise.
3386         (pass_s390_early_mach::execute): Likewise.
3387         (s390_prologue_plus_offset): Likewise.
3388         (s390_emit_prologue): Likewise.
3389         (s390_emit_epilogue): Likewise.
3391 2018-11-09  Jakub Jelinek  <jakub@redhat.com>
3393         * gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid
3394         but unsupported lastprivate with conditional modifier.
3396 2018-11-09  Jeff Law  <law@redhat.com>
3398         * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): Handle
3399         unused argument better.  Add gcc_unreachable to silence warning.
3401 2018-11-09  Martin Sebor  <msebor@redhat.com>
3403         PR middle-end/81824
3404         * attribs.c (has_attribute): New helper function.
3405         (decls_mismatched_attributes, maybe_diag_alias_attributes): Same.
3406         * attribs.h (decls_mismatched_attributes): Declare.
3407         * cgraphunit.c (handle_alias_pairs): Call maybe_diag_alias_attributes.
3408         (maybe_diag_incompatible_alias): Use OPT_Wattribute_alias_.
3409         * common.opt (-Wattribute-alias): Take an argument.
3410         (-Wno-attribute-alias): New option.
3411         * doc/extend.texi (Common Function Attributes): Document copy.
3412         (Common Variable Attributes): Same.
3413         * doc/invoke.texi (-Wmissing-attributes): Document enhancement.
3414         (-Wattribute-alias): Document new option argument.
3416 2018-11-09  Richard Earnshaw  <rearnsha@arm.com>
3418         * config/arm/parsecpu.awk (/alias/): Tighten invisible alias
3419         matching criteria.  Remove unused array initializer.
3421 2018-11-09  Bill Schmidt  <wschmidt@linux.ibm.com>
3422             Jinsong Ji  <jji@us.ibm.com>
3424         * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix incorrect
3425         constraints by introducing a new temporary.
3426         (_mm_cvtss_si64): Likewise.
3428 2018-11-09  Martin Liska  <mliska@suse.cz>
3430         * common.opt: Add -fipa-stack-alignment flag.
3431         * doc/invoke.texi: Document it.
3432         * final.c (rest_of_clean_state): Guard stack
3433         shrinking with flag.
3435 2018-11-09  Martin Liska  <mliska@suse.cz>
3437         * cgraph.h (ipa_discover_readonly_nonaddressable_vars): Rename
3438         to ...
3439         (ipa_discover_variable_flags): ... this.
3440         * common.opt: Come up with new flag -fipa-reference-addressable.
3441         * doc/invoke.texi: Document it.
3442         * ipa-reference.c (propagate): Call the renamed fn.
3443         * ipa-visibility.c (whole_program_function_and_variable_visibility):
3444         Likewise.
3445         * ipa.c (ipa_discover_readonly_nonaddressable_vars): Renamed to
3446         ...
3447         (ipa_discover_variable_flags): ... this.  Discover
3448         non-addressable variables only with the newly added flag.
3449         * opts.c: Enable the newly added flag with -O1 and higher
3450         optimization level.
3452 2018-11-09  David Malcolm  <dmalcolm@redhat.com>
3454         * json.cc (selftest::test_writing_literals): Fix comment.
3456 2018-11-09  Martin Liska  <mliska@suse.cz>
3458         * config/aarch64/aarch64.c (aarch64_parse_arch): Do not copy
3459         string to a stack buffer.
3460         (aarch64_parse_cpu): Likewise.
3461         (aarch64_parse_tune): Likewise.
3463 2018-11-09  Richard Biener  <rguenther@suse.de>
3465         PR tree-optimization/87953
3466         * tree-vect-loop.c (vectorizable_reduction): For analysis
3467         always pass ops[0] to vectorizable_condition.
3469 2018-11-09  Stafford Horne  <shorne@gmail.com>
3470             Richard Henderson  <rth@twiddle.net>
3471             Joel Sherrill  <joel@rtems.org>
3473         * common/config/or1k/or1k-common.c: New file.
3474         * config/or1k/*: New.
3475         * config.gcc (or1k*-*-*): New.
3476         * configure.ac (or1k*-*-*): New test for openrisc tls.
3477         * configure: Regenerated.
3478         * doc/install.texi: Document OpenRISC triplets.
3479         * doc/invoke.texi: Document OpenRISC arguments.
3480         * doc/md.texi: Document OpenRISC.
3482 2018-11-09  Richard Earnshaw  <rearnsha@arm.com>
3484         * config/arm/arm-cpus.in (arm7tdmi): Add an alias for arm7tdmi-s.
3485         (arm7tdmi-s): Delete CPU.
3486         (arm710t): Add aliases for arm720t and arm740t.
3487         (arm720t, arm740t): Delete CPUs.
3488         (arm920t): Add aliases for arm920, arm922t and arm940t.
3489         (arm920, arm922t, arm940t): Delete CPUs.
3490         (arm10tdmi): Add alias for arm1020t.
3491         (arm1020t): Delete CPU.
3492         (arm9e): Add aliases for arm946e-s, arm966e-s and arm968e-s.
3493         (arm946e-s, arm966e-s, arm968e-s): Delete CPUs.
3494         (arm10e): Add aliases for arm1020e and arm1022e.
3495         (arm1020e, arm1022e): Delete CPU.
3496         * config/arm/arm.md (generic_sched): Remove entries that are now
3497         handled by aliases.
3498         (generic_vfp): Likewise.
3499         * config/arm/arm1020e.md: Simplify tuning selection based on alias
3500         changes.
3501         * config/arm/arm-tune.md: Regenerated.
3502         * config/arm/arm-tables.opt: Regenerated.
3504 2018-11-09  Richard Biener  <rguenther@suse.de>
3506         PR tree-optimization/87621
3507         * tree-vect-loop.c (vectorizable_reduction): Handle reduction
3508         op with only phi inputs.
3509         * tree-ssa-loop-ch.c: Include tree-ssa-sccvn.h.
3510         (ch_base::copy_headers): Run CSE on copied loop headers.
3511         (pass_ch_vect::process_loop_p): Simplify.
3513 2018-11-09  Alexandre Oliva <oliva@adacore.com>
3515         * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Adjust
3516         for non-w64 x86_64 biarch.
3518 2018-11-09  Alexandre Oliva <aoliva@redhat.com>
3520         PR rtl-optimization/86438
3521         * compare-elim.c (try_eliminate_compare): Use SET_SRC instead
3522         of in_b for the compare if in_b is SET_DEST.
3524         PR target/87793
3525         * config/i386/i386.c (ix86_const_not_ok_for_debug_p): Reject
3526         non-toplevel UNSPEC.
3528 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
3530         * tree-vrp.c (value_range::check): Do not access internals
3531         directly.
3532         (value_range::singleton_p): Same.
3533         (value_range::type): Same.
3534         (vrp_finalize): Use value_range API.
3536 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
3538         * tree-vrp.c (may_contain_p): Do not access m_min/m_max directly.
3540 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
3542         * vr-values.c (vr_values::get_value_range): Use value_range API
3543         instead of piecing together ranges.
3544         (vr_values::update_value_range): Same.
3546 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
3548         * gimple-fold.c (size_must_be_zero_p): Use value_range API instead
3549         of performing ad-hoc calculations.
3550         * tree-ssanames.c (set_range_info): New overloaded function
3551         accepting value_range &.
3552         (get_range_info): Same.
3553         * tree-ssanames.h (set_range_info_raw): Remove.
3554         (set_range_info): New prototype.
3555         (get_range_info): Same.
3556         * tree-vrp.h (value_range::null_p): Rename to zero_p.
3557         * tree-vrp.c (value_range::null_p): Same.
3559 2018-11-09  Jan Hubicka  <jh@suse.cz>
3561         * tree.c (fld_type_variant_equal_p): Test user align flag.
3562         (flt_type_variant): Copy user align flag.
3563         (fld_incomplete_type_of): Clear it.
3565 2018-11-09  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3567         * config/arm/neon.md (div<mode>3): New pattern.
3569 2018-11-08  Andi Kleen  <ak@linux.intel.com>
3571         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET): New.
3572         (OPTION_MASK_ISA_PTWRITE_UNSET): New.
3573         (ix86_handle_option): Handle OPT_mptwrite.
3574         * config/i386/cpuid.h (bit_PTWRITE): Add.
3575         * config/i386/driver-i386.c (host_detect_local_cpu): Detect ptwrite.
3576         * config/i386/i386-builtin.def (BDESC): Add ptwrite32/64.
3577         * config/i386/i386-c.c (ix86_target_macros_internal): Define __PTWRITE__.
3578         * config/i386/i386.c (ix86_target_string): Handle ptwrite.
3579         (ix86_option_override_internal): Handle PTA_PTWRITE.
3580         (ix86_valid_target_attribute_inner_p): Define ptwrite.
3581         (def_builtin2): Force UINT64 to be 64bit only.
3582         * config/i386/i386.h (TARGET_PTWRITE): Add.
3583         (TARGET_PTWRITE_P): Add.
3584         (PTA_PTWRITE): Add.
3585         * config/i386/i386.md: Define ptwrite.
3586         * config/i386/i386.opt: Add -mptwrite.
3587         * config/i386/immintrin.h (_ptwrite64): Add.
3588         (_ptwrite32): Add
3589         * doc/extend.texi: Document __builtin_ia32_ptwrite*.
3590         * doc/invoke.texi: Document -mptwrite.
3592 2018-11-08  Peter Bergner  <bergner@linux.ibm.com>
3594         PR rtl-optimization/87600
3595         * cfgexpand.c (expand_asm_stmt): Catch illegal asm constraint usage.
3596         * lra-constraints.c (process_alt_operands): Skip illegal hard
3597         register usage.  Prefer reloading non hard register operands.
3599 2018-11-08  Sandra Loosemore  <sandra@codesourcery.com>
3601         PR other/36572
3602         * doc/invoke.texi (Optimize Options): Clarify default behavior
3603         for -fno-sched-interblock and -fno-sched-spec.
3605 2018-11-08  Roman Geissler  <roman.geissler@amadeus.com>
3607         * collect2.c (linker_select):  Add USE_LLD_LD.
3608         (ld_suffixes): Add ld.lld.
3609         (main): Handle -fuse-ld=lld.
3610         * common.opt (-fuse-ld=lld): New option.
3611         * doc/invoke.texi (-fuse-ld=lld): Document.
3612         * opts.c (common_handle_option): Handle OPT_fuse_ld_lld.
3614 2018-11-08  Paul Koning  <ni1d@arrl.net>
3616         * config/pdp11/constraints.md: Add "Z" series constraints for use
3617         with pre-dec and post-inc addressing.
3618         * config/pdp11/pdp11-protos.m (expand_block_move): Delete.
3619         (pdp11_expand_operands): Add int argument (word count).
3620         (pdp11_sp_frame_offset): Delete.
3621         (pdp11_cmp_length): New function.
3622         (pushpop_regeq): New function.
3623         * config/pdp11/pdp11.c (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P):
3624         Add hook.
3625         (pdp11_expand_prologue, pdp11_expand_epilogue): Rewrite for new
3626         frame layout.
3627         (pdp11_initial_elimination_offset): Ditto.
3628         (pdp11_expand_operands): Add word count argument.  Bugfixes.
3629         (output_move_multiple): Change how pointer adjustment is done.
3630         (pdp11_gen_int_label): Correct format.
3631         (output_ascii): Ditto.
3632         (pdp11_asm_output_var): Add code for DEC assembler case.
3633         (pdp11_asm_print_operand): Bugfix for CONST_DOUBLE holding integer
3634         value.
3635         (legitimate_const_double_p): Ditto.
3636         (pdp11_register_move_cost): Adjust for new register classes.
3637         (pdp11_regno_reg_class): Ditto.
3638         (expand_block_move): Delete.
3639         (pushpop_regeq): New function.
3640         (pdp11_legitimate_address_p): Bugfix in check for constant
3641         offset.
3642         (pdp11_sp_frame_offset): Delete.
3643         (pdp11_reg_save_size): New helper function for new frame layout.
3644         (output_addr_const_pdp11): Remove CONST_DOUBLE case.
3645         (pdp11_expand_shift): Bugfix in check for constant shift count.
3646         (pdp11_shift_length): Ditto.
3647         (pdp11_assemble_shift): Copy input to pdp11_expand_operands.
3648         (pdp11_cmp_length): New function.
3649         * config/pdp11/pdp11.h (TARGET_CPU_CPP_BUILTINS): Add macros for
3650         some compile options.
3651         (FIXED_REGISTERS): Remove HARD_FRAME_POINTER_REGNUM.
3652         (CALL_USED_REGISTERS): Ditto.
3653         (ELIMINABLE_REGS): Ditto.
3654         (REGISTER_NAMES): Ditto.
3655         (reg_class): Add classes NOTR0_REG through NOTSP_REG for use by Z
3656         constraints.
3657         (REG_CLASS_NAMES): Ditto.
3658         (REG_CLASS_CONTENTS): Ditto.  Also remove
3659         HARD_FRAME_POINTER_REGNUM.
3660         (CPU_REG_CLASS): New macro.
3661         (CLASS_MAX_NREGS): Adjust for new register classes.
3662         (FUNCTION_PROFILER): Make no-op.
3663         (may_call_alloca): Remove unused declaration.
3664         (ASM_OUTPUT_ALIGN): Add workaround for PR87795.
3665         (ASM_OUTPUT_SKIP): Fix format.
3666         * config/pdp11/pdp11.md (unspecv): Add UNSPECV_MOVMEM.
3667         (HARD_FRAME_POINTER_REGNUM): Remove.
3668         (return): Delete.
3669         (*rts): Rename.  Remove epilogue related checks.
3670         (cmpsi, cmpdi): New insn.
3671         (cbranch<mode>4): Change to apply to SI and DI modes as well.
3672         (mov<mode>): Change constraints to enforce that push/pop
3673         destination cannot use the same register as source.
3674         (*mov<mode><cc_cc>): Ditto.
3675         (movmemhi, movmemhi1, movmemhi_nocc): Change to expand block move
3676         at assembly output rather than as RTL expander.
3677         (zero_extendqihi2): Bugfix in check for same registers.
3678         (adddi3_nocc): Bugfix in check for constant operand.
3679         (addsi3_nocc): Ditto.
3680         (subdi3_nocc): Ditto.
3681         (subsi3_nocc): Ditto.
3682         (negdi2_nocc): Copy input to pdp11_expand_operands.
3683         (negsi2_nocc): Ditto.
3684         (bswap2_nocc): Ditto.
3685         * config/pdp11/pdp11.opt (mlra): Fix documentation.
3686         * config/pdp11/t-pdp11: Use -Os.
3688 2018-11-08  Richard Earnshaw  <rearnsha@arm.com>
3690         * config/arm/parsecpu.awk (/alias/): New parsing rule.
3691         (/begin cpu/): Check that the cpu name hasn't been previously defined.
3692         (gen_comm_data): Print out CPU alias tables.
3693         (check_cpu): Match aliases when checking the CPU name.
3694         * config/arm/arm-protos.h (cpu_alias): New structure.
3695         (cpu_option): Add entry for aliases.
3696         * config/arm/arm-cpus.in (strongarm): Add aliases for strongarm110
3697         strongarm1100 and strongarm1110.
3698         (strongarm110, strongarm1100, strongarm1110): Delete CPU entries.
3699         (config/arm/arm-generic.md): Remove redundant references to
3700         strongarm110, strongarm1100 and strongarm1110.
3701         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
3702         Scan aliases for additional hints.
3703         (arm_parse_cpu_option_name): Also match a cpu name against the list
3704         of aliases.
3705         * config/arm/arm-tables.opt: Regenerated.
3706         * config/arm/arm-tune.md: Regenerated.
3708 2018-11-08  Jakub Jelinek  <jakub@redhat.com>
3710         * builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
3711         BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
3712         BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
3713         BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
3714         BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
3715         BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
3716         * gengtype.c (open_base_files): Add omp-general.h.
3717         * gimple.c (gimple_build_omp_critical):
3718         (gimple_build_omp_taskgroup): Add CLAUSES argument.  Call
3719         gimple_omp_taskgroup_set_clauses.
3720         (gimple_build_omp_atomic_load): Add mo argument, call
3721         gimple_omp_atomic_set_memory_order.
3722         (gimple_build_omp_atomic_store): Likewise.
3723         (gimple_copy): Adjust handling of GIMPLE_OMP_TASKGROUP.
3724         * gimple.def (GIMPLE_OMP_TASKGROUP): Use GSS_OMP_SINGLE_LAYOUT
3725         instead of GSS_OMP.
3726         (GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
3727         of GSS_OMP_SINGLE_LAYOUT, adjust comments.
3728         * gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST, GF_OMP_TASK_TASKWAIT
3729         and GF_OMP_ATOMIC_MEMORY_ORDER.  Remove GF_OMP_ATOMIC_SEQ_CST, use
3730         different value for GF_OMP_ATOMIC_NEED_VALUE.
3731         (struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
3732         comments.
3733         (struct gimple_statement_omp_single_layout): And remove here.
3734         (struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
3735         than gimple_statement_omp_single_layout.
3736         (is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
3737         GIMPLE_OMP_TEAMS.
3738         (is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
3739         (gimple_omp_subcode): Formatting fix.
3740         (gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
3741         gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
3742         gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
3743         gimple_omp_teams_host, gimple_omp_teams_set_host,
3744         gimple_omp_task_taskwait_p, gimple_omp_task_set_taskwait_p,
3745         gimple_omp_taskgroup_clauses, gimple_omp_taskgroup_clauses_ptr,
3746         gimple_omp_taskgroup_set_clauses): New inline functions.
3747         (gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
3748         (gimple_build_omp_atomic_store): Likewise.
3749         (gimple_omp_atomic_seq_cst_p): Remove.
3750         (gimple_omp_atomic_memory_order): New function.
3751         (gimple_omp_atomic_set_seq_cst): Remove.
3752         (gimple_omp_atomic_set_memory_order): New function.
3753         (gimple_build_omp_taskgroup): Add clauses argument.
3754         * gimple-pretty-print.c (dump_gimple_omp_taskgroup): New function.
3755         (dump_gimple_omp_task): Print taskwait with depend clauses.
3756         (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Use
3757         dump_omp_atomic_memory_order.
3758         (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
3759         * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALLOC_ONLY,
3760         GOVD_MAP_FROM_ONLY and GOVD_NONTEMPORAL.
3761         (enum omp_region_type): Reserve bits 1 and 2 for auxiliary flags,
3762         renumber values of most of ORT_* enumerators, add ORT_HOST_TEAMS,
3763         ORT_COMBINED_HOST_TEAMS, ORT_TASKGROUP, ORT_TASKLOOP and
3764         ORT_UNTIED_TASKLOOP enumerators.
3765         (enum gimplify_defaultmap_kind): New.
3766         (struct gimplify_omp_ctx): Remove target_map_scalars_firstprivate and
3767         target_map_pointers_as_0len_arrays members, add defaultmap.
3768         (new_omp_context): Initialize defaultmap member.
3769         (gimple_add_tmp_var): Handle ORT_TASKGROUP like ORT_WORKSHARE.
3770         (maybe_fold_stmt): Don't fold even in host teams regions.
3771         (omp_firstprivatize_variable): Handle ORT_TASKGROUP like
3772         ORT_WORKSHARE.  Test ctx->defaultmap[GDMK_SCALAR] instead of
3773         ctx->omp_firstprivatize_variable.
3774         (omp_add_variable): Don't add private/firstprivate for VLAs in
3775         ORT_TASKGROUP.
3776         (omp_default_clause): Print "taskloop" rather than "task" if
3777         ORT_*TASKLOOP.
3778         (omp_notice_variable): Handle ORT_TASKGROUP like ORT_WORKSHARE.
3779         Handle new defaultmap clause kinds.
3780         (omp_is_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.  Allow simd
3781         iterator to be lastprivate or private.  Fix up diagnostics if linear
3782         is used on collapse>1 simd iterator.
3783         (omp_check_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.
3784         (gimplify_omp_depend): New function.
3785         (gimplify_scan_omp_clauses): Add shared clause on parallel for
3786         combined parallel master taskloop{, simd} if taskloop has
3787         firstprivate, lastprivate or reduction clause.  Handle
3788         OMP_CLAUSE_REDUCTION_TASK diagnostics.  Adjust tests for
3789         ORT_COMBINED_TEAMS.  Gimplify depend clauses with iterators.  Handle
3790         cancel and simd OMP_CLAUSE_IF_MODIFIERs.  Handle
3791         OMP_CLAUSE_NONTEMPORAL.  Handle new defaultmap clause kinds.  Handle
3792         OMP_CLAUSE_{TASK,IN}_REDUCTION.  Diagnose invalid conditional
3793         lastprivate.
3794         (gimplify_adjust_omp_clauses_1): Ignore GOVD_NONTEMPORAL.  Handle
3795         GOVD_MAP_ALLOC_ONLY and GOVD_MAP_FROM_ONLY.
3796         (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NONTEMPORAL.  Handle
3797         OMP_CLAUSE_{TASK,IN}_REDUCTION.
3798         (gimplify_omp_task): Handle taskwait with depend clauses.
3799         (gimplify_omp_for): Add shared clause on parallel for combined
3800         parallel master taskloop{, simd} if taskloop has firstprivate,
3801         lastprivate or reduction clause.  Use ORT_TASKLOOP or
3802         ORT_UNTIED_TASKLOOP instead of ORT_TASK or ORT_UNTIED_TASK.  Adjust
3803         tests for ORT_COMBINED_TEAMS.  Handle C++ range for loops with
3804         NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS.  Firstprivatize
3805         __for_end and __for_range temporaries on OMP_PARALLEL for
3806         distribute parallel for{, simd}.  Move OMP_CLAUSE_REDUCTION
3807         and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
3808         sandwiched in between two taskloops.
3809         (computable_teams_clause): Test ctx->defaultmap[GDMK_SCALAR]
3810         instead of ctx->omp_firstprivatize_variable.
3811         (gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
3812         ORT_COMBINED_HOST_TEAMS if not inside of target construct.  If
3813         host teams, use gimplify_and_return_first etc. for body like
3814         for target or target data constructs, and at the end call
3815         gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
3816         (gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
3817         of OMP_ATOMIC_SEQ_CST, pass it as new argument to
3818         gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
3819         gimple_omp_atomic_set_seq_cst calls.
3820         (gimplify_expr) <case OMP_TASKGROUP>: Move handling into a separate
3821         case, handle taskgroup clauses.
3822         * lto-streamer-out.c (hash_tree): Handle
3823         OMP_CLAUSE_{TASK,IN}_REDUCTION.
3824         * Makefile.in (GTFILES): Add omp-general.h.
3825         * omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND,
3826         BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
3827         BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
3828         BUILT_IN_GOMP_LOOP_START, BUILT_IN_GOMP_LOOP_ORDERED_START,
3829         BUILT_IN_GOMP_LOOP_DOACROSS_START,
3830         BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
3831         BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
3832         BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
3833         BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
3834         BUILT_IN_GOMP_LOOP_ULL_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_START,
3835         BUILT_IN_GOMP_LOOP_ULL_DOACROSS_START,
3836         BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
3837         BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
3838         BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
3839         BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME,
3840         BUILT_IN_GOMP_PARALLEL_REDUCTIONS, BUILT_IN_GOMP_SECTIONS2_START,
3841         BUILT_IN_GOMP_TEAMS_REG, BUILT_IN_GOMP_TASKGROUP_REDUCTION_REGISTER,
3842         BUILT_IN_GOMP_TASKGROUP_REDUCTION_UNREGISTER,
3843         BUILT_IN_GOMP_TASK_REDUCTION_REMAP,
3844         BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER): New builtins.
3845         * omp-expand.c (workshare_safe_to_combine_p): Return false for
3846         non-worksharing loops.
3847         (omp_adjust_chunk_size): Don't adjust anything if chunk_size is zero.
3848         (determine_parallel_type): Don't combine parallel with worksharing
3849         which has _reductemp_ clause.
3850         (expand_parallel_call): Emit the GOMP_*nonmonotonic_runtime* or
3851         GOMP_*maybe_nonmonotonic_runtime* builtins instead of GOMP_*runtime*
3852         if there is nonmonotonic modifier or if there is no modifier and no
3853         ordered clause.  For dynamic and guided schedule without monotonic
3854         and nonmonotonic modifier, default to nonmonotonic.
3855         (expand_omp_for): Likewise.  Adjust expand_omp_for_generic caller, use
3856         GOMP_loop{,_ull}{,_ordered,_doacross}_start builtins if there are
3857         task reductions.
3858         (expand_task_call): Add GOMP_TASK_FLAG_REDUCTION flag to flags if
3859         there are any reduction clauses.
3860         (expand_taskwait_call): New function.
3861         (expand_teams_call): New function.
3862         (expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
3863         expand_teams_call for it.  Formatting fix.  Handle taskwait with
3864         depend clauses.
3865         (expand_omp_for_generic): Add SCHED_ARG argument.  Handle expansion
3866         of worksharing loops with task reductions.
3867         (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
3868         expansion of worksharing loops with task reductions.
3869         (expand_omp_sections): Handle expansion of sections with task
3870         reductions.
3871         (expand_omp_synch): For host teams call expand_omp_taskreg.
3872         (omp_memory_order_to_memmodel): New function.
3873         (expand_omp_atomic_load, expand_omp_atomic_store,
3874         expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
3875         instead of gimple_omp_atomic_seq_cst_p.
3876         (build_omp_regions_1, omp_make_gimple_edges): Treat taskwait with
3877         depend clauses as a standalone directive.
3878         * omp-general.c (enum omp_requires): New variable.
3879         (omp_extract_for_data): Initialize have_reductemp member.  Allow
3880         NE_EXPR even in OpenMP loops, transform them into LT_EXPR or
3881         GT_EXPR loops depending on incr sign.  Formatting fixes.
3882         * omp-general.h (struct omp_for_data): Add have_reductemp member.
3883         (enum omp_requires): New enum.
3884         (omp_requires_mask): Declare.
3885         * omp-grid.c (grid_eliminate_combined_simd_part): Formatting fix.
3886         Fix comment typos.
3887         * omp-low.c (struct omp_context): Add task_reductions and
3888         task_reduction_map fields.
3889         (is_host_teams_ctx): New function.
3890         (is_taskreg_ctx): Return true also if is_host_teams_ctx.
3891         (use_pointer_for_field): Use is_global_var instead of
3892         TREE_STATIC || DECL_EXTERNAL, and apply only if not privatized
3893         in outer contexts.
3894         (build_outer_var_ref): Ignore taskgroup outer contexts.
3895         (delete_omp_context): Release task_reductions and task_reduction_map.
3896         (scan_sharing_clauses): Don't add any fields for reduction clause on
3897         taskloop.  Handle OMP_CLAUSE__REDUCTEMP_.  Handle
3898         OMP_CLAUSE_{IN,TASK}_REDUCTION and OMP_CLAUSE_REDUCTION with task
3899         modifier.  Don't ignore shared clauses in is_host_teams_ctx contexts.
3900         Handle OMP_CLAUSE_NONTEMPORAL.
3901         (add_taskreg_looptemp_clauses): Add OMP_CLAUSE__REDUCTEMP_ clause if
3902         needed.
3903         (scan_omp_parallel): Add _reductemp_ clause if there are any reduction
3904         clauses with task modifier.
3905         (scan_omp_task): Handle taskwait with depend clauses.
3906         (finish_taskreg_scan): Move field corresponding to _reductemp_ clause
3907         first.  Move also OMP_CLAUSE__REDUCTEMP_ clause in front if present.
3908         Handle GIMPLE_OMP_TEAMS like GIMPLE_OMP_PARALLEL.
3909         (scan_omp_for): Fix comment formatting.
3910         (scan_omp_teams): Handle host teams constructs.
3911         (check_omp_nesting_restrictions): Allow teams with no outer
3912         OpenMP context.  Adjust diagnostics for teams strictly nested into
3913         some explicit OpenMP construct other than target.  Allow OpenMP atomics
3914         inside of simd regions.
3915         (scan_omp_1_stmt): Call scan_sharing_clauses for taskgroups.
3916         (scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
3917         taskreg_nesting_level while scanning host teams construct.
3918         (task_reduction_read): New function.
3919         (lower_rec_input_clauses): Handle OMP_CLAUSE_REDUCTION on taskloop
3920         construct.  Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE__REDUCTEMP_
3921         clauses.  Handle OMP_CLAUSE_REDUCTION with task modifier.  Remove
3922         second argument create_tmp_var if it is NULL.  Don't ignore shared
3923         clauses in is_host_teams_ctx contexts.  Handle
3924         OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
3925         clauses.
3926         (lower_reduction_clauses): Ignore reduction clauses with task
3927         modifier.  Remove second argument create_tmp_var if it is NULL.
3928         Initialize OMP_ATOMIC_MEMORY_ORDER to relaxed.
3929         (lower_send_clauses): Ignore reduction clauses with task modifier.
3930         Handle OMP_CLAUSE__REDUCTEMP_.  Don't send anything for
3931         OMP_CLAUSE_REDUCTION on taskloop.  Handle OMP_CLAUSE_IN_REDUCTION.
3932         (maybe_add_implicit_barrier_cancel): Add OMP_RETURN argument, don't
3933         rely that it is the last stmt in body so far.  Ignore outer taskgroup
3934         contexts.
3935         (omp_task_reductions_find_first, omp_task_reduction_iterate,
3936         lower_omp_task_reductions): New functions.
3937         (lower_omp_sections): Handle reduction clauses with taskgroup
3938         modifiers.  Adjust maybe_add_implicit_barrier_cancel caller.
3939         (lower_omp_single): Adjust maybe_add_implicit_barrier_cancel caller.
3940         (lower_omp_for): Likewise.  Handle reduction clauses with taskgroup
3941         modifiers.
3942         (lower_omp_taskgroup): Handle taskgroup reductions.
3943         (create_task_copyfn): Copy over OMP_CLAUSE__REDUCTEMP_ pointer.
3944         Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE_REDUCTION clauses.
3945         (lower_depend_clauses): If there are any
3946         OMP_CLAUSE_DEPEND_DEPOBJ or OMP_CLAUSE_DEPEND_MUTEXINOUTSET
3947         depend clauses, use a new array format.  If OMP_CLAUSE_DEPEND_LAST is
3948         seen, assume lowering is done already and return early.  Set kind
3949         on artificial depend clause to OMP_CLAUSE_DEPEND_LAST.
3950         (lower_omp_taskreg): Handle reduction clauses with task modifier on
3951         parallel construct.  Handle reduction clause on taskloop construct.
3952         Handle taskwait with depend clauses.
3953         (lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
3954         for host teams constructs.
3955         * tree.c (omp_clause_num_ops): Add in_reduction, task_reduction,
3956         nontemporal and _reductemp_ clause entries.
3957         (omp_clause_code_name): Likewise.
3958         (walk_tree_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION,
3959         OMP_CLAUSE_NONTEMPORAL and OMP_CLAUSE__REDUCTEMP_.
3960         * tree-core.h (enum omp_clause_code): Add
3961         OMP_CLAUSE_{{IN,TASK}_REDUCTION,NONTEMPORAL,_REDUCTEMP_}.
3962         (enum omp_clause_defaultmap_kind, enum omp_memory_order): New.
3963         (struct tree_base): Add omp_atomic_memory_order field into union.
3964         Remove OMP_ATOMIC_SEQ_CST comment.
3965         (enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_MUTEXINOUTSET
3966         and OMP_CLAUSE_DEPEND_DEPOBJ.
3967         (struct tree_omp_clause): Add subcode.defaultmap_kind.
3968         * tree.def (OMP_TASKGROUP): Add another operand, move next to other
3969         OpenMP constructs with body and clauses operands.
3970         * tree.h (OMP_BODY): Use OMP_MASTER instead of OMP_TASKGROUP.
3971         (OMP_CLAUSES): Use OMP_TASKGROUP instead of OMP_SINGLE.
3972         (OMP_TASKGROUP_CLAUSES): Define.
3973         (OMP_CLAUSE_DECL): Use OMP_CLAUSE__REDUCTEMP_ instead of
3974         OMP_CLAUSE__LOOPTEMP_.
3975         (OMP_ATOMIC_SEQ_CST): Remove.
3976         (OMP_ATOMIC_MEMORY_ORDER, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE,
3977         OMP_CLAUSE_LASTPRIVATE_CONDITIONAL): Define.
3978         (OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INIT,
3979         OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER,
3980         OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
3981         OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Handle
3982         OMP_CLAUSE_{,IN_,TASK_}REDUCTION.
3983         (OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_REDUCTION_INSCAN,
3984         OMP_CLAUSE_DEFAULTMAP_KIND, OMP_CLAUSE_DEFAULTMAP_CATEGORY,
3985         OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_SET_KIND):
3986         Define.
3987         * tree-inline.c (remap_gimple_stmt): Remap taskgroup clauses.
3988         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
3989         OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE_NONTEMPORAL.
3990         (convert_local_omp_clauses): Likewise.  Remove useless test.
3991         * tree-parloops.c (create_call_for_reduction_1): Pass
3992         OMP_MEMORY_ORDER_RELAXED as new argument to
3993         dump_gimple_omp_atomic_load and dump_gimple_omp_atomic_store.
3994         * tree-pretty-print.c (dump_omp_iterators): New function.
3995         (dump_omp_clause): Handle OMP_CLAUSE__REDUCTEMP_,
3996         OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_{TASK,IN}_REDUCTION.  Print
3997         reduction modifiers.  Handle OMP_CLAUSE_DEPEND_DEPOBJ and
3998         OMP_CLAUSE_DEPEND_MUTEXINOUTSET.  Print iterators in depend clauses.
3999         Print __internal__ for OMP_CLAUSE_DEPEND_LAST.  Handle cancel and
4000         simd OMP_CLAUSE_IF_MODIFIERs.  Handle new kinds of
4001         OMP_CLAUSE_DEFAULTMAP. Print conditional: for
4002         OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
4003         (dump_omp_atomic_memory_order): New function.
4004         (dump_generic_node): Use it.  Print taskgroup clauses.  Print
4005         taskwait with depend clauses.
4006         * tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
4007         * tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
4008         Handle OMP_CLAUSE_{TASK,IN}_REDUCTION.
4009         * tree-streamer-out.c (pack_ts_omp_clause_value_fields,
4010         write_ts_omp_clause_tree_pointers): Likewise.
4012 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
4014         PR ipa/86395
4015         * doc/invoke.texi (-fdump-ipa-): Document the "-optimized",
4016         "-missed", "-note", and "-all" sub-options.
4017         * ipa-inline.c (caller_growth_limits): Port from fprintf to dump
4018         API.
4019         (can_early_inline_edge_p): Likewise.
4020         (want_early_inline_function_p): Likewise.
4021         (want_inline_self_recursive_call_p): Likewise.
4022         (recursive_inlining): Likewise.
4023         (inline_small_functions): Likewise.
4024         (flatten_function): Likewise.
4025         (ipa_inline): Likewise.
4026         (inline_always_inline_functions): Likewise.
4027         (early_inline_small_functions): Likewise.
4028         (early_inliner): Likewise.
4029         * tree-inline.c (expand_call_inline): Likewise.
4031 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
4033         * pretty-print.c (pp_format): Handle %f.
4034         (selftest::test_pp_format): Add test of %f.
4035         * pretty-print.h (pp_double): New macro.
4037 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
4039         * dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro.
4040         * dumpfile.c (make_item_for_dump_cgraph_node): Move to before...
4041         (dump_pretty_printer::decode_format): Implement "%C" for
4042         cgraph_node *.
4043         (selftest::test_capture_of_dump_calls): Rename "where" to
4044         "stmt_loc".  Convert test_decl to a function decl and set its
4045         location.  Add a symbol_table_test RAII instance and a
4046         cgraph_node, using it to test "%C" and dump_symtab_node.
4048 2018-11-08  Eric Botcazou  <ebotcazou@adacore.com>
4050         PR middle-end/87916
4051         * cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P.
4053 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
4055         * cgraph.c: Include "selftest.h".
4056         (saved_symtab): New variable.
4057         (selftest::symbol_table_test::symbol_table_test): New ctor.
4058         (selftest::symbol_table_test::~symbol_table_test): New dtor.
4059         (selftest::test_symbol_table_test): New test.
4060         (selftest::cgraph_c_tests): New.
4061         * cgraph.h (saved_symtab): New decl.
4062         (selftest::symbol_table_test): New class.
4063         * selftest-run-tests.c (selftest::run_tests): Call
4064         selftest::cgraph_c_tests.
4065         * selftest.h (selftest::cgraph_c_tests): New decl.
4067 2018-11-08  Richard Biener  <rguenther@suse.de>
4069         * tree-data-ref.h (lambda_int): New typedef.
4070         (lambda_vector_gcd): Adjust.
4071         (lambda_vector_new): Likewise.
4072         (lambda_matrix_new): Likewise.
4073         * tree-data-ref.c  (print_lambda_vector): Adjust.
4075 2018-11-08  Richard Biener  <rguenther@suse.de>
4077         PR tree-optimization/87929
4078         * tree-complex.c (expand_complex_comparison): Clean EH.
4080 2018-11-08  Martin Liska  <mliska@suse.cz>
4082         * doc/extend.texi: Reword.
4083         * predict.c (expr_expected_value_1): Likewise.
4085 2018-11-08  Richard Biener  <rguenther@suse.de>
4087         PR tree-optimization/87913
4088         * tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares
4089         of extreme values to ordered comparisons.
4091 2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
4093         PR middle-end/42726
4094         * doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior.
4096 2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
4098         * doc/invoke.texi: Remove leading dash from @opindex entries
4099         throughout the file.
4101 2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
4103         PR driver/80828
4104         * doc/invoke.texi (Option Summary): Add -e and --entry.
4105         (Link Options): Likewise.
4107 2018-11-07  Nathan Sidwell  <nathan@acm.org>
4109         PR 87926
4110         * Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak
4111         --disable-checking bootstrap.
4113 2018-11-07  Hafiz Abid Qadeer  <abidh@codesourcery.com>
4115         * configure: Regenerated.
4117 2018-11-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
4119         PR c/87691
4120         * stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE
4121         to the mode of the widest field iff the widest field has mode class
4122         MODE_INT, or MODE_PARTIAL_INT and the union would be passed by
4123         reference.
4125 2018-11-07  Nikolai Merinov  <n.merinov@inango-systems.com>
4127         * common.opt: Add -Wattribute-warning.
4128         * doc/invoke.texi: Add documentation for -Wno-attribute-warning.
4129         * expr.c (expand_expr_real_1): Add new attribute to warning_at
4130         call to allow user configure behavior of "warning" attribute.
4132 2018-11-07  Segher Boessenkool  <segher@kernel.crashing.org>
4134         * target.def: Put @: after every vs., e.g., and i.e. where it is
4135         followed by whitespace.
4136         * doc/extend.texi: Ditto.
4137         * doc/fragments.texi: Ditto.
4138         * doc/gimple.texi: Ditto.
4139         * doc/implement-c.texi: Ditto.
4140         * doc/install.texi: Ditto.
4141         * doc/invoke.texi: Ditto.
4142         * doc/md.texi: Ditto.
4143         * doc/plugins.texi: Ditto.
4144         * doc/rtl.texi: Ditto.
4145         * doc/sourcebuild.texi: Ditto.
4146         * doc/tm.texi.in: Ditto.
4147         * doc/ux.texi: Ditto.
4148         * doc/tm.texi: Regenerate.
4150 2018-11-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4152         * config/arm/arm-cpus.in (ares): New entry.
4153         * config/arm/arm-tables.opt: Regenerate.
4154         * config/arm/arm-tune.md: Likewise.
4155         * doc/invoke.texi (ARM Options): Document ares.
4157 2018-11-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4159         * config/aarch64/aarch64-cores.def (ares): Define.
4160         * config/aarch64/aarch64-tune.md: Regenerate.
4161         * doc/invoke.texi (AArch64 Options): Document ares value for mtune.
4163 2018-11-07  Jan Hubicka  <jh@suse.cz>
4165         * tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE.
4166         (free_lang_data_in_decl): Set TREE_ADDRESSABLE for public vars and
4167         functions; clear TYPE_DECL_SUPPRESS_DEBUG and DECL_MODE for
4168         TYPE_DECL.
4170 2018-11-07  Richard Biener  <rguenther@suse.de>
4172         PR tree-optimization/87914
4173         * tree-vect-loop.c (vect_is_simple_reduction): Improve detection
4174         of nested cycles.
4175         (vectorizable_reduction): Handle shifts and rotates by dispatching
4176         to vectorizable_shift.
4177         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Handle
4178         in-loop uses of vect_nested_cycle defs.  Merge cycle and internal
4179         def cases.
4180         (vectorizable_shift): Export and handle being called as
4181         vect_nested_cycle.
4182         (vect_analyze_stmt): Call vectorizable_shift after
4183         vectorizable_reduction.
4184         * tree-vectorizer.h (vectorizable_shift): Declare.
4186 2018-11-07  Jan Hubicka  <jh@suse.cz>
4188         * ipa-devirt.c (odr_types_equivalent_p): Expect constants
4189         than const decls in TREE_VALUE of enum.
4190         (dump_type_inheritance_graph): Improve duplicate dumping.
4191         (free_enum_values): New.
4192         (build_type_inheritance_graph): Use it.
4193         * tree.c (free_lang_data_in_type): Free TYPE_VALUES of enums
4194         which are not main variants or not ODR types.
4195         (verify_type_variant): Expect variants to have no TYPE_VALUES.
4197 2018-11-07  Richard Biener  <rguenther@suse.de>
4199         * ipa-inline.c (want_inline_small_function_p): Compute
4200         big_speedup_p lazily and last.
4202 2018-11-07  Jan Hubicka  <jh@suse.cz>
4204         * tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
4205         building incomplete variant of complete type.
4206         (fld_type_variant): Do not copy TYPE_ALIGN when building incomplete
4207         variant of complete type.
4209 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
4211         * config/mips/mips.c: Fix typo in documentation of
4212         mips_loongson_ext2_prefetch_cookie.
4213         (mips_option_override): fix brain twister logical.
4214         * config/mips/mips.h: Fix typo in documentation of
4215         ISA_HAS_CTZ_CTO and define pattern.
4216         * config/mips/mips.md (prefetch): Hoist EXT2 above
4217         the 2EF/EXT block.
4218         (prefetch_indexed): Hoist EXT2 above the EXT block.
4220 2018-11-07  Jan Hubicka  <jh@suse.cz>
4222         * tree.c (free_lang_data_in_type): Add fld parameter; simplify
4223         return and parameter types of function and method types.
4224         (free_lang_data_in_cgraph): Update.
4226 2018-11-07  Martin Liska  <mliska@suse.cz>
4228         PR rtl-optimization/87868
4229         * postreload-gcse.c (eliminate_partially_redundant_load): Set
4230         threshold to max_count if we would overflow.
4231         * profile-count.h: Make max_count a public constant.
4233 2018-11-07  Martin Liska  <mliska@suse.cz>
4235         * mem-stats.h: Fix GNU coding style.
4237 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
4239         * config/mips/gs264e.md: New.
4240         * config/mips/mips-cpus.def: Define gs264e.
4241         * config/mips/mips-tables.opt: Regenerate.
4242         * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
4243         gs264e.
4244         (mips_issue_rate): Add support for gs264e.
4245         (mips_multipass_dfa_lookahead): Likewise.
4246         * config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
4247         (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
4248         (MIPS_ASE_MSA_SPEC): New.
4249         (BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
4250         (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
4251         (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
4252         * config/mips/mips.md: Include gs264e.md.
4253         (processor): Add gs264e.
4254         * config/mips/mips.opt (MSA): Use Mask instead of Var.
4255         * doc/invoke.texi: Add gs264e to supported architectures.
4257 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
4259         * config/mips/gs464e.md: New.
4260         * config/mips/mips-cpus.def: Define gs464e.
4261         * config/mips/mips-tables.opt: Regenerate.
4262         * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
4263         gs464e.
4264         (mips_issue_rate): Add support for gs464e.
4265         (mips_multipass_dfa_lookahead): Likewise.
4266         (mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
4267         * config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
4268         (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
4269         (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
4270         (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
4271         * config/mips/mips.md: Include gs464e.md.
4272         (processor): Add gs464e.
4273         * doc/invoke.texi: Add gs464e to supported architectures.
4275 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
4277         * config/mips/loongson3a.md: Rename to ...
4278         * config/mips/gs464.md: ... here.
4279         * config/mips/mips-cpus.def: Define gs464; Add loongson3a
4280         as an alias of gs464 processor.
4281         * config/mips/mips-tables.opt: Regenerate.
4282         * config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
4283         instead of PROCESSOR_LOONGSON_3A.
4284         (mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
4285         TUNE_LOONGSON_3A.
4286         (mips_option_override): Enable MMI and EXT for gs464.
4287         * config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
4288         Rename TUNE_LOONGSON_3A to TUNE_GS464.
4289         (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
4290         (ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
4291         ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
4292         TARGET_LOONGSON_3A.
4293         * config/mips/mips.md: Include gs464.md instead of loongson3a.md.
4294         (processor): Add gs464;
4295         * doc/invoke.texi: Add gs464 to supported architectures.
4297 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
4299         * config/mips/mips-protos.h
4300         (mips_loongson_ext2_prefetch_cookie): New prototype.
4301         * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
4302         (mips_option_override): Enable TARGET_LOONGSON_EXT when
4303         TARGET_LOONGSON_EXT2 is true.
4304         * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
4305         __mips_loongson_ext2, __mips_loongson_ext_rev=2.
4306         (ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
4307         (ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
4308         TARGET_LOONGSON_EXT2.
4309         (ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
4310         (define_insn "ctz<mode>2"): New insn pattern.
4311         (define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
4312         (define_insn "prefetch_indexed_<mode>"): Include
4313         TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
4314         * config/mips/mips.opt (-mloongson-ext2): Add option.
4315         * gcc/doc/invoke.texi (-mloongson-ext2): Document.
4317 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
4319         * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
4320         __mips_loongson_ext.
4321         (MIPS_ASE_LOONGSON_EXT_SPEC): New.
4322         (BASE_DRIVER_SELF_SPECS): march=loongson3a implies
4323         -mloongson-ext.
4324         (ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
4325         * config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
4326         <u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
4327         instead of TARGET_LOONGSON_3A.
4328         * config/mips/mips.opt (-mloongson-ext): Add option.
4329         * gcc/doc/invoke.texi (-mloongson-ext): Document.
4331 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
4333         * config.gcc (extra_headers): Add loongson-mmiintrin.h.
4334         * config/mips/loongson.md: Move to ...
4335         * config/mips/loongson-mmi.md: here; Adjustment.
4336         * config/mips/loongson.h: Move to ...
4337         State as deprecated. Include loongson-mmiintrin.h for back
4338         compatibility and warning.
4339         * config/mips/loongson-mmiintrin.h: ... here.
4340         * config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
4341         mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
4342         TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
4343         (mips_option_override): Make sure MMI use hard float;
4344         (mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
4345         mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
4346         mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
4347         TARGET_LOONGSON_VECTORS.
4348         * gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
4349         (TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
4350         (MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
4351         (BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
4352         -mloongson-mmi.
4353         (SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
4354         TARGET_LOONGSON_VECTORS.
4355         * gcc/config/mips/mips.md (MOVE64, MOVE128): Use
4356         TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
4357         (Loongson MMI patterns): Include loongson-mmi.md instead of
4358         loongson.md.
4359         * gcc/config/mips/mips.opt (-mloongson-mmi): New option.
4360         * gcc/doc/invoke.texi (-mloongson-mmi): Document.
4362 2018-11-07  Richard Biener  <rguenther@suse.de>
4364         PR lto/87906
4365         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
4366         BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
4368 2018-11-07  Alexandre Oliva <aoliva@redhat.com>
4370         PR rtl-optimization/87874
4371         * lra.c (lra_substitute_pseudo): Do not create a subreg for
4372         const wide ints.
4374 2018-11-06  Aaron Sawdey  <acsawdey@linux.ibm.com>
4376         * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
4377         if not in indexed or indirect form.
4378         (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
4379         (bswap<mode>2_store): Ditto.
4381 2018-11-06  Richard Earnshaw  <rearnsha@arm.com>
4383         * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
4384         the UNSPEC.
4386 2018-11-06  Richard Biener  <rguenther@suse.de>
4388         PR tree-optimization/86850
4389         * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
4390         instead of src.m_vec.
4392 2018-11-06  Jan Hubicka  <jh@suse.cz>
4394         * tree.c (fld_simplified_type_name): Break out form ...
4395         (free_lang_data_in_type): ... here.
4396         (fld_type_variant_equal_p): Use it.
4398 2018-11-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4400         * config/default-d.c: Include memmodel.h.
4402         * config/sol2-d.c: New file.
4403         * config/t-sol2 (sol2-d.o): New rule.
4404         * config.gcc <*-*-solaris2*>: Set d_target_objs,
4405         target_has_targetdm.
4407 2018-11-06  Jan Hubicka  <jh@suse.cz>
4409         * tree.c (fld_type_variant): Also copy alignment; be sure that
4410         new variant is equal.
4412 2018-11-06  Ilya Leoshkevich  <iii@linux.ibm.com>
4414         PR target/87762
4415         * config/s390/s390.md: Add relative_long attribute.
4417 2018-11-06  Jan Hubicka  <jh@suse.cz>
4419         * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
4420         * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
4421         * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
4422         stream TYPE_NEEDS_CONSTRUCTING.
4423         * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
4424         * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
4426 2018-11-06  Richard Biener  <rguenther@suse.de>
4428         * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
4429         dump-scope ...
4430         (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
4432 2018-11-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
4434         * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
4435         REG_CLASS_CONTENTS[GEN_REGS].
4436         (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
4438 2018-11-06  Jan Hubicka  <jh@suse.cz>
4440          * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
4442 2018-11-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4444         PR sanitizer/80953
4445         * config/sol2.h (ASAN_CC1_SPEC): Define.
4446         (LD_WHOLE_ARCHIVE_OPTION): Define.
4447         (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
4448         (ASAN_REJECT_SPEC): Provide default.
4449         (LIBASAN_EARLY_SPEC): Define.
4450         (LIBTSAN_EARLY_SPEC): Define.
4451         (LIBLSAN_EARLY_SPEC): Define.
4452         * config/i386/sol2.h (CC1_SPEC): Redefine.
4453         (ASAN_REJECT_SPEC): Define.
4455         * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
4456         (TARGET_ASAN_SHADOW_OFFSET): Define.
4457         (sparc_asan_shadow_offset): New function.
4458         * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
4459         (ASAN_REJECT_SPEC): Define.
4461 2018-11-06  Jan Hubicka  <jh@suse.cz>
4463         * tree.c (fld_type_variant): Copy canonical type.
4464         (fld_incomplete_type_of): Check that canonical types looks sane;
4465         copy canonical type.
4466         (verify_type): Accept when incomplete type has complete canonical type.
4468 2018-11-06  Jan Hubicka  <jh@suse.cz>
4470         * tree.c (free_lang_data): Reset overwite_assembler_name,
4471         print_xnode, print_decl, print_type and print_identifier of
4472         langhooks.
4474 2018-11-06  Richard Biener  <rguenther@suse.de>
4476         PR tree-optimization/87889
4477         * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
4478         Do nothing if old and new arg are the same
4480 2018-11-06  Andreas Krebbel  <krebbel@linux.ibm.com>
4482         PR target/87723
4483         * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
4484         attributes for operands 3 and 4.
4486 2018-11-06  Richard Biener  <rguenther@suse.de>
4488         PR middle-end/18041
4489         * simplify-rtx.c (simplify_binary_operation_1): Add pattern
4490         matching bitfield insertion.
4492 2018-11-06  Alexandre Oliva <aoliva@redhat.com>
4494         * auto-inc-dec.c: Include valtrack.h.  Improve comments.
4495         (reg_next_debug_use): New.
4496         (attempt_change): Propagate adjusted expression into affected
4497         debug insns.
4498         (merge_in_block): Track uses in debug insns.
4499         (pass_inc_dec::execute): Allocate and release
4500         reg_next_debug_use.
4502 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
4504         * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
4505         (_mm512_fixupimm_round_pd): Update parameters and builtin.
4506         (_mm512_maskz_fixupimm_round_pd): Ditto.
4507         (_mm512_fixupimm_round_ps): Ditto.
4508         (_mm512_maskz_fixupimm_round_ps): Ditto.
4509         (_mm_fixupimm_round_sd): Ditto.
4510         (_mm_maskz_fixupimm_round_sd): Ditto.
4511         (_mm_fixupimm_round_ss): Ditto.
4512         (_mm_maskz_fixupimm_round_ss): Ditto.
4513         (_mm512_fixupimm_pd): Ditto.
4514         (_mm512_maskz_fixupimm_pd): Ditto.
4515         (_mm512_fixupimm_ps): Ditto.
4516         (_mm512_maskz_fixupimm_ps): Ditto.
4517         (_mm_fixupimm_sd): Ditto.
4518         (_mm_maskz_fixupimm_sd): Ditto.
4519         (_mm_fixupimm_ss): Ditto.
4520         (_mm_maskz_fixupimm_ss): Ditto.
4521         (_mm512_mask_fixupimm_round_pd): Update builtin.
4522         (_mm512_mask_fixupimm_round_ps): Ditto.
4523         (_mm_mask_fixupimm_round_sd): Ditto.
4524         (_mm_mask_fixupimm_round_ss): Ditto.
4525         (_mm512_mask_fixupimm_pd): Ditto.
4526         (_mm512_mask_fixupimm_ps): Ditto.
4527         (_mm_mask_fixupimm_sd): Ditto.
4528         (_mm_mask_fixupimm_ss): Ditto.
4529         * config/i386/avx512vlintrin.h:
4530         (_mm256_fixupimm_pd): Update parameters and builtin.
4531         (_mm256_maskz_fixupimm_pd): Ditto.
4532         (_mm256_fixupimm_ps): Ditto.
4533         (_mm256_maskz_fixupimm_ps): Ditto.
4534         (_mm_fixupimm_pd): Ditto.
4535         (_mm_maskz_fixupimm_pd): Ditto.
4536         (_mm_fixupimm_ps): Ditto.
4537         (_mm_maskz_fixupimm_ps): Ditto.
4538         (_mm256_mask_fixupimm_pd): Update builtin.
4539         (_mm256_mask_fixupimm_ps): Ditto.
4540         (_mm_mask_fixupimm_pd): Ditto.
4541         (_mm_mask_fixupimm_ps): Ditto.
4542         * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
4543         * config/i386/i386-builtin.def: Update builtin definitions.
4544         * config/i386/i386.c: Handle new builtin types and remove useless ones.
4545         * config/i386/sse.md: Update VFIXUPIMM* patterns.
4546         (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
4547         (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
4548         (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
4549         (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
4550         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
4551         (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
4552         * config/i386/subst.md:
4553         (round_saeonly_sd_mask_operand4): Add new subst_attr.
4554         (round_saeonly_sd_mask_op4): Ditto.
4555         (round_saeonly_expand_operand5): Ditto.
4556         (round_saeonly_expand): Update.
4558 2018-11-05  Max Filippov  <jcmvbkbc@gmail.com>
4560         * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
4562 2018-11-05  Segher Boessenkool  <segher@kernel.crashing.org>
4564         PR rtl-optimization/87871
4565         * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
4567 2018-11-05  Paul Koning  <ni1d@arrl.net>
4569         * doc/sourcebuild.texi (target attributes): Document new "inf"
4570         effective target keyword.
4572 2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
4574         * config/s390/s390.c (s390_register_move_cost): Increase costs for
4575         moves involving the CC reg.
4577 2018-11-05  Richard Biener  <rguenther@suse.de>
4579         PR tree-optimization/87873
4580         * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
4581         argument.
4582         * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
4583         * tree-vect-loop.c (vect_transform_loop): When splitting the
4584         loop exit also create forwarder PHIs for constants.
4585         * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
4586         Handle constant to_arg, add extra checking we match up the correct
4587         PHIs.
4589 2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
4591         * config/s390/s390.md: QImode and HImode for load on condition.
4593 2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
4595         * config/s390/predicates.md: Fix typo.
4596         * config/s390/s390.md: Allow immediates for load on condition.
4598 2018-11-05  Martin Liska  <mliska@suse.cz>
4600         * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
4601         * bitmap.h (struct bitmap_usage): Likewise.
4602         * ggc-common.c (SCALE): Remove.
4603         (LABEL): Likewise.
4604         (struct ggc_usage): Use SIZE_AMOUNT. And update
4605         compare method.
4606         * ggc-page.c (SCALE): Remove.
4607         (STAT_LABEL): Remove.
4608         (ggc_print_statistics): Use SIZE_AMOUNT.
4609         * gimple.h (SCALE): Remove.
4610         (LABEL): Likewise.
4611         * input.c (ONE_K): Remove.
4612         (ONE_M): Likewise.
4613         (SCALE): Likewise.
4614         (STAT_LABEL): Likewise.
4615         (FORMAT_AMOUNT): Likewise.
4616         (dump_line_table_statistics): Use SIZE_AMOUNT.
4617         * mem-stats.h (struct mem_usage): Likewise.
4618         * rtl.c (dump_rtx_statistics): Likewise.
4619         (rtx_alloc_counts): Change type to size_t.
4620         (rtx_alloc_sizes): Likewise.
4621         (rtx_count_cmp): New.
4622         (dump_rtx_statistics): Sort first based on counts.
4623         * tree.c (tree_nodes_cmp): New.
4624         (tree_codes_cmp): New.
4625         (dump_tree_statistics): Sort first based on counts.
4626         * system.h (ONE_K): New.
4627         (ONE_M): Likewise.
4628         (SIZE_SCALE): Likewise.
4629         (SIZE_LABEL): Likewise.
4630         (SIZE_AMOUNT): Likewise.
4631         * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
4632         * tree-dfa.c (dump_dfa_stats): Likewise.
4633         * tree-phinodes.c (phinodes_print_statistics): Likewise.
4634         * tree-ssanames.c (ssanames_print_statistics): Likewise.
4635         * tree.c (dump_tree_statistics): Likewise.
4636         * vec.c (struct vec_usage): Likewise.
4637         * trans-mem.c (tm_mangle): Enlarge buffer in order to not
4638         trigger a -Werror=format-overflow with
4639         --enable-gather-detailed-stats.
4641 2018-11-05  Martin Liska  <mliska@suse.cz>
4643         * mem-stats.h (mem_alloc_description::release_instance_overhead):
4644         Return T *.
4645         * vec.c (struct vec_usage): Register m_element_size.
4646         (vec_prefix::register_overhead): New arguments: elements and
4647         element_size.
4648         (vec_prefix::release_overhead): Subtract elements.
4649         * vec.h (struct vec_prefix): Change signature.
4650         (va_heap::reserve): Pass proper arguments.
4651         (va_heap::release): Likewise.
4653 2018-11-05  Martin Liska  <mliska@suse.cz>
4655         * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
4656         style.
4657         * vec.c: Likewise.
4659 2018-11-05  Richard Biener  <rguenther@suse.de>
4661         * tree-scalar-evolution.h (final_value_replacement_loop): Update
4662         prototype.
4663         * tree-scalar-evolution.c (final_value_replacement_loop): Return
4664         whether anything was done.
4665         (scev_const_prop): Remove constant propagation part, fold
4666         remains into ...
4667         * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
4668         (pass_data_scev_cprop): TODO_cleanup_cfg is now done
4669         conditionally.
4671 2018-11-05  Jakub Jelinek  <jakub@redhat.com>
4673         PR tree-optimization/87859
4674         * gimple-ssa-store-merging.c (struct merged_store_group): Add
4675         only_constants and first_nonmergeable_order members.
4676         (merged_store_group::merged_store_group): Initialize them.
4677         (merged_store_group::do_merge): Clear only_constants member if
4678         adding something other than INTEGER_CST store.
4679         (imm_store_chain_info::coalesce_immediate_stores): Don't merge
4680         stores with order >= first_nonmergeable_order.  Use
4681         merged_store->only_constants instead of always recomputing it.
4682         Set merged_store->first_nonmergeable_order if we've skipped any
4683         stores.  Attempt to merge overlapping INTEGER_CST stores that
4684         we would otherwise skip.
4686         PR sanitizer/87837
4687         * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
4689 2018-11-05  Xuepeng Guo  <xuepeng.guo@intel.com>
4691         PR target/87853
4692         * config/i386/emmintrin.h (__v16qs): New to cope with option
4693         -funsigned-char.
4694         (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
4695         (_mm_cmplt_epi8): Likewise.
4696         (_mm_cmpgt_epi8): Likewise.
4698 2018-11-05  Richard Biener  <rguenther@suse.de>
4700         PR rtl-optimization/87852
4701         * fwprop.c (use_killed_between): Only consider single-defs of the
4702         use whose definition statement dominates the use.
4704 2018-11-05  Martin Liska  <mliska@suse.cz>
4706         PR web/87829
4707         * doc/invoke.texi: Remove options that are
4708         not disabled with -Os.
4710 2018-11-05  Martin Liska  <mliska@suse.cz>
4712         PR c/87811
4713         * doc/extend.texi: Update constrain about the last argument
4714         of __builtin_expect_with_probability.
4716 2018-11-05  Martin Liska  <mliska@suse.cz>
4718         PR c/87811
4719         * predict.c (expr_expected_value_1): Verify
4720         that last argument is a real constants and emit
4721         error.
4723 2018-11-05  Martin Liska  <mliska@suse.cz>
4725         PR gcov-profile/77698
4726         * ipa-profile.c (ipa_profile): Adjust hotness threshold
4727         only in LTO mode.
4729 2018-11-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4731         PR tree-optimization/86572
4732         * builtins.c (c_strlen): Handle negative offsets in a safe way.
4734 2018-11-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4736         PR tree-optimization/87672
4737         * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
4738         * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
4740 2018-11-04  Uros Bizjak  <ubizjak@gmail.com>
4742         PR middle-end/58372
4743         * cfgexpand.c (pass_expand::execute): Move the call to
4744         finish_eh_generation in front of the call to expand_stack_alignment.
4746 2018-11-04  Venkataramanan Kumar <venkataramanan.kumar@amd.com>
4748         * common/config/i386/i386-common.c (processor_alias_table): Add
4749         znver2 entry.
4750         * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
4751         (case ${target}): Add znver2.
4752         * config/i386/driver-i386.c: (host_detect_local_cpu): Let
4753         -march=native recognize znver2 processors.
4754         * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
4755         * config/i386/i386.c (m_znver2): New definition.
4756         (m_ZNVER): New definition.
4757         (m_AMD_MULTIPLE): Includes m_znver2.
4758         (processor_cost_table): Add znver2 entry.
4759         (processor_target_table): Add znver2 entry.
4760         (get_builtin_code_for_version): Set priority for
4761         PROCESSOR_ZNVER2.
4762         (processor_model): Add M_AMDFAM17H_ZNVER2.
4763         (arch_names_table): Ditto.
4764         (ix86_reassociation_width): Include znver2.
4765         * config/i386/i386.h (TARGET_znver2): New definition.
4766         (struct ix86_size_cost): Add TARGET_ZNVER2.
4767         (enum processor_type): Add PROCESSOR_ZNVER2.
4768         * config/i386/i386.md (define_attr "cpu"): Add znver2.
4769         * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
4770         * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
4771         (ix86_adjust_cost): Add znver2.
4772         * config/i386/x86-tune.def:  Replace m_ZNVER1 by m_ZNVER.
4773         * gcc/doc/extend.texi: Add details about znver2.
4774         * gcc/doc/invoke.texi: Add details about znver2.
4776 2018-11-03  Sandra Loosemore  <sandra@codesourcery.com>
4778         PR target/87079
4780         * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
4781         pattern.
4783 2018-11-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
4785         * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
4786         attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
4788 2018-11-02  Richard Earnshaw  <rearnsha@arm.com>
4790         * config/aarch64/aarch64.c ((aarch64_override_options): Disable
4791         shrink-wrapping when -mtrack-speculation.
4793 2018-11-02  Richard Biener  <rguenther@suse.de>
4795         * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
4796         (pop_cost_one_pair): Do not free pair.
4797         (pop_best_coalesce): Likewise.
4798         (create_coalesce_list): Initialize obstack.
4799         (delete_coalesce_list): Free obstack.
4800         (find_coalesce_pair): Obstack-allocate coalesce pairs.
4801         (add_cost_one_coalesce): Likewise.
4802         (struct live_track): Remove bitmap pointer indirections.
4803         (new_live_track): Adjust.
4804         (delete_live_track): Likewise.
4805         (live_track_remove_partition): Likewise.
4806         (live_track_add_partition): Likewise.
4807         (live_track_live_p): Likewise.
4808         (live_track_process_def): Likewise.
4809         (live_track_clear_base_vars): Likewise.
4811 2018-11-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4813         * configure.ac (gcc_cv_as_sparc_register_op): Remove.
4814         * configure: Regenerate.
4815         * config.in: Regenerate.
4816         * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
4817         HAVE_AS_REGISTER_PSEUDO_OP guard.
4818         * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
4819         !HAVE_AS_REGISTER_PSEUDO_OP support.
4820         (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
4821         guard.
4823 2018-11-02  Richard Biener  <rguenther@suse.de>
4825         * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
4826         with is_type_die.
4828 2018-11-02  Richard Biener  <rguenther@suse.de>
4830         PR tree-optimization/87776
4831         * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
4832         executable when iterating but running into rpo-vn-max-loop-depth
4833         and not eliding the iteration.
4835 2018-11-30  Jan Hubicka  <jh@suse.cz>
4837         * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
4838         TYPE_DECL.
4840 2018-11-01  Aaron Sawdey  <acsawdey@linux.ibm.com>
4842         * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
4843         prototype.
4844         * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
4845         Combine with rs6000_address_for_fpconvert.
4846         (rs6000_address_for_fpconvert): Combine with
4847         rs6000_force_indexed_or_indirect_mem.
4848         (rs6000_expand_vector_init): Change function call from
4849         rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
4850         * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
4851         rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
4852         (floatsi<mode>2_lfiwax_mem): Ditto.
4853         (floatunssi<mode>2_lfiwzx): Ditto.
4854         (floatunssi<mode>2_lfiwzx_mem): Ditto.
4855         (float<QHI:mode><FP_ISA3:mode>2): Ditto.
4856         (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
4857         (fix_trunc<mode>si2_stfiwx): Ditto.
4858         (fixuns_trunc<mode>si2_stfiwx): Ditto.
4859         (float_<mode>si2_hw): Ditto.
4860         (floatuns_<mode>si2_hw): Ditto.
4861         * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
4862         (vsx_splat_<mode>): Ditto.
4864 2018-11-01  Joseph Myers  <joseph@codesourcery.com>
4866         * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
4867         at end of assembler input text.
4868         * configure: Regenerate.
4870 2018-11-01  Jakub Jelinek  <jakub@redhat.com>
4872         PR tree-optimization/87826
4873         * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
4874         negative or larger or equal to type's precision.
4876 2018-10-31  Alexandre Oliva <aoliva@redhat.com>
4878         * opts.c (default_options_table): Do not enable
4879         OPT_fdelayed_branch at -Og.
4880         * doc/invoke.texi (-fdelayed-branch): Document it.
4882 2018-10-31  Richard Henderson  <richard.henderson@linaro.org>
4884         * optabs-libfuncs.c (build_libfunc_function_visibility):
4885         New, split out from...
4886         (build_libfunc_function): ... here.
4887         (init_one_libfunc_visibility): New, split out from ...
4888         (init_one_libfunc): ... here.
4890         * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
4891         scratch register need not be early-clobber.  Document the reason
4892         why we cannot use ST<OP>.
4894 2018-10-31  Joseph Myers  <joseph@codesourcery.com>
4896         PR bootstrap/82856
4897         * configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.  Use single
4898         line for second argument of AC_DEFINE_UNQUOTED.
4899         * doc/install.texi (Tools/packages necessary for modifying GCC):
4900         Update to autoconf 2.69 and automake 1.15.1.
4901         * aclocal.m4, config.in, configure: Regenerate.
4903 2018-10-31  Pat Haugen  <pthaugen@us.ibm.com>
4905         * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
4906         initialization.
4908 2018-10-31  Martin Liska  <mliska@suse.cz>
4910         PR driver/83193
4911         * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
4912         Add new argument invalid_extension.
4913         (aarch64_get_all_extension_candidates): New function.
4914         (aarch64_rewrite_selected_cpu): Add NULL to function call.
4915         * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
4916         new argument.
4917         (aarch64_get_all_extension_candidates): New function.
4918         * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
4919         argument invalid_extension.
4920         (aarch64_parse_cpu): Likewise.
4921         (aarch64_print_hint_for_extensions): New function.
4922         (aarch64_validate_mcpu): Provide hint about invalid extension.
4923         (aarch64_validate_march): Likewise.
4924         (aarch64_handle_attr_arch): Pass new argument.
4925         (aarch64_handle_attr_cpu): Provide hint about invalid extension.
4926         (aarch64_handle_attr_isa_flags): Likewise.
4928 2018-10-31  Richard Biener  <rguenther@suse.de>
4930         PR middle-end/70359
4931         PR middle-end/86270
4932         * tree-outof-ssa.c (insert_backedge_copies): Restrict
4933         copy generation to useful cases.  Place the copy before
4934         the definition of the backedge value when possible.
4936 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
4938         * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
4939         * config/arc/arc.c (arc_active_insn): New function.
4940         (check_store_cacheline_hazard): Likewise.
4941         (workaround_arc_anomaly): Use check_store_cacheline_hazard.
4942         (arc_override_options): Disable delay slot scheduler for older
4943         A7.
4944         (arc_store_addr_hazard_p): New implementation, old one renamed to
4945         ...
4946         (arc_store_addr_hazard_internal_p): Renamed.
4947         (arc_reorg): Don't combine into brcc instructions which are part
4948         of hardware hazard solution.
4949         * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
4950         (tune_arc700): Likewise.
4951         * config/arc/arc.opt (arc7xx): New tune value.
4952         * config/arc/arc700.md: Improve A7 scheduler.
4954 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
4956         * config/arc/arc.c (arc_override_options): Remove
4957         TARGET_COMPACT_CASESI.
4958         * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
4959         (CASE_VECTOR_MODE): Likewise.
4960         (CASE_VECTOR_PC_RELATIVE): Likewise.
4961         (CASE_VECTOR_SHORTEN_MODE): Likewise.
4962         (CASE_VECTOR_SHORTEN_MODE1): Delete.
4963         (ADDR_VEC_ALIGN): Update.
4964         (ASM_OUTPUT_CASE_LABEL): Undefine.
4965         (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
4966         (TARGET_BI_BIH): Define.
4967         (DEFAULT_BRANCH_INDEX): Likewise.
4968         * config/arc/arc.md (casesi): Rework to accept BI/BIH
4969         instructions, remove compact_casesi use case.
4970         (casesi_compact_jump): Remove.
4971         (casesi_dispatch): New pattern.
4972         * config/arc/arc.opt: Add mbranch-index option. Deprecate
4973         compact_casesi option.
4974         * doc/invoke.texi: Document mbranch-index option.
4976 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
4978         * config/arc/arc.c (arc_get_tp): Remove function.
4979         (arc_emit_call_tls_get_addr): Likewise.
4980         (arc_call_tls_get_addr): New function.
4981         (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
4982         * config/arc/arc.md (tls_load_tp_soft): Remove.
4983         (tls_gd_get_addr): Likewise.
4985 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
4987         * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
4988         (mulsi3_600_lib): Remove pattern.
4989         (umulsi3_highpart_600_lib_le): Likewise.
4990         (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
4991         (umulsidi3): Remove call to umulsidi3_600_lib.
4992         (umulsidi3_600_lib): Remove pattern.
4993         (peephole2): Remove peephole using the above deprecated patterns.
4995 2018-10-31  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
4997         PR target/87374
4998         * config/arm/arm.c (arm_option_check_internal): Disable the combined
4999         use of -mslow-flash-data and -mword-relocations.
5000         (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
5001         * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
5002         flag_pic.
5003         * doc/invoke.texi (-mword-relocations): Mention conflict with
5004         -mslow-flash-data.
5005         (-mslow-flash-data): Reciprocally.
5007 2018-10-31  Richard Henderson  <richard.henderson@linaro.org>
5009         * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
5010         16-byte modes held in GP registers to use an even regno.
5012         * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
5013         (aarch64_atomic_ldop_supported_p): Remove.
5014         (aarch64_gen_atomic_ldop): Remove.
5015         * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
5016         Fully expand LSE operations here.
5017         (atomic_fetch_<atomic_optab><ALLI>): Likewise.
5018         (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
5019         (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
5020         and use ATOMIC_LDOP instead; use register_operand for the input;
5021         drop the split and emit insns directly.
5022         (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
5023         (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
5024         (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
5026         * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
5027         (aarch64_gen_atomic_ldop): Don't call it.
5028         * config/aarch64/atomics.md (atomic_exchange<ALLI>):
5029         Use aarch64_reg_or_zero.
5030         (aarch64_atomic_exchange<ALLI>): Likewise.
5031         (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
5032         operand 0; use aarch64_reg_or_zero for input; merge ...
5033         (@aarch64_atomic_swp<ALLI>): ... this and remove.
5035         * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
5036         (aarch64_split_compare_and_swap): Use it.
5037         (aarch64_expand_compare_and_swap): Likewise.  Remove convert_modes;
5038         test oldval against the proper predicate.
5039         * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
5040         Use nonmemory_operand for expected.
5041         (cas_short_expected_pred): New.
5042         (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
5043         (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
5044         * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
5045         (aarch64_plushi_operand): New.
5047         * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
5048         Force oldval into the rval register for TARGET_LSE; emit the compare
5049         during initial expansion so that it may be deleted if unused.
5050         (aarch64_gen_atomic_cas): Remove.
5051         * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
5052         Change =&r to +r for operand 0; use match_dup for operand 2;
5053         remove is_weak and mod_f operands as unused.  Drop the split
5054         and merge with...
5055         (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
5056         (@aarch64_compare_and_swap<GPI>_lse): Similarly.
5057         (@aarch64_atomic_cas<GPI>): Similarly.
5059 2018-10-31  Richard Biener  <rguenther@suse.de>
5061         * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
5062         using ABSU_EXPR.
5064 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
5066         * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
5067         * config/aarch64/aarch64.md: Include saphira.md
5068         * config/aarch64/saphira.md: New file for pipeline description.
5070 2018-10-30  Martin Sebor  <msebor@redhat.com>
5072         PR middle-end/87041
5073         * gimple-ssa-sprintf.c (format_directive): Use %G to include
5074         inlining context.
5075         (sprintf_dom_walker::compute_format_length):
5076         Avoid setting POSUNDER4K here.
5077         (get_destination_size): Handle null argument values.
5078         (get_user_idx_format): New function.
5079         (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
5080         functions, including user-defined with attribute format printf.
5081         Use %G to include inlining context.
5082         Set POSUNDER4K here.
5084 2018-10-30  Jan Hubicka  <jh@suse.cz>
5086         * params.def (lto-partitions): Bump from 32 to 128.
5088 2018-10-30  Jan Hubicka  <jh@suse.cz>
5090         * tree.c
5091         (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
5092         head in file.
5093         (free_lang_data_in_type): Forward declare.
5094         (fld_type_variant_equal_p): New function.
5095         (fld_type_variant): New function
5096         (fld_incomplete_types): New hash.
5097         (fld_incomplete_type_of): New function
5098         (fld_simplfied-type): New function.
5099         (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
5100         (free_lang_data): Allocate and free fld_incomplete_type; update call
5101         of free_lang_data_in_decl.
5103 2018-10-30  Eric Botcazou  <ebotcazou@adacore.com>
5105         * gcov.c (output_lines): Remove duplicate line.
5107 2018-10-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
5109         * config/rs6000/rs6000.md (bswapdi2): Force address into register
5110         if not in indexed or indirect form.
5111         (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
5112         (bswapdi2_store): Ditto.
5113         * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
5114         helper function.
5115         * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
5116         Prototype for helper function.
5118 2018-10-30  Martin Sebor  <msebor@redhat.com>
5120         * doc/extend.texi (optimize): Clarify/expand attribute documentation.
5121         (target, pragma GCC optimize, pragma GCC target): Ditto.
5123 2018-10-30  Jonathan Wakely  <jwakely@redhat.com>
5125         * doc/extend.texi: Fix prototype and description of
5126         __builtin_expect_with_probability.
5128 2018-10-30  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
5130         * cgraph.h (clone_function_name_1): Replaced by new
5131           clone_function_name_numbered that takes name as string; for
5132           privatize_symbol_name_1 use only.
5133           (clone_function_name): Renamed to
5134           clone_function_name_numbered to be explicit about numbering.
5135           (clone_function_name): New two-argument function that does
5136           not number its output.
5137           (clone_function_name): New three-argument function that
5138           takes a number to append to its output.
5139         * cgraphclones.c (duplicate_thunk_for_node):
5140           (clone_function_name_1): Renamed.
5141           (clone_function_name_numbered): Two new functions.
5142           (clone_function_name): Improved documentation.
5143           (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
5144         * config/rs6000/rs6000.c (make_resolver_func): Ditto.
5145         * final.c (final_scan_insn_1): Use the new clone_function_name
5146           without numbering.
5147         * multiple_target.c (create_dispatcher_calls): Ditto.
5148           (create_target_clone): Ditto.
5149         * omp-expand.c (grid_expand_target_grid_body): Ditto.
5150         * omp-low.c (create_omp_child_function_name): Ditto.
5151         * omp-simd-clone.c (simd_clone_create): Ditto.
5152         * symtab.c (simd_symtab_node::noninterposable_alias): Use the
5153           new clone_function_name without numbering.
5155 2018-10-30  Richard Earnshaw  <rearnsha@arm.com>
5157         * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
5158         Assert that the allocation size is not zero.
5160 2018-10-30  Richard Biener  <rguenther@suse.de>
5162         PR tree-optimization/87800
5163         * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
5164         non-induction or reduction PHIs.
5166 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
5168         * config/aarch64/falkor-tag-collision-avoidance.c
5169         (execute_tag_collision_avoidance): Call df_note_add_problem.
5171 2018-10-30  Martin Liska  <mliska@suse.cz>
5173         * doc/extend.texi: Fix typo in documentation
5174         of __builtin_expect_with_probability.
5176 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
5178         PR c++/87721
5179         * input.c (get_substring_ranges_for_loc): Detect if
5180         linemap_resolve_location gives us a NULL map, and reject
5181         this case.
5183 2018-10-29  Iain Buclaw  <ibuclaw@gdcproject.org>
5185         * config.gcc (xstormy16-*-elf): Set tm_d_file.
5187 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
5188             Martin Sebor  <msebor@redhat.com>
5189             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
5191         * doc/ux.texi (Quoting): New subsection, adapted from material at
5192         https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
5193         MartinSebor and ManuelLopezIbanez.
5194         (Fix-it hints): Note that fix-it hints shouldn't be marked for
5195         translation.
5197 2018-10-29  Kugan Vivekanandarajah  <kuganv@linaro.org>
5199         PR middle-end/87469
5200         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
5201         max value.
5203 2018-10-29  Paul A. Clarke  <pc@us.ibm.com>
5205         * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
5207 2018-10-29  Paul Koning  <ni1d@arrl.net>
5209         * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
5211 2018-10-29  Paul A. Clarke  <pc@us.ibm.com>
5213         * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
5214         _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
5215         _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
5216         _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
5217         _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
5218         _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
5219         _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
5220         _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
5221         Change 'vector' to '__vector'.
5222         * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
5223         _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
5224         _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
5225         _mm_avg_pu16): Likewise.  And, whitespace corrections.
5227 2018-10-29  Richard Biener  <rguenther@suse.de>
5229         PR tree-optimization/87785
5230         * tree-vect-slp.c (vect_gather_slp_loads): Only gather
5231         internal defs.
5233 2018-10-29  Olivier Hainque  <hainque@adacore.com>
5235         * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
5237 2018-10-29  Olivier Hainque  <hainque@adacore.com>
5239         * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
5240         ports configuration macro, defaults to "gnu".
5241         (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
5242         TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
5244 2018-10-29  Olivier Hainque  <hainque@adacore.com>
5246         * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
5248 2018-10-29  Richard Biener  <rguenther@suse.de>
5250         PR tree-optimization/87790
5251         * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
5252         (vect_make_slp_decision): Adjust.
5253         (vect_slp_analyze_bb_1): Likewise.
5254         (vect_detect_hybrid_slp_stmts): Properly union SLP type over
5255         edges.
5257 2018-10-29  Richard Biener  <rguenther@suse.de>
5259         PR tree-optimization/87785
5260         * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
5261         and processing.
5262         (vect_build_slp_tree): Likewise.
5263         (vect_gather_slp_loads): New function.
5264         (vect_analyze_slp_instance): Gather loads separately from the
5265         SLP tree build.
5267 2018-10-29  Martin Liska  <mliska@suse.cz>
5269         * Makefile.in: Make dependency to json.o.
5270         * doc/gcov.texi: Document new JSON format, remove
5271         old intermediate format documentation.
5272         * gcov.c (struct function_info): Come up with m_name and
5273         m_demangled_name.
5274         (function_info::function_info): Initialize it.
5275         (function_info::~function_info): Release it.
5276         (main): Rename flag_intermediate_format to flag_json_format.
5277         (print_usage): Describe --json-format.
5278         (process_args): Set flag_json_format.
5279         (output_intermediate_line): Remove.
5280         (output_intermediate_json_line): Likewise.
5281         (get_gcov_intermediate_filename): Return new extension
5282         ".gcov.json.gz".
5283         (output_intermediate_file): Implement JSON emission.
5284         (output_json_intermediate_file): Implement JSON emission.
5285         (generate_results): Use ::get_name for function name.
5286         Handle JSON output file.
5287         (read_graph_file): Use ::get_name instead of cplus_demangle.
5288         (read_count_file): Likewise.
5289         (solve_flow_graph): Likewise.
5290         (add_line_counts): Likewise.
5291         (accumulate_line_counts): Use new flag_json_format.
5292         (output_function_details): Use ::get_name instead of cplus_demangle.
5293         (output_lines): Likewise.
5294         * json.cc (test_writing_literals): Add new tests.
5295         * json.h (class literal): Add new boolean constructor.
5297 2018-10-29  Segher Boessenkool  <segher@kernel.crashing.org>
5299         PR rtl-optimization/87701
5300         PR rtl-optimization/87780
5301         * combine.c (make_more_copies): Rewrite.
5303 2018-10-28  Kugan Vivekanandarajah  <kuganv@linaro.org>
5305         * doc/generic.texi (ABSU_EXPR): Document.
5306         * match.pd (absu(x)*absu(x) -> x*x): Handle.
5307         (absu(absu(X)) -> absu(X)): Likewise.
5308         (absu(-X) -> absu(X)): Likewise.
5309         (absu(X)  where X is nonnegative -> X): Likewise.
5311 2018-10-28  Iain Buclaw  <ibuclaw@gdcproject.org>
5313         * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
5314         (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
5315         (tm_d.h, cs-tm_d.h, default-d.o): New rules.
5316         (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
5317         (s-tm-texi): Also check timestamp on d-target.def.
5318         (generated_files): Add TM_D_H and d-target-hooks-def.h.
5319         (build/genhooks.o): Also depend on D_TARGET_DEF.
5320         * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
5321         variables.
5322         * config/aarch64/aarch64-d.c: New file.
5323         * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
5324         Define.
5325         * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
5326         prototype.
5327         * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
5328         * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
5329         * config/arm/arm-d.c: New file.
5330         * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
5331         * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
5332         * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
5333         * config/arm/t-arm (arm-d.o): New rule.
5334         * config/default-d.c: New file.
5335         * config/glibc-d.c: New file.
5336         * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5337         * config/i386/i386-d.c: New file.
5338         * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
5339         * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
5340         * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
5341         (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
5342         * config/i386/t-i386 (i386-d.o): New rule.
5343         * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5344         * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5345         * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
5346         * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5347         * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
5348         * config/mips/mips-d.c: New file.
5349         * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
5350         * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
5351         * config/mips/t-mips (mips-d.o): New rule.
5352         * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5353         * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5354         * config/powerpcspe/powerpcspe-d.c: New file.
5355         * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
5356         New prototype.
5357         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
5358         Support GNU D by using 0 as the language type.
5359         * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
5360         * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
5361         * config/riscv/riscv-d.c: New file.
5362         * config/riscv/riscv-protos.h (riscv_d_target_versions): New
5363         prototype.
5364         * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
5365         * config/riscv/t-riscv (riscv-d.o): New rule.
5366         * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5367         * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5368         * config/rs6000/rs6000-d.c: New file.
5369         * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
5370         prototype.
5371         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
5372         Support GNU D by using 0 as the language type.
5373         * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
5374         * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
5375         * config/s390/s390-d.c: New file.
5376         * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
5377         * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
5378         * config/s390/t-s390 (s390-d.o): New rule.
5379         * config/sparc/sparc-d.c: New file.
5380         * config/sparc/sparc-protos.h (sparc_d_target_versions): New
5381         prototype.
5382         * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
5383         * config/sparc/t-sparc (sparc-d.o): New rule.
5384         * config/t-glibc (glibc-d.o): New rule.
5385         * configure: Regenerated.
5386         * configure.ac (tm_d_file): New variable.
5387         (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
5388         * doc/contrib.texi (Contributors): Add self for the D frontend.
5389         * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
5390         * doc/install.texi (Configuration): Mention libphobos as an option for
5391         --enable-shared.  Mention d as an option for --enable-languages.
5392         (Testing): Mention check-d as a target.
5393         * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
5394         name suffixes.  Mention d as a -x option.
5395         * doc/sourcebuild.texi (Top Level): Mention libphobos.
5396         * doc/standards.texi (Standards): Add section on D language.
5397         * doc/tm.texi: Regenerated.
5398         * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
5399         TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
5400         * dwarf2out.c (is_dlang): New function.
5401         (gen_compile_unit_die): Use DW_LANG_D for D.
5402         (declare_in_namespace): Return module die for D, instead of adding
5403         extra declarations into the namespace.
5404         (gen_namespace_die): Generate DW_TAG_module for D.
5405         (gen_decl_die): Handle CONST_DECLSs for D.
5406         (dwarf2out_decl): Likewise.
5407         (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
5408         (prune_unused_types_walk): Handle DW_tag_interface_type same as other
5409         kinds of aggregates.
5410         * gcc.c (default_compilers): Add entries for .d, .dd and .di.
5411         * genhooks.c: Include d/d-target.def.
5413 2018-10-28  Iain Sandoe  <iain@sandoe.co.uk>
5415         PR target/85669
5416         * config/rs6000/darwin.h (STACK_BOUNDARY): New.
5417         (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
5418         (STACK_DYNAMIC_OFFSET): Likewise.
5420 2018-10-27  Sandra Loosemore  <sandra@codesourcery.com>
5422         PR target/80024
5423         * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
5424         error message.
5426 2018-10-26  Tulio Magno Quites Machado Filho  <tuliom@linux.ibm.com>
5428         * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
5429         return type and other typos.
5431 2018-10-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
5433         * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
5434         a shorter sequence with fewer branches.
5435         (emit_final_str_compare_gpr): Ditto.
5437 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
5439         * config/rs6000/tmmintrin.h: New file.
5440         * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
5442 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
5444         * config/rs6000/mmintrin.h: Enable 32bit compilation.
5445         * config/rs6000/xmmintrin.h: Likewise.
5447 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
5449         * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
5451 2018-10-26  Richard Biener  <rguenther@suse.de>
5453         * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
5454         and wrapper.
5455         (vect_mark_slp_stmts_relevant): Likewise.
5456         (vect_detect_hybrid_slp_stmts): Likewise.
5457         (vect_bb_slp_scalar_cost): Likewise.
5458         (vect_remove_slp_scalar_calls): Likewise.
5460 2018-10-26  Jan Hubicka  <jh@suse.cz>
5462         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
5463         (warn_types_mismatch): Fix walk of DECL_NAME.
5464         (odr_types_equivalent_p): Fix overactive assert.
5466 2018-10-26  Richard Biener  <rguenther@suse.de>
5468         PR tree-optimization/87105
5469         * tree-vectorizer.h (_slp_tree::refcnt): New member.
5470         * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
5471         refcnt.
5472         (vect_create_new_slp_node): Initialize refcnt to one.
5473         (bst_traits): Move.
5474         (scalar_stmts_set_t, bst_fail): Remove.
5475         (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
5476         (vect_build_slp_tree): Add bst_map argument and lookup
5477         already created SLP nodes.
5478         (vect_print_slp_tree): Handle a SLP graph, print SLP node
5479         addresses.
5480         (vect_slp_rearrange_stmts): Handle a SLP graph.
5481         (vect_analyze_slp_instance): Adjust and free SLP nodes from
5482         the CSE map.  Fix indenting.
5483         (vect_schedule_slp_instance): Add short-cut.
5485 2018-10-26  Martin Liska  <mliska@suse.cz>
5487         PR testsuite/86158
5488         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
5489         addr_expr and not with pointers.
5491 2018-10-26  Jan Hubicka  <jh@suse.cz>
5493         * tree.c (free_lang_data_in_type): Only check main variants.
5494         * ipa-devirt.c (warn_odr): Make static.
5495         (types_same_for_odr): Drop strict variant.
5496         (types_odr_comparable): Likewise.
5497         (odr_or_derived_type_p): Look for main variants.
5498         (odr_name_hasher::equal): Cleanup comment.
5499         (odr_subtypes_equivalent): Add warn and warned arguments; check main
5500         variants.
5501         (type_variants_equivalent_p): break out from ...
5502         (odr_types_equivalent): ... here; go for main variants where needed.
5503         (warn_odr): ... here; turn static.
5504         (warn_types_mismatch): Compare mangled names of main variants.
5505         * ipa-utils.h (types_odr_comparable): Drop strict parameter.
5506         (type_with_linkage_p): Sanity check that we look at main variant.
5507         * lto.c (lto_read_decls): Only consider main variant to be ODR type.
5508         * tree.h (types_same_for_odr): Drop strict argument.
5510 2018-10-26  Richard Biener  <rguenther@suse.de>
5512         PR tree-optimization/87746
5513         * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
5514         Simplify and fix WRT strided store groups with size not
5515         equal to step in element count.
5516         (vect_analyze_group_access_1): Dump the whole group.
5518 2018-10-25  Carl Love  <cel@us.ibm.com>
5520         * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
5521         P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
5522         P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name.  Add quad
5523         precicion entry for each overloaded builtin.
5524         * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
5525         VSCEDPUO): Rename overloaded name.
5526         (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
5527         VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
5528         * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
5529         define_expand for xscmpexqp instruction.
5530         (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
5532 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
5533             Jinsong Ji <jji@us.ibm.com>
5535         * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
5536         function with vec_sl.
5537         (_mm_slli_epi32): Likewise.
5538         (_mm_slli_epi64): Likewise.
5539         (_mm_srai_epi16): Replace deprecated function with vec_sra.
5540         (_mm_srai_epi32): Likewise.
5541         (_mm_srli_epi16): Replace deprecated function with vec_sr.
5542         (_mm_srli_epi32): Likewise.
5543         (_mm_srli_epi64): Likewise.
5544         (_mm_sll_epi16): Replace deprecated function with vec_sl.
5545         (_mm_sll_epi32): Likewise.
5546         (_mm_sll_epi64): Likewise.
5547         (_mm_sra_epi16): Replace deprecated function with vec_sra.
5548         (_mm_sra_epi32): Likewise.
5549         (_mm_srl_epi16): Replace deprecated function with vec_sr.
5550         (_mm_srl_epi32): Likewise.
5551         (_mm_srl_epi64): Likewise.
5553 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
5554             Jinsong Ji <jji@us.ibm.com>
5556         * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
5557         comparison operators with vec_cmp* for compatibility due to
5558         unfortunate history; clean up formatting and use types more
5559         appropriately.
5560         (_mm_sll_epi32): Likewise.
5561         (_mm_sll_epi64): Likewise.
5562         (_mm_srl_epi16): Likewise.
5563         (_mm_srl_epi32): Likewise.
5564         (_mm_srl_epi64): Likewise.
5566 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
5567             Jinsong Ji <jji@us.ibm.com>
5569         * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
5570         * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
5571         __vector __bool int.  Use vec_cmpgt in preference to deprecated
5572         function vec_vcmpgtfp.
5573         (_mm_max_ps): Likewise.
5575 2018-10-25  Jeff Law  <law@redhat.com>
5577         * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
5578         if returning false.
5580 2018-10-25  Martin Sebor  <msebor@redhat.com>
5582         * doc/extend.texi (aligned): Expand attribute description.
5583         (Alignment): Rename section.  Discuss function arguments.
5585 2018-10-25  Jan Hubicka  <jh@suse.cz>
5587         * ipa-devirt.c (main_odr_variant): Remove.
5588         (hash_odr_name, types_same_for_odr, types_odr_comparable,
5589         odr_name_hasher::equal, odr_subtypes_equivalent_p):
5590         Drop use of main_odr_variant.
5591         (add_type_duplicate): Silence confused warnings on integer types.
5592         (get_odr_type): Always look for main variant.
5593         (register_odr_type): Simplify.
5595 2018-10-25  Richard Biener  <rguenther@suse.de>
5597         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
5598         Initialize ng to silence error with release checking bootstrap.
5600 2018-10-25  Richard Biener  <rguenther@suse.de>
5602         * tree-if-conv.c: Include tree-ssa-sccvn.h.
5603         (tree_if_conversion): Run CSE on the if-converted loop body.
5605 2018-10-25  Ilya Leoshkevich  <iii@linux.ibm.com>
5607         * config/s390/constraints.md (ZL): New constraint.
5608         * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
5609         operands.
5610         * config/s390/s390.md (movdi_larl): Remove.
5611         (movdi_64): Add the LARL alternative.
5613 2018-10-25  Ilya Leoshkevich  <iii@linux.ibm.com>
5615         PR bootstrap/87747
5616         * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
5617         (RTX_CODE_HWINT_P): New macro.
5618         (rtx_code_size): Use RTX_CODE_HWINT_P ().
5620 2018-10-25  Jan Hubicka  <jh@suse.cz>
5622         * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
5623         is anonymous.
5625 2018-10-25  Richard Biener  <rguenther@suse.de>
5627         PR tree-optimization/87665
5628         PR tree-optimization/87745
5629         * tree-vectorizer.h (get_earlier_stmt): Remove.
5630         (get_later_stmt): Pick up UID from the original non-pattern stmt.
5632 2018-10-25  Sam Tebbs  <sam.tebbs@arm.com>
5634         * options.texi (Deprecated): Move list to Var section.
5636 2018-10-24  Bill Schmidt  <wschmidt@linux.ibm.com>
5637             Jinsong Ji <jji@us.ibm.com>
5639         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
5640         __vector long to __vector long long.
5641         (_mm_cvtpd_ps): Likewise.
5642         (_mm_cvttpd_epi32): Likewise.
5643         (_mm_cvtpi32_pd): Likewise.
5644         (_mm_unpackhi_epi64): Likewise.
5645         (_mm_unpacklo_epi64): Likewise.
5647 2018-10-24  Segher Boessenkool  <segher@kernel.crashing.org>
5649         PR rtl-optimization/87720
5650         * combine.c (make_more_copies): Skip if the dest is pc_rtx.
5652 2018-10-24  Alexandre Oliva <aoliva@redhat.com>
5654         * gimple-ssa-isolate-paths.c
5655         (find_implicit_erroneous_behavior): Do not change code if the
5656         pass is running for warnings only.
5657         (find_explicit_erroneous_behavior): Likewise.
5659 2018-10-24  Michael Meissner  <meissner@linux.ibm.com>
5661         * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
5662         Define as rs6000_mangle_decl_assembler_name.
5663         (rs6000_mangle_decl_assembler_name): If the user switched from IBM
5664         long double to IEEE long double, switch the names of the long
5665         double built-in functions to be <func>f128 instead of <func>l.
5667 2018-10-24  Martin Sebor  <msebor@redhat.com>
5669         * doc/extend.texi (nonnull): List no-argument form.  Reference
5670         -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
5672 2018-10-24  Richard Biener  <rguenther@suse.de>
5674         * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
5676 2018-10-24  Martin Liska  <mliska@suse.cz>
5678         PR tree-optimization/84436
5679         * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
5680         Remove.
5681         (switch_conversion::contains_linear_function_p): New.
5682         (switch_conversion::build_one_array): Support linear
5683         transformation on input.
5684         * tree-switch-conversion.h (struct switch_conversion): Add
5685         contains_linear_function_p declaration.
5687 2018-10-24  Richard Biener  <rguenther@suse.de>
5689         * varasm.c (const_hash_1): Return hash of ADDR_EXPR
5690         if its argument is CONSTANT_CLASS_P.
5692 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
5694         * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
5695         it is wrong for forward declarations.
5697 2018-10-24  Ilya Leoshkevich  <iii@linux.ibm.com>
5699         * config/s390/s390.c (s390_check_qrst_address): Add the missing
5700         SYMBOL_REF_P () check.
5702 2018-10-24  Richard Biener  <rguenther@suse.de>
5704         PR tree-optimization/87105
5705         * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
5706         dump classification.
5707         (vect_analyze_data_ref_accesses): Handle duplicate loads and
5708         stores by splitting the affected group after the fact.
5709         * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
5710         fail the SLP build because of size constraints.
5712 2018-10-24  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5714         * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
5715         * configure: Regenerate.
5716         * config.in: Regenerate.
5717         * varasm.c (mergeable_string_section): Use readonly_data_section
5718         if linker doesn't support SHF_MERGE with alignment > 8.
5719         (mergeable_constant_section): Likewise.
5721 2018-10-24  Richard Biener  <rguenther@suse.de>
5723         PR tree-optimization/84013
5724         * tree-ssa-structalias.c (struct msdi_data): New struct for
5725         marshalling data to walk_stmt_load_store_ops.
5726         (maybe_set_dependence_info): Refactor as callback for
5727         walk_stmt_load_store_ops.
5728         (compute_dependence_clique): Set restrict info on all stmt kinds.
5730 2018-10-24  Martin Liska  <mliska@suse.cz>
5732         * cgraph.c (cgraph_node::dump):
5733         Remove reduntant dumps and make tp_first_run dump more compact.
5735 2018-10-24  Richard Biener  <rguenther@suse.de>
5737         PR tree-optimization/87665
5738         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
5739         to reflect reality.
5741 2018-10-12  Jeff Law  <law@redhat.com>
5743         * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
5744         for H8/S.
5746 2018-10-23  Richard Biener  <rguenther@suse.de>
5748         * tree-vrp.c (add_assert_info): Guard dump_printf with
5749         dump_enabled_p.
5750         * gimple-ssa-evrp-analyze.c
5751         (evrp_range_analyzer::record_ranges_from_incoming_edge):
5752         Use value_range::ignore_equivs_equal_p.
5754 2018-10-23  Richard Biener  <rguenther@suse.de>
5756         PR tree-optimization/87105
5757         PR tree-optimization/87608
5758         * passes.def (pass_all_early_optimizations): Add early phi-opt
5759         after dce.
5760         * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
5761         addition to debug stmts.
5762         (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
5763         and abs replacement early.
5764         * tree-cfg.c (gimple_empty_block_p): Likewise.
5766 2018-10-23  Richard Earnshaw  <rearnsha@arm.com>
5768         PR target/86383
5769         * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
5770         specified to configure.
5771         (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
5773 2018-10-23  Richard Biener  <rguenther@suse.de>
5775         PR tree-optimization/87700
5776         * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
5778 2018-10-23  Jakub Jelinek  <jakub@redhat.com>
5780         PR target/87674
5781         * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
5782         second argument from __mmask16 to __mmask8.
5783         * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
5784         _mm_mask_packs_epi32): Likewise.
5785         * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
5786         Likewise.
5787         (_mm512_mask_prefetch_i64scatter_pd): Likewise.  Formatting fix.
5789 2018-10-23  Richard Biener  <rguenther@suse.de>
5791         * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
5793 2018-10-23  Richard Biener  <rguenther@suse.de>
5795         PR tree-optimization/86144
5796         * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
5797         over simd attribute.
5799 2018-10-23  Richard Biener  <rguenther@suse.de>
5801         PR tree-optimization/87693
5802         * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
5803         the case we do not find the taken edge.
5805 2018-10-22  Bill Schmidt  <wschmidt@linux.ibm.com>
5806             Jinsong Ji  <jji@us.ibm.com>
5808         * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
5809         (_mm_store_pd): Use unaligned vector type for pointer cast.
5810         (_mm_maskmoveu_si128): Likewise.
5811         * config/rs6000/xmmintrin.h (__m128_u): New typedef.
5812         (_mm_store_ps): Use unaligned vector type for pointer cast.
5814 2018-10-22  Paul Koning  <ni1d@arrl.net>
5816         * symtab.c (symtab_node::increase_alignment): Correct max
5817         alignment check.
5819 2018-10-22  Yury Gribov  <tetra2005@gmail.com>
5821         PR tree-optimization/87633
5822         * match.pd: Do not generate unordered integer comparisons.
5824 2018-10-22  Segher Boessenkool  <segher@kernel.crashing.org>
5826         PR rtl-optimization/87600
5827         * combine.c: Add include of expr.h.
5828         (cant_combine_insn_p): Do not combine moves from any hard non-fixed
5829         register to a pseudo.
5830         (make_more_copies): New function, add a copy to a new pseudo after
5831         the moves from hard registers into pseudos.
5832         (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
5833         later.  Call make_more_copies.
5835 2018-10-22  Andrew Stubbs  <ams@codesourcery.com>
5837         * lra-constraints.c (process_alt_operands): New local array,
5838         matching_early_clobber.  Check matching_early_clobber before
5839         decrementing reject, and set matching_early_clobber after.
5841 2018-10-22  Segher Boessenkool  <segher@kernel.crashing.org>
5843         PR target/87598
5844         * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
5845         call output_addr_const and hope for the best.
5847 2018-10-22  Richard Biener  <rguenther@suse.de>
5849         * gimple-ssa-evrp-analyze.c
5850         (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
5851         smarter about what ranges to use.
5852         * tree-vrp.c (add_assert_info): Dump here.
5853         (register_edge_assert_for_2): Instead of here at multiple but
5854         not all places.
5856         * gcc.dg/tree-ssa/evrp12.c: New testcase.
5857         * gcc.dg/predict-6.c: Adjust.
5858         * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
5859         * gcc.dg/tree-ssa/vrp02.c: Likewise.
5860         * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
5862 2018-10-22  Steven Bosscher <steven@gcc.gnu.org>
5863         Richard Biener  <rguenther@suse.de>
5865         * bitmap.h: Update data structure documentation, including a
5866         description of bitmap views as either linked-lists or splay trees.
5867         (struct bitmap_element_def): Update comments for splay tree bitmaps.
5868         (struct bitmap_head_def): Likewise.
5869         (bitmap_list_view, bitmap_tree_view): New prototypes.
5870         (bitmap_initialize_stat): Initialize a bitmap_head's indx and
5871         tree_form fields.
5872         (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
5873         (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
5874         * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
5875         released bitmap element here.
5876         (bitmap_element_free): Remove.
5877         (bitmap_elt_clear_from): Work on splay tree bitmaps.
5878         (bitmap_list_link_element): Renamed from bitmap_element_link.  Move
5879         this function similar ones such that linked-list bitmap implementation
5880         functions are grouped.
5881         (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
5882         and moved for grouping.
5883         (bitmap_list_insert_element_after): Renamed from
5884         bitmap_elt_insert_after, and moved for grouping.
5885         (bitmap_list_find_element): New function spliced from bitmap_find_bit.
5886         (bitmap_tree_link_left, bitmap_tree_link_right,
5887         bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
5888         bitmap_tree_link_element, bitmap_tree_unlink_element,
5889         bitmap_tree_find_element): New functions for splay-tree bitmap
5890         implementation.
5891         (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
5892         Renamed and moved, see above entries.
5893         (bitmap_tree_listify_from): New function to convert part of a splay
5894         tree bitmap to a linked-list bitmap.
5895         (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
5896         (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
5897         (bitmap_find_bit): Remove.
5898         (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
5899         bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
5900         Handle splay tree bitmaps.
5901         (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
5902         bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
5903         bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
5904         bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
5905         bitmap_intersect_compl_p, bitmap_ior_and_compl,
5906         bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
5907         bitmap_hash): Reject trying to act on splay tree bitmaps.  Make
5908         corresponding changes to use linked-list specific bitmap_element
5909         manipulation functions as applicable for efficiency.
5910         (bitmap_tree_to_vec): New function.
5911         (debug_bitmap_elt_file): New function split out from ...
5912         (debug_bitmap_file): ... here.  Handle splay tree bitmaps.
5913         (bitmap_print): Likewise.
5915         PR tree-optimization/63155
5916         * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
5917         SSA edge worklists.
5918         * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
5919         in tree-view.
5921 2018-10-22  Martin Liska  <mliska@suse.cz>
5923         PR tree-optimization/87686
5924         Revert
5925         2018-08-29  Martin Liska  <mliska@suse.cz>
5927         * tree-switch-conversion.c (switch_conversion::expand):
5928         Strenghten assumption about gswitch statements.
5930 2018-10-22  Martin Liska  <mliska@suse.cz>
5932         * ipa-icf.c (sem_item::compare_attributes): Remove.
5933         (sem_item::compare_referenced_symbol_properties): Use
5934         attribute_list_equal instead.
5935         (sem_function::equals_wpa): Likewise.
5936         * ipa-icf.h: Remove compare_attributes.
5938 2018-10-22  Richard Biener  <rguenther@suse.de>
5940         PR middle-end/87682
5941         * mem-stats.h (mem_usage::operator==): Fix pasto.
5943 2018-10-22  Richard Biener  <rguenther@suse.de>
5945         PR tree-optimization/87640
5946         * tree-vrp.c (set_value_range_with_overflow): Decompose
5947         incomplete result.
5948         (extract_range_from_binary_expr_1): Adjust.
5950 2018-10-22  Martin Jambor  <mjambor@suse.cz>
5952         * tree-eh.h (stmt_could_throw_p): Add function parameter.
5953         (stmt_can_throw_external): Likewise.
5954         (stmt_can_throw_internal): Likewise.
5955         * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
5956         (lower_eh_constructs_2): Likewise.
5957         (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
5958         (stmt_can_throw_external): Likewise.
5959         (stmt_can_throw_internal): Likewise.
5960         (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
5961         (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
5962         (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
5963         (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
5964         (pass_lower_eh_dispatch::execute): Pass cfun to
5965         stmt_can_throw_external.
5966         (cleanup_empty_eh): Likewise.
5967         (verify_eh_edges): Pass cfun to stmt_could_throw_p.
5968         * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
5969         stmt_can_throw_external instead of pushing it to cfun.
5970         (symbol_table::create_edge): Likewise.
5971         * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
5972         stmt_can_throw_internal.
5973         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
5974         to stmt_could_throw_p.
5975         * gimple-ssa-store-merging.c (handled_load): Pass cfun to
5976         stmt_can_throw_internal.
5977         (pass_store_merging::execute): Likewise.
5978         * gimple-ssa-strength-reduction.c
5979         (find_candidates_dom_walker::before_dom_children): Pass cfun to
5980         stmt_could_throw_p.
5981         * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
5982         stmt_can_throw_internal.
5983         * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
5984         to stmt_can_throw_external.
5985         (check_stmt): Pass cfun to stmt_could_throw_p.
5986         (check_stmt): Pass cfun to stmt_can_throw_external.
5987         (pass_nothrow::execute): Likewise.
5988         * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
5989         * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
5990         stmt_can_throw_internal.
5991         (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
5992         (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
5993         (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
5994         * tree-complex.c (expand_complex_libcall): Pass cfun to
5995         stmt_could_throw_p and to stmt_can_throw_internal.
5996         (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
5997         * tree-inline.c (copy_edges_for_bb): Likewise.
5998         (maybe_move_debug_stmts_to_successors): Likewise.
5999         * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
6000         stmt_could_throw_p.
6001         * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
6002         * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
6003         * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
6004         stmt_can_throw_internal.
6005         * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
6006         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
6007         stmt_could_throw_p.
6008         (mark_aliased_reaching_defs_necessary_1): Pass cfun to
6009         stmt_can_throw_internal.
6010         * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
6011         * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
6012         stmt_could_throw_p.
6013         * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
6014         (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
6015         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
6016         (convert_mult_to_fma_1): Likewise.
6017         (convert_to_divmod): Likewise.
6018         * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
6019         * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
6020         * tree-ssa-propagate.c
6021         (substitute_and_fold_dom_walker::before_dom_children): Likewise.
6022         * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
6023         (maybe_optimize_range_tests): Likewise.
6024         (linearize_expr_tree): Likewise.
6025         (reassociate_bb): Likewise.
6026         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
6027         * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
6028         * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
6029         (handle_char_store): Likewise.
6030         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
6031         stmt_can_throw_internal.
6032         * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
6033         stmt_could_throw_p.
6034         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
6035         (vectorizable_call): Pass cfun to stmt_can_throw_internal.
6036         (vectorizable_simd_clone_call): Likewise.
6037         * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
6038         (gimple_stringop_fixed_value): Likewise.
6040 2018-10-22  Ilya Leoshkevich  <iii@linux.ibm.com>
6042         * config/s390/s390.c (s390_loadrelative_operand_p): Accept
6043         literal pool references.
6044         (s390_check_qrst_address): Adapt to the new behavior of
6045         s390_loadrelative_operand_p ().
6047 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
6049         PR target/72782
6050         * config/i386/sse.md (*andnot<mode>3_bcst): New.
6052 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
6054         PR target/72782
6055         * config/i386/sse.md (*<code><mode>3_bcst): New.
6057 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
6059         PR target/72782
6060         * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
6061         V4DI, V16SI and V8DI.
6062         (*sub<mode>3<mask_name>_bcst): New.
6063         (*add<mode>3<mask_name>_bcst): Likewise.
6065 2018-10-21  Bill Schmidt  <wschmidt@linux.ibm.com>
6066             Jinsong Ji  <jji@us.ibm.com>
6068         * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
6069         __m64 with __vector unsigned long long for compatibility.
6070         (_mm_movemask_epi8): Likewise.
6071         * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
6072         (_mm_cvttps_pi32): Likewise.
6073         (_mm_cvtpi32_ps): Likewise.
6074         (_mm_cvtps_pi16): Likewise.
6075         (_mm_loadh_pi): Likewise.
6076         (_mm_storeh_pi): Likewise.
6077         (_mm_movehl_ps): Likewise.
6078         (_mm_movelh_ps): Likewise.
6079         (_mm_loadl_pi): Likewise.
6080         (_mm_storel_pi): Likewise.
6081         (_mm_movemask_ps): Likewise.
6082         (_mm_shuffle_pi16): Likewise.
6084 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
6086         PR target/72782
6087         * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
6088         __builtin_ia32_vfnmsubpd512_mask.
6089         (_mm512_mask_fnmsub_round_pd): Likewise.
6090         (_mm512_fnmsub_pd): Likewise.
6091         (_mm512_mask_fnmsub_pd): Likewise.
6092         (_mm512_maskz_fnmsub_round_pd): Use
6093         __builtin_ia32_vfnmsubpd512_maskz.
6094         (_mm512_maskz_fnmsub_pd): Likewise.
6095         (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
6096         (_mm512_mask_fnmsub_round_ps): Likewise.
6097         (_mm512_fnmsub_ps): Likewise.
6098         (_mm512_mask_fnmsub_ps): Likewise.
6099         (_mm512_maskz_fnmsub_round_ps): Use
6100         __builtin_ia32_vfnmsubps512_maskz.
6101         (_mm512_maskz_fnmsub_ps): Likewise.
6102         * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
6103         __builtin_ia32_vfnmsubpd256_mask.
6104         (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
6105         (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
6106         (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
6107         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
6108         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
6109         (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
6110         (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
6111         (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
6112         * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
6113         __builtin_ia32_vfnmsubpd.
6114         (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
6115         (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
6116         (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
6117         (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
6118         (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
6119         * config/i386/i386-builtin.def: Add
6120         __builtin_ia32_vfnmsubpd256_mask,
6121         __builtin_ia32_vfnmsubpd256_maskz,
6122         __builtin_ia32_vfnmsubpd128_mask,
6123         __builtin_ia32_vfnmsubpd128_maskz,
6124         __builtin_ia32_vfnmsubps256_mask,
6125         __builtin_ia32_vfnmsubps256_maskz,
6126         __builtin_ia32_vfnmsubps128_mask,
6127         __builtin_ia32_vfnmsubps128_maskz,
6128         __builtin_ia32_vfnmsubpd512_mask,
6129         __builtin_ia32_vfnmsubpd512_maskz,
6130         __builtin_ia32_vfnmsubps512_mask,
6131         __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
6132         __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
6133         __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
6134         __builtin_ia32_vfnmsubpd256.
6135         * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
6136         (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
6137         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
6138         Likewise.
6139         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
6140         Likewise.
6141         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
6142         Likewise.
6143         (fmai_vmfnmsub_<mode><round_name>): Likewise.
6145 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
6147         PR target/72782
6148         * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
6149         __builtin_ia32_vfnmaddpd512_mask.
6150         (_mm512_mask_fnmadd_round_pd): Likewise.
6151         (_mm512_fnmadd_pd): Likewise.
6152         (_mm512_mask_fnmadd_pd): Likewise.
6153         (_mm512_maskz_fnmadd_round_pd): Use
6154         __builtin_ia32_vfnmaddpd512_maskz.
6155         (_mm512_maskz_fnmadd_pd): Likewise.
6156         (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
6157         (_mm512_mask_fnmadd_round_ps): Likewise.
6158         (_mm512_fnmadd_ps): Likewise.
6159         (_mm512_mask_fnmadd_ps): Likewise.
6160         (_mm512_maskz_fnmadd_round_ps): Use
6161         __builtin_ia32_vfnmaddps512_maskz.
6162         (_mm512_maskz_fnmadd_ps): Likewise.
6163         * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
6164         __builtin_ia32_vfnmaddpd256_mask.
6165         (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
6166         (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
6167         (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
6168         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
6169         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
6170         (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
6171         (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
6172         (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
6173         * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
6174         __builtin_ia32_vfnmaddpd.
6175         (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
6176         (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
6177         (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
6178         (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
6179         (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
6180         * config/i386/i386-builtin.def: Add
6181         __builtin_ia32_vfnmaddpd256_mask,
6182         __builtin_ia32_vfnmaddpd256_maskz,
6183         __builtin_ia32_vfnmaddpd128_mask,
6184         __builtin_ia32_vfnmaddpd128_maskz,
6185         __builtin_ia32_vfnmaddps256_mask,
6186         __builtin_ia32_vfnmaddps256_maskz,
6187         __builtin_ia32_vfnmaddps128_mask,
6188         __builtin_ia32_vfnmaddps128_maskz,
6189         __builtin_ia32_vfnmaddpd512_mask,
6190         __builtin_ia32_vfnmaddpd512_maskz,
6191         __builtin_ia32_vfnmaddps512_mask,
6192         __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
6193         __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
6194         __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
6195         __builtin_ia32_vfnmaddpd256.
6196         * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
6197         (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
6198         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
6199         Likewise.
6200         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
6201         Likewise.
6202         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
6203         Likewise.
6204         (fmai_vmfnmadd_<mode><round_name>): Likewise.
6206 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
6208         PR target/72782
6209         * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
6210         __builtin_ia32_vfmsubpd512_mask.
6211         (_mm512_mask_fmsub_round_pd): Likewise.
6212         (_mm512_fmsub_pd): Likewise.
6213         (_mm512_mask_fmsub_pd): Likewise.
6214         (_mm512_maskz_fmsub_round_pd): Use
6215         __builtin_ia32_vfmsubpd512_maskz.
6216         (_mm512_maskz_fmsub_pd): Likewise.
6217         (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
6218         (_mm512_mask_fmsub_round_ps): Likewise.
6219         (_mm512_fmsub_ps): Likewise.
6220         (_mm512_mask_fmsub_ps): Likewise.
6221         (_mm512_maskz_fmsub_round_ps): Use
6222         __builtin_ia32_vfmsubps512_maskz.
6223         (_mm512_maskz_fmsub_ps): Likewise.
6224         * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
6225         __builtin_ia32_vfmsubpd256_mask.
6226         (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
6227         (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
6228         (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
6229         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
6230         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
6231         (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
6232         (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
6233         (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
6234         * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
6235         __builtin_ia32_vfmsubpd.
6236         (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
6237         (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
6238         (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
6239         (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
6240         (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
6241         * config/i386/i386-builtin.def: Add
6242         __builtin_ia32_vfmsubpd256_mask,
6243         __builtin_ia32_vfmsubpd256_maskz,
6244         __builtin_ia32_vfmsubpd128_mask,
6245         __builtin_ia32_vfmsubpd128_maskz,
6246         __builtin_ia32_vfmsubps256_mask,
6247         __builtin_ia32_vfmsubps256_maskz,
6248         __builtin_ia32_vfmsubps128_mask,
6249         __builtin_ia32_vfmsubps128_maskz,
6250         __builtin_ia32_vfmsubpd512_mask,
6251         __builtin_ia32_vfmsubpd512_maskz,
6252         __builtin_ia32_vfmsubps512_mask,
6253         __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
6254         __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
6255         __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
6256         __builtin_ia32_vfmsubpd256.
6257         * config/i386/sse.md (fma4i_fmsub_<mode>): New.
6258         (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
6259         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
6260         Likewise.
6261         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
6262         Likewise.
6263         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
6264         Likewise.
6265         (fmai_vmfmsub_<mode><round_name>): Likewise.
6267 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
6269         * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
6270         Remove plus.  Renamed to ...
6271         (*sub<mode>3<mask_name>_bcst): This.
6272         (*add<mode>3<mask_name>_bcst_2): Renamede to ...
6273         (*add<mode>3<mask_name>_bcst): This.
6275 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
6277         PR target/72782
6278         * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
6280 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
6282         PR target/87662
6283         * i386/avx512vlintrin.h (_mm256_or_epi32): New.
6284         (_mm_or_epi32): Likewise.
6285         (_mm256_xor_epi32): Likewise.
6286         (_mm_xor_epi32): Likewise.
6287         (_mm256_or_epi64): Likewise.
6288         (_mm_or_epi64): Likewise.
6289         (_mm256_xor_epi64): Likewise.
6290         (_mm_xor_epi64): Likewise.
6292 2018-10-20  H.J. Lu  <hongjiu.lu@intel.com>
6294         PR target/72782
6295         * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
6297 2018-10-20  Jakub Jelinek  <jakub@redhat.com>
6299         PR middle-end/87647
6300         * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
6302 2018-10-20  Andreas Schwab  <schwab@linux-m68k.org>
6304         * doc/ux.texi: Move @section directly after @node.
6306 2018-10-19  Jakub Jelinek  <jakub@redhat.com>
6308         PR middle-end/85488
6309         PR middle-end/87649
6310         * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
6311         depend closely nested inside of loop with ordered clause with
6312         a parameter.
6314 2018-10-19  David Malcolm  <dmalcolm@redhat.com>
6316         * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
6317         * doc/gccint.texi: Include ux.texi and use it in top-level menu.
6318         * doc/ux.texi: New file.
6320 2018-10-19  Segher Boessenkool  <segher@kernel.crashing.org>
6322         * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
6323         be the first CR field allocated.
6325 2018-10-19  Richard Biener  <rguenther@suse.de>
6327         PR target/87657
6328         * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
6329         TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
6331 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
6333         PR target/72782
6334         * config/i386/sse.md
6335         (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
6336         (*add<mode>3<mask_name>_bcst_2): Likewise.
6338 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
6340         * config/i386/sse.md
6341         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
6342         Replace nonimmediate_operand with register_operand.
6343         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
6344         Likewise.
6345         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
6346         Likewise.
6348 2018-10-19  Ilya Leoshkevich  <iii@linux.ibm.com>
6350         PR rtl-optimization/87596
6351         * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
6352         lra_get_insn_recog_data () instead of lra_insn_recog_data[]
6353         for instructions in FROM..TO range.
6355 2018-10-19  Eric Botcazou  <ebotcazou@adacore.com>
6357         * cfgexpand.c (expand_one_var): Use specific wording in error message
6358         for non-local frame variables.
6359         * stor-layout.c (layout_decl): Do not issue a warning for them.
6361 2018-10-19  Robin Dapp  <rdapp@linux.ibm.com>
6363         * haifa-sched.c (priority): Add force_recompute parameter.
6364         (apply_replacement): Call priority () with force_recompute = true.
6365         (restore_pattern): Likewise.
6367 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
6369         * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
6370         HOST_BITS_PER_WIDE_INT.
6371         (test_vector_ops_duplicate): Likewise.
6373 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
6375         PR target/72782
6376         * config/i386/sse.md (VF_AVX512): New.
6377         (avx512bcst): Likewise.
6378         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
6379         Likewise.
6380         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
6381         Likewise.
6382         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
6383         Likewise.
6385 2018-10-18  Jonathan Wakely  <jwakely@redhat.com>
6387         * doc/invoke.texi (-dumpversion): Improve grammar.
6388         (-dumpfullversion): Make more consistent with -dumpversion.
6390 2018-10-18  Uros Bizjak  <ubizjak@gmail.com>
6392         * config/i386/i386.c (ix86_emit_fp_unordered_jump):
6393         Set JUMP_LABEL to the jump insn.
6394         (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
6395         Predict emitted jump and add label to jump insn.
6397 2018-10-18  David Malcolm  <dmalcolm@redhat.com>
6399         PR tree-optimization/87562
6400         * input.c (get_substring_ranges_for_loc): Use
6401         LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
6402         getting the linemap for the endpoint.  Verify that it's either
6403         in the same linemap as the start point's spelling location, or
6404         at least in the same file.
6406 2018-10-18  Richard Biener  <rguenther@suse.de>
6408         * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
6409         feed width-specific load/store costs through ix86_vec_cost.
6410         * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
6411         (k8_cost): Likewise.
6412         (bdver_cost): Likewise.
6413         (znver1_cost): Likewise.
6414         (btver1_cost): Likewise.
6415         (btver2_cost): Likewise.
6417 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
6419         * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
6420         to simplify subreg of vec_merge.
6422 2018-10-18  Richard Biener  <rguenther@suse.de>
6424         * config/i386/i386.c: Fix costing of vector FMA.
6426 2018-10-18  Richard Biener  <rguenther@suse.de>
6428         * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
6429         and argument.
6430         (ix86_builtin_vectorization_cost): For vec_construct properly
6431         cost insertion into SSE regs.
6432         (...): Adjust calls to ix86_vec_cost.
6434 2018-10-18  Richard Biener  <rguenther@suse.de>
6436         PR middle-end/87087
6437         Revert
6438         2018-02-07  Richard Biener  <rguenther@suse.de>
6440         PR tree-optimization/84204
6441         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
6442         this place.
6444 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
6446         PR target/87537
6447         * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
6448         of vec_duplicate.
6449         (test_vector_ops_duplicate): Add test for a scalar subreg of a
6450         VEC_MERGE of a VEC_DUPLICATE.
6452 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
6454         * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
6455         * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
6456         * doc/standards.texi (C Language): Document C2X.
6457         * dwarf2out.c (highest_c_language), config/rl78/rl78.c
6458         (rl78_option_override): Handle "GNU C2X" language name.
6460 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
6462         * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
6463         Document C17 as published in 2018.
6465 2018-10-17  Eric Botcazou  <ebotcazou@adacore.com>
6467         PR middle-end/87623
6468         * fold-const.c (fold_truth_andor_1): If the right side is not constant,
6469         bail out if both sides do not have the same storage order.
6471 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
6473         * bitmap.c (bitmap_head::dump): New.
6474         * bitmap.h (bitmap_head): Add dump().
6475         * gimple-ssa-evrp-analyze.c
6476         (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
6477         (evrp_range_analyzer::set_ssa_range_info): Same.
6478         (evrp_range_analyzer::record_ranges_from_phis): Same.
6479         (evrp_range_analyzer::record_ranges_from_stmt): Same.
6480         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
6481         * gimple-ssa-sprintf.c (get_int_range): Same.
6482         (format_integer): Same.
6483         (sprintf_dom_walker::handle_gimple_call): Same.
6484         * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
6485         (ipcp_vr_lattice::top_p): Same.
6486         (ipcp_vr_lattice::bottom_p): Same.
6487         (ipcp_vr_lattice::set_to_bottom): Same.
6488         (ipa_vr_operation_and_type_effects): Same.
6489         (propagate_vr_across_jump_function): Same.
6490         (ipcp_store_vr_results): Same.
6491         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
6492         (ipa_print_node_jump_functions_for_edge): Same.
6493         (ipa_get_value_range): Same.
6494         (ipa_compute_jump_functions_for_edge): Same.
6495         (ipa_write_jump_function): Same.
6496         * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
6497         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
6498         Same.
6499         * vr-values.c (set_value_range_to_nonnegative): Same.
6500         (set_value_range_to_truthvalue): Same.
6501         (vr_values::get_value_range): Same.
6502         (vr_values::set_defs_to_varying): Same.
6503         (vr_values::update_value_range): Same.
6504         (symbolic_range_based_on_p): Same.
6505         (vr_values::op_with_boolean_value_range_p): Same.
6506         (vr_values::extract_range_for_var_from_comparison_expr): Same.
6507         (vr_values::extract_range_from_ssa_name): Same.
6508         (vr_values::extract_range_from_binary_expr): Same.
6509         (vr_values::extract_range_from_unary_expr): Same.
6510         (vr_values::extract_range_from_cond_expr): Same.
6511         (vr_values::extract_range_from_comparison): Same.
6512         (vr_values::check_for_binary_op_overflow): Same.
6513         (vr_values::extract_range_basic): Same.
6514         (vr_values::extract_range_from_assignment): Same.
6515         (compare_ranges): Same.
6516         (compare_range_with_value): Same.
6517         (vr_values::adjust_range_with_scev): Same.
6518         (vrp_valueize): Same.
6519         (vrp_valueize_1): Same.
6520         (vr_values::get_vr_for_comparison): Same.
6521         (vr_values::compare_name_with_value): Same.
6522         (vr_values::compare_names): Same.
6523         (vr_values::vrp_evaluate_conditional): Same.
6524         (find_case_label_ranges): Same.
6525         (vr_values::vrp_visit_switch_stmt): Same.
6526         (vr_values::extract_range_from_phi_node): Same.
6527         (vr_values::simplify_div_or_mod_using_ranges): Same.
6528         (vr_values::simplify_bit_ops_using_ranges): Same.
6529         (test_for_singularity): Same.
6530         (range_fits_type_p): Same.
6531         (vr_values::simplify_cond_using_ranges_1): Same.
6532         (vr_values::simplify_switch_using_ranges): Same.
6533         (vr_values::simplify_float_conversion_using_ranges): Same.
6534         (vr_values::two_valued_val_range_p): Same.
6535         (vr_values::add_equivalence): Move to value_range::equiv_add.
6536         * vr-values.h (vr_values::add_equivalence): Remove.
6537         (VR_INITIALIZER): Remove.
6538         * tree-vrp.c (value_range::set): New.
6539         (value_range::equiv_add): New.
6540         (value_range::value_range): New.
6541         (value_range::deep_copy): New.
6542         (value_range::check): New.
6543         (value_range::equal_p): New.
6544         (value_range::ignore_equivs_equal_p): New.
6545         (value_range::operator==): New.
6546         (value_range::operator!=): New.
6547         (value_range::symbolic_p): New.
6548         (value_range::numeric_p): New.
6549         (value_range::set_undefined): New.
6550         (value_range::set_varying): New.
6551         (value_range::may_contain_p): New.
6552         (value_range::equiv_clear): New.
6553         (value_range::singleton_p): New.
6554         (value_range::intersect): New.
6555         (value_range::dump): New.
6556         (value_range::set_and_canonicalize): New.
6557         (set_value_range): Adjust for value_range API.
6558         (set_value_range_to_undefined): Same.
6559         (set_value_range_to_varying): Same.
6560         (set_and_canonicalize_value_range): Same.
6561         (set_value_range_to_nonnull): Same.
6562         (set_value_range_to_null): Same.
6563         (range_is_null): Same.
6564         (range_is_nonnull): Same.
6565         (range_int_cst_p): Same.
6566         (range_int_cst_singleton_p): Same.
6567         (symbolic_range_p): Same.
6568         (range_includes_zero_p): Same.
6569         (value_range_constant_singleton): Same.
6570         (vrp_set_zero_nonzero_bits): Same.
6571         (ranges_from_anti_range): Same.
6572         (extract_range_into_wide_ints): Same.
6573         (extract_range_from_multiplicative_op): Same.
6574         (set_value_range_with_overflow): Same.
6575         (extract_range_from_binary_expr_1): Same.
6576         (extract_range_from_unary_expr): Same.
6577         (dump_value_range): Same.
6578         (debug_value_range): Same.
6579         (vrp_prop::check_array_ref): Same.
6580         (vrp_prop::check_mem_ref): Same.
6581         (vrp_prop::vrp_initialize): Same.
6582         (vrp_prop::visit_stmt): Same.
6583         (intersect_ranges): Same.
6584         (vrp_prop::visit_phi): Same.
6585         (vrp_prop::vrp_finalize): Same.
6586         (determine_value_range_1): Same.
6587         (determine_value_range): Same.
6588         (vrp_intersect_ranges_1): Rename to...
6589         (vrp_intersect_1): this.
6590         (vrp_intersect_ranges): Rename to...
6591         (value_range::intersect_helper): ...this.
6592         (vrp_meet_1): Rename to...
6593         (value_range::union_helper): ...this.
6594         (vrp_meet): Rename to...
6595         (value_range::union_): ...this.
6596         (copy_value_range): Remove.
6597         * tree-vrp.h (struct value_range): Rewrite into a proper class.
6598         (value_range::vrtype): New.
6599         (value_range::type): New.
6600         (value_range::equiv): New.
6601         (value_range::min): New.
6602         (value_range::max): New.
6603         (value_range::varying_p): New.
6604         (value_range::undefined_p): New.
6605         (value_range::null_p): New.
6606         (value_range::equiv_add): New.
6607         (copy_value_range): Remove.
6609 2018-10-17  David Malcolm  <dmalcolm@redhat.com>
6611         * Makefile.in (SELFTEST_TARGETS): New.
6612         (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
6613         (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
6614         (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
6615         c/Make-lang.in.
6616         (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
6617         (selftest-c++-gdb, selftest-c++-valgrind): Move to
6618         cp/Make-lang.in.
6619         * configure: Regenerate.
6620         * configure.ac (selftest_languages): New.
6622 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
6624         * tree-vrp.c (extract_range_from_multiplicative_op): Remove
6625         overflow wraps argument.
6626         (extract_range_from_binary_expr_1): Do not pass overflow wraps to
6627         wide_int_range_multiplicative_op.
6628         * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
6629         overflow wraps argument.
6630         (wide_int_range_multiplicative_op): Same.
6631         (wide_int_range_lshift): Same.
6632         (wide_int_range_div): Same.
6633         * wide-int-range.h (wide_int_range_multiplicative_op): Same.
6634         (wide_int_range_lshift): Same.
6635         (wide_int_range_div): Same.
6637 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
6639         * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
6640         use sign as argument.
6641         * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
6642         wide_int_range_shift_undefined_p.
6644 2018-10-16  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6646         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
6647         Rename to...
6648         (@despeculate_copy<ALLI_TI:mode>): ... This.
6649         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
6650         switch statement.
6652 2018-10-16  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6654         * config.gcc: Obsolete *-*-solaris2.10*.
6655         * doc/install.texi (Specific, *-*-solaris2*): Document it.
6657 2018-10-12  Jeff Law  <law@redhat.com>
6659         * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
6660         reg + sym +- const_int addressing modes.
6662 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
6664         * common.opt (fdiagnostics-minimum-margin-width=): New option.
6665         * diagnostic-show-locus.c (layout::layout): Apply the minimum
6666         margin width.
6667         (layout::start_annotation_line): Only print up to 3 of the
6668         margin character, to avoid touching the left-hand side.
6669         (selftest::test_diagnostic_show_locus_fixit_lines): Update for
6670         minimum margin width, as set by test_diagnostic_context's ctor.
6671         (selftest::test_fixit_insert_containing_newline): Likewise.
6672         (selftest::test_fixit_insert_containing_newline_2): Likewise.
6673         (selftest::test_line_numbers_multiline_range): Clear
6674         dc.min_margin_width.
6675         * diagnostic.c (diagnostic_initialize): Initialize
6676         min_margin_width.
6677         * diagnostic.h (struct diagnostic_context): Add field
6678         "min_margin_width".
6679         * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
6680         * opts.c (common_handle_option): Handle
6681         OPT_fdiagnostics_minimum_margin_width_.
6682         * selftest-diagnostic.c
6683         (selftest::test_diagnostic_context::test_diagnostic_context):
6684         Initialize min_margin_width to 6.
6685         * toplev.c (general_init): Initialize global_dc->min_margin_width.
6687 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
6689         * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
6690         Fix usage of "error_at_rich_loc" in the comment.
6692 2018-10-15  Renlin Li  <renlin.li@arm.com>
6694         PR target/87563
6695         * tree-vectorizer.c (try_vectorize_loop_1): Don't use
6696         if-conversioned loop when it contains ifn with types not
6697         supported by backend.
6698         * internal-fn.c (expand_direct_optab_fn): Add an assert.
6699         (direct_internal_fn_supported_p): New helper function.
6700         * internal-fn.h (direct_internal_fn_supported_p): Declare.
6702 2018-10-15  Jakub Jelinek  <jakub@redhat.com>
6704         PR target/87572
6705         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
6706         Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
6707         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
6709 2018-10-15  Bin Cheng  <bin.cheng@linux.alibaba.com>
6711         PR tree-optimization/87022
6712         * tree-loop-distribution.c (pg_add_dependence_edges): Check all
6713         bits in dist vector rather than the first one.
6715 2018-10-15  Richard Biener  <rguenther@suse.de>
6717         PR middle-end/87610
6718         * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
6719         (visit_loadstore): When a used restrict tag escaped verify that
6720         the points-to solution of "other" pointers do not include
6721         escaped.
6722         (compute_dependence_clique): If a used restrict tag escaped
6723         communicated that down to visit_loadstore.
6725 2018-10-15  Andreas Krebbel  <krebbel@linux.ibm.com>
6727         * config/s390/s390.c (s390_expand_vec_init): Force vector element
6728         into reg if it isn't a general operand.
6730 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
6732         PR target/87599
6733         * config/i386/sse.md (*vec_dupv2di): Add register source to
6734         movddup.
6736 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
6738         PR target/87572
6739         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
6740         Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
6741         OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
6742         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
6744 2018-10-13  Eric Botcazou  <ebotcazou@adacore.com>
6746         * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
6747         (notice_args_size): Set it in the current trace if no insn that can
6748         throw internally has been seen yet.
6749         (connect_traces): When connecting args_size between traces, allow the
6750         incoming values not to match if there is an insn setting it before the
6751         first insn that can throw internally; in that case, force the creation
6752         of a CFI note on this latter insn.
6754 2018-10-13  Jonathan Wakely  <jwakely@redhat.com>
6756         * opt-problem.h (opt_wrapper): Use template-argument-list when naming
6757         the base class, because using the injected-class-name was not clearly
6758         specified until DR 176.
6760 2018-10-12  Paul Koning  <ni1d@arrl.net>
6762         * config/pdp11/pdp11.md (doloop_end): New expander.
6763         (doloop_end_insn): renamed from "doloop_end".
6764         (addqi3): New pattern.
6765         (subqi3): New pattern.
6766         * config/pdp11/predicates.md (incdec_operand): New predicate.
6768 2018-10-12  Yury Gribov  <tetra2005@gmail.com>
6770         PR middle-end/81376
6771         * real.c (format_helper::can_represent_integral_type_p): New function
6772         * real.h (format_helper::can_represent_integral_type_p): Ditto.
6773         * match.pd: New pattern.
6775 2018-10-12  Alexandre Oliva <oliva@adacore.com>
6777         * configure.ac: Introduce --enable-large-address-aware
6778         to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
6779         * doc/install.texi: Document it.
6780         * configure, config.in: Rebuilt.
6781         * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
6782         based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
6783         (LINK_SPEC): Insert it.
6784         * config/i386/mingw-w64.h: Likewise.
6786         * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
6788 2018-10-12  Peter Bergner  <bergner@linux.ibm.com>
6790         PR rtl-optimization/87600
6791         * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
6793 2018-10-12  Paul Koning  <ni1d@arrl.net>
6795         * doc/md.texi (doloop_end): Document that the pattern code may
6796         need to check operand mode.
6798 2018-10-12  Wilco Dijkstra  <wdijkstr@arm.com>
6800         * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
6801         to zero-extend between int and floating-point registers.
6802         (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
6803         ldp into floating-point registers.  Add type and arch attributes.
6804         (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
6805         Use f_loads for type attribute.
6807 2018-10-11  Martin Sebor  <msebor@redhat.com>
6809         * doc/extend.texi (attribute packed): Correct typos.
6811 2018-10-11  Martin Sebor  <msebor@redhat.com>
6813         * doc/extend.texi (attribute flatten): Mention interaction with
6814         noinline.
6816 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
6818         PR target/87156
6819         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
6820         Set new_decl virtual flag to zero.
6822 2018-10-11  Martin Sebor  <msebor@redhat.com>
6824         PR middle-end/87593
6825         * doc/extend.texi (attribute format_arg): Discuss using multiple
6826         attributes on a single function.
6828 2018-10-11  Giuliano Belinassi  <giuliano.belinassi@usp.br>
6830         PR tree-optimization/86829
6831         * match.pd (sin (atan (x))): New simplification rules.
6832         (cos (atan (x))): Likewise.
6833         * real.c (build_sinatan_real): New function.
6834         * real.h (build_sinatan_real): Prototype.
6836 2018-10-11  Will Schmidt <will_schmidt@vnet.ibm.com>
6838         * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
6839         function.
6840         (fold_mergeeo_helper): New helper function.
6841         (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
6842         intrinsics.  Correct some whitespace indentation issues.
6844 2018-10-11  Wilco Dijkstra  <wdijkstr@arm.com>
6846         PR target/87511
6847         * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
6848         Use HOST_WIDE_INT_1U for shift.
6850 2018-10-11  Doug Rupp  <rupp@adacore.com>
6851             Olivier Hainque  <hainque@adacore.com>
6853         * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
6854         Pass --relax to the linker for RTPs.
6855         (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
6857 2018-10-11  Andrew Stubbs  <ams@codesourcery.com>
6858             Jan Hubicka  <jh@suse.cz>
6859             Martin Jambor  <mjambor@suse.cz>
6861         * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
6862         the same elements are repeated rather than printing all of them.
6863         * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
6864         "repeated" elements.
6865         * read-rtl-function.c (test_loading_repeat): New function.
6866         (read_rtl_function_c_tests): Call test_loading_repeat.
6867         * rtl-tests.c (test_dumping_repeat): New function.
6868         (rtl_tests_c_tests): Call test_dumping_repeat.
6870 2018-10-11  Richard Biener  <rguenther@suse.de>
6872         * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
6873         bdver?_cost): Unify to ...
6874         (bdver_memcpy, bdver_memset, bdver_cost): ... this.
6875         * config/i386/i386.c (processor_cost_table): Adjust.
6877 2018-10-10  Eric Botcazou  <ebotcazou@adacore.com>
6879         PR middle-end/87574
6880         * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
6881         the thunk when expanding to GIMPLE.
6883 2018-10-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6885         PR bootstrap/87551
6886         * varasm.c (mergeable_string_section): Don't try to move zero-length
6887         strings to the merge section.
6889 2018-10-10  Uros Bizjak  <ubizjak@gmail.com>
6891         PR target/87573
6892         * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
6894 2018-10-10  Jakub Jelinek  <jakub@redhat.com>
6896         PR target/87550
6897         * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
6898         to special_args set.
6900 2018-10-10  Richard Biener  <rguenther@suse.de>
6902         * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
6903         reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
6904         reduc_plus_scal_v4sf): Merge into pattern reducing to half width
6905         and recursing and pattern terminating the recursion on SSE
6906         vector width using ix86_expand_reduc.
6907         (reduc_sminmax_scal_<mode>): Split into part reducing to half
6908         width and recursing and SSE2 vector variant doing the final
6909         reduction with ix86_expand_reduc.
6910         (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
6911         with terminating the recursion at AVX level, splitting that
6912         to SSE there.
6914 2018-10-09  David Malcolm  <dmalcolm@redhat.com>
6916         * genmatch.c (error_cb): Rename to...
6917         (diagnostic_cb): ...this, converting int params to enums.
6918         (fatal_at): Update for renaming.
6919         (warning_at): Likewise.
6920         (main): Likewise.
6921         * input.c (selftest::ebcdic_execution_charset::apply):
6922         Update for renaming of...
6923         (selftest::ebcdic_execution_charset::on_error): ...this, renaming
6924         to...
6925         (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
6926         converting level and reason to enums.
6927         (class selftest::lexer_error_sink): Rename to...
6928         (class selftest::lexer_test_options): ...this, renaming field
6929         "m_errors" to "m_diagnostics".
6930         (selftest::lexer_test_options::apply): Update for renaming of...
6931         (selftest::lexer_test_options::on_error): ...this, renaming to...
6932         (selftest::lexer_test_options::on_diagnostic): ...this
6933         converting level and reason to enums.
6934         (selftest::test_lexer_string_locations_raw_string_unterminated):
6935         Update for renamings.
6936         * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
6937         "reason".
6939 2018-10-09  Paul A. Clarke  <pc@us.ibm.com>
6941         * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
6942         * config/rs6000/pmmintrin.h: New file.
6944 2018-10-09  Eric Botcazou  <ebotcazou@adacore.com>
6946         PR tree-optimization/86659
6947         * gimple-match.h (gimple_match_op constructors): Initialize reverse.
6949 2018-10-09  Richard Biener  <rguenther@suse.de>
6951         PR tree-optimization/63155
6952         * tree-ssa-structalias.c: Include tree-ssa.h.
6953         (get_constraint_for_ssa_var): For undefs return nothing_id.
6954         (find_func_aliases): Cleanup PHI handling.
6956 2018-10-09  Richard Biener  <rguenther@suse.de>
6958         * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
6959         replacements.
6961 2018-10-09  Martin Liska  <mliska@suse.cz>
6963         * asan.c (asan_emit_stack_protection): If a stack variable
6964         is located in a same file as current function, then emit
6965         line info into variable definition string.
6967 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
6969         * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
6970         information.
6972 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
6974         * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
6975         on the thunk.
6977 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
6979         PR tree-optimization/86659
6980         * gimple-match.h (struct gimple_match_op): Add reverse field.
6981         (gimple_match_op::set_op): New overloaded method.
6982         * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
6983         the REF_REVERSE_STORAGE_ORDER flag on the value.
6984         (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
6985         REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
6987 2018-10-08  Richard Sandiford  <richard.sandiford@arm.com>
6989         PR middle-end/63155
6990         * gimple-ssa-backprop.c (backprop::intersect_uses): Use
6991         FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
6993 2018-10-08  H.J. Lu  <hongjiu.lu@intel.com>
6995         PR target/87517
6996         * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
6997         Defined with __builtin_ia32_vfmaddsubpd512_mask.
6999 2018-10-08  Richard Biener  <rguenther@suse.de>
7001         * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
7002         cost the same as AVX128 ones.
7004 2018-10-08  Paul Koning  <ni1d@arrl.net>
7006         * config/pdp11/pdp11-protos.h (output_block_move): Remove.
7007         (expand_block_move): New function.
7008         * config/pdp11/pdp11.c (output_block_move): Remove.
7009         (expand_block_move): New function.
7010         * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
7011         * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
7012         (*movmemhi1): Remove.
7014 2018-10-08  Robin Dapp  <rdapp@linux.ibm.com>
7016         * config/s390/2827.md: Increase latencies for some FP instructions.
7018 2018-10-08  Richard Biener  <rguenther@suse.de>
7020         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
7021         Open a dump scope.
7022         * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
7023         * tree-vectorizer.h (dump_stmt_cost): Adjust.
7024         (add_stmt_cost): Dump return value of the hook.
7026 2018-10-08  Richard Biener  <rguenther@suse.de>
7028         PR tree-optimization/63155
7029         * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
7030         (ssa_propagation_engine::ssa_propagate): Remove redundant
7031         bitmap bit clearing.
7033 2018-10-05  Peter Bergner  <bergner@linux.ibm.com>
7035         PR rtl-optimization/86939
7036         PR rtl-optimization/87479
7037         * ira.h (non_conflicting_reg_copy_p): New prototype.
7038         * ira-lives.c (ignore_reg_for_conflicts): New static variable.
7039         (make_hard_regno_dead): Don't add conflicts for register
7040         ignore_reg_for_conflicts.
7041         (make_object_dead): Likewise.
7042         (non_conflicting_reg_copy_p): New function.
7043         (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
7044         Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
7045         * lra-lives.c (ignore_reg_for_conflicts): New static variable.
7046         (make_hard_regno_dead): Don't add conflicts for register
7047         ignore_reg_for_conflicts.  Remove special conflict handling of
7048         REAL_PIC_OFFSET_TABLE_REGNUM.  Remove now unused argument
7049         check_pic_pseudo_p and update callers.
7050         (mark_pseudo_dead): Don't add conflicts for register
7051         ignore_reg_for_conflicts.
7052         (process_bb_lives): Set ignore_reg_for_conflicts for copies.
7054 2018-10-05  Andrew Waterman  <andrew@sifive.com>
7055             Jim Wilson  <jimw@sifive.com>
7057         * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
7058         Add define_expand.  Add ! HONOR_SNANS check to current pattern.  Add
7059         new pattern using HONOR_SNANS that emits one extra instruction.
7061 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
7063         * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
7064         patterns): Merge SI and DI patterns to a GPR pattern.
7065         (unnamed define_insn and define_split for record form of that): Merge
7066         to a single define_insn_and_split pattern.
7068 2018-10-05  David Malcolm  <dmalcolm@redhat.com>
7070         PR c++/56856
7071         * input.c (expand_location_to_spelling_point): Add param "aspect"
7072         and use rather than hardcoding LOCATION_ASPECT_CARET.
7073         (get_substring_ranges_for_loc): Handle the case of a single token
7074         within a macro expansion.
7075         * input.h (expand_location_to_spelling_point): Add "aspect" param,
7076         defaulting to LOCATION_ASPECT_CARET.
7078 2018-10-05  Paul Koning  <ni1d@arrl.net>
7080         * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
7081         (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
7082         (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
7083         (pdp11_guard_type): New function.
7085 2018-10-05  Paul Koning  <ni1d@arrl.net>
7087         * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
7088         * config/pdp11/pdp11.opt (mfloat32): Remove.
7089         (mfloat64): Remove.
7090         * doc/invoke.texi (pdp11 -mfloat32): Remove:
7091         (pdp11 -mfloat64): Remove.
7093 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
7095         * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
7096         (*cmp<mode>_cc_i387): Ditto.
7097         (*cmpu<mode>_cc_i387): Ditto.
7098         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
7099         * config/i386/i386.c (ix86_expand_fp_compare): Remove
7100         "scratch" argument.
7101         <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
7102         Emit x86_sahf_1 pattern.
7103         (ix86_expand_compare): Update call to ix86_expand_fp_compare.
7104         (ix86_expand_carry_flag_compare): Ditto.
7106 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
7108         * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
7109         to reg_or_0_operand.  Add "C" constraint.
7110         (*cmpxf_cc_i387): Ditto.
7111         (*cmp<mode>_i387): Change operand 2 predicate
7112         to nonimm_or_0_operand.  Add "C" constraint.
7113         (*cmp<mode>_cc_i387): Ditto.
7114         (*cmp<mode>_0_i387): Remove insn pattern.
7115         (*cmp<mode>_0_cc_i387): Ditto.
7117 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
7119         * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
7120         * config/i386/predicates.md (nonimm_or_0_operand): Rename
7121         from vector_move_operand.  Update all uses.
7123 2018-10-05  Martin Sebor  <msebor@redhat.com>
7125         PR tree-optimization/87490
7126         * builtins.c (expand_builtin_strnlen): Handle a null data.decl
7127         consistently.
7129 2018-10-05  Richard Biener  <rguenther@suse.de>
7131         PR tree-optimization/63155
7132         * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
7133         vertical space in dumpfiles.
7134         * tree-ssa-propagate.h
7135         (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
7136         * tree-ssa-propagate.c (cfg_blocks_back): New global.
7137         (ssa_edge_worklist_back): Likewise.
7138         (curr_order): Likewise.
7139         (cfg_blocks_get): Remove abstraction.
7140         (cfg_blocks_add): Likewise.
7141         (cfg_blocks_empty_p): Likewise.
7142         (add_ssa_edge): Add to current or next worklist based on
7143         RPO index.
7144         (add_control_edge): Likewise.
7145         (ssa_propagation_engine::process_ssa_edge_worklist): Fold
7146         into ...
7147         (ssa_propagation_engine::ssa_propagate): ... here.  Unify
7148         iteration from CFG and SSA edge worklist so we process
7149         everything in RPO order, prioritizing forward progress
7150         over iteration.
7151         (ssa_prop_init): Allocate new worklists, do not dump
7152         immediate uses.
7153         (ssa_prop_fini): Free new worklists.
7155 2018-10-05  Richard Biener  <rguenther@suse.de>
7157         * tree-core.h (tree_block::abstract_flag): Remove.
7158         (tree_block::block_num): Make full 32bits.
7159         * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
7160         * tree.h (BLOCK_ABSTRACT): Remove.
7161         * dwarf2out.c (gen_lexical_block_die): Remove dead code
7162         resulting from BLOCK_ABSTRACT being always false.
7163         (gen_inlined_subroutine_die): Likewise.
7164         (gen_block_die): Likewise.
7165         * tree.c (block_ultimate_origin): Likewise.
7166         * tree-pretty-print.c (dump_block_node): Remove code dealing
7167         with BLOCK_ABSTRACT.
7168         * tree-ssa-live.c (dump_scope_block): Likewise.
7169         * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
7170         * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
7172 2018-10-05   Richard Biener  <rguenther@suse.de>
7174         * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
7175         is asked for initialize mode to the component mode of the
7176         vector type.
7178 2018-10-05  H.J. Lu  <hongjiu.lu@intel.com>
7180         PR target/87522
7181         * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
7182         assembler for -mavx.
7183         * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
7185 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
7187         PR target/87509
7188         * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
7189         RS6000_BTM_DFP.
7190         * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
7191         to be DImode.  When using mffscrn, force the operand to a register.
7193 2018-10-04  Uros Bizjak  <ubizjak@gmail.com>
7195         * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
7196         from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
7197         X87MODEF mode iterator.
7198         (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
7199         *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
7200         X87MODEF mode iterator.
7202 2018-10-04  Vinay Kumar  <vinay.kumar@blackfigtech.com>
7204         * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
7205         -Wno-prio-ctor-dtor.
7207 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
7209         * Makefile.in (OBJS): Add opt-problem.o.
7210         * dump-context.h: Include "selftest.h.
7211         (selftest::temp_dump_context): New forward decl.
7212         (class dump_context): Make friend of class
7213         selftest::temp_dump_context.
7214         (dump_context::dump_loc_immediate): New decl.
7215         (class dump_pretty_printer): Move here from dumpfile.c.
7216         (class temp_dump_context): Move to namespace selftest.
7217         (temp_dump_context::temp_dump_context): Add param
7218         "forcibly_enable_dumping".
7219         (selftest::verify_dumped_text):
7220         (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
7221         (selftest::verify_item):
7222         (ASSERT_IS_TEXT): Move here from dumpfile.c.
7223         (ASSERT_IS_TREE): Likewise.
7224         (ASSERT_IS_GIMPLE): Likewise.
7225         * dumpfile.c (dump_context::dump_loc): Move immediate dumping
7226         to...
7227         (dump_context::dump_loc_immediate): ...this new function.
7228         (class dump_pretty_printer): Move to dump-context.h.
7229         (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
7230         (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
7231         (temp_dump_context::temp_dump_context): Move to "selftest"
7232         namespace.  Add param "forcibly_enable_dumping", and use it to
7233         conditionalize the use of m_pp;
7234         (selftest::verify_dumped_text): Make non-static.
7235         (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
7236         (selftest::verify_item): Make non-static.
7237         (ASSERT_IS_TEXT): Move to dump-context.h.
7238         (ASSERT_IS_TREE): Likewise.
7239         (ASSERT_IS_GIMPLE): Likewise.
7240         (selftest::test_capture_of_dump_calls): Pass "true" for new
7241         param of temp_dump_context.
7242         * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
7243         it to MSG_ALL_PRIORITIES.  Update values of TDF_COMPARE_DEBUG and
7244         TDF_COMPARE_DEBUG.
7245         * opt-problem.cc: New file.
7246         * opt-problem.h: New file.
7247         * optinfo-emit-json.cc
7248         (selftest::test_building_json_from_dump_calls): Pass "true" for
7249         new param of temp_dump_context.
7250         * optinfo.cc (optinfo_kind_to_dump_flag): New function.
7251         (optinfo::emit_for_opt_problem): New function.
7252         (optinfo::emit): Clarity which emit_item is used.
7253         * optinfo.h (optinfo::get_dump_location): New accessor.
7254         (optinfo::emit_for_opt_problem): New decl.
7255         (optinfo::emit): Make const.
7256         * selftest-run-tests.c (selftest::run_tests): Call
7257         selftest::opt_problem_cc_tests.
7258         * selftest.h (selftest::opt_problem_cc_tests): New decl.
7259         * tree-data-ref.c (dr_analyze_innermost): Convert return type from
7260         bool to opt_result, converting fprintf messages to
7261         opt_result::failure_at calls.  Add "stmt" param for use by the
7262         failure_at calls.
7263         (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
7264         (runtime_alias_check_p): Convert return type from bool to
7265         opt_result, converting dump_printf calls to
7266         opt_result::failure_at, using the statement DDR_A for their
7267         location.
7268         (find_data_references_in_stmt): Convert return type from bool to
7269         opt_result, converting "return false" to opt_result::failure_at
7270         with a new message.
7271         * tree-data-ref.h: Include "opt-problem.h".
7272         (dr_analyze_innermost): Convert return type from bool to opt_result,
7273         and add a const gimple * param.
7274         (find_data_references_in_stmt): Convert return type from bool to
7275         opt_result.
7276         (runtime_alias_check_p): Likewise.
7277         * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
7278         dr_analyze_innermost.
7279         * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
7280         Convert return type from bool to opt_result, adding a message for
7281         the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
7282         (vect_analyze_data_ref_dependence): Convert return type from bool
7283         to opt_result.  Change sense of return type from "false"
7284         effectively meaning "no problems" to "false" meaning a problem,
7285         so that "return false" becomes "return opt_result::success".
7286         Convert "return true" calls to opt_result::failure_at, using
7287         the location of statement A rather than vect_location.
7288         (vect_analyze_data_ref_dependences): Convert return type from bool
7289         to opt_result.
7290         (verify_data_ref_alignment): Likewise, converting dump_printf_loc
7291         calls to opt_result::failure_at, using the stmt location rather
7292         than vect_location.
7293         (vect_verify_datarefs_alignment): Convert return type from bool
7294         to opt_result.
7295         (vect_enhance_data_refs_alignment): Likewise.  Split local "stat"
7296         into multiple more-tightly-scoped copies.
7297         (vect_analyze_data_refs_alignment): Convert return type from bool
7298         to opt_result.
7299         (vect_analyze_data_ref_accesses): Likewise, converting a
7300         "return false" to a "return opt_result::failure_at", adding a
7301         new message.
7302         (vect_prune_runtime_alias_test_list): Convert return type from
7303         bool to opt_result, converting dump_printf_loc to
7304         opt_result::failure_at.  Add a %G to show the pertinent statement,
7305         and use the stmt's location rather than vect_location.
7306         (vect_find_stmt_data_reference): Convert return type from
7307         bool to opt_result, converting dump_printf_loc to
7308         opt_result::failure_at, using stmt's location.
7309         (vect_analyze_data_refs):  Convert return type from bool to
7310         opt_result.  Convert "return false" to "return
7311         opt_result::failure_at", adding messages as needed.
7312         * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
7313         type from bool to opt_result.
7314         (vect_determine_vf_for_stmt): Likewise.
7315         (vect_determine_vectorization_factor): Likewise, converting
7316         dump_printf_loc to opt_result::failure_at, using location of phi
7317         rather than vect_location.
7318         (vect_analyze_loop_form_1): Convert return type from bool to
7319         opt_result, converting dump_printf_loc calls, retaining the use of
7320         vect_location.
7321         (vect_analyze_loop_form): Convert return type from loop_vec_info
7322         to opt_loop_vec_info.
7323         (vect_analyze_loop_operations): Convert return type from bool to
7324         opt_result, converting dump_printf_loc calls, using the location
7325         of phi/stmt rather than vect_location where available.  Convert
7326         various "return false" to "return opt_result::failure_at" with
7327         "unsupported phi" messages.
7328         (vect_get_datarefs_in_loop): Convert return type from bool to
7329         opt_result.  Add a message for the
7330         PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
7331         (vect_analyze_loop_2): Convert return type from bool to
7332         opt_result.  Ensure "ok" is set to a opt_result::failure_at before
7333         each "goto again;", adding new messages where needed.
7334         Add "unsupported grouped {store|load}" messages.
7335         (vect_analyze_loop): Convert return type from loop_vec_info to
7336         opt_loop_vec_info.
7337         * tree-vect-slp.c (vect_analyze_slp): Convert return type from
7338         bool to opt_result.
7339         * tree-vect-stmts.c (process_use): Likewise, converting
7340         dump_printf_loc call and using stmt location, rather than
7341         vect_location.
7342         (vect_mark_stmts_to_be_vectorized): Likeise.
7343         (vect_analyze_stmt): Likewise, adding a %G.
7344         (vect_get_vector_types_for_stmt): Convert return type from bool to
7345         opt_result, converting dump_printf_loc calls and using stmt
7346         location, rather than vect_location.
7347         (vect_get_mask_type_for_stmt): Convert return type from tree to
7348         opt_tree, converting dump_printf_loc calls and using stmt location.
7349         * tree-vectorizer.c: Include "opt-problem.h.
7350         (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
7351         MSG_PRIORITY_INTERNALS.  Convert local "loop_vinfo" from
7352         loop_vec_info to opt_loop_vec_info.  If if fails, and dumping is
7353         enabled, use it to report at the top level "couldn't vectorize
7354         loop" followed by the problem.
7355         * tree-vectorizer.h (opt_loop_vec_info): New typedef.
7356         (vect_mark_stmts_to_be_vectorized): Convert return type from bool
7357         to opt_result.
7358         (vect_analyze_stmt): Likewise.
7359         (vect_get_vector_types_for_stmt): Likewise.
7360         (tree vect_get_mask_type_for_stmt): Likewise.
7361         (vect_analyze_data_ref_dependences): Likewise.
7362         (vect_enhance_data_refs_alignment): Likewise.
7363         (vect_analyze_data_refs_alignment): Likewise.
7364         (vect_verify_datarefs_alignment): Likewise.
7365         (vect_analyze_data_ref_accesses): Likewise.
7366         (vect_prune_runtime_alias_test_list): Likewise.
7367         (vect_find_stmt_data_reference): Likewise.
7368         (vect_analyze_data_refs): Likewise.
7369         (vect_analyze_loop): Convert return type from loop_vec_info to
7370         opt_loop_vec_info.
7371         (vect_analyze_loop_form): Likewise.
7372         (vect_analyze_slp): Convert return type from bool to opt_result.
7374 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
7376         * doc/invoke.texi (-fopt-info): Document new "internals"
7377         sub-option.
7378         * dump-context.h (dump_context::apply_dump_filter_p): New decl.
7379         * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
7380         MSG_ALL_KINDS.
7381         (optinfo_verbosity_options): Add "internals".
7382         (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
7383         (dump_context::apply_dump_filter_p): New member function.
7384         (dump_context::dump_loc): Use apply_dump_filter_p rather than
7385         explicitly masking the dump_kind.
7386         (dump_context::begin_scope): Increment the scope depth first.  Use
7387         apply_dump_filter_p rather than explicitly masking the dump_kind.
7388         (dump_context::emit_item): Use apply_dump_filter_p rather than
7389         explicitly masking the dump_kind.
7390         (dump_dec): Likewise.
7391         (dump_hex): Likewise.
7392         (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
7393         (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
7394         (opt_info_switch_p): Update handling of default
7395         MSG_OPTIMIZED_LOCATIONS to cope with default of
7396         MSG_PRIORITY_USER_FACING.
7397         (dump_basic_block): Use apply_dump_filter_p rather than explicitly
7398         masking the dump_kind.
7399         (selftest::test_capture_of_dump_calls): Update test_dump_context
7400         instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
7401         than MSG_ALL.  Generalize scope test to be run at all four
7402         combinations of with/without MSG_PRIORITY_USER_FACING and
7403         MSG_PRIORITY_INTERNALS, adding examples of explicit priority
7404         for each of the two values.
7405         * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
7406         Rename MSG_ALL to MSG_ALL_KINDS.  Add MSG_PRIORITY_USER_FACING,
7407         MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
7408         values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
7409         (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
7410         with MSG_PRIORITY_*.
7411         * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
7412         dump messages as MSG_PRIORITY_USER_FACING.
7413         * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
7414         about the interaction with MSG_PRIORITY_*.
7416 2018-10-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7418         * varasm.c (output_constant): Add new parameter merge_strings.
7419         Make strings properly zero terminated in merge string sections.
7420         (mergeable_string_section): Don't fail if the last char is non-zero.
7421         (assemble_variable_contents): Handle merge string sections.
7422         (assemble_variable): Likewise.
7423         (assemble_constant_contents): Likewise.
7424         (output_constant_def_contents): Likewise.
7425         (output_constructor_array_range,
7426         output_constructor_regular_field): Adjust call to output_constant.
7427         (output_object_block): Adjust call to assemble_constant_contents
7428         and assemble_variable_contents.
7430 2018-10-04  Martin Liska  <mliska@suse.cz>
7432         PR c/87483
7433         * cgraphunit.c (process_function_and_variable_attributes):
7434         Warn about a function with alias attribute and a body.
7436 2018-10-04  Martin Liska  <mliska@suse.cz>
7438         PR ipa/82625
7439         * multiple_target.c (redirect_to_specific_clone): New function.
7440         (ipa_target_clone): Use it.
7441         * tree-inline.c: Fix comment.
7443 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
7445         * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
7446         fields.
7447         (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
7448         (gcc::dump_manager::register_pass): New member function, adapted
7449         from loop body in gcc::pass_manager::register_pass, adding a
7450         call to update_dfi_for_opt_info.
7451         (gcc::dump_manager::opt_info_enable_passes): Store the
7452         -fopt-info options into the new fields.  Move the loop
7453         bodies into...
7454         (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
7455         function.
7456         * dumpfile.h (struct opt_pass): New forward decl.
7457         (gcc::dump_manager::register_pass): New decl.
7458         (gcc::dump_manager::update_dfi_for_opt_info): New decl.
7459         (class gcc::dump_manager): Add fields "m_optgroup_flags",
7460         "m_optinfo_flags", and "m_optinfo_filename".
7461         * passes.c (gcc::pass_manager::register_pass): Move all of the
7462         dump-handling code to gcc::dump_manager::register_pass.
7464 2018-10-04  Peter Bergner  <bergner@linux.ibm.com>
7466         PR rtl-optimization/87466
7467         * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
7468         * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
7469         * doc/tm.texi: Regenerate.
7470         * ira-lives.c (process_bb_node_lives): Use the new target hook.
7471         * lra-lives.c (process_bb_lives): Likewise.
7472         * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
7473         Define.
7475 2018-10-04  Tamar Christina  <tamar.christina@arm.com>
7477         * params.c (add_params): Fix initialization.
7479 2018-10-04  Martin Liska  <mliska@suse.cz>
7481         PR gcov-profile/84107
7482         * tree-profile.c (init_ic_make_global_vars):
7483         Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
7484         Come up with new ic_tuple* variables.  Emit
7485         __gcov_indirect_call{,_topn} variables.
7486         (gimple_gen_ic_profiler): Access the variable
7487         and emit gimple.
7488         (gimple_gen_ic_func_profiler): Access
7489         __gcov_indirect_call.callee field.
7490         (gimple_init_gcov_profiler): Use ptr_type_node.
7491         * value-prof.c (gimple_ic): Use ptr_type_node.
7493 2018-10-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
7495         PR tree-optimization/85787
7496         * ipa-pure-const.c (malloc_candidate_p_1): Move most of
7497         malloc_candidate_p into this function and add support for
7498         detecting multiple phis.
7499         (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
7501 2018-10-04  Martin Liska  <mliska@suse.cz>
7503         PR ipa/87491
7504         * ipa-inline.c (inline_to_all_callers_1):
7505         Call ultimate_alias_target for node being inlined.
7507 2018-10-03  Jeff Law  <law@redhat.com>
7509         * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
7510         target's wchar_t.
7511         * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
7512         * tree.h (get_typenode_from_name): Prototype.
7514 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
7516         * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
7517         Change operand 2 predicate to nonimmediate_operand.
7518         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
7520 2018-10-03  Martin Sebor  <msebor@redhat.com>
7521             Jeff Law  <law@redhat.com>
7523         * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
7524         initialize it.
7525         (get_string_length): Detect unterminated arrays.
7526         (format_string): Same.
7527         (format_directive): Warn about unterminated arrays.
7528         (handle_gimple_call): Mark statements with no_warning as needed.
7530 2018-10-03  Jim Wilson  <jimw@sifive.com>
7532         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
7533         also define __riscv_abi_rve.  Delete trailing white space.
7535 2018-10-03  Paul Koning  <ni1d@arrl.net>
7537         Enable LRA register allocator for PDP11.
7538         * config/pdp11/constraints.md (Q): Use define_memory_constraint.
7539         (R): Likewise.
7540         (D): Likewise.
7541         * config/pdp11/pdp11.c (pdp11_lra_p): New function.
7542         * config/pdp11/pdp11.opt (-mlra): New option.
7543         * doc/invoke.texi (PDP-11 Options): Document -mlra.
7545 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
7547         * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
7548         (*<absneg:code>extend<mode>xf2): Ditto.
7550 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
7552         PR tree-optimization/87415
7553         * tree-vrp.c (set_value_range_with_overflow): Special case one bit
7554         precision fields.
7556 2018-10-02  Jeff Law  <law@redhat.com>
7558         * gimple-fold.c (get_range_strlen): Only set *nonstr when
7559         an unterminated string is discovered.  Bubble up range
7560         even for unterminated strings.
7561         (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
7562         indicates the string was not terminated via NONSTR.
7564 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
7566         * tree-vrp.c (extract_range_from_unary_expr): Special case all
7567         pointer conversions.
7568         Do not do anything special for anti-ranges.
7570 2018-10-03  Jérôme Lambourg  <lambourg@adacore.com>
7572         * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
7573         DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
7575 2018-10-03  Martin Liska  <mliska@suse.cz>
7577         PR gcov-profile/86109
7578         * coverage.c (coverage_begin_function): Do not
7579         mark lambdas as artificial.
7580         * tree-core.h (struct GTY): Remove tm_clone_flag
7581         and introduce new lambda_function.
7582         * tree.h (DECL_LAMBDA_FUNCTION): New macro.
7584 2018-10-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
7586         PR target/87474
7587         * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
7588         P8_VECTOR and VSX are enabled.
7590 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
7592         * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
7593         0x3907 as CPU model number.
7595 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
7597         * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
7598         * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
7599         PF_Z14.  Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
7600         TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
7601         TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
7602         * config/s390/s390.md: Likewise. Rename also the cpu attribute
7603         value from arch12 to z14.
7605 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
7607         * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
7608         (isinfxf2): Ditto.
7609         (isinf<mode>2): Ditto.
7611 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
7613         * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
7614         before emitting fxam.  Perform calculations in XFmode.
7616 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
7618         * match.pd (((X /[ex] A) +- B) * A): New transformation.
7620 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
7622         PR middle-end/87319
7623         * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
7624         * tree.c (signed_or_unsigned_type_for): Handle complex.
7626 2018-10-02  Jeff Law  <law@redhat.com>
7628         * gimple-fold.c (get_range_strlen): Remove dead code.
7630 2018-10-02  Martin Sebor  <msebor@redhat.com>
7631             Jeff Law  <law@redhat.com>
7633         * builtins.c (unterminated_array): Add new arguments.
7634         If argument is not terminated, bubble up size and exact
7635         state to callers.
7636         (expand_builtin_strnlen): Detect, avoid expanding
7637         and diagnose unterminated arrays.
7638         (c_strlen): Fill in offset of start of unterminated strings.
7639         * builtins.h (unterminated_array): Update prototype.
7641 2018-10-02  Richard Biener  <rguenther@suse.de>
7643         * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
7644         of haddv4df, first reduce to SSE width and exploit the fact
7645         that we only need element zero with the reduction result.
7646         (reduc_plus_scal_v2df): Likewise.
7648 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
7650         * dojump.h (do_jump): Delete.
7651         (do_jump_1): Likewise.
7652         (split_comparison): Move around.
7653         * dojump.c (do_jump): Make static.
7654         (do_jump_1): Likewise.
7655         (jumpifnot): Move around.
7656         (jumpifnot_1): Likewise.
7657         (jumpif): Likewise.
7658         (jumpif_1): Likewise.
7659         * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
7661 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
7663         * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
7664         insns in the delay slot and add_insn_after for the jump insn.
7666 2018-10-02  Richard Biener  <rguenther@suse.de>
7668         * tree-inline.c (expand_call_inline): Use the location of
7669         the callee declaration for the inline-entry marker.
7670         * final.c (notice_source_line): Remove special-casing of
7671         NOTE_INSN_INLINE_ENTRY.
7673 2018-10-01  Carl Love  <cel@us.ibm.com>
7675         PR 69431
7676         * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
7677         (__builtin_mtfsb0): New.
7678         (__builtin_mtfsb1): New.
7679         ( __builtin_set_fpscr_rn): New.
7680         (__builtin_set_fpscr_drn): New.
7681         * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
7682         (rs6000_expand_set_fpscr_rn_builtin): Add.
7683         (rs6000_expand_set_fpscr_drn_builtin): Add.
7684         (rs6000_expand_builtin): Add case statement entries for
7685         RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
7686         RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
7687         RS6000_BUILTIN_MFFSL.
7688         (rs6000_init_builtins): Add ftype initialization and def_builtin
7689         calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
7690         __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
7691         * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
7692         rs6000_mffscdrn): Add define_insn.
7693         (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
7694         * doc/extend.texi: Add documentation for the builtins.
7696 2018-10-01  Richard Biener  <rguenther@suse.de>
7698         PR tree-optimization/87465
7699         * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
7700         causing branch miscounts.
7702 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
7704         * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
7705         aarch64_option_default_param):  New.
7706         (params.h): Include.
7707         (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
7708         * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
7709         stack-clash protection validation code.
7711 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
7713         * params.c (validate_param): New.
7714         (add_params): Use it.
7715         (set_param_value): Refactor param validation into validate_param.
7716         (diagnostic.h): Include.
7717         * diagnostic.h (diagnostic_ready_p): New.
7719 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
7721         * params.c (set_param_value):
7722         Add index of parameter being validated.
7723         * common/common-target.def (option_validate_param): New.
7724         * common/common-targhooks.h (default_option_validate_param): New.
7725         * common/common-targhooks.c (default_option_validate_param): New.
7726         * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
7727         * doc/tm.texi: Regenerate.
7729 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
7731         PR target/86486
7732         * config/aarch64/aarch64.c (aarch64_override_options_internal):
7733         Add validation for stack-clash parameters and set defaults.
7735 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
7737         PR target/86486
7738         * configure.ac: Add stack-clash-protection-guard-size.
7739         * doc/install.texi: Document it.
7740         * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
7741         * params.def: Update comment for guard-size.
7742         (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
7743         PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
7744         * configure: Regenerate.
7746 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
7748         PR target/86486
7749         * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
7750         STACK_DYNAMIC_OFFSET): New.
7751         * config/aarch64/aarch64.c (aarch64_layout_frame):
7752         Update outgoing args size.
7753         (aarch64_stack_clash_protection_alloca_probe_range,
7754         TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
7756 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
7758         PR target/86486
7759         * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
7760         probe ranges.
7761         * target.def (stack_clash_protection_alloca_probe_range): New.
7762         (stack_clash_protection_final_dynamic_probe): Remove.
7763         * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
7764         (default_stack_clash_protection_final_dynamic_probe): Remove.
7765         * targhooks.c: Likewise.
7766         * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
7767         (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
7768         * doc/tm.texi: Regenerate.
7770 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
7772         PR target/86486
7773         * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
7774         * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
7775         aarch64_clamp_to_uimm12_shift): New.
7776         (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
7777         * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
7779 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
7781         PR target/86486
7782         * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
7784 2018-10-01  Jeff Law  <law@redhat.com>
7785             Richard Sandiford <richard.sandiford@linaro.org>
7786             Tamar Christina  <tamar.christina@arm.com>
7788         PR target/86486
7789         * config/aarch64/aarch64.md
7790         (probe_stack_range): Add k (SP) constraint.
7791         * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
7792         STACK_CLASH_MAX_UNROLL_PAGES): New.
7793         * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
7794         stack probes for stack clash.
7795         (aarch64_allocate_and_probe_stack_space): New.
7796         (aarch64_expand_prologue): Use it.
7797         (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
7798         (aarch64_sub_sp): Add emit_move_imm optional param.
7800 2018-10-01  MCC CS <deswurstes@users.noreply.github.com>
7802         PR tree-optimization/87261
7803         * match.pd: Remove trailing whitespace.
7804         Add (x & y) | ~(x | y) -> ~(x ^ y),
7805         (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
7807 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
7809         * config/arc/arc.md (*add_n): Clean up pattern, update instruction
7810         constraints.
7811         (ashlsi3_insn): Update instruction constraints.
7812         (ashrsi3_insn): Likewise.
7813         (rotrsi3): Likewise.
7814         (add_shift): Likewise.
7815         * config/arc/constraints.md (Csz): New 32 bit constraint. It
7816         avoids placing in the limm field small constants which, otherwise,
7817         could end into a small instruction.
7819 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
7821         * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
7822         destination register is not odd-even.
7823         (umaddsidi4_split): Likewise.
7825 2018-10-01  Richard Biener  <rguenther@suse.de>
7827         * tree-inline.c (expand_call_inline): Store origin of fn
7828         in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
7829         * tree.c (block_ultimate_origin): Simplify and do some
7830         checking.
7832 2018-09-30  Uros Bizjak  <ubizjak@gmail.com>
7834         * config/i386/mmx.md (EMMS): New int iterator.
7835         (emms): New int attribute.
7836         (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
7837         EMMS int iterator.  Explicitly declare clobbers.
7838         (mmx_emms): Remove expander.
7839         (mmx_femms): Ditto.
7840         * config/i386/predicates.md (emms_operation): Remove predicate.
7841         (vzeroall_pattern): New predicate.
7842         (vzeroupper_pattern): Rename from vzeroupper_operation.
7843         * config/i386/i386.c (ix86_avx_u128_mode_after): Use
7844         vzeroupper_pattern and vzeroall_pattern predicates.
7846 2018-09-30  Peter Bergner  <bergner@linux.ibm.com>
7848         PR rtl-optimization/86939
7849         * ira-lives.c (make_hard_regno_born): Rename from this...
7850         (make_hard_regno_live): ... to this.  Remove update to conflict
7851         information.  Update function comment.
7852         (make_hard_regno_dead): Add conflict information update.  Update
7853         function comment.
7854         (make_object_born): Rename from this...
7855         (make_object_live): ... to this.  Remove update to conflict information.
7856         Update function comment.
7857         (make_object_dead):  Add conflict information update.  Update function
7858         comment.
7859         (mark_pseudo_regno_live): Call make_object_live.
7860         (mark_pseudo_regno_subword_live): Likewise.
7861         (mark_hard_reg_dead): Update function comment.
7862         (mark_hard_reg_live): Call make_hard_regno_live.
7863         (process_bb_node_lives): Likewise.
7864         * lra-lives.c (make_hard_regno_born): Rename from this...
7865         (make_hard_regno_live): ... to this.  Remove update to conflict
7866         information.  Remove now uneeded check_pic_pseudo_p argument.
7867         Update function comment.
7868         (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
7869         to conflict information.  Update function comment.
7870         (mark_pseudo_live): Remove update to conflict information.  Update
7871         function comment.
7872         (mark_pseudo_dead): Add conflict information update.
7873         (mark_regno_live): Call make_hard_regno_live.
7874         (mark_regno_dead): Call make_hard_regno_dead with new arguement.
7875         (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
7877 2018-09-29  H.J. Lu  <hongjiu.lu@intel.com>
7879         PR target/87370
7880         * config/i386/i386.c (construct_container): Use TImode for
7881         BLKmode values in 2 integer registers.
7883 2018-09-29  Jeff Law  <law@redhat.com>
7885         * builtins.c (unterminated_array): Pass in c_strlen_data * to
7886         c_strlen rather than just a tree *.
7887         (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
7888         Update recursive calls appropriately.  If caller did not provide a
7889         suitable data pointer, create a local one.  When a non-terminated
7890         string is discovered, bubble up information about the string via the
7891         c_strlen_data object.
7892         * builtins.h (c_strlen): Update prototype.
7893         (c_strlen_data): New structure.
7894         * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
7895         For a type 2 call, if c_strlen indicates a non-terminated string
7896         use the length of the non-terminated string.
7897         (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
7899 2018-09-29  Jakub Jelinek  <jakub@redhat.com>
7901         PR target/87467
7902         * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
7903         __m512d type for __A argument rather than __m512.
7905 2018-09-28  John David Anglin  <danglin@gcc.gnu.org>
7907         * match.pd (simple_comparison): Don't optimize if either operand is
7908         a function pointer when target needs function pointer canonicalization.
7910 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
7912         * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
7913         power5 .. power9 to remove indirection.
7914         * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
7915         ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
7916         ASM_CPU_476_SPEC): Delete.
7917         (ASM_CPU_SPEC): Adjust.
7918         (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
7919         asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
7921 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
7923         * config.in: Delete HAVE_AS_DCI.
7924         * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
7925         * config/rs6000/rs6000.h: Ditto.
7926         * configure.ac: Delete HAVE_AS_DCI.
7927         * configure: Regenerate.
7929 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
7931         * config.in (HAVE_AS_LWSYNC): Delete.
7932         * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
7933         * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
7934         do it as a .long .
7935         * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
7936         * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
7937         as a .long .
7938         * configure.ac: Delete HAVE_AS_LWSYNC.
7939         * configure: Regenerate.
7941 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
7942             Pierre-Marie de Rodat  <derodat@adacore.com>
7944         * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
7945         * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
7946         (cgraph_node::create_thunk): Add indirect_offset parameter.
7947         (thunk_adjust): Likewise.
7948         * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
7949         and initialize the corresponding field with it.
7950         (cgraph_node::dump): Dump indirect_offset field.
7951         * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
7952         * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
7953         (thunk_adjust): Add indirect_offset parameter and deal with it.
7954         (cgraph_node::expand_thunk): Deal with the indirect_offset field and
7955         pass it to thunk_adjust.  Do not call the target hook if it's non-zero
7956         or if the thunk is external or local.  Fix formatting.  Do not chain
7957         the RESULT_DECL to BLOCK_VARS.  Pass the static chain to the target,
7958         if any, in the GIMPLE representation.
7959         * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
7960         * lto-cgraph.c (lto_output_node): Write indirect_offset field.
7961         (input_node): Read indirect_offset field.
7962         * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
7963         call to thunk_adjust.
7964         * tree-nested.c (struct nesting_info): Add thunk_p field.
7965         (create_nesting_tree): Set it.
7966         (convert_all_function_calls): Copy static chain from targets to thunks.
7967         (finalize_nesting_tree_1): Return early for thunks.
7968         (unnest_nesting_tree_1): Do not finalize thunks.
7969         (gimplify_all_functions): Do not gimplify thunks.
7971 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
7973         * opt-suggestions.c (option_proposer::build_option_suggestions):
7974         Release "option_values".
7976 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
7978         * coverage.c (get_coverage_counts): Convert problem-reporting dump
7979         messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
7980         * dumpfile.c (kind_as_string): New function.
7981         (dump_loc): Rather than a hardcoded prefix of "note: ", use
7982         kind_as_string to vary the prefix based on dump_kind.
7983         (selftest::test_capture_of_dump_calls): Update for above.
7985 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
7987         * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
7988         (GET_SSE_REGNO): Rename from SSE_REGNO.  Update all uses for rename.
7990 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
7992         * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
7993         * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
7994         INVALID_REGNUM instead of FPSR_REG.
7995         (ix86_md_asm_adjust): Do not clobber FPSR_REG.
7996         * config/i386/i386.md: Update comment of FP compares.
7997         (fldenv): Do not clobber FPSR_REG.
7999 2018-09-28  Richard Biener  <rguenther@suse.de>
8001         * tree.h (BLOCK_ORIGIN): New.
8002         * omp-expand.c (grid_expand_target_grid_body): Assign
8003         BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
8004         * tree-inline.c (remap_block): Likewise.
8005         * auto-profile.c (get_function_decl_from_block): Simplify
8006         by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
8007         * langhooks.c (lhd_print_error_function): Likewise.
8008         * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
8009         Likewise.
8010         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
8011         * tree.c (block_nonartificial_location): Likewise.
8012         (block_ultimate_origin): Likewise.
8013         * tree-pretty-print.c (percent_K_format): Likewise.  Remove
8014         no longer needed LTO case.
8016 2018-09-28  Andrew Stubbs  <ams@codesourcery.com>
8017             Jan Hubicka  <jh@suse.cz>
8018             Martin Jambor  <mjambor@suse.cz>
8020         * simplify-rtx.c (simplify_merge_mask): New function.
8021         (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
8022         same masks are used in op1 or op2.
8023         (test_vec_merge): New function.
8024         (test_vector_ops): Call test_vec_merge.
8026 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
8028         * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
8029         * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
8030         * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
8031         (cypress_costs): Set it.
8032         (supersparc_costs): Likewise.
8033         (hypersparc_costs): Likewise.
8034         (leon_cost): Likewise.
8035         (leon3_costs): Likewise.
8036         (sparclet_costs): Likewise.
8037         (ultrasparc_costs): Likewise.
8038         (ultrasparc_costs): Likewise.
8039         (niagara_costs): Likewise.
8040         (niagara2_costs): Likewise.
8041         (niagara3_costs): Likewise.
8042         (niagara4_costs): Likewise.
8043         (niagara7_costs): Likewise.
8044         (m8_costs): Likewise.
8045         (TARGET_CAN_FOLLOW_JUMP): Define.
8046         (pass_work_around_errata::gate): Minor tweak.
8047         (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
8048         Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
8049         Automaitcally clear MASK_FSMULD mask for V7 processors.
8050         (sparc_can_follow_jump): New static function.
8051         (output_ubranch): Deal with CROSSING_JUMP_P.
8052         (sparc_use_sched_lookahead): Rewrite using switch statement.
8053         (sparc_issue_rate): Reorder.
8054         (sparc_branch_cost): New function.
8056 2018-09-27  Martin Sebor  <msebor@redhat.com>
8058         * tree.h (tree_to_shwi): Add attribute nonnull and pure.
8059         (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
8060         (int_fits_type_p): Same.
8062 2018-09-27  Uros Bizjak  <ubizjak@gmail.com>
8064         * config/i386/i386.md (FPCR_REG): Remove.
8065         (UNSPEC_FLDCW): Remove.
8066         (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
8067         (x86_fldcw_1): Remove insn pattern.
8068         (fnstenv): Do not clobber FPCR_REG.
8069         (fldenv): Ditto.
8070         * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
8071         (CALL_USED_REGISTERS): Ditto.
8072         (REG_ALLOC_ORDER): Ditto.
8073         (REG_CLASS_CONTENTS): Ditto.
8074         (HI_REGISTER_NAMES): Ditto.
8075         (ADDITIONAL_REGISTER_NAMES): Use defines instead
8076         of numerical constants.
8077         * config/i386/i386.c (regclass_map): Remove fpsr register.
8078         (dbx_register_map): Ditto.
8079         (dbx64_register_map): Ditto.
8080         (svr4_dbx_register_map): Ditto.
8081         (print_reg): Do not handle FPCR_REG.
8083 2018-09-27  Segher Boessenkool  <segher@kernel.crashing.org>
8085         PR target/87149
8086         * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
8087         HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
8088         Delete, always treat as true.
8089         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
8090         Ditto.  Simplify remaining code.
8091         * config/powerpcspe/powerpcspe.h: Ditto.
8092         * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
8093         Simplify remaining code.
8094         (rs6000_expand_builtin): Ditto.
8095         * config/rs6000/rs6000.h: Ditto.
8096         * configure.ac: Ditto.
8097         * configure: Regenerate.
8099 2018-09-27  Martin Liska  <mliska@suse.cz>
8101         * coverage.c (get_coverage_counts): Revert the formatting
8102         of missing profile opt info.
8104 2018-09-27  Richard Biener  <rguenther@suse.de>
8106         PR debug/37801
8107         PR debug/87440
8108         * dwarf2out.c (set_block_origin_self): Do not mark outermost
8109         block as we do not output that.
8110         (gen_inlined_subroutine_die): Elide the originally outermost
8111         block, matching what we do for concrete instances.
8112         (decls_for_scope): Add parameter specifying whether to recurse
8113         to subblocks.
8115 2018-09-27  Andrew Stubbs  <ams@codesourcery.com>
8116             Tom de Vries  <tom@codesourcery.com>
8118         PR 82089
8120         * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
8121         STORE_FLAG_VALUE == 1.
8123 2018-09-27  Andreas Krebbel  <krebbel@linux.ibm.com>
8125         * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
8126         constant definitions.
8127         ("tx_assist"): Replace magic number with PPA_TX_ABORT.
8128         ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
8129         ("speculation_barrier"): New expander definition.
8131 2018-09-26  Indu Bhagat  <indu.bhagat@oracle.com>
8133         PR gcov-profile/86957
8134         * common.opt: New warning option -Wmissing-profile.
8135         * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
8136         * doc/invoke.texi: Document -Wmissing-profile.
8138 2018-09-26  Jim Wilson  <jimw@sifive.com>
8140         * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
8141         (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
8143 2018-09-26  Martin Sebor  <msebor@redhat.com>
8145         * tree.c (zerop): Change return type to bool.
8146         (integer_zerop, integer_onep, integer_each_onep): Same.
8147         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
8148         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
8149         (real_onep, real_minus_onep, chain_index): Same.
8150         (print_type_hash_statistics, type_list_equal): Same.
8151         * tree.h (zerop): Same.
8152         (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
8153         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
8154         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
8155         (real_onep, real_minus_onep, chain_index): Same.
8156         (print_type_hash_statistics, type_list_equal): Same.
8158 2018-09-26  Jim Wilson  <jimw@sifive.com>
8160         * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
8162 2018-09-26  Jakub Jelinek  <jakub@redhat.com>
8164         PR target/87414
8165         * config/i386/i386.c: Include debug.h and dwarf2out.h.
8166         (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
8167         call.
8169 2018-09-25  Andrew Stubbs  <ams@codesourcery.com>
8171         * builtins.c (get_builtin_sync_mem): Force address mode conversion.
8173 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
8175         * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
8176         and FP_SECOND_SSE_REGS.
8177         (REG_CLASS_NAMES): Ditto.
8178         (REG_CLASS_CONTENTS): Ditto.
8179         * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
8180         FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
8181         (ix86_preferred_output_reload_class): Ditto.
8182         * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
8183         clobber constraint to "=&f".
8184         (fix_truncdi_i387): Ditto.
8185         (lrintxfdi2): Ditto.
8186         (fistdi2_<rounding>): Ditto.
8187         (fpremxf4_i387): Change "=u" constraint to "=f".
8188         (fprem1xf4_i387): Ditto.
8189         (sincosxf3): Ditto.
8190         (fptanxf4_i387): Ditto.
8191         (fxtractxf3_i387): Ditto.
8192         (fscalexf4_i387): Ditto.
8193         (atan2xf3): Change "u" constraint to "f".
8194         (fyl2xxf3_i387): Ditto.
8195         (fyl2xp1xf3_i387): Ditto.
8197 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
8199         PR target/87439
8200         * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
8201         for removed I387_MASK_PM entity.
8204 2018-09-26  Jeff Law  <law@redhat.com>
8205         Revert
8206         2018-09-26  Alexey Neyman  <stilor@att.net>
8208         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
8209         headers are no longer pulled in by <isl/val.h>.
8211 2018-09-26  Richard Biener  <rguenther@suse.de>
8213         PR debug/87443
8214         * dwarf2out.c (gen_lexical_block_die): Do not equate inline
8215         or concrete instance DIE to the tree.  Create abstract origin
8216         attributes also for concrete instances.
8218 2018-09-26  Alexey Neyman  <stilor@att.net>
8220         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
8221         headers are no longer pulled in by <isl/val.h>.
8223 2018-09-26  Matthew Malcomson  <matthew.malcomson@arm.com>
8225         * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
8226         Use new helper functions.
8227         * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
8228         Use new helper functions.
8229         * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
8230         aarch_mm_needs_release): New declarations.
8231         * config/arm/aarch-common.c (aarch_mm_needs_acquire,
8232         aarch_mm_needs_release): New.
8234 2018-09-26  Eric Botcazou  <ebotcazou@adacore.com>
8236         * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
8237         (arm32_output_mi_thunk): Deal with long calls.
8239 2018-09-26  Richard Biener  <rguenther@suse.de>
8241         PR debug/87428
8242         PR debug/87362
8243         * tree-inline.c (expand_call_inline): When the location
8244         of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
8245         or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
8246         the inserted BLOCK to make inlined_function_outer_scope_p
8247         recognize it.
8248         * dwarf2out.c (add_call_src_coords_attributes): Do not add
8249         coords for reserved locations.
8251 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
8253         * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
8254         (*call_indirect_nonlocal_sysv<mode>): Ditto.
8255         (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
8256         (*sibcall_nonlocal_sysv<mode>): Ditto.
8257         (*sibcall_value_nonlocal_sysv<mode>): Ditto.
8258         (<bd>_<mode>): Ditto.
8259         (<bd>tf_<mode>): Ditto.
8261 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
8263         * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
8264         control string as a list of templates instead of as C code.
8265         (*altivec_movti): Ditto.
8266         * config/rs6000/darwin.md (movdf_low_di): Ditto.
8268 2018-09-25  Jim Wilson  <jimw@sifive.com>
8270         * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
8271         when target symbol is weak.
8273 2018-09-25  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8275         PR c/87387
8276         * builtins.c (unterminated_array): Simplify.
8277         * expr.c (string_constant): Handle SSA_NAME.  Add more exceptions
8278         where pointer arithmetic is safe.
8280 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
8282         PR target/86987
8283         * config/rs6000/altivec.md (altivec_vspltb): Use
8284         const_0_to_15_operand instead of u5bit_cint_operand.
8285         (*altivec_vspltb_internal): Ditto.
8286         (altivec_vspltb_direct): Ditto.
8287         (altivec_vsplth): Use const_0_to_7_operand instead of
8288         u5bit_cint_operand.
8289         (*altivec_vsplth_internal): Ditto.
8290         (altivec_vsplth_direct): Ditto.
8291         (altivec_vspltw): Use const_0_to_3_operand instead of
8292         u5bit_cint_operand.
8293         (*altivec_vspltw_internal): Ditto.
8294         (altivec_vspltw_direct): Ditto.
8295         (altivec_vspltsf): Ditto.
8296         (*altivec_vspltsf_internal): Ditto.
8297         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
8298         various splats with the proper size immediate.  Reorder the various
8299         cases by ascending size of immediate, and put all such together.
8301 2018-09-25  Richard Biener  <rguenther@suse.de>
8303         PR debug/83941
8304         * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
8305         GC-ification.
8306         (maybe_create_die_with_external_ref): Do not create
8307         DW_TAG_imported_unit here.
8308         (add_abstract_origin_attribute): Handle external BLOCK refs.
8309         (dwarf2out_abstract_function): Simplify LTO case.
8310         (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
8311         rather than using maybe_create_die_with_external_ref.
8313 2018-09-25  Uros Bizjak  <ubizjak@gmail.com>
8315         PR target/71278
8316         * config/i386/i386.md (frndintxf2_mask_pm): Remove.
8317         (frndintxf2_mask_pm_i387): Ditto.
8318         (nearbyintxf2): Rewrite expander pattern to match rintxf2.
8319         Enable for !flag_trapping_math.
8320         (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
8321         Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
8322         Change operand 1 predicate to nonimmediate_operand.
8323         (attr "i387_cw"): Remove mask_pm.
8324         * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
8325         (enum ix86_entity): Remove I387_MASK_PM.
8326         * config/i386/i386.c (ix86_i387_mode_needed): Do not
8327         handle I387_MASK_PM.
8328         (ix86_mode_needed): Ditto.
8329         (ix86_mode_after): Ditto.
8330         (ix86_mode_entry): Ditto.
8331         (ix86_mode_exit): Ditto.
8332         (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
8334 2018-09-25  Jakub Jelinek  <jakub@redhat.com>
8336         * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
8337         to_update_switch_stmts to vNULL instead of calling create on them
8338         immediately.
8340 2018-09-25  Richard Biener  <rguenther@suse.de>
8342         PR tree-optimization/87402
8343         * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
8344         (visit_phi): Re-instantiate handling of supposed to be VARYING
8345         but non-VARYING backedge value.
8347 2018-09-25  Richard Biener  <rguenther@suse.de>
8349         PR debug/83941
8350         * dwarf2out.c (struct sym_off_pair): New.
8351         (external_die_map): New global.
8352         (lookup_decl_die): When in LTO create DIEs lazily from the
8353         external_die_map.
8354         (lookup_block_die): New function, create DIEs lazily in LTO.
8355         (equate_block_to_die): New function.
8356         (dwarf2out_die_ref_for_decl): During WPA get the association
8357         from the external DIE map.
8358         (dwarf2out_register_external_die): Record mapping into the
8359         external DIE map.
8360         (maybe_create_die_with_external_ref): New function split out from
8361         DIE generation part of old dwarf2out_register_external_die.
8362         (add_abstract_origin_attribute): Do not return the DIE.  When
8363         in LTO reference externals directly.
8364         (dwarf2out_abstract_function): When in LTO ignore calls for
8365         decls with external DIEs (already present abstract instances).
8366         (gen_call_site_die): Adjust.
8367         (add_high_low_attributes): Likewise.
8368         (gen_lexical_block_die): Likewise.
8369         (gen_inlined_subroutine_die): Likewie.
8370         (gen_block_die): Likewise.
8371         (dwarf2out_inline_entry): Likewise.
8372         (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
8373         DIEs.
8375 2018-09-25  Martin Liska  <mliska@suse.cz>
8377         * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
8378         integers and not by a float value.
8380 2018-09-25  Martin Liska  <mliska@suse.cz>
8382         PR fortran/87394
8383         * dbgcnt.c (dbg_cnt_process_single_pair): Return false
8384         instead of NULL.
8385         * dumpfile.c (dump_enable_all): Remove extra parenthesis.
8386         * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
8387         * godump.c (go_format_type): Remove extra parenthesis.
8389 2018-09-25  Martin Liska  <mliska@suse.cz>
8391         * alias.c (set_dest_equal_p): Remove unused function.
8392         * config/i386/i386.c (def_builtin_pure2): Likewise.
8393         * diagnostic-show-locus.c (class layout): Remove
8394         unused field.
8395         (layout::layout): Likewise here.
8396         * dump-context.h (class temp_dump_context): Likewise.
8397         * dwarf2out.c (add_AT_fde_ref): Remove unused function.
8398         (add_AT_loclistsptr): Likewise.
8399         (add_AT_offset): Likewise.
8400         (get_AT_hi_pc): Likewise.
8401         (is_comdat_die): Likewise.
8402         (type_is_enum): Likewise.
8403         (ceiling): Likewise.
8404         (add_AT_vms_delta): Likewise.
8405         (is_class_die): Likewise.
8406         * edit-context.c (class line_event): Remove unused field.
8407         * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
8408         unused function.
8409         * ipa-cp.c (ipa_get_vr_lat): Likewise.
8410         * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
8411         (ok_for_base_p_nonstrict): Likewise.
8412         * tree-chrec.c (is_not_constant_evolution): Likewise.
8413         (chrec_fold_poly_cst): Likewise.
8414         * tree-if-conv.c (has_pred_critical_p): Likewise.
8415         * tree-ssa-coalesce.c (print_exprs): Likewise.
8416         * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
8417         * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
8418         * tree-vrp.c (value_ranges_intersect_p): Likewise.
8419         (value_range_nonnegative_p): Likewise.
8421 2018-09-25  Martin Liska  <mliska@suse.cz>
8423         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
8424         Do not handle "GNU Pascal".
8425         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
8426         Likewise.
8427         * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
8428         from documentation. Likewise.
8429         * dbxout.c (dbxout_range_type): Likewise.
8430         * doc/cpp.texi: Likewise.
8431         * doc/extend.texi: Likewise.
8432         * doc/frontends.texi: Likewise.
8433         * doc/invoke.texi: Remove Pascal entry.
8434         * tree.def (CLEANUP_POINT_EXPR): Likewise.
8435         * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
8437 2018-09-25  Martin Liska  <mliska@suse.cz>
8439         PR middle-end/86078
8440         * doc/invoke.texi: Document all parameters and remove default
8441         of the parameters.
8443 2018-09-25  Ilya Leoshkevich  <iii@linux.ibm.com>
8445         PR bootstrap/87417
8446         * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
8447         contains HOST_WIDE_INTs when computing its size.
8449 2018-09-24  Jim Wilson  <jimw@sifive.com>
8451         PR target/87391
8452         * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
8453         not TARGET_RVE.
8454         (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
8456 2018-09-24  Andrew Pinski  <apinski@marvell.com>
8458         *  config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
8459         access prev before checking it for NULLness in the
8460         AARCH64_FUSE_CMP_BRANCH case.
8462 2018-09-24  H.J. Lu  <hongjiu.lu@intel.com>
8464         PR target/82699
8465         * config/i386/i386.c (rest_of_insert_endbranch): Set
8466         endbr_queued_at_entrance to true and don't insert ENDBR if
8467         x86_function_profiler will be called.
8468         (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
8469         is true.
8470         * config/i386/i386.h (machine_function): Add
8471         endbr_queued_at_entrance.
8473 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
8475         * genattrtab.c (mk_attr_alt): Use alternative_mask.
8476         (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
8477         types.
8478         (check_attr_test): Use alternative_mask.
8479         (get_attr_value): Likewise.
8480         (compute_alternative_mask): Use alternative_mask and XWINT.
8481         (make_alternative_compare): Use alternative_mask.
8482         (attr_alt_subset_p): Use XWINT.
8483         (attr_alt_subset_of_compl_p): Likewise.
8484         (attr_alt_intersection): Use alternative_mask and XWINT.
8485         (attr_alt_union): Likewise.
8486         (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
8487         (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
8488         (simplify_test_exp): Use alternative_mask and XWINT.
8489         (write_test_expr): Use alternative_mask and XWINT, adjust bit
8490         number calculation to support 64 bits.  Generate code that
8491         checks 64-bit masks.
8492         (main): Use alternative_mask.
8493         * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
8495 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
8497         PR target/80080
8498         * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
8499         RETURN+USE when returning via %r14.
8501 2018-09-24  Martin Liska  <mliska@suse.cz>
8503         * gcov.c (output_lines): Print colorization legend
8504         for both flag_use_colors and flag_use_hotness_colors.
8505         Reword the help.
8507 2018-09-24  Martin Liska  <mliska@suse.cz>
8509         * coverage.c (get_coverage_counts): Use warning_at
8510         with current_function_decl location. Use %qD in warning
8511         message.
8513 2018-09-24  Martin Liska  <mliska@suse.cz>
8515         * memory-block.h (memory_block_pool::release): Annotate with
8516         valgrind that the memory is not accessible.
8518 2018-09-24  Martin Liska  <mliska@suse.cz>
8520         PR sanitizer/85774
8521         * asan.c: Make asan_handled_variables extern.
8522         * asan.h: Likewise.
8523         * cfgexpand.c (expand_stack_vars): Make sure
8524         a representative is unpoison if another
8525         variable in the partition is handled by
8526         use-after-scope sanitization.
8528 2018-09-24  Richard Biener  <rguenther@suse.de>
8530         PR tree-optimization/63155
8531         * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
8532         the worklist when the edge of the respective argument isn't
8533         executable.
8535 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
8537         * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
8538         ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
8539         (MASK_CLASS_P): Update for rename.
8540         (MAYBE_MASK_CLASS_P): Ditto.
8541         (REG_CLASS_NAMES): Update.
8542         (REG_CLASS_CONTENT): Update.
8543         * config/i386/i386.c (regclass_map): Update for MASK_REG
8544         and ALL_MASK_REGS rename.
8545         * config/i386/constraints.md (Yk): Update for rename.
8546         (k): Ditto.
8548 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
8550         * config/i386/i386.h (enum reg_class): Remove
8551         EVEX_SSE_REGS and MOD4_SSE_REGS.
8552         (REG_CLASS_NAMES): Update.
8553         (REG_CLASS_CONTENT): Update.
8554         * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
8555         registers as ALL_SSE_REGS.
8556         (ix86_additional_allocno_class_p): Remove.
8557         (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
8558         (ix86_register_priority): Lower priority of EVEX SSE registers.
8559         Use IN_RANGE macro where appropriate.
8560         (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
8561         AVX-5124VNNIW checks.
8562         (ix86_modes_tieable_p): Tie 512-bit SSE modes.
8563         * config/i386/sse.md (avx5124fmaddps_4fmaddps)
8564         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
8565         (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
8566         (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
8567         (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
8568         (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
8569         (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
8570         (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
8571         (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
8572         (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
8573         * config/i386/constraints.md (Yh): Remove.
8575 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
8577         * config/i386/i386.c (regclass_map): Declare integer REX registers
8578         as GENERAL_REGS.
8580 2018-09-23  Gerald Pfeifer  <gerald@pfeifer.com>
8582         * doc/service.texi (Service): Switch the fsf.org link to https.
8584 2018-09-22  Chung-Ju Wu  <jasonwucj@gmail.com>
8586         PR target/86798
8587         * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8588         Define to speculation_safe_value_not_needed.
8590 2018-09-21  Florian Weimer  <fweimer@redhat.com>
8592         PR middle-end/81035
8593         * doc/extend.texi (Common Function Attributes): Mention that
8594         noreturn suppresses tail call optimization.
8596 2018-09-21  Jeff Law  <law@redhat.com>
8598         * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
8599         vr_values::cleanup_edges_and_switches.
8600         * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
8601         vr_values class.
8602         (identify_jump_threads): Remove EDGE_IGNORE handling.
8603         (execute_vrp): Move handling of to_remove_edges and
8604         to_update_switch_stmts into vr_values class member functions.
8605         * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
8606         (to_update_switch_stmts): Likewise.
8607         * vr-values.c: Include cfghooks.h.
8608         (vr_values::vr_values): Initialize to_remove_edges and
8609         to_update_switch_stmts.
8610         (vr_values::~vr_values): Verify to_remove_edges and
8611         to_update_switch_stmts are empty.
8612         (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
8613         (vr_values::cleanup_edges_and_switches): New member function.
8614         * vr-values.h (vr_values): Add cleanup_edges_and_switches member
8615         function.  Add new data members.
8617 2018-09-21  David Malcolm  <dmalcolm@redhat.com>
8619         PR tree-optimization/87309
8620         * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
8621         calls with pflags and alt_flags.
8622         (selftest::test_capture_of_dump_calls): Add test of interaction of
8623         MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
8625 2018-09-21  Olivier Hainque  <hainque@adacore.com>
8627         * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
8629 2018-09-21  Olivier Hainque  <hainque@adacore.com>
8631         * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
8633 2018-09-21  Olivier Hainque  <hainque@adacore.com>
8635         * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
8636         Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
8637         (VXWORKS_LIBS_RTP): Minor reordering.
8639 2018-09-21  Olivier Hainque  <hainque@adacore.com>
8641         * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
8642         (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
8644 2018-09-21  Olivier Hainque  <hainque@adacore.com>
8646         * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
8647         (PTRDIFF_TYPE): Likewise.
8649 2018-09-21  Olivier Hainque  <hainque@adacore.com>
8651         * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
8652         triplet, similar to support for VxWorks7.
8653         * config/vxworks-dummy.h: Provide a default definition
8654         of TARGET_VXWORKS64 to 0.
8656 2018-09-21  Olivier Hainque  <hainque@adacore.com>
8658         * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
8659         * config/vxworks-dummy.h: here.
8661 2018-09-21  Olivier Hainque  <hainque@adacore.com>
8663         * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
8665 2018-09-21  Shaokun Zhang  <zhangshaokun@hisilicon.com>
8666             Bo Zhou  <zbo.zhou@hisilicon.com>
8668         * config/aarch64/aarch64-cores.def (tsv110): New CPU.
8669         * config/aarch64/aarch64-tune.md: Regenerated.
8670         * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
8671         * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
8672         * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
8674 2018-09-21  Andrew Stubbs  <ams@codesourcery.com>
8675             Julian Brown  <julian@codesourcery.com>
8677         * builtins.c (get_builtin_sync_mem): Handle address spaces.
8679 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
8681         * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
8682         if the call takes a static chain.
8684 2018-09-21  Martin Liska  <mliska@suse.cz>
8686         * auto-profile.c (autofdo_source_profile::read): Do not
8687         set sum_all.
8688         (read_profile): Do not add working sets.
8689         (read_autofdo_file): Remove sum_all.
8690         (afdo_callsite_hot_enough_for_early_inline): Remove const
8691         qualifier.
8692         * coverage.c (struct counts_entry): Remove gcov_summary.
8693         (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
8694         do not support GCOV_TAG_PROGRAM_SUMMARY.
8695         (get_coverage_counts): Remove summary and expected
8696         arguments.
8697         * coverage.h (get_coverage_counts): Likewise.
8698         * doc/gcov-dump.texi: Remove -w option.
8699         * gcov-dump.c (dump_working_sets): Remove.
8700         (main): Do not support '-w' option.
8701         (print_usage): Likewise.
8702         (tag_summary): Likewise.
8703         * gcov-io.c (gcov_write_summary): Do not dump
8704         histogram.
8705         (gcov_read_summary): Likewise.
8706         (gcov_histo_index): Remove.
8707         (gcov_histogram_merge): Likewise.
8708         (compute_working_sets): Likewise.
8709         * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
8710         it not obsolete.
8711         (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
8712         (GCOV_TAG_SUMMARY_LENGTH): Adjust.
8713         (GCOV_HISTOGRAM_SIZE): Remove.
8714         (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
8715         (struct gcov_summary): Simplify rapidly just
8716         to runs and sum_max fields.
8717         (gcov_histo_index): Remove.
8718         (NUM_GCOV_WORKING_SETS): Likewise.
8719         (compute_working_sets): Likewise.
8720         * gcov-tool.c (print_overlap_usage_message): Remove
8721         trailing empty line.
8722         * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
8723         (output_lines): Remove program related line.
8724         * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
8725         * lto-cgraph.c (output_profile_summary): Do not stream GCOV
8726         histogram.
8727         (input_profile_summary): Do not read it.
8728         (merge_profile_summaries): And do not merge it.
8729         (input_symtab): Do not call removed function.
8730         * modulo-sched.c (sms_schedule): Do not print sum_max.
8731         * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
8732         removed when histogram method was invented.
8733         (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
8734         mode.
8735         * postreload-gcse.c (eliminate_partially_redundant_load): Fix
8736         GCOV coding style.
8737         * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
8738         and dump selected value.
8739         * profile.c (add_working_set): Remove.
8740         (get_working_sets): Likewise.
8741         (find_working_set): Likewise.
8742         (get_exec_counts): Do not work with working sets.
8743         (read_profile_edge_counts): Do not inform as sum_max is removed.
8744         (compute_branch_probabilities): Likewise.
8745         (compute_value_histograms): Remove argument for call of
8746         get_coverage_counts.
8747         * profile.h: Do not make gcov_summary const.
8749 2018-09-21  Monk Chiang  <sh.chiang04@gmail.com>
8751         * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
8753 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
8755         PR tree-optimization/86990
8756         * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
8757         Check that the entire merged store group is made of constants only for
8758         overlapping stores.
8760 2018-09-20  Allan Sandfeld Jensen  <allan.jensen@qt.io>
8762         * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
8763         (VTABLE_VERIFICATION_SPEC): Likewise.
8764         (SANITIZER_EARLY_SPEC): Likewise.
8765         (SANITIZER_SPEC): Likewise.
8766         * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
8767         * doc/invoke.texi (Link Options): Document -r.
8769 2018-09-20  Richard Biener <rguenther@suse.de>
8771         PR middle-end/87054
8772         * gimplify.c (gimplify_expr): Retain alignment of
8773         addressable lvalue in dereference.
8775 2018-09-20  Alexandre Oliva <aoliva@redhat.com>
8777         PR bootstrap/87013
8778         * configure.ac: Check for .loc is_stmt support.
8779         * configure, config.in: Rebuilt.
8780         * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
8781         if not supported.
8783 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
8785         * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
8786         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
8787         -misel=no.
8789 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
8791         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
8792         VECTOR_OTHER.
8793         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
8794         case VECTOR_OTHER.
8796 2018-09-20  Marek Polacek  <polacek@redhat.com>
8798         * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
8800 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
8802         PR tree-optimization/87288
8803         * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
8804         into account when determining PEELING_FOR_NITERS.
8806 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
8808         PR tree-optimization/86877
8809         * tree-vect-loop.c (vect_analyze_loop_2): Call
8810         vect_verify_datarefs_alignment.
8812 2018-09-19  Marek Polacek  <polacek@redhat.com>
8814         * doc/invoke.texi: Document -Wclass-conversion.
8816 2018-09-19  John David Anglin  <danglin@gcc.gnu.org>
8818         * config/pa/pa.c (pa_adjust_priority): Delete.
8819         (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
8821         * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
8822         (atomic_storehi): Likewise.
8823         (atomic_storesi): Likewise.
8824         (atomic_loaddi): Restore compare and swap exchange loop code.
8826 2018-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
8828         PR rtl-optimization/86902
8829         * combine.c (try_combine): When changing the CC mode used, don't change
8830         an unrelated mode in other_insn to that new CC mode.
8832 2018-09-19  David Malcolm  <dmalcolm@redhat.com>
8834         * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
8835         with %T in place of calls to dump_generic_expr.
8836         (prune_runtime_alias_test_list): Likewise.
8837         (create_runtime_alias_checks): Likewise.
8838         * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
8839         (vect_analyze_data_ref_dependence): Likewise.
8840         (vect_slp_analyze_data_ref_dependence): Likewise.
8841         (vect_record_base_alignment): Likewise.  Use %G in place of call
8842         to dump_gimple_stmt.
8843         (vect_compute_data_ref_alignment): Likewise.
8844         (verify_data_ref_alignment): Likewise.
8845         (vect_find_same_alignment_drs): Likewise.
8846         (vect_analyze_group_access_1): Likewise.
8847         (vect_analyze_data_ref_accesses): Likewise.
8848         (dependence_distance_ge_vf): Likewise.
8849         (dump_lower_bound): Likewise.
8850         (vect_prune_runtime_alias_test_list): Likewise.
8851         (vect_find_stmt_data_reference): Likewise.
8852         (vect_analyze_data_refs): Likewise.
8853         (vect_create_addr_base_for_vector_ref): Likewise.
8854         (vect_create_data_ref_ptr): Likewise.
8855         * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
8856         (vect_can_advance_ivs_p): Likewise.
8857         (vect_update_ivs_after_vectorizer): Likewise.
8858         (vect_gen_prolog_loop_niters): Likewise.
8859         (vect_prepare_for_masked_peels): Likewise.
8860         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
8861         (vect_determine_vectorization_factor): Likewise.
8862         (vect_is_simple_iv_evolution): Likewise.
8863         (vect_analyze_scalar_cycles_1): Likewise.
8864         (vect_analyze_loop_operations): Likewise.
8865         (report_vect_op): Likewise.
8866         (vect_is_slp_reduction): Likewise.
8867         (check_reduction_path): Likewise.
8868         (vect_is_simple_reduction): Likewise.
8869         (vect_create_epilog_for_reduction): Likewise.
8870         (vect_finalize_reduction:): Likewise.
8871         (vectorizable_induction): Likewise.
8872         (vect_transform_loop_stmt): Likewise.
8873         (vect_transform_loop): Likewise.
8874         (optimize_mask_stores): Likewise.
8875         * tree-vect-patterns.c (vect_pattern_detected): Likewise.
8876         (vect_split_statement): Likewise.
8877         (vect_recog_over_widening_pattern): Likewise.
8878         (vect_recog_average_pattern): Likewise.
8879         (vect_determine_min_output_precision_1): Likewise.
8880         (vect_determine_precisions_from_range): Likewise.
8881         (vect_determine_precisions_from_users): Likewise.
8882         (vect_mark_pattern_stmts): Likewise.
8883         (vect_pattern_recog_1): Likewise.
8884         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
8885         (vect_record_max_nunits): Likewise.
8886         (vect_build_slp_tree_1): Likewise.
8887         (vect_build_slp_tree_2): Likewise.
8888         (vect_print_slp_tree): Likewise.
8889         (vect_analyze_slp_instance): Likewise.
8890         (vect_detect_hybrid_slp_stmts): Likewise.
8891         (vect_detect_hybrid_slp_1): Likewise.
8892         (vect_slp_analyze_operations): Likewise.
8893         (vect_slp_analyze_bb_1): Likewise.
8894         (vect_transform_slp_perm_load): Likewise.
8895         (vect_schedule_slp_instance): Likewise.
8896         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
8897         (vect_mark_stmts_to_be_vectorized): Likewise.
8898         (vect_init_vector_1): Likewise.
8899         (vect_get_vec_def_for_operand): Likewise.
8900         (vect_finish_stmt_generation_1): Likewise.
8901         (vect_check_load_store_mask): Likewise.
8902         (vectorizable_call): Likewise.
8903         (vectorizable_conversion): Likewise.
8904         (vectorizable_operation): Likewise.
8905         (vectorizable_load): Likewise.
8906         (vect_analyze_stmt): Likewise.
8907         (vect_is_simple_use): Likewise.
8908         (vect_get_vector_types_for_stmt): Likewise.
8909         (vect_get_mask_type_for_stmt): Likewise.
8910         * tree-vectorizer.c (increase_alignment): Likewise.
8912 2018-09-19  Andrew Stubbs  <ams@codesourcery.com>
8914         * doc/rtl.texi: Adjust vec_select description.
8915         * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
8916         non-constant selectors.
8918 2018-09-19  Matthew Malcomson  <matthew.malcomson@arm.com>
8920         * config/aarch64/aarch64-protos.h
8921         (aarch64_offset_9bit_signed_unscaled_p): New declaration.
8922         * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
8923         (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
8924         * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
8925         (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
8926         (AARCH64_FL_PROFILE): Move index so flags are ordered.
8927         (AARCH64_ISA_RCPC8_4): New flag.
8928         * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
8929         to aarch64_offset_9bit_signed_unscaled_p.
8930         * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
8931         and use stlur.
8932         * config/aarch64/constraints.md (Ust): New constraint.
8933         * config/aarch64/predicates.md.
8934         (aarch64_9bit_offset_memory_operand): New predicate.
8935         (aarch64_rcpc_memory_operand): New predicate.
8937 2018-09-19  Eric Botcazou  <ebotcazou@adacore.com>
8939         PR rtl-optimization/87361
8940         * rtlanal.c (nonzero_bits1): Revert accidental change.
8942 2018-09-19  Richard Biener  <rguenther@suse.de>
8944         PR tree-optimization/87349
8945         PR tree-optimization/87342
8946         * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
8948 2018-09-18  Marek Polacek  <polacek@redhat.com>
8950         P1064R0 - Allowing Virtual Function Calls in Constant Expressions
8951         * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
8953 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
8955         * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
8957 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
8959         PR rtl-optimization/86882
8960         * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
8962 2018-09-18  Uros Bizjak  <ubizjak@gmail.com>
8964         * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
8965         *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
8967 2018-09-18  Jonathan Wakely  <jwakely@redhat.com>
8969         PR other/87353
8970         * doc/invoke.texi (Link Options): Fix formatting and grammar.
8972 2018-09-18  Richard Biener  <rguenther@suse.de>
8974         PR middle-end/63155
8975         * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
8976         (compute_samebase_partition_bases): Likewise.
8977         (coalesce_ssa_name): Always use compute_optimized_partition_bases.
8978         (gimple_can_coalesce_p): Simplify.
8980 2018-09-18  Hans-Peter Nilsson  <hp@bitrange.com>
8982         Handle a library implementation of ffs calling __builtin_ffs.
8983         * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
8984         (mmix_init_libfuncs): New function: make __builtin_ffs expand
8985         to __ffsdi2.
8987 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
8989         * diagnostic-show-locus.c (class layout_range): Add field
8990         "m_original_idx".
8991         (layout_range::layout_range): Add "original_idx" param and use it
8992         to initialize new field.
8993         (make_range): Use 0 for original_idx.
8994         (layout::layout): Pass in index to calls to
8995         maybe_add_location_range.
8996         (layout::maybe_add_location_range): Add param "original_idx" and
8997         pass it on to layout_range.
8998         (layout::print_any_labels): Pass on range->m_original_idx to
8999         get_text call.
9000         (gcc_rich_location::add_location_if_nearby): Use 0 for
9001         original_idx.
9002         * gcc-rich-location.h (text_range_label::get_text): Update for new
9003         param.
9004         (range_label_for_type_mismatch::get_text): Likewise.
9006 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
9008         * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
9010 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
9012         * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
9013         format_string_diagnostic_t.
9014         (fmtwarn_n): Likewise.
9015         * substring-locations.c
9016         (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
9017         (format_warning_n_va): Convert to...
9018         (format_string_diagnostic_t::emit_warning_n_va): ...this.
9019         (format_warning_va): Convert to...
9020         (format_string_diagnostic_t::emit_warning_va): ...this.
9021         (format_warning_at_substring): Convert to...
9022         (format_string_diagnostic_t::emit_warning): ...this.
9023         (format_warning_at_substring_n): Convert to...
9024         (format_string_diagnostic_t::emit_warning_n): ...this.
9025         * substring-locations.h (class format_string_diagnostic_t): New
9026         class.
9027         (format_warning_va): Convert to
9028         format_string_diagnostic_t::emit_warning_va.
9029         (format_warning_n_va): Convert to
9030         format_string_diagnostic_t::emit_warning_n_va.
9031         (format_warning_at_substring): Convert to
9032         format_string_diagnostic_t::emit_warning.
9033         (format_warning_at_substring_n): Convert to
9034         format_string_diagnostic_t::emit_warning_n.
9036 2018-09-17  Cesar Philippidis  <cesar@codesourcery.com>
9037             Bernd Schmidt <bernds_cb1@t-online.de>
9039         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
9040         SImode args.
9042 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
9044         * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
9045         operand 0 predicate to nonimmediate operand.
9046         (rint<mode>2_frndint): Remove insn pattern.
9047         (rint<mode>2): Change operand 1 predicate to general_operand.
9048         Extend operand 1 to XFmode and generate rintxf2 insn.
9049         (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
9050         Do not use X87MODEF mode macro.
9051         (frndintxf2_<rounding>_i387): Rename from
9052         frndint<mode>2_<rounding>_i387.  Do not use X87MODEF mode macro.
9053         (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
9054         to XFmode and generate significandxf3 insn.
9056 2018-09-17  Richard Biener  <rguenther@suse.de>
9058         PR tree-optimization/87328
9059         * tree-ssa-sccvn.c (process_bb): Remove assertion about not
9060         visiting unexecutable backedges when not iterating.
9061         (do_rpo_vn): Mark all edges not executable even when not
9062         iterating.
9064 2018-09-17  Martin Jambor  <mjambor@suse.cz>
9066         PR c/63886
9067         * doc/invoke.texi (Warning Options): Likewise.
9069 2018-09-17  Richard Biener  <rguenther@suse.de>
9071         PR tree-optimization/87301
9072         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
9073         clean EH info from leftover copy assignments.
9075 2018-09-17  Martin Liska  <mliska@suse.cz>
9077         PR gcov-profile/85871
9078         * gcov.c (output_intermediate_file): Fix out of bounds
9079         access.
9081 2018-09-17  Vineet Gupta  <vgupta@synopsys.com>
9083         * config/arc/arc.c: Object attributes for core4 not reflected
9084         correctly.
9085         * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
9086         core3).
9088 2018-09-17  Alexey Brodkin  <abrodkin@synopsys.com>
9090         * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
9092 2018-09-17  Martin Liska  <mliska@suse.cz>
9094         * doc/gcov.texi: Document new option --use-hotness-colors.
9095         * gcov.c (struct source_info): Declare new field.
9096         (source_info::source_info): Set default for maximum_count.
9097         (print_usage): Add new -q option.
9098         (process_args): Process it.
9099         (accumulate_line_info): Save src->maximum_count.
9100         (output_line_beginning): Make color line number if
9101         flag_use_hotness_colors is set.
9102         (output_line_details): Pass default argument value.
9103         (output_lines): Pass src->maximum_count.
9105 2018-09-17  Martin Liska  <mliska@suse.cz>
9107         * common/config/i386/i386-common.c (ix86_get_valid_option_values):
9108         Use processor_names table.
9109         * config/i386/i386.c (ix86_default_align): Use
9110         processor_cost_table for alignment values.
9111         (ix86_option_override_internal): Use processor_names.
9112         (ix86_function_specific_print): Likewise.
9113         * config/i386/i386.h (struct processor_costs):
9114         Add alignment values.
9115         (struct ptt): Remove and replace with const char *.
9116         * config/i386/x86-tune-costs.h (struct processor_costs):
9117         Declare default alignments for all costs.
9119 2018-09-17  Aldy Hernandez  <aldyh@redhat.com>
9121         * tree-vrp.c (extract_range_from_unary_expr): Do not special case
9122         symbolics or VR_VARYING ranges for ABS_EXPR.
9123         * wide-int-range.cc (wide_int_range_abs): Return positive numbers
9124         when range will wrap.
9126 2018-09-15  Eric Botcazou  <ebotcazou@adacore.com>
9128         PR middle-end/86864
9129         * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
9130         before and after a JUMP_TABLE_DATA.
9132 2018-09-14  John David Anglin  <danglin@gcc.gnu.org>
9134         PR middle-end/87188
9135         * dojump.c (do_compare_and_jump): Canonicalize function pointers
9136         when one operand is a function pointer.  Use POINTER_TYPE_P and
9137         FUNC_OR_METHOD_TYPE_P.
9138         * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
9139         * fold-const.c (build_range_check): Likewise.
9140         * match.pd (simple_comparison): Likewise.
9142 2018-09-14  David Malcolm  <dmalcolm@redhat.com>
9144         PR c/82967
9145         * spellcheck.c (get_edit_distance_cutoff): New function.
9146         (selftest::test_edit_distance_unit_test_oneway): Rename to...
9147         (selftest::test_get_edit_distance_one_way): ...this.
9148         (selftest::test_get_edit_distance_unit): Rename to...
9149         (selftest::test_get_edit_distance_both_ways): ...this.
9150         (selftest::test_edit_distances): Move tests to this new function,
9151         and test some more pairs of strings.  Update for above renaming.
9152         (selftest::get_old_cutoff): New function.
9153         (selftest::test_get_edit_distance_cutoff): New function.
9154         (selftest::assert_suggested_for): New function.
9155         (ASSERT_SUGGESTED_FOR): New macro.
9156         (selftest::assert_not_suggested_for): New function.
9157         (ASSERT_NOT_SUGGESTED_FOR): New macro.
9158         (selftest::test_suggestions): New function.
9159         (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
9160         tests to selftest::test_edit_distances and call it.  Add calls to
9161         selftest::test_get_edit_distance_cutoff and
9162         selftest::test_suggestions.
9163         * spellcheck.h (get_edit_distance_cutoff): New function declaration.
9164         (best_match::consider): Replace hard-coded cutoff calculation with
9165         a call to...
9166         (best_match::get_cutoff): New declaration.
9167         (best_match::get_best_meaningful_candidate): Likewise.
9169 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9171         * builtins.c (fold_builtin_strlen): Remove TODO comment.
9173 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9175         revert:
9176         2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9178         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
9179         terminated string literal.
9181 2018-09-14  Martin Sebor  <msebor@redhat.com>
9183         * builtins.c (unterminated_array): Handle ARRAY_REF.
9184         (expand_builtin_stpcpy_1): Detect unterminated char arrays.
9185         * builtins.h (unterminated_array): Declare extern.
9186         * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
9187         arrays.
9188         (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
9189         calls.
9191 2018-09-14  Martin Sebor  <msebor@redhat.com>
9192             Jeff Law  <law@redhat.com>
9194         * builtins.c (unterminated_array): New.
9195         (expand_builtin_strcpy): Adjust.
9196         (expand_builtin_strcpy_args): Detect unterminated arrays.
9197         * gimple-fold.c (get_maxval_strlen): Add argument.  Detect
9198         unterminated arrays.
9199         * gimple-fold.h (get_maxval_strlen): Add argument.
9200         (gimple_fold_builtin_strcpy): Detec unterminated arrays.
9202         * gimple-fold.c (get_range_strlen): Add argument.
9203         (get_maxval_strlen): Adjust.
9204         * gimple-fold.h (get_range_strlen): Add argument.
9206 2018-09-14  Wei Xiao  <wei3.xiao@intel.com>
9208         * config/i386/movdirintrin.h: Fix copyright year.
9210 2018-09-14  Uros Bizjak  <ubizjak@gmail.com>
9212         * reg-stack.c: Include regs.h.
9213         (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
9214         (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
9215         FIRST_STACK_REG, not DFmode.
9216         (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
9217         FIRST_STACK_REG, not XFmode.  Explicitly construct swap RTX.
9218         (change stack): Default register mode to the reg_raw_mode of
9219         FIRST_STACK_REG, not DFmode.
9220         * config/i386/i386.md (*swap<mode>): Remove insn pattern.
9221         (*swapxf): Rename from swapxf.
9223 2018-09-14  Carl Love  <cel@us.ibm.com>
9225         * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
9226         * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
9228 2018-09-14  Segher Boessenkool  <segher@kernel.crashing.org>
9230         PR target/87224
9231         * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
9232         alternatives.
9234 2018-09-14  Sam Tebbs  <sam.tebbs@arm.com>
9236         PR target/85628
9237         * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
9239 2018-09-14  Jason Merrill  <jason@redhat.com>
9241         Fix --enable-gather-detailed-mem-stats.
9242         * hash-table.c (hash_table_usage): Change from variable to function.
9243         * hash-table.h: Adjust.
9244         * Makefile.in: Add missing dependencies on hash-table.h.
9246 2018-09-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9248         PR tree-optimization/87259
9249         PR lto/87283
9250         (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
9251         execute_cse_reciprocals_1 has tried transforming.
9253 2018-09-14  Aldy Hernandez  <aldyh@redhat.com>
9255         * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
9256         VR_VARYING for PLUS/MINUS_EXPR.
9258 2018-09-14  Ilya Leoshkevich  <iii@linux.ibm.com>
9260         * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
9261         formatting.
9263 2018-09-14  Richard Biener  <rguenther@suse.de>
9265         PR middle-end/63155
9266         * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
9267         bits for the merged partition.
9269 2018-09-13  Martin Sebor  <msebor@redhat.com>
9270             Bernd Edlinger  <bernd.edlinger@hotmail.de>
9272         * builtins.h (c_srlen): Add argument.
9273         * builtins.c (warn_string_no_nul): New function.
9274         (c_strlen): Add argument and use it.  Update recursive calls.
9275         Pass DECL argument to string_constant to get info on non
9276         terminated strings.  Update *NONSTR as needed.
9277         (fold_builtin_strlen): Add argument to calls to c_strlen.
9278         Warn for unterminated arrays.
9279         (warn_string_no_null): Add prototype.
9280         * expr.c (string_constant): Update arguments.  Update recursive
9281         calls appropriately.  Detect missing NUL terminator and outermost
9282         declaration its missing in.
9283         Improve checks for arrays with nonzero lower bound or elements
9284         that are not a single byte.  Simplify offset computation.
9285         Simplify checks for non-NUL terminated strings.
9286         * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
9287         * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
9289 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9291         * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
9292         correctly.
9293         * fold-const.c (c_getstr): Fix function comment.  Remove unused third
9294         argument.  Fix range checks.
9295         * fold-const.h (c_getstr): Adjust protoype.
9296         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
9297         string is constant but contains no NUL byte.
9299         * expr.c (string_constant): Adjust function comment.
9300         Remove bogus check for zero termination.
9302         * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
9304         * varasm.c (compare_constant): Compare type size of STRING_CSTs.
9305         (get_constant_size): Don't make STRING_CSTs larger than they are.
9306         (check_string_literal): New check function for STRING_CSTs.
9307         (output_constant): Use it.
9309 2018-09-13  Eric Botcazou  <ebotcazou@adacore.com>
9311         PR target/86812
9312         * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
9314 2018-09-13  Richard Biener  <rguenther@suse.de>
9316         PR tree-optimization/87263
9317         * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
9318         (struct unwind_state): Add max_rpo field.
9319         (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
9320         Compute max_rpo, the max RPO number a block can be backwards reached
9321         from.  Re-write non-iterating mode to a RPO ordered worklist approach,
9322         separating it from the iterating mode.
9324 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
9326         * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
9327         (rfs_decision): New scheduling decision.
9329 2018-09-13  Richard Biener  <rguenther@suse.de>
9331         PR bootstrap/87134
9332         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
9333         (vn_nary_op_insert_pieces_predicated): Do not write useless
9334         valid_dominated_by_p entry outside of the allocated storage.
9336 2018-09-13  Omar Sandoval  <osandov@osandov.com>
9337             Tom de Vries  <tdevries@suse.de>
9339         PR debug/86985
9340         * dwarf2out.c (is_c): New function.
9341         (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
9343 2018-09-13  Sam Tebbs  <sam.tebbs@arm.com>
9345         PR target/85628
9346         * config/aarch64/aarch64.md (*aarch64_bfxil):
9347         Define.
9348         * config/aarch64/constraints.md (Ulc): Define.
9349         * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
9350         Define.
9351         * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
9352         New function.
9354 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
9356         * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
9357         * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
9358         aarch64_layout_frame call.
9359         (aarch64_expand_epilogue): Likewise.
9360         (aarch64_initial_elimination_offset): Likewise.
9361         (aarch64_get_separate_components): Likewise.
9362         (aarch64_use_return_insn_p): Likewise.
9363         (aarch64_layout_frame): Remove unneeded check.
9365 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
9367         * configure.ac: Only append
9368         " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
9369         gcc_config_arguments if it was never reconfigured or last reconfigure
9370         was with different arguments.
9371         * configure: Regenerated.
9373 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
9374             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9376         PR middle-end/87290
9377         * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
9378         (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
9380 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
9382         PR tree-optimization/87287
9383         * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
9384         X % C == 0 to X % (unsigned) C == 0 optimization to ...
9385         * match.pd (X % C == 0): ... here.  New optimization.
9387 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
9389         PR middle-end/82853
9390         * expr.h (maybe_optimize_mod_cmp): Declare.
9391         * expr.c (mod_inv): New function.
9392         (maybe_optimize_mod_cmp): New function.
9393         (do_store_flag): Use it.
9394         * cfgexpand.c (expand_gimple_cond): Likewise.
9396 2018-09-09  Cesar Philippidis  <cesar@codesourcery.com>
9397             Julian Brown  <julian@codesourcery.com>
9399         PR middle-end/86336
9400         * gimplify.c (gimplify_scan_omp_clauses): Set
9401         target_firstprivatize_array_bases in OpenACC parallel and kernels
9402         region contexts.  Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
9403         OpenACC data regions.
9405 2018-09-12  Uros Bizjak  <ubizjak@gmail.com>
9407         * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
9408         (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
9410 2018-09-12  Richard Biener  <rguenther@suse.de>
9412         PR tree-optimization/87280
9413         * tree-ssa-sccvn.c (process_bb): Handle the case of executable
9414         edge but unreachable target.
9415         (do_rpo_vn): For conservatively handling a PHI only mark
9416         the backedge executable but not the block reachable.
9418 2018-09-12  Richard Biener  <rguenther@suse.de>
9420         PR tree-optimization/87266
9421         * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
9422         visited blocks.
9424 2018-09-12  Andreas Krebbel  <krebbel@linux.ibm.com>
9426         * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
9427         constants.
9428         ("trunc<BFP:mode><DFP_ALL:mode>2")
9429         ("trunc<DFP_ALL:mode><BFP:mode>2")
9430         ("extend<BFP:mode><DFP_ALL:mode>2")
9431         ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
9432         according to the target operand type.
9434 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
9435             Andreas Krebbel  <krebbel@linux.ibm.com>
9437         PR tree-optimization/86844
9438         * gimple-ssa-store-merging.c
9439         (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
9440         there are any overlapping stores in between them, make sure they are
9441         also coalesced or we give up completely.
9443 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
9445         PR middle-end/87248
9446         * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
9447         BIT_AND_EXPR's second operand is a power of two.  Formatting fix.
9449 2018-09-12  Tom de Vries  <tdevries@suse.de>
9451         * common.opt (gdescribe-dies): Add option.
9452         * dwarf2out.c (add_name_and_src_coords_attributes): Add description
9453         attribute for artifical and nameless decls.
9454         (dwarf2out_register_external_die): Add description attribute to
9455         external reference die.
9456         (add_desc_attribute): New functions.
9457         (gen_subprogram_die): Add description attribute to
9458         DW_TAG_call_site_parameter.
9459         * tree-pretty-print.c (print_generic_expr_to_str): New function.
9460         * tree-pretty-print.h (print_generic_expr_to_str): Declare.
9461         * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
9462         -gno-describe-dies.
9463         (@item -gdescribe-dies): Add.
9465 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
9467         * tree-vrp.c (vrp_shift_undefined_p): Remove.
9468         (extract_range_from_binary_expr_1: Call
9469         wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
9470         * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
9471         depend on sign.
9473 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
9475         * gimple-ssa-warn-alloca.c
9476         (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
9477         field for ALLOCA_BOUND_*_LARGE.
9479 2018-09-11  Nathan Sidwell  <nathan@acm.org>
9481         * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
9483 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
9485         * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
9486         for clobbers.  Remove obsolete comment.
9488 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
9490         * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
9491         mpxchk, mpxld and mpxst types.
9492         (define_attr length_immediate): Remove all processing of mpx types.
9493         (define_attr prefix_0f): Ditto.
9494         (define_attr memory): Ditto.
9496 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
9498         * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
9499         (log<mode>2): Change operand 1 predicate to general_operand.
9500         Extend operand 1 to XFmode and generate logxf3 insn.
9501         (log10<mode>2): Change operand 1 predicate to general_operand.
9502         Extend operand 1 to XFmode and generate log10xf3 insn.
9503         (log2<mode>2): Change operand 1 predicate to general_operand.
9504         Extend operand 1 to XFmode and generate log2xf3 insn.
9505         (fyl2xp1_extend<mode>xf3_i387): Remove.
9506         (log1p<mode>2): Change operand 1 predicate to general_operand.
9507         Extend operand 1 to XFmode and generate log1pxf3 insn.
9508         (fxtract_extend<mode>xf3_i387): Remove.
9509         (logb<mode>2): Change operand 1 predicate to general_operand.
9510         Extend operand 1 to XFmode and generate logbxf3 insn.
9511         (ilogb<mode>2): Change operand 1 predicate to general_operand.
9512         Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
9513         (significand<mode>2): Change operand 1 predicate to general_operand.
9514         Extend operand 1 to XFmode and generate significandxf3 insn.
9516 2018-09-11  Nathan Sidwell  <nathan@acm.org>
9518         * gcc.c (perror_with_name, pfatal_with_name): Delete.
9519         (load_specs): Use fatal_error.
9520         (DELETE_IF_ORDINARY, process_command): Use error.
9521         (execute, run_attempt): Use fatal_error.
9523 2018-09-11  Andrew Stubbs  <ams@codesourcery.com>
9525         * diagnostic-core.h (sorry_at): New prototype.
9526         * diagnostic.c (sorry_at): New function.
9528 2018-09-11  Aldy Hernandez  <aldyh@redhat.com>
9530         * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
9531         by zero as VR_UNDEFINED.
9533 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
9535         * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
9536         (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
9537         (<sincos>mode2): New expander.
9538         (sincos_extend<mode>xf3_i387): Remove insn pattern.
9539         (sincos -> sin, cos splitters): Remove splitter patterns.
9540         (sincos<mode>3): Change operand 2 predicate to general_operand.
9541         Extend operand 2 to XFmode and generate sincosxf3 insn.
9542         (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
9543         Change operand 3 predicate to const1_operand.
9544         (fptan_extend<mode>xf4_i387): Remove insn pattern.
9545         (tanxf2): Update operands in the call to fptanxf4_i387.
9546         (tan<mode>2): Change operand 1 predicate to general_operand.
9547         Extend operand 1 to XFmode and generate tanxf3 insn.
9548         (atan2xf3): Rename from *fpatanxf3_i387.
9549         (fpatan_extend<mode>xf3_i387): Remove insn pattern.
9550         (atan2xf3): Remove expander.
9551         (atan2<mode<3):  Change operand 1 and 2 predicates to general_operand.
9552         Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
9553         (atan<mode>2): Change operand 1 predicate to general_operand.
9554         Extend operand 1 to XFmode and generate atanxf3 insn.
9556 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
9558         * config/i386/i386.md (x87/SSE constant load splitter): Use
9559         memory_operand instead of nonimmediate_operand for input operand
9560         predicate.
9562 2018-09-09  Uros Bizjak  <ubizjak@gmail.com>
9564         * config/i386/i386.md (float partial SSE register stall splitter): Move
9565         splitter near its instruction pattern.
9566         (float_extend partial SSE register stall splitter): Ditto.
9567         (float_truncate partial SSE register stall splitter): Ditto.
9569 2018-09-09  Hans-Peter Nilsson  <hp@bitrange.com>
9571         PR target/86794
9572         * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
9573         to speculation_safe_value_not_needed.
9575         PR target/85666
9576         * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
9577         non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
9578         (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
9579         leaf_function_p, instead use has_hard_reg_initial_val.
9581 2018-09-09  Nathan Sidwell  <nathan@acm.org>
9583         * gcc.h (pfatal_with_name): Don't declare here.
9584         * gcc.c (pfatal_with_name): Make static.
9586 2018-09-09  Xianmiao Qu  <xianmiao_qu@c-sky.com>
9588         * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
9589         earlyclobber.
9591 2018-09-08  John David Anglin  <danglin@gcc.gnu.org>
9593         PR rtl-optimization/85458
9594         * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
9595         priority hook to reduce the priority of EXPR.
9597 2018-09-07  Uros Bizjak  <ubizjak@gmail.com>
9599         * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
9600         DImode for x87 on 32bit targets.  Conditionally disable x87 modes
9601         with X87_ENABLE_FLOAT.  Remove preparation code.
9602         (*float<SWI48:mode><MODEF:mode>2): Rename from
9603         *float<SWI48:mode><MODEF:mode>2_mixed.  Handle x87, SSE and mixed
9604         math using "enabled" attribute.
9605         (*floatdi<MODEF:mode>2_i387): Rename from
9606         *float<SWI48x:mode><MODEF:mode>2_i387.  Handle only DImode and
9607         enable for 32bit targets only.
9608         (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
9609         splitter.
9610         (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
9611         as operand 1 predicate.  Rewrite as define_insn_and_split.
9612         (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
9614 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
9616         * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
9617         to fallthru to FLOAT case.
9619 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
9621         PR target/86731
9622         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
9623         around folding of vec_sl to handle out of range shift values.
9625 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
9627         * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
9628         Update callers to gen_fix_trunc<mode>_i387_fisttp
9629         (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
9630         nonimmediate_operand.
9631         (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
9632         and corresponding splitters.
9633         (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
9634         (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
9635         (fix_truncdi_i387_with_temp): Remove insn pattern
9636         and corresponding splitters.
9637         (fix_trunc<mode>_i387): Change operand 0 predicate to
9638         nonimmediate_operand.
9639         (fix_trunc<mode>_i387_with_temp): Remove insn pattern
9640         and corresponding splitters.
9641         (*fistdi2_1): Remove.
9642         (fistdi2): Ditto.
9643         (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
9644         (lrintxfdi2): Remove expander.  Reimplement as define_insn.
9645         (*fist<mode>2_1): Remove.
9646         (fist<mode>2): Ditto.
9647         (fist<mode>2_with_temp): Remove insn pattern and corresponding
9648         splitters.
9649         (lrintxf<mode>2): Remove expander.  Reimplement as define_insn.
9650         (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
9651         (fistdi2_<rounding>): Change operand 0 predicate to
9652         nonimmediate_operand.
9653         (fistdi2_<rounding>_with_temp): Remove insn pattern
9654         and corresponding splitters.
9655         (fist<mode>2_<rounding>): Change operand 0 predicate to
9656         nonimmediate_operand.
9657         (fist<mode>2_<rounding>_with_temp): Remove insn pattern
9658         and corresponding splitters.
9660         (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
9662 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9664         * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
9665         the init value.
9667 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
9669         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
9670         early gimple folding of vec_splat().
9671         * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
9672         * gimple-fold.h: Add an extern define for tree_vec_extract().
9674 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
9676         * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
9677         wrappers around TREE_TYPE comparisons.
9679 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
9681         PR target/80080
9682         * config/s390/predicates.md: Add nonsym_memory_operand.
9683         * config/s390/s390.c (s390_legitimize_cs_operand): If operand
9684         contains a SYMBOL_REF, load it into an intermediate pseudo.
9685         (s390_emit_compare_and_swap): Legitimize operand.
9686         * config/s390/s390.md: Use the new nonsym_memory_operand
9687         with UNSPECV_CAS patterns.
9689 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
9691         PR target/80080
9692         * config/s390/s390-passes.def: New file.
9693         * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
9694         declaration.
9695         (make_pass_s390_early_mach): Add declaration.
9696         * config/s390/s390.c (make_pass_s390_early_mach):
9697         (s390_option_override): Remove dynamic registration.
9698         * config/s390/t-s390: Add s390-passes.def.
9700 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
9702         * config/s390/s390.c (s390_decompose_constant_pool_ref):
9703         Remove UNSPEC_LTREL_BASE check.
9704         (annotate_constant_pool_refs): Likewise.
9705         (find_constant_pool_ref): Likewise.
9706         (find_ltrel_base): Removed.
9707         (replace_ltrel_base): Removed.
9708         (s390_mainpool_finish): Remove replace_ltrel_base call.
9709         (s390_chunkify_start): Remove pending LTREL_BASE logic.
9710         (s390_chunkify_finish): Remove replace_ltrel_base call.
9711         * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
9713 2018-09-06  Hans-Peter Nilsson  <hp@axis.com>
9715         PR target/86779
9716         * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
9717         to speculation_safe_value_not_needed.
9719 2018-09-05  Cesar Philippidis  <cesar@codesourcery.com>
9720             Bernd Schmidt  <bernds_cb1@t-online.de>
9722         * config/nvptx/nvptx-opts.h: New file.
9723         * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
9724         * config/nvptx/nvptx.h: Include "nvptx-opts.h".
9725         (ASM_SPEC): Define.
9726         (TARGET_SM35): New macro.
9727         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
9728         correct predicate.
9729         * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
9730         values.
9731         (misa=): New option.
9732         * doc/invoke.texi (Nvidia PTX Options): Document -misa.
9734 2018-09-05  Uros Bizjak  <ubizjak@gmail.com>
9736         * config/i386/i386.md (truncdfsf2): Remove expander.
9737         (truncdfsf2_with_temp): Ditto.
9738         (truncxf<mode>2): Ditto.
9739         (*truncdfsf_fast_mixed): Remove insn pattern.
9740         (*truncdfsf_fast_i387): Ditto.
9741         (*truncdfsf_mixed): Ditto.
9742         (*truncdfsf_i387): Ditto.
9743         (*truncdfsf2_i387_1): Ditto.
9744         (*truncxfsf2_mixed): Ditto.
9745         (*truncxfdf2_mixed): Ditto.
9746         (*truncxf<mode>2_i387_noop): Ditto. Update callers
9747         to call gen_truncxf<mode>2 instead.
9748         (*truncxf<mode>2_i387): Remove.
9749         (reg->reg splitters): Remove splitter pattern.
9750         (reg->mem splitters): Ditto.
9752         (truncdfsf2): New insn pattern.
9753         (truncxf<mode>2): Ditto.
9755 2018-09-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9757         * tree-ssa-math-opts.c (is_mult_by): New function.
9758         (is_square_of): Use the above.
9759         (optimize_recip_sqrt): New function.
9760         (pass_cse_reciprocals::execute): Use the above.
9762 2018-09-05  Richard Biener  <rguenther@suse.de>
9764         PR bootstrap/87134
9765         * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
9766         to zero-init the emplaced vec.
9768 2018-09-05  Martin Liska  <mliska@suse.cz>
9770         PR tree-optimization/87205
9771         * tree-switch-conversion.c (pass_lower_switch::execute):
9772         Group cases for switch statements.
9774 2018-09-05  Richard Biener  <rguenther@suse.de>
9776         PR tree-optimization/87217
9777         * tree-ssa-sccvn.c (vuse_valueize): New.
9778         (vn_reference_lookup_pieces): Use it.
9779         (vn_reference_lookup): Likewise.
9781 2018-09-05  Nathan Sidwell  <nathan@acm.org>
9783         PR c++/87137
9784         * stor-layout.c (place_field): Scan forwards to check last
9785         bitfield when ms_bitfield_placement is in effect.
9787 2018-09-05  Richard Biener  <rguenther@suse.de>
9789         PR bootstrap/87225
9790         * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
9791         return.
9793 2018-09-05  Siddhesh Poyarekar  <siddhesh@sourceware.org>
9794             Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
9796         * config/aarch64/falkor-tag-collision-avoidance.c: New file.
9797         * config.gcc (extra_objs): Build it.
9798         * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
9799         Likewise.
9800         * config/aarch64/aarch64-passes.def
9801         (pass_tag_collision_avoidance): New pass.
9802         * config/aarch64/aarch64.c (qdf24xx_tunings): Add
9803         AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
9804         (aarch64_classify_address): Remove static qualifier.
9805         (aarch64_address_info, aarch64_address_type): Move to...
9806         * config/aarch64/aarch64-protos.h: ... here.
9807         (make_pass_tag_collision_avoidance): New function.
9808         * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
9809         New tuning flag.
9811 2018-09-05  Martin Liska  <mliska@suse.cz>
9813         * doc/gcov.texi: Update documentation of humar
9814         readable mode.
9815         * gcov.c (format_count): Print one decimal place, it provides
9816         more fine number of situations like '1G' vs. '1.4G'.
9818 2018-09-05  Martin Liska  <mliska@suse.cz>
9820         PR target/87164
9821         * config/rs6000/rs6000.opt: Mark the option as Deprecated.
9822         * optc-gen.awk: Allow 'Var' for Deprecated options in order
9823         to generate a MASK value.
9825 2018-09-04  H.J. Lu  <hongjiu.lu@intel.com>
9827         PR debug/86593
9828         * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
9829         if frame pointer isn't used.
9830         (compute_frame_pointer_to_fb_displacement): Likewise.
9832 2018-09-04  Jakub Jelinek  <jakub@redhat.com>
9834         PR target/87198
9835         * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
9836         OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
9837         OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
9838         (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
9839         and OPTION_MASK_ISA_XSAVEC_UNSET.
9841 2018-09-04  Max Filippov  <jcmvbkbc@gmail.com>
9843         * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
9844         XOR operations in NAND case.
9846 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
9848         * wide-int-range.cc (wide_int_range_convert): New.
9849         * wide-int-range.h (wide_int_range_convert): New.
9850         * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
9851         code into wide_int_range_convert.
9852         (extract_range_into_wide_ints): Do not munge anti range constants
9853         into the entire domain.  Just return the range back.
9855 2018-09-04  Martin Liska  <mliska@suse.cz>
9857         * genmatch.c (output_line_directive): Add new argument
9858         fnargs.
9859         (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
9861 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
9863         * doc/invoke.texi (Option Summary): Add whitespace.
9865         * doc/invoke.texi (Option Summary): Add -Waligned-new.
9867 2018-09-04  Richard Biener  <rguenther@suse.de>
9869         PR tree-optimization/87211
9870         * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
9871         backedge value we're supposed to treat as VARYING also number
9872         the PHI to VARYING in case it got a different value-number already.
9874 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
9876         * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
9877         (extract_range_from_binary_expr_1): Do not call
9878         vrp_can_optimize_bit_op.
9879         * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
9880         static.
9881         (wide_int_range_get_mask_and_bounds): New.
9882         (wide_int_range_optimize_bit_op): New.
9883         (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
9884         (wide_int_range_bit_and): Same.
9885         * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
9886         (wide_int_range_optimize_bit_op): New.
9887         (wide_int_range_get_mask_and_bounds): New.
9889 2018-09-04  Richard Biener  <rguenther@suse.de>
9891         PR tree-optimization/87176
9892         * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
9893         variable.  When value-numbering a virtual PHI node make sure
9894         to not value-number to the backedge value.
9896 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
9898         * doc/extend.texi (Long Long, Hex Floats): Document support for
9899         long long and hex floats in more recent versions of ISO C++.
9901 2018-09-03  Richard Biener  <rguenther@suse.de>
9903         PR tree-optimization/87177
9904         * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
9905         cleanup.
9907 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
9909         * bb-reorder.c (edge_order): Convert to C-qsort-style
9910         tri-state comparator.
9911         (reorder_basic_blocks_simple): Change std::stable_sort to
9912         gcc_stablesort.
9914 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
9916         * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
9917         tri-state comparator.
9918         (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
9920 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
9922         * sort.cc (struct sort_ctx): New field 'nlim'.  Use it...
9923         (mergesort): ... here as maximum count for using netsort.
9924         (gcc_qsort): Set nlim to 3 if stable sort is requested.
9925         (gcc_stablesort): New.
9926         * system.h (gcc_stablesort): Declare.
9928 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
9930         * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
9931         * system.h (qsort): Always redirect to gcc_qsort.  Update comment.
9932         * vec.c (qsort_chk): Do not call gcc_qsort.  Update comment.
9934 2018-09-03  Segher Boessenkool  <segher@kernel.crashing.org>
9936         * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
9937         lxsdx and stxsdx alternatives.
9938         (*mov<mode>_hardfloat64): Ditto.
9939         * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
9941 2018-09-03  Richard Biener  <rguenther@suse.de>
9943         PR tree-optimization/87200
9944         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
9945         simplify result.
9947 2018-09-03  Martin Liska  <mliska@suse.cz>
9949         PR tree-optimization/87201
9950         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
9951         Fix parenthesis in an expression.
9953 2018-09-03  Richard Biener  <rguenther@suse.de>
9955         PR tree-optimization/87197
9956         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
9957         visited.  CSE the VN_INFO hashtable lookup.
9959         PR tree-optimization/87169
9960         * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
9961         iterating make sure there's no extra backedges from irreducible
9962         regions feeding the header.  Mark the destination block
9963         executable.
9965 2018-09-03  Martin Liska  <mliska@suse.cz>
9967         PR driver/83193
9968         * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
9969         * common/common-targhooks.c (default_get_valid_option_values):
9970         New function.
9971         * common/common-targhooks.h (default_get_valid_option_values):
9972         Likewise.
9973         * common/config/i386/i386-common.c: Move processor_target_table
9974         from i386.c.
9975         (ix86_get_valid_option_values): New function.
9976         (TARGET_GET_VALID_OPTION_VALUES): New macro.
9977         * config/i386/i386.c (struct ptt): Move to i386-common.c.
9978         (PTA_*): Move all defined masks into i386-common.c.
9979         (ix86_function_specific_restore): Use new processor_cost_table.
9980         * config/i386/i386.h (struct ptt): Moved from i386.c.
9981         (struct pta): Likewise.
9982         * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
9983         * doc/tm.texi.in: Likewise.
9984         * opt-suggestions.c (option_proposer::suggest_option):
9985         Pass prefix to build_option_suggestions.
9986         (option_proposer::get_completions): Likewise.
9987         (option_proposer::build_option_suggestions): Use the new target
9988         hook.
9989         * opts.c (struct option_help_tuple): New struct.
9990         (print_filtered_help): Use the new target hook.
9992 2018-09-03  Martin Liska  <mliska@suse.cz>
9994         PR middle-end/59521
9995         * predict.c (set_even_probabilities): Add likely_edges
9996         argument and handle cases where we have precisely one
9997         likely edge.
9998         (combine_predictions_for_bb): Catch also likely_edges.
9999         (tree_predict_by_opcode): Handle gswitch statements.
10000         * tree-cfg.h (find_case_label_for_value): New declaration.
10001         (find_taken_edge_switch_expr): Likewise.
10002         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
10003         Find pivot in decision tree based on probabily, not by number of
10004         nodes.
10006 2018-09-02  Gerald Pfeifer  <gerald@pfeifer.com>
10008         * doc/standards.texi (Standards): Update Objective-C reference.
10010 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
10012         * doc/install.texi (Prerequisites): Update link for MPC.
10014 2018-09-01  Michael Matz  <matz@suse.de>
10016         PR tree-optimization/87074
10017         * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
10018         PHIs for outer-loop uses.
10020 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
10022         * doc/generic.texi (OpenMP): Adjust link to openmp.org.
10023         * doc/invoke.texi (C Dialect Options): Ditto.
10025 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
10027         * doc/install.texi (Prerequisites): Adjust link mpfr.org.
10029 2018-08-31  Richard Biener  <rguenther@suse.de>
10031         PR tree-optimization/87168
10032         * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
10033         (rpo_elim::eliminate_avail): When OP was not visited it must
10034         be available.
10036 2018-08-31  David Malcolm  <dmalcolm@redhat.com>
10038         * tree-vrp.c (copy_value_range): Convert param "from" from
10039         "value_range *" to "const value_range *".
10040         (range_is_null): Likewise for param "vr".
10041         (range_int_cst_p): Likewise.
10042         (range_int_cst_singleton_p): Likewise.
10043         (symbolic_range_p): Likewise.
10044         (value_ranges_intersect_p): Likewise for both params.
10045         (value_range_nonnegative_p): Likewise for param "vr".
10046         (value_range_constant_singleton): Likewise.
10047         (vrp_set_zero_nonzero_bits): Likewise for param "ar".
10048         (extract_range_into_wide_ints): Likewise for param "vr".
10049         (extract_range_from_multiplicative_op): Likewise for params "vr0"
10050         and "vr1".
10051         (vrp_can_optimize_bit_op): Likewise.
10052         (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
10053         "vr1_".
10054         (extract_range_from_unary_expr): Likewise.
10055         (debug_value_range): Likewise for param "vr".
10056         (value_range::dump): Add "const" qualifier.
10057         (vrp_prop::check_array_ref): Convert local "vr" from
10058         "value_range *" to "const value_range *".
10059         (vrp_prop::check_mem_ref): Likewise.
10060         (vrp_prop::visit_stmt): Likewise for local "old_vr".
10061         (vrp_intersect_ranges_1): Likewise for param "vr_1".
10062         (vrp_intersect_ranges): Likewise.
10063         (simplify_stmt_for_jump_threading): Likewise for local "vr".
10064         (vrp_prop::vrp_finalize): Likewise.
10065         * tree-vrp.h (value_range::dump): Add "const" qualifier.
10066         (vrp_intersect_ranges): Add "const" qualifier to params as above.
10067         (extract_range_from_unary_expr): Likewise.
10068         (value_range_constant_singleton): Likewise.
10069         (symbolic_range_p): Likewise.
10070         (copy_value_range): Likewise.
10071         (extract_range_from_binary_expr_1): Likewise.
10072         (range_int_cst_p): Likewise.
10073         (vrp_set_zero_nonzero_bits): Likewise.
10074         (range_int_cst_singleton_p): Likewise.
10076 2018-08-31  Vlad Lazar  <vlad.lazar@arm.com>
10078         * config/aarch64/arm_neon.h (vabsd_s64): New.
10079         (vnegd_s64): Likewise.
10081 2018-08-31  Martin Jambor  <mjambor@suse.cz>
10083         * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
10085 2018-08-31  Martin Liska  <mliska@suse.cz>
10087         * ipa-icf.c (sem_item::add_type): Use
10088         sem_item::m_type_hash_cache.
10089         * ipa-icf.h: Move the cache from sem_item_optimizer
10090         to sem_item.
10092 2018-08-31  Nathan Sidwell  <nathan@acm.org>
10094         * doc/extend.texi (Backwards Compatibility): Remove implicit
10095         extern C leeway of () being (...).
10097 2018-08-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10099         * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
10101 2018-08-31  Segher Boessenkool  <segher@kernel.crashing.org>
10103         PR target/86684
10104         PR target/87149
10105         * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
10107 2018-08-31  Jakub Jelinek  <jakub@redhat.com>
10109         PR middle-end/87138
10110         * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
10111         gen_int_mode.  Formatting fixes.
10113 2018-08-30  Sandra Loosemore  <sandra@codesourcery.com>
10115         * target.def (custom_function_descriptors): Improve documentation.
10116         * doc/tm.texi.in (Trampolines): Expand discussion of function
10117         descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
10118         beginning of the section.
10119         * doc/tm.texi: Regenerated.
10121 2018-08-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
10123         * cfg.h (class auto_edge_flag): Spell out the template-id of the
10124         base class in the initializer list.  This is a workaround for
10125         building with older GCC.
10126         (class auto_bb_flag): Likewise.
10128 2018-08-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
10130         * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
10131         (altivec_vcmpequ<VI_char>_p): Remove star.
10132         * config/rs6000/rs6000-string.c (do_load_for_compare): Support
10133         vector load modes.
10134         (expand_strncmp_vec_sequence): New function.
10135         (emit_final_str_compare_vec): New function.
10136         (expand_strn_compare): Add support for vector strncmp.
10137         * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
10138         length specification to bytes.
10139         * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
10140         (vcmpnezb_p): New pattern.
10141         * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
10142         for option -mstring-compare-inline-limit.
10144 2018-08-30  Thiago Macieira  <thiago.macieira@intel.com>
10146         * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
10147         (PTA_SKYLAKE): Add PTA_AES.
10148         (PTA_GOLDMONT): Likewise.
10150 2018-08-29  Jan Hubicka  <jh@suse.cz>
10152         PR lto/86517
10153         * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
10154         * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
10156 2018-08-29  Jan Hubicka  <jh@suse.cz>
10158         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
10159         TYPE_STUB_DECL.
10160         (hash_tree): Do not visit TYPE_STUB_DECL.
10161         * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
10162         stream TYPE_STUB_DECL.
10163         * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
10164         * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
10165         after free_lang_data.
10166         (type_in_anonymous_namespace_p): Likewise.
10168 2018-08-29  Jan Hubicka  <jh@suse.cz>
10170         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
10171         comment that it has to be even number.
10172         (class sreal): Change m_sig type to int32_t.
10173         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
10174         int64_t for temporary calculations.
10175         (sreal_verify_basics): Drop one bit from minimum and maximum.
10177 2018-08-30  Richard Biener  <rguenther@suse.de>
10179         PR tree-optimization/87147
10180         * tree-ssa-sccvn.c (SSA_VISITED): New function.
10181         (visit_phi): When the degenerate result is from the backedge and
10182         we didn't visit its definition yet drop to VARYING.
10183         (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
10185 2018-08-29  Jan Hubicka  <jh@suse.cz>
10187         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
10188         DECL_VINDEX.
10189         (hash_tree): Likewise.
10191 2018-08-29  Jan Hubicka  <jh@suse.cz>
10193         * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
10194         and TYPE_NEXT_REF_TO.
10196 2018-08-29  Jan Hubicka  <jh@suse.cz>
10198         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
10199         comment that it has to be even number.
10200         (class sreal): Change m_sig type to int32_t.
10201         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
10202         int64_t for temporary calculations.
10203         (sreal_verify_basics): Drop one bit from minimum and maximum.
10205 2018-08-30  Tamar Christina  <tamar.christina@arm.com>
10207         * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
10209 2018-08-30  Vlad Lazar  <vlad.lazar@arm.com>
10211         PR middle-end/86995
10212         * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
10213         if to_add is negative.
10215 2018-08-29  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10217         PR middle-end/87053
10218         * builtins.c (c_strlen): Improve range checks.
10220 2018-08-29  Martin Sebor  <msebor@redhat.com>
10221             Jeff Law  <law@redhat.com>
10223         PR tree-optimization/86714
10224         PR tree-optimization/86711
10225         * builtins.c (c_strlen): Add arguments to call to string_constant.
10226         * expr.c (string_constant): Add argument.  Detect missing nul
10227         terminator and outermost declaration it's missing in.
10228         * expr.h (string_constant): Add argument.
10229         * fold-const.c (read_from_constant_string): Add arguments to call to
10230         string_constant.
10231         (c_getstr): Likewise.
10232         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
10233         to string_constant.
10234         * tree-ssa-strlen.c (get_stridx): Likewise.
10236 2018-08-29  Jan Hubicka  <jh@suse.cz>
10238         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
10239         Do not stream DECL_VINDEX.
10240         * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
10241         * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
10242         (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
10244 2018-08-29  Richard Biener  <rguenther@suse.de>
10246         * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
10247         virtual operands that are not default defs to honor region
10248         boundaries.
10249         (rpo_vn_valueize): Remove ineffective code here.
10251 2018-08-29  Richard Biener  <rguenther@suse.de>
10253         PR tree-optimization/87132
10254         * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
10255         when skipping defs reachable over backedges.
10257 2018-08-29  Richard Biener  <rguenther@suse.de>
10259         * tree-core.h: Document use of deprecated_flag in SSA_NAME.
10260         * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
10261         * tree-into-ssa.c (pass_build_ssa::execute): Initialize
10262         function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
10263         * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
10264         (vn_reference_lookup_3): Remove use of const_parms.
10265         (free_rpo_vn): Do not free const_parms.
10266         (do_rpo_vn): Do not call init_const_parms.
10267         * tree-ssa-alias.c (refs_may_alias_p_1): Honor
10268         SSA_NAME_POINTS_TO_READONLY_MEMORY.
10269         (call_may_clobber_ref_p_1): Likewise.
10271 2018-08-29  Alexander Monakov  <amonakov@ispras.ru>
10273         PR other/86726
10274         * invoke.texi (Optimization Options): List -ftree-scev-cprop.
10275         (-O): Ditto.
10276         (-ftree-scev-cprop): Document.
10278 2018-08-29  Jan Hubicka  <jh@suse.cz>
10280         * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
10281         parameters.
10282         (sreal constructor): Update.
10283         * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
10284         sreal:operator/): Update.
10286 2018-08-29  Martin Liska  <mliska@suse.cz>
10288         * tree-switch-conversion.c (switch_conversion::expand):
10289         Strenghten assumption about gswitch statements.
10291 2018-08-29  Richard Biener  <rguenther@suse.de>
10293         PR tree-optimization/87117
10294         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
10295         re-value-number released SSA VDEFs.
10297 2018-08-29  Richard Biener  <rguenther@suse.de>
10299         PR tree-optimization/87126
10300         * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
10302 2018-08-28  Jim Wilson  <jimw@sifive.com>
10304         * config/riscv/pic.md: Rewrite.
10305         * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
10306         invalid address.
10307         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
10308         (SOFTF, default_load, softload, softstore): New.
10310 2018-08-28  Jeff Law  <law@redhat.com>
10312         * fold-const.c (fold_binary_loc): Remove recently added assert.
10314 2018-08-28  Joern Rennecke  <joern.rennecke@riscy-ip.com>
10316         * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
10317         to OP parmeter of generated function.
10319 2018-08-28  MCC CS  <deswurstes@users.noreply.github.com>
10321         PR tree-optimization/87009
10322         * match.pd: Add boolean optimizations.
10324 2018-08-28  Martin Sebor  <msebor@redhat.com>
10326         PR middle-end/86631
10327         * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
10328         * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
10329         (pass_walloca::gate): Use it.
10330         (alloca_call_type): Same.
10331         (pass_walloca::execute): Same.
10332         * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
10334 2018-08-28  David Malcolm  <dmalcolm@redhat.com>
10336         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
10337         GCC_VERSION for usage of "__gcc_dump_printf__" format from
10338         >= 3005 to >= 9000.
10340 2018-08-28  Richard Biener  <rguenther@suse.de>
10342         PR tree-optimization/87124
10343         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
10344         constants before looking up avail.
10346 2018-08-28  Jakub Jelinek  <jakub@redhat.com>
10348         PR middle-end/87099
10349         * calls.c (maybe_warn_nonstring_arg): Punt early if
10350         warn_stringop_overflow is zero.  Don't call get_range_strlen
10351         on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
10352         Swap comparison operands to have constants on rhs.  Only use
10353         lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
10354         increment lenrng[0].
10356 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
10358         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
10359         use of tree_to_shwi.  Remove duplicated test for the size being
10360         a whole number of bytes.
10362 2018-08-28  Richard Biener  <rguenther@suse.de>
10364         PR tree-optimization/87117
10365         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
10366         Handle removed stmt without LHS (GIMPLE_NOP).
10368 2018-08-28  Richard Biener  <rguenther@suse.de>
10370         PR tree-optimization/87117
10371         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
10372         void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
10374 2018-08-28  Richard Biener  <rguenther@suse.de>
10376         PR tree-optimization/87117
10377         * tree-ssa-pre.c (compute_avail): Do not make expressions
10378         with predicated values available.
10379         (get_expr_value_id): Assert we do not run into predicated value
10380         expressions.
10382 2018-08-28  Richard Biener  <rguenther@suse.de>
10384         PR tree-optimization/87117
10385         * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
10386         get virtual operands.
10387         (get_expr_operands): Handle STRING_CST like other decls.
10389 2018-08-28  Martin Liska  <mliska@suse.cz>
10391         * tree.h: Update documentation of fndecl_built_in_p
10392         functions.
10395 2018-08-27  Jeff Law  <law@redhat.com>
10396         PR tree-optimization/87110
10397         * tree-ssa-dse.c (compute_trims): Handle non-constant
10398         TYPE_SIZE_UNIT.
10400 2018-08-27  Martin Sebor  <msebor@redhat.com>
10402         PR tree-optimization/86914
10403         * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
10405 2018-08-27  Martin Sebor  <msebor@redhat.com>
10407         PR tree-optimization/87112
10408         * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
10409         the type of the bound argument.
10411 2018-08-27  Jeff Law  <law@redhat.com>
10413         * tree-ssa-dse.c (compute_trims): Handle case where the reference's
10414         type does not have a TYPE_SIZE_UNIT.
10416 2018-08-27  Steve Ellcey  <sellcey@cavium.com>
10418         * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
10419         with include of backend.h.
10421 2018-08-27  Richard Biener  <rguenther@suse.de>
10423         PR tree-optimization/86927
10424         * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
10425         use const cond reduction code.
10427 2018-08-27  Alexander Monakov  <amonakov@ispras.ru>
10429         PR tree-optimization/85758
10430         * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
10432 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
10434         PR c++/87091
10435         * diagnostic-show-locus.c (class layout_range): Update for
10436         conversion of show_caret_p to a tri-state.
10437         (layout_range::layout_range): Likewise.
10438         (make_range): Likewise.
10439         (layout::maybe_add_location_range): Likewise.
10440         (layout::should_print_annotation_line_p): Don't show annotation
10441         lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
10442         (layout::get_state_at_point): Update for conversion of
10443         show_caret_p to a tri-state.  Bail out early for
10444         SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
10445         underlining or source colorization.
10446         (gcc_rich_location::add_location_if_nearby): Update for conversion
10447         of show_caret_p to a tri-state.
10448         (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
10449         (selftest::test_one_liner_fixit_replace_equal_secondary_range):
10450         Likewise.
10451         (selftest::test_one_liner_labels): Likewise.
10452         * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
10453         conversion of show_caret_p to a tri-state.
10454         * pretty-print.c (text_info::set_location): Likewise.
10455         * pretty-print.h (text_info::set_location): Likewise.
10456         * substring-locations.c (format_warning_n_va): Likewise.
10457         * tree-diagnostic.c (default_tree_printer): Likewise.
10458         * tree-pretty-print.c (newline_and_indent): Likewise.
10460 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
10462         PR c++/87091
10463         * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
10464         line above for line-insertion fix-it hints.
10465         (selftest::test_fixit_insert_containing_newline): Update the
10466         expected results, and add a test with line-numbering enabled.
10468 2018-08-27  Martin Liska  <mliska@suse.cz>
10470         PR sanitizer/86962
10471         * sanopt.c (sanitize_rewrite_addressable_params): Ignore
10472         params with DECL_HAS_VALUE_EXPR_P.
10474 2018-08-27  Martin Liska  <mliska@suse.cz>
10476         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
10477         selected expansion strategy.
10479 2018-08-27  Martin Liska  <mliska@suse.cz>
10481         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
10482         * builtins.c (is_builtin_fn): Likewise.
10483         * attribs.c (diag_attr_exclusions): Use new function
10484         fndecl_built_in_p and remove check for FUNCTION_DECL if
10485         possible.
10486         (builtin_mathfn_code): Likewise.
10487         (fold_builtin_expect): Likewise.
10488         (fold_call_expr): Likewise.
10489         (fold_builtin_call_array): Likewise.
10490         (fold_call_stmt): Likewise.
10491         (set_builtin_user_assembler_name): Likewise.
10492         (is_simple_builtin): Likewise.
10493         * calls.c (gimple_alloca_call_p): Likewise.
10494         (maybe_warn_nonstring_arg): Likewise.
10495         * cfgexpand.c (expand_call_stmt): Likewise.
10496         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
10497         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
10498         (cgraph_node::verify_node): Likewise.
10499         * cgraphclones.c (build_function_decl_skip_args): Likewise.
10500         (cgraph_node::create_clone): Likewise.
10501         * config/arm/arm.c (arm_insert_attributes): Likewise.
10502         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
10503         * dse.c (scan_insn): Likewise.
10504         * expr.c (expand_expr_real_1): Likewise.
10505         * fold-const.c (operand_equal_p): Likewise.
10506         (fold_binary_loc): Likewise.
10507         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
10508         * gimple-low.c (lower_stmt): Likewise.
10509         * gimple-pretty-print.c (dump_gimple_call): Likewise.
10510         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
10511         Likewise.
10512         * gimple.c (gimple_build_call_from_tree): Likewise.
10513         (gimple_call_builtin_p): Likewise.
10514         (gimple_call_combined_fn): Likewise.
10515         * gimplify.c (gimplify_call_expr): Likewise.
10516         (gimple_boolify): Likewise.
10517         (gimplify_modify_expr): Likewise.
10518         (gimplify_addr_expr): Likewise.
10519         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
10520         * ipa-cp.c (determine_versionability): Likewise.
10521         * ipa-fnsummary.c (compute_fn_summary): Likewise.
10522         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
10523         * ipa-split.c (visit_bb): Likewise.
10524         (split_function): Likewise.
10525         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
10526         * lto-cgraph.c (input_node): Likewise.
10527         * lto-streamer-out.c (write_symbol): Likewise.
10528         * omp-low.c (setjmp_or_longjmp_p): Likewise.
10529         (lower_omp_1): Likewise.
10530         * predict.c (strip_predict_hints): Likewise.
10531         * print-tree.c (print_node): Likewise.
10532         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
10533         * trans-mem.c (is_tm_irrevocable): Likewise.
10534         (is_tm_load): Likewise.
10535         (is_tm_simple_load): Likewise.
10536         (is_tm_store): Likewise.
10537         (is_tm_simple_store): Likewise.
10538         (is_tm_abort): Likewise.
10539         (tm_region_init_1): Likewise.
10540         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
10541         * tree-cfg.c (verify_gimple_call): Likewise.
10542         (move_stmt_r): Likewise.
10543         (stmt_can_terminate_bb_p): Likewise.
10544         * tree-eh.c (lower_eh_constructs_2): Likewise.
10545         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
10546         * tree-inline.c (remap_gimple_stmt): Likewise.
10547         (copy_bb): Likewise.
10548         (estimate_num_insns): Likewise.
10549         (fold_marked_statements): Likewise.
10550         * tree-sra.c (scan_function): Likewise.
10551         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
10552         (optimize_stack_restore): Likewise.
10553         (pass_fold_builtins::execute): Likewise.
10554         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
10555         (mark_all_reaching_defs_necessary_1): Likewise.
10556         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
10557         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
10558         (pass_forwprop::execute): Likewise.
10559         * tree-ssa-loop-im.c (stmt_cost): Likewise.
10560         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
10561         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
10562         * tree-ssa-strlen.c (get_string_length): Likewise.
10563         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
10564         (find_func_aliases_for_call): Likewise.
10565         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
10566         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
10567         * tree-tailcall.c (find_tail_calls): Likewise.
10568         * tree.c (need_assembler_name_p): Likewise.
10569         (free_lang_data_in_decl): Likewise.
10570         (get_call_combined_fn): Likewise.
10571         * ubsan.c (is_ubsan_builtin_p): Likewise.
10572         * varasm.c (incorporeal_function_p): Likewise.
10573         * tree.h (DECL_BUILT_IN): Remove and replace with
10574         fndecl_built_in_p.
10575         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
10576         (fndecl_built_in_p): New.
10578 2018-08-27  Martin Liska  <mliska@suse.cz>
10580         PR tree-optimization/86847
10581         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
10582         Dump also subtree probability.
10583         (switch_decision_tree::do_jump_if_equal): New function.
10584         (switch_decision_tree::emit_case_nodes): Handle special
10585         situations in balanced tree that can be emitted much simpler.
10586         Fix calculation of probabilities that happen in tree expansion.
10587         * tree-switch-conversion.h (struct cluster): Add
10588         is_single_value_p.
10589         (struct simple_cluster): Likewise.
10590         (struct case_tree_node): Add new function has_child.
10591         (do_jump_if_equal): New.
10593 2018-08-27  Martin Liska  <mliska@suse.cz>
10595         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
10596         Add new argument to bit_test_cluster constructor.
10597         (bit_test_cluster::emit): Set bits really number of values
10598         handlel by a test.
10599         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
10600         probability argument.
10601         * tree-switch-conversion.h (struct bit_test_cluster):
10602         Add m_handles_entire_switch.
10604 2018-08-27  Martin Liska  <mliska@suse.cz>
10606         PR tree-optimization/86702
10607         * tree-switch-conversion.c (jump_table_cluster::emit):
10608         Make probabilities even for values in jump table
10609         according to number of cases handled.
10610         (switch_decision_tree::compute_cases_per_edge): Pass
10611         argument to reset_out_edges_aux function.
10612         (switch_decision_tree::analyze_switch_statement): Likewise.
10613         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
10614         Make it static.
10616 2018-08-27  Martin Liska  <mliska@suse.cz>
10618         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
10619         cfun argument explicitly.
10620         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
10621         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
10622         function gimple_switch_default_bb.
10623         (convert_switch_statements):
10624         (expand_builtins):
10625         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
10626         * stmt.c (label_to_block_fn): Use label_to_block and pass
10627         cfun argument explicitly and use gimple_switch_label_bb.
10628         (expand_case): Likewise.
10629         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
10630         cfun argument explicitly. Likewise.
10631         (make_edges_bb): Likewise.
10632         (make_cond_expr_edges): Likewise.
10633         (get_cases_for_edge): Likewise.
10634         (make_gimple_switch_edges): Likewise.
10635         (label_to_block_fn): Likewise.
10636         (label_to_block): Likewise.
10637         (make_goto_expr_edges): Likewise.
10638         (make_gimple_asm_edges): Likewise.
10639         (main_block_label): Likewise.
10640         (group_case_labels_stmt): Likewise.
10641         (find_taken_edge_computed_goto): Likewise.
10642         (find_taken_edge_switch_expr): Likewise.
10643         (gimple_verify_flow_info): Likewise.
10644         (gimple_redirect_edge_and_branch): Likewise.
10645         (gimple_switch_label_bb): New function.
10646         (gimple_switch_default_bb): Likewise.
10647         (gimple_switch_edge): Likewise.
10648         (gimple_switch_default_edge): Likewise.
10649         * tree-cfg.h (label_to_block_fn): Remove and replace ...
10650         (label_to_block): ... with this.
10651         (gimple_switch_label_bb): New.
10652         (gimple_switch_default_bb): Likewise.
10653         (gimple_switch_edge): Likewise.
10654         (gimple_switch_default_edge): Likewise.
10655         * tree-cfgcleanup.c (convert_single_case_switch): Use
10656         new gimple functions and pass new argument to label_to_block.
10657         (cleanup_control_flow_bb):
10658         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
10659         cfun argument explicitly.
10660         (make_eh_edges): Likewise.
10661         (redirect_eh_dispatch_edge): Likewise.
10662         (lower_resx): Likewise.
10663         (lower_eh_dispatch): Likewise.
10664         (maybe_remove_unreachable_handlers): Likewise.
10665         (unsplit_eh): Likewise.
10666         (cleanup_empty_eh): Likewise.
10667         (verify_eh_edges): Likewise.
10668         (verify_eh_dispatch_edge): Likewise.
10669         * tree-ssa-dom.c (record_edge_info): Likewise.
10670         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
10671         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
10672         (thread_through_normal_block): Likewise.
10673         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
10674         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
10675         * tree-switch-conversion.c (switch_conversion::collect): Use new
10676         gimple functions.
10677         (switch_conversion::check_final_bb): Likewise.
10678         (switch_conversion::gather_default_values): Pass new argument
10679         to label_to_block.
10680         (switch_conversion::build_constructors): Likewise.
10681         (switch_decision_tree::compute_cases_per_edge): Use new
10682         gimple_switch_edge function.
10683         (switch_decision_tree::analyze_switch_statement): Pass new argument
10684         to label_to_block.
10685         (switch_decision_tree::try_switch_expansion): Use
10686         gimple_switch_default_edge.
10687         * tree-vrp.c (find_switch_asserts): Pass new argument
10688         to label_to_block.
10689         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
10690         (vr_values::simplify_switch_using_ranges): Likewise.
10692 2018-08-27  Richard Biener  <rguenther@suse.de>
10694         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
10695         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
10697         * tree-ssa-sccvn.h (struct vn_pval): New structure.
10698         (struct vn_nary_op_s): Add unwind_to member.  Add
10699         predicated_values flag and put result into a union together
10700         with a linked list of vn_pval.
10701         (struct vn_ssa_aux): Add name member to make maintaining
10702         a map of SSA name to vn_ssa_aux possible.  Remove no longer
10703         needed info, dfsnum, low, visited, on_sccstack, use_processed
10704         and range_info_anti_range_p members.
10705         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
10706         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
10707         New functions.
10708         (vn_valueize): New global.
10709         (vn_context_bb): Likewise.
10710         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
10711         VN_INFO_PTR_INFO): Remove.
10712         * tree-ssa-sccvn.c: ... (rewrite)
10713         (pass_fre::execute): For -O2+ initialize loops and run
10714         RPO VN in optimistic mode (iterating).  For -O1 and -Og
10715         run RPO VN in non-optimistic mode.
10716         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
10717         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
10718         * doc/invoke.texi (sccvn-max-scc-size): Remove.
10719         (rpo-vn-max-loop-depth): Document.
10720         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
10721         when valuezing the VUSE signals we walked out of the region.
10722         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
10723         (phi_translate): Set VN context block to use for availability
10724         lookup.
10725         (compute_avail): Likewise.
10726         (pre_valueize): New function.
10727         (pass_pre::execute): Adjust to the RPO VN API.
10729         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
10730         (propagate_constants_for_unrolling): Remove.
10731         (tree_unroll_loops_completely): Perform value-numbering
10732         on the unrolled bodies loop parent.
10734 2018-08-27  Richard Biener  <rguenther@suse.de>
10736         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
10737         for partial antic compute.
10739 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
10741         PR rtl-optimization/87065
10742         * combine.c (simplify_if_then_else): Formatting fix.
10743         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
10744         check.
10745         (known_cond): Don't return const_true_rtx for vector modes.  Use
10746         CONST0_RTX instead of const0_rtx.  Formatting fixes.
10748 2018-08-27  Martin Liska  <mliska@suse.cz>
10750         PR gcov-profile/87069
10751         * gcov.c (process_file): Record files already processed
10752         and warn about a file being processed multiple times.
10754 2018-08-27  Martin Liska  <mliska@suse.cz>
10756         PR driver/83193
10757         * config/aarch64/aarch64.c (aarch64_override_options_internal):
10758         Set default values for x_aarch64_*_string strings.
10759         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
10760         prefix.  For -mabi do not print '=ABI' in help and use
10761         <option_value> format for -msve-vector-bits and -moverride
10762         options.
10764 2018-08-26  Jeff Law  <law@redhat.com>
10766         * config/mips/frame-header-opt.c: Include "backend.h" rather than
10767         "cfg.h"
10769 2018-08-26  Marek Polacek  <polacek@redhat.com>
10771         PR c++/87029, Implement -Wredundant-move.
10772         * doc/invoke.texi: Document -Wredundant-move.
10774 2018-08-25  Martin Sebor  <msebor@redhat.com>
10776         PR tree-optimization/87059
10777         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
10778         to the same type as the other.
10779         * fold-const.c (fold_binary_loc): Assert expectation.
10781 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
10783         * config/darwin.c (machopic_legitimize_pic_address): Clean up
10784         extraneous parentheses, dead code section and formatting.
10786 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
10788         PR c++/87091
10789         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
10790         wide enough for jumps in the line-numbering to be visible.
10791         (layout::print_gap_in_line_numbering): New member function.
10792         (layout::calculate_line_spans): When using line numbering, merge
10793         line spans that are only 1 line apart.
10794         (diagnostic_show_locus): When printing line numbers, show gaps in
10795         line numbering directly, rather than printing headers.
10796         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
10797         line-numbering with multiple line spans.
10798         (selftest::test_fixit_insert_containing_newline_2): Add test of
10799         line-numbering, in which the spans are close enough to be merged.
10801 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
10803         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
10804         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
10805         * tree-vrp.c (range_is_nonnull): Remove.
10806         (range_includes_zero_p): Accept value_range instead of min/max.
10807         (extract_range_from_binary_expr_1): Do not early bail on
10808         POINTER_PLUS_EXPR.
10809         Use range_includes_zero_p instead of range_is_nonnull.
10810         (extract_range_from_unary_expr): Use range_includes_zero_p instead
10811         of range_is_nonnull.
10812         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
10813         special case VR_ANTI_RANGE.
10814         (vrp_finalize): Same.
10815         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
10816         instead of min/max.
10817         (range_is_nonnull): Remove.
10818         * vr-values.c (vrp_stmt_computes_nonzero): Use
10819         range_includes_zero_p instead of range_is_nonnull.
10820         (extract_range_basic): Pass value_range to range_includes_zero_p
10821         instead of range_is_nonnull.
10823 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
10825         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
10826         * emit-rtl.h (rtl_data): Remove return_bnd.
10827         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
10828         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
10829         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
10830         (POINTER_BOUNDS_MODE): Remove definition.
10831         (make_pointer_bounds_mode): Remove.
10832         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
10833         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
10834         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
10835         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
10836         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
10837         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
10838         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
10840         * config/i386/i386-modes.def (BND32, BND64): Remove.
10841         * config/i386/i386.c (dbx_register_map): Remove bound registers.
10842         (dbx64_register_map): Ditto.
10843         (svr4_dbx_register_map): Ditto.
10844         (indirect_thunk_bnd_needed): Remove.
10845         (indirect_thunks_bnd_used): Ditto.
10846         (indirect_return_bnd_needed): Ditto.
10847         (indirect_return_via_cx_bnd): Ditto.
10848         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
10849         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
10850         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
10851         (output_indirect_thunk_function): Remove handling of
10852         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
10853         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
10854         (ix86_save_reg): Remove handling of crtl->return_bnd.
10855         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
10856         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
10857         and UNSPEC_BNDLX_ADDR.
10858         (ix86_output_indirect_branch_via_reg): Remove handling of
10859         indirect_thunk_prefix_bnd.
10860         (ix86_output_indirect_branch_via_push): Ditto.
10861         (ix86_output_function_return): Ditto.
10862         (ix86_output_indirect_function_return): Ditto.
10863         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
10864         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
10865         (CALL_USED_REGISTERS): Ditto.
10866         (REG_ALLOC_ORDER): Update for removal of bound registers.
10867         (HI_REGISTER_NAMES): Ditto.
10868         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
10869         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
10870         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
10871         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
10872         (FIRST_PSEUDO_REG): Update.
10873         (BND): Remove mode iterator.
10874         * config/i386/predicates.md (bnd_mem_operator): Remove.
10876 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
10878         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
10879         vectors.
10881 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
10883         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
10884         the case in which the permute needs only a single element and
10885         repeats for every vector of the result.  Extend that case to
10886         handle variable-length vectors.
10887         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
10889 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
10891         PR debug/79342
10892         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
10893         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
10895 2018-08-24  Richard Biener  <rguenther@suse.de>
10897         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
10898         bb_flags_allocated members.
10899         (auto_flag): New RAII class for allocating flags.
10900         (auto_edge_flag): New RAII class for allocating edge flags.
10901         (auto_bb_flag): New RAII class for allocating bb flags.
10902         * cfgloop.c (verify_loop_structure): Allocate temporary edge
10903         flag dynamically.
10904         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
10905         in favor of temporarily allocated BB flag.
10906         * hsa-brig.c: Re-order includes.
10907         * hsa-dump.c: Likewise.
10908         * hsa-regalloc.c: Likewise.
10909         * print-rtl.c: Likewise.
10910         * profile-count.c: Likewise.
10912 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
10914         PR target/86989
10915         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
10916         the TOC register.
10918 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
10920         PR 87073/bootstrap
10921         * wide-int-range.cc (wide_int_range_div): Do not ignore result
10922         from wide_int_range_multiplicative_op.
10924 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10926         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
10927         "permutaion".
10929 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
10931         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
10932         to 'expanded'.
10934 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
10936         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
10937         full GENERIC expression used for replacement.
10939 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
10941         * tree-vrp.c (abs_extent_range): Remove.
10942         (extract_range_into_wide_ints): Pass wide ints by reference.
10943         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
10944         Pass wide ints by reference in all calls to
10945         extract_range_into_wide_ints.
10946         * wide-int-range.cc (wide_int_range_div): New.
10947         * wide-int-range.h (wide_int_range_div): New.
10948         (wide_int_range_includes_zero_p): New.
10949         (wide_int_range_zero_p): New.
10951 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
10953         * config/aarch64/aarch64.md (arches): New enum.
10954         (arch): New enum attr.
10955         (arch_enabled): New attr.
10956         (enabled): Now uses arch_enabled only.
10957         (simd, sve, fp16): Removed attribute.
10958         (fp): Attr now defined in terms of 'arch'.
10959         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
10960         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
10961         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
10962         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
10963         attributes into 'arch'.
10964         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
10965         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
10966         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
10967         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
10968         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
10969         'simd' attribute into 'arch'.
10970         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
10971         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
10972         Convert use of 'fp' attribute to 'arch'.
10973         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
10974         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
10975         into 'arch'.
10976         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
10977         (different modes) Merge 'fp' and 'simd' into 'arch'.
10978         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
10979         'simd' into 'arch'.
10981 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
10983         PR rtl-optimization/87026
10984         * expmed.c (canonicalize_comparison): If we can no longer create
10985         pseudoregisters, don't.
10987 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
10989         PR target/86951
10990         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
10991         prototype.
10992         * config/arm/arm.c (speculation_barrier_libfunc): New static
10993         variable.
10994         (arm_init_libfuncs): Initialize it.
10995         (arm_emit_speculation_barrier): New function.
10996         * config/arm/arm.md (speculation_barrier): Call
10997         arm_emit_speculation_barrier for architectures that do not have
10998         DSB or ISB.
10999         (speculation_barrier_insn): Only match on Armv7 or later.
11001 2018-08-23  Richard Biener  <rguenther@suse.de>
11003         PR middle-end/87024
11004         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
11005         calls.
11007 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
11009         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
11010         of single-vector TBLs.
11011         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
11012         one input is given.
11014 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
11016         PR target/85910
11017         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
11018         aarch64_evpc_tbl guard.
11020 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11022         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
11023         behaviour.
11025 2018-08-22  Martin Sebor  <msebor@redhat.com>
11027         PR middle-end/87052
11028         * tree-pretty-print.c (pretty_print_string): Add argument.
11029         (dump_generic_node): Call to pretty_print_string with string size.
11031 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
11033         PR rtl-optimization/86771
11034         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
11035         of two SETs into those two SETs, one to be placed at i2, if that SETs
11036         destination is modified between i2 and i3.
11038 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
11040         PR tree-optimization/86725
11041         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
11042         function.
11043         (vect_analyze_scalar_cycles_1): Check it.
11045 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
11047         PR tree-optimization/86725
11048         * tree-vect-loop.c (vect_is_simple_reduction): When treating
11049         an outer loop phi as a double reduction, make sure that the
11050         single user of the phi result is an inner loop phi.
11052 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
11054         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
11055         grouped stores with gaps to a strided group.
11057 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
11059         * tree-vect-stmts.c (get_group_load_store_type)
11060         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
11061         first statement in a group.
11063 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
11065         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
11066         the sequence used in gcc/gcc.c.
11068 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
11070         PR other/704
11071         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
11072         building it.
11074 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
11076         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
11077         Darwin10-specific unwinder-shim.
11078         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
11079         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
11080         New to cater for Darwin10 Rosetta.
11082 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
11084         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
11085         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
11087 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
11089         PR bootstrap/81033
11090         PR target/81733
11091         PR target/52795
11092         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
11093         (dwarf2out_switch_text_section): Generate a local label for the
11094         second function sub-section and apply it as the second FDE start
11095         label.
11096         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
11097         second sub-section start.
11099 2018-08-22  Richard Biener  <rguenther@suse.de>
11101         PR tree-optimization/86988
11102         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
11104 2018-08-22  Richard Biener  <rguenther@suse.de>
11106         PR tree-optimization/86945
11107         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
11109 2018-08-22  Alexandre Oliva <oliva@adacore.com>
11111         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
11112         a comment about how uses of r2 for .sdata2 come about.
11114 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
11116         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
11118 2018-08-21  Marek Polacek  <polacek@redhat.com>
11120         PR c++/86981, Implement -Wpessimizing-move.
11121         * doc/invoke.texi: Document -Wpessimizing-move.
11123 2018-08-21  Jan Hubicka  <jh@suse.cz>
11125         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
11126         * tree.h (is_redundant_typedef): Remove.
11127         * dwarf2out.c (is_redundant_typedef): Turn into static function.
11129 2018-08-21  Jan Hubicka  <jh@suse.cz>
11131         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
11132         when possible.
11134 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
11136         * expmed.c (extract_low_bits): Reject invalid subregs early.
11138 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11140         PR middle-end/86121
11141         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
11142         behaviour.
11144 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
11146         * config/vxworks.h: Guard vxworks_asm_out_constructor and
11147         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
11148         * config/vxworks.c: Likewise.
11150 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
11152         * config/vxworks.c: Set targetm.have_ctors_dtors
11153         if HAVE_INITFINI_ARRAY_SUPPORT.
11154         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
11155         if HAVE_INITFINI_ARRAY_SUPPORT.
11157 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
11159         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
11160         default search path for VxWorks < 7.
11162 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11164         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
11165         (get_format_string): Refer to c_getstr.
11167 2018-08-21  Tom de Vries  <tdevries@suse.de>
11169         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
11170         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
11171         (debuginfo_early_stop): Declare.
11172         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
11173         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
11174         (debuginfo_early_stop): New function.
11175         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
11176         and debuginfo_early_stop.
11177         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
11178         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
11179         (general_init): Call debuginfo_early_init.
11180         (finalize): Call debuginfo_fini.
11181         (do_compile): Call debuginfo_init.
11182         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
11183         -fdump-early-debug.
11184         (@item -fdump-debug, @item -fdump-earlydebug): Add.
11186 2018-08-21  Tom de Vries  <tdevries@suse.de>
11188         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
11189         flag_dump_noaddr and flag_dump_unnumbered.
11191 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
11193         * wide-int-range.cc (wide_int_range_abs): New.
11194         (wide_int_range_order_set): Rename from wide_int_range_min_max.
11195         * wide-int-range.h (wide_int_range_abs): New.
11196         (wide_int_range_min_max): New.
11197         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
11198         case to call wide_int_range_abs.
11199         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
11200         (extract_range_from_abs_expr): Delete.
11202 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
11204         PR target/87033
11205         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
11206         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
11207         for indexed loads.
11209 2018-08-20  Nathan Sidwell  <nathan@acm.org>
11210             Jeff Law <law@redhat.com>
11212         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
11213         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
11215 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
11217         PR other/84889
11218         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
11219         (decl_attributes): Likewise.
11220         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
11221         instance.
11222         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
11223         * diagnostic-core.h (class auto_diagnostic_group): New class.
11224         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
11225         (diagnostic_report_diagnostic): Handle the first diagnostics within
11226         a group.
11227         (emit_diagnostic): Add auto_diagnostic_group instance.
11228         (inform): Likewise.
11229         (inform_n): Likewise.
11230         (warning): Likewise.
11231         (warning_at): Likewise.
11232         (warning_n): Likewise.
11233         (pedwarn): Likewise.
11234         (permerror): Likewise.
11235         (error): Likewise.
11236         (error_n): Likewise.
11237         (error_at): Likewise.
11238         (sorry): Likewise.
11239         (fatal_error): Likewise.
11240         (internal_error): Likewise.
11241         (internal_error_no_backtrace): Likewise.
11242         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
11243         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
11244         * diagnostic.h (struct diagnostic_context): Add fields
11245         "diagnostic_group_nesting_depth",
11246         "diagnostic_group_emission_count", "begin_group_cb",
11247         "end_group_cb".
11248         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
11249         Add auto_diagnostic_group instance(s).
11250         (find_explicit_erroneous_behavior): Likewise.
11251         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
11252         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
11253         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
11254         (gimplify_va_arg_expr): Likewise.
11255         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
11256         (HSA_SORRY_AT): Likewise.
11257         * ipa-devirt.c (compare_virtual_tables): Likewise.
11258         (warn_odr): Likewise.
11259         * multiple_target.c (expand_target_clones): Likewise.
11260         * opts-common.c (cmdline_handle_error): Likewise.
11261         * reginfo.c (globalize_reg): Likewise.
11262         * substring-locations.c (format_warning_n_va): Likewise.
11263         * tree-inline.c (expand_call_inline): Likewise.
11264         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
11265         * tree-ssa-loop-niter.c
11266         (do_warn_aggressive_loop_optimizations): Likewise.
11267         * tree-ssa-uninit.c (warn_uninit): Likewise.
11268         * tree.c (warn_deprecated_use): Likewise.
11270 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
11272         PR target/87014
11273         * config/i386/i386.md (eh_return): Always update EH return
11274         address in word_mode.
11276 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
11278         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
11279         TARGET_SPLIT_COMPLEX_ARG is defined.
11281 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11283         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
11285 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11287         PR target/86984
11288         * expr.c (expand_assignment): Assert that bitpos is positive.
11289         (store_field): Likewise
11290         (expand_expr_real_1): Make sure that bitpos is positive.
11291         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
11292         integer overflow.
11294 2018-08-20  Nathan Sidwell  <nathan@acm.org>
11296         * Makefile.in (CPP_ID_DATA_H): Delete.
11297         (CPP_INTERNAL_H): Don't add it.
11298         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
11299         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
11301 2018-08-20  Richard Biener  <rguenther@suse.de>
11303         PR tree-optimization/78655
11304         * tree-vrp.c (extract_range_from_binary_expr_1): Make
11305         pointer + offset nonnull if either operand is nonnull work.
11307 2018-08-20  Tom de Vries  <tdevries@suse.de>
11309         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
11310         unless the referenced die describes the added property using
11311         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
11312         Otherwise, add a DW_AT_location to the referenced die.
11314 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
11316         PR target/86994
11317         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
11318         register_operand when calling ix86_set_reg_reg_cost.
11319         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
11320         Set *total to 0 for operands that satisfy x86_64_immediate_operand
11321         predicate and to 1 otherwise.
11323 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
11325         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
11326         emit a diagnostic that it is not supported and reset the option.
11327         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
11328         supported and consume the option.  (ASM_FINAL_SPEC): New.
11330 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
11332         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
11333         a sentence.
11335 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
11337         C-SKY port: Documentation
11339         * doc/extend.texi (C-SKY Function Attributes): New section.
11340         * doc/invoke.texi (Option Summary): Add C-SKY options.
11341         (C-SKY Options): New section.
11342         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
11344 2018-08-17  Jojo  <jijie_rong@c-sky.com>
11345             Huibin Wang  <huibin_wang@c-sky.com>
11346             Sandra Loosemore  <sandra@codesourcery.com>
11347             Chung-Lin Tang  <cltang@codesourcery.com>
11349         C-SKY port: Backend implementation
11351         * config/csky/*: New.
11352         * common/config/csky/*: New.
11354 2018-08-17  Jojo  <jijie_rong@c-sky.com>
11355             Huibin Wang  <huibin_wang@c-sky.com>
11356             Sandra Loosemore  <sandra@codesourcery.com>
11357             Chung-Lin Tang  <cltang@codesourcery.com>
11358             Andrew Jenner  <andrew@codesourcery.com>
11360         C-SKY port: Configury
11362         * config.gcc (csky-*-*): New.
11363         * configure.ac: Add csky to targets for dwarf2 debug_line support.
11364         * configure: Regenerated.
11366 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
11368         * dump-context.h: Include "dumpfile.h".
11369         (dump_context::dump_printf_va): Convert final param from va_list
11370         to va_list *.  Convert from ATTRIBUTE_PRINTF to
11371         ATTRIBUTE_GCC_DUMP_PRINTF.
11372         (dump_context::dump_printf_loc_va): Likewise.
11373         * dumpfile.c: Include "stringpool.h".
11374         (make_item_for_dump_printf_va): Delete.
11375         (make_item_for_dump_printf): Delete.
11376         (class dump_pretty_printer): New class.
11377         (dump_pretty_printer::dump_pretty_printer): New ctor.
11378         (dump_pretty_printer::emit_items): New member function.
11379         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
11380         function.
11381         (dump_pretty_printer::emit_item): New member function.
11382         (dump_pretty_printer::stash_item): New member function.
11383         (dump_pretty_printer::format_decoder_cb): New member function.
11384         (dump_pretty_printer::decode_format): New member function.
11385         (dump_context::dump_printf_va): Reimplement in terms of
11386         dump_pretty_printer.
11387         (dump_context::dump_printf_loc_va): Convert final param from va_list
11388         to va_list *.
11389         (dump_context::begin_scope): Reimplement call to
11390         make_item_for_dump_printf.
11391         (dump_printf): Update for change to dump_printf_va.
11392         (dump_printf_loc): Likewise.
11393         (selftest::test_capture_of_dump_calls): Convert "stmt" from
11394         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
11395         with %T, %E, and %G.
11396         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
11397         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
11398         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
11399         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
11400         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
11401         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
11402         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
11403         within a dump_printf_loc call to "%wu".
11404         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
11405         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
11406         missing space after "=".
11407         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
11408         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
11409         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
11410         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
11411         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
11412         duplicate "vectorized" from message.
11414 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
11416         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
11417         polyNxK_t element's TYPE_STRING_FLAG.
11419 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
11421         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
11422         (they were unnamed before).  Fix comments.
11424 2018-08-17  Nathan Sidwell  <nathan@acm.org>
11426         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
11428 2018-08-17  Richard Biener  <rguenther@suse.de>
11430         PR tree-optimization/86841
11431         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
11433 2018-08-17  Martin Liska  <mliska@suse.cz>
11435         * common.opt: Remove Warn, Init and Report for options with
11436         Ignore/Deprecated flag. Warning is done automatically for
11437         Deprecated flags.
11438         * config/i386/i386.opt: Likewise.
11439         * config/ia64/ia64.opt: Likewise.
11440         * config/rs6000/rs6000.opt: Likewise.
11441         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
11442         Remove usage of flag_check_pointer_bounds.
11443         * lto-wrapper.c (merge_and_complain): Do not handle
11444         OPT_fcheck_pointer_bounds.
11445         (append_compiler_options): Likewise.
11446         * opt-functions.awk: Do not handle Deprecated.
11447         * optc-gen.awk: Check that Var, Report and Init are not
11448         used for an option with Ignore/Deprecated flag.
11449         * opts-common.c (decode_cmdline_option): Do not report
11450         CL_ERR_DEPRECATED.
11451         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
11452         options.
11453         * opts.h (struct cl_option): Remove cl_deprecated flag.
11454         (CL_ERR_DEPRECATED): Remove error enum value.
11456 2018-08-17  Richard Biener  <rguenther@suse.de>
11458         PR middle-end/86505
11459         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
11460         across a va-arg-pack using call adjust its return value accordingly.
11462 2018-08-16  Martin Sebor  <msebor@redhat.com>
11464         PR tree-optimization/86853
11465         * gimple-ssa-sprintf.c (struct format_result): Rename member.
11466         (struct fmtresult): Add member and initialize it in ctors.
11467         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
11468         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
11469         (format_directive): Set POSUNDER4K when MAYFAIL is set.
11470         (parse_directive): Handle %C same as %c.
11471         (sprintf_dom_walker::compute_format_length): Adjust.
11472         (is_call_safe): Adjust.
11474 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11476         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
11477         for determining how to count the elements.
11478         * builtins.h (c_strlen): Adjust prototype.
11479         * expr.c (string_constant): Add new parameter mem_size.
11480         Set *mem_size appropriately.
11481         * expr.h (string_constant): Adjust protoype.
11482         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
11483         * gimple-fold.h (get_range_strlen): Adjust prototype.
11484         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
11485         (format_string): Call get_string_length with eltsize.
11487 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
11489         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
11490         to emit the span, rather than setting it as the prefix.
11492 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
11494         * diagnostic-show-locus.c (layout::start_annotation_line): Add
11495         "margin_char" parameter, defaulting to space.  Use it in place
11496         of pp_space for the initial part of the margin.
11497         (layout::print_leading_fixits): Use '+' when filling the margin
11498         of line-insertion fix-it hints.
11500 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
11502         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
11503         Delete.
11505 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
11507         * config/rs6000/altivec.md: Don't set length attribute to the default
11508         value.
11509         * config/rs6000/darwin.md: Ditto.
11510         * config/rs6000/dfp.md: Ditto.
11511         * config/rs6000/htm.md: Ditto.
11512         * config/rs6000/rs6000.md: Ditto.
11513         * config/rs6000/sync.md: Ditto.
11514         * config/rs6000/vsx.md: Ditto.
11516 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
11518         * config/rs6000/altivec.md: Don't set length attribute to the default
11519         value, for branch instructions.
11520         * config/rs6000/darwin.md: Ditto.
11521         * config/rs6000/rs6000.md: Ditto.
11523 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
11525         * config/rs6000/rs6000.md (length): Always define as const_int 4.
11526         (unnamed conditional branch define_insn): Set length to 4 or 8
11527         depending on offset.
11528         (<bd>_<mode>): Similar, for alternative 0.
11529         (<bd>tf_<mode>): Ditto.
11531 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
11533         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
11535 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
11537         * doc/rtl.texi: Replace old RTX class names with new names.
11540 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
11542         * expmed.h (canonicalize_comparison): New declaration.
11543         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
11544         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
11545         * optabs.c (prepare_cmp_insn): Likewise.
11546         * rtl.h (unsigned_condition_p): New function which checks if a
11547         comparison operator is unsigned.
11549 2018-08-16  Nathan Sidwell  <nathan@acm.org>
11551         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
11552         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
11554 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
11556         PR target/84711
11557         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
11558         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
11559         (mov<mov>): ..this and enable unconditionally.
11561 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
11563         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
11565 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
11567         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
11568         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
11569         "Common" with "Target".
11571 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
11573         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
11574         * doc/invoke.texi (mmitigate-rop): Remove.
11575         * config/i386/i386.c: Do not include "regrename.h".
11576         (ix86_rop_should_change_byte_p, reg_encoded_number)
11577         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
11578         Remove.
11579         (ix86_reorg): Remove call to ix86_mitigate_rop.
11580         * config/i386/i386.md (attr "modrm_class"): Remove.
11581         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
11582         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
11583         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
11585 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
11587         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
11588         allow folding of mergeh() and mergel() for the float and double types.
11589         (fold_mergehl_helper): Rework to handle building a permute tree
11590         for float vectors.
11592 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
11594         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
11595         for TARGET_SSE.
11597 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
11599         * common.opt (fdiagnostics-show-labels): New option.
11600         * diagnostic-show-locus.c (class layout_range): Add field
11601         "m_label".
11602         (class layout): Add field "m_show_labels_p".
11603         (layout_range::layout_range): Add param "label" and use it to
11604         initialize m_label.
11605         (make_range): Pass in NULL for new "label" param of layout_range's
11606         ctor.
11607         (layout::layout): Initialize m_show_labels_p.
11608         (layout::maybe_add_location_range): Pass in loc_range->m_label
11609         when constructing layout_range instances.
11610         (struct line_label): New struct.
11611         (layout::print_any_labels): New member function.
11612         (layout::print_line): Call it if label-printing is enabled.
11613         (selftest::test_one_liner_labels): New test.
11614         (selftest::test_diagnostic_show_locus_one_liner): Call it.
11615         * diagnostic.c (diagnostic_initialize): Initialize
11616         context->show_labels_p.
11617         * diagnostic.h (struct diagnostic_context): Add field
11618         "show_labels_p".
11619         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
11620         -fno-diagnostics-show-labels.
11621         * dwarf2out.c (gen_producer_string): Add
11622         OPT_fdiagnostics_show_labels to the ignored options.
11623         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
11624         param.
11625         (gcc_rich_location::maybe_add_expr): Likewise.
11626         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
11627         label" param, defaulting to NULL.
11628         (gcc_rich_location::add_expr): Add "label" param.
11629         (gcc_rich_location::maybe_add_expr): Likewise.
11630         (class text_range_label): New class.
11631         (class range_label_for_type_mismatch): New class.
11632         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
11633         of format_warning_va.
11634         (fmtwarn_n): Likewise for new params of format_warning_n_va.
11635         * lto-wrapper.c (merge_and_complain): Add
11636         OPT_fdiagnostics_show_labels to the "pick one setting" options.
11637         (append_compiler_options): Likewise to the dropped options.
11638         (append_diag_options): Likewise to the passed-on options.
11639         * opts.c (common_handle_option): Handle the new option.
11640         * selftest-diagnostic.c
11641         (test_diagnostic_context::test_diagnostic_context): Enable
11642         show_labels_p.
11643         * substring-locations.c: Include "gcc-rich-location.h".
11644         (format_warning_n_va): Add "fmt_label" and "param_label" params
11645         and use them as appropriate.
11646         (format_warning_va): Add "fmt_label" and "param_label" params,
11647         passing them on to format_warning_n_va.
11648         (format_warning_at_substring): Likewise.
11649         (format_warning_at_substring_n): Likewise.
11650         * substring-locations.h (format_warning_va): Add "fmt_label" and
11651         "param_label" params.
11652         (format_warning_n_va): Likewise.
11653         (format_warning_at_substring): Likewise.
11654         (format_warning_at_substring_n): Likewise.
11655         * toplev.c (general_init): Initialize global_dc->show_labels_p.
11657 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
11659         PR testsuite/86519
11660         * builtins.c (expand_builtin_memcmp): Do not expand the call
11661         when overflow is detected.
11663 2018-08-15  Martin Sebor  <msebor@redhat.com>
11665         PR tree-optimization/71625
11666         * config/aarch64/aarch64-builtins.c
11667         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
11669 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
11671         * config/s390/s390.c (s390_reorg): Remove loop.
11673 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
11675         * config/darwin.c
11676          (darwin_function_switched_text_sections): Delete.
11677         * gcc/config/darwin.h
11678          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
11680 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
11682         PR target/81685
11683         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
11684         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
11685         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
11687 2018-08-15  Martin Liska  <mliska@suse.cz>
11689         PR tree-optimization/86925
11690         * predict.c (expr_expected_value_1): When taking
11691         later predictor, assign also probability.
11692         Use fold_build2_initializer_loc in order to fold
11693         the expression in -frounding-math.
11695 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
11697         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
11698         patterns.
11699         (expand_vec_perm_1): Try the new method.
11701 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
11703         PR target/86547
11704         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
11705         Check whether lra_live_max_point is 0 before dividing.
11707 2018-08-14  Martin Sebor  <msebor@redhat.com>
11709         PR tree-optimization/86650
11710         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
11711         (vrp_prop::check_mem_ref): Same.
11713 2018-08-13  Liu Hao <lh_mouse@126.com>
11715         * pretty-print.c (eat_esc_sequence): Swap the foreground and
11716         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
11717         and clear it thereafter, as it only works for DBCS.
11719 2018-08-13  Liu Hao <lh_mouse@126.com>
11721         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
11722         handle returned by _get_osf_handle().
11724 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
11726         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
11727         for folding vec_perm.
11729 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
11731         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
11732         Add support for gimple-folding of vec_pack() and vec_unpack()
11733         intrinsics.
11735 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
11737         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
11738         vec_xst variants to the list.
11739         (rs6000_gimple_fold_builtin): Add support for folding unaligned
11740         vector loads and stores.
11742 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
11744         * config.gcc (rs6000-ibm-aix4.x): Delete.
11745         (rs6000-ibm-aix5.1): Delete.
11746         (rs6000-ibm-aix5.2): Delete.
11747         (rs6000-ibm-aix5.3): Delete.
11748         * config/rs6000/aix43.h: Delete.
11749         * config/rs6000/aix51.h: Delete.
11750         * config/rs6000/aix52.h: Delete.
11751         * config/rs6000/t-aix43: Delete.
11753 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
11755         * config/s390/s390.c (s390_decompose_constant_pool_ref):
11756         New function.
11757         (s390_decompose_address): Factor out constant pool ref
11758         decomposition.
11760 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
11762         * config/nds32/nds32-predicates.c
11763         (nds32_can_use_bclr_p): Change return type as bool.
11764         (nds32_can_use_bset_p): Ditto.
11765         (nds32_can_use_btgl_p): Ditto.
11766         (nds32_can_use_bitci_p): Ditto.
11767         * config/nds32/nds32-protos.h
11768         (nds32_can_use_bclr_p): Change declaration.
11769         (nds32_can_use_bset_p): Ditto.
11770         (nds32_can_use_btgl_p): Ditto.
11771         (nds32_can_use_bitci_p): Ditto.
11773 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
11775         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
11776         Support -msched-prolog-epilog option.
11777         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
11779 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
11781         * common/config/nds32/nds32-common.c
11782         (nds32_option_optimization_table): Enalbe -malways-align.
11784 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
11786         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
11787         extra_headers.
11788         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
11789         OPT_misr_secure_ case.
11790         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
11791         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
11792         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
11793         secure attribute.
11794         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
11795         (nds32_isr_info): New field security_level.
11796         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
11797         * config/nds32/nds32.md (return_internal): Consider critical attribute.
11798         * config/nds32/nds32.opt (misr-secure): New option.
11799         * config/nds32/nds32_init.inc: New file.
11800         * config/nds32/nds32_isr.h: New file.
11802 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
11804         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
11805         Update comment for atomic instructions.
11806         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
11807         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
11808         Remove.
11809         (atomic_loaddi): Revise fence expansion to only emit fence prior to
11810         load for __ATOMIC_SEQ_CST model.
11811         (atomic_loaddi_1): Remove float register target.
11812         (atomic_storedi): Handle CONST_INT values.
11813         (atomic_storedi_1): Remove float register source.  Add special case
11814         for zero value.
11815         (memory_barrier): New expander and insn.
11817 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
11819         PR tree-optimization/86835
11820         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
11821         new_stmt after def_gsi, make sure to insert new_square_stmt after
11822         that stmt, not 2 stmts before it.
11824 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
11826         PR target/82418
11827         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
11828         instead of SWI48.
11830 2018-08-10  Martin Liska  <mliska@suse.cz>
11832         PR target/83610
11833         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
11834         function type.
11835         * builtins.c (expand_builtin_expect_with_probability):
11836         New function.
11837         (expand_builtin_expect_with_probability): New function.
11838         (build_builtin_expect_predicate): Add new argumnet probability
11839         for BUILT_IN_EXPECT_WITH_PROBABILITY.
11840         (fold_builtin_expect):
11841         (fold_builtin_2):
11842         (fold_builtin_3):
11843         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
11844         * builtins.h (fold_builtin_expect): Set new argument.
11845         * doc/extend.texi: Document __builtin_expect_with_probability.
11846         * doc/invoke.texi: Likewise.
11847         * gimple-fold.c (gimple_fold_call): Pass new argument.
11848         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
11849         also BUILT_IN_EXPECT_WITH_PROBABILITY.
11850         * predict.c (get_predictor_value): New function.
11851         (expr_expected_value): Add new argument probability. Assume
11852         that predictor and probability are always non-null.
11853         (expr_expected_value_1): Likewise.  For __builtin_expect and
11854         __builtin_expect_with_probability set probability.  Handle
11855         combination in binary expressions.
11856         (tree_predict_by_opcode): Simplify code by simply calling
11857         get_predictor_value.
11858         (pass_strip_predict_hints::execute): Add handling of
11859         BUILT_IN_EXPECT_WITH_PROBABILITY.
11860         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
11861         new predictor.
11862         * tree.h (DECL_BUILT_IN_P): New function.
11864 2018-08-10  Martin Liska  <mliska@suse.cz>
11866         PR tree-optimization/85799
11867         * passes.def: Add argument for pass_strip_predict_hints.
11868         * predict.c (class pass_strip_predict_hints): Add new argument
11869         early_p.
11870         (strip_predictor_early): New function.
11871         (pass_strip_predict_hints::execute): Call the function to
11872         strip predictors.
11873         (strip_predict_hints): New function.
11874         * predict.def: Fix comment.
11876 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
11878         * Makefile.in: Clarify which tm.texi to copy over to assert the
11879         right to grant a GFDL license for all.
11881 2018-08-09  Jeff Law  <law@redhat.com>
11883         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
11884         unused variable.
11886 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
11888         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
11889         prototype.
11891 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
11893         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
11894         reductions for variable-length vectors.
11896 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
11898         PR other/84889
11899         * common.opt (fdiagnostics-show-line-numbers): New option.
11900         * diagnostic-show-locus.c (class layout): Add fields
11901         "m_show_line_numbers_p" and "m_linenum_width";
11902         (num_digits): New function.
11903         (test_num_digits): New function.
11904         (layout::layout): Initialize new fields.  Update m_x_offset
11905         logic to handle any left margin.
11906         (layout::print_source_line): Print line number when requested.
11907         (layout::start_annotation_line): New member function.
11908         (layout::print_annotation_line): Call it.
11909         (layout::print_leading_fixits): Likewise.
11910         (layout::print_trailing_fixits): Likewise.  Update calls to
11911         move_to_column for new parameter.
11912         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
11913         it to potentially call start_annotation_line.
11914         (layout::show_ruler): Call start_annotation_line.
11915         (selftest::test_line_numbers_multiline_range): New selftest.
11916         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
11917         and selftest::test_line_numbers_multiline_range.
11918         * diagnostic.c (diagnostic_initialize): Initialize
11919         show_line_numbers_p.
11920         * diagnostic.h (struct diagnostic_context): Add field
11921         "show_line_numbers_p".
11922         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
11923         -fno-diagnostics-show-line-numbers.
11924         * dwarf2out.c (gen_producer_string): Add
11925         OPT_fdiagnostics_show_line_numbers to the ignored options.
11926         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
11927         one setting" options.
11928         (append_compiler_options): Likewise to the dropped options.
11929         (append_diag_options): Likewise to the passed-on options.
11930         * opts.c (common_handle_option): Handle the new option.
11931         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
11933 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11935         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
11936         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
11937         third argument of type "const signed char" to descriptions of
11938         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
11939         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
11940         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
11941         __builtin_bcdsub_ov functions.
11943 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
11945         PR tree-optimization/86858
11946         * tree-vect-loop.c (vect_is_simple_reduction): Restore
11947         flow_bb_inside_loop_p calls.
11949 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
11951         PR tree-optimization/86871
11952         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
11953         instead of gimple_assign_lhs.
11955 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
11957         PR target/86887
11958         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
11959         register constraint to operand 0.
11960         (add<mode>3_carryinC): Likewise.
11961         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
11963 2018-08-09  Martin Liska  <mliska@suse.cz>
11965         PR c/86895
11966         * common.opt: Remove extra line.
11968 2018-08-09  Martin Liska  <mliska@suse.cz>
11970         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
11971         at the end of a line, make first letter capital and end up
11972         a sentence with a dot.
11973         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
11974         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
11975         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
11976         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
11977         (PARAM_MAX_ISL_OPERATIONS): Likewise.
11978         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
11979         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
11980         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
11981         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
11982         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
11983         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
11984         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
11985         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
11986         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
11987         (PARAM_TREE_REASSOC_WIDTH): Likewise.
11988         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
11989         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
11990         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
11992 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
11994         PR target/84332
11995         * config/s390/s390.c (s390_option_override_internal): Reduce the
11996         stack-clash-protection-probe-interval param if it would be too big
11997         for z900.
11999 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
12001         PR target/46179
12002         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
12003         * config/m68k/m68k.c (handle_move_double): Don't call
12004         m68k_final_prescan_insn.
12005         (m68k_adjust_decorated_operand): Renamed from
12006         m68k_final_prescan_insn, remove first and third operand and
12007         simplify.
12008         (print_operand): Call it.
12009         (print_operand_address): Call it.
12011 2018-08-08  Nathan Sidwell  <nathan@acm.org>
12013         * diagnostic.c (diagnostic_report_current_module): Use
12014         linemap_included_from & linemap_included_from_linemap.
12016 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
12018         * config/aarch64/aarch64-cores.def: Add phecda core.
12019         * config/aarch64/aarch64-tune.md: Regenerate.
12020         * doc/invoke.texi: Add phecda core.
12022 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
12024         PR target/85295
12025         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
12026         definitions.
12027         * config/s390/s390.md ("movti"): Add more alternatives for
12028         constant to GPR copies.
12030 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
12032         * config/s390/s390.c: Fix whitespace damage throughout the file.
12033         * config/s390/s390.h: Likewise.
12034         * config/s390/tpf.h: Likewise.
12036 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
12038         * config/s390/s390.c (s390_loadrelative_operand_p):
12039         Remove TARGET_CPU_ZARCH usages.
12040         (s390_rtx_costs): Likewise.
12041         (s390_legitimate_constant_p): Likewise.
12042         (s390_cannot_force_const_mem): Likewise.
12043         (legitimate_reload_constant_p): Likewise.
12044         (s390_preferred_reload_class): Likewise.
12045         (legitimize_pic_address): Likewise.
12046         (legitimize_tls_address): Likewise.
12047         (s390_split_branches): Removed.
12048         (s390_add_execute): Removed.
12049         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
12050         (s390_mainpool_start): Likewise.
12051         (s390_mainpool_finish): Likewise.
12052         (s390_mainpool_cancel): Removed.
12053         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
12054         (s390_chunkify_cancel): Likewise.
12055         (s390_return_addr_rtx): Likewise.
12056         (s390_register_info): Remove split_branches_pending_p uages.
12057         (s390_optimize_register_info): Likewise.
12058         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
12059         split_branches_pending_p usages.
12060         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
12061         (s390_load_got): Likewise.
12062         (s390_expand_split_stack_prologue): Likewise.
12063         (output_asm_nops): Likewise.
12064         (s390_function_profiler): Likewise.
12065         (s390_emit_call): Likewise.
12066         (s390_conditional_register_usage): Likewise.
12067         (s390_optimize_prologue): Likewise.
12068         (s390_reorg): Remove TARGET_CPU_ZARCH and
12069         split_branches_pending_p usages.
12070         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
12071         usages.
12072         (s390_output_indirect_thunk_function): Likewise.
12073         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
12074         (TARGET_CPU_ZARCH_P): Removed.
12075         (struct machine_function): Remove split_branches_pending_p.
12076         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
12078 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
12080         * common/config/s390/s390-common.c (processor_flags_table):
12081         Remove flags.
12082         * config.gcc: Remove with_arch/with_tune support.
12083         * config/s390/2064.md: Remove cpu attribute comparisons.
12084         * config/s390/driver-native.c (s390_host_detect_local_cpu):
12085         Remove MTN.
12086         * config/s390/linux.h (ASM_SPEC):
12087         Remove -march support.
12088         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
12089         Use a table to get an arch level.
12090         * config/s390/s390-opts.h (enum processor_type):
12091         Remove enum values.
12092         * config/s390/s390.c
12093         (processor_table): Remove entries, add arch_level values.
12094         (s390_issue_rate): Remove cases.
12095         (s390_option_override): Adjust
12096         s390_option_override_internal() call.
12097         (s390_option_override_internal): Remove deprecation warning.
12098         (s390_valid_target_attribute_tree): Adjust
12099         s390_option_override_internal() call.
12100         * config/s390/s390.h (struct s390_processor):
12101         Share with s390-c.c, add arch_level field.
12102         * config/s390/s390.md:
12103         Remove occurrences in cpu attribute.
12104         * config/s390/s390.opt: Remove -march/-mtune support.
12105         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
12106         * doc/invoke.texi: Remove deprecation warning.
12108 2018-08-08  Luis Machado  <luis.machado@linaro.org>
12110         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
12111         global.
12112         (qdf24xx_tunings): Set vector cost structure to
12113         qdf24xx_vector_cost.
12115         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
12116         <register_sextend>: Set to 3.
12118 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
12120         PR target/86838
12121         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
12122         * config/aarch64/aarch64-simd.md
12123         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
12124         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
12125         (aarch64_frecpx<mode>): ...this new pattern.
12126         * config/aarch64/aarch64-simd-builtins.def: Remove comment
12127         about aarch64_frecp<FRECP:frecp_suffix><mode>.
12129 2018-08-07  Martin Liska  <mliska@suse.cz>
12131         PR middle-end/83023
12132         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
12133         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
12134         * predict.def (PRED_MALLOC_NONNULL): New predictor.
12135         * doc/extend.texi: Document that malloc attribute adds
12136         hit to compiler.
12138 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
12140         PR target/86785
12141         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12142         Define to speculation_safe_value_not_needed.
12144 2018-08-06  Jeff Law  <law@redhat.com>
12146         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
12147         the vr_values instance to cprop_into_stmt.
12148         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
12149         (cprop_operand): Also query EVRP to determine if OP is a constant.
12151 2018-08-06  Nathan Sidwell  <nathan@acm.org>
12153         * diagnostic.c (diagnostic_report_current_module): Reroll
12154         included-at loop.  Translate text.
12156 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
12158         * function-tests.c (selftest::test_expansion_to_rtl): Call
12159         free_after_compilation.
12161 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
12163         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
12165 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
12167         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
12168         loops with memory block operations from getting unrolled.
12170 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
12172         PR target/86807
12173         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12174         Define to speculation_safe_value_not_needed.
12176 2018-08-06  Jeff Law  <law@redhat.com>
12178         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
12179         assert.
12181 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
12183         PR target/86662
12184         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
12185         with all enabled __intN types.
12187         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
12189 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
12191         * alias.c (record_set): Check for clobber high.
12192         * cfgexpand.c (expand_gimple_stmt): Likewise.
12193         * combine-stack-adj.c (single_set_for_csa): Likewise.
12194         * combine.c (find_single_use_1): Likewise.
12195         (set_nonzero_bits_and_sign_copies): Likewise.
12196         (get_combine_src_dest): Likewise.
12197         (is_parallel_of_n_reg_sets): Likewise.
12198         (try_combine): Likewise.
12199         (record_dead_and_set_regs_1): Likewise.
12200         (reg_dead_at_p_1): Likewise.
12201         (reg_dead_at_p): Likewise.
12202         * dce.c (deletable_insn_p): Likewise.
12203         (mark_nonreg_stores_1): Likewise.
12204         (mark_nonreg_stores_2): Likewise.
12205         * df-scan.c (df_find_hard_reg_defs): Likewise.
12206         (df_uses_record): Likewise.
12207         (df_get_call_refs): Likewise.
12208         * dwarf2out.c (mem_loc_descriptor): Likewise.
12209         * haifa-sched.c (haifa_classify_rtx): Likewise.
12210         * ira-build.c (create_insn_allocnos): Likewise.
12211         * ira-costs.c (scan_one_insn): Likewise.
12212         * ira.c (equiv_init_movable_p): Likewise.
12213         (rtx_moveable_p): Likewise.
12214         (interesting_dest_for_shprep): Likewise.
12215         * jump.c (mark_jump_label_1): Likewise.
12216         * postreload-gcse.c (record_opr_changes): Likewise.
12217         * postreload.c (reload_cse_simplify): Likewise.
12218         (struct reg_use): Add source expr.
12219         (reload_combine): Check for clobber high.
12220         (reload_combine_note_use): Likewise.
12221         (reload_cse_move2add): Likewise.
12222         (move2add_note_store): Likewise.
12223         * print-rtl.c (print_pattern): Likewise.
12224         * recog.c (decode_asm_operands): Likewise.
12225         (store_data_bypass_p): Likewise.
12226         (if_test_bypass_p): Likewise.
12227         * regcprop.c (kill_clobbered_value): Likewise.
12228         (kill_set_value): Likewise.
12229         * reginfo.c (reg_scan_mark_refs): Likewise.
12230         * reload1.c (maybe_fix_stack_asms): Likewise.
12231         (eliminate_regs_1): Likewise.
12232         (elimination_effects): Likewise.
12233         (mark_not_eliminable): Likewise.
12234         (scan_paradoxical_subregs): Likewise.
12235         (forget_old_reloads_1): Likewise.
12236         * reorg.c (find_end_label): Likewise.
12237         (try_merge_delay_insns): Likewise.
12238         (redundant_insn): Likewise.
12239         (own_thread_p): Likewise.
12240         (fill_simple_delay_slots): Likewise.
12241         (fill_slots_from_thread): Likewise.
12242         (dbr_schedule): Likewise.
12243         * resource.c (update_live_status): Likewise.
12244         (mark_referenced_resources): Likewise.
12245         (mark_set_resources): Likewise.
12246         * rtl.c (copy_rtx): Likewise.
12247         * rtlanal.c (reg_referenced_p): Likewise.
12248         (single_set_2): Likewise.
12249         (noop_move_p): Likewise.
12250         (note_stores): Likewise.
12251         * sched-deps.c (sched_analyze_reg): Likewise.
12252         (sched_analyze_insn): Likewise.
12254 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
12256         * cse.c (invalidate_reg): New function extracted from...
12257         (invalidate): ...here.
12258         (canonicalize_insn): Check for clobber high.
12259         (invalidate_from_clobbers): invalidate clobber highs.
12260         (invalidate_from_sets_and_clobbers): Likewise.
12261         (count_reg_usage): Check for clobber high.
12262         (insn_live_p): Likewise.
12263         * cselib.c (cselib_expand_value_rtx_1):Likewise.
12264         (cselib_invalidate_regno): Check for clobber in setter.
12265         (cselib_invalidate_rtx): Pass through setter.
12266         (cselib_invalidate_rtx_note_stores):
12267         (cselib_process_insn): Check for clobber high.
12268         * cselib.h (cselib_invalidate_rtx): Add operand.
12270 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
12272         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
12273         (mark_not_eliminable): Likewise.
12274         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
12275         * lra-lives.c (process_bb_lives): Check for clobber high.
12276         * lra.c (new_insn_reg): Remember clobber highs.
12277         (collect_non_operand_hard_regs): Check for clobber high.
12278         (lra_set_insn_recog_data): Likewise.
12279         (add_regs_to_insn_regno_info): Likewise.
12280         (lra_update_insn_regno_info): Likewise.
12282 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
12284         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
12285         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
12287 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
12289         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
12290         (copy_insn_1): Likewise.
12291         (gen_hard_reg_clobber_high): New gen function.
12292         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
12293         * genemit.c (gen_exp): Likewise.
12294         (gen_emit_seq): Pass through info.
12295         (gen_insn): Check for CLOBBER_HIGH.
12296         (gen_expand): Pass through info.
12297         (gen_split): Likewise.
12298         (output_add_clobbers): Likewise.
12299         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
12300         (remove_clobbers): Likewise.
12301         * rtl.h (gen_hard_reg_clobber_high): New declaration.
12303 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
12305         * doc/rtl.texi (clobber_high): Add.
12306         (parallel): Add in clobber high
12307         * rtl.c (rtl_check_failed_code3): Add function.
12308         * rtl.def (CLOBBER_HIGH): Add expression.
12309         * rtl.h (RTL_CHECKC3): Add macro.
12310         (rtl_check_failed_code3): Add declaration.
12311         (XC3EXP): Add macro.
12313 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
12315         PR target/86386
12316         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
12317         cfun->machine->max_used_stack_alignment if needed.
12319 2018-08-04  Martin Sebor  <msebor@redhat.com>
12321         PR tree-optimization/86571
12322         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
12323         NaN output to 4.
12325 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
12327         PR target/86799
12328         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12329         Define.
12331 2018-08-03  Jeff Law  <law@redhat.com>
12333         PR target/86795
12334         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12335         Define to speculation_safe_value_not_needed.
12337 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
12339         * doc/gcov.texi (-x): Remove duplicate "to".
12340         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
12341         (-Wif-not-aligned): Remove duplicate "is".
12342         (-flto): Remove duplicate "the".
12343         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
12344         duplicate "v5.00.b".
12345         (MSP430 Options): Remove duplicate "and" from the description
12346         of "-mgprel-sec=regexp".
12347         (x86 Options): Remove duplicate copies of "vmldLog102" and
12348         vmlsLog104 from description of "-mveclibabi=type".
12350 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
12352         * internal-fn.h (first_commutative_argument): Declare.
12353         * internal-fn.c (first_commutative_argument): New function.
12354         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
12355         restrictions for pattern statements.  Use first_commutative_argument
12356         to look for commutative operands in calls to internal functions.
12358 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
12360         * Makefile.in (wide-int-range.o): New.
12361         * tree-vrp.c: Move all the wide_int_* functions to...
12362         * wide-int-range.cc: ...here.
12363         * tree-vrp.h: Move all the wide_int_* prototypes to...
12364         * wide-int-range.h: ...here.
12366 2018-08-03  Tom de Vries  <tdevries@suse.de>
12368         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
12369         UI_NONE.
12370         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
12371         * except.c (output_function_exception_table): Do early exit if
12372         targetm_common.except_unwind_info (&global_options) == UI_NONE.
12374 2018-08-03  Martin Liska  <mliska@suse.cz>
12376         * predict.c (dump_prediction): Change to 2 digits
12377         in fraction part.
12379 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
12381         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
12382         neon_dup_q to...
12383         (falkor_am_1_gtov_gtov): ... a new insn reservation.
12385 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
12387         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
12388         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
12389         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
12390         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
12391         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
12393 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
12395         * diagnostic-show-locus.c (diagnostic_show_locus): Use
12396         pp_take_prefix when saving the existing prefix.
12397         * diagnostic.c (diagnostic_append_note): Likewise.
12398         * langhooks.c (lhd_print_error_function): Likewise.
12399         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
12400         param's type.  Free the existing prefix.
12401         (pp_take_prefix): New function.
12402         (pretty_printer::pretty_printer): Drop the prefix parameter.
12403         Rename the length parameter to match the comment.
12404         (pretty_printer::~pretty_printer): Free the prefix.
12405         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
12406         parameter.
12407         (struct pretty_printer): Drop the "const" from "prefix" field's
12408         type and clarify memory management.
12409         (pp_set_prefix): Drop the "const" from the 2nd param.
12410         (pp_take_prefix): New decl.
12412 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
12414         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
12415         for word_mode_ok here instead of passing as argument.
12416         (expand_block_compare): Change select_block_compare_mode() call.
12417         (expand_strncmp_gpr_sequence): New function.
12418         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
12420 2018-08-02  Jeff Law  <law@redhat.com>
12422         PR target/86790
12423         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12424         Define to speculation_safe_value_not_needed.
12426         PR target/86784
12427         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12428         Define to speculation_safe_value_not_needed.
12430 2018-08-02  Tom de Vries  <tdevries@suse.de>
12432         PR target/86660
12433         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
12434         function.  Return UI_TARGET unconditionally.
12435         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
12436         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
12438 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
12440         * genemit.c (print_overload_test): Fix typo.
12442 2018-08-02  Richard Biener  <rguenther@suse.de>
12444         PR tree-optimization/86816
12445         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
12446         which checks for value availability before querying it.
12447         (gvn_uses_equal): Use it.
12448         (same_succ_hash): Likewise.
12449         (gimple_equal_p): Likewise.
12451 2018-08-02  Nick Clifton  <nickc@redhat.com>
12453         PR target/86813
12454         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12455         Define to speculation_safe_value_not_needed.
12457         PR target/86810
12458         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12459         Define to speculation_safe_value_not_needed.
12461         PR target/86810
12462         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12463         Define to speculation_safe_value_not_needed.
12465         PR target/86803
12466         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12467         Define to speculation_safe_value_not_needed.
12469         PR target/86797
12470         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12471         Define to speculation_safe_value_not_needed.
12473         PR target/86791
12474         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12475         Define to speculation_safe_value_not_needed.
12477         PR target/86789
12478         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12479         Define to speculation_safe_value_not_needed.
12481         PR target/86787
12482         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12483         Define to speculation_safe_value_not_needed.
12485         PR target/86782
12486         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
12487         speculation_safe_value_not_needed.
12489         PR target/86781
12490         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
12491         to speculation_safe_value_not_needed.
12493 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
12495         * doc/md.texi: Expand the documentation of instruction names
12496         to mention port-local uses.  Document '@' in pattern names.
12497         * read-md.h (overloaded_instance, overloaded_name): New structs.
12498         (mapping): Declare.
12499         (md_reader::handle_overloaded_name): New member function.
12500         (md_reader::get_overloads): Likewise.
12501         (md_reader::m_first_overload): New member variable.
12502         (md_reader::m_next_overload_ptr): Likewise.
12503         (md_reader::m_overloads_htab): Likewise.
12504         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
12505         m_next_overload_ptr and m_overloads_htab.
12506         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
12507         (get_mode_token, get_code_token, get_int_token): New functions.
12508         (map_attr_string): Add an optional argument that passes back
12509         the associated iterator.
12510         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
12511         (md_reader::handle_overloaded_name, add_overload_instance): New
12512         functions.
12513         (apply_iterators): Handle '@' names.  Report an error if '@'
12514         is used without iterators.
12515         (initialize_iterators): Initialize the new iterator_group fields.
12516         * genopinit.c (handle_overloaded_code_for)
12517         (handle_overloaded_gen): New functions.
12518         (main): Use them to print declarations of maybe_code_for_* and
12519         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
12520         * genemit.c (print_overload_arguments, print_overload_test)
12521         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
12522         (main): Use it to print definitions of maybe_code_for_* and
12523         maybe_gen_* functions.
12524         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
12525         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
12526         instead of explicit mode checks.
12527         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
12528         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
12529         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
12530         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
12531         (aarch64_expand_compare_and_swap): Likewise
12532         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
12533         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
12534         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
12535         (aarch64_constant_pool_reload_icode): Delete.
12536         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
12537         instead of aarch64_constant_pool_reload_icode.  Use
12538         code_for_aarch64_reload_mov instead of explicit mode checks.
12539         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
12540         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
12541         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
12542         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
12543         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
12544         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
12545         (aarch64_atomic_load_op_code): Delete.
12546         (aarch64_emit_atomic_load_op): Likewise.
12547         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
12548         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
12549         instead of aarch64_emit_atomic_load_op.
12550         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
12551         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
12552         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
12553         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
12554         character before the pattern name.
12555         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
12556         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
12557         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
12558         (aarch64_frecps<mode>): Likewise.
12559         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
12560         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
12561         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
12562         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
12563         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
12565 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
12567         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
12568         Allow HFmode constants if TARGET_FP_F16INST.
12570 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
12572         PR target/86014
12573         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
12574         No longer check last store for clobber of address register.
12576 2018-08-02  Martin Liska  <mliska@suse.cz>
12578         PR gcov-profile/86817
12579         * gcov.c (process_all_functions): New function.
12580         (main): Call it.
12581         (process_file): Move functions processing to
12582         process_all_functions.
12584 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
12586         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
12587         "const" to the "gimple *" and "rtx_insn *" parameters.
12588         * dumpfile.h (dump_user_location_t::dump_user_location_t):
12589         Likewise.
12590         (dump_location_t::dump_location_t): Likewise.
12592 2018-08-01  Martin Sebor  <msebor@redhat.com>
12594         PR tree-optimization/86650
12595         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
12596         rather than a "gcall *".  Directly pass the data of interest
12597         to percent_K_format, rather than building a temporary CALL_EXPR
12598         to hold it.
12599         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
12600         (gimple_fold_builtin_strncat): Adjust.
12601         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
12602         gcall* argument with gimple*.
12603         * gimple-ssa-warn-restrict.c (check_call): Same.
12604         (wrestrict_dom_walker::before_dom_children): Same.
12605         (builtin_access::builtin_access): Same.
12606         (check_bounds_or_overlap): Same
12607         (maybe_diag_overlap): Same.
12608         (maybe_diag_offset_bounds): Same.
12609         * tree-diagnostic.c (default_tree_printer): Move usage of
12610         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
12611         to this callsite.
12612         * tree-pretty-print.c (percent_K_format): Add argument.
12613         * tree-pretty-print.h: Add argument.
12614         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
12615         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
12616         (maybe_diag_stxncpy_trunc): Same.
12617         (handle_builtin_stxncpy): Same.
12618         (handle_builtin_strcat): Same.
12620 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
12622         * match.pd: Optimise pointer range checks.
12624 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
12626         PR tree-optimization/86758
12627         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
12628         to remove pattern statements.
12630 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
12632         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
12633         result of dfs_enumerate_from when constructing stmt_vec_infos,
12634         instead of additionally calling get_loop_body.
12636 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
12638         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
12639         parameter.
12640         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
12641         When creating an iv, assert that the step is not known to be zero.
12642         (vect_setup_realignment): Update call accordingly.
12643         * tree-vect-stmts.c (vectorizable_store): Likewise.
12644         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
12646 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
12648         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
12649         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
12650         (vectorizable_reduction): Likewise.
12651         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
12652         (vect_detect_hybrid_slp_stmts): Likewise.
12653         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
12655 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
12657         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
12658         (wide_int_set_zero_nonzero_bits): ...this.
12659         (zero_nonzero_bits_from_vr): Rename to...
12660         (vrp_set_zero_nonzero_bits): ...this.
12661         (extract_range_from_multiplicative_op_1): Abstract wide int
12662         code...
12663         (wide_int_range_multiplicative_op): ...here.
12664         (extract_range_from_binary_expr_1): Extract wide int binary
12665         operations into their own functions.
12666         (wide_int_range_lshift): New.
12667         (wide_int_range_can_optimize_bit_op): New.
12668         (wide_int_range_shift_undefined_p): New.
12669         (wide_int_range_bit_xor): New.
12670         (wide_int_range_bit_ior): New.
12671         (wide_int_range_bit_and): New.
12672         (wide_int_range_trunc_mod): New.
12673         (extract_range_into_wide_ints): New.
12674         (vrp_shift_undefined_p): New.
12675         (extract_range_from_multiplicative_op): New.
12676         (vrp_can_optimize_bit_op): New.
12677         * tree-vrp.h (value_range::dump): New.
12678         (wide_int_range_multiplicative_op): New.
12679         (wide_int_range_lshift):New.
12680         (wide_int_range_shift_undefined_p): New.
12681         (wide_int_range_bit_xor): New.
12682         (wide_int_range_bit_ior): New.
12683         (wide_int_range_bit_and): New.
12684         (wide_int_range_trunc_mod): New.
12685         (zero_nonzero_bits_from_bounds): Rename to...
12686         (wide_int_set_zero_nonzero_bits): ...this.
12687         (zero_nonzero_bits_from_vr): Rename to...
12688         (vrp_set_zero_nonzero_bits): ...this.
12689         (range_easy_mask_min_max): Rename to...
12690         (wide_int_range_can_optimize_bit_op): this.
12691         * vr-values.c (simplify_bit_ops_using_ranges): Rename
12692         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
12694 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
12696         * tree-vectorizer.h (vect_orig_stmt): New function.
12697         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
12698         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
12699         (vect_create_epilog_for_reduction): Likewise.
12700         (vectorizable_live_operation): Likewise.
12701         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
12702         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
12703         * tree-vect-stmts.c (vectorizable_call): Likewise.
12704         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
12706 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
12708         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
12709         argument.
12710         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
12711         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
12712         (vect_transform_loop): Likewise.
12713         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
12715 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
12717         * tree-vectorizer.h (vect_schedule_slp): Return void.
12718         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
12719         (vect_schedule_slp): Likewise.
12721 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
12723         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
12724         argument.
12725         (vect_transform_loop): Update calls accordingly.  Schedule SLP
12726         instances before the main loop, if any exist.
12728 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
12730         PR tree-optimization/86749
12731         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
12732         If the lhs is used in a COND_EXPR, check that it is being used
12733         as the "then" or "else" value.
12735 2018-08-01  Tom de Vries  <tdevries@suse.de>
12737         PR target/86800
12738         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
12739         speculation_safe_value_not_needed.
12741 2018-08-01  Richard Biener  <rguenther@suse.de>
12743         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
12744         as base and offset.
12746 2018-08-01  Martin Liska  <mliska@suse.cz>
12748         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
12749         format how successful transformation is dumped.
12750         (gimple_mod_pow2_value_transform): Likewise.
12751         (gimple_mod_subtract_transform): Likewise.
12752         (gimple_stringops_transform): Likewise.
12754 2018-08-01  Martin Liska  <mliska@suse.cz>
12756         PR value-prof/35543
12757         * value-prof.c (interesting_stringop_to_profile_p):
12758         Simplify the code and add BUILT_IN_MEMMOVE.
12759         (gimple_stringops_transform): Likewise.
12761 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
12763         * config/aarch64/aarch64-simd.md
12764         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
12765         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
12766         use GPI iterator instead of SI mode.
12768 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
12770         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
12771         rs6000_speculation_barrier.
12772         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
12773         new barrier pattern name.
12775 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
12777         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
12778         (speculation_barrier): New insn.
12780 2018-08-01  Richard Biener  <rguenther@suse.de>
12782         PR bootstrap/86724
12783         * graphite.h: Include isl/id.h and isl/space.h to allow build
12784         with ISL 0.20.
12786 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
12788         PR target/86651
12789         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
12790         mode for COFF targets.
12791         * defaults.h (TARGET_COFF): Define.
12792         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
12793         TARGET_COFF): Define.
12794         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
12795         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
12796         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
12798 2018-07-31  Alexandre Oliva <oliva@adacore.com>
12800         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
12801         * gimple-streamer-out.c (output_bb): Save it.
12802         * lto-streamer-in.c (input_struct_function_base): Restore
12803         instance discriminator if available.  Create map on demand.
12804         * lto-streamer-out.c (output_struct_function_base): Save it if
12805         available.
12806         * final.c (decl_to_instance_map): Document LTO strategy.
12808 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
12809             Olivier Hainque  <hainque@adacore.com>
12811         * debug.h (decl_to_instance_map_t): New type.
12812         (decl_to_instance_map): Declare.
12813         (maybe_create_decl_to_instance_map): New inline function.
12814         * final.c (bb_discriminator, last_bb_discriminator): New statics,
12815         to track basic block discriminators.
12816         (final_start_function_1): Initialize them.
12817         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
12818         bb_discriminator.
12819         (decl_to_instance_map): New variable.
12820         (map_decl_to_instance, maybe_set_discriminator): New functions.
12821         (notice_source_line): Set discriminator.
12823 2018-07-31  Ian Lance Taylor  <iant@golang.org>
12825         * targhooks.c (default_have_speculation_safe_value): Add
12826         ATTRIBUTE_UNUSED.
12828 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
12830         * dump-context.h: Include "pretty-print.h".
12831         (dump_context::refresh_dumps_are_enabled): New decl.
12832         (dump_context::emit_item): New decl.
12833         (class dump_context): Add fields "m_test_pp" and
12834         "m_test_pp_flags".
12835         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
12836         (temp_dump_context::get_dumped_text): New decl.
12837         (class temp_dump_context): Add field "m_pp".
12838         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
12839         (dump_context::refresh_dumps_are_enabled): ...and add a test for
12840         m_test_pp.
12841         (set_dump_file): Update for above change.
12842         (set_alt_dump_file): Likewise.
12843         (dump_loc): New overload, taking a pretty_printer *.
12844         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
12845         to any test pretty-printer.
12846         (make_item_for_dump_gimple_stmt): New function, adapted from
12847         optinfo::add_gimple_stmt.
12848         (dump_context::dump_gimple_stmt): Call it, and use the result,
12849         eliminating the direct usage of dump_file and alt_dump_file in
12850         favor of indirectly using them via emit_item.
12851         (make_item_for_dump_gimple_expr): New function, adapted from
12852         optinfo::add_gimple_expr.
12853         (dump_context::dump_gimple_expr): Call it, and use the result,
12854         eliminating the direct usage of dump_file and alt_dump_file in
12855         favor of indirectly using them via emit_item.
12856         (make_item_for_dump_generic_expr): New function, adapted from
12857         optinfo::add_tree.
12858         (dump_context::dump_generic_expr): Call it, and use the result,
12859         eliminating the direct usage of dump_file and alt_dump_file in
12860         favor of indirectly using them via emit_item.
12861         (make_item_for_dump_printf_va): New function, adapted from
12862         optinfo::add_printf_va.
12863         (make_item_for_dump_printf): New function.
12864         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
12865         and use the result, eliminating the direct usage of dump_file and
12866         alt_dump_file in favor of indirectly using them via emit_item.
12867         (make_item_for_dump_dec): New function.
12868         (dump_context::dump_dec): Call it, and use the result,
12869         eliminating the direct usage of dump_file and alt_dump_file in
12870         favor of indirectly using them via emit_item.
12871         (make_item_for_dump_symtab_node): New function, adapted from
12872         optinfo::add_symtab_node.
12873         (dump_context::dump_symtab_node): Call it, and use the result,
12874         eliminating the direct usage of dump_file and alt_dump_file in
12875         favor of indirectly using them via emit_item.
12876         (dump_context::begin_scope): Reimplement, avoiding direct usage
12877         of dump_file and alt_dump_file in favor of indirectly using them
12878         via emit_item.
12879         (dump_context::emit_item): New member function.
12880         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
12881         Set up test pretty-printer on the underlying context.  Call
12882         refresh_dumps_are_enabled.
12883         (temp_dump_context::~temp_dump_context): Call
12884         refresh_dumps_are_enabled.
12885         (temp_dump_context::get_dumped_text): New member function.
12886         (selftest::verify_dumped_text): New function.
12887         (ASSERT_DUMPED_TEXT_EQ): New macro.
12888         (selftest::test_capture_of_dump_calls): Run all tests twice, with
12889         and then without optinfo enabled.  Add uses of
12890         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
12891         * dumpfile.h: Update comment for the dump_* API.
12892         * optinfo-emit-json.cc
12893         (selftest::test_building_json_from_dump_calls): Update for new
12894         param for temp_dump_context ctor.
12895         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
12896         and "m_owned" field.
12897         (optinfo_item::~optinfo_item): Likewise.
12898         (optinfo::add_item): New member function.
12899         (optinfo::emit): Update comment.
12900         (optinfo::add_string): Delete.
12901         (optinfo::add_printf): Delete.
12902         (optinfo::add_printf_va): Delete.
12903         (optinfo::add_gimple_stmt): Delete.
12904         (optinfo::add_gimple_expr): Delete.
12905         (optinfo::add_tree): Delete.
12906         (optinfo::add_symtab_node): Delete.
12907         (optinfo::add_dec): Delete.
12908         * optinfo.h (class dump_context): New forward decl.
12909         (optinfo::add_item): New decl.
12910         (optinfo::add_string): Delete.
12911         (optinfo::add_printf): Delete.
12912         (optinfo::add_printf_va): Delete.
12913         (optinfo::add_gimple_stmt): Delete.
12914         (optinfo::add_gimple_expr): Delete.
12915         (optinfo::add_tree): Delete.
12916         (optinfo::add_symtab_node): Delete.
12917         (optinfo::add_dec): Delete.
12918         (optinfo::add_poly_int): Delete.
12919         (optinfo_item::optinfo_item): Remove "owned" param.
12920         (class optinfo_item): Remove field "m_owned".
12922 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
12924         PR middle-end/86705
12925         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
12926         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
12927         requested variable alignment.
12928         (expand_one_ssa_partition): Likewise.
12929         (expand_one_var): Likewise.
12931 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
12933         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
12934         to speculation_safe_value_not_needed.
12936 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
12938         * targhooks.h (speculation_safe_value_not_needed): New prototype.
12939         * targhooks.c (speculation_safe_value_not_needed): New function.
12940         * target.def (have_speculation_safe_value): Update documentation.
12941         * doc/tm.texi: Regenerated.
12943 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
12945         * config/aarch64/iterators.md (ALLI_TI): New iterator.
12946         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
12947         expand.
12948         (despeculate_copy<ALLI:mode>_insn): New insn.
12949         (despeculate_copyti_insn): New insn.
12950         (despeculate_simple<ALLI:mode>): New insn
12951         (despeculate_simpleti): New insn.
12952         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
12953         function.
12954         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
12955         aarch64_speculation_safe_value.
12956         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
12958 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
12960         * config/aarch64/aarch64-speculation.cc: New file.
12961         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
12962         before pass_reorder_blocks.
12963         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
12964         prototype.
12965         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
12966         X14 and X15 when tracking speculation.
12967         * config/aarch64/aarch64.md (register name constants): Add
12968         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
12969         (unspec): Add UNSPEC_SPECULATION_TRACKER.
12970         (speculation_barrier): New insn attribute.
12971         (cmp<mode>): Allow SP in comparisons.
12972         (speculation_tracker): New insn.
12973         (speculation_barrier): Add speculation_barrier attribute.
12974         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
12975         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
12976         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
12978 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
12980         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
12981         aarch64_track_speculation is true.
12982         (tb<optab><mode>1): Likewise.
12983         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
12984         generate CB[N]Z when tracking speculation.
12985         (aarch64_split_compare_and_swap): Likewise.
12986         (aarch64_split_atomic_op): Likewise.
12988 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
12990         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
12992 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
12994         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
12995         (speculation_barrier): New insn.
12997 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
12999         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
13000         * config/arm/arm.md (speculation_barrier): New expand.
13001         (speculation_barrier_insn): New pattern.
13003 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
13005         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
13006         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
13007         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
13008         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
13009         list.
13010         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
13011         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
13012         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
13013         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
13014         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
13015         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
13016         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
13017         * builtins.c (expand_speculation_safe_value): New function.
13018         (expand_builtin): Call it.
13019         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
13020         * doc/extend.texi: Document __builtin_speculation_safe_value.
13021         * doc/md.texi: Document "speculation_barrier" pattern.
13022         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
13023         TARGET_HAVE_SPECULATION_SAFE_VALUE.
13024         * doc/tm.texi: Regenerated.
13025         * target.def (have_speculation_safe_value, speculation_safe_value): New
13026         hooks.
13027         * targhooks.c (default_have_speculation_safe_value): New function.
13028         (default_speculation_safe_value): New function.
13029         * targhooks.h (default_have_speculation_safe_value): Add prototype.
13030         (default_speculation_safe_value): Add prototype.
13032 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
13034         * dump-context.h (dump_context::dump_loc): New decl.
13035         * dumpfile.c (dump_context::dump_loc): New member function.
13036         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
13037         and dump_gimple_stmt.
13038         (dump_context::dump_gimple_expr_loc): Likewise, using
13039         dump_gimple_expr.
13040         (dump_context::dump_generic_expr_loc): Likewise, using
13041         dump_generic_expr.
13042         (dump_context::dump_printf_loc_va): Likewise, using
13043         dump_printf_va.
13044         (dump_context::begin_scope): Explicitly using the global function
13045         "dump_loc", rather than the member function.
13047 2018-07-31  Martin Sebor  <msebor@redhat.com>
13049         PR tree-optimization/86741
13050         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
13052 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
13054         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
13055         depend on whether prefetch instructions will be emitted or not.
13056         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
13057         will be emitted or not.
13058         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
13059         (TARGET_SETMEM_PFD): New macros.
13061 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13063         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
13064         (NULL_STMT_VEC_INFO): Delete.
13065         (stmt_vec_info::operator*): Likewise.
13066         (stmt_vec_info::operator gimple *): Likewise.
13067         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
13068         of NULL_STMT_VEC_INFO.
13069         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
13070         (vect_reassociating_reduction_p): Likewise.
13071         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
13072         (vectorizable_store): Likewise.
13073         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
13074         (vec_info::free_stmt_vec_infos): Likewise.
13076 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13078         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
13079         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
13081 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13083         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
13084         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
13085         (vec_info::free_stmt_vec_info): New private member functions.
13086         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
13087         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
13088         * tree-parloops.c (gather_scalar_reductions): Remove calls to
13089         set_stmt_vec_info_vec and free_stmt_vec_infos.
13090         * tree-vect-loop.c (_loop_vec_info): Remove call to
13091         set_stmt_vec_info_vec.
13092         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
13093         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
13094         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
13095         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
13096         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
13097         assignments in {vec_info::,}new_stmt_vec_info that are redundant
13098         with the clearing in the xcalloc.
13099         (stmt_vec_info_vec): Delete.
13100         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
13101         (vectorize_loops): Likewise.
13102         (vec_info::~vec_info): Remove argument from call to
13103         free_stmt_vec_infos.
13104         (vec_info::add_stmt): Remove vinfo argument from call to
13105         new_stmt_vec_info.
13107 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13109         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
13110         rather than a gimple stmt.
13111         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
13112         information for pattern statements when passed the original
13113         statement; instead wait to be passed the pattern statement itself.
13114         Don't call set_vinfo_for_stmt here.
13115         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
13116         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
13117         stmt_vec_infos here.
13118         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
13119         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
13120         stmt_vec_infos entry.
13122 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13124         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
13125         * tree-vectorizer.c (vec_info::replace_stmt): New function.
13126         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
13127         * tree-vect-stmts.c (vectorizable_call): Likewise.
13128         (vectorizable_simd_clone_call): Likewise.
13130 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13132         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
13133         * tree-vectorizer.c (vec_info::remove_stmt): New function.
13134         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
13135         * tree-vect-loop.c (vect_transform_loop): Likewise.
13136         * tree-vect-slp.c (vect_schedule_slp): Likewise.
13137         * tree-vect-stmts.c (vect_remove_stores): Likewise.
13139 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13141         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
13142         (vect_dr_stmt): Delete.
13143         * tree-vectorizer.c (vec_info::lookup_dr): New function.
13144         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
13145         of DR_VECT_AUX.
13146         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
13147         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
13148         (vect_verify_datarefs_alignment, vect_peeling_supportable)
13149         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
13150         (vect_analyze_data_refs): Likewise.
13151         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
13152         argument.
13153         (vect_find_same_alignment_drs): Likewise.
13154         (vect_slp_analyze_node_dependences): Update calls accordingly.
13155         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
13156         instead of DR_VECT_AUX.
13157         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
13158         of a vector data references.  Use vec_info::lookup_dr instead of
13159         DR_VECT_AUX.
13160         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
13161         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
13162         instead of DR_VECT_AUX.
13164 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13166         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
13167         dr_vec_info.
13168         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
13169         accordingly.
13170         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
13171         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
13172         (vect_gen_prolog_loop_niters): Likewise.
13174 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13176         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
13177         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
13178         (vect_known_alignment_in_bytes, vect_dr_behavior)
13179         (vect_get_scalar_dr_size): Take references as dr_vec_infos
13180         instead of data_references.  Update calls to other routines for
13181         which the same change has been made.
13182         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
13183         dr_vec_infos instead of stmt_vec_infos.
13184         (vect_analyze_data_ref_dependence): Update call accordingly.
13185         (vect_slp_analyze_data_ref_dependence)
13186         (vect_record_base_alignments): Use DR_VECT_AUX.
13187         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
13188         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
13189         (vector_alignment_reachable_p, vect_get_data_access_cost)
13190         (vect_peeling_supportable, vect_analyze_group_access_1)
13191         (vect_analyze_group_access, vect_analyze_data_ref_access)
13192         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
13193         (vect_compile_time_alias, vect_small_gap_p)
13194         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
13195         (vect_supportable_dr_alignment): Take references as dr_vec_infos
13196         instead of data_references.  Update calls to other routines for
13197         which the same change has been made.
13198         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
13199         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
13200         (vect_slp_analyze_and_verify_node_alignment)
13201         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
13202         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
13203         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
13204         above changes.
13205         (_vect_peel_info::dr): Replace with...
13206         (_vect_peel_info::dr_info): ...this new field.
13207         (vect_peeling_hash_get_most_frequent)
13208         (vect_peeling_hash_choose_best_peeling): Update accordingly.
13209         (vect_peeling_hash_get_lowest_cost):
13210         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
13211         routines for which the same change has been made.
13212         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
13213         data_reference.
13214         * tree-vect-loop-manip.c (get_misalign_in_elems)
13215         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
13216         above changes.
13217         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
13218         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
13219         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
13220         (get_group_load_store_type, get_negative_load_store_type)
13221         (vect_get_data_ptr_increment, vectorizable_store)
13222         (vectorizable_load): Likewise.
13223         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
13224         Update calls to other routines for which the same change has been made.
13226 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13228         * tree-vectorizer.h (vec_info::move_dr): New member function.
13229         (dataref_aux): Rename to...
13230         (dr_vec_info): ...this and add "dr" and "stmt" fields.
13231         (_stmt_vec_info::dr_aux): Update accordingly.
13232         (_stmt_vec_info::data_ref_info): Delete.
13233         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
13234         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
13235         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
13236         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
13237         of data_ref.
13238         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
13239         (STMT_VINFO_DR_INFO): New macro.
13240         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
13241         (set_dr_misalignment): Update after rename of dataref_aux.
13242         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
13243         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
13244         initialization of STMT_VINFO_DATA_REF.
13245         * tree-vectorizer.c (vec_info::move_dr): New function.
13246         * tree-vect-patterns.c (vect_recog_bool_pattern)
13247         (vect_recog_mask_conversion_pattern)
13248         (vect_recog_gather_scatter_pattern): Use it.
13249         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
13250         the "dr" and "stmt" fields of dr_vec_info instead of
13251         STMT_VINFO_DATA_REF.
13253 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13255         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
13256         (is_pattern_stmt_p): Use it.
13257         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
13258         on pattern statements.
13260 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13262         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
13263         original stmt as a stmt_vec_info rather than a gimple stmt.
13264         (vect_pattern_recog_1): Take the statement directly as a
13265         stmt_vec_info, rather than via a gimple_stmt_iterator.
13266         Update call to vect_mark_pattern_stmts.
13267         (vect_pattern_recog): Update calls accordingly.
13269 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13271         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
13272         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
13273         a vect_def_type for the first argument.
13274         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
13275         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
13276         operand if it isn't defined by a vectorized statement.
13277         (vect_build_gather_load_calls): Remove the mask_dt argument and
13278         update calls to vect_get_vec_def_for_stmt_copy.
13279         (vectorizable_bswap): Likewise the dt argument.
13280         (vectorizable_call): Update calls to vectorizable_bswap and
13281         vect_get_vec_def_for_stmt_copy.
13282         (vectorizable_simd_clone_call, vectorizable_assignment)
13283         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
13284         (vectorizable_comparison): Update calls to
13285         vect_get_vec_def_for_stmt_copy.
13286         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
13287         vect_is_simple_use.
13288         (vect_get_loop_based_defs): Remove dt argument and update call
13289         to vect_get_vec_def_for_stmt_copy.
13290         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
13291         and vect_get_vec_def_for_stmt_copy.
13292         (vectorizable_load): Update calls to vect_build_gather_load_calls
13293         and vect_get_vec_def_for_stmt_copy.
13294         * tree-vect-loop.c (vect_create_epilog_for_reduction)
13295         (vectorizable_reduction, vectorizable_live_operation): Update calls
13296         to vect_get_vec_def_for_stmt_copy.
13298 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13300         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
13301         and gimple stmt arguments with a stmt_vec_info.
13302         (vect_record_base_alignments): Update calls accordingly.
13303         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
13304         and gimple stmt arguments with a stmt_vec_info.
13305         (vect_build_slp_tree_1): Remove vinfo argument and update call
13306         to vect_record_max_nunits.
13307         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
13308         and vect_record_max_nunits.
13310 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13312         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
13313         file and take a stmt_vec_info instead of a gimple stmt.
13314         (supportable_widening_operation, vect_finish_replace_stmt)
13315         (vect_finish_stmt_generation, vect_get_store_rhs)
13316         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
13317         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
13318         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
13319         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
13320         (vect_create_data_ref_ptr, bump_vector_ptr)
13321         (vect_permute_store_chain, vect_setup_realignment)
13322         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
13323         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
13324         (vectorizable_reduction, vectorizable_induction)
13325         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
13326         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
13327         than gimple stmts as arguments.
13328         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
13329         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
13330         (can_group_stmts_p, vect_check_gather_scatter)
13331         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
13332         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
13333         (vect_permute_load_chain, vect_shift_permute_load_chain)
13334         (vect_transform_grouped_load)
13335         (vect_record_grouped_load_vectors): Likewise.
13336         * tree-vect-loop.c (vect_fixup_reduc_chain)
13337         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
13338         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
13339         (vectorizable_reduction, vectorizable_induction)
13340         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
13341         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
13342         (vect_get_load_store_mask): Likewise.
13343         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
13344         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
13345         * tree-vect-stmts.c (vect_mark_relevant)
13346         (is_simple_and_all_uses_invariant)
13347         (exist_non_indexing_operands_for_use_p, process_use)
13348         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
13349         (vect_get_vec_def_for_operand, vect_get_vec_defs)
13350         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
13351         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
13352         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
13353         (get_negative_load_store_type, get_load_store_type)
13354         (vect_check_load_store_mask, vect_check_store_rhs)
13355         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
13356         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
13357         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
13358         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
13359         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
13360         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
13361         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
13362         (supportable_widening_operation): Likewise.
13364 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13366         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
13367         a stmt_vec_info instead of a gcall.
13368         (vect_check_gather_scatter): Update call accordingly.
13369         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
13370         of a gphi.
13371         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
13372         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
13373         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
13374         instead of a gimple stmt.
13375         (vect_transform_loop): Update calls accordingly.
13376         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
13377         stmt_vec_infos instead of gimple stmts.
13378         (vect_analyze_slp_instance): Update use accordingly.
13379         * tree-vect-stmts.c (read_vector_array, write_vector_array)
13380         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
13381         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
13382         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
13383         (vect_gen_widened_results_half, vect_get_loop_based_defs)
13384         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
13385         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
13386         down to subroutines.
13388 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13390         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
13391         of the worklist from a vector of gimple stmts to a vector of
13392         stmt_vec_infos.
13393         * tree-vect-stmts.c (vect_mark_relevant, process_use)
13394         (vect_mark_stmts_to_be_vectorized): Likewise
13396 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13398         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
13399         statement before passing it to vect_analyze_stmt.
13400         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
13401         the chain of phi vector definitions.  Track the exit phi via its
13402         stmt_vec_info.
13403         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
13404         STMT_VINFO_REDUC_DEF.
13405         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
13406         stmt_vec_infos to handle the statement chains.
13407         (vect_get_slp_defs): Record the first statement in the node
13408         using a stmt_vec_info.
13409         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
13410         statements here and pass their stmt_vec_info down to subroutines.
13411         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
13412         down to vect_finish_stmt_generation.
13413         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
13414         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
13415         stmt_vec_infos to subroutines.
13416         (vect_remove_stores): Use stmt_vec_infos to handle the statement
13417         chains.
13419 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13421         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
13422         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
13423         (vect_permute_store_chain, vect_setup_realignment)
13424         (vect_permute_load_chain, vect_shift_permute_load_chain)
13425         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
13426         stmts internally, and when passing values to other vectorizer routines.
13427         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
13428         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
13429         (vect_analyze_loop_operations, get_initial_def_for_reduction)
13430         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
13431         (vectorizable_reduction, vectorizable_induction)
13432         (vectorizable_live_operation, vect_transform_loop_stmt)
13433         (vect_transform_loop): Likewise.
13434         * tree-vect-patterns.c (vect_reassociating_reduction_p)
13435         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
13436         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
13437         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
13438         (vect_slp_analyze_node_operations_1): Likewise.
13439         * tree-vect-stmts.c (vect_mark_relevant, process_use)
13440         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
13441         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
13442         (vect_finish_stmt_generation_1, get_group_load_store_type)
13443         (get_load_store_type, vect_build_gather_load_calls)
13444         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
13445         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
13446         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
13447         (vectorizable_store, vectorizable_load, vectorizable_condition)
13448         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
13449         (supportable_widening_operation): Likewise.
13450         (vect_get_vector_types_for_stmt): Likewise.
13451         * tree-vectorizer.h (vect_dr_behavior): Likewise.
13453 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13455         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
13456         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
13457         (vect_permute_store_chain, vect_permute_load_chain)
13458         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
13459         repeated stmt_vec_info lookups.
13460         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
13461         (vect_update_ivs_after_vectorizer): Likewise.
13462         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
13463         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
13464         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
13465         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
13466         (vect_bb_slp_scalar_cost): Likewise.
13467         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
13469 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13471         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
13472         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
13473         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
13474         to get gassigns and gcalls, rather than operating on generc gimple
13475         stmts.
13476         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
13477         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
13478         (vectorizable_load, vect_analyze_stmt): Likewise.
13479         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
13481 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13483         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
13484         return stmt_vec_infos rather than gimple stmts.  Do not accept
13485         null arguments.
13486         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
13487         of a gimple stmt.
13488         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
13489         Update use of get_later_stmt.
13490         (vect_get_constant_vectors): Update call accordingly.
13491         (vect_schedule_slp_instance): Likewise
13492         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
13493         (vect_slp_analyze_instance_dependence): Likewise.
13494         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
13496 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13498         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
13499         (stmt_info_for_cost::stmt_info): ...this new field.
13500         (add_stmt_costs): Update accordingly.
13501         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
13502         (vect_get_known_peeling_cost): Likewise.
13503         (vect_estimate_min_profitable_iters): Likewise.
13504         * tree-vect-stmts.c (record_stmt_cost): Likewise.
13506 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13508         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
13509         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
13510         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
13511         accordingly.
13512         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
13514 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13516         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
13517         a gimple stmt to a stmt_vec_info.
13518         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
13520 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13522         * tree-vectorizer.h (vec_info::grouped_stores): Change from
13523         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
13524         (_loop_vec_info::reduction_chains): Likewise.
13525         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
13526         accordingly.
13527         * tree-vect-slp.c (vect_analyze_slp): Likewise.
13529 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13531         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
13532         a gimple stmt to a stmt_vec_info.
13533         (_stmt_vec_info::next_element): Likewise.
13534         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
13535         (vect_slp_analyze_and_verify_node_alignment)
13536         (vect_analyze_group_access_1, vect_analyze_group_access)
13537         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
13538         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
13539         (vect_supportable_dr_alignment): Update accordingly.
13540         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
13541         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
13542         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
13543         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
13544         * tree-vect-slp.c (vect_build_slp_tree_1)
13545         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
13546         (vect_split_slp_store_group, vect_analyze_slp_instance)
13547         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
13548         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
13549         (get_group_load_store_type, get_load_store_type)
13550         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
13551         (vect_transform_stmt, vect_remove_stores): Likewise.
13553 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13555         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
13556         than a gimple stmt.
13557         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
13558         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
13559         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
13560         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
13561         (vector_alignment_reachable_p, vect_get_data_access_cost)
13562         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
13563         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
13564         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
13565         (vect_analyze_group_access_1, vect_analyze_group_access)
13566         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
13567         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
13568         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
13569         result of vect_dr_stmt and use the stmt_vec_info instead of
13570         the associated gimple stmt.
13571         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
13572         (vect_gen_prolog_loop_niters): Likewise.
13573         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
13575 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13577         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
13578         to a vec<stmt_vec_info>.
13579         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
13580         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
13581         vec<stmt_vec_info>.
13582         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
13583         to a vec<stmt_vec_info>.
13584         (bst_traits::value_type, bst_traits::value_type): Likewise.
13585         (bst_traits::hash): Update accordingly.
13586         (vect_get_and_check_slp_defs): Change the stmts parameter from
13587         a vec<gimple *> to a vec<stmt_vec_info>.
13588         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
13589         (vect_build_slp_tree): Likewise.
13590         (vect_build_slp_tree_2): Likewise.  Update uses of
13591         SLP_TREE_SCALAR_STMTS.
13592         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
13593         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
13594         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
13595         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
13596         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
13597         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
13598         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
13599         (vect_get_constant_vectors, vect_get_slp_defs)
13600         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
13601         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
13602         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
13603         instead of gimple stmts.
13604         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
13605         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
13606         (vect_slp_analyze_instance_dependence): Update uses of
13607         SLP_TREE_SCALAR_STMTS.
13608         (vect_slp_analyze_and_verify_node_alignment): Likewise.
13609         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
13610         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
13611         (get_initial_defs_for_reduction): Likewise.
13612         (vect_create_epilog_for_reduction): Likewise.
13613         (vectorize_fold_left_reduction): Likewise.
13614         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
13615         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
13616         (can_vectorize_live_stmts): Likewise.
13618 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13620         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
13621         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
13622         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
13623         than gimple stmts.
13624         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
13625         of a gimple stmt.
13626         (gather_scalar_reductions): Update after above interface changes.
13627         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
13628         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
13629         than gimple stmts.
13630         (vect_force_simple_reduction): Likewise.
13631         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
13632         LOOP_VINFO_REDUCTIONS.
13633         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
13635 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13637         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
13638         a gimple stmt to a stmt_vec_info.
13639         * tree-vect-loop.c (vect_active_double_reduction_p)
13640         (vect_force_simple_reduction, vectorizable_reduction): Update
13641         accordingly.
13643 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13645         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
13646         vec<gimple *> to a vec<stmt_vec_info>.
13647         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
13648         the reduction_phis argument from a vec<gimple *> to a
13649         vec<stmt_vec_info>.
13650         (vectorizable_reduction): Likewise the phis local variable that
13651         is passed to vect_create_epilog_for_reduction.  Update for new type
13652         of SLP_TREE_VEC_STMTS.
13653         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
13654         (vectorizable_live_operation): Likewise.
13655         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
13656         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
13658 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13660         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
13661         a gimple stmt to a stmt_vec_info.
13662         (vectorizable_condition, vectorizable_live_operation)
13663         (vectorizable_reduction, vectorizable_induction): Pass back the
13664         vectorized statement as a stmt_vec_info.
13665         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
13666         use of STMT_VINFO_VEC_STMT.
13667         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
13668         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
13669         as stmt_vec_infos rather than gimple stmts.
13670         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
13671         to a stmt_vec_info.
13672         (vectorizable_live_operation): Likewise.
13673         (vectorizable_reduction, vectorizable_induction): Likewise,
13674         updating use of STMT_VINFO_VEC_STMT.
13675         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
13676         of STMT_VINFO_VEC_STMT.
13677         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
13678         (vectorizable_simd_clone_call, vectorizable_conversion)
13679         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
13680         (vectorizable_store, vectorizable_load, vectorizable_condition)
13681         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
13682         from a gimple stmt to a stmt_vec_info.
13683         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
13684         pointer to a stmt_vec_info to the vectorizable_* routines.
13686 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13688         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
13689         a gimple stmt to a stmt_vec_info.
13690         (is_pattern_stmt_p): Update accordingly.
13691         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
13692         (vect_record_grouped_load_vectors): Likewise.
13693         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
13694         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
13695         (vect_model_reduction_cost): Likewise.
13696         (vect_create_epilog_for_reduction): Likewise.
13697         (vectorizable_reduction, vectorizable_induction): Likewise.
13698         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
13699         Return the stmt_vec_info for the pattern statement.
13700         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
13701         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
13702         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
13703         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
13704         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
13705         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
13706         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
13707         (free_stmt_vec_info, vect_is_simple_use): Likewise.
13709 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13711         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
13712         (vect_finish_stmt_generation): Likewise.
13713         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
13714         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
13715         (vect_build_gather_load_calls): Use the return value of the above
13716         functions instead of a separate call to vinfo_for_stmt.  Use narrow
13717         scopes for the input gimple stmt and wider scopes for the associated
13718         stmt_vec_info.  Use vec_info::lookup_def when setting these
13719         stmt_vec_infos from an SSA_NAME definition.
13720         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
13721         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
13722         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
13723         (vectorizable_store, vectorizable_load, vectorizable_condition)
13724         (vectorizable_comparison): Likewise.
13725         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
13726         (vectorizable_reduction): Likewise.
13728 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13730         * tree-vectorizer.h (vect_is_simple_use): Add an optional
13731         stmt_vec_info * parameter before the optional gimple **.
13732         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
13733         (process_use, vect_get_vec_def_for_operand_1): Update callers.
13734         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
13735         * tree-vect-loop.c (vectorizable_reduction): Likewise.
13736         (vectorizable_live_operation): Likewise.
13737         * tree-vect-patterns.c (type_conversion_p): Likewise.
13738         (vect_look_through_possible_promotion): Likewise.
13739         (vect_recog_rotate_pattern): Likewise.
13740         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
13742 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13744         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
13745         a typedef to a wrapper class.
13746         (NULL_STMT_VEC_INFO): New macro.
13747         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
13748         (stmt_vec_info::operator*): New function.
13749         (stmt_vec_info::operator gimple *): Likewise.
13750         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
13751         (add_stmt_costs): Likewise.
13752         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
13753         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
13754         (vect_get_known_peeling_cost): Likewise.
13755         (vect_estimate_min_profitable_iters): Likewise.
13756         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
13757         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
13758         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
13759         (vectorizable_store, free_stmt_vec_infos): Likewise.
13760         (new_stmt_vec_info): Change return type of xcalloc to
13761         _stmt_vec_info *.
13763 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13765         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
13766         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
13767         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
13768         a single_imm_use-based sequence.
13769         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
13771 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13773         * tree-vectorizer.h (vec_info::lookup_def): Declare.
13774         * tree-vectorizer.c (vec_info::lookup_def): New function.
13775         * tree-vect-patterns.c (vect_get_internal_def): Use it.
13776         (vect_widened_op_tree): Likewise.
13777         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
13778         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
13779         (vectorizable_reduction): Likewise.
13780         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
13781         of a gimple *.
13782         (vect_is_slp_reduction): Update calls accordingly.  Use
13783         vec_info::lookup_def.
13784         (vect_is_simple_reduction): Likewise
13785         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
13787 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13789         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
13790         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
13791         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
13792         of vinfo_for_stmt.
13793         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
13794         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
13795         (vect_update_vf_for_slp, vect_analyze_loop_operations)
13796         (vect_is_slp_reduction, vectorizable_induction)
13797         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
13798         * tree-vect-patterns.c (vect_init_pattern_stmt):
13799         (vect_determine_min_output_precision_1, vect_determine_precisions)
13800         (vect_pattern_recog): Likewise.
13801         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
13802         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
13803         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
13804         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
13805         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
13806         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
13807         info field from a loop to a loop_vec_info.
13809 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13811         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
13812         (vec_info::add_stmt): Declare.
13813         * tree-vectorizer.c (vec_info::add_stmt): New function.
13814         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
13815         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
13816         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
13817         (vectorizable_induction): Likewise.
13818         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
13819         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
13820         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
13821         (vectorizable_load): Likewise.
13822         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
13823         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
13824         (vect_recog_gather_scatter_pattern): Likewise.
13825         (append_pattern_def_seq): Likewise.  Remove a check that is
13826         performed by add_stmt itself.
13828 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13830         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
13831         which make_ssa_name was called with new_stmt before new_stmt
13832         had been created.
13834 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13836         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
13837         split out from...
13838         (vect_is_slp_reduction): ...here...
13839         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
13840         that are already known to be false.
13842 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13844         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
13845         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
13846         STMT_VINFO_NUM_SLP_USES when it's true.
13847         (vect_free_slp_instance): Add a final_p parameter and pass it to
13848         vect_free_slp_tree.
13849         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
13850         (vect_analyze_slp_instance): Likewise.
13851         (vect_slp_analyze_operations): Likewise.
13852         (vect_slp_analyze_bb_1): Likewise.
13853         * tree-vectorizer.c (vec_info): Likewise.
13854         * tree-vect-loop.c (vect_transform_loop): Likewise.
13856 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13858         * tree-vect-loop.c (vectorizable_reduction): Assert that the
13859         function is not called for second and subsequent members of
13860         a reduction group.
13862 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13864         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
13865         cases for nested loops from here to ...
13866         (vect_create_epilog_for_reduction): ...here.  Only call
13867         vect_is_simple_use for inner-loop reductions.
13869 2018-07-31  Martin Liska  <mliska@suse.cz>
13871         PR gcov-profile/85338
13872         PR gcov-profile/85350
13873         PR gcov-profile/85372
13874         * profile.c (struct location_triplet): New.
13875         (struct location_triplet_hash): Likewise.
13876         (output_location): Do not output a BB that
13877         is already recorded for a line.
13878         (branch_prob): Use streamed_locations.
13880 2018-07-31  Martin Liska  <mliska@suse.cz>
13882         PR gcov-profile/85370
13883         * coverage.c (coverage_begin_function): Do not mark target
13884         clones as artificial functions.
13886 2018-07-31  Martin Liska  <mliska@suse.cz>
13888         PR gcov-profile/83813
13889         PR gcov-profile/84758
13890         PR gcov-profile/85217
13891         PR gcov-profile/85332
13892         * profile.c (branch_prob): Do not record GOTO expressions
13893         for GIMPLE statements which locations are already streamed.
13895 2018-07-31  Olivier Hainque  <hainque@adacore.com>
13897         * gcc.c (handle_spec_function): Accept a soft_matched_part
13898         argument, as do_spec_1.  Pass it down to ...
13899         (eval_spec_function): Accept a soft_matched_part argument,
13900         and pass it down to ...
13901         (do_spec_2): Accept a soft_matched_part argument, and pass
13902         it down to do_spec_1.
13903         (do_spec_1): Pass soft_matched_part to handle_spec_function.
13904         (handle_braces): Update call to handle_spec_function.
13905         (driver::set_up_specs): Update calls to do_spec_2.
13906         (compare_debug_dump_opt_spec_function): Likewise.
13907         (compare_debug_self_opt_spec_function): Likewise.
13909 2018-07-31  Olivier Hainque  <hainque@adacore.com>
13911         * common.opt (nolibc): New option.
13912         * doc/invoke.texi (Link Options): Document it.
13913         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
13914         * config/alpha/linux.h: Likewise.
13915         * config/arc/elf.h: Likewise.
13916         * config/arm/uclinux-elf.h: Likewise.
13917         * config/arm/unknown-elf.h: Likewise.
13918         * config/avr/avrlibc.h: Likewise.
13919         * config/bfin/bfin.h: Likewise.
13920         * config/bfin/linux.h: Likewise.
13921         * config/bfin/uclinux.h: Likewise.
13922         * config/darwin.h: Likewise.
13923         * config/darwin10.h: Likewise.
13924         * config/darwin12.h: Likewise.
13925         * config/gnu-user.h: Likewise.
13926         * config/lm32/uclinux-elf.h: Likewise.
13927         * config/pa/pa-hpux11.h: Likewise.
13928         * config/pa/pa64-hpux.h: Likewise.
13929         * config/sparc/sparc.h: Likewise.
13931 2018-07-31  Olivier Hainque  <hainque@adacore.com>
13933         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
13934         undefined variables.
13936 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
13938         PR target/86640
13939         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
13940         instead of GEN_INT.
13942 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
13944         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
13945         terminated string literal.
13947 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
13949         PR rtl-optimization/85160
13950         * combine.c (is_just_move): New function.
13951         (try_combine): Allow combining two instructions into two if neither of
13952         the original instructions was a move.
13954 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
13956         PR target/86673
13957         * doc/extend.texi (Global Register Variables): Discourage use of type
13958         qualifiers.
13959         (Local Register Variables): Likewise.
13961 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
13963         PR tree-optimization/86506
13964         * hwint.h (ceil_log2): Resync with hwint.c implementation.
13966 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
13968         PR target/86547
13969         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
13970         hard_regno, make sure no insn between `from` and `to` clobbers it.
13972 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
13973             Tom de Vries  <tdevries@suse.de>
13975         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
13976         (PTX_DEFAULT_RUNTIME_DIM): ... this.
13977         (nvptx_goacc_validate_dims): Set default worker and gang dims to
13978         PTX_DEFAULT_RUNTIME_DIM.
13979         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
13981 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
13983         * config/pa/pa.c (pa_output_addr_vec): Align address table.
13984         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
13985         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
13987 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
13989         * config/rs6000/constraints.md (wG constraint): Delete, no longer
13990         used.
13991         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
13992         predicate to reflect toc fusion has been deleted.
13993         (toc_fusion_mem_raw): Delete, no longer used.
13994         (toc_fusion_mem_wrapped): Likewise.
13995         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
13996         fusion mask bit.
13997         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
13998         Delete, no longer used.
13999         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
14000         meant to be used for toc fusion.
14001         (rs6000_debug_print_mode): Delete toc fusion debugging.
14002         (rs6000_debug_reg_global): Likewise.
14003         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
14004         fusion and secondary reload support that were never used.
14005         (rs6000_option_override_internal): Delete TOC fusion, that was only
14006         partially defined, and it did not work unless you also used the
14007         -mcmodel= switch.
14008         (rs6000_legitimate_address_p): Delete TOC fusion support.
14009         (rs6000_opt_masks): Likewise.
14010         (fusion_wrap_memory_address): Delete function, no longer used.
14011         (fusion_split_address); Delete TOC fusion support.
14012         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
14013         longer used with toc fusion being deleted.
14014         (TARGET_TOC_FUSION_FP): Likewise.
14015         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
14016         UNSPEC.
14017         (toc fusion spliter): Delete TOC fusion support.
14018         (toc_fusionload_<mode>): Likewise.
14019         (toc_fusionload_di): Likewise.
14020         (fusion_gpr_load_<mode>): Delete generator function, this insn no
14021         longer needs to be named.  Rename predicate to delete TOC fusion.
14022         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
14023         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
14024         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
14025         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
14026         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
14028 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14030         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
14031         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
14032         __int128 in built-in function prototypes.
14033         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
14034         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
14036 2018-07-27  Martin Sebor  <msebor@redhat.com>
14038         PR tree-optimization/86696
14039         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
14040         types, including enums.
14041         (handle_char_store): Be prepared for the above function to fail.
14043 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
14045         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
14046         when optimization level is lower than 2 or optimize for size.
14048 2018-07-26  Martin Sebor  <msebor@redhat.com>
14050         PR tree-optimization/86043
14051         PR tree-optimization/86042
14052         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
14053         (get_string_cst_length): Rename...
14054         (get_min_string_length): ...to this.  Add argument.
14055         (handle_char_store): Extend to handle multi-character stores by
14056         MEM_REF.
14057         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
14058         * tree.h (initializer_zerop): Add argument.
14060 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
14062         PR middle-end/86660
14063         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
14064         declare target to variables if they have always,{to,from,tofrom} map
14065         kinds.
14067 2018-07-26  Martin Liska  <mliska@suse.cz>
14069         PR lto/86548
14070         * lto-wrapper.c: Add linker_output as prefix
14071         for ltrans_output_file.
14073 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
14075         PR rtl-optimization/85805
14076         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
14077         value for hard registers if that was written in the same mode.
14079 2018-07-26  Martin Liska  <mliska@suse.cz>
14081         PR gcov-profile/86536
14082         * gcov.c (format_gcov): Use printf format %.*f directly
14083         and do not handle special values.
14085 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
14087         * common/config/arc/arc-common.c (arc_option_optimization_table):
14088         Update default optimizations for size.
14090 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
14092         * config/arc/arc.md (movsf_insn): Add short instruction selection.
14093         * config/arc/constraints.md (CfZ): New constraint.
14094         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
14095         (subsf3_fpu): Likewise.
14096         (cmpsf_fpu): Likewise.
14097         (cmpsf_fpu_uneq): Likewise.
14099 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
14101         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
14102         accesses as well.
14103         (arc_is_uncached_mem_p): uncached applies to both the variable and
14104         the pointer.
14106 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
14108         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
14109         register names.
14111 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
14113         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
14114         field "m_scopes" from vec to auto_vec.
14116 2018-07-25  Martin Liska  <mliska@suse.cz>
14118         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
14119         return type.
14121 2018-07-25  Richard Biener  <rguenther@suse.de>
14123         PR debug/86654
14124         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
14125         special wrt context_die late.
14126         (gen_subprogram_die): Re-use DIEs in local scope.
14128 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
14130         PR tree-optimization/86644
14131         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
14133 2018-07-25  Martin Liska  <mliska@suse.cz>
14135         PR middle-end/86645
14136         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
14137         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
14139 2018-07-25  Martin Liska  <mliska@suse.cz>
14141         PR sanitizer/79635
14142         * params.def: Explain ASan abbreviation and provide
14143         a documentation link.
14145 2018-07-24  Martin Sebor  <msebor@redhat.com>
14147         PR tree-optimization/86622
14148         PR tree-optimization/86532
14149         * builtins.h (string_length): Declare.
14150         * builtins.c (c_strlen): Correct handling of non-constant offsets.
14151         (check_access): Be prepared for non-constant length ranges.
14152         (string_length): Make extern.
14153         * expr.c (string_constant): Only handle the minor non-constant
14154         array index.  Use string_constant to compute the length of
14155         a generic string constant.
14157 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
14159         PR tree-optimization/86618
14160         * tree-vect-stmts.c (vectorizable_call): Don't take the address
14161         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
14163 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
14165         PR tree-optimization/86636
14166         * json.cc (json::object::set): Fix comment.  Add assertions.
14167         (json::array::append): Move here from json.h.  Add comment and an
14168         assertion.
14169         (json::string::string): Likewise.
14170         * json.h (json::array::append): Move to json.cc.
14171         (json::string::string): Likewise.
14172         * optinfo-emit-json.cc
14173         (optrecord_json_writer::impl_location_to_json): Assert that we
14174         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
14175         wrapper around it.  Expand the location once, rather than three
14176         times.
14177         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
14178         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
14179         wrappers.
14180         (optrecord_json_writer::optinfo_to_json): Likewise, in four
14181         places.  Fix some overlong lines.
14183 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
14185         * config/aarch64/aarch64-simd.md
14186         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
14187         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
14188         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
14189         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
14190         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
14191         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
14192         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
14193         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
14194         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
14196 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
14198         PR middle-end/86627
14199         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
14200         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
14201         and abs_d == d, do the power of two handling if profitable.
14203 2018-07-24  Richard Biener  <rguenther@suse.de>
14205         * match.pd: Add BIT_FIELD_REF canonicalizations.
14207 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
14209         PR c/86617
14210         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
14212 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
14214         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
14215         terminated STRING_CST object.
14217 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
14219         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
14221 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
14223         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
14224         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
14225         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
14226         the elements into a register.
14227         (rs6000_split_v4si_init_di_reg): Delete.
14228         (rs6000_split_v4si_init): Delete.
14229         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
14230         (vsx_init_v4si): Rewrite as a define_expand.
14232 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
14234         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
14235         zero_extend argument from memory): New.
14237 2018-07-22  Martin Sebor  <msebor@redhat.com>
14239         PR bootstrap/86621
14240         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
14241         diagnosing calls with unknown arguments unless -Walloca-larger-than
14242         is restricted to less than PTRDIFF_MAX bytes.
14244 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
14246         * doc/gcov.texi (Invoking Gcov): Editorial changes.
14248 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
14250         * pretty-print.c (text_info::set_location): Remove redundant
14251         "line_table" parameter from call to rich_location::set_range.
14253 2018-07-20  Martin Sebor  <msebor@redhat.com>
14255         PR middle-end/82063
14256         * builtins.c (expand_builtin_alloca): Adjust.
14257         * calls.c (alloc_max_size): Simplify.
14258         * cgraphunit.c (cgraph_node::expand): Adjust.
14259         * common.opt (larger_than_size, warn_frame_larger_than): Remove
14260         variables.
14261         (frame_larger_than_size): Same.
14262         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
14263         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
14264         Initialize.
14265         * doc/invoke.texi (GCC Command Options): Document option arguments.
14266         Explain byte-size arguments and suffixes.
14267         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
14268         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
14269         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
14270         * doc/options.texi (UInteger): Expand.
14271         (Host_Wide_Int, ByteSize): Document new properties.
14272         * final.c (final_start_function_1): Include sizes in an error message.
14273         * function.c (frame_offset_overflow): Same.
14274         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
14275         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
14276         Diagnose unbounded alloca calls only for limits of less than
14277         PTRDIFF_MAX.
14278         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
14279         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
14280         for alloca(0).
14281         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
14282         only for limits of less than PTRDIFF_MAX.
14283         * langhooks-def.h (lhd_handle_option): Change function argument
14284         to HOST_WIDE_INT.
14285         * langhooks.c (lhd_handle_option): Same.
14286         * langhooks.h (handle_option): Same.
14287         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
14288         ByteSize flags.
14289         (var_type, var_type_struct): Same.
14290         (var_set): Handle ByteSize flag.
14291         * optc-gen.awk: Add comments to output to ease debugging.  Make
14292         use of HOST_WIDE_INT where appropriate.
14293         * opts-gen-save.awk:  Use %lx to format unsigned long.
14294         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
14295         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
14296         arguments.  Parse bytes-size suffixes.
14297         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
14298         (enum_value_to_arg): Same.
14299         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
14300         (handle_option): Adjust.
14301         (generate_option): Change function argument to HOST_WIDE_INT.
14302         (cmdline_handle_error): Adjust.
14303         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
14304         (set_option): Change function argument to HOST_WIDE_INT.
14305         (option_enabled): Handle cl_host_wide_int.
14306         (get_option_state): Handle CLVC_SIZE.
14307         (control_warning_option): Same.
14308         * opts.c (common_handle_option): Change function argument to
14309         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
14310         OPT_Wvla_larger_than_.
14311         * opts.h (enum cl_var_type): Add an enumerator.
14312         * stor-layout.c (layout_decl): Print a more meaningful warning.
14313         * toplev.c (output_stack_usage): Adjust.
14315 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
14317         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
14318         call to inline_expand_builtin_string_cmp.
14319         (expand_builtin_strcmp): Likewise.
14320         (expand_builtin_strncmp): Likewise.
14321         (inline_string_cmp): Delete the last parameter, change char_type_node
14322         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
14323         two operands.
14324         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
14325         the inlining expansion on target where the type of the call has same or
14326         narrower precision than unsigned char.
14328 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
14330         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
14331         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
14332         * common.opt (fsave-optimization-record): New option.
14333         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
14334         * doc/invoke.texi (-fsave-optimization-record): New option.
14335         * dumpfile.c: Include "optinfo-emit-json.h".
14336         (struct kv_pair): Move to coretypes.h.
14337         (optgroup_options): Make non-static.
14338         (dump_context::end_scope): Call
14339         optimization_records_maybe_pop_dump_scope.
14340         * dumpfile.h (optgroup_options): New decl.
14341         * json.cc: New file.
14342         * json.h: New file.
14343         * optinfo-emit-json.cc: New file.
14344         * optinfo-emit-json.h: New file.
14345         * optinfo.cc: Include "optinfo-emit-json.h".
14346         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
14347         (optinfo_enabled_p): Check optimization_records_enabled_p.
14348         (optinfo_wants_inlining_info_p): Likewise.
14349         * optinfo.h: Update comment.
14350         * profile-count.c (profile_quality_as_string): New function.
14351         * profile-count.h (profile_quality_as_string): New decl.
14352         (profile_count::quality): New accessor.
14353         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
14354         and optinfo_emit_json_cc_tests.
14355         * selftest.h (selftest::json_cc_tests): New decl.
14356         (selftest::optinfo_emit_json_cc_tests): New decl.
14357         * toplev.c: Include "optinfo-emit-json.h".
14358         (compile_file): Call optimization_records_finish.
14359         (do_compile): Call optimization_records_start.
14360         * tree-ssa-live.c: Include optinfo.h.
14361         (remove_unused_scope_block_p): Retain inlining information if
14362         optinfo_wants_inlining_info_p returns true.
14364 2018-07-20  Richard Biener  <rguenther@suse.de>
14366         PR debug/86585
14367         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
14368         to cover -flto-partition=none.
14370 2018-07-20  Martin Liska  <mliska@suse.cz>
14372         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
14373         (get_decl_source_range): Remove unused function.
14375 2018-07-20  Richard Biener  <rguenther@suse.de>
14377         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
14378         (struct vn_phi_s): Likewise.
14379         (struct vn_reference_s): Likewise.
14380         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
14381         for searching the slot of an entry known to be in the hash itself.
14382         (vn_phi_hasher::equal): Likewise.
14383         (vn_reference_hasher::equal): Likewise.
14384         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
14385         globals.
14386         (optimistic_info, current_info): Remove, keeping only valid_info.
14387         (vn_reference_lookup_1): Remove fallback lookup.
14388         (vn_reference_lookup_2): Likewise.
14389         (vn_nary_op_lookup_1): Likewise.
14390         (vn_phi_lookup): Likewise.
14391         (vn_nary_build_or_lookup_1): Make sure to not chain the built
14392         hash element.
14393         (vn_reference_insert): Adjust, chain the inserted hash element
14394         at last_inserted_ref.
14395         (vn_reference_insert_pieces): Likewise.
14396         (visit_reference_op_call): Likewise.
14397         (vn_nary_op_insert_into): Chain the inserted hash element at
14398         last_inserted_nary.
14399         (vn_nary_op_insert_pieces): Adjust.
14400         (vn_nary_op_insert): Likewise.
14401         (vn_nary_op_insert_stmt): Likewise.
14402         (vn_phi_insert): Adjust, chain the inserted hash element at
14403         last_inserted_phi.
14404         (process_scc): Remove clearing and copying the optimistic
14405         table.  Instead remove elements inserted during an optimistic
14406         iteration from the single table we maintain.
14407         (init_scc_vn): Adjust.
14408         (free_scc_vn): Likewise.
14409         (sccvn_dom_walker::record_cond): Likewise.
14410         (sccvn_dom_walker::after_dom_children): Likewise.
14412 2018-07-19  Martin Sebor  <msebor@redhat.com>
14414         PR tree-optimization/84047
14415         PR tree-optimization/83776
14416         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
14417         (check_array_bounds): Call it.
14419 2018-07-19  Martin Sebor  <msebor@redhat.com>
14421         * align.h (align_flags): Use member initialization.
14423 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
14425         * Makefile.in (OBJS): Add optinfo.o.
14426         * coretypes.h (class symtab_node): New forward decl.
14427         (struct cgraph_node): New forward decl.
14428         (class varpool_node): New forward decl.
14429         * dump-context.h: New file.
14430         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
14431         "tree-pass.h".
14432         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
14433         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
14434         (set_alt_dump_file): Likewise.
14435         (dump_context::~dump_context): New dtor.
14436         (dump_gimple_stmt): Move implementation to...
14437         (dump_context::dump_gimple_stmt): ...this new member function.
14438         Add the stmt to any pending optinfo, creating one if need be.
14439         (dump_gimple_stmt_loc): Move implementation to...
14440         (dump_context::dump_gimple_stmt_loc): ...this new member function.
14441         Start a new optinfo and add the stmt to it.
14442         (dump_gimple_expr): Move implementation to...
14443         (dump_context::dump_gimple_expr): ...this new member function.
14444         Add the stmt to any pending optinfo, creating one if need be.
14445         (dump_gimple_expr_loc): Move implementation to...
14446         (dump_context::dump_gimple_expr_loc): ...this new member function.
14447         Start a new optinfo and add the stmt to it.
14448         (dump_generic_expr): Move implementation to...
14449         (dump_context::dump_generic_expr): ...this new member function.
14450         Add the tree to any pending optinfo, creating one if need be.
14451         (dump_generic_expr_loc): Move implementation to...
14452         (dump_context::dump_generic_expr_loc): ...this new member
14453         function.  Add the tree to any pending optinfo, creating one if
14454         need be.
14455         (dump_printf): Move implementation to...
14456         (dump_context::dump_printf_va): ...this new member function.  Add
14457         the text to any pending optinfo, creating one if need be.
14458         (dump_printf_loc): Move implementation to...
14459         (dump_context::dump_printf_loc_va): ...this new member function.
14460         Start a new optinfo and add the stmt to it.
14461         (dump_dec): Move implementation to...
14462         (dump_context::dump_dec): ...this new member function.  Add the
14463         value to any pending optinfo, creating one if need be.
14464         (dump_context::dump_symtab_node): New member function.
14465         (dump_context::get_scope_depth): New member function.
14466         (dump_context::begin_scope): New member function.
14467         (dump_context::end_scope): New member function.
14468         (dump_context::ensure_pending_optinfo): New member function.
14469         (dump_context::begin_next_optinfo): New member function.
14470         (dump_context::end_any_optinfo): New member function.
14471         (dump_context::s_current): New global.
14472         (dump_context::s_default): New global.
14473         (dump_scope_depth): Delete global.
14474         (dumpfile_ensure_any_optinfo_are_flushed): New function.
14475         (dump_symtab_node): New function.
14476         (get_dump_scope_depth): Reimplement in terms of dump_context.
14477         (dump_begin_scope): Likewise.
14478         (dump_end_scope): Likewise.
14479         (selftest::temp_dump_context::temp_dump_context): New ctor.
14480         (selftest::temp_dump_context::~temp_dump_context): New dtor.
14481         (selftest::verify_item): New function.
14482         (ASSERT_IS_TEXT): New macro.
14483         (ASSERT_IS_TREE): New macro.
14484         (ASSERT_IS_GIMPLE): New macro.
14485         (selftest::test_capture_of_dump_calls): New test.
14486         (selftest::dumpfile_c_tests): Call it.
14487         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
14488         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
14489         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
14490         descriptive comment.
14491         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
14492         (dump_node, dump_bb): Move these unrelated decls.
14493         (class dump_manager): Add leading comment.
14494         * optinfo.cc: New file.
14495         * optinfo.h: New file.
14497 2018-07-19  Michael Collison  <michael.collison@arm.com>
14498             Richard Henderson <rth@redhat.com>
14500         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
14501         (subti): Handle op1 zero.
14502         (subvti4, usub4ti4): New.
14503         (*sub<GPI>3_compare1_imm): New.
14504         (sub<GPI>3_carryinCV): New.
14505         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
14506         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
14508 2018-07-19  Michael Collison  <michael.collison@arm.com>
14509             Richard Henderson <rth@redhat.com>
14511         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
14512         (addti3): Create simpler code if low part is already known to be 0.
14513         (addvti4, uaddvti4): New.
14514         (*add<GPI>3_compareC_cconly_imm): New.
14515         (*add<GPI>3_compareC_cconly): New.
14516         (*add<GPI>3_compareC_imm): New.
14517         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
14518         handle constants within this pattern..
14519         (*add<GPI>3_compareV_cconly_imm): New.
14520         (*add<GPI>3_compareV_cconly): New.
14521         (*add<GPI>3_compareV_imm): New.
14522         (add<GPI>3_compareV): New.
14523         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
14524         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
14525         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
14526         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
14527         with 'comparison' operator.
14528         (*add<GPI>3_compareV_cconly_imm): Ditto.
14529         (*add<GPI>3_compareV_cconly): Ditto.
14530         (*add<GPI>3_compareV_imm): Ditto.
14531         (add<GPI>3_compareV): Ditto.
14532         (add<mode>3_carryinC): Ditto.
14533         (*add<mode>3_carryinC_zero): Ditto.
14534         (*add<mode>3_carryinC): Ditto.
14535         (add<mode>3_carryinV): Ditto.
14536         (*add<mode>3_carryinV_zero): Ditto.
14537         (*add<mode>3_carryinV): Ditto.
14539 2018-07-19  Michael Collison  <michael.collison@arm.com>
14540             Richard Henderson <rth@redhat.com>
14542         * config/aarch64/aarch64-modes.def (CC_V): New.
14543         * config/aarch64/aarch64-protos.h
14544         (aarch64_addti_scratch_regs): Declare
14545         (aarch64_subvti_scratch_regs): Declare.
14546         (aarch64_expand_subvti): Declare.
14547         (aarch64_gen_unlikely_cbranch): Declare
14548         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
14549         for signed overflow using CC_Vmode.
14550         (aarch64_get_condition_code_1): Handle CC_Vmode.
14551         (aarch64_gen_unlikely_cbranch): New function.
14552         (aarch64_addti_scratch_regs): New function.
14553         (aarch64_subvti_scratch_regs): New function.
14554         (aarch64_expand_subvti): New function.
14556 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
14558         * config/aarch64/aarch64-option-extensions.def: New entry for profile
14559         extension.
14560         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
14561         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
14562         extension.
14564 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
14566         PR target/83009
14567         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
14568         address check not strict.
14570 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
14572         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
14573         Umq with Umn.
14574         (store_pair_lanes<mode>): Likewise.
14575         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
14576         enum value 'ADDR_QUERY_LDP_STP_N'.
14577         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
14578         (aarch64_print_address_internal): Add declaration.
14579         (aarch64_print_ldpstp_address): Remove.
14580         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
14581         (aarch64_print_operand): Change printing of 'y'.
14582         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
14583         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
14584         'true' rather than '1'.
14585         * config/aarch64/constraints.md (Uml): Likewise.
14586         (Uml): Rename to Umn.
14587         (Umq): Remove.
14589 2018-07-19  Richard Biener  <rguenther@suse.de>
14591         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
14592         a trailing array.
14593         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
14594         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
14595         (vn_reference_hasher): Likewise.
14596         (struct vn_tables_s): Remove obstack and alloc-pool members.
14597         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
14598         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
14599         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
14600         (vn_reference_insert_pieces): Likewise.
14601         (alloc_vn_nary_op_noinit): Adjust.
14602         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
14603         (vn_phi_eq): Adjust.
14604         (shared_lookup_phiargs): Remove.
14605         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
14606         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
14607         (visit_reference_op_call): Likewise.
14608         (copy_nary, copy_phi, copy_reference): Remove.
14609         (process_scc): Rewind the obstack when iterating.  Do not
14610         copy the elements to valid_info but just move them from one
14611         hashtable to the other.
14612         (allocate_vn_table): Adjust.
14613         (free_vn_table): Likewise.
14614         (init_scc_vn): Likewise.
14615         (free_scc_vn): Likewise.
14617 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
14619         PR target/86560
14620         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
14621         indirect_return as function type attribute.
14622         (ix86_attribute_table): Change indirect_return to function
14623         type attribute.
14624         * doc/extend.texi: Update indirect_return attribute.
14626 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
14628         * wide-int.h (widest2_int): New.
14629         * gimple-fold.c (arith_overflowed_p): Use it.
14630         * tree.h (widest2_int_cst): New.
14631         * tree-vrp.c (wide_int_binop_overflow): Rename from
14632         vrp_int_const_binop.
14633         Rewrite to work on trees.
14634         (extract_range_from_multiplicative_op_1): Abstract code to...
14635         (wide_int_range_min_max): ...here.
14636         (wide_int_range_cross_product): ...and here.
14637         (extract_range_from_binary_expr_1): Abstract overflow code to...
14638         (wide_int_range_mult_wrapping): ...here.
14639         * tree-vrp.h (wide_int_range_cross_product): New.
14640         (wide_int_range_mult_wrapping): New.
14642 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
14643             Julia Koval  <julia.koval@intel.com>
14645         * config/i386/x86-tune-costs.h (skylake_memcpy,
14646         skylake_memset): Replace rep_prefix with unrolling for size 512.
14648 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
14650         PR middle-end/86544
14651         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
14652         comparision with EQ_EXPR in last stmt.
14654 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14656         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
14657         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
14658         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
14659         previously known as "PowerPC AltiVec Built-in Functions".  Move
14660         some material to new subsubsections "PowerPC AltiVec Built-in
14661         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
14662         ISA 2.07".
14663         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
14664         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
14665         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
14666         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
14668 2018-07-18  Richard Biener  <rguenther@suse.de>
14670         PR tree-optimization/86557
14671         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
14672         EXACT_DIV_EXPR.
14674 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
14676         * config/s390/s390.c (s390_function_profiler): Generate CFI.
14678 2018-07-17  Jeff Law  <law@redhat.com>
14680         * config/arm/arm.c (get_label_padding): Update for recent
14681         changes to label_to_alignment.
14683         PR tree-optimization/86010
14684         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
14686         * config/mips/mips.c (vr4130_align_insns): Update for recent
14687         changes to label_to_alignment.
14689         * config/frv/frv.c (frv_label_align): Update for recent changes
14690         to label_to_alignment.
14692         * config/nios2/nios2.c (nios2_label_align): Update for recent
14693         changes which dropped ALIGN_LABELS_LOG.
14695 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
14697         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
14698         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
14700 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
14702         * config/arc/arc.c (arc_label_align): Use align_labels instead of
14703         deprecated align_labels_log.
14705 2018-07-17  Richard Biener  <rguenther@suse.de>
14707         PR lto/86456
14708         * dwarf2out.c (init_sections_and_labels): Always generate
14709         a debug_line_str_section for early LTO debug.
14710         (dwarf2out_finish): Reset debug_line_str_hash output early.
14711         Bump counter for extra dwarf5 .debug_loc labels to not conflict
14712         with fat LTO part.
14713         (dwarf2out_early_finish): Output debug_line_str.
14715 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
14717         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
14718         index register on z196 or later.
14720 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
14722         * config/s390/s390.c (s390_default_align): Set default function
14723         alignment to 16.
14724         (s390_override_options_after_change): Call s390_default align.
14725         (s390_option_override_internal): Call s390_default_align.
14726         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
14728 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
14730         PR middle-end/86542
14731         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
14732         to _looptemp_ clauses, other than the first two.
14734 2018-07-17  Martin Liska  <mliska@suse.cz>
14736         * opts.c: Do not enable OPT_falign_* for -Os.
14738 2018-07-17  Martin Liska  <mliska@suse.cz>
14740         * align.h (MAX_CODE_ALIGN): New.
14741         (MAX_CODE_ALIGN_VALUE): New.
14742         * common/config/i386/i386-common.c (ix86_handle_option):
14743         (MAX_CODE_ALIGN): Moved to align.h.
14744         * final.c (MAX_CODE_ALIGN): Likewise.
14745         * opts.c (parse_and_check_align_values):
14746         (MAX_CODE_ALIGN): Likewise.
14747         (MAX_CODE_ALIGN_VALUE): Likewise.
14749 2018-07-17  Martin Liska  <mliska@suse.cz>
14751         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
14752         in order to fulfil coding style.
14753         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
14754         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14755         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
14756         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
14757         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
14758         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
14759         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
14760         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
14761         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14763 2018-07-17  Martin Liska  <mliska@suse.cz>
14765         * align.h: New file.
14766         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
14767         directly.
14768         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
14769         align_flags of label_to_alignment.
14770         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
14771         align_flags class.
14772         * config/m68k/m68k.c: Do not use removed align_labels_value and
14773         align_loops_value.
14774         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
14775         (LOOP_ALIGN): Likewise.
14776         (LABEL_ALIGN): Likewise.
14777         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
14778         Remove not used macro.
14779         (rs6000_loop_align): Change return type to align_flags.
14780         (rs6000_loop_align_max_skip): Remove.
14781         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
14782         Change return type to align_flags.
14783         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
14784         Remove not used macro.
14785         (rs6000_loop_align):  Change return type to align_flags.
14786         (rs6000_loop_align_max_skip): Remove.
14787         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
14788         * config/rx/rx-protos.h (rx_align_for_label): Make it
14789         static function.
14790         * config/rx/rx.c (rx_align_for_label): Change return type
14791         to align_flags.
14792         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
14793         macro definitions.
14794         into align_flags class.
14795         (LABEL_ALIGN): Likewise.
14796         (LOOP_ALIGN): Likewise.
14797         * config/s390/s390.c (s390_label_align): Use align_flags
14798         class member.
14799         (s390_asm_output_function_label): Likewise.
14800         * config/sh/sh.c (sh_override_options_after_change):
14801         Use align_flags class directly without macros.
14802         (find_barrier): Likewise.
14803         (barrier_align): Likewise.
14804         (sh_loop_align): Likewise.
14805         * config/spu/spu.c (spu_option_override):
14806         Use align_flags_tuple::get_value instead of removed macros.
14807         (spu_sched_init): Likewise.
14808         * config/spu/spu.h (GTY): Likewise.
14809         * config/visium/visium.c (visium_option_override):
14810         Set "8" as default secondary alignment.
14811         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
14812         in order to guarantee secondary alignment of 8.
14813         * coretypes.h: Include align.h header file.
14814         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
14815         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
14816         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
14817         * doc/tm.texi.in: Likewise.
14818         * final.c (struct label_alignment): Remove not used structure.
14819         (LABEL_ALIGN): Change type to align_flags.
14820         (LOOP_ALIGN): Likewise.
14821         (JUMP_ALIGN): Likewise.
14822         (default_loop_align_max_skip): Remove.
14823         (default_label_align_max_skip): Likewise.
14824         (default_jump_align_max_skip): Likewise.
14825         (default_label_align_after_barrier_max_skip):
14826         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
14827         (LABEL_TO_MAX_SKIP): Remove.
14828         (label_to_alignment): Return align_flags type instead of integer.
14829         (label_to_max_skip): Remove.
14830         (align_fuzz): Use align_flags type.
14831         (compute_alignments): Use align_flags type and use align_flags::max
14832         to combine multiple alignments.
14833         (grow_label_align): Grow vec instead of C array.
14834         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
14835         (shorten_branches):  Use align_flags type and use align_flags::max
14836         to combine multiple alignments.
14837         (final_scan_insn_1): Remove usage of secondary alignment that comes
14838         from label alignment, but instead use proper secondary alignment
14839         which is computed in grow_label_align.
14840         * flags.h (struct align_flags_tuple): Move to align.h.
14841         (struct align_flags): Likewise.
14842         (state_align_loops): Rename to align_loops.
14843         (state_align_jumps): Rename to align_jumps.
14844         (state_align_labels): Rename to align_labels.
14845         (state_align_functions): Rename to align_functions.
14846         (align_loops_log): Remove.
14847         (align_jumps_log): Remove.
14848         (align_labels_log): Remove.
14849         (align_functions_log): Remove.
14850         (align_loops_max_skip): Remove.
14851         (align_jumps_max_skip): Remove.
14852         (align_labels_max_skip): Remove.
14853         (align_functions_max_skip): Remove.
14854         (align_loops_value): Remove.
14855         (align_jumps_value): Remove.
14856         (align_labels_value): Remove.
14857         (align_functions_value): Remove.
14858         * output.h (label_to_alignment): Change return type to align_flags.
14859         (label_to_max_skip): Remove.
14860         * target.def: Remove loop_align_max_skip, label_align_max_skip,
14861         jump_align_max_skip macros.
14862         * targhooks.h (default_loop_align_max_skip): Remove.
14863         (default_label_align_max_skip): Likewise.
14864         (default_jump_align_max_skip): Likewise.
14865         (default_label_align_after_barrier_max_skip): Remove.
14866         * toplev.c (read_log_maxskip): Use ::normalize function.
14867         (parse_N_M): Remove not used argument and also call ::normalize.
14868         (parse_alignment_opts): Do not pass unused arguments.
14869         * varasm.c (assemble_start_function): Use directly align_functions
14870         instead of removed macros.
14871         * system.h: Do not poison removed macros.
14873 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
14875         PR middle-end/86539
14876         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
14877         and cond temporaries don't have reference type if iterator has
14878         pointer type.  For init use &for_pre_body instead of pre_p if
14879         for_pre_body is non-empty.
14881 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
14883         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
14884         double-double modes to SFmode directly directly.
14885         (trunc<mode>sf2_fprs): Delete.
14887 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
14889         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
14890         for conversions between IFmode and the decimal floating point modes.
14891         (init_float128_ieee): Use the correct names for conversions between
14892         KFmode and the decimal floating point modes.
14894 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
14896         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
14897         for the conversions between TDmode and IFmode.
14898         (init_float128_ieee): Use more correct names for the conversions
14899         between TDmode and KFmode.
14901 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
14903         PR tree-optimization/86526
14904         * builtins.c (expand_builtin_memcmp): Formatting fixes.
14905         (inline_expand_builtin_string_cmp): Likewise.
14906         (inline_string_cmp): Likewise.  Use c_readstr instead of
14907         builtin_memcpy_read_str.  Add unit_mode temporary.
14909 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
14911         PR middle-end/86528
14912         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
14913         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
14915 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14917         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
14918         Alphabetize prototypes of built-in functions, separating out
14919         built-in functions that are listed in this section but should be
14920         described elsewhere.
14922 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
14924         PR target/86511
14925         * expmed.c (emit_store_flag): Do not emit setcc followed by a
14926         conditional move when trapping comparison was split to a
14927         non-trapping one (and vice versa).
14929 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
14931         * config/s390/s390.c (s390_function_profiler): Generate nops
14932         instead of profiler call sequences.
14933         * config/s390/s390.opt: Add the new option.
14935 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
14937         * config/s390/s390.c (s390_function_profiler): Generate
14938         __mcount_loc section.
14939         * config/s390/s390.opt: Add the new option.
14941 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
14943         * common.opt: Add the new warning.
14944         * config/s390/s390.c (s390_function_profiler): Emit "brasl
14945         %r0,__fentry__" when -mfentry is specified.
14946         (s390_option_override_internal): Disallow -mfentry for 31-bit
14947         CPUs.
14948         * config/s390/s390.opt: Add the new option.
14950 2018-07-16  Richard Biener  <rguenther@suse.de>
14952         PR lto/86523
14953         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
14954         for function-local FUNCTION_DECL and RESULT_DECL immediately.
14956 2018-07-16  Martin Liska  <mliska@suse.cz>
14958         PR ipa/86529
14959         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
14960         to ::get_create.
14962 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
14964         * config/arc/arcHS.md: Update ARCHS scheduling rules.
14966 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
14968         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
14969         for ARCHS4x.
14970         * config/arc/arc-cpus.def (hs4x): New cpu.
14971         (hs4xd): Likewise.
14972         * config/arc/arc-tables.opt: Regenerate.
14973         * config/arc/arc.c (arc_sched_issue_rate): New function.
14974         (TARGET_SCHED_ISSUE_RATE): Define.
14975         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
14976         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
14977         fpu_cvt.
14978         (attr tune): Add ARCHS4x tune values.
14979         (attr tune_dspmpy): Define.
14980         (*tst): Correct instruction type.
14981         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
14982         * config/arc/arcHS4x.md: New file.
14983         * config/arc/fpu.md: Update instruction type attributes.
14984         * config/arc/t-multilib: Regenerate.
14986 2018-07-16  Tom de Vries  <tdevries@suse.de>
14988         PR debug/86455
14989         * var-tracking.c (vt_initialize): Fix pre_dec handling.
14991 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
14993         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
14994         early clobber.
14996 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
14998         PR tree-optimization/86514
14999         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
15000         conversion to a boolean type from a type with greater precision.
15002 2018-07-16  Tom de Vries  <tdevries@suse.de>
15004         * var-tracking.c (vt_initialize): Print adjusted insn slim if
15005         dump_flags request TDF_SLIM.
15007 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
15009         * fold-const.c (int_const_binop_1): Abstract...
15010         (wide_int_binop): ...wide int code here.
15011         (poly_int_binop): ...poly int code here.
15012         Abstract the rest of int_const_binop_1 into int_const_binop.
15013         * fold-const.h (wide_int_binop): New.
15014         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
15015         Remove useless PLUS/MINUS_EXPR case.
15016         (zero_nonzero_bits_from_vr): Move wide int code...
15017         (zero_nonzero_bits_from_bounds): ...here.
15018         (extract_range_from_binary_expr_1): Move mask optimization code...
15019         (range_easy_mask_min_max): ...here.
15020         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
15021         (range_easy_mask_min_max): New.
15023 2018-07-15  Jeff Law  <law@redhat.com>
15025         PR target/85993
15026         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
15027         block.
15029 2018-07-14  Jim Wilson  <jimw@sifive.com>
15031         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
15033 2018-07-14  Paul Koning  <ni1d@arrl.net>
15035         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
15037 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
15039         * lto-streamer-out.c (copy_function_or_variable): Dump info about
15040         copying section.
15042 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
15043             Steve Munroe  <munroesj52@gmail.com>
15045         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
15046         (_mm_andnot_si128): Likewise.
15047         (_mm_or_si128): Likewise.
15048         (_mm_xor_si128): Likewise.
15050 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
15052         PR middle-end/78809
15053         * builtins.c (expand_builtin_memcmp): Inline the calls first
15054         when result_eq is false.
15055         (expand_builtin_strcmp): Inline the calls first.
15056         (expand_builtin_strncmp): Likewise.
15057         (inline_string_cmp): New routine. Expand a string compare
15058         call by using a sequence of char comparison.
15059         (inline_expand_builtin_string_cmp): New routine. Inline expansion
15060         a call to str(n)cmp/memcmp.
15061         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
15062         New option.
15063         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
15065 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
15067         * config/arm/driver-arm.c: Include arm-native.h.
15068         (host_detect_local_cpu): Use auto-generated data tables.
15069         (vendors, arm_cpu_table): Delete.  Move part information to ...
15070         * config/arm/arm-cpus.in: ... here.
15071         * config/arm/parsecpu.awk (gen_native): New function.
15072         (vendor, part): New CPU fields.
15073         (END): Add support for building the native CPU detection tables.
15074         * config/arm/t-arm (arm-native.h): Add build rule.
15075         (driver-arm.o): Add dependency on arm-native.h.
15077 2018-07-13  Richard Biener  <rguenther@suse.de>
15079         PR middle-end/85974
15080         * match.pd (addr1 - addr2): Allow either of the operand to
15081         have a conversion.
15083 2018-07-13  Tom de Vries  <tdevries@suse.de>
15085         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
15086         in remap_ssa_name.
15088 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
15090         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
15091         arrays instead of numbered variables.
15093 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
15095         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
15096         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
15098 2018-07-13  Richard Biener  <rguenther@suse.de>
15100         PR debug/86452
15101         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
15102         instead of get_context_die.
15104 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
15105             Richard Biener  <rguenther@suse.de>
15107         PR middle-end/86489
15108         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
15109         that the loop latch destination where phi is defined.
15111 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
15113         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
15114         (riscv_expand_epilogue): Add assertion to check interrupt mode.
15115         (riscv_set_current_function): Extract getting interrupt type to new
15116         function.
15117         (riscv_get_interrupt_type): New function.
15118         (riscv_merge_decl_attributes): New function, checking interrupt type is
15119         same.
15120         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
15122 2018-07-12  Paul Koning  <ni1d@arrl.net>
15124         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
15125         directive.
15127 2018-07-12  Paul Koning  <ni1d@arrl.net>
15129         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
15130         zero reference, add doloop_end instead.
15131         * doc/md.texi (decrement_and_branch_until_zero): Remove.
15132         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
15133         detail for doloop_end.
15135 2018-07-12  Martin Sebor  <msebor@redhat.com>
15137         PR c/86453
15138         * attribs.c (decl_attributes): Reject conflicting attributes before
15139         calling attribute handlers.
15141 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
15143         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
15144          parameter.
15145         (gcc::dump_manager::get_dump_file_name): likewise.
15146         (dump_begin): Likewise.
15147         * dumpfile.h (dump_begin): Update prototype.
15148         (gcc::dump_manager::get_dump_file_name,
15149         gcc::dump_manager::get_dump_file_name): Update prototype.
15151 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
15153         * internal-fn.h (vectorizable_internal_fn_p): New function.
15154         * tree-vect-slp.c (compatible_calls_p): Likewise.
15155         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
15156         to internal functions.
15157         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
15159 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
15161         * fold-const.h (inverse_conditions_p): Declare.
15162         * fold-const.c (inverse_conditions_p): New function.
15163         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
15164         that test the inverse condition of a conditional internal function.
15165         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
15166         * internal-fn.c (internal_fn_mask_index): Handle conditional
15167         internal functions.
15168         (vectorized_internal_fn_supported_p): New function.
15169         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
15170         (any_pred_load_store): Replace with...
15171         (need_to_predicate): ...this new variable.
15172         (redundant_ssa_names): New variable.
15173         (ifcvt_can_use_mask_load_store): Move initial checks to...
15174         (ifcvt_can_predicate): ...this new function.  Handle tree codes
15175         for which a conditional internal function exists.
15176         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
15177         instead of ifcvt_can_use_mask_load_store.  Update after variable
15178         name change.
15179         (predicate_load_or_store): New function, split out from
15180         predicate_mem_writes.
15181         (check_redundant_cond_expr): New function.
15182         (value_available_p): Likewise.
15183         (predicate_rhs_code): Likewise.
15184         (predicate_mem_writes): Rename to...
15185         (predicate_statements): ...this.  Use predicate_load_or_store
15186         and predicate_rhs_code.
15187         (combine_blocks, tree_if_conversion): Update after above name changes.
15188         (ifcvt_local_dce): Handle redundant_ssa_names.
15189         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
15190         general conditional functions.
15191         * tree-vect-stmts.c (vectorizable_call): Likewise.
15193 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
15194             Alan Hayward  <alan.hayward@arm.com>
15195             David Sherwood  <david.sherwood@arm.com>
15197         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
15198         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
15199         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
15200         plus and minus and convert them into IFN_COND_FMA-based sequences.
15201         (convert_mult_to_fma): Handle conditional plus and minus.
15203 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
15205         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
15206         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
15207         (cond_fnms_optab): New optabs.
15208         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
15209         internal functions.
15210         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
15211         * internal-fn.h (get_conditional_internal_fn): Declare.
15212         (get_unconditional_internal_fn): Likewise.
15213         * internal-fn.c (cond_ternary_direct): New macro.
15214         (expand_cond_ternary_optab_fn): Likewise.
15215         (direct_cond_ternary_optab_supported_p): Likewise.
15216         (FOR_EACH_COND_FN_PAIR): Likewise.
15217         (get_conditional_internal_fn): New function.
15218         (get_unconditional_internal_fn): Likewise.
15219         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
15220         (gimple_match_op::gimple_match_op): Add a new overload for 5
15221         operands.
15222         (gimple_match_op::set_op): Likewise.
15223         (gimple_resimplify5): Declare.
15224         * genmatch.c (decision_tree::gen): Generate simplifications for
15225         5 operands.
15226         * gimple-match-head.c (gimple_simplify): Define an overload for
15227         5 operands.  Handle calls with 5 arguments in the top-level overload.
15228         (convert_conditional_op): Handle conversions from unconditional
15229         internal functions to conditional ones.
15230         (gimple_resimplify5): New function.
15231         (build_call_internal): Pass a fifth operand.
15232         (maybe_push_res_to_seq): Likewise.
15233         (try_conditional_simplification): Try converting conditional
15234         internal functions to unconditional internal functions.
15235         Handle 3-operand unconditional forms.
15236         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
15237         Define ternary equivalents of the current rules for binary conditional
15238         internal functions.
15239         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
15240         ternary operations.
15241         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
15242         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
15243         (optab): Handle them.
15244         (SVE_COND_FP_TERNARY): New int iterator.
15245         (sve_fmla_op, sve_fmad_op): New int attributes.
15246         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
15247         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
15248         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
15250 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
15252         * target.def (preferred_else_value): New target hook.
15253         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
15254         * doc/tm.texi: Regenerate.
15255         * targhooks.h (default_preferred_else_value): Declare.
15256         * targhooks.c (default_preferred_else_value): New function.
15257         * internal-fn.h (conditional_internal_fn_code): Declare.
15258         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
15259         (get_conditional_internal_fn): Use it.
15260         (conditional_internal_fn_code): New function.
15261         * gimple-match.h (gimple_match_cond): New struct.
15262         (gimple_match_op): Add a cond member function.
15263         (gimple_match_op::gimple_match_op): Update all forms to take a
15264         gimple_match_cond.
15265         * genmatch.c (expr::gen_transform): Use the same condition as res_op
15266         for the suboperation, but don't specify a particular else_value.
15267         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
15268         (visit_nary_op, visit_reference_op_load): Pass
15269         gimple_match_cond::UNCOND to the gimple_match_op constructor.
15270         * gimple-match-head.c: Include tree-eh.h
15271         (convert_conditional_op): New function.
15272         (maybe_resimplify_conditional_op): Likewise.
15273         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
15274         (gimple_resimplify2): Likewise.
15275         (gimple_resimplify3): Likewise.
15276         (gimple_resimplify4): Likewise.
15277         (maybe_push_res_to_seq): Return null for conditional operations.
15278         (try_conditional_simplification): New function.
15279         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
15280         constructor.
15281         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
15282         IFN_COND_* call.
15283         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
15284         function.
15285         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
15287 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
15289         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
15290         DECL_FCONTEXT
15291         (hash_tree): Do not hash DECL_FCONTEXT
15292         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
15293         Do not stream DECL_FCONTEXT.
15294         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
15295         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
15297 2018-07-12  Richard Biener  <rguenther@suse.de>
15299         PR debug/86462
15300         * dwarf2out.c (gen_block_die): Only output blocks when they have
15301         at least one !DECL_IGNORED_P variable.
15303 2018-07-12  Richard Biener  <rguenther@suse.de>
15305         PR target/84829
15306         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
15307         Remove -mieee-fp handling.
15309 2018-07-12  Richard Biener  <rguenther@suse.de>
15311         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
15312         left-over from last patch.
15314 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
15316         PR tree-optimization/86492
15317         * gimple-ssa-store-merging.c
15318         (imm_store_chain_info::coalesce_immediate_stores): Call
15319         check_no_overlap even for the merge_overlapping case.  Formatting fix.
15321 2018-07-12  Richard Biener  <rguenther@suse.de>
15323         PR middle-end/86479
15324         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
15325         move possibly trapping operations into the conditional.
15327 2018-07-12  Richard Biener  <rguenther@suse.de>
15329         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
15330         (vn_lookup_simplify_result): Remove recursion limit applied
15331         here.
15332         (vn_nary_build_or_lookup_1): Adjust.
15333         (try_to_simplify): Likewise.
15334         * gimple-match-head.c (gimple_resimplify1): Instead apply one
15335         here.
15336         (gimple_resimplify2): Likewise.
15337         (gimple_resimplify3): Likewise.
15338         (gimple_resimplify4): Likewise.
15340 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
15342         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
15343         Use __mmask64 type instead of __mmask8 for __M argument.
15344         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
15345         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
15346         __U argument.
15347         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
15348         __mmask16 for __M argument.
15349         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
15350         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
15351         to __mmask16 instead of __mmask8.
15352         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
15353         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
15354         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
15355         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
15356         instead of __mmask16 for __U argument.
15357         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
15358         __mmask16 instead of __mmask8 for __U argument.
15359         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
15360         __U argument.
15361         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
15362         __mmask16.
15363         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
15364         argument.
15365         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
15366         __U argument.
15367         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
15368         __mmask16.
15369         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
15370         of __mmask16.
15371         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
15372         __U argument.
15373         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
15374         __U argument.
15375         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
15376         __U argument.
15377         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
15378         __U argument.
15379         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
15380         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
15381         return type as well as __M argument type and all casts from __mmask8
15382         to __mmask32.
15383         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
15384         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
15385         return type as well as __M argument type and all casts from __mmask8
15386         to __mmask16.
15387         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
15388         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
15389         return type as well as __M argument type and all casts from __mmask8
15390         to __mmask32.
15391         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
15392         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
15393         return type as well as __M argument type and all casts from __mmask8
15394         to __mmask16.
15395         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
15396         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
15397         __mmask16.
15399 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
15401         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
15402         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
15403         for __U argument.
15405 2018-07-11  Paul Koning  <ni1d@arrl.net>
15407         * doc/md.texi (define_subst): Document how multiple occurrences of
15408         the same argument in the replacement pattern are handled.
15410 2018-07-11  Paul Koning  <ni1d@arrl.net>
15412         * doc/extend.texi (Common Variable Attributes): Move "mode" into
15413         alphabetical order.
15414         (Common Type Attributes): Add "mode" attribute.
15416 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
15418         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
15419         stream DECL_ORIGINAL_TYPE.
15420         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
15421         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
15422         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
15423         Do not walk original type.
15424         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
15425         external decls.
15426         (write_ts_decl_non_common_tree_pointers): Do not stream
15427         DECL_ORIGINAL_TYPE
15428         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
15429         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
15431 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
15433         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
15434         thread twice from the same starting edge.
15436 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
15438         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
15439         * gimple.c (gimple_call_nonnull_result_p): ...here...
15440         (gimple_call_nonnull_arg): ...and here.
15441         * gimple.h (gimple_call_nonnull_result_p): New.
15442         (gimple_call_nonnull_arg): New.
15444 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
15446         * config/arm/arm-cpus.in: Move information from fpu field of each
15447         cpu definition to the isa field.
15448         * config/arm/parsecpu.awk (fpu): Delete match rule.
15449         (gen_comm_data): Don't add bits from the CPU's FPU entry.
15451 2018-07-11  Richard Biener  <rguenther@suse.de>
15453         PR debug/86457
15454         * dwarf2out.c (init_sections_and_labels): Use
15455         output_asm_line_debug_info consistently.
15456         (dwarf2out_early_finish): Likewise.
15457         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
15458         type units.
15460 2018-07-11  Richard Biener  <rguenther@suse.de>
15462         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
15463         Rework father_bb setting in a way to avoid propagating constants
15464         multiple times on a loop body.
15466 2018-07-10  Mark Wielaard  <mark@klomp.org>
15468         PR debug/86459
15469         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
15471 2018-07-10  Richard Biener  <rguenther@suse.de>
15473         * hash-map.h (hash_map::iterator::operator*): Return
15474         references to key and value.
15476 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
15478         PR c++/86443
15479         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
15480         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
15481         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
15482         (gimplify_omp_for): For composite loops, move outer
15483         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
15484         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
15485         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
15486         TREE_LIST for both the original class iterator and the "last" helper
15487         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
15488         loop, remember has_decl_expr from outer composite loops for the
15489         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
15491 2018-07-09  Martin Sebor  <msebor@redhat.com>
15493         PR middle-end/77357
15494         PR middle-end/86428
15495         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
15496         accessing implicitly initialized array elements.
15497         * expr.c (string_constant): Handle string initializers of
15498         character arrays within aggregates.
15499         * gimple-fold.c (fold_array_ctor_reference): Add argument.
15500         Store element offset.  As a special case, handle zero size.
15501         (fold_nonarray_ctor_reference): Same.
15502         (fold_ctor_reference): Add argument.  Store subobject offset.
15503         * gimple-fold.h (fold_ctor_reference): Add argument.
15505 2018-07-09  Paul Koning  <ni1d@arrl.net>
15507         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
15508         (pdp11_insn_cost): New function.
15509         (pdp11_md_asm_adjust): New function.
15510         (TARGET_INVALID_WITHIN_DOLOOP): Define.
15511         (pdp11_rtx_costs): Update to match machine better.
15512         (output_addr_const_pdp11): Correct format mismatch warnings.
15513         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
15514         * config/pdp11/pdp11.md: General change to add base_cost and/or
15515         length attributes for use by new pdp11_insn_cost function.
15516         (MIN_BRANCH): Correct definition.
15517         (MIN_SOB): Ditto.
15518         (doloop_end): Use standard pattern name for looping pattern.
15519         (doloop_end_nocc): New.
15520         (movsf): Add another constraint alternative.
15521         (zero_extendqihi2): Add constraint alternatives for not in place
15522         extend.
15523         (zero_extendhisi2): Remove.
15524         (shift patterns): Add CC handling variants.
15525         (bswaphi2): New.
15526         (bswapsi2): New.
15527         (rothi3): New.
15528         (define_peephole2): New peephole to recognize mov that sets CC for
15529         subsequent test.
15531 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15533         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
15534         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
15535         wi::add.
15537 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
15539         PR c/86420
15540         * real.c (real_nextafter): Return true if result is denormal.
15542 2018-07-09  Martin Liska  <mliska@suse.cz>
15544         * common.opt: Add back wrongly removed attribute.
15546 2018-07-09  Richard Biener  <rguenther@suse.de>
15548         PR debug/86413
15549         * dwarf2out.c (gen_block_die): For an early generated DIE
15550         always output high/low PC attributes.
15552 2018-07-09  Tom de Vries  <tdevries@suse.de>
15554         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
15555         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
15556         onto VAR_DECL with abstract origin.
15558 2018-07-07  Jim Wilson  <jimw@sifive.com>
15560         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
15562 2018-07-07  Tom de Vries  <tdevries@suse.de>
15564         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
15566 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
15568         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
15569         overflow_type.
15570         (combine_bound): Use wide-int overflow calculation instead of
15571         rolling our own.
15572         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
15573         overflow_type.
15574         * fold-const.c (int_const_binop_2): Same.
15575         (extract_muldiv_1): Same.
15576         (fold_div_compare): Same.
15577         (fold_abs_const): Same.
15578         * match.pd: Same.
15579         * poly-int.h (add): Same.
15580         (sub): Same.
15581         (neg): Same.
15582         (mul): Same.
15583         * predict.c (predict_iv_comparison): Same.
15584         * profile-count.c (slow_safe_scale_64bit): Same.
15585         * simplify-rtx.c (simplify_const_binary_operation): Same.
15586         * tree-chrec.c (tree_fold_binomial): Same.
15587         * tree-data-ref.c (split_constant_offset_1): Same.
15588         * tree-if-conv.c (idx_within_array_bound): Same.
15589         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
15590         * tree-ssa-phiopt.c (minmax_replacement): Same.
15591         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
15592         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
15593         * vr-values.c (vr_values::adjust_range_with_scev): Same.
15594         * wide-int.cc (wi::add_large): Same.
15595         (wi::mul_internal): Same.
15596         (wi::sub_large): Same.
15597         (wi::divmod_internal): Same.
15598         * wide-int.h: Change overflow type to overflow_type for neg, add,
15599         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
15600         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
15601         mul_internal, divmod_internal.
15602         (overflow_type): New enum.
15603         (accumulate_overflow): New.
15605 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
15607         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
15608         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
15610 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
15612         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
15613         argument is checked for zero before entering loop, avoid checking again.
15615 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
15617         * gimplify.h (generic_expr_could_trap_p): Set as global function.
15618         * gimplify.h (generic_expr_could_trap_p): Likwise.
15619         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
15621 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
15623         PR tree-optimization/86401
15624         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
15625         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
15626         (fold_bit_and_mask): ... here.  New helper function for match.pd.
15627         * fold-const.h (fold_bit_and_mask): Declare.
15628         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
15630 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
15632         PR target/86324
15633         * target.def (translate_mode_attribute): New hook.
15634         * targhooks.h (default_translate_mode_attribute): Declare.
15635         * targhooks.c (default_translate_mode_attribute): New function.
15636         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
15637         * doc/tm.texi: Regenerate.
15638         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
15639         (rs6000_translate_mode_attribute): New function.
15641 2018-07-06  Paul Koning  <ni1d@arrl.net>
15643         * doc/md.texi (define_split): Document DONE and FAIL.
15644         (define_peephole2): Ditto.
15646 2018-07-05  Jeff Law  <law@redhat.com>
15648         PR tree-optimization/86010
15649         * tree-ssa-dse.c (compute_trims): More aggressively trim at
15650         both the head and tail of mem* and str* calls.
15652 2018-07-05  Jim Wilson  <jimw@sifive.com>
15654         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
15656 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
15658         * config/aarch64/aarch64-simd.md: correct flags text for
15659         MIN_EXPR replacement.
15661 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
15663         * configure: Regenerated.
15665 2018-07-05  Carl Love  <cel@us.ibm.com>
15667         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
15668         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
15669         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
15670         VSX_BUILTIN_DOUBLEL_V4SF.
15672 2018-07-05  Martin Sebor  <msebor@redhat.com>
15674         PR c++/86400
15675         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
15676         than its domain to compute its the upper bound of a char array.
15678 2018-07-05  Nathan Sidwell  <nathan@acm.org>
15680         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
15681         * doc/cpp.texi: Update comment.
15682         * doc/tm.texi: Rebuilt.
15683         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
15684         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
15685         * doc/extend.texi (Backwards Compatibility): Clarify it is system
15686         headers affected by extern "C".
15687         * system.h: Poison NO_IMPLICIT_EXTERN_C.
15688         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
15689         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
15690         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
15691         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
15692         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
15693         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
15694         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
15695         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
15696         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
15697         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
15698         config/sparc/sp64-elf.h, config/spu/spu.h,
15699         config/stormy16/stormy16.h, config/v850/v850.h,
15700         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
15701         define NO_IMPLICIT_EXTERN_C.
15702         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
15704 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
15706         PR target/84711
15707         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
15708         instead of GET_MODE_SIZE when comparing Units.
15710 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
15712         PR target/84711
15713         * rtlanal.c (set_noop_p): Constrain on mode change,
15714         include hard-reg-set.h
15716 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
15718         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
15720 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
15722         Revert
15723         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
15725         PR sanitizer/84250
15726         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
15727         libasan.
15728         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
15730 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
15732         PR sanitizer/84250
15733         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
15734         libasan.
15735         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
15737 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
15739         PR middle-end/86380
15740         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
15742 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
15744         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
15745         neg_*_op* variables.
15747 2018-07-04  Martin Liska  <mliska@suse.cz>
15749         * tree-switch-conversion.c: Define
15750         max_ratio_for_speed and max_ratio_for_size constants.
15752 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
15753             Martin Liska  <mliska@suse.cz>
15755         PR middle-end/66240
15756         PR target/45996
15757         PR c/84100
15758         * common.opt: Rename align options with 'str_' prefix.
15759         * common/config/i386/i386-common.c (set_malign_value): New
15760         function.
15761         (ix86_handle_option): Use it to set -falign-* options/
15762         * config/aarch64/aarch64-protos.h (struct tune_params): Change
15763         type from int to string.
15764         * config/aarch64/aarch64.c: Update default values from int
15765         to string.
15766         * config/alpha/alpha.c (alpha_override_options_after_change):
15767         Likewise.
15768         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
15769         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15770         max skip conditionally.
15771         * config/i386/freebsd.h (SUBALIGN_LOG): New.
15772         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15773         max skip conditionally.
15774         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15775         max skip conditionally.
15776         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
15777         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15778         max skip conditionally.
15779         * config/i386/i386.c (struct ptt): Change type from int to
15780         string.
15781         (ix86_default_align): Set default values.
15782         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
15783         max skip conditionally.
15784         * config/i386/iamcu.h (SUBALIGN_LOG): New.
15785         (ASM_OUTPUT_MAX_SKIP_ALIGN):
15786         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
15787         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15788         max skip conditionally.
15789         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
15790         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
15791         * config/i386/x86-64.h (SUBALIGN_LOG): New.
15792         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15793         max skip conditionally.
15794         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
15795         * config/ia64/ia64.c (ia64_option_override): Set default values
15796         for alignment options.
15797         * config/m68k/m68k.c: Handle new str_align_* options.
15798         * config/mips/mips.c (mips_set_compression_mode): Change
15799         type of constants.
15800         (mips_option_override): Set default values for options.
15801         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
15802         Likewise.
15803         * config/rs6000/rs6000.c (rs6000_option_override_internal):
15804         Likewise.
15805         * config/rx/rx.c (rx_option_override): Likewise.
15806         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
15807         (LABEL_ALIGN): Use align_labels_log.
15808         (LOOP_ALIGN): Use align_loops_align.
15809         * config/s390/s390.c (s390_asm_output_function_label): Use new
15810         macros.
15811         * config/sh/sh.c (sh_override_options_after_change):
15812         Change type of constants.
15813         * config/spu/spu.c (spu_sched_init): Likewise.
15814         * config/sparc/sparc.c (sparc_option_override): Set default
15815         values for options.
15816         * config/visium/visium.c (visium_option_override): Likewise.
15817         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
15818         emit p2align format with last argument if it's not needed.
15819         * doc/invoke.texi: Document extended format of -falign-*.
15820         * final.c: Use align_labels alignment.
15821         * flags.h (struct target_flag_state): Change type to use
15822         align_flags.
15823         (struct align_flags_tuple): New.
15824         (struct align_flags): Likewise.
15825         (align_loops_log): Redefine macro to use new types.
15826         (align_loops_max_skip): Redefine macro to use new types.
15827         (align_jumps_log): Redefine macro to use new types.
15828         (align_jumps_max_skip): Redefine macro to use new types.
15829         (align_labels_log): Redefine macro to use new types.
15830         (align_labels_max_skip): Redefine macro to use new types.
15831         (align_functions_log): Redefine macro to use new types.
15832         (align_loops): Redefine macro to use new types.
15833         (align_jumps): Redefine macro to use new types.
15834         (align_labels): Redefine macro to use new types.
15835         (align_functions): Redefine macro to use new types.
15836         (align_functions_max_skip): Redefine macro to use new types.
15837         (align_loops_value): New macro.
15838         (align_jumps_value): New macro.
15839         (align_labels_value): New macro.
15840         (align_functions_value): New macro.
15841         * function.c (invoke_set_current_function_hook): Propagate
15842         alignment values from flags to global variables default in
15843         topleev.h.
15844         * ipa-icf.c (sem_function::equals_wpa): Use
15845         cl_optimization_option_eq instead of memcmp.
15846         * lto-streamer.h (cl_optimization_stream_out): Support streaming
15847         of string types.
15848         (cl_optimization_stream_in): Likewise.
15849         * optc-save-gen.awk: Support strings in cl_optimization.
15850         * opth-gen.awk: Likewise.
15851         * opts.c (finish_options): Remove error checking of invalid
15852         value ranges.
15853         (MAX_CODE_ALIGN): Remove.
15854         (MAX_CODE_ALIGN_VALUE): Likewise.
15855         (parse_and_check_align_values): New function.
15856         (check_alignment_argument): Likewise.
15857         (common_handle_option): Use check_alignment_argument.
15858         * opts.h (parse_and_check_align_values): Declare.
15859         * toplev.c (init_alignments): Remove.
15860         (read_log_maxskip): New.
15861         (parse_N_M): Likewise.
15862         (parse_alignment_opts): Likewise.
15863         (backend_init_target): Remove usage of init_alignments.
15864         * toplev.h (parse_alignment_opts): Declare.
15865         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
15866         argument.
15867         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
15868         * tree.c (cl_option_hasher::equal): New.
15869         * varasm.c: Use new global macros.
15871 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
15873         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
15874         Use a simpler align directive also if MAXSKIP = ALIGN-1.
15875         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15876         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15877         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15878         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
15879         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
15880         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
15881         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
15882         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15883         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15884         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15885         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15887 2018-07-04  Martin Liska  <mliska@suse.cz>
15888             Jonathan Wakely  <jwakely@redhat.com>
15890         * coverage.c: Use correct type.
15891         * doc/invoke.texi: Language correction.
15893 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
15895         PR target/85620
15896         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
15897         ENDBRANCH for non-tail call which may return via indirect branch.
15898         * doc/extend.texi: Document indirect_return attribute.
15900 2018-07-03  Martin Sebor  <msebor@redhat.com>
15902         PR tree-optimization/86274
15903         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
15904         precondition.
15905         (format_floating): Correct handling of infinities and NaNs.
15907 2018-07-03  Martin Sebor  <msebor@redhat.com>
15909         * print-tree.c (print_real_cst): New function.
15910         (print_node_brief): Call it.
15911         (print_node): Ditto.
15913 2018-07-03  Jeff Law  <law@redhat.com>
15915         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
15916         into a single pattern.
15918         * config/h8300/h8300.md (ors code_iterator): New.
15919         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
15920         a single pattern and single splitter.
15921         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
15922         (iorqi3_1, xorqi3_1): Likewise.
15923         (iorqi3, xorqi3 expanders): Similarly.
15925         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
15926         (movmd_internal) into a single pattern using the P mode iterator.
15927         (movmd splitters): Similarly.
15928         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
15929         (movsd splitters): Similarly.
15931         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
15932         ADDB, ADDW and ADDL into a single ADD attribute which selects the
15933         right table based on the size of the operand.
15934         * config/h8300/h8300.md (length_table): Corresponding changes. All
15935         references to "addb", "addw" and "addl" changed to "add".
15936         (btst patterns): Merge two variants into a single pattern.
15937         (tstqi, tsthi): Likewise.
15938         (addhi3_incdec, addsi3_incdec): Likewise.
15939         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
15940         (mulhi3, mulsi3): Likewise.
15941         (udivhi3, udivsi3): Likewise.
15942         (divhi3, divsi3): Likewise.
15943         (andorqi3, andorhi3, andorsi3): Likewise.
15945 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
15947         PR target/85694
15948         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
15949         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
15951 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
15953         PR tree-optimization/85694
15954         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
15955         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
15956         UNSPEC_URHADD.
15957         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
15958         (<u>avg<mode>3_ceil): New patterns.
15960 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
15962         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
15963         scan-tree-dump directive.
15964         * gcc.dg/vect/slp-perm-2.c: Likewise.
15965         * gcc.dg/vect/slp-perm-3.c: Likewise.
15966         * gcc.dg/vect/slp-perm-5.c: Likewise.
15967         * gcc.dg/vect/slp-perm-6.c: Likewise.
15968         * gcc.dg/vect/slp-perm-7.c: Likewise.
15969         * gcc.dg/vect/slp-perm-8.c: Likewise.
15971 2018-07-03  Marek Polacek  <polacek@redhat.com>
15973         PR middle-end/86202
15974         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
15976 2018-07-03  Richard Biener  <rguenther@suse.de>
15978         PR ipa/86389
15979         * tree-ssa-structalias.c (find_func_clobbers): Properly
15980         handle indirect calls.
15982 2018-07-03  Jeff Law  <law@redhat.com>
15984         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
15985         (shifts): New code iterator.
15986         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
15987         expander.  Fix HImode handling on H8/SX.
15988         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
15989         (subqi3, subhi3, subsi3 expanders): Likewise.
15990         (andqi3, andhi3, andsi3 expanders): Likewise.
15991         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
15992         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
15993         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
15994         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
15995         (zero_extendqihi2, zero_extendqisi2): Likewise.
15996         (extendqihi2, extendqisi2): Likewise.
15997         (rotlqi3, rotlhi3, rotlsi3): Likewise.
15998         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
15999         (rotlqi3_1, rotlhi3_1): Likewise.
16000         (logicalhi3_sn, logicalsi3_sn): Likewise.
16001         (logicalhi3, logicalsi3): Likewise.
16003 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
16005         * tree-vect-patterns.c (vect_recog_rotate_pattern)
16006         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
16007         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
16008         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
16009         type to append_pattern_def_seq instead of creating a stmt_vec_info
16010         directly.
16011         (build_mask_conversion): Likewise.  Remove vinfo argument.
16012         (vect_add_conversion_to_patterm): Likewise, renaming to...
16013         (vect_add_conversion_to_pattern): ...this.
16014         (vect_recog_mask_conversion_pattern): Update call to
16015         build_mask_conversion.  Pass the vector type to
16016         append_pattern_def_seq here too.
16017         (vect_recog_gather_scatter_pattern): Update call to
16018         vect_add_conversion_to_pattern.
16020 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
16022         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
16023         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
16024         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
16025         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
16026         STMT_VINFO_PATTERN_DEF_SEQ to null here.
16027         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
16028         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
16029         append_pattern_def_seq instead of new_pattern_def_seq.
16030         (vect_recog_divmod_pattern): Do both of the above.
16031         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
16032         is null.
16034 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
16036         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
16037         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
16038         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
16039         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
16040         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
16041         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
16042         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
16043         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
16044         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
16045         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
16046         parameter with a single stmt_vec_info.
16047         (vect_recog_func_ptr): Likewise.
16048         (vect_recog_gather_scatter_pattern): Likewise, folding in...
16049         (vect_try_gather_scatter_pattern): ...this.
16050         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
16051         the stmt_vec_info of the statement to be matched.  Don't clear
16052         STMT_VINFO_RELATED_STMT.
16053         (vect_pattern_recog): Update call accordingly.
16055 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
16057         PR tree-optimization/85694
16058         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
16059         (uavgM3_ceil): Document new optabs.
16060         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
16061         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
16062         functions.
16063         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
16064         (savg_ceil_optab): New optabs.
16065         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
16066         (vect_vect_recog_func_ptrs): Add it.
16067         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
16068         constant directly from the associated lhs.
16070 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
16072         * tree-vect-patterns.c (vect_split_statement): New function.
16073         (vect_convert_input): Use it to try to split an existing cast.
16075 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
16077         * poly-int.h (print_hex): New function.
16078         * dumpfile.h (dump_dec, dump_hex): Declare.
16079         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
16080         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
16081         min_input_precision, operation_precision and operation_sign.
16082         * tree-vect-patterns.c (vect_get_range_info): New function.
16083         (vect_same_loop_or_bb_p, vect_single_imm_use)
16084         (vect_operation_fits_smaller_type): Delete.
16085         (vect_look_through_possible_promotion): Add an optional
16086         single_use_p parameter.
16087         (vect_recog_over_widening_pattern): Rewrite to use new
16088         stmt_vec_info infomration.  Handle one operation at a time.
16089         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
16090         (vect_truncatable_operation_p, vect_set_operation_type)
16091         (vect_set_min_input_precision): New functions.
16092         (vect_determine_min_output_precision_1): Likewise.
16093         (vect_determine_min_output_precision): Likewise.
16094         (vect_determine_precisions_from_range): Likewise.
16095         (vect_determine_precisions_from_users): Likewise.
16096         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
16097         (vect_vect_recog_func_ptrs): Put over_widening first.
16098         Add cast_forwprop.
16099         (vect_pattern_recog): Call vect_determine_precisions.
16101 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
16103         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
16104         statements that have been replaced by further pattern statements.
16105         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
16107 2018-07-03  Richard Biener  <rguenther@suse.de>
16109         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
16110         always set *dt.  Dump vectype in vectype overload.
16111         * dumpfile.h (dump_gimple_expr): New function.
16112         (dump_gimple_expr_loc): Likewise.
16113         * dumpfile.c (dump_gimple_expr): New function.
16114         (dump_gimple_expr_loc): Likewise.
16116 2018-07-02  Jeff Law  <law@redhat.com>
16118         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
16119         the H8/300, H8/300H and H8/S variants into a single pattern.
16120         (movhi_h8300, movqi_h8300hs): Similarly.
16121         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
16122         (QHI mode iterator): New.
16124         * config/h8300/h8300.md: Remove trailing whitespace.
16126 2018-07-02  Jim Wilson  <jimw@sifive.com>
16128         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
16129         instead of emit_insn for interrupt returns.
16130         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
16131         (riscv_sret, riscv_uret): Likewise.
16133 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
16135         * pretty-print.c (selftest::test_pp_format): Move save and restore
16136         of quotes to class auto_fix_quotes, and add an instance.
16137         * selftest.c: Include "intl.h".
16138         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
16139         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
16140         * selftest.h (selftest::auto_fix_quotes): New class.
16142 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
16144         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
16145         (aarch64_sve_prepare_conditional_op): Remove.
16146         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
16147         Allow aarch64_simd_reg_or_zero as select operand; remove
16148         the aarch64_sve_prepare_conditional_op call.
16149         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
16150         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
16151         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
16152         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
16153         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
16154         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
16155         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
16156         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
16157         and a splitters to match all of the *_any patterns.
16158         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
16160         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
16161         (SVE_COND_FP_BINARY_REV): Remove.
16162         (sve_int_op_rev, sve_fp_op_rev): New.
16163         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
16164         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
16165         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
16166         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
16167         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
16168         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
16169         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
16170         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
16171         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
16173         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
16174         Remove match_dup 1 from the inner unspec.
16175         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
16177         * config/aarch64/aarch64.md (movprfx): New attr.
16178         (length): Default movprfx to 8.
16179         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
16180         (*madd<SVE_I>, *msub<SVE_I): Likewise.
16181         (*<su>mul<SVE_I>3_highpart): Likewise.
16182         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
16183         (*v<ASHIFT><SVE_I>3): Likewise.
16184         (*<su><MAXMIN><SVE_I>3): Likewise.
16185         (*<su><MAXMIN><SVE_F>3): Likewise.
16186         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
16187         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
16188         (*div<SVE_F>4): Likewise.
16190 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
16192         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
16193         in dump string.
16195 2018-07-02  Richard Biener  <rguenther@suse.de>
16197         PR tree-optimization/86363
16198         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
16199         memset argument refers to a non-variable address.
16201 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
16203         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
16204         {PLUS,MINUS}_EXPR code to...
16205         (adjust_symbolic_bound): ...here,
16206         (combine_bound): ...here,
16207         (set_value_range_with_overflow): ...and here.
16209 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
16211         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
16212         code...
16213         (extract_range_from_abs_expr): ...here.
16215 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
16217         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
16218         -fno-omit-frame-pointer when not optimizing.
16220 2018-07-02  Martin Liska  <mliska@suse.cz>
16222         PR ipa/86279
16223         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
16224         (propagate_nothrow): Likewise.
16226 2018-07-02  Martin Liska  <mliska@suse.cz>
16228         PR ipa/86323
16229         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
16231 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
16233         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
16234         function in r262149, changing "loc" param from source_location to
16235         const dump_location_t &.
16236         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
16237         declaration, as above.
16239 2018-07-01  Paul Koning  <ni1d@arrl.net>
16241         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
16242         -munit-asm, -mgnu-asm, -mdec-asm.
16243         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
16244         (pdp11_output_labelref): New.
16245         (pdp11_output_def): New.
16246         (pdp11_output_addr_vec_elt): New.
16247         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
16248         %# and %@ format codes.
16249         (pdp11_option_override): New.
16250         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
16251         (pdp11_output_ident): New.
16252         (pdp11_asm_named_section): New.
16253         (pdp11_asm_init_sections): New.
16254         (pdp11_file_start): New.
16255         (pdp11_file_end): New.
16256         (output_ascii): Use .ascii/.asciz for -mdec-asm.
16257         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
16258         %o, like %c but octal.
16259         (pdp11_option_override): New.
16260         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
16261         -mdec-asm.
16262         (DATA_SECTION_ASM_OP): Ditto.
16263         (READONLY_DATA_SECTION_ASM_OP): New.
16264         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
16265         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
16266         (ASM_OUTPUT_LABELREF): Ditto.
16267         (ASM_OUTPUT_DEF): Ditto.
16268         (ASM_OUTPUT_EXTERNAL): New.
16269         (ASM_OUTPUT_SOURCE_FILENAME): New.
16270         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
16271         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
16272         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
16273         %# and %@ format codes.
16274         * config/pdp11/pdp11.opt (mgnu-asm): New.
16275         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
16276         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
16277         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
16279 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
16281         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
16282         dereferencing path[] beyond its length.
16283         (debug_path): New.
16284         (debug_all_paths): New.
16285         (rewire_first_differing_edge): New.
16286         (adjust_paths_after_duplication): New.
16287         (duplicate_thread_path): Call adjust_paths_after_duplication.
16288         Add new argument.
16289         (thread_through_all_blocks): Add new argument to
16290         duplicate_thread_path.
16292 2018-06-30  Jim Wilson  <jimw@sifive.com>
16294         * config/riscv/predicates.md (p2m1_shift_operand): New.
16295         (high_mask_shift_operand): New.
16296         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
16297         pattern using p2m1_shift_operand.
16298         (lshsi3_zero_extend_3+2): New combiner pattern using
16299         high_mask_shift_operand.
16301 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
16303         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
16304         split out from...
16305         (vect_recog_rotate_pattern): ...here.
16306         (vect_convert_input): Try to insert casts of invariants in the
16307         preheader.
16308         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
16309         preheader to be empty.
16311 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
16313         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
16314         vector type.  If given, install it in the new statement's
16315         STMT_VINFO_VECTYPE.
16316         (vect_element_precision): New function.
16317         (vect_unpromoted_value): New struct.
16318         (vect_unpromoted_value::vect_unpromoted_value): New function.
16319         (vect_unpromoted_value::set_op): Likewise.
16320         (vect_look_through_possible_promotion): Likewise.
16321         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
16322         (vect_widened_op_tree, vect_convert_input): Likewise.
16323         (vect_convert_inputs, vect_convert_output): Likewise.
16324         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
16325         to handle the optional cast of the multiplication result and
16326         vect_widened_op_tree to detect the widened multiplication itself.
16327         Do not require the input and output of promotion casts to have
16328         the same sign, but base the signedness of the operation on the
16329         input rather than the result.  If the pattern includes two
16330         promotions, check that those promotions have the same sign.
16331         Do not restrict the MULT_EXPR handling to a double-width result;
16332         handle quadruple-width results and wider.  Use vect_convert_inputs
16333         to convert the inputs to the common type.
16334         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
16335         to handle the optional cast of the ABS result.  Also allow a sign
16336         change or a sign extension between the ABS and MINUS.
16337         Use vect_widened_op_tree to detect the widened subtraction and use
16338         vect_convert_inputs to convert the inputs to the common type.
16339         (vect_handle_widen_op_by_const): Delete.
16340         (vect_recog_widen_op_pattern): New function.
16341         (vect_recog_widen_mult_pattern): Use it.
16342         (vect_recog_widen_shift_pattern): Likewise.
16343         (vect_recog_widen_sum_pattern): Use
16344         vect_look_through_possible_promotion to handle the promoted
16345         PLUS_EXPR operand.
16347 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
16349         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
16350         the containing gimple_seq *.
16351         * gimple-iterator.h (gsi_for_stmt): Declare it.
16352         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
16353         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
16354         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
16355         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
16356         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
16357         checks.
16358         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
16359         split out from...
16360         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
16361         statement being replaced is part of an existing pattern
16362         definition sequence, inserting the new pattern statements before
16363         the original one.
16364         (vect_pattern_recog_1): Don't return a bool.  If the statement
16365         is already part of a pattern, instead apply pattern matching
16366         to the pattern definition statements.  Don't clear the
16367         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
16368         (vect_pattern_recog): Don't break after the first match;
16369         continue processing the pattern definition statements instead.
16370         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
16372 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
16374         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
16375         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
16376         (vect_recog_widen_sum_pattern): Use it.
16378 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
16380         * tree-vect-loop.c (vectorizable_reduction): Assert that the
16381         phi is not a pattern statement and has not been replaced by
16382         a pattern statement.
16383         * tree-vect-patterns.c (type_conversion_p): Don't check
16384         STMT_VINFO_IN_PATTERN_P.
16385         (vect_recog_vector_vector_shift_pattern): Likewise.
16386         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
16387         the pattern statement rather than the original statement; check
16388         directly for a WIDEN_MULT_EXPR here.
16389         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
16390         vect_is_simple_use to return the pattern statement rather
16391         than the original statement; use is_pattern_stmt_p to check
16392         for such a pattern statement.
16393         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
16394         to return the pattern statement rather than the original statement;
16395         don't do the same transformation here.
16396         (vect_is_simple_use): If the defining statement has been replaced
16397         by a pattern statement, return the pattern statement instead.
16398         Remove the corresponding (local) transformation from the vectype
16399         overload.
16401 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
16403         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
16404         end and default to null.
16405         * tree-vect-loop.c (vect_create_epilog_for_reduction)
16406         (vectorizable_reduction): Update calls accordingly, dropping the
16407         gimple ** argument if the passed-back statement isn't needed.
16408         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
16409         (vect_recog_rotate_pattern): Likewise.
16410         (vect_recog_mask_conversion_pattern): Likewise.
16411         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
16412         (vect_mask_constant_operand_p): Likewise.
16413         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
16414         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
16415         (get_group_load_store_type, get_load_store_type): Likewise.
16416         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
16417         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
16418         (vectorizable_conversion, vectorizable_assignment): Likewise.
16419         (vectorizable_shift, vectorizable_operation): Likewise.
16420         (vectorizable_store, vect_is_simple_cond): Likewise.
16421         (vectorizable_condition, vectorizable_comparison): Likewise.
16422         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
16423         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
16424         and move it to the end.  Cope with null def_stmt_outs.
16426 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
16428         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
16430 2018-06-29  Jeff Law  <law@redhat.com>
16432         * config/v850/v850.c (v850_legitimate_address_p): Handle large
16433         displacements for TARGET_V850E2V3 and newer.
16434         (TARGET_LRA_P): Remove.  Defaults to LRA now.
16435         * config/v850/v850.md (sign23byte_load): Remove.
16436         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
16437         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
16439 2018-06-29  Martin Liska  <mliska@suse.cz>
16441         PR lto/85759
16442         * coverage.c (coverage_init): Mangle full path name.
16443         * doc/invoke.texi: Document the change.
16444         * gcov-io.c (mangle_path): New.
16445         * gcov-io.h (mangle_path): Likewise.
16446         * gcov.c (mangle_name): Use mangle_path for path mangling.
16448 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16450         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
16451         if starting source register is not even.
16453 2018-06-29  Martin Liska  <mliska@suse.cz>
16455         PR tree-optimization/86263
16456         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
16457         Make edge redirection.
16459 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
16461         * dumpfile.c (dump_loc): Add indentation based on scope depth.
16462         (dump_scope_depth): New variable.
16463         (get_dump_scope_depth): New function.
16464         (dump_begin_scope): New function.
16465         (dump_end_scope): New function.
16466         * dumpfile.h (get_dump_scope_depth): New declaration.
16467         (dump_begin_scope): New declaration.
16468         (dump_end_scope): New declaration.
16469         (class auto_dump_scope): New class.
16470         (AUTO_DUMP_SCOPE): New macro.
16471         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
16472         AUTO_DUMP_SCOPE.
16474 2018-06-29  Richard Biener  <rguenther@suse.de>
16476         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
16477         compute_all_dependences succeeds.
16478         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
16479         exceed --param loop-max-datarefs-for-datadeps.
16481 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
16483         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
16485 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
16487         PR target/86348
16488         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
16489         alternative 0 in preferred_for_speed attribute.
16491 2018-06-28  Paul Koning  <ni1d@arrl.net>
16493         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
16494         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
16495         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
16496         * config/pdp11/pdp11.md: Correct "length" attribute calculation
16497         for shift insn patterns.
16499 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
16501         * cgraph.c (cgraph_node::get_body): Replace assignments to
16502         "dump_file" with calls to set_dump_file.
16503         * dumpfile.c (alt_dump_file): Make static, and group with...
16504         (alt_flags): ...this definition.
16505         (dumps_are_enabled): New variable.
16506         (refresh_dumps_are_enabled): New function.
16507         (set_dump_file): New function.
16508         (set_alt_dump_file): New function.
16509         (gcc::dump_manager::dump_start): Replace assignments to
16510         "dump_file" and "alt_dump_file" with calls to set_dump_file and
16511         set_alt_dump_file.
16512         (gcc::dump_manager::dump_finish): Likewise.
16513         * dumpfile.h (alt_dump_file): Delete decl.
16514         (dumps_are_enabled): New variable decl.
16515         (set_dump_file): New function decl.
16516         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
16517         global.
16518         * tree-nested.c (lower_nested_functions): Replace assignments to
16519         "dump_file" with calls to set_dump_file.
16521 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
16523         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
16524         goto_locus of each outgoing edge of each basic block.
16526 2018-06-28  Richard Biener  <rguenther@suse.de>
16528         * dwarf2out.c (decl_scope_table): Remove.
16529         (push_decl_scope): Likewise.
16530         (pop_decl_scope): Likewise.
16531         (gen_type_die_for_member): Do not call push/pop_decl_scope.
16532         (gen_struct_or_union_type_die): Likewise.
16533         (gen_tagged_type_die): Likewise.
16534         (dwarf2out_init): Do not initialize decl_scope_table.
16535         (dwarf2out_c_finalize): Do not free it.
16537 2018-06-28  Richard Biener  <rguenther@suse.de>
16539         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
16540         deciding whether to not re-use a DIE.
16542 2018-06-28  Richard Biener  <rguenther@suse.de>
16544         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
16545         DW_AT_abstract_origin attribute.
16547 2018-06-28  Martin Liska  <mliska@suse.cz>
16549         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
16550         Use newly introduced constants.
16551         * tree-switch-conversion.h (struct jump_table_cluster):
16552         Define max_ratio_for_size and max_ratio_for_speed.
16554 2018-06-28  Martin Liska  <mliska@suse.cz>
16556         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
16557         Add new checking assert to catch invalid state.
16558         (jump_table_cluster::can_be_handled): Handle single case
16559         clusters.
16560         (jump_table_cluster::is_beneficial): Bail out for such case.
16561         (bit_test_cluster::find_bit_tests):
16562         Add new checking assert to catch invalid state.
16563         (bit_test_cluster::can_be_handled): Handle single case
16564         clusters.
16565         (bit_test_cluster::is_beneficial): Bail out for such case.
16566         (switch_decision_tree::analyze_switch_statement):
16567         Fix comment.
16569 2018-06-28  Martin Liska  <mliska@suse.cz>
16571         * common.opt: Introduce -completion option.
16572         * gcc.c (driver_handle_option): Handle it.
16573         (driver::main): Print completions if completion
16574         is set.
16575         * opt-suggestions.c (option_proposer::get_completions):
16576         New function.
16577         (option_proposer::suggest_completion): Likewise.
16578         (option_proposer::find_param_completions): Likewise.
16579         (verify_autocompletions): Likewise.
16580         (test_completion_valid_options): Likewise.
16581         (test_completion_valid_params): Likewise.
16582         (in_completion_p): Likewise.
16583         (empty_completion_p): Likewise.
16584         (test_completion_partial_match): Likewise.
16585         (test_completion_garbage): Likewise.
16586         (opt_proposer_c_tests): Likewise.
16587         * opt-suggestions.h: Declare new functions.
16588         * opts.c (common_handle_option): Handle OPT__completion_.
16589         * selftest-run-tests.c (selftest::run_tests): Add
16590         opt_proposer_c_tests.
16591         * selftest.c (assert_str_startswith): New.
16592         * selftest.h (assert_str_startswith): Likewise.
16593         (opt_proposer_c_tests): New.
16594         (ASSERT_STR_STARTSWITH): Likewise.
16596 2018-06-28  Martin Liska  <mliska@suse.cz>
16598         * Makefile.in: Add opt-suggestions.o.
16599         * gcc-main.c: Include opt-suggestions.h.
16600         * gcc.c (driver::driver): Likewise.
16601         (driver::~driver): Remove m_option_suggestions.
16602         (driver::build_option_suggestions): Moved to option_proposer.
16603         (driver::suggest_option): Likewise.
16604         (driver::handle_unrecognized_options): Use option_proposer.
16605         * gcc.h (class driver): Add new memver m_option_proposer.
16606         * opt-suggestions.c: New file.
16607         * opt-suggestions.h: New file.
16609 2018-06-28  Martin Liska  <mliska@suse.cz>
16611         * vec.h (class auto_string_vec): New (moved from auto_argvec).
16612         (auto_string_vec::~auto_string_vec): Likewise.
16614 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
16616         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
16617         prevent_decl_creation_for_types fields up and add reset_location field.
16618         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
16619         statement if id->reset_location is true.
16620         (copy_edges_for_bb): Do not set goto_locus on the new edges if
16621         id->reset_location is true.
16622         (copy_phis_for_bb): Force input_location on the arguments if
16623         id->reset_location is true.
16624         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
16625         is set on the function to be inlined.
16627 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
16629         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
16631 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
16633         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
16634         registers for Pmode.
16635         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
16636         hard registers for the clobbered pseudo.
16638 2018-06-27  Paul Koning  <ni1d@arrl.net>
16640         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
16641         mutually exclusive options.
16642         * config/pdp11/constraints.md (h): New constraint.
16643         (O): Update definition to match shift code generation.
16644         (D): New constraint.
16645         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
16646         (CCFP): Remove.
16647         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
16648         function.
16649         (output_jump): Change arguments.
16650         (pdp11_fixed_cc_regs): New function.
16651         (pdp11_cc_mode): Ditto.
16652         (pdp11_expand_shift): Ditto.
16653         (pdp11_assemble_shift): Ditto.
16654         (pdp11_small_shift): Ditto.
16655         (pdp11_branch_cost): Remove.
16656         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
16657         from output.
16658         (pdp11_register_move_cost): Update for CC registers.
16659         (pdp11_rtx_costs): Add case for LSHIFTRT.
16660         (pdp11_output_jump): Add CCNZ mode conditional branches.
16661         (notice_update_cc_on_set): Remove.
16662         (pdp11_cc_mode): New function.
16663         (simple_memory_operand): Correct pre/post decrement case.
16664         (no_side_effect_operand): New function.
16665         (pdp11_regno_reg_class): Add CC_REGS class.
16666         (pdp11_fixed_cc_regs): New function.
16667         (pdp11_small_shift): New function.
16668         (pdp11_expand_shift): New function to expand shift insns.
16669         (pdp11_assemble_shift): New function to output shifts.
16670         (pdp11_branch_cost): Remove.
16671         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
16672         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
16673         (WCHAR_TYPE): Ditto.
16674         (PTRDIFF_TYPE): Ditto.
16675         (ADJUST_INSN_LENGTH): New macro.
16676         (FIXED_REGISTERS): Add CC registers.
16677         (CALL_USED_REGISTERS): Ditto.
16678         (reg_class): Ditto.
16679         (REG_CLASS_NAMES): Ditto.
16680         (REG_CLASS_CONTENTS): Ditto.
16681         (SELECT_CC_MODE): Use new function.
16682         (TARGET_FLAGS_REGNUM): New macro.
16683         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
16684         (cc0_reg_rtx): Remove.
16685         (CC_STATUS_MDEP): Remove.
16686         (CC_STATUS_MDEFP_INIT): Remove.
16687         (CC_IN_FPU): Remove.
16688         (NOTICE_UPDATE_CC): Remove.
16689         (REGISTER_NAMES): Add CC registers.
16690         (BRANCH_COST): Change to constant 1.
16691         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
16692         handling.
16693         * config/pdp11/pdp11.opt (mbcopy): Remove.
16694         (mbcopy-builtin): Remove.
16695         (mbranch-cheap): Remove.
16696         (mbranch-expensive): Remove.
16697         * config/pdp11/predicates.md (expand_shift_operand): Update to
16698         match shift code generation.
16699         (ccnz_operator): New predicate.
16700         * doc/invoke.texi (PDP-11 Options): Remove deleted options
16701         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
16702         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
16703         exclusive options.
16704         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
16705         description of O constraint.
16707 2018-06-27  Jeff Law  <law@redhat.com>
16708             Austin Law  <austinklaw@gmail.com>
16710         * config/v850/v850.md (addsi3_set_flags): New pattern.
16711         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
16712         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
16713         (zero_extendhisi2_v850_set_flags): Likewise.
16714         (zero_extendqisi2_v850_set_flags): Likewise.
16715         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
16716         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
16717         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
16719         * config/v850/v850-protos.h (notice_update_cc): Remove.
16720         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
16721         (v850_print_operand): Handle 'D' and "d".
16722         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
16723         Add handling of arithmetic/logical operations compared against zero.
16724         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
16725         Do not look at v850_compare_op, instead get mode from last argument.
16726         (v850_gen_compare): Remove
16727         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
16728         after reload for prologue insns.
16729         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
16730         patterns.
16731         (construct_save_jarl): Likewise.
16732         (TARGET_FLAGS_REGNUM): Define.
16733         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
16734         (NOTICE_UPDATE_CC): Remove.
16735         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
16736         than cc0.  Conditionalize on reload_completed.
16737         (cmpsi_insn, setfcc_insn): Likewise.
16738         (tst1 splitter): Turn into define_and_split which sets the flags
16739         after reload.
16740         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
16741         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
16742         (cstoresf4, cstoredf4): Clobber the flags.
16743         (cmpsi, cmpsf, cmpdf): Remove expanders.
16744         (setf_insn): Remove pattern.
16745         (addsi3): Turn into define_and_split which clobbers the flags after
16746         reload and a suitable pattern (addsi3_clobber_flags) for use after
16747         reload.
16748         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
16749         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
16750         (ashrsi3, ashrsi3_v850e2): Likewise.
16751         (bins): Clobber the flags.
16752         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
16753         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
16754         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
16755         (call_value_internal_short, call_value_internal_long): Likewise.
16756         (callt_save_interrupt, callt_return_interrupt): Likewise.
16757         (save_interrupt, return_interrupt): Likewise.
16758         (callt_save_all_interrupt, save_all_interrupt): Likewise.
16759         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
16760         (restore_all_interrupt, _restore_all_interrupt): Likewise.
16761         (All FP comparisons): Only allow after reload has completed.
16762         (trfsr): Likewise.
16763         (divh, divhu): Tweak output template.
16764         (branch_z_normal, branch_z_invert): Remove
16765         (branch_nz_normal, branch_nz_invert): Likewise.
16766         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
16768         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
16769         * config/v850/v850.c (notice_update_cc): Remove.
16770         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
16771         (CC_NO_CARRY): Likewise.
16772         (NOTICE_UPDATE_CC): Define to nothing.
16773         * config/v850/v850.md: Remove block comment on cc0 handling
16774         Remove "cc" attribute from all patterns.  Remove cc_status handling
16775         from all patterns.  Minor formatting fixes.
16777 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16779         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
16780         (cortex-a76.cortex-a55): Likewise.
16781         * config/aarch64/aarch64-tune.md: Regenerate.
16782         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
16783         cortex-a76.cortex-a55.
16785 2018-06-27  Jeff Law  <law@redhat.com>
16787         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
16788         (MULTILIB_DIRNAMES): Similarly.
16790 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
16792         * gimple.h (gimple_return_retbnd): Delete.
16793         (gimple_return_set_retbnd): Likewise.
16794         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
16795         gimple_return_set_retbnd.
16796         * gimple-pretty-print.c (dump_gimple_return): Remove call to
16797         gimple_return_retbnd and adjust.
16798         * tree-inline.h (struct copy_body_data): Remove retbnd field.
16799         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
16800         Explicitly return NULL in a couple more cases.  Move assertion
16801         on debug statements and remove unreachable code.
16802         (reset_debug_binding): Do not test id->retbnd.
16803         (expand_call_inline): Do not set it.
16805 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
16807         * configure.ac: Add --disable-gcov option.
16808         * configure: Regenerate.
16809         * Makefile.in: Honour @enable_gcov@.
16810         * doc/install.texi: Document --disable-gcov.
16812 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16814         * config/arm/arm-cpus.in (cortex-a76): New entry.
16815         (cortex-a76.cortex-a55): Likewise.
16816         * config/arm/arm-tables.opt: Regenerate.
16817         * config/arm/arm-tune.md: Likewise.
16818         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
16819         * doc/invoke.texi (ARM Options): Document cortex-a76 and
16820         cortex-a76.cortex-a55.
16822 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
16824         PR target/85769
16825         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
16827 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
16829         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
16830         comment.
16831         (EPILOGUE_USES): Likewise.
16833 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
16835         * tree-inline.c (remap_location): New function extracted from...
16836         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
16837         (copy_phis_for_bb): ...here.  Call remap_location.
16838         (copy_cfg_body): Adjust call to copy_edges_for_bb.
16840 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
16842         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
16843         unaligned vsx for 16B memset.
16845 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
16847         PR target/86285
16848         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
16849         ieee128_float_type_node to long_double_type_node unless
16850         TARGET_LONG_DOUBLE_128 is set.
16852 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
16854         * cfgloop.c (get_loop_location): Convert return type from
16855         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
16856         by implicit construction from rtx_insn *, and using
16857         dump_user_location_t::from_function_decl for the fallback case.
16858         * cfgloop.h (get_loop_location): Convert return type from
16859         location_t to dump_user_location_t.
16860         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
16861         dump_printf_loc to pass in a dump_location_t rather than a
16862         location_t, via the gimple stmt.
16863         * coverage.c (get_coverage_counts): Update calls to
16864         dump_printf_loc to pass in dump_location_t rather than a
16865         location_t.
16866         * doc/optinfo.texi (Dump types): Convert example of
16867         dump_printf_loc from taking "locus" to taking "insn".  Update
16868         description of the "_loc" calls to cover dump_location_t.
16869         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
16870         "selftest.h".
16871         (dump_user_location_t::dump_user_location_t): New constructors,
16872         from gimple *stmt and rtx_insn *.
16873         (dump_user_location_t::from_function_decl): New function.
16874         (dump_loc): Make static.
16875         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
16876         const dump_location_t &.
16877         (dump_generic_expr_loc): Delete.
16878         (dump_printf_loc): Convert param "loc" from location_t to
16879         const dump_location_t &.
16880         (selftest::test_impl_location): New function.
16881         (selftest::dumpfile_c_tests): New function.
16882         * dumpfile.h: Include "profile-count.h".
16883         (class dump_user_location_t): New class.
16884         (struct dump_impl_location_t): New struct.
16885         (class dump_location_t): New class.
16886         (dump_printf_loc): Convert 2nd param from source_location to
16887         const dump_location_t &.
16888         (dump_generic_expr_loc): Delete.
16889         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
16890         const dump_location_t &.
16891         * gimple-fold.c (fold_gimple_assign): Update call to
16892         dump_printf_loc to pass in a dump_location_t rather than a
16893         location_t, via the gimple stmt.
16894         (gimple_fold_call): Likewise.
16895         * gimple-loop-interchange.cc
16896         (loop_cand::analyze_iloop_reduction_var): Update for change to
16897         check_reduction_path.
16898         (tree_loop_interchange::interchange): Update for change to
16899         find_loop_location.
16900         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
16901         change in return-type of find_loop_location.
16902         (graphite_regenerate_ast_isl): Likewise.
16903         * graphite-optimize-isl.c (optimize_isl): Likewise.
16904         * graphite.c (graphite_transform_loops): Likewise.
16905         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
16906         pass in a dump_location_t rather than a location_t, via the
16907         gimple stmt.
16908         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
16909         * ipa.c (walk_polymorphic_call_targets): Likewise.
16910         * loop-unroll.c (report_unroll): Convert "locus" param from
16911         location_t to dump_location_t.
16912         (decide_unrolling): Update for change to get_loop_location's
16913         return type.
16914         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
16915         location_t to dump_user_location_t.
16916         (grid_find_single_omp_among_assignments_1): Updates calls to
16917         dump_printf_loc to pass in a dump_location_t rather than a
16918         location_t, via the gimple stmt.
16919         (grid_parallel_clauses_gridifiable): Convert "tloc" from
16920         location_t to dump_location_t.  Updates calls to dump_printf_loc
16921         to pass in a dump_location_t rather than a location_t, via the
16922         gimple stmt.
16923         (grid_inner_loop_gridifiable_p): Likewise.
16924         (grid_dist_follows_simple_pattern): Likewise.
16925         (grid_gfor_follows_tiling_pattern): Likewise.
16926         (grid_target_follows_gridifiable_pattern): Likewise.
16927         (grid_attempt_target_gridification): Convert initialization
16928         of local "grid" from memset to zero-initialization; FIXME: does
16929         this require C++11?  Update call to dump_printf_loc to pass in a
16930         optinfo_location rather than a location_t, via the gimple stmt.
16931         * profile.c (read_profile_edge_counts): Updates call to
16932         dump_printf_loc to pass in a dump_location_t rather than a
16933         location_t
16934         (compute_branch_probabilities): Likewise.
16935         * selftest-run-tests.c (selftest::run_tests): Call
16936         dumpfile_c_tests.
16937         * selftest.h (dumpfile_c_tests): New decl.
16938         * tree-loop-distribution.c (pass_loop_distribution::execute):
16939         Update for change in return type of find_loop_location.
16940         * tree-parloops.c (parallelize_loops): Likewise.
16941         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
16942         "locus" from location_t to dump_user_location_t.
16943         (canonicalize_loop_induction_variables): Likewise.
16944         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
16945         for change in return type of find_loop_location.
16946         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
16947         to dump_printf_loc to pass in a dump_location_t rather than a
16948         location_t, via the stmt.
16949         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
16950         Likewise.
16951         * tree-vect-loop-manip.c (find_loop_location): Convert return
16952         type from source_location to dump_user_location_t.
16953         (vect_do_peeling): Update for above change.
16954         (vect_loop_versioning): Update for change in type of
16955         vect_location.
16956         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
16957         from location_t to dump_user_location_t.
16958         (vect_estimate_min_profitable_iters): Update for change in type
16959         of vect_location.
16960         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
16961         location_t to dump_location_t.
16962         (vect_slp_bb): Update for change in type of vect_location.
16963         * tree-vectorizer.c (vect_location): Convert from source_location
16964         to dump_user_location_t.
16965         (try_vectorize_loop_1): Update for change in vect_location's type.
16966         (vectorize_loops): Likewise.
16967         (increase_alignment): Likewise.
16968         * tree-vectorizer.h (vect_location): Convert from source_location
16969         to dump_user_location_t.
16970         (find_loop_location): Convert return type from source_location to
16971         dump_user_location_t.
16972         (check_reduction_path): Convert 1st param from location_t to
16973         dump_user_location_t.
16974         * value-prof.c (check_counter): Update call to dump_printf_loc to
16975         pass in a dump_user_location_t rather than a location_t; update
16976         call to error_at for change in type of "locus".
16977         (check_ic_target): Update call to dump_printf_loc to
16978         pass in a dump_user_location_t rather than a location_t, via the
16979         call_stmt.
16981 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
16983         * config/s390/s390.h (enum processor_flags): Do not use
16984         default tune parameter when -march was specified.
16986 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
16988         PR target/86314
16989         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
16990         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
16991         operands.
16993 2018-06-26  Richard Biener  <rguenther@suse.de>
16995         PR tree-optimization/86287
16996         PR bootstrap/86316
16997         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
16998         (vect_analyze_loop): Initialize n_stmts.
17000 2018-06-26  Richard Biener  <rguenther@suse.de>
17002         PR middle-end/86271
17003         * fold-const.c (fold_convertible_p): Pointer extension
17004         isn't valid.
17006 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
17008         PR debug/86064
17009         * dwarf2out.c (loc_list_has_views): Adjust comments.
17010         (dw_loc_list): Split single cross-partition range with
17011         nonzero locview.
17013 2018-06-25  Jeff Law  <law@redhat.com>
17015         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
17016         on -mbig-switch by default.
17018         * config/v850/predicates.md (const_float_1_operand): Fix match_code
17019         test.
17020         (const_float_0_operand): Remove unused predicate.
17021         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
17022         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
17023         (recipsf2): New expander.  Original pattern now called
17024         (recipsf2_insn).
17025         (recipdf2, recipdf2_insn): Similarly.
17026         (rsqrtsf2, rsqrtsf2_insn): Similarly
17027         (rsqrtdf2, rsqrtdf2_insn): Similarly
17029 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
17031         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
17032         Simplify logic for FreeBSD (twice).
17034 2018-06-25  Martin Sebor  <msebor@redhat.com>
17036         PR tree-optimization/86204
17037         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
17038         a strnlen result if it's less than the length of the string.
17040 2018-06-25  Martin Sebor  <msebor@redhat.com>
17042         PR tree-optimization/85700
17043         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
17044         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
17045         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
17047 2018-06-25  Martin Sebor  <msebor@redhat.com>
17049         * doc/extend.texi (Zero-length arrays): Update and clarify.
17051 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
17053         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
17054         added IEEE/IBM long double multilib support on PowerPC little
17055         endian Linux systems.
17056         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
17057         (MULTILIB_DEFAULTS): Likewise.
17058         * config/rs6000/rs6000.c (rs6000_option_override_internal):
17059         Likewise.
17060         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
17061         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
17062         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
17064 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
17066         PR middle-end/86311
17067         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
17068         (REORDER_45): Likewise.
17070 2018-06-25  Jeff Law  <law@redhat.com>
17072         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
17073         dividend to 32 bits.  Adjust length.
17074         (udivmodhi4): Cleanup output template.  Fix length.
17076 2018-06-25  Carl Love  <cel@us.ibm.com>
17078         * config/rs6000/vsx.md: Change word selector to prefered location.
17080 2018-06-25  Richard Biener  <rguenther@suse.de>
17082         PR tree-optimization/86304
17083         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
17084         epilogue-if-converted loops as well.
17086 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
17088         * lto-section-out.c (lto_begin_section): Do not print section
17089         name for noaddr and unnumbered dumps.
17091 2018-06-25  Richard Biener  <rguenther@suse.de>
17093         * tree-vectorizer.h (struct vec_info_shared): New structure
17094         with parts split out from struct vec_info and loop_nest from
17095         struct _loop_vec_info.
17096         (struct vec_info): Adjust accordingly.
17097         (struct _loop_vec_info): Likewise.
17098         (LOOP_VINFO_LOOP_NEST): Adjust.
17099         (LOOP_VINFO_DATAREFS): Likewise.
17100         (LOOP_VINFO_DDRS): Likewise.
17101         (struct _bb_vec_info): Likewise.
17102         (BB_VINFO_DATAREFS): Likewise.
17103         (BB_VINFO_DDRS): Likewise.
17104         (struct _stmt_vec_info): Add dr_aux member.
17105         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
17106         (DR_MISALIGNMENT_UNINITIALIZED): New.
17107         (set_dr_misalignment): Adjust.
17108         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
17109         (vect_analyze_loop): Adjust prototype.
17110         (vect_analyze_loop_form): Likewise.
17111         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
17112         Compute dependences lazily.
17113         (vect_record_base_alignments): Use shared datarefs/ddrs.
17114         (vect_verify_datarefs_alignment): Likewise.
17115         (vect_analyze_data_refs_alignment): Likewise.
17116         (vect_analyze_data_ref_accesses): Likewise.
17117         (vect_analyze_data_refs): Likewise.
17118         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
17119         constructor parameter for shared part.
17120         (vect_analyze_loop_form): Pass in shared part and adjust.
17121         (vect_analyze_loop_2): Pass in storage for the number of
17122         stmts.  Move loop nest finding to the caller.  Compute
17123         datarefs lazily.
17124         (vect_analyze_loop): Pass in shared part.
17125         (vect_transform_loop): Verify shared datarefs are unchanged.
17126         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
17127         constructor parameter for shared part.
17128         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
17129         (vect_slp_bb): Verify shared datarefs are unchanged before
17130         transform.
17131         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
17132         change.
17133         (new_stmt_vec_info): Initialize DR_AUX misalignment to
17134         DR_MISALIGNMENT_UNINITIALIZED.
17135         * tree-vectorizer.c (vec_info::vec_info): Add constructor
17136         parameter for shared part.
17137         (vec_info::~vec_info): Adjust.
17138         (vec_info_shared::vec_info_shared): New.
17139         (vec_info_shared::~vec_info_shared): Likewise.
17140         (vec_info_shared::save_datarefs): Likewise.
17141         (vec_info_shared::check_datarefs): Likewise.
17142         (try_vectorize_loop_1): Construct shared part live for analyses
17143         of a single loop for multiple vector sizes.
17144         * tree-parloops.c (gather_scalar_reductions): Adjust.
17146 2018-06-25  Richard Biener  <rguenther@suse.de>
17148         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
17149         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
17150         (vect_analyze_data_refs): Remove similar code from here and
17151         simplify accordingly.
17153 2018-06-25  Richard Biener  <rguenther@suse.de>
17155         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
17156         for reverse storage order accesses rather than asserting
17157         they cannot happen here.
17159 2018-06-25  Tom de Vries  <tdevries@suse.de>
17161         PR debug/86257
17162         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
17163         Use data16 instead of .byte for insn prefix.
17165 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
17167         PR C++/86082
17168         * parser.c (make_char_string_pack): Pass this literal chars
17169         through cpp_interpret_string.
17170         (cp_parser_userdef_numeric_literal): Check the result of
17171         make_char_string_pack.
17173 2018-06-24  Maya Rashish  <coypu@sdf.org>
17175         * ginclude/stddef.h: Simplify conditions around avoiding
17176         re-definition of __size_t.
17178 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
17180         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
17181         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
17183 2018-06-22  Maya Rashish  <coypu@sdf.org>
17185         * doc/invoke.texi (mno-fancy-math-387): Update for changes
17186         made to OpenBSD and NetBSD through the years.
17188 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17190         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
17191         behavior of vec_pack (vector double, vector double) to match
17192         behavior of vec_float2 (vector double, vector double).
17194 2018-06-22  Olivier Hainque  <hainque@adacore.com>
17196         * gimplify.c (gimplify_function_tree): Prevent creation
17197         of a trampoline for the address of the current function
17198         passed to entry/exit instrumentation hooks.
17200 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
17202         PR target/86222
17203         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
17204         correctly.
17206 2018-06-22  Martin Liska  <mliska@suse.cz>
17208         PR tree-optimization/86263
17209         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
17210         Bail out if is_enabled is false.
17211         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
17212         New declaration.
17213         (jump_table_cluster::is_enabled): New function.
17215 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
17217         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
17218         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
17219         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
17220         (lto_input_ts_binfo_tree_pointers): Likewise.
17221         * tree-streamer-out.c (streamer_write_tree_bitfields,
17222         write_ts_binfo_tree_pointers): Likewise.
17223         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
17225 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
17227         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
17229 2018-06-22  Martin Liska  <mliska@suse.cz>
17231         * symbol-summary.h (get): Make it pure and inline move
17232         functionality from ::get function.
17233         (get): Remove and inline into ::get and ::get_create.
17234         (get_create): Move code from ::get function.
17236 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17238         PR target/85994
17239         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
17240         -x assembler-with-cpp.
17242 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17244         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
17245         _FILE_OFFSET_BITS=64 for C++.
17247 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
17249         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
17250         conversion insn that shows up when pr85657-3.c is compiled using
17251         IEEE 128-bit long double.
17252         (neg<mode>2_internal): Use the correct mode to check whether the
17253         mode is IBM extended.
17254         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
17255         multiply and divide external functions from being created more
17256         than once.
17258 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
17260         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
17261         functions.
17262         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
17263         the edge can be forwarded.
17264         (cfg_layout_merge_blocks): Likewise.
17266 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
17268         * except.c (finish_eh_generation): Commit edge insertions only after
17269         the EH edges have been redirected from post-landing to landing pads.
17271 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
17273         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
17274         create_tmp_var_for to create the FRAME decl.
17275         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
17277 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
17279         * tree-inline.c (copy_edges_for_bb): Minor tweak.
17280         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
17281         debug statement when resetting its value.
17282         (expand_call_inline): Copy the locus of the call onto the assignment
17283         of the return value, if any.  Use local variable in more cases.
17285 2018-06-21  Martin Liska  <mliska@suse.cz>
17287         * ipa-pure-const.c (propagate_nothrow): Use
17288         funct_state_summaries->get.
17289         (dump_malloc_lattice): Likewise.
17290         (propagate_malloc): Likewise.
17292 2018-06-21  Richard Biener  <rguenther@suse.de>
17294         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
17295         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
17296         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
17297         comment.
17298         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
17299         BLOCK_ABSTRACT_ORIGIN unconditionally.
17301 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
17303         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
17304         deleting it.
17305         * ipa-reference.c (ipa_reference_c_finalize): Delete
17306         ipa_ref_opt_sum_summaries and set it to NULL.
17308 2018-06-21  Tom de Vries  <tdevries@suse.de>
17310         PR tree-optimization/85859
17311         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
17312         test with comment from bb_no_side_effects_p.
17314 2018-06-21  Richard Biener  <rguenther@suse.de>
17316         PR tree-optimization/86232
17317         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
17318         max for constant niter.
17320 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
17322         * config/aarch64/aarch64-simd.md
17323         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
17325 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
17327         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
17328         Make opernads of the unspec commutative.
17330 2018-06-21  Richard Biener  <rguenther@suse.de>
17332         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
17333         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
17334         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
17335         (vect_analyze_data_ref_dependence): Re-order checks to deal with
17336         NULL DR_STEP.
17337         (vect_record_base_alignments): Do not record base alignment
17338         for gathers or scatters.
17339         (vect_compute_data_ref_alignment): Drop return value that is always
17340         true.  Bail out early for gathers or scatters.
17341         (vect_enhance_data_refs_alignment): Bail out early for gathers
17342         or scatters.
17343         (vect_find_same_alignment_drs): Likewise.
17344         (vect_analyze_data_refs_alignment): Remove dead code.
17345         (vect_slp_analyze_and_verify_node_alignment): Likewise.
17346         (vect_analyze_data_refs): For possible gathers or scatters do
17347         not create an alternate DR, just check their possible validity
17348         and mark them.  Adjust DECL_NONALIASED handling to not rely
17349         on DR_BASE_ADDRESS.
17350         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
17351         update inits of gathers or scatters.
17352         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
17353         Also copy gather/scatter flag to pattern vinfo.
17355 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17357         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
17358         behavior of vec_packsu (vector unsigned long long, vector unsigned
17359         long long) to match behavior of vec_packs with same signature.
17361 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
17362             Thomas Schwinge <thomas@codesourcery.com>
17363             Cesar Philippidis  <cesar@codesourcery.com>
17365         * gimplify.c (gimplify_scan_omp_clauses): Add support for
17366         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
17367         (gimplify_adjust_omp_clauses): Likewise.
17368         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
17369         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
17370         (gimplify_omp_target_update): Update handling of acc update and
17371         enter/exit data.
17372         * omp-low.c (install_var_field): Remove unused parameter
17373         base_pointers_restrict.
17374         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
17375         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
17376         FINALIZE}
17377         (omp_target_base_pointers_restrict_p): Delete.
17378         (scan_omp_target): Update call to scan_sharing_clauses.
17379         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
17380         FINALIZE}.
17381         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
17382         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
17383         (convert_local_omp_clauses): Likewise.
17384         * tree-pretty-print.c (dump_omp_clause): Likewise.
17385         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
17386         FINALIZE}.
17387         (omp_clause_code_name): Likewise.
17389 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
17391         PR debug/86194
17392         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
17393         be narrowed.
17395         PR tree-optimization/86231
17396         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
17397         anti-range don't overwrite *vr0min before using it to compute *vr0max.
17399 2018-06-20  Tom de Vries  <tdevries@suse.de>
17401         PR tree-optimization/86097
17402         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
17403         iv type if signedness of iv type is not the same as that of *nit.
17405 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
17407         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
17408         EDGE_EH edges, verify they are all EDGE_EH.
17410 2018-06-20  Maya Rashish  <coypu@sdf.org>
17412         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
17414 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17416         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
17417         * config/aarch64/aarch64.c (xgene1_tunings): Add
17418         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
17419         (aarch64_mode_valid_for_sched_fusion_p):
17420         Allow 16-byte modes.
17421         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
17422         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
17423         128-bit modes.
17424         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
17425         New pattern.
17426         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
17427         * config/aarch64/iterators.md (VQ2): New mode iterator.
17429 2018-06-20  Martin Liska  <mliska@suse.cz>
17431         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
17432         Change default ratio from 10 to 8.
17434 2018-06-20  Martin Liska  <mliska@suse.cz>
17436         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
17437         New.
17438         (bit_test_cluster::find_bit_tests): Likewise.
17439         (switch_decision_tree::analyze_switch_statement): Find clusters.
17440         * tree-switch-conversion.h (struct jump_table_cluster): Document
17441         hierarchy.
17443 2018-06-20  Martin Liska  <mliska@suse.cz>
17445         * tree-switch-conversion.c (switch_conversion::collect):
17446         Record m_uniq property.
17447         (switch_conversion::expand): Bail out for special conditions.
17448         (group_cluster::~group_cluster): New.
17449         (group_cluster::group_cluster): Likewise.
17450         (group_cluster::dump): Likewise.
17451         (jump_table_cluster::emit): New.
17452         (switch_decision_tree::fix_phi_operands_for_edges): New.
17453         (struct case_node): Remove struct.
17454         (jump_table_cluster::can_be_handled): New.
17455         (case_values_threshold): Moved to header.
17456         (reset_out_edges_aux): Likewise.
17457         (jump_table_cluster::is_beneficial): New.
17458         (bit_test_cluster::can_be_handled): Likewise.
17459         (add_case_node): Remove.
17460         (bit_test_cluster::is_beneficial): New.
17461         (case_bit_test::cmp): New.
17462         (bit_test_cluster::emit): New.
17463         (expand_switch_as_decision_tree_p): Remove.
17464         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
17465         (fix_phi_operands_for_edge): Likewise.
17466         (switch_decision_tree::analyze_switch_statement): New.
17467         (compute_cases_per_edge): Move ...
17468         (switch_decision_tree::compute_cases_per_edge): ... here.
17469         (try_switch_expansion): Likewise.
17470         (switch_decision_tree::try_switch_expansion): Likewise.
17471         (record_phi_operand_mapping): Likewise.
17472         (switch_decision_tree::record_phi_operand_mapping): Likewise.
17473         (emit_case_decision_tree): Likewise.
17474         (switch_decision_tree::emit): Likewise.
17475         (balance_case_nodes): Likewise.
17476         (switch_decision_tree::balance_case_nodes): Likewise.
17477         (dump_case_nodes): Likewise.
17478         (switch_decision_tree::dump_case_nodes): Likewise.
17479         (emit_jump): Likewise.
17480         (switch_decision_tree::emit_jump): Likewise.
17481         (emit_cmp_and_jump_insns): Likewise.
17482         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
17483         (emit_case_nodes): Likewise.
17484         (switch_decision_tree::emit_case_nodes): Likewise.
17485         (conditional_probability): Remove.
17486         * tree-switch-conversion.h (enum cluster_type): New.
17487         (PRINT_CASE): New.
17488         (struct cluster): Likewise.
17489         (cluster::cluster): Likewise.
17490         (struct simple_cluster): Likewise.
17491         (simple_cluster::simple_cluster): Likewise.
17492         (struct group_cluster): Likewise.
17493         (struct jump_table_cluster): Likewise.
17494         (struct bit_test_cluster): Likewise.
17495         (struct min_cluster_item): Likewise.
17496         (struct case_tree_node): Likewise.
17497         (case_tree_node::case_tree_node): Likewise.
17498         (jump_table_cluster::case_values_threshold): Likewise.
17499         (struct case_bit_test): Likewise.
17500         (struct switch_decision_tree): Likewise.
17501         (struct switch_conversion): Likewise.
17502         (switch_decision_tree::reset_out_edges_aux): Likewise.
17504 2018-06-20  Martin Liska  <mliska@suse.cz>
17506         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
17507         (hoist_edge_and_branch_if_true): Likewise.
17508         (expand_switch_using_bit_tests_p): Likewise.
17509         (struct case_bit_test): Likewise.
17510         (case_bit_test_cmp): Likewise.
17511         (emit_case_bit_tests): Likewise.
17512         (switch_conversion::switch_conversion): New class.
17513         (struct switch_conv_info): Remove old struct.
17514         (collect_switch_conv_info): More to ...
17515         (switch_conversion::collect): ... this.
17516         (check_range): Likewise.
17517         (switch_conversion::check_range): Likewise.
17518         (check_all_empty_except_final): Likewise.
17519         (switch_conversion::check_all_empty_except_final): Likewise.
17520         (check_final_bb): Likewise.
17521         (switch_conversion::check_final_bb): Likewise.
17522         (create_temp_arrays): Likewise.
17523         (switch_conversion::create_temp_arrays): Likewise.
17524         (free_temp_arrays): Likewise.
17525         (gather_default_values): Likewise.
17526         (switch_conversion::gather_default_values): Likewise.
17527         (build_constructors): Likewise.
17528         (switch_conversion::build_constructors): Likewise.
17529         (constructor_contains_same_values_p): Likewise.
17530         (switch_conversion::contains_same_values_p): Likewise.
17531         (array_value_type): Likewise.
17532         (switch_conversion::array_value_type): Likewise.
17533         (build_one_array): Likewise.
17534         (switch_conversion::build_one_array): Likewise.
17535         (build_arrays): Likewise.
17536         (switch_conversion::build_arrays): Likewise.
17537         (gen_def_assigns): Likewise.
17538         (switch_conversion::gen_def_assigns): Likewise.
17539         (prune_bbs): Likewise.
17540         (switch_conversion::prune_bbs): Likewise.
17541         (fix_phi_nodes): Likewise.
17542         (switch_conversion::fix_phi_nodes): Likewise.
17543         (gen_inbound_check): Likewise.
17544         (switch_conversion::gen_inbound_check): Likewise.
17545         (process_switch): Use the newly created class.
17546         (switch_conversion::expand): New.
17547         (switch_conversion::~switch_conversion): New.
17548         * tree-switch-conversion.h: New file.
17550 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
17552         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
17553         tree-vect-patterns.c.
17554         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
17555         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
17556         (vect_recog_sad_pattern): Likewise.
17557         (vect_recog_widen_sum_pattern): Likewise.
17558         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
17559         (vect_recog_widen_shift_pattern): Remove the type_in argument.
17560         (vect_recog_rotate_pattern): Likewise.
17561         (vect_recog_mult_pattern): Likewise.
17562         (vect_recog_vector_vector_shift_pattern): Likewise.
17563         (vect_recog_divmod_pattern): Likewise.
17564         (vect_recog_mixed_size_cond_pattern): Likewise.
17565         (vect_recog_bool_pattern): Likewise.
17566         (vect_recog_mask_conversion_pattern): Likewise.
17567         (vect_try_gather_scatter_pattern): Likewise.
17568         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
17569         (vect_recog_over_widening_pattern): Likewise.
17570         (vect_recog_gather_scatter_pattern): Likewise.
17571         (vect_recog_func_ptr): Move from tree-vectorizer.h
17572         (vect_vect_recog_func_ptrs): Move further down the file.
17573         (vect_recog_func): Likewise.  Remove the third argument.
17574         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
17575         (vect_pattern_recog_1): Expect the pattern function to do any
17576         necessary target tests.  Also expect it to provide a vector type.
17577         Remove the type_in handling.
17579 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
17581         * tree-vect-patterns.c (vect_pattern_detected): New function.
17582         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
17583         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
17584         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
17585         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
17586         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
17587         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
17588         (vect_recog_mask_conversion_pattern)
17589         (vect_try_gather_scatter_pattern): Likewise.
17591 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
17593         * tree-vect-patterns.c (vect_get_internal_def): New function.
17594         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
17595         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
17596         (search_type_for_mask_1): Use it.
17598 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
17600         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
17601         redundant WIDEN_SUM_EXPR handling.
17602         (vect_recog_sad_pattern): Likewise.
17604 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
17606         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
17607         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
17608         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
17609         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
17610         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
17612 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
17614         * tree-vect-stmts.c (vectorizable_call): Make sure that we
17615         use the stmt_vec_info of the original bb statement for the
17616         new zero assignment, even if the call is part of a pattern.
17618 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
17620         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
17621         that the sequence is attached to the original statement rather
17622         than the pattern statement.
17623         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
17624         PATTERN_DEF_SEQ from the original statement rather than
17625         the main pattern statement.
17626         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
17627         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
17628         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
17630 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
17632         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
17633         definition statements before the early exit for statements that aren't
17634         live or relevant.
17635         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
17636         split out from...
17637         (vect_transform_loop): ...here.  Process pattern definition
17638         statements without first checking whether the main pattern
17639         statement is live or relevant.
17641 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
17643         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
17644         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
17646 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
17648         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
17649         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
17650         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
17651         (expand_block_compare): Change select_block_compare_mode call.
17652         (expand_strncmp_align_check): Use new functions, fix comment.
17653         (emit_final_str_compare_gpr): New function.
17654         (expand_strn_compare): Refactor and clean up code.
17655         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
17657 2018-06-19  Tony Reix  <tony.reix@atos.com>
17658             Damien Bergamini  <damien.bergamini@atos.com>
17659             David Edelsohn  <dje.gcc@gmail.com>
17661         * collect2.c (static_obj): New variable.
17662         (static_libs): New variable.
17663         (is_in_list): Uncomment declaration.
17664         (main): Track AIX libraries linked statically.
17665         (is_in_list): Uncomment definition.
17666         (scan_prog_file): Don't add AIX shared libraries initializer
17667         to constructor list if linking statically.
17669 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
17671         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
17672         constant.
17673         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
17675 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
17677         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
17678         blocks.
17680 2018-06-19  Martin Liska  <mliska@suse.cz>
17682         * config/i386/i386.c (ix86_can_inline_p): Do not use
17683         ipa_fn_summaries::get_create.
17684         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
17685         get.
17686         (devirtualization_time_bonus): Likewise.
17687         (ipcp_propagate_stage): Likewise.
17688         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
17689         (edge_set_predicate): Likewise.
17690         (evaluate_conditions_for_known_args): Likewise.
17691         (evaluate_properties_for_edge): Likewise.
17692         (ipa_call_summary::reset): Tranform to ...
17693         (ipa_call_summary::~ipa_call_summary): ... this.
17694         (ipa_fn_summary::reset): Transform to ...
17695         (ipa_fn_summary::~ipa_fn_summary): ... this.
17696         (ipa_fn_summary_t::remove): Rename to ...
17697         (ipa_fn_summary_t::remove_callees): ... this.
17698         (ipa_fn_summary_t::duplicate): Use placement new
17699         instead of memory copy.
17700         (ipa_call_summary_t::duplicate): Likewise.
17701         (ipa_call_summary_t::remove): Remove.
17702         (dump_ipa_call_summary): Change get_create to get.
17703         (ipa_dump_fn_summary): Dump only when summary exists.
17704         (analyze_function_body): Use symbol_summary::get instead
17705         of get_create.
17706         (compute_fn_summary): Likewise.
17707         (estimate_edge_devirt_benefit): Likewise.
17708         (estimate_edge_size_and_time): Likewise.
17709         (inline_update_callee_summaries): Likewise.
17710         (remap_edge_change_prob): Likewise.
17711         (remap_edge_summaries): Likewise.
17712         (ipa_merge_fn_summary_after_inlining): Likewise.
17713         (write_ipa_call_summary): Likewise.
17714         (ipa_fn_summary_write): Likewise.
17715         (ipa_free_fn_summary): Likewise.
17716         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
17717         (struct ipa_call_summary): Likewise.
17718         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
17719         of get_create.
17720         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
17721         (estimate_size_after_inlining): Likewise.
17722         (estimate_growth): Likewise.
17723         (growth_likely_positive): Likewise.
17724         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
17725         (inline_call): Likewise.
17726         * ipa-inline.c (caller_growth_limits): Likewise.
17727         (can_inline_edge_p): Likewise.
17728         (can_inline_edge_by_limits_p): Likewise.
17729         (compute_uninlined_call_time): Likewise.
17730         (compute_inlined_call_time): Likewise.
17731         (want_inline_small_function_p): Likewise.
17732         (edge_badness): Likewise.
17733         (update_caller_keys): Likewise.
17734         (update_callee_keys): Likewise.
17735         (inline_small_functions): Likewise.
17736         (inline_to_all_callers_1): Likewise.
17737         (dump_overall_stats): Likewise.
17738         (early_inline_small_functions): Likewise.
17739         (early_inliner): Likewise.
17740         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
17741         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
17742         * ipa-pure-const.c (malloc_candidate_p): Likewise.
17743         * ipa-split.c (execute_split_functions): Likewise.
17744         * symbol-summary.h: Likewise.
17745         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
17747 2018-06-19  Richard Biener  <rguenther@suse.de>
17749         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
17750         (vectorize_loops): ... here.  Fix dbgcnt handling.
17751         (try_vectorize_loop): Wrap try_vectorize_loop_1.
17753 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
17755         PR target/86197
17756         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
17757         ieee128 argument takes up only one (vector) register, not two (floating
17758         point) registers.
17760 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
17762         * gimplify.c (gimplify_init_constructor): Really never clear for an
17763         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
17765 2018-06-19  Richard Biener  <rguenther@suse.de>
17767         PR tree-optimization/86179
17768         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
17769         after failed recognition.
17771 2018-06-18  Martin Sebor  <msebor@redhat.com>
17773         PR middle-end/85602
17774         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
17775         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
17776         Handle integer subtraction.
17777         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
17778         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
17780 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
17782         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
17783         param from rtx to rtx_insn *.
17784         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
17785         param.
17786         (frv_ifcvt_modify_insn): Likwise.
17787         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
17788         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
17789         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
17790         as_a <rtx_insn *> cast to local "unprotected_region" once
17791         it's been established that it's not NULL or pc_rtx.
17792         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
17793         param "sethi" from rtx to rtx_insn *.
17794         (nds32_group_float_insns): Likewise for param "insn".
17795         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
17796         param.
17797         (vax_output_int_subtract): Likewise.
17798         * config/vax/vax.c (vax_output_int_add): Likewise for param
17799         "insn".
17800         (vax_output_int_subtract): Likewise.
17801         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
17802         (emit_pattern_after): Likewise for param "after".
17803         (emit_insn_after): Likewise.
17804         (emit_jump_insn_after): Likewise.
17805         (emit_call_insn_after): Likewise.
17806         (emit_debug_insn_after): Likewise.
17807         (emit_pattern_before): Likewise for param "before".
17808         (emit_insn_before): Likewise.
17809         (emit_jump_insn_before): Likewise.
17810         * final.c (get_insn_template): Likewise for param "insn", removing
17811         a cast.
17812         * output.h (get_insn_template): Likewise for 2nd param.
17813         * rtl.h (emit_insn_before): Likewise.
17814         (emit_jump_insn_before): Likewise.
17815         (emit_debug_insn_before_noloc): Likewise.
17816         (emit_insn_after): Likewise.
17817         (emit_jump_insn_after): Likewise.
17818         (emit_call_insn_after): Likewise.
17819         (emit_debug_insn_after): Likewise.
17820         (set_insn_deleted): Likewise for param.
17822 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
17824         PR target/85358
17825         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
17826         floating point modes, so that IFmode is numerically greater than
17827         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
17828         to declare the ordering.  This prevents IFmode from being
17829         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
17830         machine.  Include rs6000-modes.h to share the fractional values
17831         between genmodes* and the rest of the compiler.
17832         (IFmode): Likewise.
17833         (KFmode): Likewise.
17834         (TFmode): Likewise.
17835         * config/rs6000/rs6000-modes.h: New file.
17836         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
17837         meaning of rs6000_long_double_size so that 126..128 selects an
17838         appropriate 128-bit floating point type.
17839         (rs6000_option_override_internal): Likewise.
17840         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
17841         (TARGET_LONG_DOUBLE_128): Change the meaning of
17842         rs6000_long_double_size so that 126..128 selects an appropriate
17843         128-bit floating point type.
17844         (LONG_DOUBLE_TYPE_SIZE): Update comment.
17845         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
17846         source and destination to match the standard usage.
17847         (truncifkf2): Likewise.
17848         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
17849         ISA 2.07 to use an explicit clobber, instead of passing in a
17850         temporary.
17851         (copysign<mode>3_soft): Likewise.
17853 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
17855         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
17856         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
17857         (vect_slp_analyze_instance_dependence): Likewise.
17858         (vect_enhance_data_refs_alignment): Likewise.
17859         (vect_analyze_data_refs_alignment): Likewise.
17860         (vect_slp_analyze_and_verify_instance_alignment
17861         (vect_analyze_data_ref_accesses): Likewise.
17862         (vect_prune_runtime_alias_test_list): Likewise.
17863         (vect_analyze_data_refs): Likewise.
17864         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
17865         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
17866         (vect_analyze_scalar_cycles_1): Likewise.
17867         (vect_get_loop_niters): Likewise.
17868         (vect_analyze_loop_form_1): Likewise.
17869         (vect_update_vf_for_slp): Likewise.
17870         (vect_analyze_loop_operations): Likewise.
17871         (vect_analyze_loop): Likewise.
17872         (vectorizable_induction): Likewise.
17873         (vect_transform_loop): Likewise.
17874         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
17875         * tree-vect-slp.c (vect_analyze_slp): Likewise.
17876         (vect_make_slp_decision): Likewise.
17877         (vect_detect_hybrid_slp): Likewise.
17878         (vect_slp_analyze_operations): Likewise.
17879         (vect_slp_bb): Likewise.
17880         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
17881         (vectorizable_bswap): Likewise.
17882         (vectorizable_call): Likewise.
17883         (vectorizable_simd_clone_call): Likewise.
17884         (vectorizable_conversion): Likewise.
17885         (vectorizable_assignment): Likewise.
17886         (vectorizable_shift): Likewise.
17887         (vectorizable_operation): Likewise.
17888         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
17890 2018-06-18  Martin Sebor  <msebor@redhat.com>
17892         PR tree-optimization/81384
17893         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
17894         * builtins.c (expand_builtin_strnlen): New function.
17895         (expand_builtin): Call it.
17896         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
17897         * builtins.def (BUILT_IN_STRNLEN): New.
17898         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
17899         Warn for bounds in excess of maximum object size.
17900         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
17901         single-value ranges.  Handle strnlen.
17902         (handle_builtin_strlen): Handle strnlen.
17903         (strlen_check_and_optimize_stmt): Same.
17904         * doc/extend.texi (Other Builtins): Document strnlen.
17906 2018-06-18  Maya Rashish  <coypu@sdf.org>
17908         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
17909         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
17910         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
17912         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
17913         here to ...
17914         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
17916 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
17918         * tree.c (escaped_string::escape): Replace cast to char * by
17919         const_cast<char *> (unescaped).
17921 2018-06-18  Nick Clifton  <nickc@redhat.com>
17923         PR 84195
17924         * tree.c (escaped_string): New class.  Converts an unescaped
17925         string into its escaped equivalent.
17926         (warn_deprecated_use): Use the new class to convert the
17927         deprecation message, if present.
17928         (test_escaped_strings): New self test.
17929         (test_c_tests): Add test_escaped_strings.
17930         * doc/extend.texi (deprecated): Add a note that the
17931         deprecation message is affected by the -fmessage-length
17932         option, and that control characters will be escaped.
17933         (#pragma GCC error): Document this pragma.
17934         (#pragma GCC warning): Likewise.
17935         * doc/invoke.texi (-fmessage-length): Document this option's
17936         effect on the #warning and #error preprocessor directives and
17937         the deprecated attribute.
17939 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
17941         * tree.c (decl_value_expr_lookup): Revert latest change.
17942         (decl_value_expr_insert): Likewise.
17944 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
17946         * gimplify.c (nonlocal_vlas): Delete.
17947         (nonlocal_vla_vars): Likewise.
17948         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
17949         referenced VLAs.
17950         (gimplify_body): Do not create and destroy nonlocal_vlas.
17951         * tree-nested.c: Include diagnostic.h.
17952         (use_pointer_in_frame): Tweak.
17953         (lookup_field_for_decl): Add assertion and declare the transformation.
17954         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
17955         internal error when the reference is in a wrong context.  Do not
17956         create a debug decl by default.
17957         (note_nonlocal_block_vlas): Delete.
17958         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
17959         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
17960         create a debug decl by default.
17961         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
17962         call is in a wrong context.
17963         (fixup_vla_decls): New function.
17964         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
17965         debug variables were created.
17966         * tree.c (decl_value_expr_lookup): Add checking assertion.
17967         (decl_value_expr_insert): Likewise.
17969 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
17971         PR middle-end/82479
17972         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
17973         * tree-scalar-evolution.c (interpret_expr): Likewise.
17974         (expression_expensive_p): Likewise.
17975         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
17976         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
17977         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
17978         (ssa_defined_by_minus_one_stmt_p): New.
17980 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
17982         PR middle-end/64946
17983         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
17984         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
17985         * dojump.c (do_jump): Likewise.
17986         * expr.c (expand_expr_real_2): Check operand type's sign.
17987         * fold-const.c (const_unop): Handle ABSU_EXPR.
17988         (fold_abs_const): Likewise.
17989         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
17990         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
17991         (strip_sign_op_1): Likesise.
17992         * match.pd: Add new pattern to generate ABSU_EXPR.
17993         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
17994         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
17995         * tree-eh.c (operation_could_trap_helper_p): Likewise.
17996         * tree-inline.c (estimate_operator_cost): Likewise.
17997         * tree-pretty-print.c (dump_generic_node): Likewise.
17998         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
17999         * tree.def (ABSU_EXPR): New.
18001 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
18003         PR middle-end/86095
18004         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
18005         documented as preserved for backward compatibility only.
18006         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
18008         PR rtl-optimization/86108
18009         * bb-reorder.c (create_forwarder_block): Renamed to ...
18010         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
18011         jump from new landing pad to the second part.
18012         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
18013         Adjust callers.
18015 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
18017         PR middle-end/85878
18018         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
18019         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
18020         Only call store_expr for halves if the mode is the same.
18022         PR middle-end/86123
18023         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
18024         Fix up comment formatting.
18026 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
18028         * typed-splay-tree.h (typed_splay_tree::remove): New function.
18029         (typed_splay_tree::closure,
18030         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
18031         (typed_splay_tree::typed_splay_tree,
18032         typed_splay_tree::operator =): Declared private.
18033         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
18034         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
18035         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
18036         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
18037         typed_splay_tree::splay_tree_splay,
18038         typed_splay_tree::splay_tree_foreach_helper,
18039         typed_splay_tree::splay_tree_insert,
18040         typed_splay_tree::splay_tree_remove,
18041         typed_splay_tree::splay_tree_lookup,
18042         typed_splay_tree::splay_tree_predecessor,
18043         typed_splay_tree::splay_tree_successor,
18044         typed_splay_tree::splay_tree_min,
18045         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
18046         (typed_splay_tree::root, typed_splay_tree::comp,
18047         typed_splay_tree::delete_key,
18048         typed_splay_tree::delete_value): New data members.
18049         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
18050         typed_splay_tree::remove.
18052 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
18054         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
18055         -mginv and -mno-ginv to the assembler.
18056         * config/mips/mips.opt (-mcrc): New option.
18057         (-mginv): Likewise.
18058         * doc/invoke.text (-mcrc): Document.
18059         (-mginv): Likewise.
18061 2018-06-15  Nick Clifton  <nickc@redhat.com>
18063         PR 84195
18064         * tree.c (escaped_string): New class.  Converts an unescaped
18065         string into its escaped equivalent.
18066         (warn_deprecated_use): Use the new class to convert the
18067         deprecation message, if present.
18068         (test_escaped_strings): New self test.
18069         (test_c_tests): Add test_escaped_strings.
18070         * doc/extend.texi (deprecated): Add a note that the
18071         deprecation message is affected by the -fmessage-length
18072         option, and that control characters will be escaped.
18073         (#pragma GCC error): Document this pragma.
18074         (#pragma GCC warning): Likewise.
18075         * doc/invoke.texi (-fmessage-length): Document this option's
18076         effect on the #warning and #error preprocessor directives and
18077         the deprecated attribute.
18079 2018-06-15  Richard Biener  <rguenther@suse.de>
18081         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
18082         here, also noting vector size used.
18083         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
18084         size used in MSG_OPTIMIZED_LOCATIONS dump.
18085         (pass_slp_vectorize::execute): Adjust.
18087 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
18089         PR target/85968
18090         * config/arc/arc.c (arc_return_address_register): Fix
18091         if-condition.
18093 2018-06-15  Richard Biener  <rguenther@suse.de>
18095         PR middle-end/86159
18096         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
18097         leave useless conversion stripping to force_gimple_operand_gsi.
18098         (gimplify_build2): Likewise.
18099         (gimplify_build1): Likewise.
18101 2018-06-15  Richard Biener  <rguenther@suse.de>
18103         PR middle-end/86076
18104         * tree-cfg.c (move_stmt_op): unshare invariant addresses
18105         before adjusting their block.
18107 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
18109         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
18110         multilibs for *-*-rtems*.
18111         * config/riscv/t-rtems: New file.
18113 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
18115         PR middle-end/86122
18116         * match.pd ((A +- CST1) +- CST2): Punt if last resort
18117         unsigned_type_for returns NULL.
18119         PR target/85945
18120         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
18121         subregs of multi-word pseudos unless the float mode has word size.
18123 2018-06-14  Richard Biener  <rguenther@suse.de>
18125         PR middle-end/86139
18126         * tree-vect-generic.c (build_word_mode_vector_type): Remove
18127         duplicate and harmful type_hash_canon.
18128         * tree.c (type_hash_canon): Assert we didn't find ourselves.
18130 2018-06-14  Richard Biener  <rguenther@suse.de>
18132         PR ipa/86124
18133         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
18134         NULL cgraph_node.
18136 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
18138         * config/rtems.h (STDINT_LONG32): Define.
18140 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
18141             Prachi Godbole  <prachi.godbole@imgtec.com>
18143         * config/mips/mips-cpus.def: Define P6600.
18144         * config/mips/mips-tables.opt: Regenerate.
18145         * config/mips/mips.c (mips_ucbranch_type): New enum.
18146         (mips_rtx_cost_data): Add support for P6600.
18147         (mips_issue_rate): Likewise.
18148         (mips_multipass_dfa_lookahead): Likewise.
18149         (mips_avoid_hazard): Likewise.
18150         (mips_reorg_process_insns): Likewise.
18151         (mips_classify_branch_p6600): New function.
18152         * config/mips/mips.h (TUNE_P6600): New define.
18153         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
18154         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
18155         * config/mips/mips.md: Include p6600.md.
18156         (processor): Add p6600.
18157         * config/mips/p6600.md: New file.
18158         * doc/invoke.texi: Add p6600 to supported architectures.
18160 2018-06-13  Martin Sebor  <msebor@redhat.com>
18162         PR tree-optimization/86114
18163         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
18164         of integer types.
18165         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
18167 2018-06-13  Richard Biener  <rguenther@suse.de>
18169         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
18170         Properly set vector type of the intermediate stmt.
18171         * tree-vect-stmts.c (vectorizable_operation): The destination
18172         var always has vectype_out type.
18174 2018-06-13  Jeff Law  <law@redhat.com>
18176         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
18177         integer 0 for argument to print_rtl_with_bb.
18178         (rl78_reorg): Likewise.
18180 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
18182         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
18183         from rtx to rtx_insn *.
18184         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
18185         "label".
18186         (add_sched_insns_for_speculation): Likewise for local "target",
18187         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
18188         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
18189         from rtx_insn ** to rtx_code_label **.
18190         (reorg_emit_nops): Likewise.
18191         (c6x_reorg): Likewise for local "call_labels".
18192         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
18193         rtx to rtx_insn *.
18194         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
18195         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
18196         the loops over LABEL_REFS.
18197         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
18198         braf_label.
18199         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
18200         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
18201         (split_branches): Strengthen local "olabel" from rtx to
18202         rtx_insn *, adding a safe_as_a cast.
18203         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
18204         to "rtx_insn *".
18205         (add_insn_after): Likewise for first two params.
18206         (add_insn_before): Likewise.
18207         (remove_insn): Likewise for param.
18208         (emit_pattern_before_noloc): Likewise for second and third params.
18209         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
18210         (emit_call_insn_before_noloc): Likewise.
18211         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
18212         to "rtx_insn *".
18213         (emit_barrier_before): Likewise.
18214         (emit_label_before): Strengthen "label" param from "rtx" to
18215         "rtx_code_label *".  Strengthen "before" param from "rtx" to
18216         "rtx_insn *".
18217         (emit_insn_after_1): Strengthen "after" param from "rtx" to
18218         "rtx_insn *".
18219         (emit_pattern_after_noloc): Likewise.
18220         (emit_insn_after_noloc): Likewise.
18221         (emit_jump_insn_after_noloc): Likewise.
18222         (emit_call_insn_after_noloc): Likewise.
18223         (emit_debug_insn_after_noloc): Likewise.
18224         (emit_barrier_after): Likewise.
18225         (emit_label_after): Likewise for both params.
18226         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
18227         "loc" param from "int" to "location_t".
18228         (emit_insn_after_setloc): Likewise.
18229         (emit_jump_insn_after_setloc): Likewise.
18230         (emit_call_insn_after_setloc): Likewise.
18231         (emit_debug_insn_after_setloc): Likewise.
18232         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
18233         "loc" param from "int" to "location_t".
18234         (emit_pattern_before): Convert NULL_RTX to NULL.
18235         (emit_insn_before_setloc): Convert "loc" param from "int" to
18236         "location_t".
18237         (emit_jump_insn_before_setloc): Likewise.
18238         (emit_call_insn_before_setloc): Likewise.
18239         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
18240         rtx_insn *.  Convert "loc" param from "int" to "location_t".
18241         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
18242         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
18243         Convert 3rd param from "int" to "location_t".
18244         (emit_barrier_before, emit_barrier_after, next_real_insn):
18245         Strengthen param from rtx to rtx_insn *.
18246         (emit_label_before): Strengthen 1st param from "rtx" to
18247         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
18248         "rtx_insn *".
18249         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
18250         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
18251         Strengthen 2nd param from "rtx" to "rtx_insn *".
18252         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
18253         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
18254         Likewise. Convert 3rd param from "int" to "location_t".
18255         (emit_label_after): Strengthen 1st param from "rtx" to
18256         "rtx_code_label *".
18257         (next_real_insn, remove_insn): Strengthen param from "rtx" to
18258         "rtx_insn *".
18259         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
18260         from "rtx" to "rtx_insn *".
18262 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
18264         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
18265         bodies streamed in with -Q.
18266         * dumpfile.c (dump_files): Add lto-stream-out dump file.
18267         * dumpfile.h (tree_dump_index): Add lto_stream_out.
18268         * gimple-streamer-out.c: Include gimple-pretty-print.h
18269         (output_bb): Dump stmts streamed.
18270         * lto-section-out.c: Include print-tree.h
18271         (lto_begin_section): Dump sections created.
18272         (lto_output_decl_index): Dump decl encoded.
18273         * lto-streamer-out.c: Include print-tree.h
18274         (create_output_block): Dump output block created.
18275         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
18276         (output_function): Dump function output.
18277         (output_constructor): Dump constructor streamed.
18278         (write_global_stream): Output indexes encoded.
18279         (produce_asm_for_decls): Dump streams encoded.
18280         * lto-streamer.c (streamer_dump_file): New global var.
18281         * lto-streamer.h (streamer_dump_file): Declare.
18282         * passes.c (ipa_write_summaries): Initialize streamer dump.
18283         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
18284         in.
18286 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
18288         PR target/86048
18289         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
18290         offsets for register save directives.  Emit a second batch of save
18291         directives, if need be, when the function accesses prior frames.
18293 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
18295         * config/arc/fpu.md (fmasf4): Force operand to register.
18296         (fnmasf4): Likewise.
18298 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
18300         * config/arc/arc-protos.h (arc_pad_return): Remove.
18301         * config/arc/arc.c (machine_function): Remove force_short_suffix
18302         and size_reason.
18303         (arc_print_operand): Adjust printing of '&'.
18304         (arc_verify_short): Remove conditional printing of short suffix.
18305         (arc_final_prescan_insn): Remove reference to size_reason.
18306         (pad_return): New function.
18307         (arc_reorg): Call pad_return.
18308         (arc_pad_return): Remove.
18309         (arc_init_machine_status): Remove reference to force_short_suffix.
18310         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
18311         (attr length): When attribute iscompact is true force to 2
18312         regardless; in the case of maybe check if we want to force the
18313         instruction to have 4 bytes length.
18314         (nopv): Change it to generate 4 byte long nop as well.
18315         (blockage): New pattern.
18316         (simple_return): Remove call to arc_pad_return.
18317         (p_return_i): Likewise.
18319 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
18321         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
18323 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
18325         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
18326         ARC cores.
18328 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
18330         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
18331         for ARC700 and ARCv2.
18333 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
18335         PR target/86076
18336         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
18337         operands[2] instead of operands[1].
18340 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
18342         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
18343         case, check whether the outer register overlaps an unallocatable
18344         register, not just whether it fits the required class.
18346 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
18348         * poly-int.h (can_div_trunc_p): Add new overload in which all values
18349         are poly_ints.
18350         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
18351         (memrefs_conflict_p): Likewise.
18352         (init_alias_analysis): Likewise.
18353         * cfgexpand.c (expand_debug_expr): Likewise.
18354         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
18355         * cse.c (fold_rtx): Likewise.
18356         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
18357         * expr.c (emit_block_move_hints): Likewise.
18358         (clear_storage_hints, push_block, emit_push_insn): Likewise.
18359         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
18360         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
18361         (emit_group_store): Likewise.
18362         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
18363         to read the PRE/POST_MODIFY increment.
18364         * calls.c (store_one_arg): Use strip_offset.
18365         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
18366         poly_int_rtx_p.
18367         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
18368         by a VEC_SELECT.
18369         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
18370         (simplify_binary_operation_1): Extend CONST_INT handling to
18371         poly_int_rtx_p.
18372         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
18373         than a HOST_WIDE_INT.
18374         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
18375         poly_int64.
18376         (adjust_mems, add_stores): Update accodingly.
18377         (vt_canonicalize_addr): Track polynomial offsets.
18378         (emit_note_insn_var_location): Likewise.
18379         (vt_add_function_parameter): Likewise.
18380         (vt_initialize): Likewise.
18382 2018-06-12  Jeff Law  <law@redhat.com>
18384         * config.gcc (alpha*-*-freebsd*): Remove.
18385         * config/alpha/freebsd.h: Remove.
18387 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
18389         PR other/69968
18390         * spellcheck-tree.c (levenshtein_distance): Rename to...
18391         (get_edit_distance): ...this, and update for underlying renaming.
18392         * spellcheck-tree.h (levenshtein_distance): Rename to...
18393         (get_edit_distance): ...this.
18394         * spellcheck.c (levenshtein_distance): Rename to...
18395         (get_edit_distance): ...this.  Convert from Levenshtein distance
18396         to Damerau-Levenshtein distance by supporting transpositions of
18397         adjacent characters.  Rename "v1" to "v_next" and "v0" to
18398         "v_one_ago".
18399         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
18400         (selftest::test_edit_distance_unit_test_oneway): ...this, and
18401         update for underlying renaming.
18402         (selftest::levenshtein_distance_unit_test): Rename to...
18403         (selftest::test_get_edit_distance_unit): ...this, and update for
18404         underlying renaming.
18405         (selftest::test_find_closest_string): Add example from PR 69968
18406         where transposition helps
18407         (selftest::test_metric_conditions): Update for renaming.
18408         (selftest::test_metric_conditions): Likewise.
18409         (selftest::spellcheck_c_tests): Likewise.
18410         * spellcheck.h (levenshtein_distance): Rename both overloads to...
18411         (get_edit_distance): ...this.
18412         (best_match::consider): Update for renaming.
18414 2018-06-12  Martin Sebor  <msebor@redhat.com>
18416         PR tree-optimization/85259
18417         * builtins.c (compute_objsize): Handle constant offsets.
18418         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
18419         true iff a warning has been issued.
18420         * gimple.h (gimple_nonartificial_location): New function.
18421         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
18422         gimple_nonartificial_location and handle -Wno-system-headers.
18423         (handle_builtin_stxncpy): Same.
18425 2018-06-12  Martin Sebor  <msebor@redhat.com>
18427         PR c/85931
18428         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
18430 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
18432         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
18433         BUILTIN_VEC_XST entries for pointer to double and long long.
18435 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
18437         PR target/85990
18438         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
18439         Update comments.
18440         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
18441         Likewise.
18443 2018-06-12  Martin Liska  <mliska@suse.cz>
18445         * doc/options.texi: Document IntegerRange.
18447 2018-06-12  Martin Liska  <mliska@suse.cz>
18449         * config/i386/i386.opt: Make MPX-related options as Deprecated.
18450         * opt-functions.awk: Handle Deprecated flag.
18451         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
18452         and report error.
18453         (read_cmdline_option): Report warning for a deprecated option.
18454         * opts.h (struct cl_option): Add new field cl_deprecated.
18455         (CL_ERR_DEPRECATED): New.
18457 2018-06-12  Martin Liska  <mliska@suse.cz>
18459         * doc/options.texi: Document Deprecated option flag.
18461 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
18463         * config/arc/arc-arch.h (arc_extras): New enum.
18464         (arc_cpu_t):Add field extra.
18465         (arc_cpu_types): Consider the extras.
18466         * config/arc/arc-cpus.def: Add extras info.
18467         * config/arc/arc-opts.h (processor_type): Consider extra field.
18468         * config/arc/arc.c (arc_override_options): Handle extra field.
18470 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
18472         * config/arc/arc-arch.h: Update ARC_OPTX macro.
18473         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
18474         field.
18475         * config/arc/arc.c (arc_init): Update pic warning.
18476         (irq_range): Update irq range parsing warnings.
18477         (arc_override_options): Update various warning messages.
18478         (arc_handle_aux_attribute): Likewise.
18480 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
18482         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
18484 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
18486         * doc/sourcebuild.texi: Document usage of line number 0 in verify
18487         compiler messages directives.
18489 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
18491         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
18492         * config/mips/mips-tables.opt: Regenerate.
18493         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
18494         mips64r6.
18495         * doc/invoke.texi: Document -march=i6500.
18497 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
18499         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
18500         (i6400_gpmul): Add cpu_unit.
18501         (i6400_gpdiv): Likewise.
18502         (i6400_msa_add_d): Update reservations.
18503         (i6400_msa_int_add) Likewise.
18504         (i6400_msa_short_logic3) Likewise.
18505         (i6400_msa_short_logic2) Likewise.
18506         (i6400_msa_short_logic) Likewise.
18507         (i6400_msa_move) Likewise.
18508         (i6400_msa_cmp) Likewise.
18509         (i6400_msa_short_float2) Likewise.
18510         (i6400_msa_div_d) Likewise.
18511         (i6400_msa_long_logic1) Likewise.
18512         (i6400_msa_long_logic2) Likewise.
18513         (i6400_msa_mult) Likewise.
18514         (i6400_msa_long_float2) Likewise.
18515         (i6400_msa_long_float4) Likewise.
18516         (i6400_msa_long_float5) Likewise.
18517         (i6400_msa_long_float8) Likewise.
18518         (i6400_fpu_fadd): Include frint type.
18519         (i6400_fpu_store): New define_insn_reservation.
18520         (i6400_fpu_load): Likewise.
18521         (i6400_fpu_move): Likewise.
18522         (i6400_fpu_fcmp): Likewise.
18523         (i6400_fpu_fmadd): Likewise.
18524         (i6400_int_mult): Include imul3nc type and update reservation.
18525         (i6400_int_div): Include idiv3 type and update reservation.
18526         (i6400_int_load): Update to check type not move_type.
18527         (i6400_int_store): Likewise.
18528         (i6400_int_prefetch): Set zero latency.
18530 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
18532         * gcc.c: Document new %@{...} sequence.
18533         (LINK_COMMAND_SPEC): Use it for the -L switches.
18534         (cpp_unique_options): Use it for the -I switches.
18535         (at_file_argbuf): New global variable.
18536         (in_at_file): Likewise.
18537         (alloc_args): Create at_file_argbuf.
18538         (clear_args): Truncate at_file_argbuf.
18539         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
18540         (open_at_file): New function.
18541         (close_at_file): Likewise.
18542         (create_at_file): Delete.
18543         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
18544         <'o'>: Likewise.
18545         <'@'>: New case.
18546         (validate_switches_from_spec): Deal with %@{...} sequence.
18547         (validate_switches): Likewise.
18548         (driver::finalize): Call clear_args.
18550 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
18552         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
18554 2018-06-11  Martin Sebor  <msebor@redhat.com>
18556         * doc/invoke.texi (-Wall): List -Wc++17-compat.
18557         (Wno-class-memaccess): Add @opindex.
18558         (Wno-templates, Wno-multiple-inheritance): Same.
18559         (Wno-virtual-inheritance, Wno-namespaces): Same.
18560         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
18561         (Wno-format-overflow, Wno-format-truncation): Same.
18562         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
18563         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
18564         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
18565         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
18566         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
18567         (Wno-misspelled-isr): Same.
18569 2018-06-11  Martin Sebor  <msebor@redhat.com>
18571         * PR tree-optimization/86083
18572         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
18574 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
18576         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
18578 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
18580         PR target/85755
18581         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
18582         on the correct operand.
18583         (*movdi_internal64): Ditto.
18585 2018-06-11  Martin Liska  <mliska@suse.cz>
18587         PR tree-optimization/86089
18588         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
18590 2018-06-11  Julia Koval  <julia.koval@intel.com>
18592         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
18593         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
18594         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
18596 2018-06-11  Olivier Hainque  <hainque@adacore.com>
18598         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
18599         for Ada with strict dwarf2.
18601 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
18603         PR target/85755
18604         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
18605         addresses.
18607 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
18609         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
18611 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
18613         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
18614         TARGET_ELF.
18616 2018-06-08  Martin Liska  <mliska@suse.cz>
18618         * tree-cfg.h (debug_function): Fix argument type to match
18619         implementation.
18621 2018-06-08  Martin Liska  <mliska@suse.cz>
18623         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
18624         Remove usage of MPX-related (and removed) fields.
18625         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
18627 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
18629         * cfg.c (debug): Use TDF_NONE rather than 0.
18630         * cfghooks.c (debug): Likewise.
18631         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
18632         (struct dump_option_value_info): Convert to...
18633         (struct kv_pair): ...this template type.
18634         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
18635         rather than 0.
18636         (optinfo_verbosity_options): Likewise.
18637         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
18638         OPTGROUP_NONE.
18639         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
18640         than int for "optgroup_flags" param.
18641         (dump_generic_expr_loc): Use dump_flags_t rather than int for
18642         "dump_kind" param.
18643         (dump_dec): Likewise.
18644         (dump_finish): Use TDF_NONE rather than 0.
18645         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
18646         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
18647         than 0.  Update for change to option_ptr.
18648         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
18649         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
18650         0.  Update for changes to optinfo_verbosity_options and
18651         optgroup_options.
18652         (opt_info_switch_p): Convert optgroup_flags from int to
18653         optgroup_flags_t.
18654         (dump_basic_block): Use dump_flags_t rather than int
18655         for "dump_kind" param.
18656         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
18657         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
18658         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
18659         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
18660         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
18661         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
18662         TDF_NONE): Convert from macros to...
18663         (enum dump_flag): ...this new enum.
18664         (dump_flags_t): Update to use enum.
18665         (operator|, operator&, operator~, operator|=, operator&=):
18666         Implement for dump_flags_t.
18667         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
18668         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
18669         Convert from macros to...
18670         (enum optgroup_flag): ...this new enum.
18671         (optgroup_flags_t): New typedef.
18672         (operator|, operator|=): Implement for optgroup_flags_t.
18673         (struct dump_file_info): Convert field "alt_flags" to
18674         dump_flags_t.  Convert field "optgroup_flags" to
18675         optgroup_flags_t.
18676         (dump_basic_block): Use dump_flags_t rather than int for param.
18677         (dump_generic_expr_loc): Likewise.
18678         (dump_dec): Likewise.
18679         (dump_register): Convert param "optgroup_flags" to
18680         optgroup_flags_t.
18681         (opt_info_enable_passes): Likewise.
18682         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
18683         than 0.
18684         * gimple-pretty-print.c (debug): Likewise.
18685         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
18686         (merged_store_group::apply_stores): Likewise.
18687         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
18688         * gimple.c (verify_gimple_pp): Likewise.
18689         * graphite-poly.c (print_pbb_body): Likewise.
18690         * passes.c (pass_manager::register_one_dump_file): Convert
18691         local "optgroup_flags" to optgroup_flags_t.
18692         * print-tree.c (print_node): Use TDF_NONE rather than 0.
18693         (debug): Likewise.
18694         (debug_body): Likewise.
18695         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
18696         to optgroup_flags_t.
18697         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
18698         than 0.
18699         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
18700         (convert_mult_to_fma): Likewise.
18701         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
18702         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
18703         * tree-vect-data-refs.c (dump_lower_bound): Convert param
18704         "dump_kind" to dump_flags_t.
18706 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
18708         * config/rs6000/rs6000.c (min, max): Delete.
18710 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
18712         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
18713         -mabi=spe and -mabi=no-spe.
18715 2018-06-08  Martin Liska  <mliska@suse.cz>
18717         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
18718         where we expect an existing summary.
18720 2018-06-08  Martin Liska  <mliska@suse.cz>
18722         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
18723         * ipa-inline.h (estimate_edge_growth): Likewise.
18725 2018-06-08  Martin Liska  <mliska@suse.cz>
18727         * cgraph.c (function_version_hasher::hash): Use
18728         cgraph_node::get_uid ().
18729         (function_version_hasher::equal):
18730         * cgraph.h (cgraph_node::get_uid): New method.
18731         * ipa-inline.c (update_caller_keys): Use
18732         cgraph_node::get_uid ().
18733         (update_callee_keys): Likewise.
18734         * ipa-utils.c (searchc): Likewise.
18735         (ipa_reduced_postorder): Likewise.
18736         * lto-cgraph.c (input_node): Likewise.
18737         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
18738         * symbol-summary.h (symtab_insertion): Likewise.
18739         (symtab_removal): Likewise.
18740         (symtab_duplication): Likewise.
18741         * tree-pretty-print.c (dump_function_header): Likewise.
18742         * tree-sra.c (convert_callers_for_node): Likewise.
18744 2018-06-08  Martin Liska  <mliska@suse.cz>
18746         * cgraph.c (symbol_table::create_edge): Always assign a new
18747         unique number.
18748         (symbol_table::free_edge): Do not recycle numbers.
18749         * cgraph.h (cgraph_edge::get): New method.
18750         * symbol-summary.h (symtab_removal): Use it.
18751         (symtab_duplication): Likewise.
18752         (call_summary::hashable_uid): Remove.
18754 2018-06-08  Martin Liska  <mliska@suse.cz>
18756         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
18757         (initialize_growth_caches): Remove.
18758         (free_growth_caches): Likewise.
18759         (do_estimate_edge_time): Use edge_growth_cache.
18760         (do_estimate_edge_size): Likewise.
18761         (do_estimate_edge_hints): Likewise.
18762         * ipa-inline.c (reset_edge_caches): Likewise.
18763         (recursive_inlining): Likewise.
18764         (inline_small_functions): Likewise.
18765         * ipa-inline.h (initialize_growth_caches): Remove.
18766         (estimate_edge_size): Likewise.
18767         (estimate_edge_time): Likewise.
18768         (estimate_edge_hints): Likewise.
18769         (reset_edge_growth_cache): Likewise.
18770         * symbol-summary.h (call_summary::remove): New method.
18772 2018-06-08  Martin Liska  <mliska@suse.cz>
18774         * ipa-cp.c (class edge_clone_summary): New summary.
18775         (grow_edge_clone_vectors): Remove.
18776         (ipcp_edge_duplication_hook): Remove.
18777         (class edge_clone_summary_t): New call_summary class.
18778         (ipcp_edge_removal_hook): Remove.
18779         (edge_clone_summary_t::duplicate): New function.
18780         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
18781         (create_specialized_node): Likewise.
18782         (ipcp_driver): Initialize edge_clone_summaries and do not
18783         register hooks.
18785 2018-06-08  Martin Liska  <mliska@suse.cz>
18787         * symbol-summary.h (get): New function.
18788         (call_summary::m_initialize_when_cloning): New class member.
18790 2018-06-08  Martin Liska  <mliska@suse.cz>
18792         * cgraph.c (cgraph_node::remove): Do not recycle uid.
18793         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
18794         (symbol_table::allocate_cgraph_symbol): Do not set uid.
18795         * passes.c (uid_hash_t): Record removed_nodes by their uids.
18796         (remove_cgraph_node_from_order): Use the removed_nodes set.
18797         (do_per_function_toporder): Likwise.
18798         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
18799         instead of summary_uid.
18800         (symtab_removal): Likewise.
18801         (symtab_duplication): Likewise.
18803 2018-06-08  Martin Liska  <mliska@suse.cz>
18805         * ipa-cp.c (ipcp_store_bits_results): Use
18806         ipcp_transformation_sum.
18807         (ipcp_store_vr_results): Likewise.
18808         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
18809         to ...
18810         (ipcp_transformation_initialize): ... this.
18811         (ipa_set_node_agg_value_chain):
18812         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
18813         (write_ipcp_transformation_info): Likewise.
18814         (read_ipcp_transformation_info): Likewise.
18815         (ipcp_update_bits): Likewise.
18816         (ipcp_update_vr): Likewise.
18817         (ipcp_transform_function): Likewise.
18818         * ipa-prop.h: Rename ipcp_transformation_summary to
18819         ipcp_transformation.
18820         (class ipcp_transformation_t): New function summary.
18821         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
18822         (ipa_get_agg_replacements_for_node): Likewise.
18824 2018-06-08  Martin Liska  <mliska@suse.cz>
18826         * ipa-pure-const.c (struct funct_state_d): Do it class instead
18827         of struct.
18828         (class funct_state_summary_t): New function_summary class.
18829         (has_function_state): Remove.
18830         (get_function_state): Likewise.
18831         (set_function_state): Likewise.
18832         (add_new_function): Likewise.
18833         (funct_state_summary_t::insert): New function.
18834         (duplicate_node_data): Remove.
18835         (remove_node_data): Remove.
18836         (funct_state_summary_t::duplicate): New function.
18837         (register_hooks): Create new funct_state_summaries.
18838         (pure_const_generate_summary): Use it.
18839         (pure_const_write_summary): Likewise.
18840         (pure_const_read_summary): Likewise.
18841         (propagate_pure_const): Likewise.
18842         (propagate_nothrow): Likewise.
18843         (dump_malloc_lattice): Likewise.
18844         (propagate_malloc): Likewise.
18845         (execute): Do not register hooks, just remove summary
18846         instead.
18847         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
18848         constructor.
18850 2018-06-08  Martin Liska  <mliska@suse.cz>
18852         * ipa-reference.c (remove_node_data): Remove.
18853         (duplicate_node_data): Likewise.
18854         (class ipa_ref_var_info_summary_t): New class.
18855         (class ipa_ref_opt_summary_t): Likewise.
18856         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
18857         (get_reference_optimization_summary): Use
18858         ipa_ref_opt_sum_summaries.
18859         (set_reference_vars_info): Remove.
18860         (set_reference_optimization_summary): Likewise.
18861         (ipa_init): Create summaries.
18862         (init_function_info): Use function summary.
18863         (ipa_ref_opt_summary_t::duplicate): New function.
18864         (ipa_ref_opt_summary_t::remove): New function.
18865         (get_read_write_all_from_node): Fix GNU coding style.
18866         (propagate): Use function summary.
18867         (write_node_summary_p): Fix GNU coding style.
18868         (stream_out_bitmap): Likewise.
18869         (ipa_reference_read_optimization_summary): Use function summary.
18870         (ipa_reference_c_finalize): Do not release hooks.
18872 2018-06-08  Martin Liska  <mliska@suse.cz>
18874         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
18875         (analyze_function_body): Extract multiple calls of get_create.
18876         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
18877         * ipa-inline.c (recursive_inlining): Use ::get method.
18878         * ipa-inline.h (estimate_edge_growth): Likewise.
18880 2018-06-08  Martin Liska  <mliska@suse.cz>
18882         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
18883         HSA_INVALID.
18884         (hsa_function_summary::hsa_function_summary): Use the new enum
18885         value.
18886         (hsa_gpu_implementation_p): Use hsa_summaries::get.
18887         * hsa-gen.c (hsa_get_host_function): Likewise.
18888         (get_brig_function_name): Likewise.
18889         * ipa-hsa.c (process_hsa_functions): Likewise.
18890         (ipa_hsa_write_summary): Likewise.
18891         * symbol-summary.h (symtab_duplication): Use ::get function/
18892         (get): New function.
18894 2018-06-08  Martin Liska  <mliska@suse.cz>
18896         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
18897         of get.
18898         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
18899         (hsa_register_kernel): Likewise.
18900         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
18901         * hsa-gen.c (hsa_get_host_function): Likewise.
18902         (get_brig_function_name): Likewise.
18903         (generate_hsa): Likewise.
18904         (pass_gen_hsail::execute): Likewise.
18905         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
18906         (devirtualization_time_bonus): Likewise.
18907         (ipcp_propagate_stage): Likewise.
18908         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
18909         (edge_set_predicate): Likewise.
18910         (evaluate_conditions_for_known_args): Likewise.
18911         (evaluate_properties_for_edge): Likewise.
18912         (ipa_fn_summary::reset): Likewise.
18913         (ipa_fn_summary_t::duplicate): Likewise.
18914         (dump_ipa_call_summary): Likewise.
18915         (ipa_dump_fn_summary): Likewise.
18916         (analyze_function_body): Likewise.
18917         (compute_fn_summary): Likewise.
18918         (estimate_edge_devirt_benefit): Likewise.
18919         (estimate_edge_size_and_time): Likewise.
18920         (estimate_calls_size_and_time): Likewise.
18921         (estimate_node_size_and_time): Likewise.
18922         (inline_update_callee_summaries): Likewise.
18923         (remap_edge_change_prob): Likewise.
18924         (remap_edge_summaries): Likewise.
18925         (ipa_merge_fn_summary_after_inlining): Likewise.
18926         (ipa_update_overall_fn_summary): Likewise.
18927         (read_ipa_call_summary): Likewise.
18928         (inline_read_section): Likewise.
18929         (write_ipa_call_summary): Likewise.
18930         (ipa_fn_summary_write): Likewise.
18931         (ipa_free_fn_summary): Likewise.
18932         * ipa-hsa.c (process_hsa_functions): Likewise.
18933         (ipa_hsa_write_summary): Likewise.
18934         (ipa_hsa_read_section): Likewise.
18935         * ipa-icf.c (sem_function::merge): Likewise.
18936         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
18937         (do_estimate_edge_time): Likewise.
18938         (estimate_size_after_inlining): Likewise.
18939         (estimate_growth): Likewise.
18940         (growth_likely_positive): Likewise.
18941         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
18942         (inline_call): Likewise.
18943         * ipa-inline.c (caller_growth_limits): Likewise.
18944         (can_inline_edge_p): Likewise.
18945         (can_inline_edge_by_limits_p): Likewise.
18946         (compute_uninlined_call_time): Likewise.
18947         (compute_inlined_call_time): Likewise.
18948         (want_inline_small_function_p): Likewise.
18949         (edge_badness): Likewise.
18950         (update_caller_keys): Likewise.
18951         (update_callee_keys): Likewise.
18952         (recursive_inlining): Likewise.
18953         (inline_small_functions): Likewise.
18954         (inline_to_all_callers_1): Likewise.
18955         (dump_overall_stats): Likewise.
18956         (early_inline_small_functions): Likewise.
18957         (early_inliner): Likewise.
18958         * ipa-inline.h (estimate_edge_growth): Likewise.
18959         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
18960         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
18961         * ipa-prop.h (IPA_NODE_REF): Likewise.
18962         (IPA_EDGE_REF): Likewise.
18963         * ipa-pure-const.c (malloc_candidate_p): Likewise.
18964         (propagate_malloc): Likewise.
18965         * ipa-split.c (execute_split_functions): Likewise.
18966         * symbol-summary.h: Rename get to get_create.
18967         (get): Likewise.
18968         (get_create): Likewise.
18969         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
18971 2018-06-08  Martin Liska  <mliska@suse.cz>
18973         * symbol-summary.h (release): Move definition out of class
18974         declaration.
18975         (symtab_removal): Likewise.
18976         (symtab_duplication): Likewise.
18978 2018-06-08  Martin Liska  <mliska@suse.cz>
18980         * symbol-summary.h (function_summary): Move constructor
18981         implementation out of class declaration.
18982         (release): Likewise.
18983         (symtab_insertion): Likewise.
18984         (symtab_removal): Likewise.
18985         (symtab_duplication): Likewise.
18986         (get): Likewise.
18988 2018-06-08  Martin Liska  <mliska@suse.cz>
18990         * Makefile.in: Remove support for MPX (macros, related functions,
18991         fields in cgraph_node, ...).
18992         * builtin-types.def (BT_BND): Likewise.
18993         (BT_FN_BND_CONST_PTR): Likewise.
18994         (BT_FN_CONST_PTR_BND): Likewise.
18995         (BT_FN_VOID_PTR_BND): Likewise.
18996         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
18997         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
18998         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
18999         (expand_builtin_mempcpy_with_bounds): Likewise.
19000         (expand_builtin_memset_with_bounds): Likewise.
19001         (expand_builtin_memset_args): Likewise.
19002         (std_expand_builtin_va_start): Likewise.
19003         (expand_builtin): Likewise.
19004         (expand_builtin_with_bounds): Likewise.
19005         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
19006         (DEF_LIB_BUILTIN_CHKP): Likewise.
19007         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
19008         (DEF_CHKP_BUILTIN): Likewise.
19009         (BUILT_IN_MEMCPY): Likewise.
19010         (BUILT_IN_MEMMOVE): Likewise.
19011         (BUILT_IN_MEMPCPY): Likewise.
19012         (BUILT_IN_MEMSET): Likewise.
19013         (BUILT_IN_STPCPY): Likewise.
19014         (BUILT_IN_STRCAT): Likewise.
19015         (BUILT_IN_STRCHR): Likewise.
19016         (BUILT_IN_STRCPY): Likewise.
19017         (BUILT_IN_STRLEN): Likewise.
19018         (BUILT_IN_MEMCPY_CHK): Likewise.
19019         (BUILT_IN_MEMMOVE_CHK): Likewise.
19020         (BUILT_IN_MEMPCPY_CHK): Likewise.
19021         (BUILT_IN_MEMSET_CHK): Likewise.
19022         (BUILT_IN_STPCPY_CHK): Likewise.
19023         (BUILT_IN_STRCAT_CHK): Likewise.
19024         (BUILT_IN_STRCPY_CHK): Likewise.
19025         * calls.c (store_bounds): Likewise.
19026         (emit_call_1): Likewise.
19027         (special_function_p): Likewise.
19028         (maybe_warn_nonstring_arg): Likewise.
19029         (initialize_argument_information): Likewise.
19030         (finalize_must_preallocate): Likewise.
19031         (compute_argument_addresses): Likewise.
19032         (expand_call): Likewise.
19033         * cfgexpand.c (expand_call_stmt): Likewise.
19034         (expand_return): Likewise.
19035         (expand_gimple_stmt_1): Likewise.
19036         (pass_expand::execute): Likewise.
19037         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
19038         (cgraph_node::remove): Likewise.
19039         (cgraph_node::dump): Likewise.
19040         (cgraph_node::verify_node): Likewise.
19041         * cgraph.h (chkp_function_instrumented_p): Likewise.
19042         (symtab_node::get_alias_target): Likewise.
19043         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
19044         (cgraph_local_p): Likewise.
19045         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
19046         (cgraph_edge::rebuild_references): Likewise.
19047         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
19048         (walk_polymorphic_call_targets): Likewise.
19049         (cgraph_node::expand_thunk): Likewise.
19050         (symbol_table::output_weakrefs): Likewise.
19051         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
19052         (ix86_handle_option): Likewise.
19053         * config/i386/constraints.md: Likewise.
19054         * config/i386/i386-builtin-types.def (BND): Likewise.
19055         (VOID): Likewise.
19056         (PVOID): Likewise.
19057         (ULONG): Likewise.
19058         * config/i386/i386-builtin.def (BDESC_END): Likewise.
19059         (BDESC_FIRST): Likewise.
19060         (BDESC): Likewise.
19061         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
19062         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
19063         * config/i386/i386.c (enum reg_class): Likewise.
19064         (ix86_target_string): Likewise.
19065         (ix86_option_override_internal): Likewise.
19066         (ix86_conditional_register_usage): Likewise.
19067         (ix86_valid_target_attribute_inner_p): Likewise.
19068         (ix86_set_indirect_branch_type): Likewise.
19069         (ix86_set_current_function): Likewise.
19070         (ix86_function_arg_regno_p): Likewise.
19071         (init_cumulative_args): Likewise.
19072         (ix86_function_arg_advance): Likewise.
19073         (ix86_function_arg): Likewise.
19074         (ix86_pass_by_reference): Likewise.
19075         (ix86_function_value_regno_p): Likewise.
19076         (ix86_function_value_1): Likewise.
19077         (ix86_function_value_bounds): Likewise.
19078         (ix86_return_in_memory): Likewise.
19079         (ix86_setup_incoming_vararg_bounds): Likewise.
19080         (ix86_va_start): Likewise.
19081         (indirect_thunk_need_prefix): Likewise.
19082         (print_reg): Likewise.
19083         (ix86_print_operand): Likewise.
19084         (ix86_expand_call): Likewise.
19085         (ix86_output_function_return): Likewise.
19086         (reg_encoded_number): Likewise.
19087         (BDESC_VERIFYS): Likewise.
19088         (ix86_init_mpx_builtins): Likewise.
19089         (ix86_init_builtins): Likewise.
19090         (ix86_emit_cmove): Likewise.
19091         (ix86_emit_move_max): Likewise.
19092         (ix86_expand_builtin): Likewise.
19093         (ix86_builtin_mpx_function): Likewise.
19094         (ix86_get_arg_address_for_bt): Likewise.
19095         (ix86_load_bounds): Likewise.
19096         (ix86_store_bounds): Likewise.
19097         (ix86_load_returned_bounds): Likewise.
19098         (ix86_store_returned_bounds): Likewise.
19099         (ix86_class_likely_spilled_p): Likewise.
19100         (ix86_hard_regno_mode_ok): Likewise.
19101         (x86_order_regs_for_local_alloc): Likewise.
19102         (ix86_mitigate_rop): Likewise.
19103         (ix86_bnd_prefixed_insn_p): Likewise.
19104         (ix86_mpx_bound_mode): Likewise.
19105         (ix86_make_bounds_constant): Likewise.
19106         (ix86_initialize_bounds): Likewise.
19107         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
19108         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
19109         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
19110         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
19111         (TARGET_CHKP_BOUND_MODE): Likewise.
19112         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
19113         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
19114         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
19115         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
19116         * config/i386/i386.h (TARGET_MPX): Likewise.
19117         (TARGET_MPX_P): Likewise.
19118         (VALID_BND_REG_MODE): Likewise.
19119         (FIRST_BND_REG): Likewise.
19120         (LAST_BND_REG): Likewise.
19121         (enum reg_class): Likewise.
19122         (BND_REG_P): Likewise.
19123         (BND_REGNO_P): Likewise.
19124         (BNDmode): Likewise.
19125         (ADJUST_INSN_LENGTH): Likewise.
19126         * config/i386/i386.md: Likewise.
19127         * config/i386/i386.opt: Likewise.
19128         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
19129         (defined): Likewise.
19130         (LINK_MPX): Likewise.
19131         (MPX_SPEC): Likewise.
19132         (LIBMPX_SPEC): Likewise.
19133         (LIBMPXWRAPPERS_SPEC): Likewise.
19134         (CHKP_SPEC): Likewise.
19135         * config/i386/predicates.md: Likewise.
19136         * dbxout.c (dbxout_type): Likewise.
19137         * doc/extend.texi: Likewise.
19138         * doc/invoke.texi: Likewise.
19139         * doc/md.texi: Likewise.
19140         * doc/tm.texi: Likewise.
19141         * doc/tm.texi.in: Likewise.
19142         * dwarf2out.c (is_base_type): Likewise.
19143         (gen_formal_types_die): Likewise.
19144         (gen_subprogram_die): Likewise.
19145         (gen_type_die_with_usage): Likewise.
19146         (gen_decl_die): Likewise.
19147         (dwarf2out_late_global_decl): Likewise.
19148         * expr.c (expand_assignment): Likewise.
19149         (emit_storent_insn): Likewise.
19150         (store_expr_with_bounds): Likewise.
19151         (store_expr): Likewise.
19152         (expand_expr_real_1): Likewise.
19153         * expr.h (store_expr_with_bounds): Likewise.
19154         * function.c (use_register_for_decl): Likewise.
19155         (struct bounds_parm_data): Likewise.
19156         (assign_parms_augmented_arg_list): Likewise.
19157         (assign_parm_find_entry_rtl): Likewise.
19158         (assign_parm_is_stack_parm): Likewise.
19159         (assign_parm_load_bounds): Likewise.
19160         (assign_bounds): Likewise.
19161         (assign_parms): Likewise.
19162         (expand_function_start): Likewise.
19163         * gcc.c (CHKP_SPEC): Likewise.
19164         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
19165         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
19166         (wrestrict_dom_walker::check_call): Likewise.
19167         * gimple.c (gimple_build_call_from_tree): Likewise.
19168         * gimple.h (enum gf_mask): Likewise.
19169         (gimple_call_with_bounds_p): Likewise.
19170         (gimple_call_set_with_bounds): Likewise.
19171         * gimplify.c (gimplify_init_constructor): Likewise.
19172         * ipa-cp.c (initialize_node_lattices): Likewise.
19173         (propagate_constants_across_call): Likewise.
19174         (find_more_scalar_values_for_callers_subset): Likewise.
19175         * ipa-hsa.c (process_hsa_functions): Likewise.
19176         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
19177         * ipa-icf.c (sem_function::merge): Likewise.
19178         * ipa-inline.c (early_inliner): Likewise.
19179         * ipa-pure-const.c (warn_function_noreturn): Likewise.
19180         (warn_function_cold): Likewise.
19181         (propagate_pure_const): Likewise.
19182         * ipa-ref.h (enum GTY): Likewise.
19183         * ipa-split.c (find_retbnd): Likewise.
19184         (consider_split): Likewise.
19185         (split_function): Likewise.
19186         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
19187         * ipa.c (walk_polymorphic_call_targets): Likewise.
19188         (symbol_table::remove_unreachable_nodes): Likewise.
19189         (process_references): Likewise.
19190         (cgraph_build_static_cdtor_1): Likewise.
19191         * lto-cgraph.c (lto_output_node): Likewise.
19192         (output_refs): Likewise.
19193         (compute_ltrans_boundary): Likewise.
19194         (input_overwrite_node): Likewise.
19195         (input_node): Likewise.
19196         (input_cgraph_1): Likewise.
19197         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
19198         * passes.c (pass_manager::execute_early_local_passes): Likewise.
19199         (class pass_chkp_instrumentation_passes): Likewise.
19200         (make_pass_chkp_instrumentation_passes): Likewise.
19201         * passes.def: Likewise.
19202         * rtl.h (struct GTY): Likewise.
19203         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
19204         * stor-layout.c (layout_type): Likewise.
19205         * symtab.c: Likewise.
19206         * target.def: Likewise.
19207         * targhooks.c (default_chkp_bound_type): Likewise.
19208         (default_chkp_bound_mode): Likewise.
19209         (default_builtin_chkp_function): Likewise.
19210         (default_chkp_function_value_bounds): Likewise.
19211         (default_chkp_make_bounds_constant): Likewise.
19212         (default_chkp_initialize_bounds): Likewise.
19213         * targhooks.h (default_chkp_bound_type): Likewise.
19214         (default_chkp_bound_mode): Likewise.
19215         (default_builtin_chkp_function): Likewise.
19216         (default_chkp_function_value_bounds): Likewise.
19217         (default_chkp_make_bounds_constant): Likewise.
19218         (default_chkp_initialize_bounds): Likewise.
19219         * toplev.c (compile_file): Likewise.
19220         (process_options): Likewise.
19221         * tree-core.h (DEF_BUILTIN): Likewise.
19222         (DEF_BUILTIN_CHKP): Likewise.
19223         * tree-inline.c (declare_return_variable): Likewise.
19224         (remap_gimple_stmt): Likewise.
19225         (copy_bb): Likewise.
19226         (initialize_inlined_parameters): Likewise.
19227         (expand_call_inline): Likewise.
19228         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
19229         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
19230         (make_pass_ipa_chkp_produce_thunks): Likewise.
19231         (make_pass_chkp): Likewise.
19232         (make_pass_chkp_opt): Likewise.
19233         (make_pass_chkp_instrumentation_passes): Likewise.
19234         * tree-pretty-print.c (dump_generic_node): Likewise.
19235         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
19236         * tree-ssa-dce.c (propagate_necessity): Likewise.
19237         (eliminate_unnecessary_stmts): Likewise.
19238         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
19239         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
19240         * tree-ssa-sccvn.h: Likewise.
19241         * tree-ssa-strlen.c (get_string_length): Likewise.
19242         (valid_builtin_call): Likewise.
19243         (adjust_last_stmt): Likewise.
19244         (handle_builtin_strchr): Likewise.
19245         (handle_builtin_strcpy): Likewise.
19246         (handle_builtin_stxncpy): Likewise.
19247         (handle_builtin_memcpy): Likewise.
19248         (handle_builtin_strcat): Likewise.
19249         (strlen_check_and_optimize_stmt): Likewise.
19250         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
19251         * tree-streamer-in.c: Likewise.
19252         * tree-streamer.c (record_common_node): Likewise.
19253         * tree.c (tree_code_size): Likewise.
19254         (wide_int_to_tree_1): Likewise.
19255         (type_contains_placeholder_1): Likewise.
19256         (build_common_tree_nodes): Likewise.
19257         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
19258         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
19259         (POINTER_BOUNDS_P): Likewise.
19260         (BOUNDED_TYPE_P): Likewise.
19261         (BOUNDED_P): Likewise.
19262         (CALL_WITH_BOUNDS_P): Likewise.
19263         (pointer_bounds_type_node): Likewise.
19264         * value-prof.c (gimple_ic): Likewise.
19265         * var-tracking.c (vt_add_function_parameters): Likewise.
19266         * varasm.c (make_decl_rtl): Likewise.
19267         (assemble_start_function): Likewise.
19268         (output_constant): Likewise.
19269         (maybe_assemble_visibility): Likewise.
19270         * varpool.c (ctor_for_folding): Likewise.
19271         * chkp-builtins.def: Remove.
19272         * ipa-chkp.c: Remove.
19273         * ipa-chkp.h: Remove.
19274         * rtl-chkp.c: Remove.
19275         * rtl-chkp.h: Remove.
19276         * tree-chkp-opt.c: Remove.
19277         * tree-chkp.c: Remove.
19278         * tree-chkp.h: Remove.
19280 2018-06-07  Carl Love  <cel@us.ibm.com>
19282         * config/rs6000/vsx.md (vextract_fp_from_shorth,
19283         vextract_fp_from_shortl): Add BE support.
19285 2018-06-07  Paul Koning  <ni1d@arrl.net>
19287         * compare-elim.c (try_merge_compare): Don't merge compare if
19288         address contains a side effect.
19289         (try_eliminate_compare): Likewise.
19291 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
19293         * config.gcc: Support "tremont".
19294         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
19295         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19296         PROCESSOR_TREMONT.
19297         * config/i386/i386.c (m_TREMONT): Define.
19298         (processor_target_table): Add "tremont".
19299         (PTA_TREMONT): Define.
19300         (ix86_lea_outperforms): Add TARGET_TREMONT.
19301         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
19302         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
19303         and M_INTEL_GOLDMONT_PLUS.
19304         (fold_builtin_cpu): Add "tremont".
19305         (ix86_add_stmt_cost): Add TARGET_TREMONT.
19306         (ix86_option_override_internal): Add "tremont".
19307         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
19308         (processor_type): Add PROCESSOR_TREMONT.
19309         * config/i386/x86-tune.def: Add m_TREMONT.
19310         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
19312 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
19314         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
19315         symbol defined for msp430i* devices to be lower case.
19317 2018-06-07  Richard Biener  <rguenther@suse.de>
19319         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
19320         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
19321         Properly wrap signed arithmetic if overflow wraps.
19323 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
19325         PR tree-optimization/69615
19326         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
19327         of a cast from a same precision integral SSA_NAME in a bb dominated
19328         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
19329         cast to utype if rhs2 has already a compatible type.
19331 2018-06-07  Richard Biener  <rguenther@suse.de>
19333         PR tree-optimization/85935
19334         * graphite-scop-detection.c (find_params_in_bb): Analyze
19335         condition operands with respect to the correct loop.  Assert
19336         the analysis doesn't fail.
19338 2018-06-04  Carl Love  <cel@us.ibm.com>
19340         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
19341         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
19342         as it is slightly cheaper.
19343         (first_match_or_eos_index_<mode>):
19344         Calculate index using natural element order.
19345         (first_match_index_<mode>):
19346         Calculate index using natural element order.
19347         (first_match_or_eos_index_<mode>):
19348         Calculate index using natural order.
19349         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
19350         for BE and LE modes.
19351         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
19352         P9V_BUILTIN_VCLZLSBB_V16QI.
19353         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
19354         specific.
19356 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19358         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
19359         indentation and line wrap for many prototypes.  Add missing
19360         @smallexample directives around block of prototypes for vec_xl and
19361         vec_xst.
19363 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
19365         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
19366         track if we pass or return IEEE 128-bit floating point.
19367         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
19368         C++ mangling that is compatible with GCC 8.1.
19369         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
19370         (init_cumulative_args): Note if we pass or return IEEE 128-bit
19371         floating point types.
19372         (rs6000_function_arg_advance_1): Likewise.
19373         (rs6000_mangle_type): Optionally generate mangled names that match
19374         what GCC 8.1 generated for IEEE 128-bit floating point types.
19375         (rs6000_globalize_decl_name): If we have an external function that
19376         passes or returns IEEE 128-bit types, generate a weak reference
19377         from the mangled name used in GCC 8.1 to the current mangled
19378         name.
19379         (rs6000_init_builtins): Make __ibm128 use the long double type if
19380         long double is IBM extended double.  Make __float128 use the long
19381         double type if long double is IEEE 128-bit.
19383         PR target/85657
19384         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
19385         macro for __ibm128 built-in functions.
19386         (PACK_IF): Add __ibm128 pack/unpack functions.
19387         (UNPACK_IF): Likewise.
19388         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
19389         enable long double built-in functions if long double is IEEE
19390         128-bit floating point.
19391         (rs6000_invalid_builtin): Update long double built-in function
19392         error message.
19393         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
19394         functions, adjust the built-in function to use the long double
19395         built-in function if __ibm128 and long double are the same type.
19396         * doc/extend.texi (PowerPC builtins): Update documention for
19397         __builtin_{,un}pack_longdouble.  Add documentation for
19398         __builtin_{,un}pack_ibm128.
19400 2018-06-06  Jim Wilson  <jimw@sifive.com>
19402         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
19403         (struct machine_function): New field interrupt_mode.
19404         (riscv_handle_type_attribute): New function.  Add forward declaration.
19405         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
19406         (riscv_expand_epilogue): Check interrupt_mode field.
19407         (riscv_set_current_function): Check interrupt attribute args and
19408         set interrupt_mode field.
19409         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
19410         (riscv_sret, riscv_uret): New.
19411         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
19412         new arguments to interrupt attribute.
19414 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
19416         PR target/63177
19417         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
19418         Don't handle -mcpu=power8 if -mpower9-vector is also used.
19420 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19422         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
19423         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
19424         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
19425         several redundant entries.
19427 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
19429         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
19430         type from "rtx" to "rtx_insn *".
19431         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
19432         for local "call_insn", removing cast.
19433         (ix86_expand_call): Likewise, introducing a "call_insn" local.
19435 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
19437         PR tree-optimization/86066
19438         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
19439         for BIT_INSERT_EXPR stores.
19441 2018-06-06  Richard Biener  <rguenther@suse.de>
19443         PR tree-optimization/86062
19444         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
19445         component refs ontop
19446         of to be offsetted base.
19448 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
19450         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
19451         to be static and remove check on interrupt attribute name.
19453 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19455         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
19456         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
19458 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
19460         PR target/79924
19461         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
19462         second argument.
19463         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
19464         Remove second argument, change how error is called.
19465         (aarch64_layout_arg): Remove second argument from
19466         aarch64_err_no_fpadvsimd call.
19467         (aarch64_init_cumulative_args): Ditto.
19468         (aarch64_gimplify_va_arg_expr): Ditto.
19469         * config/aarch64/aarch64.md (mov<mode>): Ditto.
19471 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
19473         * config/i386/i386.md (simple_return_indirect_internal): New expander.
19474         (*simple_return_indirect_internal<mode>): Rename from
19475         simple_return_indirect_internal.  Use W mode iterator.
19476         (rstorssp): New expander.
19477         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
19478         (clrssbsy): New expander.
19479         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
19481 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
19483         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
19484         __typeof__.
19485         (cmse_check_pointed_object): Likewise.
19487 2018-06-05  Martin Liska  <mliska@suse.cz>
19489         PR gcov-profile/47618
19490         * doc/invoke.texi: Document how -fprofile-dir format
19491         is extended.
19493 2018-06-05  Richard Biener  <rguenther@suse.de>
19495         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
19496         removal pretend DOM info isn't available so we do not update
19497         it and only remove edges, not dominated blocks.  Actually free
19498         DOM info in case we removed something.  Remove unreachable blocks.
19499         (mfb_keep_latches): Work with either DOM info or marked backedges.
19500         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
19501         first.  Mark backedges if DOM info isn't available.
19502         (Re-)compute DOM info after cleanup_control_flow_pre.
19504 2018-06-05  Richard Biener  <rguenther@suse.de>
19506         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
19507         (locus_discrim_hasher::hash): Adjust.
19508         (locus_discrim_hasher::equal): Likewise.
19509         (next_discriminator_for_locus): Work on line directly.
19510         (same_line_p): Pass in expanded locus1 as well.
19511         (assign_discriminators): Avoid redundant location expansions.
19513 2018-06-05  Richard Biener  <rguenther@suse.de>
19515         PR tree-optimization/86046
19516         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
19517         if required after clearing TREE_ADDRESSABLE.
19519 2018-06-05  Richard Biener  <rguenther@suse.de>
19521         PR tree-optimization/86047
19522         * tree-ssa-loop.c (for_each_index): Glob handling of all
19523         decls and constants and really handle all of them.
19525 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19527         PR target/81497
19528         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
19529         qualifier_void_pointer and qualifier_const_void_pointer.
19530         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
19531         (arm_init_builtins): Handle the above.
19532         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
19533         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
19534         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
19535         void intrinsics.
19537 2018-06-05  Martin Liska  <mliska@suse.cz>
19539         * auto-profile.c (read_autofdo_file): Do not use
19540         gcov_ctr_summary struct.
19541         (afdo_callsite_hot_enough_for_early_inline): Likewise.
19542         * coverage.c (struct counts_entry): Likewise.
19543         (read_counts_file): Read just single summary entry.
19544         (get_coverage_counts): Use gcov_summary struct.
19545         * coverage.h (get_coverage_counts): Likewise.
19546         * gcov-dump.c (dump_working_sets): Likewise.
19547         (tag_summary): Dump just single summary.
19548         * gcov-io.c (gcov_write_summary): Write just histogram
19549         summary.
19550         (gcov_read_summary): Read just single summary.
19551         (compute_working_sets): Use gcov_summary struct.
19552         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
19553         of GCOV_COUNTERS_SUMMABLE.
19554         (GCOV_COUNTERS_SUMMABLE): Remove.
19555         (GCOV_FIRST_VALUE_COUNTER): Replace with
19556         GCOV_COUNTER_V_INTERVAL.
19557         (struct gcov_ctr_summary): Remove.
19558         (struct gcov_summary): Directly use fields of former
19559         gcov_ctr_summary.
19560         (compute_working_sets): Use gcov_summary struct.
19561         * gcov.c (read_count_file): Do not use ctrs fields.
19562         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
19563         struct.
19564         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
19565         struct.
19566         * profile.c: Likewise.
19567         * profile.h: Likewise.
19569 2018-06-05  Martin Liska  <mliska@suse.cz>
19571         PR gcov-profile/84846
19572         * gcov.c (output_lines): Print working directory only
19573         in intermediate format.
19575 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
19577         * config/s390/s390-builtin-types.def: Add void function type.
19578         * config/s390/s390-builtins.def: Use the function type for the
19579         tbeginc builtin.
19581 2018-06-04  Jim Wilson  <jimw@sifive.com>
19583         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
19584         to int.
19585         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
19586         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
19587         handle EH_RETURN_DATA_REGNO registers properly.
19588         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
19589         (riscv_expand_epilogue): Update comment.  Change argument name and
19590         type.  Update code to use new name and type.  Pass new args to
19591         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
19592         EXCEPTION_RETURN.
19593         * config/riscv/riscv.md (NORMAL_RETURN): New.
19594         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
19595         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
19596         (eh_return): Call gen_eh_return_internal and emit barrier.
19597         (eh_return_internal): Call riscv_expand_epilogue.
19599 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
19601         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
19602         bit_insertion field and declare can_be_merged_into method.
19603         (merged_store_group::can_be_merged_into): New method.
19604         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
19605         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
19606         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
19608 2018-06-04  Richard Biener  <rguenther@suse.de>
19610         PR tree-optimization/85955
19611         * builtins.c (fold_builtin_sincos): Convert pointers to
19612         destination to appropriate type before dereferencing.
19614 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
19616         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
19618 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
19620         * expr.c (expand_expr_real_1): Force the operand into memory if
19621         its TYPE_MODE is BLKmode and if there is no integer mode for
19622         the number of bits being extracted.
19624 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
19626         PR target/85832
19627         PR target/86036
19628         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
19629         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
19631 2018-06-04  Richard Biener  <rguenther@suse.de>
19633         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
19634         (cleanup_tree_cfg_noloop): ... single caller.  Do
19635         start_recording_case_labels later.
19637 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
19639         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
19640         to _IMMINTRIN_H_INCLUDED.
19641         * config/i386/pconfigintrin.h: Ditto.
19642         * config/i386/waitpkgintrin.h: Ditto.
19643         * config/i386/immintrin.h: Add includes for sgxintrin.h,
19644         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
19645         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
19646         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
19647         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
19648         waitpkgintrin.h and cldemoteintrin.h.
19650 2018-06-04  Richard Biener  <rguenther@suse.de>
19652         PR tree-optimization/86038
19653         * tracer.c (find_best_successor): Check probability for
19654         being initialized, bail out if not.
19656 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
19658         PR target/86003
19659         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
19660         of bits to ignore when comparing architectures.
19662 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
19664         PR tree-optimization/69615
19665         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
19666         maximum or minimum of the type, try to merge it also as if
19667         range1 is + [-, x - 1] or + [x + 1, -].
19669         PR c++/86025
19670         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
19672 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
19674         PR tree-optimization/86034
19675         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
19676         the unsigned bitfield type in a bit insertion sequence if it does not
19677         have a larger precision than the bitfield size.
19678         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
19680 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
19682         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
19684 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
19686         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
19687         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
19688         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
19689         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
19691 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
19693         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
19694         Disable -fdelete-null-pointer-checks for ELF toolchain.
19696 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
19697             Kito Cheng  <kito.cheng@gmail.com>
19699         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
19700         (nds32le-*-*, nds32be-*-*): Integrate checking process.
19701         (nds32*-*-*): Add glibc and uclibc conditions.
19702         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
19703         (TARGET_EXCEPT_UNWIND_INFO): Define.
19704         * config/nds32/elf.h: New file.
19705         * config/nds32/linux.h: New file.
19706         * config/nds32/nds32-elf.opt: New file.
19707         * config/nds32/nds32-linux.opt: New file.
19708         * config/nds32/nds32-fp-as-gp.c
19709         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
19710         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
19711         TARGET_LINUX_ABI.
19712         (nds32_asm_file_end): Ditto.
19713         (nds32_print_operand): Ditto.
19714         (nds32_insert_attributes): Ditto.
19715         (nds32_init_libfuncs): New function.
19716         (TARGET_HAVE_TLS): Define.
19717         (TARGET_INIT_LIBFUNCS): Define.
19718         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
19719         spec content.
19720         (TARGET_ELF): Apply different mcmodel setting.
19721         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
19722         been migrated into elf.h and linux.h files.
19723         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
19724         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
19725         (mcmodel): The content has been migrated into nds32-elf.opt and
19726         nds32-linux.opt files.
19727         * config/nds32/t-elf: New file.
19728         * config/nds32/t-linux: New file.
19730 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
19731             Shiva Chen  <shiva0217@gmail.com>
19733         * config/nds32/constants.md (unspec_volatile_element): Add
19734         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
19735         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
19736         optimization.
19737         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
19738         (make_pass_nds32_fp_as_gp): Declare.
19739         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
19740         optmization pass.
19741         (nds32_asm_function_end_prologue): Remove unused asm output.
19742         (nds32_asm_function_begin_epilogue): Remove unused asm output.
19743         (nds32_asm_file_start): Output necessary fp_as_gp information.
19744         (nds32_option_override): Adjust register usage.
19745         (nds32_expand_prologue): Consider fp_as_gp situation.
19746         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
19747         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
19748         (epilogue): Ditto.
19749         (return): Ditto.
19750         (simple_return): Ditto.
19751         (omit_fp_begin): Output special directive for fp_as_gp.
19752         (omit_fp_end): Output special directive for fp_as_gp.
19753         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
19754         mforbid-fp-as-gp): New options.
19756 2018-06-01  Mark Wielaard  <mark@klomp.org>
19758         * dwarf2out.c (dwarf2out_finish): Remove generation of
19759         DW_AT_loclists_base.
19761 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
19763         * gimple-ssa-store-merging.c: Include gimple-fold.h.
19764         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
19765         (struct merged_store_group): Add bit_insertion field.
19766         (dump_char_array): Use standard hexadecimal format.
19767         (merged_store_group::merged_store_group): Set bit_insertion to false.
19768         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
19769         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
19770         also print the mask in the dump file.
19771         (pass_store_merging::gate): Minor tweak.
19772         (imm_store_chain_info::coalesce_immediate): Fix wrong association
19773         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
19774         stores with INTEGER_CST stores.
19775         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
19776         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
19777         and use it throughout.  Generate bit insertion sequences if need be.
19778         (pass_store_merging::process_store): Remove redundant condition.
19779         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
19781 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
19783         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
19784         the 128-bit floating point types.  Fix function comment.
19786 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19788         * config/aarch64/aarch64-simd.md
19789         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
19790         mnemonics.
19791         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
19792         mnemonics.
19794 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
19796         PR tree-optimization/85989
19797         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
19798         variable.
19799         (backprop::intersect_uses): Check it when deciding whether this
19800         is a backedge reference.
19801         (backprop::process_block): Add each phi to m_visited_phis
19802         after visiting it, then clear it at the end.
19804 2018-06-01  Richard Biener  <rguenther@suse.de>
19806         * tree-vectorizer.h (vect_dr_stmt): New function.
19807         (vect_get_load_cost): Adjust.
19808         (vect_get_store_cost): Likewise.
19809         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
19810         Use vect_dr_stmt instead of DR_SMTT.
19811         (vect_record_base_alignments): Likewise.
19812         (vect_calculate_target_alignment): Likewise.
19813         (vect_compute_data_ref_alignment): Likewise and make static.
19814         (vect_update_misalignment_for_peel): Likewise.
19815         (vect_verify_datarefs_alignment): Likewise.
19816         (vector_alignment_reachable_p): Likewise.
19817         (vect_get_data_access_cost): Likewise.  Pass down
19818         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
19819         (vect_get_peeling_costs_all_drs): Likewise.
19820         (vect_peeling_hash_get_lowest_cost): Likewise.
19821         (vect_enhance_data_refs_alignment): Likewise.
19822         (vect_find_same_alignment_drs): Likewise.
19823         (vect_analyze_data_refs_alignment): Likewise.
19824         (vect_analyze_group_access_1): Likewise.
19825         (vect_analyze_group_access): Likewise.
19826         (vect_analyze_data_ref_access): Likewise.
19827         (vect_analyze_data_ref_accesses): Likewise.
19828         (vect_vfa_segment_size): Likewise.
19829         (vect_small_gap_p): Likewise.
19830         (vectorizable_with_step_bound_p): Likewise.
19831         (vect_prune_runtime_alias_test_list): Likewise.
19832         (vect_analyze_data_refs): Likewise.
19833         (vect_supportable_dr_alignment): Likewise.
19834         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
19835         (vect_gen_prolog_loop_niters): Likewise.
19836         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
19837         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
19838         modify DR_STMT.
19839         (vect_recog_mask_conversion_pattern): Likewise.
19840         (vect_try_gather_scatter_pattern): Likewise.
19841         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
19842         to vect_get_store_cost.
19843         (vect_get_store_cost): Get stmt_info instead of DR.
19844         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
19845         (vect_get_load_cost): Get stmt_info instead of DR.
19847 2018-06-01  Richard Biener  <rguenther@suse.de>
19849         PR middle-end/86017
19850         * gimple-fold.c (var_decl_component_p): Also allow offsetted
19851         vars wrapped in MEM_REFs.
19853 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
19855         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
19856         Fix subreg tests so that we only return a choice between
19857         GENERAL_REGS and FP_REGS if the original classes included both.
19859 2018-06-01  Richard Biener  <rguenther@suse.de>
19861         PR ipa/85960
19862         * tree-ssa-structalias.c (get_function_part_constraint):
19863         Handle NULL fi->decl.
19864         (find_func_aliases_for_call): Properly handle indirect
19865         fi from direct call.
19866         (find_func_clobbers): Likewise.
19867         (ipa_pta_execute): Likewise.
19868         (create_variable_info_for): For functions that are ifunc_resolver
19869         resolve to a varinfo that contains the result of the resolver call.
19870         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
19871         aliases.
19873 2018-05-31  Michael Collison  <michael.collison@arm.com>
19875         * config/aarch64/aarch64.md:
19876         (*fix_to_zero_extenddfdi2): New pattern.
19877         * gcc.target/aarch64/fix_extend1.c: New testcase.
19879 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
19881         PR middle-end/78809
19882         PR middle-end/83026
19883         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
19884         and BUILT_IN_STRNCMP_EQ.
19885         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
19886         BUILT_IN_STRNCMP_EQ.
19887         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
19888         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
19889         (gimple_fold_builtin): Likewise.
19890         * tree-ssa-strlen.c (compute_string_length): New function.
19891         (determine_min_obsize): New function.
19892         (handle_builtin_string_cmp): New function to handle calls to
19893         string compare functions.
19894         (strlen_optimize_stmt): Add handling to builtin string compare
19895         calls.
19896         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
19897         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
19898         * tree.c (build_common_builtin_nodes): Add new defines of
19899         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
19901 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
19903         PR target/85984
19904         * bb-reorder.c (pass_partition_blocks::gate): Return false for
19905         functions with naked attribute.
19907 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
19909         * config/i386/sse.md (avx_vec_concat<mode>):
19910         Substitute concat_tg_mode mode attribute with xtg_mode.
19911         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
19912         (concat_tg_mode): Remove mode attribute.
19914 2018-05-31  Martin Sebor  <msebor@redhat.com>
19916         PR c/82063
19917         * calls.c (alloc_max_size): Correct a logic error/typo.
19918         Treat excessive arguments as infinite.  Warn for invalid arguments.
19919         * doc/invoke.texi (-Walloc-size-larger-than): Update.
19921 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
19923         PR target/85829
19924         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
19925         and movx for Haswell.
19927 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
19928             Cesar Philippidis  <cesar@codesourcery.com>
19930         PR middle-end/85879
19931         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
19932         when emitting error on private/firstprivate reductions.
19933         * omp-low.c (lower_omp_target): Avoid reference-type processing
19934         on pointers for firstprivate clause.
19936 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
19938         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
19939         (st1x2): Likewise.
19940         (st1x3): Likewise.
19941         * config/aarch64/aarch64-simd.md
19942         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
19943         (aarch64_ld1_x3_<mode>): Likewise
19944         (aarch64_st1x2<VALLDIF:mode>): Likewise
19945         (aarch64_st1_x2_<mode>): Likewise
19946         (aarch64_st1x3<VALLDIF:mode>): Likewise
19947         (aarch64_st1_x3_<mode>): Likewise
19948         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
19949         (vld1_s8_x3): Likewise.
19950         (vld1_u16_x3): Likewise.
19951         (vld1_s16_x3): Likewise.
19952         (vld1_u32_x3): Likewise.
19953         (vld1_s32_x3): Likewise.
19954         (vld1_u64_x3): Likewise.
19955         (vld1_s64_x3): Likewise.
19956         (vld1_f16_x3): Likewise.
19957         (vld1_f32_x3): Likewise.
19958         (vld1_f64_x3): Likewise.
19959         (vld1_p8_x3): Likewise.
19960         (vld1_p16_x3): Likewise.
19961         (vld1_p64_x3): Likewise.
19962         (vld1q_u8_x3): Likewise.
19963         (vld1q_s8_x3): Likewise.
19964         (vld1q_u16_x3): Likewise.
19965         (vld1q_s16_x3): Likewise.
19966         (vld1q_u32_x3): Likewise.
19967         (vld1q_s32_x3): Likewise.
19968         (vld1q_u64_x3): Likewise.
19969         (vld1q_s64_x3): Likewise.
19970         (vld1q_f16_x3): Likewise.
19971         (vld1q_f32_x3): Likewise.
19972         (vld1q_f64_x3): Likewise.
19973         (vld1q_p8_x3): Likewise.
19974         (vld1q_p16_x3): Likewise.
19975         (vld1q_p64_x3): Likewise.
19976         (vst1_s64_x2): Likewise.
19977         (vst1_u64_x2): Likewise.
19978         (vst1_f64_x2): Likewise.
19979         (vst1_s8_x2): Likewise.
19980         (vst1_p8_x2): Likewise.
19981         (vst1_s16_x2): Likewise.
19982         (vst1_p16_x2): Likewise.
19983         (vst1_s32_x2): Likewise.
19984         (vst1_u8_x2): Likewise.
19985         (vst1_u16_x2): Likewise.
19986         (vst1_u32_x2): Likewise.
19987         (vst1_f16_x2): Likewise.
19988         (vst1_f32_x2): Likewise.
19989         (vst1_p64_x2): Likewise.
19990         (vst1q_s8_x2): Likewise.
19991         (vst1q_p8_x2): Likewise.
19992         (vst1q_s16_x2): Likewise.
19993         (vst1q_p16_x2): Likewise.
19994         (vst1q_s32_x2): Likewise.
19995         (vst1q_s64_x2): Likewise.
19996         (vst1q_u8_x2): Likewise.
19997         (vst1q_u16_x2): Likewise.
19998         (vst1q_u32_x2): Likewise.
19999         (vst1q_u64_x2): Likewise.
20000         (vst1q_f16_x2): Likewise.
20001         (vst1q_f32_x2): Likewise.
20002         (vst1q_f64_x2): Likewise.
20003         (vst1q_p64_x2): Likewise.
20004         (vst1_s64_x3): Likewise.
20005         (vst1_u64_x3): Likewise.
20006         (vst1_f64_x3): Likewise.
20007         (vst1_s8_x3): Likewise.
20008         (vst1_p8_x3): Likewise.
20009         (vst1_s16_x3): Likewise.
20010         (vst1_p16_x3): Likewise.
20011         (vst1_s32_x3): Likewise.
20012         (vst1_u8_x3): Likewise.
20013         (vst1_u16_x3): Likewise.
20014         (vst1_u32_x3): Likewise.
20015         (vst1_f16_x3): Likewise.
20016         (vst1_f32_x3): Likewise.
20017         (vst1_p64_x3): Likewise.
20018         (vst1q_s8_x3): Likewise.
20019         (vst1q_p8_x3): Likewise.
20020         (vst1q_s16_x3): Likewise.
20021         (vst1q_p16_x3): Likewise.
20022         (vst1q_s32_x3): Likewise.
20023         (vst1q_s64_x3): Likewise.
20024         (vst1q_u8_x3): Likewise.
20025         (vst1q_u16_x3): Likewise.
20026         (vst1q_u32_x3): Likewise.
20027         (vst1q_u64_x3): Likewise.
20028         (vst1q_f16_x3): Likewise.
20029         (vst1q_f32_x3): Likewise.
20030         (vst1q_f64_x3): Likewise.
20031         (vst1q_p64_x3): Likewise.
20033 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
20035         * config/msp430/msp430.c (msp430_output_labelref): Prepend
20036         user_label_prefix to name.
20038         * tree-core.h: Update comment about the format of NAME string
20039         passed to handler in attribute_spec.
20041         * config/msp430/msp430.md: Remove erroneous subreg expression from
20042         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
20043         zero_extend{q,h}isi2.
20045 2018-05-30  Borislav Petkov  <bp@suse.de>
20047         * doc/extend.texi: Document some architecture specific
20048         constraints and sort entries.
20050 2018-05-30  Martin Sebor  <msebor@redhat.com>
20052         PR middle-end/85369
20053         * builtins.c (expand_builtin_stpcpy_1): New function.
20054         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
20055         only if the former succeeds.
20057 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
20059         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
20060         in saphira.
20062 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
20064         * doc/invoke.texi (-flinker-output): Document
20066 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
20068         * passes.c (ipa_write_summaries): Only modify statements if body
20069         is in memory.
20070         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
20071         incrementally linking.
20072         (ipa_passes): Likewise.
20073         * lto-cgraph.c (lto_output_node): When incrementally linking do not
20074         pass down resolution info.
20075         * common.opt (flag_incremental_link): Update info.
20076         * gcc.c (plugin specs): Turn flinker-output=* to
20077         -plugin-opt=-linker-output-known
20078         * toplev.c (compile_file): Also cut compilation when doing incremental
20079         link.
20080         * flag-types. (enum lto_partition_model): Add
20081         LTO_LINKER_OUTPUT_NOLTOREL.
20082         (invoke.texi): Add -flinker-output docs.
20083         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
20084         link same way as WPA; do not stream in dead initializers.
20086         * dwarf2out.c (dwarf2out_die_ref_for_decl,
20087         darf2out_register_external_decl): Support incremental link.
20089 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
20091         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
20093 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
20095         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
20096         it down to simple_object_copy_lto_debug_sections.
20097         (run_gcc): Determine incremental LTO link time and configure
20098         lto1 into non-wpa mode, disable renaming of debug sections.
20100 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20102         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
20103         descriptions of various incorrectly documented functions.
20105 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
20107         Revert:
20108         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
20109         address check not strict.
20111 2018-05-30  Richard Biener  <rguenther@suse.de>
20113         PR tree-optimization/85964
20114         * tracer.c (better_p): Drop initialized count check, we only
20115         call the function with initialized counts now.
20116         (find_best_successor): Do find a best edge if one
20117         has uninitialized count.
20118         (find_best_predecessor): Likewise.  Do BB frequency check only
20119         if count is initialized.
20121 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
20123         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
20124         (aarch64_ldrstr_offset_compare): New.
20125         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
20126         load/store orderings.
20127         (aarch64_gen_adjusted_ldpstp): Likewise.
20129 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
20131         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
20132         Check for subset of GENERAL_REGS and FP_REGS.
20133         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
20134         r=w alternative.
20136 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
20138         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
20139         and wi::to_poly_offset.  Add the current offset and then check
20140         whether the sum fits, rather than using an unchecked addition of
20141         a checked term.  Check for a shwi rather than a uhwi.
20142         * expr.c (get_bit_range): Use tree_to_poly_uint64.
20143         (store_constructor): Use poly_int_tree_p.
20144         (expand_expr_real_1): Likewise.
20145         * function.c (assign_temp): Likewise.
20146         * fold-const.c (const_binop): Use poly_int_tree_p and
20147         wi::to_poly_offset.
20148         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
20149         division.
20150         * ipa-icf-gimple.c (func_checker::compare_operand): Use
20151         to_poly_offset for MEM offsets.
20152         * ipa-icf.c (sem_variable::equals): Likewise.
20153         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
20154         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
20155         wi::to_poly_offset for BIT_FIELD_REF offsets.
20156         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
20157         wi::to_poly_offset.
20158         * var-tracking.c (emit_note_insn_var_location): Use
20159         tree_to_poly_uint64.
20161 2018-05-29  Jim Wilson  <jimw@sifive.com>
20163         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
20165 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
20167         PR target/85950
20168         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
20169         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
20170         sequence.
20171         (sse4_1_round<mode>2): Use nonimmediate_operand
20172         for operand 1 predicate.
20174 2018-05-29  Martin Sebor  <msebor@redhat.com>
20175             Richard Biener  <rguenther@suse.de>
20177         PR testsuite/85888
20178         * calls.c (get_size_range): Call determine_value_range instead
20179         of get_value_range..
20180         * tree-vrp.h (determine_value_range): Declared new function.
20181         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
20183 2018-05-29  Richard Biener  <rguenther@suse.de>
20185         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
20186         sure to use non-pattern stmts for get_earlier_stmt arguments.
20187         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
20188         called on pattern stmts.
20189         (get_later_stmt): Likewise.
20191 2018-05-29  Martin Liska  <mliska@suse.cz>
20193         PR gcov-profile/85759
20194         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
20195         env variables.
20197 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
20199         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
20200         VEC_UNPACK_*_EXPR.
20201         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
20202         VEC_PACK_*_EXPR.
20204         PR target/85918
20205         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
20206         VEC_PACK_FLOAT_EXPR): New tree codes.
20207         * tree-pretty-print.c (op_code_prio): Handle
20208         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
20209         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
20210         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
20211         * tree-inline.c (estimate_operator_cost): Likewise.
20212         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
20213         * fold-const.c (const_binop): Likewise.
20214         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
20215         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
20216         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
20217         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
20218         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
20219         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
20220         * expr.c (expand_expr_real_2): Likewise.
20221         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
20222         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
20223         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
20224         optabs.
20225         * optabs.c (expand_widen_pattern_expr): For
20226         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
20227         sign from result type rather than operand's type.
20228         (expand_binop_directly): For vec_packu_float_optab and
20229         vec_packs_float_optab allow result type to be different from operand's
20230         type.
20231         * optabs-tree.c (optab_for_tree_code): Handle
20232         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
20233         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
20234         * tree-vect-generic.c (expand_vector_operations_1):  Handle
20235         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
20236         VEC_PACK_FLOAT_EXPR.
20237         * tree-vect-stmts.c (supportable_widening_operation): Handle
20238         FIX_TRUNC_EXPR.
20239         (supportable_narrowing_operation): Handle FLOAT_EXPR.
20240         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
20241         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
20242         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
20243         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
20244         mode attributes.
20245         (vec_pack<floatprefix>_float_<mode>): New expander.
20246         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
20247         attributes.
20248         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
20249         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
20250         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
20251         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
20252         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
20253         Document.
20254         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
20255         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
20256         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
20257         VEC_PACK_FLOAT_EXPR): Document.
20259 2018-05-29  Richard Biener  <rguenther@suse.de>
20261         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
20262         member.
20263         (stmt_vec_info_vec): Make pointer.
20264         (init_stmt_vec_info_vec): Remove.
20265         (free_stmt_vec_info_vec): Likewise.
20266         (set_stmt_vec_info_vec): New function.
20267         (free_stmt_vec_infos): Likewise.
20268         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
20269         (set_vinfo_for_stmt): Likewise.
20270         (get_earlier_stmt): Likewise.
20271         (get_later_stmt): Likewise.
20272         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
20273         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
20274         (vec_info::~vec_info): Free stmt_vec_infos.
20275         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
20276         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
20277         (pass_slp_vectorize::execute): Likewise.
20278         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
20279         (free_stmt_vec_info_vec): Likewise.
20280         (set_stmt_vec_info_vec): New function.
20281         (free_stmt_vec_infos): Likewise.
20282         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
20283         the global stmt_vec_info_vec.
20284         * tree-parloops.c (gather_scalar_reductions): Use
20285         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
20286         vector.
20288 2018-05-29  Richard Biener  <rguenther@suse.de>
20290         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
20292 2018-05-29  Martin Liska  <mliska@suse.cz>
20293             David Malcolm  <dmalcolm@redhat.com>
20295         * vec.c (test_reverse): New.
20296         (vec_c_tests): Add new test.
20297         * vec.h (vl_ptr>::reverse): New function.
20299 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
20301         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
20303         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
20304         and later.
20306 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
20308         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
20310 2018-05-28  Richard Biener  <rguenther@suse.de>
20312         PR tree-optimization/85933
20313         * tree-vect-data-refs.c (vect_record_base_alignments): Only
20314         look at stmts marked as vectorizable.
20316 2018-05-28  Richard Biener  <rguenther@suse.de>
20318         PR tree-optimization/85934
20319         * tree-vect-generic.c (expand_vector_operations_1): Hoist
20320         vector boolean check before scalar optimization.
20322 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
20324         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
20325         for armv5te.
20327 2018-05-28  Mark Wielaard  <mark@klomp.org>
20329         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
20330         if it is an expression containing a minus sign.
20332 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
20334         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
20336 2018-05-27  Paul Koning  <ni1d@arrl.net>
20338         * config/pdp11/pdp11.md (truncsihi2): Remove.
20340 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
20341             Chung-Ju Wu  <jasonwucj@gmail.com>
20343         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
20344         implementation.
20345         (unaligned_store_dw): Ditto.
20346         * config/nds32/nds32-memory-manipulation.c
20347         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
20348         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
20349         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
20350         (emit_setmem_word_loop): Rename to ...
20351         (emit_setmem_doubleword_loop): ... this.
20352         (nds32_gen_dup_4_byte_to_word_value): New function.
20353         (nds32_gen_dup_8_byte_to_double_word_value): New function.
20354         (nds32_expand_setmem_loop): Refine implementation.
20355         (nds32_expand_setmem_loop_v3m): Ditto.
20356         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
20357         pattern.
20359 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
20361         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
20363 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
20365         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
20366         (nds32_init_machine_status): Initialize machine->attr_naked_p and
20367         machine->attr_no_prologue_p.
20368         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
20369         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
20370         (nds32_expand_epilogue): Consider attr_naked_p.
20371         (nds32_expand_epilogue_v3pop): Likewise.
20372         (nds32_can_use_return_insn): Likewise.
20373         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
20374         attr_no_prologue_p fields.
20375         * config/nds32/nds32.opt (mret-in-naked-func): New option.
20377 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
20379         PR target/85918
20380         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
20381         attributes.
20382         * config/i386/sse.md
20383         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
20384         Rename to ...
20385         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
20386         ... this.
20387         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
20388         Rename to ...
20389         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
20390         ... this.
20391         (*<floatsuffix>floatv2div2sf2): Rename to ...
20392         (*float<floatunssuffix>v2div2sf2): ... this.
20393         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
20394         (float<floatunssuffix>v2div2sf2_mask): ... this.
20395         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
20396         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
20397         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
20398         to ...
20399         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
20400         ... this.
20401         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
20402         Rename to ...
20403         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
20404         ... this.
20405         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
20406         Rename to ...
20407         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
20408         ... this.
20409         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
20410         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
20411         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
20412         gen_ufix_truncv8dfv8si2.
20413         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
20414         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
20415         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
20416         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
20417         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
20418         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
20419         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
20420         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
20422 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
20424         PR target/85900
20425         PR target/85345
20426         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
20428 2018-05-25  Jim Wilson  <jimw@sifive.com>
20430         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
20431         * config/riscv/riscv.c (struct machine_function): Add
20432         interrupt_handler_p and attribute_checked_p fields.
20433         (riscv_attribute_table): Add interrupt.
20434         (riscv_interrupt_type_p): New.
20435         (riscv_save_reg_p): Save extra regs for interrupt handler.
20436         (riscv_use_save_libcall): Return false  for interrupt handler.
20437         (riscv_first_stack_step): Add forward declaration.
20438         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
20439         for interrupt handler with large frame.  Use it for saved reg list.
20440         (riscv_expand_prologue): Move flag_stack_usage_info support to
20441         eliminate duplication.
20442         (riscv_expand_epilogue): Generate mret for interrupt handler.
20443         (riscv_epilogue_uses): New.
20444         (riscv_can_use_return_insn): Return false for interrupt handler.
20445         (riscv_function_ok_for_sibcall): Likewise.
20446         (riscv_set_current_function): Add interrupt handler support.
20447         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
20448         * config/riscv/riscv.md (UNSPECV_MRET): New.
20449         (GP_REGNUM): New.
20450         (riscv_frflags, riscv_fsflags): Use tab after opcode.
20451         (riscv_mret): New.
20452         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
20454 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
20456         PR tree-optimization/85712
20457         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
20458         this candidate has already been replaced in-situ by a copy.
20460 2018-05-25  Jason Merrill  <jason@redhat.com>
20462         PR c++/80485 - inline function non-zero address.
20463         * symtab.c (nonzero_address): Check DECL_COMDAT.
20465 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
20467         PR target/83628
20468         * config/alpha/alpha.md (ashlsi3): New insn pattern.
20469         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
20470         extension of SImode operation.  Use const123_operand predicate.
20471         (*saddsi_1): Remove.
20472         (*saddl_se_1): Ditto.
20473         (*ssubsi_1): Ditto.
20474         (*ssubl_se_1): Ditto.
20475         * config/alpha/predicates.md (const123_operand): New predicate.
20476         * config/alpha/constraints.md (P): Use IN_RANGE.
20478 2018-05-25  Richard Biener  <rguenther@suse.de>
20480         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
20481         defaulted to true.
20482         (ref_maybe_used_by_stmt_p): Likewise.
20483         (stmt_may_clobber_ref_p): Likewise.
20484         (stmt_may_clobber_ref_p_1): Likewise.
20485         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
20486         and pass it along.
20487         (ref_maybe_used_by_stmt_p): Likewise.
20488         (stmt_may_clobber_ref_p): Likewise.
20489         (stmt_may_clobber_ref_p_1): Likewise.
20490         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
20491         the alias oracle to disambiguate DRs with stmts DR analysis
20492         couldn't handle.
20493         (vect_analyze_data_refs): Do not give up on not analyzable
20494         DRs for BB vectorization.  Remove code truncating the dataref
20495         vector.
20497 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
20499         PR target/85832
20500         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
20501         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
20502         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
20504 2018-05-25  Richard Biener  <rguenther@suse.de>
20506         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
20507         function, combining stmt data ref gathering and fatal analysis
20508         parts.
20509         (vect_analyze_data_refs): Remove now redudnant code and simplify.
20510         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
20511         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
20512         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
20513         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
20515 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
20517         PR tree-optimization/85720
20518         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
20519         SCC if all partitions are builtins.
20520         (version_loop_by_alias_check): New parameter.  Generate cancelable
20521         runtime alias check if all partitions are builtins.
20522         (distribute_loop): Update call to above function.
20524 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
20526         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
20527         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
20528         (parm_default_def_partition_arg): Ditto.
20529         (set_parm_default_def_partition): Ditto.
20530         (get_parm_default_def_partitions): Ditto and make it static.
20531         (get_undefined_value_partitions): Ditto and make it static.
20532         (remove_ssa_form): Refactor call to init_var_map here.
20533         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
20534         computation for loop region.
20535         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
20536         (register_default_def): Delete.
20537         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
20538         (parm_default_def_partition_arg): Ditto.
20539         (set_parm_default_def_partition): Ditto.
20540         (get_parm_default_def_partitions): Ditto and make it static.
20541         (get_undefined_value_partitions): Ditto and make it static.
20542         (coalesce_with_default, coalesce_with_default): Update comment.
20543         (create_coalesce_list_for_region): New func factored out from
20544         create_outofssa_var_map.
20545         (populate_coalesce_list_for_outofssa): New func factored out from
20546         create_outofssa_var_map and coalesce_ssa_name.
20547         (create_outofssa_var_map): Delete.
20548         (coalesce_ssa_name): Refactor to support live range computation.
20549         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
20550         (get_parm_default_def_partitions): Delete.
20551         (get_undefined_value_partitions): Ditto.
20552         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
20553         computation for loop region.
20554         (new_tree_live_info, loe_visit_block): Ditto.
20555         (live_worklist, set_var_live_on_entry): Ditto.
20556         (calculate_live_on_exit, verify_live_on_entry): Ditto.
20557         * tree-ssa-live.h (struct _var_map): New fields.
20558         (init_var_map): Change decl.
20559         (region_contains_p): New.
20561 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
20563         * tree-ssa-live.h (live_merge_and_clear): Delete.
20565 2018-05-25  Richard Biener  <rguenther@suse.de>
20567         PR c++/85912
20568         * tree-dump.c (dequeue_and_dump): Remove access to removed
20569         operand 2 of a SWITCH_EXPR.
20571 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
20573         * doc/sourcebuild.texi (vect_double_cond_arith): Include
20574         multiplication and division.
20575         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
20576         (cond_udiv@var{m}, cond_umod@var{m}): Document.
20577         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
20578         (cond_udiv_optab, cond_umod_optab): New optabs.
20579         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
20580         (IFN_COND_RDIV): New internal functions.
20581         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
20582         TRUNC_MOD_EXPR and RDIV_EXPR.
20583         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
20584         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
20585         New unspecs.
20586         (SVE_INT_BINARY): Include mult.
20587         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
20588         (optab, sve_int_op): Handle mult.
20589         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
20590         UNSPEC_COND_DIV.
20591         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
20592         for SVE_INT_BINARY_SD.
20594 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
20596         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
20597         (optab, sve_int_op): Handle div and udiv.
20598         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
20599         for SVE_INT_BINARY_SD.
20600         (*<optab><mode>3): New insn for the same.
20602 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
20604         * tree-vect-patterns.c: Include predict.h.
20605         (vect_recog_divmod_pattern): Restrict check for division support
20606         to when optimizing for size.
20608 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
20610         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
20611         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
20612         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
20613         (gimple_match_op::set_op): Likewise.
20614         (gimple_resimplify4): Declare.
20615         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
20616         (expr::gen_transform): Likewise.
20617         (decision_tree::gen): Generate a simplification routine for 4 operands.
20618         * gimple-match-head.c (gimple_simplify): Add an overload for
20619         4 operands.  In the top-level function, handle up to 4 call
20620         arguments and call gimple_resimplify4.
20621         (gimple_resimplify4): New function.
20622         (build_call_internal): Pass a fourth operand.
20623         (maybe_push_to_seq): Likewise.
20624         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
20625         Fold VEC_COND_EXPRs of an operation and a default value into
20626         an IFN_COND_* function if possible.
20627         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
20628         New unspecs.
20629         (SVE_COND_FP_BINARY): Include them.
20630         (optab, sve_fp_op): Handle them.
20631         (SVE_INT_BINARY_REV): New code iterator.
20632         (SVE_COND_FP_BINARY_REV): New int iterator.
20633         (commutative): New int attribute.
20634         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
20635         Declare.
20636         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
20637         function.
20638         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
20639         (*cond_<optab><mode>): New patterns for reversed operands.
20641 2018-05-25  Richard Biener  <rguenther@suse.de>
20643         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
20644         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
20645         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
20646         (STMT_VINFO_GROUPED_ACCESS): Adjust.
20647         * tree-vect-data-refs.c (everywhere): Adjust users.
20648         * tree-vect-loop.c (everywhere): Likewise.
20649         * tree-vect-slp.c (everywhere): Likewise.
20650         * tree-vect-stmts.c (everywhere): Likewise.
20651         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
20653 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20655         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
20656         Rename to...
20657         (gcc_cv_as_section_exclude): ... this.
20658         Try Solaris as #exclude syntax.
20659         * configure: Regenerate.
20660         * config.in: Regenerate.
20661         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
20662         SECTION_EXCLUDE.
20663         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
20664         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
20666         * varasm.c (default_elf_asm_named_section): Don't check if
20667         HAVE_GAS_SECTION_EXCLUDE is defined.
20669 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
20671         * doc/md.texi: Update the documentation of the cond_* optabs
20672         to mention the new final operand.  Fix GET_MODE_NUNITS call.
20673         Describe the scalar case too.
20674         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
20675         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
20676         instead of 2.
20677         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
20678         (get_conditional_internal_fn): Update comment.
20679         * tree-vect-loop.c (vectorizable_reduction): Pass the original
20680         accumulator value as a final argument to conditional functions.
20681         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
20682         a define_expand and add an "else" operand.  Assert for now that
20683         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
20684         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
20685         (*cond_<optab><mode>): New patterns.
20686         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
20687         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
20688         (UNSPEC_COND_EOR): Delete.
20689         (optab): Remove associated mappings.
20690         (SVE_INT_BINARY): New code iterator.
20691         (sve_int_op): Remove int attribute and add "minus" to the code
20692         attribute.
20693         (SVE_COND_INT_OP): Delete.
20694         (SVE_COND_FP_OP): Rename to...
20695         (SVE_COND_FP_BINARY): ...this.
20697 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
20699         * optabs.c (can_reuse_operands_p): New function.
20700         (maybe_legitimize_operands): Try to reuse the results for
20701         earlier operands.
20703 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
20705         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
20706         Add {q} suffix to insn mnemonic.
20708 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
20710         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
20711         (msp430_warn_func_return): New.
20713 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
20715         * fold-const.c (tree_nonzero_bits): New function.
20716         * fold-const.h (tree_nonzero_bits): Likewise.
20717         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
20718         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
20720 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
20722         PR target/85900
20723         PR target/85345
20724         * varasm.c (assemble_alias): Check ifunc_resolver only on
20725         FUNCTION_DECL.
20727 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
20729         PR target/85903
20730         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
20731         when memory input operand is handled.
20733 2018-05-24  Luis Machado  <luis.machado@linaro.org>
20735         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
20736         global.
20737         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
20739 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
20741         * match.pd: Delay FMA folds until after vectorization.
20743 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
20745         PR target/83009
20746         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
20747         address check not strict.
20749 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
20751         * gimple-match.h (gimple_match_op): New class.
20752         (mprts_hook): Replace parameters with a gimple_match_op *.
20753         (maybe_build_generic_op): Likewise.
20754         (gimple_simplified_result_is_gimple_val): Replace parameters with
20755         a const gimple_match_op *.
20756         (gimple_simplify): Replace code_helper * and tree * parameters with
20757         a gimple_match_op * parameter.
20758         (gimple_resimplify1): Replace code_helper *, tree and tree *
20759         parameters with a gimple_match_op * parameter.
20760         (gimple_resimplify2): Likewise.
20761         (gimple_resimplify3): Likewise.
20762         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
20763         parameters with a gimple_match_op * parameter.
20764         * gimple-match-head.c (gimple_simplify): Change prototypes of
20765         auto-generated functions to take a gimple_match_op * instead of
20766         separate code_helper * and tree * parameters.  Make the same
20767         change in the top-level overload and update calls to the
20768         gimple_resimplify routines.  Update calls to the auto-generated
20769         functions and to maybe_push_res_to_seq in the publicly-facing
20770         operation-specific gimple_simplify overloads.
20771         (gimple_match_op::MAX_NUM_OPS): Define.
20772         (gimple_resimplify1): Replace rcode and ops with a single res_op
20773         parameter.  Update call to gimple_simplify.
20774         (gimple_resimplify2): Likewise.
20775         (gimple_resimplify3): Likewise.
20776         (mprts_hook): Replace parameters with a gimple_match_op *.
20777         (maybe_build_generic_op): Likewise.
20778         (build_call_internal): Replace type, nargs and ops with
20779         a gimple_match_op *.
20780         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
20781         with a single gimple_match_op *.  Update calls to mprts_hook,
20782         build_call_internal and gimple_simplified_result_is_gimple_val.
20783         Factor out code that is common to the tree_code and combined_fn cases.
20784         * genmatch.c (expr::gen_transform): Replace tem_code and
20785         tem_ops with a gimple_match_op called tem_op.  Update calls
20786         to the gimple_resimplify functions and maybe_push_res_to_seq.
20787         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
20788         res_ops.  Update call to the gimple_resimplify functions.
20789         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
20790         (decision_tree::gen): Make the functions take a gimple_match_op *
20791         called res_op instead of separate res_code and res_ops parameters.
20792         Update call accordingly.
20793         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
20794         and ops with a single res_op parameter.  Update calls to
20795         maybe_build_generic_op and maybe_push_res_to_seq.
20796         (fold_stmt_1): Update calls to gimple_simplify and
20797         replace_stmt_with_simplification.
20798         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
20799         and gimple_simplified_result_is_gimple_val.
20800         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
20801         gimple_simplify.
20802         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
20803         with a gimple_match_op *.
20804         (vn_nary_build_or_lookup): Likewise.  Update call to
20805         vn_nary_build_or_lookup_1.
20806         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
20807         gimple_match_op *.  Update calls to the gimple_resimplify routines
20808         and to gimple_simplified_result_is_gimple_val.
20809         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
20810         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
20811         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
20812         (visit_nary_op): Likewise.
20813         (visit_reference_op_load): Likewise.
20815 2018-05-23  Luis Machado  <luis.machado@linaro.org>
20817         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
20818         modifier for printing the step amount.
20820 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
20822         PR target/78849
20823         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
20824         types.
20826 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
20828         * doc/sourcebuild.texi (Endianness): New subsubsection.
20830 2018-05-23  Luis Machado  <luis.machado@linaro.org>
20832         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20833         <prefetch_dynamic_strides>: New const bool field.
20834         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20835         prefetch_dynamic_strides.
20836         (exynosm1_prefetch_tune): Likewise.
20837         (thunderxt88_prefetch_tune): Likewise.
20838         (thunderx_prefetch_tune): Likewise.
20839         (thunderx2t99_prefetch_tune): Likewise.
20840         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
20841         false.
20842         (aarch64_override_options_internal): Update to set
20843         PARAM_PREFETCH_DYNAMIC_STRIDES.
20844         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
20845         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
20846         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
20847         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
20848         prefetch-dynamic-strides setting.
20850 2018-05-23  Luis Machado  <luis.machado@linaro.org>
20852         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20853         <minimum_stride>: New const int field.
20854         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20855         minimum_stride field defaulting to -1.
20856         (exynosm1_prefetch_tune): Likewise.
20857         (thunderxt88_prefetch_tune): Likewise.
20858         (thunderx_prefetch_tune): Likewise.
20859         (thunderx2t99_prefetch_tune): Likewise.
20860         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
20861         <default_opt_level>: Set to 3.
20862         (aarch64_override_options_internal): Update to set
20863         PARAM_PREFETCH_MINIMUM_STRIDE.
20864         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
20865         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
20866         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
20867         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
20868         stride is constant and is below the minimum stride threshold.
20870 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20872         * config/arm/arm-cpus.in (mode26): Delete.
20873         (armv4): Delete mode26 reference.
20874         * config/arm/arm.c (arm_configure_build_target): Delete use of
20875         isa_bit_mode26.
20877 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
20879         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
20880         New insn pattern.
20881         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
20882         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
20883         for non-SSE modes.
20884         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
20885         (floatunsdidf2): Ditto.
20887 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
20889         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
20890         (fixuns_trunc<mode>si2_avx512f): Ditto.
20891         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
20892         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
20893         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
20895 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
20897         PR rtl-optimization/79985
20898         * df-scan.c (df_insn_refs_collect): Remove special case for
20899         global registers and asm statements.
20901 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
20903         * extend.texi (Global Register Variables): Rewrite the bullet list.
20904         Note that the register is available for allocation. Note that access
20905         via inline asm must use constraints. Add note about async-signal
20906         handlers. Remove paragraph about automagic register selection.
20908 2018-05-23  Richard Biener  <rguenther@suse.de>
20910         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
20911         of fixed offset from memset VN.
20913 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
20915         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
20916         first_interp field.
20917         (alloc_cand_and_find_basis): Initialize first_interp field.
20918         (slsr_process_mul): Modify first_interp field.
20919         (slsr_process_add): Likewise.
20920         (slsr_process_cast): Modify first_interp field for each new
20921         interpretation.
20922         (slsr_process_copy): Likewise.
20923         (dump_candidate): Dump first_interp field.
20924         (replace_mult_candidate): Process all interpretations, not just
20925         subsequent ones.
20926         (replace_rhs_if_not_dup): Likewise.
20927         (replace_one_candidate): Likewise.
20929 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
20931         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
20932         Add new boolean.
20933         (aarch64_needs_frame_chain): New function.
20934         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
20936 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
20938         PR target/84882
20939         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
20940         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
20941         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
20942         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
20943         as true for strict-align.
20944         (aarch64_can_inline_p): Perform checks even when callee has no
20945         attributes to check for strict alignment.
20946         * doc/extend.texi (AArch64 Function Attributes): Document
20947         no-strict-align.
20948         * doc/invoke.texi: (AArch64 Options): Likewise.
20950 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
20952         PR tree-optimization/85853
20953         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
20954         the handling of the root of the node to...
20955         (vect_slp_analyze_node_operations_1): ...this new function,
20956         and run the whole thing with the child nodes' def types
20957         set according to their SLP node's def type.
20959 2018-05-23  Richard Biener  <rguenther@suse.de>
20961         PR middle-end/85874
20962         * tree-data-ref.c (create_runtime_alias_checks): Defer
20963         and ignore overflow warnings.
20965 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
20967         PR tree-optimization/85822
20968         * tree-vrp.c (is_masked_range_test): Fix handling of negative
20969         constants.
20971 2018-05-23  Richard Biener  <rguenther@suse.de>
20973         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
20974         memset constants via native_interpret_expr.
20976 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
20978         PR target/85345
20979         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
20980         attribute.
20981         (cgraph_node::create_alias): Likewise.
20982         (cgraph_node::get_availability): Check ifunc_resolver instead
20983         of looking up ifunc attribute.
20984         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
20985         * varasm.c (do_assemble_alias): Likewise.
20986         (assemble_alias): Likewise.
20987         (default_binds_local_p_3): Likewise.
20988         * cgraph.h (cgraph_node): Add ifunc_resolver.
20989         (cgraph_node::only_called_directly_or_aliased_p): Return false
20990         for IFUNC resolver.
20991         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
20992         attribute.
20993         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
20994         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
20995         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
20996         instead of looking up ifunc attribute.
20998 2018-05-22  Luis Machado  <luis.machado@linaro.org>
21000         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
21002 2018-05-22  Martin Sebor  <msebor@redhat.com>
21004         PR middle-end/85359
21005         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
21006         only when expasion succeeds.
21007         (expand_builtin_strcmp): Same.
21008         (expand_builtin_strncmp): Same.
21010 2018-05-22  Martin Sebor  <msebor@redhat.com>
21012         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
21014 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
21015             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21017         * config/aarch64/aarch64-ldpstp.md: Replace uses of
21018         aarch64_mem_pair_operand with memory_operand and delete operand swapping
21019         code.
21020         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
21021         Add check for legitimate_address.
21022         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
21023         (aarch64_swap_ldrstr_operands): New.
21024         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
21025         Define prototype.
21027 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
21028             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21030         * config/aarch64/aarch64.md: New patterns to generate stp
21031         and ldp.
21032         (store_pair_sw, store_pair_dw): New patterns to generate stp for
21033         single words and double words.
21034         (load_pair_sw, load_pair_dw): Likewise.
21035         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
21036         Delete.
21037         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
21038         Delete.
21039         * config/aarch64/aarch64-ldpstp.md: Modify peephole
21040         for different mode ldpstp and add peephole for merged zero stores.
21041         Likewise for loads.
21042         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
21043         Add size check.
21044         (aarch64_gen_store_pair): Rename calls to match new patterns.
21045         (aarch64_gen_load_pair): Rename calls to match new patterns.
21046         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
21047         (load_pair<DREG:mode><DREG2:mode>): ... This.
21048         (store_pair<mode>): Rename to...
21049         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
21050         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
21051         New mode iterators.
21052         (V_INT_EQUIV): Handle SImode.
21053         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
21054         New predicate.
21056 2018-05-22  Martin Sebor  <msebor@redhat.com>
21058         PR c/85623
21059         * calls.c (maybe_warn_nonstring_arg): Use string length to set
21060         or ajust the presumed bound on an operation to avoid unnecessary
21061         warnings.
21063 2018-05-22  Martin Sebor  <msebor@redhat.com>
21065         PR tree-optimization/85826
21066         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
21067         assuming that a DECL necesarily has a constant size.
21069 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
21071         PR middle-end/85862
21072         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
21074 2018-05-22  Richard Biener  <rguenther@suse.de>
21076         PR tree-optimization/85834
21077         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
21078         non-constant and non-zero memset arguments.
21080 2018-05-22  Martin Liska  <mliska@suse.cz>
21082         PR ipa/85607
21083         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
21085 2018-05-22  Richard Biener  <rguenther@suse.de>
21087         PR tree-optimization/85863
21088         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
21089         comparisons when vectype is specified.
21090         (vectorizable_condition): Do not specify vectype for
21091         vect_is_simple_cond when SLP vectorizing.
21093 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
21095         PR target/85657
21096         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
21097         define __ibm128 as long double.
21098         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
21099         as a distinct type when IEEE 128-bit support is enabled.
21100         (init_float128_ieee): Fix up conversions between IFmode and IEEE
21101         128-bit types to use the correct functions.
21102         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
21103         convert between 128-bit floating point types that have different
21104         modes but the same representation, instead of using gen_lowpart to
21105         makean alias.
21106         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
21107         KFmode.
21108         (IFKF_reg): New attributes to give the register constraints for
21109         IFmode and KFmode.
21110         (extend<mode>tf2_internal): New insns to mark an explicit
21111         conversion between 128-bit floating point types that have a
21112         different mode but share the same representation.
21114 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
21116         PR tree-optimization/85814
21117         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
21118         a null return from get_strinfo when unsharing the next
21119         strinfo in the chain.
21121 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
21123         PR gcc/84923
21124         * varasm.c (weak_finish): Clean up weak_decls.
21126 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21128         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
21129         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
21130         UNSPEC_UADALP values.
21131         * config/aarch64/iterators.md (ABAL): New int iterator.
21132         (ABDL2): Likewise.
21133         (ADALP): Likewise.
21134         (sur): Add mappings for the above.
21135         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
21136         New define_insn.
21137         (aarch64_<sur>abal<mode>_4): Likewise.
21138         (aarch64_<sur>adalp<mode>_3): Likewise.
21139         (<sur>sadv16qi): New define_expand.
21141 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
21143         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
21144         (*movdf_internal): Ditto.
21145         (*rcpsf2_sse): Ditto.
21146         (*rsqrtsf2_sse): Ditto.
21147         (*sqrt<mode>2_sse): Ditto.
21149 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
21151         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
21152         eor3q<mode>4.
21153         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
21154         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
21155         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
21156         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
21157         vbcaxq_s64): New.
21158         * config/aarch64/arm_neon.h: Likewise.
21159         * config/aarch64/iterators.md (VQ_I): New.
21161 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
21163         * config.gcc: Add arc/t-multilib-linux to tmake_file for
21164         arc*-*-linux*.
21165         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
21166         MULTILIB_DIRNAMES
21168 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
21170         * config/nds32/constraints.md (S): New constraint.
21171         * config/nds32/nds32.md (call_internal): Use constraint S.
21172         (call_value_internal): Likewise.
21173         (sibcall_internal): Likewise.
21174         (sibcall_value_internal): Likewise.
21176 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
21177             Chung-Ju Wu  <jasonwucj@gmail.com>
21179         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
21180         into consideration.
21182 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
21183             Chung-Ju Wu  <jasonwucj@gmail.com>
21185         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
21186         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
21187         (nds32_rtx_costs_impl): Simplify.
21188         (nds32_address_cost_impl): Simplify.
21189         (nds32_init_rtx_costs): New function.
21190         (nds32_rtx_costs_speed_prefer): Likewise.
21191         (nds32_rtx_costs_size_prefer): Likewise.
21192         (nds32_address_cost_speed_prefer): Likewise.
21193         (nds32_address_cost_speed_fwprop): Likewise.
21194         (nds32_address_cost_size_prefer): Likewise.
21195         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
21196         * config/nds32/nds32.c (nds32_option_override): Use
21197         nds32_init_rtx_costs function.
21199 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
21201         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
21202         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
21203         (TARGET_PIPELINE_N8): Likewise.
21204         (TARGET_PIPELINE_N10): Likewise.
21205         (TARGET_PIPELINE_N13): Likewise.
21206         (TARGET_PIPELINE_GRAYWOLF): Likewise.
21208 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
21210         * config/nds32/nds32-fpu.md: Update copyright year.
21212 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
21214         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
21216 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
21218         * config/nds32/nds32.c
21219         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
21220         * config/nds32/nds32.opt (minline-asm-r15): New option.
21222 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
21224         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
21225         MASK_HW_ABS.
21226         * config/nds32/nds32.md (abssi2): New pattern.
21228 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
21230         * config/i386/i386.md (rex64namesuffix): New mode attribute.
21231         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
21232         Merge insn pattern from sse_cvtsi2ss<round_name> and
21233         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
21234         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
21235         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
21236         using SWI48 mode iterator.
21237         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
21238         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
21239         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
21240         pattern from sse_cvttss2si<round_saeonly_name>
21241         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
21242         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
21243         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
21244         using SWI48 mode iterator.
21245         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
21246         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
21247         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
21248         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
21249         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
21250         using SWI48 mode iterator.
21251         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
21252         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
21253         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
21254         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
21255         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
21256         SWI48 mode iterator.
21257         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
21258         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
21259         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
21260         pattern from sse_cvttsd2si<round_saeonly_name>
21261         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
21263 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
21265         * config/nds32/nds32-md-auxiliary.c
21266         (nds32_valid_smw_lwm_base_p): Refine.
21267         (nds32_output_smw_single_word): Refine.
21268         (nds32_output_smw_double_word): New.
21269         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
21271 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
21273         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
21274         (nds32_output_stack_pop): Refine.
21275         (nds32_expand_unaligned_load): Refine.
21276         (nds32_expand_unaligned_store): Refine.
21278 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
21279             Chung-Ju Wu  <jasonwucj@gmail.com>
21281         * config/nds32/constants.md: Add TP_REGNUM constant.
21282         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
21283         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
21284         UNSPEC_ADD32.
21285         * config/nds32/nds32-doubleword.md: Consider flag_pic.
21286         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
21287         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
21288         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
21289         and PIC code generation.
21290         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
21291         code generation.
21292         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
21293         optimization.
21294         * config/nds32/nds32.md: Support TLS and PIC.
21295         * config/nds32/nds32.c: Support TLS and PIC.
21296         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
21297         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
21298         predicate.
21300 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
21302         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
21303         mode with E_ prefix.
21305 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
21306             Chung-Ju Wu  <jasonwucj@gmail.com>
21308         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
21309         * config/nds32/nds32-md-auxiliary.c
21310         (symbolic_reference_mentioned_p): New.
21311         (nds32_legitimize_ict_address): New.
21312         (nds32_expand_ict_move): New.
21313         (nds32_indirect_call_referenced_p): New.
21314         (nds32_symbol_binds_local_p): Delete.
21315         (nds32_long_call_p): Modify.
21316         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
21317         * config/nds32/nds32-protos.h
21318         (symbolic_reference_mentioned_p): Declare.
21319         (nds32_legitimize_ict_address): Declare.
21320         (nds32_expand_ict_move): Declare.
21321         (nds32_indirect_call_referenced_p): Declare.
21322         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
21323         (nds32_relax_group): Use nds32_ict_const_p as condition.
21324         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
21325         (nds32_asm_file_start): Output ict_model directive in asm code.
21326         (nds32_legitimate_address_p): Consider indirect call.
21327         (nds32_print_operand): Consider indirect call.
21328         (nds32_print_operand_address): Consider indirect call.
21329         (nds32_insert_attributes): Handle "indirect_call" attribute.
21330         (TARGET_LEGITIMATE_ADDRESS_P): Define.
21331         (TARGET_LEGITIMATE_CONSTANT_P): Define.
21332         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
21333         (TARGET_DELEGITIMIZE_ADDRESS): Define.
21334         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
21335         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
21336         (TARGET_ICT_MODEL_SMALL): Define.
21337         (TARGET_ICT_MODEL_LARGE): Define.
21338         * config/nds32/nds32.md (movsi): Consider ict model.
21339         (call, call_value): Consider ict model.
21340         (sibcall, sibcall_value): Consider ict model.
21341         * config/nds32/nds32.opt (mict-model): New option.
21342         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
21343         model.
21345 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
21346             Monk Chiang  <sh.chiang04@gmail.com>
21347             Jim Wilson <jimw@sifive.com>
21349         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
21350         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
21351         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
21352         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
21353         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
21354         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
21355         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
21356         compute save_libcall_adjustment properly.
21357         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
21358         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
21359         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
21360         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
21361         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
21362         (ABI_SPEC): Handle mabi=ilp32e.
21363         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
21364         (RVE): Add RVE mask.
21365         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
21366         <-march>: Add rv32e as an example.
21368 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
21370         PR c++/82899
21371         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
21372         (intra_create_variable_infos): Handle C++ constructors.
21374 2018-05-18  Martin Liska  <mliska@suse.cz>
21376         * passes.def: Remove a redundant pass.
21378 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
21380         PR bootstrap/85838
21381         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
21383 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21385         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
21386         (ARMv4): Update.
21387         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
21388         (ARMv6m): Update.
21389         (armv2, armv2a, armv3, armv3m): Delete architectures.
21390         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
21391         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
21392         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
21393         Delete cpus.
21394         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
21395         (*mulsidi3adddi): Likewise.
21396         (mulsidi3): Likewise.
21397         (*mulsidi3_nov6): Likewise.
21398         (umulsidi3): Likewise.
21399         (umulsidi3_nov6): Likewise.
21400         (umaddsidi4): Likewise.
21401         (*umulsidi3adddi): Likewise.
21402         (smulsi3_highpart): Likewise.
21403         (*smulsi3_highpart_nov6): Likewise.
21404         (umulsi3_highpart): Likewise.
21405         (*umulsi3_highpart_nov6): Likewise.
21406         * config/arm/arm.h (arm_arch3m): Delete.
21407         * config/arm/arm.c (arm_arch3m): Delete.
21408         (arm_option_override_internal): Update armv3-related comment.
21409         (arm_configure_build_target): Delete use of isa_bit_mode32.
21410         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
21411         (arm_rtx_costs_internal): Delete check of arm_arch3m.
21412         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
21413         (mulsa3): Likewise.
21414         (mulusa3): Likewise.
21415         * config/arm/arm-protos.h (arm_arch3m): Delete.
21416         * config/arm/arm-tables.opt: Regenerate.
21417         * config/arm/arm-tune.md: Likewise.
21418         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
21419         deleted architectures.
21421 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21423         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
21424         (armv5t, armv5te): New features.
21425         (ARMv5, ARMv5e): Delete fgroups.
21426         (ARMv5t, ARMv5te): Adjust for above changes.
21427         (ARMv6m): Likewise.
21428         (armv5, armv5e): Delete arches.
21429         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
21430         arm_arch5.
21431         (*call_reg_arm): Likewise.
21432         (*call_value_reg_armv5): Likewise.
21433         (*call_value_reg_arm): Likewise.
21434         (*call_symbol): Likewise.
21435         (*call_value_symbol): Likewise.
21436         (*sibcall_insn): Likewise.
21437         (*sibcall_value_insn): Likewise.
21438         (clzsi2): Likewise.
21439         (prefetch): Likewise.
21440         (define_split and define_peephole2 dependent on arm_arch5):
21441         Likewise.
21442         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
21443         arm_arch5e.
21444         (TARGET_ARM_QBIT): Likewise.
21445         (TARGET_DSP_MULTIPLY): Likewise.
21446         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
21447         (arm_arch5, arm_arch5e): Delete.
21448         (arm_arch5t, arm_arch5te): Declare.
21449         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
21450         (arm_arch5t): Declare.
21451         (arm_option_reconfigure_globals): Update for the above.
21452         (arm_options_perform_arch_sanity_checks): Update comment, replace
21453         use of arm_arch5 with arm_arch5t.
21454         (use_return_insn): Likewise.
21455         (arm_emit_call_insn): Likewise.
21456         (output_return_instruction): Likewise.
21457         (arm_final_prescan_insn): Likewise.
21458         (arm_coproc_builtin_available): Likewise.
21459         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
21460         arm_arch5e with arm_arch5t and arm_arch5te.
21461         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
21462         (arm_arch5t, arm_arch5te): Declare.
21463         * config/arm/arm-tables.opt: Regenerate.
21464         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
21465         * config/arm/t-multilib: Likewise.
21466         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
21467         instead of arm_arch5.
21468         (*call_reg_thumb1): Likewise.
21469         (*call_value_reg_thumb1_v5): Likewise.
21470         (*call_value_reg_thumb1): Likewise.
21471         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
21472         unreachable path.
21473         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
21475 2018-05-18  Martin Liska  <mliska@suse.cz>
21477         PR gcov-profile/84846
21478         * doc/gcov.texi: Document -t option of gcov tool.
21480 2018-05-18  Martin Liska  <mliska@suse.cz>
21482         PR gcov-profile/84846
21483         * gcov.c (print_usage): Add new -t option.
21484         (process_args): Handle the option.
21485         (generate_results): Use stdout as output when requested by
21486         the option.
21488 2018-05-18  Martin Liska  <mliska@suse.cz>
21490         PR gcov-profile/84846
21491         * coverage.c (coverage_init): Write PWD to .gcno file.
21492         * doc/gcov.texi: Document how working directory is printed.
21493         * gcov-dump.c (dump_gcov_file): Print PWD.
21494         * gcov.c (output_intermediate_file): Likewise.
21495         (read_graph_file): Read PWD string.
21496         (output_lines): Print PWD.
21498 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21500         PR middle-end/85817
21501         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
21502         for retval and return false if all args to phi are zero.
21504 2018-05-18  Richard Biener  <rguenther@suse.de>
21506         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
21507         method.
21508         (evrp_dom_walker::before_dom_children): Call it.
21510 2018-05-18  Richard Biener  <rguenther@suse.de>
21512         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
21513         results when processing array refs with variable index.
21515 2018-05-18  Toon Moene  <toon@moene.org>
21517         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
21518         directly after that of -floop-interchange. Indicate that both
21519         options are enabled by default when specifying -O3.
21521 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21523         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
21524         iterator.  Delete separate integer-mode vec_set<mode> expander.
21525         (aarch64_simd_vec_setv2di): Delete.
21526         (vec_setv2di): Delete.
21527         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
21528         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
21529         the "w, r" alternative.
21531 2018-05-18  Martin Liska  <mliska@suse.cz>
21533         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
21534         * tree-pass.h (make_pass_lower_switch_O0): New function.
21535         * tree-switch-conversion.c (node_has_low_bound): Remove.
21536         (node_has_high_bound): Likewise.
21537         (node_is_bounded): Likewise.
21538         (class pass_lower_switch): Make it a template type and create
21539         two instances.
21540         (pass_lower_switch::execute): Add template argument.
21541         (make_pass_lower_switch): New function.
21542         (make_pass_lower_switch_O0): New function.
21543         (do_jump_if_equal): Remove.
21544         (emit_case_nodes): Simplify to just handle all 3 cases and leave
21545         all the hard work to tree optimization passes.
21547 2018-05-18  Martin Liska  <mliska@suse.cz>
21549         * dbgcnt.c (limit_low): Renamed from limit.
21550         (limit_high): New variable.
21551         (dbg_cnt_is_enabled): Check for upper limit.
21552         (dbg_cnt): Adjust dumping.
21553         (dbg_cnt_set_limit_by_index): Add new argument for high
21554         value.
21555         (dbg_cnt_set_limit_by_name): Likewise.
21556         (dbg_cnt_process_single_pair): Parse new format.
21557         (dbg_cnt_process_opt): Use strtok.
21558         (dbg_cnt_list_all_counters): Remove 'value' and add
21559         'limit_high'.
21560         * doc/invoke.texi: Document changes.
21562 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
21564         * doc/sourcebuild.texi (scalar_all_fma): Document.
21565         * tree.def (FMA_EXPR): Delete.
21566         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
21567         * internal-fn.c (ternary_direct): New macro.
21568         (expand_ternary_optab_fn): Likewise.
21569         (direct_ternary_optab_supported_p): Likewise.
21570         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
21571         * builtins.c (fold_builtin_fma): Delete.
21572         (fold_builtin_3): Don't call it.
21573         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
21574         * expr.c (expand_expr_real_2): Likewise.
21575         * fold-const.c (operand_equal_p): Likewise.
21576         (fold_ternary_loc): Likewise.
21577         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
21578         * gimple.c (DEFTREECODE): Likewise.
21579         * gimplify.c (gimplify_expr): Likewise.
21580         * optabs-tree.c (optab_for_tree_code): Likewise.
21581         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
21582         * tree-eh.c (operation_could_trap_p): Likewise.
21583         (stmt_could_throw_1_p): Likewise.
21584         * tree-inline.c (estimate_operator_cost): Likewise.
21585         * tree-pretty-print.c (dump_generic_node): Likewise.
21586         (op_code_prio): Likewise.
21587         * tree-ssa-loop-im.c (stmt_cost): Likewise.
21588         * tree-ssa-operands.c (get_expr_operands): Likewise.
21589         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
21590         * fold-const-call.h (fold_fma): Delete.
21591         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
21592         CFN_FNMA and CFN_FNMS.
21593         (fold_fma): Delete.
21594         * genmatch.c (combined_fn): New enum.
21595         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
21596         (commutative_op): New function.
21597         (commutate): Use it.  Handle more than 2 operands.
21598         (dt_operand::gen_gimple_expr): Use commutative_op.
21599         (parser::parse_expr): Allow :c to be used with non-binary
21600         operators if the commutative operand is known.
21601         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
21602         CFN_FMS, CFN_FNMA and CFN_FNMS.
21603         (backprop::process_assign_use): Remove FMA_EXPR handling.
21604         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
21605         (gen_hsa_fma): New function.
21606         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
21607         IFN_FNMA and IFN_FNMS.
21608         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
21609         * gimple-fold.h (follow_all_ssa_edges): Declare.
21610         * gimple-fold.c (follow_all_ssa_edges): New function.
21611         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
21612         gimple_build interface and use follow_all_ssa_edges to fold the result.
21613         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
21614         instead of checking for optabs directly.
21615         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
21616         rather than FMA_EXPRs.
21617         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
21618         call to IFN_FMA instead of an FMA_EXPR.
21620 2018-05-17  Jim Wilson  <jimw@sifive.com>
21622         * expr.c (do_tablejump): When converting index to Pmode, if we have a
21623         sign extended promoted subreg, and the range does not have the sign bit
21624         set, then do a sign extend.
21626         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
21627         test, check for sign extended subreg and/or constant operands, and
21628         do a sign extend in that case.
21630 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
21632         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
21633         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
21634         Add untyped.
21635         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
21636         Change logics_shift_reg to logics_shift_imm.
21637         (thunderx2t99_fp_loadpair_basic): Delete.
21638         (thunderx2t99_fp_storepair_basic): Delete.
21639         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
21640         (thunderx2t99_asimd_polynomial): Delete.
21641         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
21642         and neon_fp_mul_d_scalar_q.
21643         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
21644         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
21645         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
21646         (thunderx2t99_asimd_lut): Add missing tbl types.
21647         (thunderx2t99_asimd_ext): Delete.
21648         (thunderx2t99_asimd_load1_1_mult): Delete.
21649         (thunderx2t99_asimd_load1_2_mult): Delete.
21650         (thunderx2t99_asimd_load1_ldp): New.
21651         (thunderx2t99_asimd_load1): New.
21652         (thunderx2t99_asimd_load2): Add missing *load2* types.
21653         (thunderx2t99_asimd_load3): New.
21654         (thunderx2t99_asimd_load4): New.
21655         (thunderx2t99_asimd_store1_1_mult): Delete.
21656         (thunderx2t99_asimd_store1_2_mult): Delete.
21657         (thunderx2t99_asimd_store2_mult): Delete.
21658         (thunderx2t99_asimd_store2_onelane): Delete.
21659         (thunderx2t99_asimd_store_stp): New.
21660         (thunderx2t99_asimd_store1): New.
21661         (thunderx2t99_asimd_store2): New.
21662         (thunderx2t99_asimd_store3): New.
21663         (thunderx2t99_asimd_store4): New.
21665 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
21667         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
21668         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
21670 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
21671             Segher Boessenkool  <segher@kernel.crashing.org>
21673         PR target/85698
21674         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
21675         operand.
21677 2018-05-17  Richard Biener  <rguenther@suse.de>
21679         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
21680         for pruning loop and prune defs feeding only already visited PHIs.
21682 2018-05-17  Richard Biener  <rguenther@suse.de>
21684         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
21686 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
21687             Richard Biener  <rguenther@suse.de>
21689         PR tree-optimization/85793
21690         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
21691         for VMAT_ELEMENTWISE.
21693 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
21695         * internal-fn.h (lookup_internal_fn): Declare
21696         * internal-fn.c (lookup_internal_fn): New function.
21697         * gimple.c (gimple_build_call_from_tree): Handle calls to
21698         internal functions.
21699         * gimple-pretty-print.c (dump_gimple_call): Print "." before
21700         internal function names.
21701         * tree-pretty-print.c (dump_generic_node): Likewise.
21702         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
21704 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
21706         * gimple-fold.h (gimple_build): Make the function forms take
21707         combined_fn rather than built_in_function.
21708         (gimple_simplify): Likewise.
21709         * gimple-match-head.c (gimple_simplify): Likewise.
21710         * gimple-fold.c (gimple_build): Likewise.
21711         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
21712         rather than gimple_build_call_internal.
21713         (get_initial_defs_for_reduction): Likewise.
21714         (vect_create_epilog_for_reduction): Likewise.
21715         (vectorizable_live_operation): Likewise.
21717 2018-05-17  Martin Liska  <mliska@suse.cz>
21719         * gimple-ssa-sprintf.c (format_directive): Do not use
21720         space in between 'G_' and '('.
21722 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
21724         PR target/85323
21725         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
21726         even if the mask is not all ones.
21728         PR target/85323
21729         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
21730         vector.
21731         (ix86_gimple_fold_builtin): Likewise.
21733         PR target/85323
21734         * config/i386/i386.c: Include tree-vector-builder.h.
21735         (ix86_vector_shift_count): New function.
21736         (ix86_fold_builtin): Fold shift builtins by scalar count.
21737         (ix86_gimple_fold_builtin): Likewise.
21739         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
21740         _mm512_setzero): New intrinsics.
21742 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
21743             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21745         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
21746         code generation for cases where splatting a value is not useful.
21747         * simplify-rtx.c (simplify_ternary_operation): Simplify
21748         vec_merge across a vec_duplicate and a paradoxical subreg forming
21749         a vector mode to a vec_concat.
21751 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
21753         * config.gcc: Support "goldmont-plus".
21754         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
21755         "goldmont-plus".
21756         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
21757         PROCESSOR_GOLDMONT_PLUS.
21758         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
21759         (processor_target_table): Add "goldmont-plus".
21760         (PTA_GOLDMONT_PLUS): Define.
21761         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
21762         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
21763         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
21764         (fold_builtin_cpu): Add "goldmont-plus".
21765         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
21766         (ix86_option_override_internal): Add "goldmont-plus".
21767         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
21768         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
21769         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
21770         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
21772 2018-05-17  Richard Biener  <rguenther@suse.de>
21774         PR tree-optimization/85757
21775         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
21776         remove defs that only feed that PHI from further processing.
21778 2018-05-16  Jim Wilson  <jimw@sifive.com>
21780         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
21781         asterisk to name.
21782         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
21784 2018-05-16  Mark Wielaard  <mark@klomp.org>
21786         * dwarf2out.c (count_index_strings): New function.
21787         (output_indirect_strings): Call count_index_strings and generate
21788         header for dwarf_version >= 5.
21790 2018-05-16  Mark Wielaard  <mark@klomp.org>
21792         * dwarf2out.c (dwarf_FORM): New function.
21793         (set_indirect_string): Use dwarf_FORM.
21794         (reset_indirect_string): Likewise.
21795         (size_of_die): Likewise.
21796         (value_format): Likewise.
21797         (output_die): Likewise.
21798         (add_skeleton_AT_string): Likewise.
21799         (output_macinfo_op): Likewise.
21800         (index_string): Likewise.
21801         (output_index_string_offset): Likewise.
21802         (output_index_string): Likewise.
21803         (count_index_strings): Likewise.
21805 2018-05-16  Carl Love  <cel@us.ibm.com>
21807         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
21808         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
21810 2018-05-16  Martin Jambor  <mjambor@suse.cz>
21812         * ipa-prop.c (ipa_free_all_edge_args): Remove.
21813         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
21815 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
21817         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
21818         (fnma<mode>4): Likewise.
21819         (fms<mode>4): Likewise.
21820         (fnms<mode>4): Likewise.
21821         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
21822         (aarch64_fnma<mode>4): Likewise.
21823         (aarch64_fms<mode>4): Likewise.
21824         (aarch64_fnms<mode>4): Likewise.
21825         (aarch64_fnmadd<mode>4): Likewise.
21827 2018-05-16  Jason Merrill  <jason@redhat.com>
21829         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
21831 2018-05-16  Richard Biener  <rguenther@suse.de>
21833         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
21834         (dump_stmt_cost): Declare.
21835         (add_stmt_cost): Dump cost we add.
21836         (add_stmt_costs): New function.
21837         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
21838         No longer exported.
21839         (vect_analyze_stmt): Adjust prototype.
21840         (vectorizable_condition): Likewise.
21841         (vectorizable_live_operation): Likewise.
21842         (vectorizable_reduction): Likewise.
21843         (vectorizable_induction): Likewise.
21844         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
21845         cost vector to pass to vectorizable_ and record afterwards.
21846         (vect_model_reduction_cost): Take cost vector argument and adjust.
21847         (vect_model_induction_cost): Likewise.
21848         (vectorizable_reduction): Likewise.
21849         (vectorizable_induction): Likewise.
21850         (vectorizable_live_operation): Likewise.
21851         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
21852         SLP_TREE_NUMBER_OF_VEC_STMTS.
21853         (vect_analyze_slp_cost_1): Remove.
21854         (vect_analyze_slp_cost): Likewise.
21855         (vect_slp_analyze_node_operations): Take visited args and
21856         a target cost vector.  Avoid processing already visited stmt sets.
21857         (vect_slp_analyze_operations): Use a local cost vector to gather
21858         costs and register those of non-discarded instances.
21859         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
21860         (vect_schedule_slp_instance): Remove copying of
21861         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
21862         zero.
21863         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
21864         adding cost.  Record cost entry location.
21865         (vect_prologue_cost_for_slp_op): Function to compute cost of
21866         a constant or invariant generated for SLP vect in the prologue,
21867         split out from vect_analyze_slp_cost_1.
21868         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
21869         (vect_model_promotion_demotion_cost): Likewise.
21870         (vect_model_store_cost): Likewise, make static.
21871         (vect_model_load_cost): Likewise.
21872         (vectorizable_bswap): Add cost vector arg and adjust.
21873         (vectorizable_call): Likewise.
21874         (vectorizable_simd_clone_call): Likewise.
21875         (vectorizable_conversion): Likewise.
21876         (vectorizable_assignment): Likewise.
21877         (vectorizable_shift): Likewise.
21878         (vectorizable_operation): Likewise.
21879         (vectorizable_store): Likewise.
21880         (vectorizable_load): Likewise.
21881         (vectorizable_condition): Likewise.
21882         (vectorizable_comparison): Likewise.
21883         (can_vectorize_live_stmts): Likewise.
21884         (vect_analyze_stmt): Likewise.
21885         (vect_transform_stmt): Adjust calls to vectorizable_*.
21886         * tree-vectorizer.c: Include gimple-pretty-print.h.
21887         (dump_stmt_cost): New function.
21889 2018-05-16  Richard Biener  <rguenther@suse.de>
21891         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
21892         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
21893         * tree-ssa-dse.c: Include tree-ssa-loop.h.
21894         (check_name): New callback.
21895         (dse_classify_store): Track cycles via a visited bitmap of PHI
21896         defs and simplify handling of in-loop and across loop dead stores
21897         and properly fail for loop-variant refs.  Handle byte-tracking with
21898         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
21899         limiting the walk.
21901 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
21903         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
21904         (vect_get_mask_type_for_stmt): Likewise.
21905         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
21906         split out from...
21907         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
21908         to determine the statement's vector type and the vector type that
21909         should be used for calculating nunits.  Deal with cases in which
21910         the type has to be deferred.
21911         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
21912         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
21913         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
21914         (vect_determine_vf_for_stmt): New functions, split out from...
21915         (vect_determine_vectorization_factor): ...here.
21916         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
21917         (vect_get_mask_type_for_stmt): New functions, split out from
21918         vect_determine_vectorization_factor.
21920 2018-05-16  Richard Biener  <rguenther@suse.de>
21922         * tree-cfg.c (verify_gimple_assign_ternary): Properly
21923         verify the [VEC_]COND_EXPR embedded comparison.
21925 2018-05-15  Martin Sebor  <msebor@redhat.com>
21927         PR tree-optimization/85753
21928         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
21929         RECORD_TYPE in addition to ARRAY_TYPE.
21931 2018-05-15  Martin Sebor  <msebor@redhat.com>
21933         PR middle-end/85643
21934         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
21936 2018-05-15  Richard Biener  <rguenther@suse.de>
21938         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
21939         add by_clobber_p one.  Change algorithm to collect all defs
21940         representing uses we need to walk and try reducing them to
21941         a single one before failing.
21942         (dse_dom_walker::dse_optimize_stmt): Adjust.
21944 2018-05-13  Mark Wielaard  <mark@klomp.org>
21946         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
21947         (size_of_loc_descr): Likewise.
21948         (output_loc_operands): Likewise.
21949         (output_loc_operands_raw): Likewise.
21950         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
21951         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
21952         (hash_loc_operands): Likewise.
21953         (compare_loc_operands): Likewise.
21955 2018-05-14  Mark Wielaard  <mark@klomp.org>
21957         * dwarf2out.c (count_index_addrs): New function.
21958         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
21960 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21962         PR tree-optimization/83648
21963         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
21964         return value as malloc candidate.
21966 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21968         PR ipa/85734
21969         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
21970         param as true in call to suggest_attribute.
21972 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
21974         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
21975         -mreadonly-in-sdata.
21977 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21979         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
21980         New pattern.
21981         (aarch64_crypto_aesd_fused): Likewise.
21983 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
21985         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
21986         (movsi_aarch64): Likewise.
21987         (load_pairsi): Likewise.
21988         (load_pairdi): Likewise.
21989         (store_pairsi): Likewise.
21990         (store_pairdi): Likewise.
21991         (load_pairsf): Likewise.
21992         (load_pairdf): Likewise.
21993         (store_pairsf): Likewise.
21994         (store_pairdf): Likewise.
21995         (zero_extend): Likewise.
21996         (trunc): Swap alternatives.
21997         (fcvt_target): Add '?' to prefer w over r.
21999 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
22001         PR target/85756
22002         * config/i386/i386.md: Disallow non-commutative arithmetics in
22003         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
22004         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
22005         in the peephole2 before it.
22007 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
22009         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
22010         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
22011         (ix86_handle_option): Handle -mcldemote.
22012         * config.gcc: New header.
22013         * config/i386/cldemoteintrin.h: New file.
22014         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
22015         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
22016         -mcldemote.
22017         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
22018         OPTION_MASK_ISA_CLDEMOTE.
22019         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
22020         (ix86_valid_target_attribute_inner_p): Ditto.
22021         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
22022         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
22023         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
22024         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
22025         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
22026         (cldemote): New.
22027         * config/i386/i386.opt: Add -mcldemote.
22028         * config/i386/x86intrin.h: New header.
22029         * doc/invoke.texi: Add -mcldemote.
22031 2018-05-14  Richard Biener  <rguenther@suse.de>
22033         * doc/match-and-simplify.texi: Adjust :s documentation.
22035 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
22037         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
22038         intended memcpy size.
22039         (REORDER_45): Likewise.
22041 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
22043         * sort.cc: New file.
22044         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
22045         * vec.c (qsort_chk): Use gcc_qsort.
22046         * Makefile.in (OBJS-libcommon): Add sort.o.
22047         (build/sort.o): New target.  Use it...
22048         (BUILD_RTL): ... here, and...
22049         (build/gencfn-macros): ... here, and...
22050         (build/genmatch): ... here.
22052 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
22053             Chung-Ju Wu  <jasonwucj@gmail.com>
22055         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
22056         * config/nds32/nds32-graywolf.md: New file.
22057         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
22058         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
22059         pipeline.
22060         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
22061         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
22062         * config/nds32/nds32.md (pipeline_model): Add graywolf.
22063         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
22064         * config/nds32/pipelines.md: Include n15 settings.
22066 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
22067             Chung-Ju Wu  <jasonwucj@gmail.com>
22069         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
22070         * config/nds32/nds32-n13.md: New file.
22071         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
22072         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
22073         pipeline.
22074         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
22075         * config/nds32/nds32.md (pipeline_model): Add n13.
22076         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
22077         * config/nds32/pipelines.md: Include n13 settings.
22079 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
22080             Chung-Ju Wu  <jasonwucj@gmail.com>
22082         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
22083         * config/nds32/nds32-n10.md: New file.
22084         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
22085         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
22086         pipeline.
22087         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
22088         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
22089         * config/nds32/nds32.md (pipeline_model): Add n10.
22090         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
22091         * config/nds32/pipelines.md: Include n10 settings.
22093 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
22094             Kito Cheng  <kito.cheng@gmail.com>
22095             Chung-Ju Wu  <jasonwucj@gmail.com>
22097         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
22098         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
22099         Add enum values for DSP extension instructions.
22100         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
22101         New constraints.
22102         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
22103         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
22104         New code iterators.
22105         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
22106         * config/nds32/nds32-dspext.md: New file for DSP implementation.
22107         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
22108         * config/nds32/nds32-intrinsic.md: Likewise.
22109         * config/nds32/nds32_intrinsic.h: Likewise.
22110         * config/nds32/nds32-md-auxiliary.c: Likewise.
22111         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
22112         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
22113         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
22114         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
22115         * config/nds32/nds32-protos.h: New declarations for DSP extension.
22116         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
22117         TYPE_DMAC in switch statement.
22118         * config/nds32/nds32.c: New checking and implementation for DSP
22119         extension instructions.
22120         * config/nds32/nds32.h: Likewise.
22121         * config/nds32/nds32.md: Likewise.
22122         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
22123         * config/nds32/predicates.md: Implement new predicates for DSP
22124         extension.
22126 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
22128         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
22129         Reformat alternatives and attributes so it is easier to identify
22130         which constraints/attributes go with which instruction.
22131         (mov<mode>_hardfloat32, FMOVE64): Likewise.
22132         (mov<mode>_softfloat32, FMOVE64): Likewise.
22133         (mov<mode>_hardfloat64, FMOVE64): Likewise.
22134         (mov<mode>_softfloat64, FMOVE64): Likewise.
22136 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
22138         * doc/extend.texi (PowerPC Built-in Functions): Rename this
22139         subsection.
22140         (Basic PowerPC Built-in Functions): The new name of the
22141         subsection previously known as "PowerPC Built-in Functions".
22142         (Basic PowerPC Built-in Functions Available on all Configurations):
22143         New subsubsection.
22144         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
22145         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
22146         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
22147         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
22149 2018-05-11  Martin Jambor  <mjambor@suse.cz>
22151         PR ipa/85655
22152         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
22153         single const.
22155 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
22157         PR target/85733
22158         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
22160 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
22162         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
22163         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
22164         (ix86_handle_option): Handle -mwaitpkg.
22165         * config.gcc: New header.
22166         * config/i386/cpuid.h (bit_WAITPKG): New bit.
22167         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
22168         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
22169         function type.
22170         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
22171         OPTION_MASK_ISA_WAITPKG.
22172         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
22173         (ix86_option_override_internal): Add PTA_WAITPKG.
22174         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
22175         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
22176         IX86_BUILTIN_TPAUSE.
22177         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
22178         __builtin_ia32_umwait and __builtin_ia32_tpause.
22179         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
22180         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
22181         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
22182         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
22183         UNSPECV_TPAUSE): New.
22184         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
22185         * config/i386/i386.opt: Add -mwaitpkg.
22186         * config/i386/waitpkgintrin.h: New file.
22187         * config/i386/x86intrin.h: New header.
22188         * doc/invoke.texi: Add -mwaitpkg.
22190 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
22192         PR target/85606
22193         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
22194         equivalent.
22195         (cortex-m0): Use armv6s-m isa.
22196         (cortex-m0plus): Likewise.
22197         (cortex-m1): Likewise.
22198         (cortex-m0.small-multiply): Likewise.
22199         (cortex-m0plus.small-multiply): Likewise.
22200         (cortex-m1.small-multiply): Likewise.
22202 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
22203             Jakub Jelinek  <jakub@redhat.com>
22205         PR tree-optimization/85692
22206         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
22207         source permute as well.
22209 2018-05-11  Martin Liska  <mliska@suse.cz>
22211         PR sanitizer/85556
22212         * doc/extend.texi: Document LLVM style format for no_sanitize
22213         attribute.
22215 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
22217         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
22218         mode_supports_vsx_dform_quad to mode_supports_dq_form.
22219         (mode_supports_vsx_dform_quad): Likewise.
22220         (mode_supports_vmx_dform): Move these functions to be next to the
22221         other mode_supports functions.
22222         (mode_supports_dq_form): Likewise.
22223         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
22224         mode_supports_dq_form.
22225         (reg_offset_addressing_ok_p): Likewise.
22226         (offsettable_ok_by_alignment): Likewise.
22227         (rs6000_legitimate_offset_address_p): Likewise.
22228         (legitimate_lo_sum_address_p): Likewise.
22229         (rs6000_legitimize_address): Likewise.
22230         (rs6000_legitimize_reload_address): Likewise.
22231         (rs6000_secondary_reload_inner): Likewise.
22232         (rs6000_preferred_reload_class): Likewise.
22233         (rs6000_output_move_128bit): Likewise.
22235 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
22237         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
22238         Generate SImode target register for null target.
22239         <case IX86_BUILTIN_XGETBV>: Ditto.
22240         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
22241         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
22243 2018-05-10  Carl Love  <cel@us.ibm.com>
22245         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
22246         dcbtt and dcbtstt if operands[2] is 0.
22248 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
22250         PR target/85693
22251         * config/i386/sse.md (usadv64qi): New expander.
22253 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
22255         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
22256         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
22257         -maltivec=be support.
22258         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
22259         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
22260         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
22261         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
22262         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
22263         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
22264         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
22265         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
22266         altivec_vsumsws): Adjust.
22267         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
22268         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
22269         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
22270         support.
22271         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
22272         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
22273         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
22274         (altivec_lve<VI_char>x): Delete expand.
22275         (*altivec_lve<VI_char>x_internal): Rename to...
22276         (altivec_lve<VI_char>x): ... this.
22277         (altivec_lvxl_<mode>): Delete expand.
22278         (*altivec_lvxl_<mode>_internal): Rename to ...
22279         (altivec_lvxl_<mode>): ... this.
22280         (altivec_stvxl_<mode>): Delete expand.
22281         (*altivec_stvxl_<mode>_internal): Rename to ...
22282         (altivec_stvxl_<mode>): ... this.
22283         (altivec_stve<VI_char>x): Delete expand.
22284         (*altivec_stve<VI_char>x_internal): Rename to ...
22285         (altivec_stve<VI_char>x): ... this.
22286         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
22287         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
22288         reduc_plus_scal_<mode>): Adjust.
22289         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
22290         comment.
22291         (rs6000_cpu_cpp_builtins): Adjust.
22292         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
22293         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
22294         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
22295         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
22296         -maltivec=be support.
22297         (rs6000_split_vec_extract_var): Adjust.
22298         (rs6000_split_v4si_init): Adjust.
22299         (swap_selector_for_mode): Delete.
22300         (altivec_expand_lvx_be, altivec_expand_stvx_be,
22301         altivec_expand_stvex_be): Delete.
22302         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
22303         -maltivec=be support.
22304         (rs6000_gimple_fold_builtin): Ditto.
22305         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
22306         Adjust.
22307         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
22308         (TARGET_DIRECT_MOVE_64BIT): Adjust.
22309         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
22310         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
22311         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
22312         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
22313         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
22314         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
22315         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
22316         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
22317         anonymous split): Adjust.
22318         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
22319         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
22321 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
22323         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
22324         when --with-gxx-include-dir is also specified.
22325         * configure: Regenerate.
22327 2018-05-09  Jim Wilson  <jimw@sifive.com>
22329         PR target/84797
22330         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
22331         * config/riscv/t-withmultilib: New.
22332         * config/riscv/withmultilib.h: New.
22333         * doc/install.texi: Document RISC-V --with-multilib-list support.
22335 2018-05-09  Richard Biener  <rguenther@suse.de>
22337         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
22338         vector.
22339         (vect_bb_vectorization_profitable_p): Adjust.  Compute
22340         actual scalar cost using the cost vector and the add_stmt_cost
22341         machinery.
22343 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
22345         PR rtl-optimization/85645
22346         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
22347         in the REG_CFA_REGISTER note for LR, don't leave it empty.
22349 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
22351         PR rtl-optimization/85645
22352         * shrink-wrap.c (spread_components): Return a boolean saying if
22353         anything was changed.
22354         (try_shrink_wrapping_separate): Iterate spread_components until
22355         nothing changes anymore.
22357 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
22359         PR rtl-optimization/85645
22360         * regrename.c (build_def_use): Also kill the chains that include the
22361         destination of a REG_CFA_REGISTER note.
22363 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
22365         PR rtl-optimization/85645
22366         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
22367         insn that has a REG_CFA_REGISTER note.
22369 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
22371         * cfgexpand.c (expand_clobber): New function.
22372         (expand_gimple_stmt_1): Use it.
22373         * tree-vect-stmts.c (vect_clobber_variable): New function,
22374         split out from...
22375         (vectorizable_simd_clone_call): ...here.
22376         (vectorizable_store): Emit a clobber either side of an
22377         IFN_STORE_LANES sequence.
22378         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
22380 2018-05-09  Tom de Vries  <tom@codesourcery.com>
22382         PR target/85626
22383         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
22384         (define_insn "trap_if_false"): Add exit after trap.
22386 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
22388         PR rtl-optimization/85638
22389         * bb-reorder.c: Include common/common-target.h.
22390         (create_forwarder_block): New function extracted from...
22391         (fix_up_crossing_landing_pad): ...here.  Rename into...
22392         (dw2_fix_up_crossing_landing_pad): ...this.
22393         (sjlj_fix_up_crossing_landing_pad): New function.
22394         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
22395         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
22396         from both partitions and exit the loop after one iteration.
22398 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
22400         Revert:
22401         * doc/extend.texi (PowerPC Built-in Functions): Rename this
22402         subsection.
22403         (Basic PowerPC Built-in Functions): The new name of the
22404         subsection previously known as "PowerPC Built-in Functions".
22405         (Basic PowerPC Built-in Functions Available on all Configurations):
22406         New subsubsection.
22407         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
22408         subsubsection.
22409         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
22410         subsubsection.
22411         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
22412         subsubsection.
22413         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
22414         subsubsection.
22416 2018-05-08  Jim Wilson  <jimw@sifive.com>
22418         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
22419         (LD_EMUL_SUFFIX): New.
22420         (LINK_SPEC): Use it.
22422 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
22424         * doc/extend.texi (PowerPC Built-in Functions): Rename this
22425         subsection.
22426         (Basic PowerPC Built-in Functions): The new name of the
22427         subsection previously known as "PowerPC Built-in Functions".
22428         (Basic PowerPC Built-in Functions Available on all Configurations):
22429         New subsubsection.
22430         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
22431         subsubsection.
22432         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
22433         subsubsection.
22434         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
22435         subsubsection.
22436         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
22437         subsubsection.
22439 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
22441         PR target/85683
22442         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
22443         after cmpelim optimization.
22445 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
22447         * config.gcc: Support "goldmont".
22448         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
22449         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
22450         PROCESSOR_GOLDMONT.
22451         * config/i386/i386.c (m_GOLDMONT): Define.
22452         (processor_target_table): Add "goldmont".
22453         (PTA_GOLDMONT): Define.
22454         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
22455         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
22456         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
22457         (fold_builtin_cpu): Add "goldmont".
22458         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
22459         (ix86_option_override_internal): Add "goldmont".
22460         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
22461         (processor_type): Add PROCESSOR_GOLDMONT.
22462         * config/i386/i386.md: Add CPU "glm".
22463         * config/i386/glm.md: New file.
22464         * config/i386/x86-tune.def: Add m_GOLDMONT.
22465         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
22467 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
22469         PR target/85572
22470         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
22471         E_V4DImode.
22472         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
22473         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
22474         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
22476         PR target/85317
22477         * config/i386/i386.c (ix86_fold_builtin): Handle
22478         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
22480         PR target/85480
22481         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
22482         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
22484 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
22486         PR target/85658
22487         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
22488         (check_arch): Likewise.
22489         (check_fpu): Return the result rather than printing it.
22490         (end arch): Fix operator precedence.
22491         (end cpu): Likewise.
22492         (END): Print the result from check_fpu.
22494 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
22495             Alan Hayward  <alan.hayward@arm.com>
22496             David Sherwood  <david.sherwood@arm.com>
22498         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
22499         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
22500         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
22501         (*fcmuo<mode>_and): New patterns.
22503 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
22505         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
22506         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
22507         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
22508         (cmp_op, sve_imm_con): New code attributes.
22509         (SVE_COND_INT_CMP, imm_con): Delete.
22510         (cmp_op): Remove above unspecs from int attribute.
22511         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
22512         to...
22513         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
22514         comparison-specific unspecs.
22515         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
22516         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
22517         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
22518         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
22519         (*vec_fcm<cmp_op><mode>): Rename to...
22520         (*fcm<cmp_op><mode>): ...this and adjust likewise.
22521         (*vec_fcmuo<mode>): Rename to...
22522         (*fcmuo<mode>): ...this and adjust likewise.
22523         (*pred_fcm<cmp_op><mode>): New pattern.
22524         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
22525         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
22526         functions.
22527         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
22528         and UNORDERED.
22529         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
22530         (aarch64_emit_sve_predicated_cond): New function.
22531         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
22532         (aarch64_emit_unspec_cond_or): Replace with...
22533         (aarch64_emit_sve_or_conds): ...this new function.  Use
22534         aarch64_emit_sve_ptrue_op for the individual comparisons and
22535         aarch64_emit_binop to OR them together.
22536         (aarch64_emit_inverted_unspec_cond): Replace with...
22537         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
22538         aarch64_emit_sve_ptrue_op for the comparison and
22539         aarch64_emit_unop to invert the result.
22540         (aarch64_expand_sve_vec_cmp_float): Update after the above
22541         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
22543 2018-05-07  Nathan Sidwell  <nathan@acm.org>
22545         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
22546         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
22547         (Backwards Compatibility): Likewise.
22549 2018-05-07  Luis Machado  <luis.machado@linaro.org>
22551         PR bootstrap/85681
22552         Revert:
22553         2018-05-07  Luis Machado  <luis.machado@linaro.org>
22555         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
22556         <prefetch_dynamic_strides>: New const bool field.
22557         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
22558         prefetch_dynamic_strides.
22559         (exynosm1_prefetch_tune): Likewise.
22560         (thunderxt88_prefetch_tune): Likewise.
22561         (thunderx_prefetch_tune): Likewise.
22562         (thunderx2t99_prefetch_tune): Likewise.
22563         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
22564         to false.
22565         (aarch64_override_options_internal): Update to set
22566         PARAM_PREFETCH_DYNAMIC_STRIDES.
22567         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
22568         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
22569         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
22570         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
22571         prefetch-dynamic-strides setting.
22573         2018-05-07  Luis Machado  <luis.machado@linaro.org>
22575         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
22576         <minimum_stride>: New const int field.
22577         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
22578         minimum_stride field.
22579         (exynosm1_prefetch_tune): Likewise.
22580         (thunderxt88_prefetch_tune): Likewise.
22581         (thunderx_prefetch_tune): Likewise.
22582         (thunderx2t99_prefetch_tune): Likewise.
22583         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
22584         (aarch64_override_options_internal): Update to set
22585         PARAM_PREFETCH_MINIMUM_STRIDE.
22586         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
22587         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
22588         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
22589         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
22590         stride is constant and is below the minimum stride threshold.
22592 2018-05-07  Luis Machado  <luis.machado@linaro.org>
22594         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
22595         to 512.
22597 2018-05-07  Luis Machado  <luis.machado@linaro.org>
22599         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
22600         <prefetch_dynamic_strides>: New const bool field.
22601         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
22602         prefetch_dynamic_strides.
22603         (exynosm1_prefetch_tune): Likewise.
22604         (thunderxt88_prefetch_tune): Likewise.
22605         (thunderx_prefetch_tune): Likewise.
22606         (thunderx2t99_prefetch_tune): Likewise.
22607         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
22608         to false.
22609         (aarch64_override_options_internal): Update to set
22610         PARAM_PREFETCH_DYNAMIC_STRIDES.
22611         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
22612         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
22613         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
22614         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
22615         prefetch-dynamic-strides setting.
22617 2018-05-07  Luis Machado  <luis.machado@linaro.org>
22619         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
22620         <minimum_stride>: New const int field.
22621         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
22622         minimum_stride field.
22623         (exynosm1_prefetch_tune): Likewise.
22624         (thunderxt88_prefetch_tune): Likewise.
22625         (thunderx_prefetch_tune): Likewise.
22626         (thunderx2t99_prefetch_tune): Likewise.
22627         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
22628         (aarch64_override_options_internal): Update to set
22629         PARAM_PREFETCH_MINIMUM_STRIDE.
22630         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
22631         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
22632         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
22633         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
22634         stride is constant and is below the minimum stride threshold.
22636 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
22638         PR c++/85659
22639         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
22640         the type is addressable.  Don't force op into register if it has
22641         BLKmode.
22643 2018-05-05  Roland McGrath  <mcgrathr@google.com>
22645         PR other/77609
22646         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
22647         any section for which we don't know a specific type it should have,
22648         regardless of name.  Previously this was done only for the exact
22649         names ".init_array", ".fini_array", and ".preinit_array".
22650         (default_elf_asm_named_section): Add comment about
22651         relationship with default_section_type_flags and SECTION_NOTYPE.
22652         (get_section): Don't consider it a type conflict if one side has
22653         SECTION_NOTYPE and the other doesn't, as long as neither has the
22654         SECTION_BSS et al used in the default_section_type_flags logic.
22656 2018-05-05  Tom de Vries  <tom@codesourcery.com>
22658         PR target/85653
22659         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
22660         (workaround_barsyncs): New function.
22661         (nvptx_reorg): Use workaround_barsyncs.
22662         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
22663         (define_expand "nvptx_membar_cta"): New define_expand.
22664         (define_insn "*nvptx_membar_cta"): New insn.
22666 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
22668         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
22669         To improve optimization opportunities.
22670         * builtin-types.def: The new needed builtin types for the above.
22672 2018-05-04  Richard Biener  <rguenther@suse.de>
22674         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
22675         * gimple-ssa-store-merging.c
22676         (imm_store_chain_info::output_merged_store): Remove redundant create,
22677         release split_store vector contents on failure.
22678         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
22679         scalar stmt vector on cache hit.
22681 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
22683         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
22684         Xilinx FP support.
22685         * config.gcc (powerpc-xilinx-eabi*): Remove.
22686         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
22687         support.
22688         (fusion_addis_mem_combo_load): Ditto.
22689         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
22690         FP support.
22691         (rs6000_cpu_cpp_builtins): Ditto.
22692         * config/rs6000/rs6000-linux.c
22693         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
22694         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
22695         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
22696         support.
22697         (rs6000_setup_reg_addr_masks): Ditto.
22698         (rs6000_init_hard_regno_mode_ok): Ditto.
22699         (rs6000_option_override_internal): Ditto.
22700         (legitimate_lo_sum_address_p): Ditto.
22701         (rs6000_legitimize_address): Ditto.
22702         (rs6000_legitimize_reload_address): Ditto.
22703         (rs6000_legitimate_address_p): Ditto.
22704         (abi_v4_pass_in_fpr): Ditto.
22705         (setup_incoming_varargs): Ditto.
22706         (rs6000_gimplify_va_arg): Ditto.
22707         (rs6000_split_multireg_move): Ditto.
22708         (rs6000_savres_strategy): Ditto.
22709         (rs6000_emit_prologue_components): Ditto.
22710         (rs6000_emit_epilogue_components): Ditto.
22711         (rs6000_emit_prologue): Ditto.
22712         (rs6000_emit_epilogue): Ditto.
22713         (rs6000_elf_file_end): Ditto.
22714         (rs6000_function_value): Ditto.
22715         (rs6000_libcall_value): Ditto.
22716         * config/rs6000/rs6000.h: Ditto.
22717         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
22718         (TARGET_MINMAX): ... this.  New.
22719         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
22720         * config/rs6000/rs6000.md: Remove Xilinx FP support.
22721         (*movsi_internal1_single): Delete.
22722         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
22723         mfpu=, mxilinx-fpu): Delete.
22724         * config/rs6000/singlefp.h: Delete.
22725         * config/rs6000/sysv4.h: Remove Xilinx FP support.
22726         * config/rs6000/t-rs6000: Ditto.
22727         * config/rs6000/t-xilinx: Delete.
22728         * config/rs6000/titan.md: Adjust for fp_type removal.
22729         * config/rs6000/vsx.md: Remove Xilinx FP support.
22730         (VStype_simple): Delete.
22731         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
22732         * config/rs6000/xfpu.h: Delete.
22733         * config/rs6000/xfpu.md: Delete.
22734         * config/rs6000/xilinx.h: Delete.
22735         * config/rs6000/xilinx.opt: Delete.
22736         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
22737         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
22739 2018-05-04  Tom de Vries  <tom@codesourcery.com>
22741         PR libgomp/85639
22742         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
22743         if ignore == 0.
22745 2018-05-04  Richard Biener  <rguenther@suse.de>
22747         PR middle-end/85627
22748         * tree-complex.c (update_complex_assignment): We are always in SSA form.
22749         (expand_complex_div_wide): Likewise.
22750         (expand_complex_operations_1): Likewise.
22751         (expand_complex_libcall): Preserve EH info of the original stmt.
22752         (tree_lower_complex): Handle removed blocks.
22753         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
22754         on complex multiplication and division libcall builtins.
22756 2018-05-04  Richard Biener  <rguenther@suse.de>
22758         PR middle-end/85574
22759         * fold-const.c (negate_expr_p): Restrict negation of operand
22760         zero of a division to when we know that can happen without
22761         overflow.
22762         (fold_negate_expr_1): Likewise.
22764 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
22766         PR libstdc++/85466
22767         * real.h (real_nextafter): Declare.
22768         * real.c (real_nextafter): New function.
22769         * fold-const-call.c (fold_const_nextafter): New function.
22770         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
22771         CASE_CFN_NEXTTOWARD.
22772         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
22773         even when arg1_mode is different from arg0_mode.
22775 2018-05-03  Nathan Sidwell  <nathan@acm.org>
22777         * doc/extend.texi (Deprecated Features): Remove
22778         -ffriend-injection.
22779         (Backwards Compatibility): Likewise.
22780         * doc/invoke.texi (C++ Language Options): Likewise.
22781         (C++ Dialect Options): Likewise.
22783 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
22785         PR target/85530
22786         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
22787         _mm512_mask_mullox_epi64): New intrinsics.
22789 2018-05-03  Tom de Vries  <tom@codesourcery.com>
22791         PR testsuite/85106
22792         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
22793         dump files): Add offload-tree.
22795 2018-05-03  Richard Biener  <rguenther@suse.de>
22797         PR tree-optimization/85615
22798         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
22799         to loops not nested in BBs loop father to avoid creating multi-entry
22800         loops.
22802 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22804         PR tree-optimization/70291
22805         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
22806         arguments.  Change return type to tree.  Emit libcall as a new
22807         statement rather than replacing existing one when inplace_p is true.
22808         (expand_complex_multiplication_components): New function.
22809         (expand_complex_multiplication): Expand floating-point complex
22810         multiplication using the above.
22811         (expand_complex_division): Rename inner_type parameter to type.
22812         Update expand_complex_libcall call-site.
22813         (expand_complex_operations_1): Update expand_complex_multiplication
22814         and expand_complex_division call-sites.
22816 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
22818         PR target/85582
22819         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
22820         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
22821         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
22822         the highest significant bit of the shift count mask is clear.  In
22823         check whether and[sq]i3 is needed verify that all significant bits
22824         of the shift count other than the highest are set.
22826 2018-05-02  Tom de Vries  <tom@codesourcery.com>
22828         PR libgomp/82428
22829         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
22830         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
22831         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
22832         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
22833         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
22834         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
22835         __builtin_goacc_parlevel_size.
22837 2018-05-02  Richard Biener  <rguenther@suse.de>
22839         PR tree-optimization/85597
22840         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
22841         do not use split vect_get_vec_defs call but call vect_get_slp_defs
22842         directly.
22844 2018-05-02  Tom de Vries  <tom@codesourcery.com>
22846         PR testsuite/85106
22847         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
22848         dump files): Add ltrans-tree.
22850 2018-05-02  Tom de Vries  <tom@codesourcery.com>
22852         PR testsuite/85106
22853         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
22854         dump files): Add wpa-ipa.
22856 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
22858         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
22859         powerpc*-*-linux*paired* target.
22860         * config/rs6000/750cl.h: Delete.
22861         * config/rs6000/paired.h: Delete.
22862         * config/rs6000/paired.md: Delete.
22863         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
22864         float support.
22865         * config/rs6000/rs6000-builtin.def: Remove paired float support.
22866         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
22867         comment.  Remove paired float support.
22868         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
22869         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
22870         VECTOR_PAIRED.
22871         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
22872         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
22873         declarations.
22874         * config/rs6000/rs6000.c: Remove paired float support.
22875         (paired_expand_vector_init, paired_expand_vector_move,
22876         paired_emit_vector_compare, paired_emit_vector_cond_expr,
22877         (paired_expand_lv_builtin, paired_expand_stv_builtin,
22878         paired_expand_builtin, paired_expand_predicate_builtin,
22879         paired_init_builtins): Delete.
22880         * config/rs6000/rs6000.h: Remove paired float support.
22881         * config/rs6000/rs6000.md: Remove paired float support.
22882         (move_from_CR_ov_bit): Delete.
22883         * config/rs6000/rs6000.opt (mpaired): Delete.
22884         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
22885         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
22887 2018-05-02  Richard Biener  <rguenther@suse.de>
22889         PR middle-end/85567
22890         * gimplify.c (gimplify_save_expr): When in SSA form allow
22891         SAVE_EXPRs to compute to SSA vars.
22893 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
22895         PR target/85582
22896         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
22897         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
22898         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
22899         clobber operands[2], instead use a new pseudo.  Formatting fixes.
22901 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
22903         PR tree-optimization/85586
22904         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
22905         exit early for statements in the same group if the accesses are
22906         not strided.
22908 2018-05-02  Tom de Vries  <tom@codesourcery.com>
22910         PR lto/85451
22911         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
22912         error message.
22914 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
22916         PR tree-optimization/85143
22917         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
22919 2018-05-01  Tom de Vries  <tom@codesourcery.com>
22921         PR lto/85451
22922         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
22923         not found" error message.
22925 2018-05-01  Tom de Vries  <tom@codesourcery.com>
22927         PR other/83786
22928         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
22929         * vec.c (test_ordered_remove_if): New function.
22930         (vec_c_tests): Call test_ordered_remove_if.
22931         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
22932         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
22933         * tree-vect-patterns.c (vect_pattern_recog_1): Use
22934         VEC_ORDERED_REMOVE_IF.
22936 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
22938         PR tree-optimization/82665
22939         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
22940         pointer subtraction where arguments come from a memchr call.
22942 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
22944         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
22945         --push-state --as-needed and --pop-state instead of --as-needed and
22946         --no-as-needed if ld supports it.
22947         * configure: Regenerated.
22949         PR web/85578
22950         * doc/install.texi2html: Replace _002d with - and _002a with * in
22951         generated html files using sed.
22953 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
22955         PR c++/85523
22956         * gcc-rich-location.c (blank_line_before_p): New function.
22957         (use_new_line): New function.
22958         (gcc_rich_location::add_fixit_insert_formatted): New function.
22959         * gcc-rich-location.h
22960         (gcc_rich_location::add_fixit_insert_formatted): New function.
22962 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
22964         * selftest.c (assert_streq): Rename "expected" and "actual" to
22965         "val1" and "val2".  Extend NULL-handling to cover both inputs
22966         symmetrically, while still requiring both to be non-NULL for a pass.
22967         * selftest.h (assert_streq): Rename "expected" and "actual" to
22968         "val1" and "val2".
22969         (ASSERT_EQ): Likewise.
22970         (ASSERT_EQ_AT): Likewise.
22971         (ASSERT_KNOWN_EQ): Likewise.
22972         (ASSERT_KNOWN_EQ_AT): Likewise.
22973         (ASSERT_NE): Likewise.
22974         (ASSERT_MAYBE_NE): Likewise.
22975         (ASSERT_MAYBE_NE_AT): Likewise.
22976         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
22977         the assertion to pass.
22978         (ASSERT_STREQ_AT): Likewise.
22980 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
22982         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
22983         interaction with -pie.
22985 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
22987         * selftest.h: Fix alphabetization of per-source-file selftest
22988         declarations.
22990 2018-04-30  Jason Merrill  <jason@redhat.com>
22992         PR c++/61982 - dead stores to destroyed objects.
22993         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
22994         of clobber.
22996 2018-04-30  Jason Merrill  <jason@redhat.com>
22998         * tree.c (build_clobber): New.
22999         * tree.h: Declare it.
23000         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
23002 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
23004         * diagnostic-show-locus.c (layout::layout): Update for
23005         location_get_source_line returning a char_span.
23006         (struct char_span): Move to input.h.
23007         (struct correction): Update for fields in char_span becoming
23008         private.
23009         (struct source_line): Update for location_get_source_line
23010         returning a char_span.
23011         (layout::print_line): Likewise.
23012         * edit-context.c (edited_file::print_content): Likewise.
23013         (edited_file::print_diff_hunk): Likewise.
23014         (edited_file::print_run_of_changed_lines): Likewise.
23015         (edited_file::get_num_lines): Likewise.
23016         (edited_line::edited_line): Likewise.
23017         * final.c (asm_show_source): Likewise.
23018         * input.c (location_get_source_line): Convert return type
23019         from const char * to char_span, losing the final "line_len"
23020         param.
23021         (dump_location_info): Update for the above.
23022         (get_substring_ranges_for_loc): Likewise.  Use a char_span
23023         when handling the literal within the line.
23024         (test_reading_source_line): Update for location_get_source_line
23025         returning a char_span.
23026         * input.h (class char_span): Move here from
23027         diagnostic-show-locus.c, converting from a struct to a class.
23028         Make data members private.
23029         (char_span::operator bool): New.
23030         (char_span::length): New.
23031         (char_span::get_buffer): New.
23032         (char_span::operator[]): New.
23033         (char_span::subspan): Make const.
23034         (char_span::xstrdup): New.
23035         (location_get_source_line): Convert return type from const char *
23036         to char_span, losing the final "line_size" param.
23038 2018-04-30  Jan Hubicka  <jh@suse.cz>
23040         * lto-wrapper.c (ltrans_priorities): New static var.
23041         (cmp_priority): New.
23042         (run_gcc): Read priorities and if doing parallel build order
23043         the Makefile by them.
23045 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
23047         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
23049 2018-04-30  Richard Biener  <rguenther@suse.de>
23051         * tree-cfg.c (verify_address): Remove base argument, add
23052         flag whether to check TREE_ADDRESSABLE and do that.
23053         (verify_expr): Remove.
23054         (verify_types_in_gimple_reference): Add pieces from verify_expr.
23055         (verify_gimple_assign_single): Likewise.
23056         (verify_gimple_switch): Likewise.
23057         (verify_expr_location_1): Dereference tp once.  Add (disabled)
23058         piece from verify_expr.
23059         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
23061 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
23063         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
23065 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
23067         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
23068         (small_data_pattern): Likewise.
23069         (arc_rewrite_small_data): Likewise.
23070         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
23071         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
23072         (get_symbol_alignment): New function.
23073         (legitimate_small_data_address_p): Likewise.
23074         (legitimate_scaled_address): Update, call
23075         legitimate_small_data_address_p.
23076         (output_sdata): New static variable.
23077         (arc_print_operand): Update how we handle small data operands.
23078         (arc_print_operand_address): Likewise.
23079         (arc_legitimate_address_p): Update, use
23080         legitimate_small_data_address_p.
23081         (arc_rewrite_small_data_p): Remove.
23082         (arc_rewrite_small_data_1): Likewise.
23083         (arc_rewrite_small_data): Likewise.
23084         (small_data_pattern): Likewise.
23085         (compact_sda_memory_operand): Update to use
23086         legitimate_small_data_address_p and get_symbol_alignment.
23087         (prepare_move_operands): Don't rewite sdata pattern.
23088         (prepare_extend_operands): Remove.
23089         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
23090         pattern.
23091         (zero_extendqisi2): Likewise.
23092         (zero_extendhisi2): Likewise.
23093         (extendqihi2): Likewise.
23094         (extendqisi2): Likewise.
23095         (extendhisi2): Likewise.
23096         (addsi3): Likewise.
23097         (subsi3): Likewise.
23098         (andsi3): Likewise.
23099         * config/arc/constraints.md (Usd): Change it to memory constraint.
23101 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
23103         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
23104         as source of std instructions.
23105         * config/arc/arc.md (movsi_insn): Update pattern predicate to
23106         allow 6-bit constants as source for store instructions.
23107         (movdi_insn): Update instruction pattern to allow 6-bit constants
23108         as source for store instructions.
23110 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
23112         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
23114 2018-04-30  Nathan Sidwell  <nathan@acm.org>
23115             Sandra Loosemore <sandra@codesourcery.com>
23117         * dumpfile.c (dump_open): Allow '-' for stdout.
23118         * doc/invoke.texi (Developer Options): Document dump filename
23119         determination early.  Document stdin/stdout selection.
23121 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
23123         Microblaze Target: PIC data text relative
23125         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
23126         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
23127         Add declaration.
23128         * config/microblaze/microblaze.h (microblaze_constant_address_p):
23129         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
23130         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
23131         New addressing mode for data-text relative position indepenedent code.
23132         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
23133         'ADDRESS_SYMBOLIC_TXT_REL'.
23134         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
23135         (microblaze_legitimate_pic_operand): Exclude function calls from
23136         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
23137         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
23138         addresses cases.
23139         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
23140         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
23141         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
23142         for 'address + offset'.
23143         (microblaze_expand_prologue): Add new function prologue call for
23144         'r20' assignation.
23145         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
23146         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
23147         table in case of TARGET_PIC_DATA_TEXT_REL.
23148         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
23149         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
23150         Add new macros 'UNSPEC_TEXT',
23151         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
23152         + exclude function calls from 'UNSPEC_PLT' in case of data text
23153         relative mode.
23154         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
23155         new target hook for generating address diff vector tables in case of
23156         flag_pic.
23157         * doc/tm.texi : Regenerate.
23158         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
23159         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
23160         of addr diff vector generation.
23161         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
23162         target hook definition.
23163         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
23164         Add default function for generate_pic_addr_diff_vec -> flag_pic.
23165         * doc/invoke.texi (Add new pic option): Add new microblaze pic
23166         option for data text relative.
23168 2018-04-30  Richard Biener  <rguenther@suse.de>
23170         * tree-chrec.h (evolution_function_is_constant_p): Remove
23171         redundant check.
23172         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
23174 2018-04-30  Richard Biener  <rguenther@suse.de>
23176         PR bootstrap/85571
23177         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
23179 2018-04-30  Richard Biener  <rguenther@suse.de>
23181         PR tree-optimization/28364
23182         PR tree-optimization/85275
23183         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
23184         copying first exit test.
23186 2018-04-28  Mark Wielaard  <mark@klomp.org>
23188         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
23189         dwarf_version >= 5.
23190         (dwarf_AT): Handle DW_AT_addr_base.
23191         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
23193 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
23195         PR target/84431
23196         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
23197         (*ashl<dwi>3_doubleword_mask_1): Ditto.
23198         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
23199         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
23201 2018-04-28  Richard Biener  <rguenther@suse.de>
23203         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
23204         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
23205         to reflect use.  Only add interesting stmts.
23207 2018-04-27  Martin Jambor  <mjambor@suse.cz>
23209         PR ipa/85549
23210         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
23211         the jump function allows for passing through aggregate values.
23213 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
23215         * input.h (in_system_header_at): Convert from macro to inline
23216         function.
23217         (from_macro_expansion_at): Likewise.
23218         (from_macro_definition_at): Likewise.
23220 2018-04-27  Jeff Law  <law@redhat.com>
23222         * config.gcc: Mark tile* targets as deprecated/obsolete.
23224 2018-04-27  Richard Biener  <rguenther@suse.de>
23226         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
23227         fix for ILP32.
23229 2018-04-27  Richard Biener  <rguenther@suse.de>
23231         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
23233 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
23235         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
23236         with Yd constraint. Set "preferred_for_speed" attribute from
23237         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
23238         with Yd constraint.
23239         (*movdi_internal): Ditto.
23240         (movti_interunit splitters): Remove
23241         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
23242         (movdi_interunit splitters): Ditto.
23243         * config/i386/constraints.md (Ye): Remove.
23244         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
23246 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23248         PR target/85512
23249         * config/aarch64/constraints.md (Usg): Limit to 31.
23250         (Usj): Limit to 63.
23252 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
23254         PR tree-optimization/85529
23255         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
23256         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
23257         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
23258         zero extension or masking of the MSB bit.
23259         (optimize_range_tests): Add FIRST_BB argument, pass it through
23260         to optimize_range_tests_var_bound.
23261         (maybe_optimize_range_tests, reassociate_bb): Adjust
23262         optimize_range_tests callers.
23264 2018-04-26  Richard Biener  <rguenther@suse.de>
23265             Jakub Jelinek  <jakub@redhat.com>
23267         * cgraph.h (symbol_table): Just declare debug method here.
23268         * symtab.c (symbol_table::debug): Define.
23270 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
23272         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
23274 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
23276         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
23277         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
23278         (*movdi_internal): Substitute Yi and Yj constraint with x
23279         and Ym and Yn constraint with y constraint.  Update "isa"
23280         attribute and set "preferred_for_speed" attribute from
23281         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
23282         (*movsi_internal): Ditto.
23283         (*movdf_internal): Ditto.
23284         (*movsf_internal): Ditto.
23285         (*zero_extendsidi2): Ditto.
23286         * config/i386/sse.md (vec_set<mode>_0): Ditto.
23287         (sse2_loadld): Ditto.
23288         (*vec_extract<ssevecmodelower>_0): Ditto.
23289         (*vec_extractv4si_0_zext_sse4): Ditto.
23290         (vec_concatv2di): Ditto.
23291         (*vec_dup<mode>): Ditto.
23292         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
23293         * config/i386/constraints.md (Yi): Remove.
23294         (Yj): Remove.
23295         (Ym): Remove.
23296         (Yn): Remove.
23298 2018-04-26  Nathan Sidwell  <nathan@acm.org>
23300         * dumpfile.c (dump_open): New.
23301         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
23302         (dump_finish): Detect stdio/stderr by value not name.
23304 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
23306         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
23308 2018-04-26  Tom de Vries  <tom@codesourcery.com>
23310         PR target/84952
23311         * config/nvptx/nvptx.c (verify_neutering_jumps)
23312         (verify_neutering_labels): New function
23313         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
23315 2018-04-26  Tom de Vries  <tom@codesourcery.com>
23317         PR target/84025
23318         * config/nvptx/nvptx.c (needs_neutering_p): New function.
23319         (nvptx_single): Use needs_neutering_p to skip over insns that do not
23320         need neutering.
23322 2018-04-26  Richard Biener <rguenther@suse.de>
23323             Tom de Vries  <tom@codesourcery.com>
23325         PR lto/85422
23326         * lto-streamer-out.c (output_function): Fixup loops if required to match
23327         discovery done in the reader.
23329 2018-04-26  Richard Biener  <rguenther@suse.de>
23331         PR tree-optimization/85116
23332         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
23333         have a loop exit from the single latch predecessor.  Remove
23334         case of header with just condition.
23335         (ch_base::copy_headers): Exclude infinite loops from any
23336         processing.
23337         (pass_ch::execute): Record exits.
23339 2018-04-26  Richard Biener  <rguenther@suse.de>
23341         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
23342         prologue cost vector and pass it to vect_get_load_cost.
23343         (vect_get_peeling_costs_all_drs): Likewise.
23344         (vect_peeling_hash_get_lowest_cost): Likewise.
23345         (vect_enhance_data_refs_alignment): Likewise.
23347 2018-04-26  Richard Biener  <rguenther@suse.de>
23349         PR middle-end/85450
23350         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
23351         checking of integer<->pointer conversions.
23352         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
23353         sign-/zero-extending pointer types.
23354         (expand_omp_for_static_chunk): Likewise.
23356 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
23357             Jean Lee  <xiaoyur347@gmail.com>
23359         * config/mips/mips.c (mips_asan_shadow_offset): New function.
23360         (TARGET_ASAN_SHADOW_OFFSET): Define.
23361         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
23362         true for -fsanitize=address.
23364 2018-04-25  Mark Wielaard  <mark@klomp.org>
23366         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
23367         shorter ones.
23369 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
23371         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
23372         than "alu", remove explicit "memory" and "imm_disp" attributes.
23373         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
23375         PR middle-end/85414
23376         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
23377         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
23378         gen_lowpart_no_emit.
23380 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
23382         PR target/85473
23383         * config/i386/i386.c (ix86_expand_builtin): Change memory
23384         operand to XI, extend p0 to Pmode.
23385         * config/i386/i386.md: Change unspec volatile and operand
23386         1 mode to XI, change operand 0 mode to P.
23388 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
23390         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
23391         GET_MODE_MASK before any checking.
23392         (nds32_can_use_bset_p): Likewise.
23393         (nds32_can_use_btgl_p): Likewise.
23395 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
23397         * config/nds32/nds32-doubleword.md: New define_split pattern for
23398         illegal register number.
23400 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
23402         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
23404 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
23406         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
23408 2018-04-25  Richard Biener  <rguenther@suse.de>
23410         * lto-streamer.h (LTO_major_version): Bump to 8.
23412 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
23414         * BASE-VER: Set to 9.0.0.
23416 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
23418         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
23419         in __abskf2 and __powikf2.
23421 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23423         PR target/85512
23424         * config/aarch64/constraints.md (Usg, Usj): New constraints.
23425         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
23426         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
23427         Use the above on operand 2.  Reindent.
23428         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
23430 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
23432         PR target/85485
23433         * common/config/i386/i386-common.c (ix86_handle_option): Don't
23434         handle OPT_mcet.
23435         * config/i386/i386.opt (mcet): Removed.
23436         * doc/install.texi: Remove -mcet documentation.
23437         * doc/invoke.texi: Likewise.
23439 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
23441         PR target/85485
23442         * doc/install.texi: Remove -mcet from bootstrap-cet.
23444 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
23446         PR target/85511
23447         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
23448         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
23449         if TARGET_64BIT.
23451         PR target/85503
23452         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
23453         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
23454         containing a CONST_VECTOR.
23456 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
23458         * doc/install.texi: Update newlib dependency for nvptx.
23460 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
23462         PR target/85508
23463         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
23464         instead of INTVAL when shifting x left.
23466 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
23468         PR tree-optimization/85478
23469         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
23470         vect_grouped_store_supported for single element vectors.
23472 2018-04-24  Richard Biener  <rguenther@suse.de>
23474         PR target/85491
23475         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
23476         load cost increase to the case of non-constant step.
23478 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
23480         PR target/84828
23481         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
23482         destination if any_malformed_asm.
23484 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
23486         PR middle-end/85496
23487         * expr.c (store_field): In the bitfield case, if the value comes from
23488         a function call and is returned in registers by means of a PARALLEL,
23489         do not change the mode of the temporary unless BLKmode and VOIDmode.
23491 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
23493         PR rtl-optimization/85423
23494         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
23495         dependencies to debug insns when the previous insn is non-debug.
23497 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
23499         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
23500         enums into a single definition.
23501         (fls): Fix predicates and printing.
23502         (seti): Likewise.
23504 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
23506         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
23507         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
23508         and short u6 immediate.
23509         (check_if_valid_sleep_operand): Remove.
23510         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
23512 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
23514         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
23515         flag_always_save_lp condition.
23516         * config/nds32/nds32.opt (malways-save-lp): New option.
23518 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
23520         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
23521         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
23522         * config/nds32/nds32.h
23523         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
23524         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
23526 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
23528         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
23529         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
23531 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
23532             Chung-Ju Wu  <jasonwucj@gmail.com>
23534         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
23535         Declare.
23536         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
23537         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
23539 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
23541         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
23543 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
23545         * config/nds32/nds32-protos.h (nds32_data_alignment,
23546         nds32_local_alignment): Declare.
23547         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
23548         nds32_local_alignment): New functions.
23549         (TARGET_CONSTANT_ALIGNMENT): Define.
23550         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
23552 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
23554         * config/nds32/nds32.c
23555         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
23556         (TARGET_MODES_TIEABLE_P): Likewise.
23558 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
23560         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
23561         level Ofast and Og.
23563 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
23564             Chung-Ju Wu  <jasonwucj@gmail.com>
23566         * config/nds32/constants.md (unspec_volatile_element): Add enum values
23567         for unaligned access.
23568         * config/nds32/nds32-intrinsic.c: Implementation of expanding
23569         unaligned access.
23570         * config/nds32/nds32-intrinsic.md: Likewise.
23571         * config/nds32/nds32_intrinsic.h: Likewise.
23572         * config/nds32/nds32.h (nds32_builtins): Likewise.
23573         * config/nds32/nds32.opt (munaligned-access): New option.
23574         * config/nds32/nds32.c (nds32_asm_file_start): Display
23575         flag_unaligned_access status.
23577 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
23579         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
23580         -mno-relax is present.
23581         * config/riscv/linux.h (LINK_SPEC): Ditto.
23583 2018-04-20  Martin Sebor  <msebor@redhat.com>
23585         PR c/85365
23586         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
23587         for null pointers.
23588         (gimple_fold_builtin_stxcpy_chk): Same.
23589         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
23591 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
23593         PR target/85456
23594         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
23595         __powikf2 when long double is IEEE 128-bit.
23597 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
23599         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
23600         step to make sure stack always aligned.
23602 2018-04-20  Carl Love  <cel@us.ibm.com>
23604         PR target/83402
23605         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
23606         size check for arg0.
23608 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
23609             Tom de Vries  <tom@codesourcery.com>
23611         PR target/85445
23612         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
23613         Emit insns for calls too.
23614         (nvptx_find_par): Always look for worker-level predecessor insn.
23615         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
23616         calls.
23617         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
23618         (nvptx_process_pars): Propagate frames for calls.
23620 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
23622         PR target/85469
23623         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
23624         Removed.
23625         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
23626         (ix86_handle_option): Don't handle OPT_mibt.
23627         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
23628         __SHSTK__.
23629         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
23630         has_ibt and ibt.
23631         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
23632         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
23633         (ix86_target_macros): Define __CET__ with flag_cf_protection
23634         for -fcf-protection.
23635         * config/i386/i386.c (isa2_opts): Remove -mibt.
23636         * config/i386/i386.h (TARGET_IBT): Removed.
23637         (TARGET_IBT_P): Likewise.
23638         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
23639         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
23640         * config/i386/i386.opt (mcet): Update help message.
23641         (mshstk): Likewise.
23642         (mibt): Removed.
23643         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
23644         -mcet as an alias for -mshstk.
23646 2018-04-20  Richard Biener <rguenther@suse.de>
23648         PR middle-end/85475
23649         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
23650         complexity by forcing a single use of the multiply operand.
23652 2018-04-20  Martin Jambor  <mjambor@suse.cz>
23654         ipa/85449
23655         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
23656         recursion dependency to only apply to non-clones.
23658 2018-04-20  Martin Jambor  <mjambor@suse.cz>
23660         ipa/85447
23661         * ipa-cp.c (create_specialized_node): Check that clones of
23662         self-recursive edges exist during IPA-CP.
23664 2018-04-19  Toon Moene  <toon@moene.org>
23666         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
23667         by -O3.
23669 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
23671         PR tree-optimization/85467
23672         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
23673         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
23674         VECTOR_CST element to type.
23676 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
23678         PR target/85397
23679         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
23680         * config/i386/i386.md (builtin_setjmp_setup): Removed.
23681         (builtin_longjmp): Likewise.
23682         (save_stack_nonlocal): New pattern.
23683         (restore_stack_nonlocal): Likewise.
23685 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
23687         PR target/85404
23688         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
23689         Replace ASM_OUTPUT_LABEL with fprintf.
23691 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
23693         PR target/85417
23694         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
23695         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
23696         * config/i386/i386-c.c (ix86_target_macros_internal): Also
23697         define __IBT__ and __SHSTK__ for -fcf-protection.
23698         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
23699         TARGET_IBT.
23700         (ix86_trampoline_init): Likewise.
23701         (x86_output_mi_thunk): Likewise.
23702         (ix86_notrack_prefixed_insn_p): Likewise.
23703         (ix86_option_override_internal): Don't disallow -fcf-protection.
23704         * config/i386/i386.md (rdssp<mode>): Also enable for
23705         -fcf-protection.
23706         (incssp<mode>): Likewise.
23707         (nop_endbr): Likewise.
23708         * config/i386/i386.opt (mcet): Change help message to built-in
23709         functions only.
23710         (mibt): Likewise.
23711         (mshstk): Likewise.
23712         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
23713         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
23714         enable CET built-in functions.
23716 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
23718         * common/config/i386/i386-common.c
23719         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
23720         OPTION_MASK_ISA_MOVDIRI_UNSET,
23721         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
23722         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
23723         * config.gcc (movdirintrin.h): New header.
23724         * config/i386/cpuid.h (bit_MOVDIRI,
23725         bit_MOVDIR64B): New bits.
23726         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
23727         and -mmvodir64b.
23728         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
23729         (VOID, PVOID, PCVOID)): New function types.
23730         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
23731         __builtin_ia32_directstoreu_u64,
23732         __builtin_ia32_movdir64b): New builtins.
23733         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
23734         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
23735         and -mmovdiri.
23736         (ix86_valid_target_attribute_inner_p): Ditto.
23737         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
23738         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
23739         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
23740         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
23741         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
23742         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
23743         (movdiri<mode>, movdir64b_<mode>): New.
23744         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
23745         * config/i386/immintrin.h: Include movdirintrin.h.
23746         * config/i386/movdirintrin.h: New file.
23747         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
23749 2018-04-19  Richard Biener  <rguenther@suse.de>
23751         PR middle-end/85455
23752         * cfg.c (clear_bb_flags): When loop state says we have
23753         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
23755 2018-04-19  Richard Biener  <rguenther@suse.de>
23757         PR tree-optimization/84737
23758         * tree-vect-data-refs.c (vect_copy_ref_info): New function
23759         copying restrict info.
23760         (vect_setup_realignment): Use it.
23761         * tree-vectorizer.h (vect_copy_ref_info): Declare.
23762         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
23763         the first DR to all generated stores.
23764         (vectorizable_load): Likewise for loads.
23766 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
23768         PR tree-optimization/85446
23769         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
23770         the integral and pointer types to have the same precision.
23772         * doc/install.texi: Document --disable-cet being the default and
23773         --enable-cet=auto.
23775 2018-04-18  Martin Liska  <mliska@suse.cz>
23777         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
23778         style.
23780 2018-04-18  Martin Liska  <mliska@suse.cz>
23782         Revert
23783         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
23785         PR ipa/83983
23786         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
23787         arguments if they are comparable.
23789 2018-04-18  Martin Liska  <mliska@suse.cz>
23791         Revert
23792         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
23794         PR lto/84805
23795         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
23796         incomplete types.
23798 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
23800         PR target/85388
23801         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
23802         ENDBR after calling __morestack.
23804 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
23806         PR jit/85384
23807         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
23808         by using gcc_base_ver to generate a gcc_driver_version, and use
23809         it when generating GCC_DRIVER_NAME.
23810         * configure: Regenerate.
23812 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
23814         PR target/81084
23815         * config.gcc: Obsolete powerpc*-*-*spe*.
23817 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
23819         PR debug/84637
23820         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
23821         (stabstr_D): Change type of unum from unsigned int to
23822         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
23823         type.
23825 2018-04-17  Jim Wilson  <jimw@sifive.com>
23827         PR 84856
23828         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
23829         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
23830         Set arg_pointer_offset after using pretend_args_size.
23832 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
23834         PR rtl-optimization/85431
23835         * dse.c (record_store): Ignore zero width stores.
23837         PR sanitizer/85230
23838         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
23839         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
23840         __builtin_stack_restore rather than after it.
23841         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
23842         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
23843         argument instead of virtual_dynamic_stack_rtx.
23845 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
23847         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
23848         New prototype.
23849         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
23850         Add note to error message to explain internal mapping of overloaded
23851         built-in function name to non-overloaded built-in function name.
23852         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
23853         function.
23855 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
23857         PR target/85424
23858         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
23859         where the inputs overlap with the output.
23861 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
23863         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
23864         (=v, v) alternative and explicit "memory" attribute.
23865         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
23866         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
23867         attributes.
23868         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
23869         "sselog1" type instead of "sselog".
23870         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
23871         "sselog".  Remove explicit "memory" attribute.
23872         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
23873         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
23874         attributes.
23875         (vec_extract_hi_v32hi): Merge all alternatives into one, use
23876         "sselog1" type instead of "sselog".  Remove explicit "memory"
23877         attribute.
23878         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
23879         use "sselog1" type instead of "sselog".  Remove explicit "memory"
23880         attribute.
23881         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
23882         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
23883         attributes.
23884         (vec_extract_hi_v64qi): Merge all alternatives into one, use
23885         "sselog1" type instead of "sselog".  Remove explicit "memory"
23886         attribute.
23887         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
23888         use "sselog1" type instead of "sselog".  Remove explicit "memory"
23889         attribute.
23891         PR target/85430
23892         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
23894         PR middle-end/85414
23895         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
23896         on a SUBREG.
23898 2018-04-17  Martin Jambor  <mjambor@suse.cz>
23900         PR ipa/85421
23901         * ipa-cp.c (create_specialized_node): Call
23902         expand_all_artificial_thunks if necessary.
23904 2018-04-17  Martin Liska  <mliska@suse.cz>
23906         PR lto/85405
23907         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
23908         in message, remote space in between '_G' and '('.
23910 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
23912         PR target/85281
23913         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
23914         avx512f_vmcmp<mode>3<round_saeonly_name>,
23915         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
23916         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
23917         avx512f_rndscale<mode><round_saeonly_name>,
23918         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
23919         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
23920         Use %<iptr>2 instead of %2 for -masm=intel.
23921         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
23922         avx512f_vcvttss2usi<round_saeonly_name>,
23923         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
23924         -masm=intel.
23925         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
23926         avx512f_vcvttsd2usi<round_saeonly_name>,
23927         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
23928         Use %q1 instead of %1 for -masm=intel.
23929         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
23930         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
23931         of %3 for -masm=intel.
23932         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
23933         -masm=intel.
23934         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
23935         -masm=intel.
23936         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
23937         -masm=intel.
23938         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
23939         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
23940         %g1.
23941         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
23942         -masm=intel.
23943         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
23944         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
23945         %g1 and one with %0 and %1.
23946         (avx512er_vmrcp28<mode><round_saeonly_name>,
23947         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
23948         %1 for -masm=intel.
23949         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
23950         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
23951         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
23952         of %0 and %{%4%} for -masm=intel.
23953         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
23954         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
23955         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
23956         order of %0 and %{%5%}%{z%} for -masm=intel.
23958 2018-04-17  Jan Hubicka  <jh@suse.cz>
23960         PR lto/85405
23961         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
23963 2018-04-17  Martin Liska  <mliska@suse.cz>
23965         PR ipa/85329
23966         * multiple_target.c (create_dispatcher_calls): Set apostrophes
23967         for target_clone error message.  Make default implementation
23968         clone to be a local declaration.
23969         (separate_attrs): Add new argument and check for an empty
23970         string.
23971         (expand_target_clones): Handle it.
23972         (ipa_target_clone): Make redirection just for target_clones
23973         functions.
23975 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
23976             Tom de Vries  <tom@codesourcery.com>
23978         PR middle-end/84955
23979         * omp-expand.c (expand_oacc_for): Add dummy false branch for
23980         tiled basic blocks without omp continue statements.
23982 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
23984         PR target/83660
23985         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
23986         vec_extract expression as having side effects to make sure it gets
23987         a cleanup point.
23989 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
23991         PR target/85403
23992         * config/i386/i386.c (get_builtin_code_for_version): Check
23993         error_mark_node.
23995 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
23997         PR target/84331
23998         * config.gcc: Support "skylake".
23999         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
24000         PROCESSOR_SKYLAKE.
24001         * config/i386/i386.c (m_SKYLAKE): Define.
24002         (processor_target_table): Add "skylake".
24003         (ix86_option_override_internal): Add "skylake".
24004         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
24005         PROCESSOR_CANNONLAKE.
24006         (get_builtin_code_for_version): Fix priority for
24007         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
24008         PROCESSOR_SKYLAKE-AVX512.
24009         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
24010         (processor_type): Add PROCESSOR_SKYLAKE.
24012 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
24013             Jason Merrill  <jason@redhat.com>
24015         PR c++/85112
24016         * convert.c (convert_to_integer_1): Use direct recursion for
24017         enumeral types and types with a precision less than the number
24018         of bits in their mode.
24020 2018-04-16  Julia Koval  <julia.koval@intel.com>
24022         PR target/84413
24023         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
24024         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
24026 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
24028         PR target/85293
24029         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
24030         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
24031         and -mno-direct-move.
24033 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
24035         PR target/83402
24036         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
24037         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
24038         Ensure negative shifts result in {0}.
24040 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
24042         PR rtl-optimization/79916
24043         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
24044         regs (if any) to define how to gnerate SD moves when LRA is in
24045         progress.
24047 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
24049         PR rtl-optimization/85393
24050         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
24051         * except.c (expand_dw2_landing_pad_for_region): Make static.
24052         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
24053         a label and unconditional jump to old_bb, rather than
24054         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
24055         basic block.
24057         PR rtl-optimization/85376
24058         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
24059         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
24060         instead of a specific value.
24062 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
24063             Bin Cheng  <bin.cheng@arm.com>
24065         PR tree-optimization/82965
24066         PR tree-optimization/83991
24067         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
24068         by_profile_only parameter.
24069         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
24070         information if the loop was predicted to iterate too many times.
24071         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
24073 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
24075         PR lto/71991
24076         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
24077         always inline.
24079 2018-04-13  Martin Liska  <mliska@suse.cz>
24080             Jakub Jelinek  <jakub@redhat.com>
24082         PR middle-end/81657
24083         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
24084         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
24085         * builtins.c (expand_builtin_memory_copy_args): Use
24086         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
24087         handle dest_addr == pc_rtx.
24089 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
24091         PR target/85291
24092         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
24093         asked to not generate direct moves.
24094         (fix_trunc<mode>si2_stfiwx): Similar.
24095         (fix_trunc<mode>si2_internal): Similar.
24097 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
24099         PR debug/83157
24100         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
24101         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
24102         lookup if dest in some wider mode is known to be const0_rtx and
24103         if so, record permanent equivalence for it to be ZERO_EXTEND of
24104         the narrower mode destination.
24106 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
24108         * lto-streamer-out.c (output_function): Revert 259346.
24109         * omp-expand.c (expand_oacc_for): Likewise.
24111 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
24113         PR rtl-optimization/85354
24114         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
24115         * sel-sched.c (sel_global_init): ... here.
24117 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
24119         PR target/85238
24120         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
24121         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
24122         mode for PE-COFF targets.
24123         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
24124         (i386_pe_asm_lto_end): Likewise.
24125         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
24126         (TARGET_ASM_LTO_END): Likewise.
24127         * config/i386/winnt.c (saved_debug_info_level): New static variable.
24128         (i386_pe_asm_lto_start): New function.
24129         (i386_pe_asm_lto_end): Likewise.
24131 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
24132             Richard Biener  <rguenther@suse.de>
24134         PR middle-end/84955
24135         * lto-streamer-out.c (output_function): Fix CFG loop state before
24136         streaming out.
24137         * omp-expand.c (expand_oacc_for): Handle calls to internal
24138         functions like regular functions.
24140 2018-04-12  Richard Biener  <rguenther@suse.de>
24142         PR lto/85371
24143         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
24144         for the early LTO debug to properly generate references to it
24145         during DIE emission.  Do not re-use that for the skeleton for
24146         split-dwarf.
24147         (dwarf2out_early_finish): Likewise.
24149 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
24151         PR target/85328
24152         * config/i386/sse.md
24153         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
24154         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
24155         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
24156         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
24157         and output is a reg, avoid creating invalid lowpart subreg, but
24158         instead split into a 512-bit move.  Don't split if not AVX512VL,
24159         input is xmm16+ reg and output is a mem.
24160         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
24161         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
24162         xmm16+ reg and output is a mem.
24164 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24166         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
24167         also for flag_dwarf2_cfi_asm.
24169 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
24171         PR rtl-optimization/85342
24172         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
24173         a bool scalar var inside of the loop instead.  Don't try to update
24174         recog_data.operand after failed apply_change_group.
24176 2018-04-12  Tom de Vries  <tom@codesourcery.com>
24178         PR target/85296
24179         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
24180         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
24181         array with flexible array member as array without given dimension.
24182         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
24183         argument for undefined param to true.
24185 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
24187         PR target/85321
24188         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
24189         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
24190         from PowerPC section.
24191         * config/rs6000/sysv4.opt (mcall-): Improve help text.
24192         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
24193         help text that is too long.
24194         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
24195         help text that is too long.
24196         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
24197         help text that is too long.
24199 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
24201         * config/alpha/alpha.md (stack_probe_internal): Rename
24202         from "probe_stack".  Update all callers.
24204 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
24206         PR rtl-optimization/84566
24207         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
24208         sched_macro_fuse_insns.
24210 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
24212         PR target/84301
24213         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
24214         (compute_block_dependences): ... from here.
24216 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
24218         PR tree-optimization/85331
24219         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
24220         from int to HOST_WIDE_INT.
24222 2018-04-11  Martin Jambor  <mjambor@suse.cz>
24224         PR ipa/84149
24225         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
24226         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
24227         not the same as the source val.
24228         (cgraph_edge_brings_value_p): New parameter.
24229         (gather_edges_for_value): Pass destination value to
24230         cgraph_edge_brings_value_p.
24231         (perhaps_add_new_callers): Likewise.
24232         (get_info_about_necessary_edges): Likewise and exclude values brought
24233         only by self-recursive edges.
24234         (create_specialized_node): Redirect only clones of self-calling edges.
24235         (+self_recursive_pass_through_p): New function.
24236         (find_more_scalar_values_for_callers_subset): Use it.
24237         (find_aggregate_values_for_callers_subset): Likewise.
24238         (known_aggs_to_agg_replacement_list): Removed.
24239         (decide_whether_version_node): Re-calculate known constants for all
24240         remaining context clones.
24242 2018-04-11  Richard Biener  <rguenther@suse.de>
24244         PR lto/85339
24245         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
24246         from early DWARF output.
24247         (dwarf2out_early_finish): Output line info unconditionally into
24248         early DWARF and add reference to it.
24250 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
24252         PR target/85281
24253         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
24254         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
24255         other than V2DFmode using iptr mode attribute.
24256         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
24258 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
24260         PR rtl-optimization/84659
24261         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
24263 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
24265         PR debug/85302
24266         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
24267         SIZEP is NULL.
24268         (output_loc_list): Pass address of a dummy size variable even in the
24269         locview handling loop.
24270         (index_location_lists): Add comment on why skip_loc_list_entry can't
24271         call size_of_locs.
24273 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
24275         PR target/85261
24276         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
24277         into register.
24279 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
24281         PR target/85321
24282         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
24283         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
24284         and -mstring-compare-inline-limit.
24286 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
24288         PR target/85287
24289         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
24290         for stack clash protection in a register whenever we need it to be in
24291         a register.
24293 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
24295         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
24296         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
24298 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
24300         PR target/85321
24301         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
24302         the help text.
24303         (mlong-double-): Ditto.
24304         * config/rs6000/sysv4.opt (msdata=): Ditto.
24305         (mtls-size=): Ditto.
24307 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
24309         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
24310         erroneous entries for
24311         "vector int vec_ldl (int, long int *)", and
24312         "vector unsigned int vec_ldl (int, unsigned long int *)".
24313         Add comments and entries for
24314         "vector bool char vec_ldl (int, bool char *)",
24315         "vector bool short vec_ldl (int, bool short *)",
24316         "vector bool int vec_ldl (int, bool int *)",
24317         "vector bool long long vec_ldl (int, bool long long *)",
24318         "vector pixel vec_ldl (int, pixel *)",
24319         "vector long long vec_ldl (int, long long *)",
24320         "vector unsigned long long vec_ldl (int, unsigned long long *)".
24321         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
24322         type tree bool_long_long_type_node and correct definition of
24323         bool_V2DI_type_node to make reference to this new type tree.
24324         (rs6000_mangle_type): Replace erroneous reference to
24325         bool_long_type_node with bool_long_long_type_node.
24326         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
24327         comments to emphasize sign distinctions for char and int types and
24328         replace RS6000_BTI_bool_long constant with
24329         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
24330         use of RS6000_BTI_pixel.
24331         (bool_long_type_node): Remove this macro definition.
24332         (bool_long_long_type_node): New macro definition
24334 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
24336         PR rtl-optimization/85300
24337         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
24338         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
24339         simplify_unary_operation fails.
24341 2018-04-10  Martin Liska  <mliska@suse.cz>
24343         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
24344         cgraph_edge and ipa_ref.
24346 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
24348         PR target/85177
24349         PR target/85255
24350         * config/i386/sse.md
24351         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
24352         computation of the VEC_MERGE selector from mask.
24353         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
24354         Fix decoding of the VEC_MERGE selector into mask.
24356 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
24358         PR tree-optimization/85286
24359         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
24361 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
24363         * final.c (final_1): Set insn_last_address as well as
24364         insn_current_address.
24366 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24368         PR target/85173
24369         * explow.c (emit_stack_probe): Call validize_mem on memory location
24370         before passing it to gen_probe_stack.  Create address operand and
24371         legitimize it for the probe_stack_address case.
24373 2018-04-09  Jan Hubicka  <jh@suse.cz>
24375         PR lto/85078
24376         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
24377         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
24378         * tree.c (free_lang_data_in_type): Fix handling of binfos;
24379         walk basetypes.
24380         (free_lang_data): Rebuild type inheritance graph.
24382 2018-04-09  Martin Sebor  <msebor@redhat.com>
24384         * invoke.texi (-finline-small-functions): Mention other optimization
24385         options.
24386         (-findirect-inlining, -fpartial-inlining): Same.
24387         (-finline-functions-called-once): Same.
24388         (-freorder-blocks-and-partition): Same.
24390 2018-04-09  Jan Hubicka  <jh@suse.cz>
24392         PR rtl/84058
24393         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
24394         jumps; choose last target that matches the criteria (i.e.
24395         no partition changes for non-crossing jumps).
24396         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
24397         support for redirecting crossing jumps to non-crossing.
24399 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
24401         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
24402         also for naked functions.
24404 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
24406         * config/arc/arc.md (add_shift): New pattern.
24407         (add_shift2): Likewise.
24408         (sub_shift): Likewise.
24409         (sub_shift_cmp0_noout): Likewise.
24410         (compare_si_ashiftsi): Likewise.
24411         (xbfu_cmp0_noout): New combine pattern.
24412         (xbfu_cmp0"): Likewise.
24413         (movsi_set_cc_insn): Place the predicable variant first.
24414         (commutative_binary_cmp0_noout): Remove clobber.
24415         (commutative_binary_cmp0): New pattern.
24416         (noncommutative_binary_cmp0): Likewise.
24417         (noncommutative_binary_cmp0_noout): Likewise.
24418         (noncommutative_binary_comparison_result_used): Removed.
24419         (rsub_cmp0): New pattern.
24420         (rsub_cmp0_noout): Likewise.
24421         (extzvsi): Changed, keep only meaningful variants.
24422         (SQH, SEZ): New iterators.
24423         (SQH_postfix): New mode attribute.
24424         (SEZ_prefix): New code attribute.
24425         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
24426         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
24427         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
24428         of numerical value.
24429         (noncommutative_operator): Check the availability of barrel
24430         shifter option.
24432 2018-04-09  Richard Biener  <rguenther@suse.de>
24434         PR tree-optimization/85284
24435         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
24436         Only use the niter constraining form of simple_iv when the exit
24437         is always executed.
24439 2018-04-09  Tom de Vries  <tom@codesourcery.com>
24441         PR target/84041
24442         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
24443         (define_expand "*memory_barrier"): New define_expand.
24444         (define_insn "memory_barrier"): New insn.
24446 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
24448         PR rtl-optimization/80463
24449         PR rtl-optimization/83972
24450         PR rtl-optimization/83480
24452         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
24453         correct producer for the insn.
24454         (tidy_control_flow): Fixup seqnos in case of debug insns.
24456 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
24458         PR rtl-optimization/83913
24460         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
24461         different sched-times when merging exprs.
24463 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
24465         PR rtl-optimization/83962
24467         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
24468         tidy_fallthru_edge and tidy_control_flow.
24470 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
24472         PR rtl-optimization/83530
24474         * sel-sched.c (force_next_insn): New global variable.
24475         (remove_insn_for_debug): When force_next_insn is true, also leave only
24476         next insn in the ready list.
24477         (sel_sched_region): When the region wasn't scheduled, make another pass
24478         over it with force_next_insn set to 1.
24480 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
24482         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
24483         into tm_file.
24484         * config/nds32/constants.md (unspec_volatile_element): Add enum values
24485         for interrupt control.
24486         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
24487         functions for interrupt control.
24488         * config/nds32/nds32-intrinsic.md: Likewise.
24489         * config/nds32/nds32_intrinsic.h: Likewise.
24490         * config/nds32/nds32.h (nds32_builtins): Likewise.
24492 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
24494         * config/nds32/nds32.c (nds32_init_machine_status,
24495         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
24496         strict_aligned_p field.
24497         (nds32_expand_to_rtl_hook): New function.
24498         (TARGET_EXPAND_TO_RTL_HOOK): Define.
24499         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
24501 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
24502             Chung-Ju Wu  <jasonwucj@gmail.com>
24504         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
24505         * config/nds32/nds32-n7.md: New file.
24506         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
24507         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
24508         pipeline.
24509         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
24510         * config/nds32/nds32.md (pipeline_model): Add n7.
24511         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
24512         * config/nds32/pipelines.md: Include n7 settings.
24514 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
24515             Chung-Ju Wu  <jasonwucj@gmail.com>
24517         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
24518         * config/nds32/nds32-e8.md: New file.
24519         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
24520         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
24521         pipeline.
24522         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
24523         * config/nds32/nds32.md (pipeline_model): Add e8.
24524         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
24525         * config/nds32/pipelines.md: Include e8 settings.
24527 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
24528             Chung-Ju Wu  <jasonwucj@gmail.com>
24530         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
24531         * config/nds32/nds32-n8.md: New file.
24532         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
24533         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
24534         pipeline.
24535         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
24536         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
24537         * config/nds32/nds32.md (pipeline_model): Add n8.
24538         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
24539         * config/nds32/pipelines.md: Include n8 settings.
24541 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
24542             Chung-Ju Wu  <jasonwucj@gmail.com>
24544         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
24545         * config/nds32/nds32-n9-2r1w.md: New file.
24546         * config/nds32/nds32-n9-3r2w.md: New file.
24547         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
24548         nds32_register_ports): New or modify for cpu n9.
24549         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
24550         pipeline.
24551         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
24552         * config/nds32/nds32-utils.c: New file.
24553         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
24554         TARGET_MUL_SLOW): Define.
24555         * config/nds32/nds32.md (pipeline_model): New attribute.
24556         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
24557         New options that support cpu n9.
24558         * config/nds32/pipelines.md: Include n9 settings.
24559         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
24561 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
24563         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
24564         information if necessary.
24565         (output_cond_branch_compare_zero): Likewise.
24566         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
24567         (nds32_target_alignment): Refine for alignment.
24568         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
24569         (FUNCTION_BOUNDARY): Modify.
24570         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
24571         align case.
24572         * config/nds32/nds32.opt (malways-align, malign-functions): New.
24574 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
24576         * config/nds32/constants.md (unspec_volatile_element): Add values for
24577         TLB operation and data prefetch.
24578         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
24579         functions for TLB operation and data prefetch.
24580         * config/nds32/nds32-intrinsic.md: Likewise.
24581         * config/nds32/nds32_intrinsic.h: Likewise.
24582         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
24583         (nds32_print_operand): Likewise.
24584         * config/nds32/nds32.h (nds32_builtins): Likewise.
24586 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
24587         Andrew Pinski <pinsika@gcc.gnu.org>
24589         PR middle-end/82976
24590         * match.pd: Use constant_boolean_node of correct type instead of
24591         boolean_true_node or boolean_false_node for simplifying
24592         pointer comparisons to zero.
24594 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
24596         PR tree-optimization/80021
24597         * tree.c (verify_type_variant): Make error call in verify_variant_match
24598         translatable and remove final full stop.
24600 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
24602         * config/nds32/constants.md (unspec_volatile_element): Add
24603         UNSPEC_VOLATILE_EH_RETURN.
24604         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
24605         nds32_output_stack_pop): Support dwarf exception handling process.
24606         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
24607         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
24608         exception handling process.
24609         (nds32_compute_stack_frame): Likewise.
24610         (nds32_return_addr_rtx): Likewise.
24611         (nds32_initial_elimination_offset): Likewise.
24612         (nds32_expand_prologue): Likewise.
24613         (nds32_expand_epilogue): Likewise.
24614         (nds32_dynamic_chain_address): New function.
24615         * config/nds32/nds32.h (machine_function): Add fields for dwarf
24616         exception handling.
24617         (DYNAMIC_CHAIN_ADDRESS): Define.
24618         (EH_RETURN_DATA_REGNO): Define.
24619         (EH_RETURN_STACKADJ_RTX): Define.
24620         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
24621         patterns for dwarf exception handling.
24623 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
24625         * config/nds32/nds32.h: Clean up obsolete macros.
24627 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
24629         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
24630         Add enum values for particular instructions.
24631         * config/nds32/nds32-intrinsic.c: Implementation of expanding
24632         particular intrinsic functions.
24633         * config/nds32/nds32-intrinsic.md: Likewise.
24634         * config/nds32/nds32_intrinsic.h: Likewise.
24635         * config/nds32/nds32.h (nds32_builtins): Likewise.
24636         * config/nds32/nds32.md (type): Add pbsad and pbsada.
24637         (btst, ave): New patterns for particular instructions.
24639 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
24641         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
24642         Add enum values for atomic load/store and memory sync.
24643         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
24644         and memory sync.
24645         * config/nds32/nds32-intrinsic.md: Likewise.
24646         * config/nds32/nds32_intrinsic.h: Likewise.
24647         * config/nds32/nds32.h (nds32_builtins): Likewise.
24649 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
24651         PR tree-optimization/85257
24652         * fold-const.c (native_encode_vector): If not all elts could fit
24653         and off is -1, return 0 rather than offset.
24654         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
24655         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
24656         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
24657         adjust buffer in native_interpret_expr call.
24659 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
24661         * config/nds32/constants.md (unspec_volatile_element): Add cache
24662         control enum values.
24663         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
24664         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
24665         * config/nds32/nds32.c (nds32_cctl_names): New.
24666         (nds32_print_operand): Handle cache control register names.
24667         * config/nds32/nds32.h (nds32_builtins): New enum values.
24668         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
24669         macros.
24670         * config/nds32/nds32.md (type): Add mmu.
24671         * config/nds32/pipelines.md (simple_insn): Add mmu.
24673 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
24675         * config/nds32/nds32.md (type): Remove call.
24676         * config/nds32/pipelines.md (simple_insn): Likewise.
24678 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
24680         * config/nds32/constants.md (unspec_volatile_element): Add
24681         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
24682         UNSPEC_VOLATILE_FMFCFG.
24683         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
24684         description for fmfcfg and fmfcsr.
24685         (bdesc_1arg): Add fmtcsr.
24686         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
24687         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
24688         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
24689         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
24690         unspec_fmfcfg): New patterns.
24691         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
24692         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
24693         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
24694         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
24695         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
24696         __nds32__fmfcfg): Define.
24698 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
24700         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
24701         intrinsic register names.
24702         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
24703         intrinsic register enum values and macros.
24705 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
24707         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
24708         for load/store addressing form.
24709         (nds32_print_operand_address): Likewise.
24711 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
24713         PR target/85196
24714         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
24715         based on LABEL_REF.  Remove useless assertion.
24716         (pic_address_needs_scratch): Fix formatting.
24717         (sparc_legitimize_pic_address): Minor tweaks.
24718         (sparc_delegitimize_address): Adjust assertion accordingly.
24719         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
24720         into symbolic_operand.
24721         (movsi_high_pic_label_ref): Likewise.
24722         (movsi_lo_sum_pic_label_ref): Likewise.
24723         (movdi_pic_label_ref): Likewise.
24724         (movdi_high_pic_label_ref): Likewise.
24725         (movdi_lo_sum_pic_label_ref): Likewise.
24727 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
24729         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
24730         custom LIB_SPEC setup.
24732 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
24733             Kito Cheng  <kito.cheng@gmail.com>
24735         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
24736         * config/riscv/freebsd.h: New.
24738 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
24740         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
24741         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
24742         file.
24744 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
24745             Kito Cheng  <kito.cheng@gmail.com>
24747         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
24748         nds32_output_call, nds32_symbol_binds_local_p): New functions.
24749         * config/nds32/nds32-protos.h (nds32_output_call,
24750         nds32_output_return): Declare.
24751         * config/nds32/nds32.md: Refine all the call and return patterns.
24753 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
24755         PR debug/85252
24756         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
24757         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
24759         PR rtl-optimization/84872
24760         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
24761         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
24762         EDGE_CROSSING edge.
24764 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
24766         * expr.c (copy_blkmode_to_reg): Revert 254862.
24767         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
24769 2018-04-06  Richard Biener  <rguenther@suse.de>
24771         PR middle-end/85244
24772         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
24773         after seeing a component reference with an adjacent field.  Treat
24774         refs to arrays at struct end of external decls similar to
24775         refs to unconstrained commons.
24777 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
24779         PR sanitizer/85213
24780         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
24781         look through SAVE_EXPRs with non-side-effects argument.  Adjust
24782         recursive calls.
24783         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
24784         save_p here.
24786 2018-04-06  Richard Biener  <rguenther@suse.de>
24788         PR middle-end/85180
24789         * alias.c (find_base_term): New wrapper around find_base_term
24790         unwinding CSELIB_VAL_PTR changes.
24791         (find_base_term): Do not restore CSELIB_VAL_PTR during the
24792         recursion.
24794 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24796         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
24797         instructions.
24798         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
24799         constant definitions.
24800         ("nop"): lr 0,0 -> nopr r0
24801         ("nop_lr0", "nop_lr1"): New insn definitions.
24803 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
24805         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
24806         NDS32_V3PUSH_AVAILABLE_P macro.
24808 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
24809             Chung-Ju Wu  <jasonwucj@gmail.com>
24811         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
24812         (nds32*-*-*): Add float and fpu_config into supported_defaults.
24813         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
24814         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
24815         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
24816         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
24817         * config/nds32/constraints.md: New constraints and checking for hard
24818         float configuration.
24819         * config/nds32/iterators.md: New mode iterator and attribute for hard
24820         float configuration.
24821         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
24822         patterns.
24823         * config/nds32/nds32-fpu.md: New file.
24824         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
24825         deal with hard float code generation.
24826         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
24827         ARCH_V3S.
24828         (abi_type, float_reg_number): New enum type.
24829         * config/nds32/nds32-predicates.c: New predicates for hard float.
24830         * config/nds32/nds32-protos.h: Declare functions for hard float.
24831         * config/nds32/nds32.c: Implementation for hard float configuration.
24832         * config/nds32/nds32.h: Definitions for hard float configuration.
24833         * config/nds32/nds32.md: Include hard float machine description and
24834         modify patterns for hard float configuration.
24835         * config/nds32/nds32.opt: New options for hard float configuration.
24836         * config/nds32/predicates.md: New predicates for hard float
24837         configuration.
24839 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
24841         * common/config/nds32/nds32-common.c
24842         (nds32_option_optimization_table): Enable -mreleax-hint by default.
24844 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
24846         PR middle-end/85195
24847         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
24848         CONSTRUCTOR_ELT (ctor, ...)->value.
24850 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
24852         PR target/85193
24853         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
24855 2018-04-05  Tom de Vries  <tom@codesourcery.com>
24857         PR target/85204
24858         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
24859         cond jump.
24861 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
24862             Kito Cheng  <kito.cheng@gmail.com>
24864         * config/nds32/constraints.md (U33): Fine-tune checking condition.
24865         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
24866         * config/nds32/nds32.h (nds32_16bit_address_type): Add
24867         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
24869 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
24870             Kito Cheng  <kito.cheng@gmail.com>
24872         * config/nds32/constraints.md (Ufe): New memory constraint.
24873         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
24874         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
24875         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
24876         operands.
24877         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
24878         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
24880 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
24882         * config/nds32/nds32.md: Use optimize_size in the condition for
24883         alu-shift instructions.
24885 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
24887         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
24889 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
24891         * config/nds32/nds32.md (negsi2): Refine pattern.
24893 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
24894             Chung-Ju Wu  <jasonwucj@gmail.com>
24896         * config/nds32/iterators.md (shift_rotate): New code iterator.
24897         (shift): New code attribute.
24898         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
24899         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
24900         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
24901         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
24902         bit-wise operations.
24903         (andsi3, *andsi3): Ditto.
24904         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
24905         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
24906         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
24907         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
24908         nds32_ior_operand, nds32_xor_operand): New predicates.
24910 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
24912         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
24913         (addsi3, subsi3): ... this.
24915 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
24917         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
24919 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
24921         * config/nds32/nds32.md: Adjust indention.
24923 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
24925         * config/nds32/nds32.md (feature): New attribute.
24927 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
24929         * config/nds32/nds32.md (subtype): New attribute.
24931 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
24933         PR target/85203
24934         * config/arm/arm-builtins.c (arm_expand_builtin): Change
24935         expansion to perform a bitwise AND of the argument followed by a
24936         boolean negation of the result.
24938 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
24940         PR rtl-optimization/84878
24941         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
24942         the basic block.  Assert the use reference is not artificial and that
24943         it has an associated insn.
24945 2018-04-04  Michael Matz  <matz@suse.de>
24947         * builtins.c (compute_objsize): Pass correct operand
24948         to array_at_struct_end_p.
24950 2018-04-04  Richard Biener  <rguenther@suse.de>
24952         PR lto/85176
24953         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
24954         from contexts for DINFO_LEVEL_TERSE and below.
24956 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
24958         * config/nds32/nds32-doubleword.md (move_<mode>): Require
24959         resiter_operand condition.
24960         * config/nds32/nds32.md (*move<mode>): Ditto.
24962 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
24963             Monk Chiang  <sh.chiang04@gmail.com>
24965         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
24967 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
24969         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
24971 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
24972             Kito Cheng  <kito.cheng@gmail.com>
24974         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
24975         nds32_cond_code_str, output_cond_branch,
24976         output_cond_branch_compare_zero, nds32_expand_cbranch,
24977         nds32_expand_cstore, nds32_expand_movcc,
24978         nds32_output_cbranchsi4_equality_zero,
24979         nds32_output_cbranchsi4_equality_reg,
24980         nds32_output_cbranchsi4_equality_reg_or_const_int,
24981         nds32_output_cbranchsi4_greater_less_zero: New functions.
24982         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
24983         nds32_expand_cstore, nds32_expand_movcc,
24984         nds32_output_cbranchsi4_equality_zero,
24985         nds32_output_cbranchsi4_equality_reg,
24986         nds32_output_cbranchsi4_equality_reg_or_const_int,
24987         nds32_output_cbranchsi4_greater_less_zero): Declare.
24988         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
24989         nds32_rimm11s_operand): New predicates.
24990         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
24991         * config/nds32/nds32.md: Rewrite all the branch and conditional move
24992         patterns.
24994 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
24996         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
24997         * config/nds32/nds32.md: Ditto.
24998         * config/nds32/pipelines.md: Ditto.
25000 2018-04-04  Richard Biener  <rguenther@suse.de>
25002         PR tree-optimization/85168
25003         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
25004         propagating abnormals.
25006 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
25008         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
25010 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
25011             Kito Cheng  <kito.cheng@gmail.com>
25013         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
25014         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
25015         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
25016         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
25017         * config/nds32/nds32.md (sibcall_internal): New.
25018         (sibcall_register): Remove.
25019         (sibcall_immediate): Remove.
25020         (sibcall_value_internal): New.
25021         (sibcall_value_register): Remove.
25022         (sibcall_value_immediate): Remove.
25023         * config/nds32/predicates.md (nds32_general_register_operand): New.
25024         (nds32_call_address_operand): New.
25026 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
25028         PR rtl-optimization/85167
25029         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
25030         bb_defs if *split_p, instead preinitialize it to NULL.
25032         PR tree-optimization/85156
25033         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
25034         evaluating the argument multiple times.
25036 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
25038         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
25039         than vector.
25040         (_mm_cvtpd_ps): Likewise.
25041         (_mm_cvttpd_epi32): Likewise.
25042         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
25043         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
25044         vector, pixel, and bool following altivec.h include.
25046 2018-04-03  Martin Sebor  <msebor@redhat.com>
25048         * doc/extend.texi (Common Function Attributes): Clarify.
25049         (const attribute): Likewise.
25050         (pure attribute): Likewise.
25052 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
25054         PR target/85169
25055         * config/i386/i386.c (ix86_expand_vector_set): Use
25056         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
25058 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
25060         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
25061         instructions when changing rounding bits to preserve precision bits
25062         in the x87 control word.
25064 2018-04-03  Martin Liska  <mliska@suse.cz>
25066         PR tree-optimization/82491
25067         * rtl.h (strip_offset_and_add): Replace += suboffset with
25068         poly_uint64 () + suboffset.
25070 2018-03-29  Martin Liska  <mliska@suse.cz>
25071             Martin Jambor  <mjambor@suse.cz>
25073         PR ipa/84947
25074         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
25075         param_type is not an integral or pointer type.
25077 2018-04-03  Richard Biener  <rguenther@suse.de>
25079         * sese.h (recompute_all_dominators): Remove.
25081 2018-04-02  Martin Sebor  <msebor@redhat.com>
25083         * doc/invoke.texi (-Wrestrict): Fix typos.
25085 2018-04-02  Jim Wilson  <jimw@sifive.com>
25087         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
25088         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
25089         (<optab>di3, <optab>si3_extend): Likewise.
25090         (<optab>si3_mask, <optab>si3_mask_1): New.
25091         (<optab>di3_mask, <optab>di3_mask_1): New.
25092         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
25093         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
25094         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
25096 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
25098         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
25099         example.
25101 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
25103         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
25104         (nds32_canonicalize_comparison): New function.
25106 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
25107             Kito Cheng  <kito.cheng@gmail.com>
25108             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
25110         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
25111         * config/nds32/constants.md (unspec_volatile_element): Add
25112         UNSPEC_VOLATILE_RELAX_GROUP.
25113         * config/nds32/nds32-relax-opt.c: New file.
25114         * config/nds32/nds32-predicates.c
25115         (nds32_symbol_load_store_p): New function.
25116         * config/nds32/nds32-protos.h
25117         (nds32_symbol_load_store_p): Declare function.
25118         (make_pass_nds32_relax_opt): Declare new rtl pass function.
25119         * config/nds32/nds32.c
25120         (nds32_register_pass): New function to register pass.
25121         (nds32_register_passes): New function to register passes.
25122         * config/nds32/nds32.md (relax_group): New pattern.
25123         * config/nds32/nds32.opt (mrelax-hint): New option.
25124         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
25126 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
25128         * config/nds32/t-nds32: Modify files dependency.
25130 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
25132         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
25133         (PROFILE_HOOK): Define its implementation.
25135 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
25137         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
25138         type and 32-bit size.
25140 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
25142         PR middle-end/85090
25143         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
25144         (V_128_256): New mode iterator.
25145         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
25146         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
25147         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
25148         of V.
25149         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
25150         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
25152 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
25154         PR target/83315
25155         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
25156         NaN inputs correctly.
25158 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
25160         PR target/80546
25161         * config/rs6000/vsx.md (??r): New mode attribute.
25162         (*vsx_mov<mode>_64bit): Use it.
25163         (*vsx_mov<mode>_32bit): Likewise.
25165 2018-03-30  Martin Sebor  <msebor@redhat.com>
25167         PR tree-optimization/84818
25168         * builtins.c (check_access): Use warning_n.
25170 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
25172         PR target/83822
25173         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
25174         condition.
25175         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
25176         condition.
25178 2018-03-30  Julia Koval  <julia.koval@intel.com>
25180         PR target/84413
25181         * x86-tune.def (movx, partial_reg_dependency): Enable for
25182         m_SKYLAKE_AVX512.
25184 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
25186         PR inline-asm/84985
25187         * lra-constraints.c (process_alt_operands): Move setting
25188         this_alternative_matches below.
25190 2018-03-29  Martin Liska  <mliska@suse.cz>
25192         PR lto/84995.
25193         * doc/invoke.texi: Document how LTO works with debug info.
25194         Describe auto-load support of binutils.  Mention 'x86-64'
25195         as valid option value of -march option.
25197 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
25199         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
25201         PR c/85094
25202         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
25203         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
25204         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
25205         checking.
25207 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
25209         PR target/84912
25210         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
25211         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
25212         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
25213         for RS6000_BTM_POWERPC64.
25214         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
25215         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
25216         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
25217         definition.
25218         (DIVDE): Use it.
25219         (DIVDEU): Likewise.
25221 2018-03-28  Carl Love  <cel@us.ibm.com>
25223         Revert
25224         2017-09-27  Carl Love  <cel@us.ibm.com>
25226         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
25227         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
25228         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
25229         fctiw instruction.
25231 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25233         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
25234         instead of __vector bool.
25235         (_mm_max_pu8): Likewise.
25236         (_mm_min_pi16): Likewise.
25238 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
25240         PR target/84912
25241         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
25242         (DIVWEUO): Likewise.
25243         (DIVDEO): Likewise.
25244         (DIVDEUO): Likewise.
25245         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
25246         DIVWEUO and DIVDEUO.
25247         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
25248         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
25249         (div_extend): Likewise.
25250         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
25251         builtin function.
25252         (__builtin_divweuo): Likewise.
25253         (__builtin_divdeo): Likewise.
25254         (__builtin_divdeuo): Likewise.
25256 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
25258         PR target/85095
25259         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
25260         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
25262         PR tree-optimization/82004
25263         * gimple-match-head.c (optimize_pow_to_exp): New function.
25264         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
25265         Don't fold to exp if optimize_pow_to_exp is false.
25267 2018-03-28  Martin Liska  <mliska@suse.cz>
25269         PR other/84819
25270         * calls.c (initialize_argument_information): Fix trailing space.
25271         * common.opt: Fix typo and provide better explanation for
25272         -fsanitize-coverage option.
25273         * config/i386/i386.opt: Fix typo.
25275 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
25276             Martin Liska  <mliska@suse.cz>
25278         PR sanitizer/85081
25279         * gimplify.c (asan_poison_variable): Don't do the check for
25280         gimplify_omp_ctxp here.
25281         (gimplify_decl_expr): Do it here.
25282         (gimplify_target_expr): Likewise.
25284 2018-03-28  Martin Liska  <mliska@suse.cz>
25286         PR target/84988
25287         * config/i386/i386.c (ix86_function_arg_advance): Do not call
25288         chkp_type_bounds_count if MPX is not enabled.
25290 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
25292         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
25294 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
25296         PR target/84914
25297         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
25298         function to create the function decl for complex long double
25299         multiply and divide for -mabi=ieeelongdouble.
25300         (init_float128_ieee): Call it.
25302 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
25304         PR target/85044
25305         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
25306         -fcf-protection=branch -mibt.
25307         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
25309 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
25311         PR target/81863
25312         * config/arm/arm.c (arm_valid_symbolic_address): Handle
25313         arm_word_relocations.
25315 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
25317         PR target/85056
25318         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
25319         extern array declarations.
25321 2018-03-27  Richard Biener  <rguenther@suse.de>
25323         PR middle-end/84067
25324         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
25325         explicit single_use checks.
25327 2018-03-27  Richard Biener  <rguenther@suse.de>
25329         PR tree-optimization/85082
25330         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
25331         Valueize the VUSE.
25333 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
25335         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
25336         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
25337         Turn on fasynchronous-unwind-tables and funwind-tables.
25339 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
25341         PR target/85073
25342         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
25343         (*bmi_blsr_<mode>_ccz): Ditto.
25345 2018-03-26  Tom de Vries  <tom@codesourcery.com>
25347         PR tree-optimization/85063
25348         * omp-general.c (offloading_function_p): New function.  Factor out
25349         of ...
25350         * omp-offload.c (pass_omp_target_link::gate): ... here.
25351         * omp-general.h (offloading_function_p): Declare.
25352         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
25353         with attribute omp declare target for offloading functions.
25355 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
25357         PR tree-optimization/84005
25358         * tree-data-ref.h (get_base_for_alignment): Declare.
25359         * tree-data-ref.c (get_base_for_alignment_1): New function.
25360         (get_base_for_alignment): Likewise.
25361         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
25362         get_base_for_alignment to find a suitable base object, instead
25363         of always using drb->base_address.
25365 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
25367         PR inline-asm/85022
25368         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
25369         known size by default.
25371 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
25373         PR inline-asm/85030
25374         * lra-constraints.c (process_alt_operands): Don't match BLKmode
25375         and non BLKmode operands.
25377 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25379         PR target/85026
25380         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
25381         Clean up attributes.
25383 2018-03-23  Richard Biener  <rguenther@suse.de>
25385         PR debug/85020
25386         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
25387         we are going to emit early debug for LTO.
25389 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
25391         PR inline-asm/85034
25392         * function.c (match_asm_constraints_1): Don't optimize if input
25393         doesn't satisfy general_operand predicate for output's mode.
25395         PR inline-asm/85022
25396         * alias.c (write_dependence_p): Don't require for x_canonicalized
25397         non-VOIDmode if x has VOIDmode.
25399         PR sanitizer/85029
25400         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
25401         just don't try to optimize it rather than assert it never happens.
25403 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
25405         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
25406         macro expansions for definition of ST_INTERNAL_<mode> and
25407         LD_INTERNAL_<mode> builtins.
25408         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
25409         Remove prototype.
25410         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
25411         function.
25412         (altivec_expand_st_builtin): Likewise.
25413         (altivec_expand_builtin): Remove calls to deleted functions.
25414         (rs6000_address_for_altivec): Delete this function.
25415         * config/rs6000/vector.md: Remove expands for
25416         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
25418 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
25420         PR target/84826
25421         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
25422         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
25423         re-computing once computed.
25424         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
25425         (arm_init_machine_status): Initialize
25426         machine->static_chain_stack_bytes.
25428 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
25430         PR target/84760
25431         * doc/extend.texi: Add four new prototypes for vec_ld.
25432         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
25433         definitions for more logical presentation.
25434         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
25435         entries for V1TI variants of __builtin_altivec_ld builtin.
25436         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
25437         handling of V1TI variant of LVX icode pattern.
25438         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
25439         (rs6000_gimple_fold_builtin): Likewise.
25440         (altivec_init_builtins): Add code to define
25441         __builtin_altivec_lvx_v1ti function.
25443 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
25445         PR inline-asm/84941
25446         * function.c (match_asm_constraints_1): Don't do the optimization
25447         if input isn't a REG, SUBREG, MEM or constant.
25449 2018-03-22  Tom de Vries  <tom@codesourcery.com>
25451         PR tree-optimization/84956
25452         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
25453         bb_has_abnormal_pred.
25455 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
25457         PR sanitizer/85018
25458         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
25459         DECL_INITIAL (decl) to decl at the end.
25460         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
25461         adjust the comment.
25463 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
25465         * doc/extend.texi (__builtin_tgmath): Document when complex
25466         integer types are treated as _Complex _Float64.
25468 2018-03-21  Tom de Vries  <tom@codesourcery.com>
25470         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
25472 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
25474         PR tree-optimization/84960
25475         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
25476         if it is ENTRY block, move them into single succ of ENTRY in that case.
25478 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
25480         PR tree-optimization/84811
25481         * poly-int.h (poly_span_traits): Remove the T3 parameter and
25482         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
25483         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
25484         (known_subrange_p): Update accordingly.  Cast each value involved
25485         in the size comparison, rather than casting the result of the
25486         subtraction.
25488 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
25490         PR tree-optimization/84982
25491         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
25492         by flipping the least significant bit rather than all bits from
25493         bitpos to bitpos + bitsize - 1.
25495 2018-03-21  Nathan Sidwell  <nathan@acm.org>
25497         * doc/extend.texi (Deprecated Features): Remove mention of
25498         long-deleted deprecations.
25500 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
25502         PR jit/84288
25503         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
25504         * configure: Regenerate.
25506 2018-03-21  Tom de Vries  <tom@codesourcery.com>
25508         PR tree-optimization/83126
25509         * tree-parloops.c (num_phis): New function.
25510         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
25512 2018-03-21  Nathan Sidwell  <nathan@acm.org>
25514         * doc/extend.texi (Deprecated Features): Update deprecated flags,
25515         mention anon-struct/union members and trailing attributes.
25517 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
25519         PR tree-optimization/84969
25520         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
25521         builtin memset partitions if they set different rhs values.
25523 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
25525         PR rtl-optimization/84989
25526         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
25527         VEC_DUPLICATE with scalar result mode.
25529 2018-03-21  Martin Liska  <mliska@suse.cz>
25531         PR ipa/84963
25532         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
25533         not intended return statement.
25535 2018-03-21  Martin Liska  <mliska@suse.cz>
25537         PR target/84988
25538         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
25539         (chkp_find_bound_slots_1): Limit number of iterations.
25541 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
25543         PR target/84838
25544         * Minor grammar fixes for x86 options.
25546 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
25548         PR debug/84875
25549         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
25550         holding REG_CFA_RESTORE notes, instead turn them into a USE.
25552 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
25554         PR target/83789
25555         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
25556         (altivec_lvx_<mode>_1op): Likewise.
25557         (altivec_stvx_<mode>_2op): Likewise.
25558         (altivec_stvx_<mode>_1op): Likewise.
25559         (altivec_lvx_<VM2:mode>): New define_expand.
25560         (altivec_stvx_<VM2:mode>): Likewise.
25561         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
25562         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
25563         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
25564         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
25565         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
25566         (rs6000_gen_lvx): Likewise.
25567         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
25568         (altivec_expand_stv_builtin): Likewise.
25569         (altivec_expand_builtin): Likewise.
25570         * config/rs6000/vector.md: Likewise.
25572 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25574         PR target/82518
25575         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
25576         BYTES_BIG_ENDIAN.
25578 2018-03-20  Richard Biener  <rguenther@suse.de>
25580         PR target/84986
25581         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
25582         sign-conversions as zero, fall back to standard scalar_stmt
25583         cost for the rest.
25585 2018-03-20  Martin Liska  <mliska@suse.cz>
25587         PR ipa/84825
25588         * predict.c (rebuild_frequencies): Handle case when we have
25589         PROFILE_ABSENT, but flag_guess_branch_prob is false.
25591 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
25593         PR target/84990
25594         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
25595         flag_section_anchors.
25596         * varasm.c (use_blocks_for_decl_p): Remove hack for
25597         dw2_force_const_mem.
25599         PR target/84845
25600         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
25601         to ...
25602         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
25603         be created, use lowpart_subreg of operands[0] rather than operands[0]
25604         itself.
25605         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
25606         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
25607         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
25608         and n constraint instead of aarch64_shift_imm_di and Usd.
25609         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
25610         (*aarch64_<optab>_reg_minus<mode>3): ... this.
25612 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
25614         PR target/82989
25615         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
25616         to favor GPR over NEON registers.
25617         (<shift>di3_neon): Likewise.
25619 2018-03-20  Tom de Vries  <tom@codesourcery.com>
25621         PR target/84952
25622         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
25623         (nvptx_process_pars): Emit bar.sync asap and alap.
25625 2018-03-20  Tom de Vries  <tom@codesourcery.com>
25627         PR target/84954
25628         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
25629         seen_label if seen_label is already set.
25631 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
25633         PR target/84945
25634         * config/i386/i386.c (fold_builtin_cpu): For features above 31
25635         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
25636         Use 1U instead of 1.  Formatting fixes.
25638         PR c/84953
25639         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
25640         instead of TREE_TYPE (s1) for the return value.
25642 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
25644         PR tree-optimization/84946
25645         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
25646         bitsize + bitsize in poly_uint64 rather than poly_int64.
25648         PR sanitizer/78651
25649         * dwarf2asm.c: Include fold-const.c.
25650         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
25651         of decl rather than decl itself.
25653         PR rtl-optimization/84643
25654         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
25656 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
25658         PR sanitizer/78651
25659         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
25660         calling assemble_variable.
25662 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
25664         PR target/81647
25665         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
25666         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
25668 2018-03-19  Jim Wilson  <jimw@sifive.com>
25670         PR bootstrap/84856
25671         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
25672         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
25673         (riscv_first_stack_step): Likewise.
25674         (riscv_option_override): Use STACK_BOUNDARY instead of
25675         MIN_STACK_BOUNDARY.
25676         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
25677         MIN_STACK_BOUNDARY.
25678         (BIGGEST_ALIGNMENT): Set to 128.
25679         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
25680         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
25681         STACK_BOUNDARY.
25683 2018-03-19  Richard Biener  <rguenther@suse.de>
25685         PR tree-optimization/84933
25686         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
25687         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
25689 2018-03-19  Richard Biener  <rguenther@suse.de>
25691         PR tree-optimization/84859
25692         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
25693         (cond_if_else_store_replacement): Perform sinking operation on
25694         single-store BBs regardless of MAX_STORES_TO_SINK setting.
25695         Generalize what a BB with a single eligible store is.
25697 2018-03-19  Richard Biener  <rguenther@suse.de>
25699         PR tree-optimization/84929
25700         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
25701         chrec_is_positive against non-chrec arg.
25703 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
25705         PR target/84711
25706         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
25708 2018-03-18  Martin Liska  <mliska@suse.cz>
25710         PR rtl-optimization/84635
25711         * regrename.c (build_def_use): Use matches_mode only when
25712         matches >= 0.
25714 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
25716         PR tree-optimization/84913
25717         * tree-vect-loop.c (vectorizable_reduction): Don't try to
25718         vectorize chains of COND_EXPRs.
25720 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
25722         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
25724 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
25726         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
25728 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
25730         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
25732 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
25733             Kito Cheng  <kito.cheng@gmail.com>
25735         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
25736         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
25737         (nds32_adjust_reg_alloc_order): New function.
25738         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
25740 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
25742         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
25743         nds32_print_operand, nds32_print_operand_address): Use
25744         HOST_WIDE_INT_PRINT_DEC instead.
25746 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
25748         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
25750 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
25752         PR target/84902
25753         * config/i386/i386.c (initial_ix86_tune_features,
25754         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
25755         unsigned long long.
25756         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
25757         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
25758         rather than 1u << ix86_tune.  Formatting fix.
25759         (ix86_option_override_internal): Change ix86_arch_mask from
25760         unsigned int to unsigned HOST_WIDE_INT, initialize to
25761         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
25762         (ix86_function_specific_restore): Likewise.
25764 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
25766         PR target/84899
25767         * postreload.c (reload_combine_recognize_pattern): Perform
25768         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
25769         truncate_int_for_mode the result for the destination's mode.
25771         PR c/84909
25772         * hsa-gen.c (mem_type_for_type): Fix comment typo.
25773         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
25774         Likewise.
25775         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
25776         Likewise.
25778 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
25780         PR target/84876
25781         * lra-assigns.c (lra_split_hard_reg_for): Don't use
25782         regno_allocno_class_array and sorted_pseudos.
25783         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
25784         insns where regno is used.
25786 2018-03-16  Martin Liska  <mliska@suse.cz>
25788         PR ipa/84833
25789         * multiple_target.c (create_dispatcher_calls): Redirect
25790         reference in the symbol table.
25792 2018-03-16  Martin Liska  <mliska@suse.cz>
25794         PR ipa/84722
25795         * multiple_target.c (create_dispatcher_calls): Redirect also
25796         an alias.
25798 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
25800         PR c++/79937
25801         PR c++/82410
25802         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
25803         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
25804         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
25806 2018-03-16  Julia Koval  <julia.koval@intel.com>
25808         * doc/invoke.texi (Skylake Server): Add CLWB.
25809         Cannonlake): Remove CLWB.
25811 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
25813         PR tree-optimization/84841
25814         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
25815         1 << 3.
25816         (FLOAT_ONE_CONST_TYPE): Define.
25817         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
25818         (sort_by_operand_rank): Put entries with higher constant_type last
25819         rather than first to match comments.
25821 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
25823         * config/nios2/nios2.md (movsi_internal): Fix thinko in
25824         split predicate.
25826 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
25828         PR c++/79085
25829         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
25830         check and use address of target always.
25832 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
25834         PR target/84574
25835         * config/i386/i386.c (indirect_thunk_needed): Update comments.
25836         (indirect_thunk_bnd_needed): Likewise.
25837         (indirect_thunks_used): Likewise.
25838         (indirect_thunks_bnd_used): Likewise.
25839         (indirect_return_needed): New.
25840         (indirect_return_bnd_needed): Likewise.
25841         (output_indirect_thunk_function): Add a bool argument for
25842         function return.
25843         (output_indirect_thunk_function): Don't generate alias for
25844         function return thunk.
25845         (ix86_code_end): Call output_indirect_thunk_function to generate
25846         function return thunks.
25847         (ix86_output_function_return): Set indirect_return_bnd_needed
25848         and indirect_return_needed instead of indirect_thunk_bnd_needed
25849         and indirect_thunk_needed.
25851 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
25853         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
25854         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
25855         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
25857 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
25858             Paul Hua <paul.hua.gm@gmail.com>
25860         PR c/84852
25861         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
25863 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
25865         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
25866         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
25867         resp. SFmode cases.
25869 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
25871         PR target/84711
25872         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
25873         instead of GET_MODE_SIZE when comparing Units.
25875 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
25877         PR target/68256
25878         * varasm.c (hash_section): Return an unchangeble hash value
25879         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
25880         Return !aarch64_can_use_per_function_literal_pools_p ().
25882 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
25884         PR target/84860
25885         * optabs.c (emit_conditional_move): Pass address of cmode's copy
25886         rather than address of cmode as last argument to prepare_cmp_insn.
25888 2018-03-15  Julia Koval  <julia.koval@intel.com>
25890         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
25891         F_AVX512VNNI, F_AVX512BITALG): New.
25893 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
25895         PR target/83451
25896         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
25897         insn for floating-point loads and stores.
25899 2018-03-14  Carl Love  <cel@us.ibm.com>
25901         * config/rs6000/rs6000-c.c: Add macro definitions for
25902         ALTIVEC_BUILTIN_VEC_PERMXOR.
25903         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
25904         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
25905         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
25906         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
25907         UNSPEC_VPERMXOR.
25908         * config/doc/extend.texi: Add prototypes for vec_permxor.
25910 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
25912         PR c/84852
25913         * diagnostic-show-locus.c (class layout_point): Convert m_line
25914         from int to linenum_type.
25915         (line_span::comparator): Use linenum "compare" function when
25916         comparing line numbers.
25917         (test_line_span): New function.
25918         (layout_range::contains_point): Convert param "row" from int to
25919         linenum_type.
25920         (layout_range::intersects_line_p): Likewise.
25921         (layout::will_show_line_p): Likewise.
25922         (layout::print_source_line): Likewise.
25923         (layout::should_print_annotation_line_p): Likewise.
25924         (layout::print_annotation_line): Likewise.
25925         (layout::print_leading_fixits): Likewise.
25926         (layout::annotation_line_showed_range_p): Likewise.
25927         (struct line_corrections): Likewise for field m_row.
25928         (line_corrections::line_corrections): Likewise for param "row".
25929         (layout::print_trailing_fixits): Likewise.
25930         (layout::get_state_at_point): Likewise.
25931         (layout::get_x_bound_for_row): Likewise.
25932         (layout::print_line): Likewise.
25933         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
25934         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
25935         * input.c (selftest::test_linenum_comparisons): New function.
25936         (selftest::input_c_tests): Call it.
25937         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
25938         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
25939         * selftest.h (ASSERT_GT): New macro.
25940         (ASSERT_GT_AT): New macro.
25941         (ASSERT_LT): New macro.
25942         (ASSERT_LT_AT): New macro.
25944 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
25946         PR rtl-optimization/84780
25947         * combine.c (distribute_links): Don't make a link based on pc_rtx.
25949 2018-03-14  Martin Liska  <mliska@suse.cz>
25951         * tree.c (record_node_allocation_statistics): Use
25952         get_stats_node_kind.
25953         (get_stats_node_kind): New function extracted from
25954         record_node_allocation_statistics.
25955         (free_node): Use get_stats_node_kind.
25957 2018-03-14  Richard Biener  <rguenther@suse.de>
25959         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
25960         that the value-set of ANTIC_IN doesn't grow.
25962         Revert
25963         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
25964         member.
25965         (BB_VISITED_WITH_VISITED_SUCCS): New define.
25966         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
25968 2018-03-14  Julia Koval  <julia.koval@intel.com>
25970         * config.gcc (icelake-client, icelake-server): New.
25971         (icelake): Remove.
25972         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
25973         (initial_ix86_arch_features): Ditto.
25974         (PTA_SKYLAKE): Add SGX.
25975         (PTA_ICELAKE): Remove.
25976         (PTA_ICELAKE_CLIENT): New.
25977         (PTA_ICELAKE_SERVER): New.
25978         (ix86_option_override_internal): Split up icelake on icelake client and
25979         icelake server.
25980         (get_builtin_code_for_version): Ditto.
25981         (fold_builtin_cpu): Ditto.
25982         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
25983         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
25984         * config/i386/i386.h (processor_type): Ditto.
25985         * doc/invoke.texi: Ditto.
25987 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
25989         PR sanitizer/83392
25990         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
25991         INTEGER_CST offset, add it together with bitpos / 8 and
25992         sign extend based on POINTER_SIZE.
25994         PR target/84844
25995         Revert
25996         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
25998         PR target/78090
25999         * config/i386/constraints.md (Yc): New register constraint.
26000         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
26001         Use Yc constraint for alternative 2 of operand 0.  Remove
26002         preferred_for_speed attribute.
26004 2018-03-14  Richard Biener  <rguenther@suse.de>
26006         PR tree-optimization/84830
26007         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
26008         with the old one to avoid oscillations.
26010 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
26012         PR target/83712
26013         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
26014         pseudos.
26015         (assign_by_spills): Return a flag of reload assignment failure.
26016         Do not process the reload assignment failures.  Do not spill other
26017         reload pseudos if they has the same reg class.  Update n if
26018         necessary.
26019         (lra_assign): Add a return arg.  Set up from the result of
26020         assign_by_spills call.
26021         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
26022         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
26023         usage_insns if it is not NULL.
26024         (spill_hard_reg_in_range): New function.
26025         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
26026         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
26027         function prototypes.
26028         (lra_assign): Change prototype.
26029         * lra.c (lra): Add code to deal with fails by splitting hard reg
26030         live ranges.
26032 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
26034         * config/riscv/riscv.opt (mrelax): New option.
26035         * config/riscv/riscv.c (riscv_file_start): Emit ".option
26036         "norelax" when riscv_mrelax is disabled.
26037         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
26039 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
26041         PR target/84743
26042         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
26043         reassociation for int modes.
26045 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
26047         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
26048         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
26049         for big-endian.
26050         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
26051         * config/aarch64/aarch64-sve.md
26052         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
26053         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
26054         (*extend<mode><Vwide>2): Rename to...
26055         (aarch64_sve_extend<mode><Vwide>2): ...this.
26056         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
26057         renaming the old pattern to...
26058         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
26059         unsigned packs.
26060         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
26061         define_expand, renaming the old pattern to...
26062         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
26063         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
26064         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
26065         account when deciding which SVE instruction the optab should use.
26066         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
26068 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
26070         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
26071         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
26072         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
26073         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
26074         (tlsdesc_small_<mode>): Turn a define_expand and use
26075         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
26076         (tlsdesc_small_advsimd_<mode>): ...this.
26077         (tlsdesc_small_sve_<mode>): New pattern.
26079 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
26081         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
26082         (UNSPEC_UMUL_HIGHPART): New constants.
26083         (MUL_HIGHPART): New int iteraor.
26084         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
26085         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
26086         define_expand.
26087         (*<su>mul<mode>3_highpart): New define_insn.
26089 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
26091         PR lto/84805
26092         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
26093         incomplete types.
26095 2018-03-13  Martin Liska  <mliska@suse.cz>
26097         PR ipa/84658.
26098         * (sem_item_optimizer::sem_item_optimizer): Initialize new
26099         vector.
26100         (sem_item_optimizer::~sem_item_optimizer): Release it.
26101         (sem_item_optimizer::merge_classes): Register variable aliases.
26102         (sem_item_optimizer::fixup_pt_set): New function.
26103         (sem_item_optimizer::fixup_points_to_sets): Likewise.
26104         * ipa-icf.h: Declare new variables and functions.
26106 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
26108         PR middle-end/84834
26109         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
26110         integer_pow2p@2 and test integer_pow2p in condition.
26111         (A < 0 ? C : 0): Similarly for @1.
26113         PR middle-end/84831
26114         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
26115         characters starting at p contain '\0' character, don't look beyond
26116         that.
26118         PR target/84827
26119         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
26120         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
26122         PR target/84828
26123         * reg-stack.c (change_stack): Change update_end var from int to
26124         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
26125         also call set_block_for_insn on the newly added insns and rescan.
26127         PR target/84786
26128         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
26129         on the last operand.
26131         PR c++/84704
26132         * tree.c (stabilize_reference_1): Return save_expr (e) for
26133         STATEMENT_LIST even if it doesn't have side-effects.
26135 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
26137         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
26139 2018-03-12  Renlin Li  <renlin.li@arm.com>
26141         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
26142         aarch64_output_scalar_simd_mov_immediate.
26144 2018-03-12  Martin Sebor  <msebor@redhat.com>
26146         PR tree-optimization/83456
26147         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
26148         for perfectly overlapping calls to memcpy.
26149         (gimple_fold_builtin_memory_chk): Same.
26150         (gimple_fold_builtin_strcpy): Handle no-warning.
26151         (gimple_fold_builtin_stxcpy_chk): Same.
26152         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
26154 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
26156         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
26157         parameter.  Use it for SFmode.
26158         (rs6000_function_arg_advance_1): Adjust.
26159         (rs6000_function_arg): Adjust.
26160         (rs6000_gimplify_va_arg): Pass false for that new parameter.
26162 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
26164         PR rtl-optimization/84169
26165         PR rtl-optimization/84780
26166         * combine.c (can_combine_p): Check for a 2-insn combination whether
26167         the destination register is used between the two insns, too.
26169 2018-03-12  Richard Biener  <rguenther@suse.de>
26171         PR tree-optimization/84803
26172         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
26173         for refs DR analysis didn't process.
26175 2018-03-12  Richard Biener  <rguenther@suse.de>
26177         PR tree-optimization/84777
26178         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
26179         force-vectorize loops ignore whether we are optimizing for size.
26181 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
26183         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
26184         (TARGET_MD_ASM_ADJUST): Define.
26186 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
26187             Kito Cheng  <kito.cheng@gmail.com>
26188             Chung-Ju Wu  <jasonwucj@gmail.com>
26190         * config/nds32/nds32.c (nds32_compute_stack_frame,
26191         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
26192         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
26193         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
26194         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
26195         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
26196         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
26197         * config/nds32/nds32.md (prologue, epilogue): Use macro
26198         NDS32_V3PUSH_AVAILABLE_P to do checking.
26200 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
26202         PR debug/58150
26203         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
26204         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
26205         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
26206         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
26207         addition of most attributes on !orig_type_die or the attribute not
26208         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
26210 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
26211             Chung-Ju Wu  <jasonwucj@gmail.com>
26213         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
26214         __NDS32_VH__ macro.
26215         * config/nds32/nds32.opt (mvh): New option.
26217 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
26218             Chung-Ju Wu  <jasonwucj@gmail.com>
26220         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
26221         function.
26222         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
26223         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
26224         definition.
26226 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
26227             Chung-Ju Wu  <jasonwucj@gmail.com>
26229         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
26230         function.
26231         * config/nds32/nds32-multiple.md (strlensi): New pattern.
26232         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
26234 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
26235             Kito Cheng  <kito.cheng@gmail.com>
26236             Chung-Ju Wu  <jasonwucj@gmail.com>
26238         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
26239         UNSPEC_FFMISM and UNSPEC_FLMISM.
26240         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
26241         for ffb, ffmism and flmism.
26242         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
26243         (unspec_ffmism): Ditto.
26244         (unspec_flmism): Ditto.
26245         (nds32_expand_builtin_impl): Check if string extension is available.
26246         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
26247         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
26249 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
26251         Reverting patch:
26252         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
26254         PR target/83712
26255         * lra-assigns.c (assign_by_spills): Return a flag of reload
26256         assignment failure.  Do not process the reload assignment
26257         failures.  Do not spill other reload pseudos if they has the same
26258         reg class.
26259         (lra_assign): Add a return arg.  Set up from the result of
26260         assign_by_spills call.
26261         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
26262         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
26263         usage_insns if it is not NULL.
26264         (spill_hard_reg_in_range): New function.
26265         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
26266         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
26267         function prototypes.
26268         (lra_assign): Change prototype.
26269         * lra.c (lra): Add code to deal with fails by splitting hard reg
26270         live ranges.
26272 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
26274         PR target/84807
26275         * config/i386/i386.opt: Replace Enforcment with Enforcement.
26277 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
26279         PR debug/84620
26280         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
26281         (dw_val_node): Add val_symbolic_view.
26282         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
26283         (symview_upper_bound): New.
26284         (new_line_info_table): Initialize symviews_since_reset.
26285         (dwarf2out_source_line): Count symviews_since_reset and set
26286         symview_upper_bound.
26287         (dw_val_equal_p): Handle symview.
26288         (add_AT_symview): New.
26289         (print_dw_val): Handle symview.
26290         (attr_checksum, attr_checksum_ordered): Likewise.
26291         (same_dw_val_p, size_of_die): Likewise.
26292         (value_format, output_die): Likewise.
26293         (add_high_low_attributes): Use add_AT_symview for entry_view.
26294         (dwarf2out_finish): Reset symview_upper_bound, clear
26295         zero_view_p.
26297 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
26299         PR target/83969
26300         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
26301         Add strict argument and use it.
26302         (rs6000_split_multireg_move): Update for new strict argument.
26303         (mem_operand_gpr): Disallow all non-offsettable addresses.
26304         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
26306 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
26308         PR target/84772
26309         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
26310         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
26311         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
26313         PR c++/84767
26314         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
26315         decl, use remap_type if we want to use the type.
26317 2018-03-09  Martin Sebor  <msebor@redhat.com>
26319         PR tree-optimization/84526
26320         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
26321         Remove dead code.
26322         (builtin_access::generic_overlap): Be prepared to handle non-array
26323         base objects.
26325 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
26327         PR rtl-optimization/84682
26328         * lra-constraints.c (process_address_1): Check is_address flag
26329         for address constraints.
26330         (process_alt_operands): Likewise.
26331         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
26332         preprocess_constraints.
26333         * recog.h (preprocess_constraints): Add oploc parameter.
26334         Adjust callers.
26335         * recog.c (preprocess_constraints): Test address_operand for
26336         CT_ADDRESS constraints.
26338 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
26340         PR target/83712
26341         * lra-assigns.c (assign_by_spills): Return a flag of reload
26342         assignment failure.  Do not process the reload assignment
26343         failures.  Do not spill other reload pseudos if they has the same
26344         reg class.
26345         (lra_assign): Add a return arg.  Set up from the result of
26346         assign_by_spills call.
26347         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
26348         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
26349         usage_insns if it is not NULL.
26350         (spill_hard_reg_in_range): New function.
26351         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
26352         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
26353         function prototypes.
26354         (lra_assign): Change prototype.
26355         * lra.c (lra): Add code to deal with fails by splitting hard reg
26356         live ranges.
26358 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26360         PR target/83193
26361         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
26362         Accept complain bool parameter.  Only emit errors if it is true.
26363         (arm_parse_cpu_option_name): Likewise.
26364         (arm_target_thumb_only): Adjust callers of the above.
26365         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
26366         prototype to take a default true bool parameter.
26367         (arm_parse_arch_option_name): Likewise.
26369 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
26370             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
26372         PR jit/64089
26373         PR jit/84288
26374         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
26375         * configure: Regenerate.
26376         * configure.ac ("linker --version-script option"): New.
26377         ("linker soname option"): New.
26379 2018-03-09  Richard Biener  <rguenther@suse.de>
26381         PR tree-optimization/84775
26382         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
26383         immediate uses of predicate stmts and mark them modified.
26385         Revert
26386         PR tree-optimization/84178
26387         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
26388         to caller.
26389         (version_loop_for_if_conversion): Delay update_ssa call.
26390         (tree_if_conversion): Delay update_ssa until after predicate
26391         insertion.
26393 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
26395         PR target/84763
26396         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
26397         when the function accesses prior frames.
26399 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
26401         PR debug/84456
26402         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
26403         gen_llsym, otherwise call maybe_gen_llsym.
26405         PR inline-asm/84742
26406         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
26407         has ',' character inside of it.
26409 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26411         PR target/84748
26412         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
26413         as clobbering CC_REGNUM.
26415 2018-03-08  Richard Biener  <rguenther@suse.de>
26417         PR middle-end/84552
26418         * tree-scalar-evolution.c: Include tree-into-ssa.h.
26419         (follow_copies_to_constant): Do not follow SSA names registered
26420         for update.
26422 2018-03-08  Richard Biener  <rguenther@suse.de>
26424         PR tree-optimization/84178
26425         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
26426         to caller.
26427         (version_loop_for_if_conversion): Delay update_ssa call.
26428         (tree_if_conversion): Delay update_ssa until after predicate
26429         insertion.
26431 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
26433         PR tree-optimization/84178
26434         * tree-if-conv.c (release_bb_predicate): Remove the
26435         the assertion that the stmts have NULL use_ops.
26436         Discard the statements, asserting that they haven't
26437         yet been added to a BB.
26439 2018-03-08  Richard Biener  <rguenther@suse.de>
26441         PR tree-optimization/84746
26442         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
26443         (phi_translate): Pass in destination ANTIC_OUT set.
26444         (phi_translate_1): Likewise.  For a simplified result lookup
26445         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
26446         (phi_translate_set): Adjust.
26447         (do_pre_regular_insertion): Likewise.
26448         (do_pre_partial_partial_insertion): Likewise.
26450 2018-03-08  Martin Liska  <mliska@suse.cz>
26452         PR gcov-profile/84735
26453         * doc/gcov.texi: Document usage of profile files.
26454         * gcov-io.h: Document changes in the format.
26456 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
26458         PR debug/84404
26459         PR debug/84408
26460         * dwarf2out.c (struct dw_line_info_table): Update comments for
26461         view == -1.
26462         (FORCE_RESET_NEXT_VIEW): New.
26463         (FORCE_RESETTING_VIEW_P): New.
26464         (RESETTING_VIEW_P): Check for -1 too.
26465         (ZERO_VIEW_P): Likewise.
26466         (new_line_info_table): Force-reset next view.
26467         (dwarf2out_begin_function): Likewise.
26468         (dwarf2out_source_line): Simplify zero_view_p initialization.
26469         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
26470         view directly.  Omit view when omitting .loc at line 0.
26472 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
26474         PR tree-optimization/84740
26475         * tree-switch-conversion.c (process_switch): Call build_constructors
26476         only if info.phi_count is non-zero.
26478         PR tree-optimization/84739
26479         * tree-tailcall.c (find_tail_calls): Check call arguments against
26480         DECL_ARGUMENTS (current_function_decl) rather than
26481         DECL_ARGUMENTS (func) when checking for tail recursion.
26483 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
26485         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
26486         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
26487         Volker Reichelt's entry and add entries for people that perform
26488         GCC fuzzy testing and report numerous bugs.
26490 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
26492         PR target/82411
26493         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
26494         readonly data in sdata, if that is disabled.
26495         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
26496         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
26497         -mreadonly-in-sdata option.
26499 2018-03-07  Martin Sebor  <msebor@redhat.com>
26501         PR tree-optimization/84468
26502         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
26503         basic block when looking for nul assignment.
26505 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
26507         PR target/84277
26508         * except.h (output_function_exception_table): Adjust prototype.
26509         * except.c (output_function_exception_table): Remove FNNAME parameter
26510         and add SECTION parameter.  Ouput one part of the table at a time.
26511         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
26512         the first part of the exception table and emit unwind directives.
26513         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
26514         (i386_pe_seh_cold_init): Likewise.
26515         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
26516         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
26517         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
26518         (ix86_output_call_insn): Emit a nop in one more case for SEH.
26519         * config/i386/winnt.c: Include except.h.
26520         (struct seh_frame_state): Add reg_offset, after_prologue and
26521         in_cold_section fields.
26522         (i386_pe_seh_end_prologue): Set seh->after_prologue.
26523         (i386_pe_seh_cold_init): New function.
26524         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
26525         to seh->in_cold_section.
26526         (seh_emit_push): Record the offset of the push.
26527         (seh_emit_save): Record the offet of the save.
26528         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
26529         Test seh->after_prologue to disregard the epilogue.
26530         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
26531         (i386_pe_end_cold_function): New function.
26533 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
26535         PR fortran/84565
26536         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
26537         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
26539         PR c++/84704
26540         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
26541         on tmp_var.
26542         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
26543         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
26545         PR middle-end/84723
26546         * multiple_target.c: Include tree-inline.h and intl.h.
26547         (expand_target_clones): Diagnose and fail if node->definition and
26548         !tree_versionable_function_p (node->decl).
26550 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
26552         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
26553         sprint_ul.
26554         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
26555         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
26556         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
26558 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
26560         PR target/84710
26561         * combine.c (try_combine): Use reg_or_subregno instead of handling
26562         just paradoxical SUBREGs and REGs.
26564 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
26566         * config/arc/arc.c (arc_finalize_pic): Remove function.
26567         (arc_must_save_register): We use single base PIC register, remove
26568         checks to save/restore the PIC register.
26569         (arc_expand_prologue): Likewise.
26570         * config/arc/arc-protos.h (arc_set_default_type_attributes):
26571         Remove.
26572         (arc_verify_short): Likewise.
26573         (arc_attr_type): Likewise.
26574         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
26575         (walk_stores): Likewise.
26576         (arc_address_cost): Make it static.
26577         (arc_verify_short): Likewise.
26578         (branch_dest): Likewise.
26579         (arc_attr_type): Likewise.
26580         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
26581         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
26582         (arc_final_prescan_insn): Remove inserting the nops due to
26583         hardware hazards.  It is done in reorg step.
26584         (insn_length_variant_t): Remove.
26585         (insn_length_parameters_t): Likewise.
26586         (arc_insn_length_parameters): Likewise.
26587         (arc_get_insn_variants): Likewise.
26588         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
26590 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
26592         PR inline-asm/84683
26593         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
26594         assertion failure.
26596         PR tree-optimization/84687
26597         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
26598         on new_node->decl.
26599         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
26601 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26603         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
26604         Rename to ppc_speculation_barrier.
26605         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
26606         __builtin_ppc_speculation_barrier.
26608 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
26610         PR target/84700
26611         * combine.c (combine_simplify_rtx): Don't try to simplify if
26612         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
26613         are equal to x.
26615 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
26617         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
26618         to 32 bytes when compiling for POWER9.
26620 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
26622         PR target/84564
26623         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
26624         regparm >= 3 with no arg reg available also for calls with
26625         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
26627         PR target/84524
26628         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
26629         orig,vex.
26630         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
26632 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
26634         PR target/84264
26635         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
26637 2018-03-05  Richard Biener  <rguenther@suse.de>
26639         PR tree-optimization/84486
26640         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
26641         When inserting a __builtin_assume_aligned call set the LHS
26642         SSA name alignment info accordingly.
26644 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
26646         PR tree-optimization/84114
26647         * config/aarch64/aarch64.c (aarch64_reassociation_width)
26648         Avoid reassociation of FLOAT_MODE addition.
26650 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
26652         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
26653         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
26654         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
26655         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
26656         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
26657         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
26658         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
26659         and -mwbnoinvd.
26660         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
26661         __builtin_ia32_wbinvd): New builtins.
26662         (SPECIAL_ARGS2): New.
26663         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
26664         (SPECIAL_ARGS2): New.
26665         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
26666         (ix86_valid_target_attribute_inner_p): Ditto.
26667         (ix86_init_mmx_sse_builtins): Add special_args2.
26668         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
26669         TARGET_WBNOINVD_P): New.
26670         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
26671         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
26672         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
26673         * config/i386/immintrin.h (_wbinvd): New intrinsic.
26674         * config/i386/pconfigintrin.h: New file.
26675         * config/i386/wbnoinvdintrin.h: Ditto.
26676         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
26677         wbnoinvdintrin.h.
26678         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
26680 2018-03-05  Richard Biener  <rguenther@suse.de>
26682         PR tree-optimization/84670
26683         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
26684         member.
26685         (BB_VISITED_WITH_VISITED_SUCCS): New define.
26686         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
26687         (compute_antic_aux): Only assert the number of values in ANTIC_IN
26688         doesn't grow if all successors (recursively) were visited at least
26689         once.
26691 2018-03-05  Richard Biener  <rguenther@suse.de>
26693         PR tree-optimization/84650
26694         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
26695         if executed in the loop pipeline.
26697 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
26699         * doc/configfiles.texi (Configuration Files): Move info about
26700         conditionalizing $target-protos.h to...
26701         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
26702         differs from $target-protos.h.
26704 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
26705             Chung-Ju Wu  <jasonwucj@gmail.com>
26707         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
26708         * config/nds32/nds32-multiple.md (setmemsi): Define.
26709         * config/nds32/nds32-memory-manipulation.c
26710         (nds32_gen_dup_4_byte_to_word_value): New.
26711         (emit_setmem_word_loop): New.
26712         (emit_setmem_byte_loop): New.
26713         (nds32_expand_setmem_loop): New.
26714         (nds32_expand_setmem_loop_v3m): New.
26715         (nds32_expand_setmem_unroll): New.
26716         (nds32_expand_setmem): New.
26718 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
26719             Chung-Ju Wu  <jasonwucj@gmail.com>
26721         * config/nds32/nds32-memory-manipulation.c
26722         (nds32_emit_load_store): New.
26723         (nds32_emit_post_inc_load_store): New.
26724         (nds32_emit_mem_move): New.
26725         (nds32_emit_mem_move_block): New.
26726         (nds32_expand_movmemsi_loop_unknown_size): New.
26727         (nds32_expand_movmemsi_loop_known_size): New.
26728         (nds32_expand_movmemsi_loop): New.
26729         (nds32_expand_movmemsi_unroll): New.
26730         (nds32_expand_movmemqi): Rename ...
26731         (nds32_expand_movmemsi): ... to this.
26732         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
26733         (movmemsi): ... to this.
26734         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
26735         (nds32_expand_movmemsi): ... to this.
26737 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
26738             Monk Chiang  <sh.chiang04@gmail.com>
26739             Chung-Ju Wu  <jasonwucj@gmail.com>
26741         * config/nds32/nds32-protos.h
26742         (nds32_expand_load_multiple): New arguments.
26743         (nds32_expand_store_multiple): Ditto.
26744         (nds32_valid_multiple_load_store): Rename ...
26745         (nds32_valid_multiple_load_store_p): ... to this.
26746         * config/nds32/nds32-memory-manipulation.c
26747         (nds32_expand_load_multiple): Refine implementation.
26748         (nds32_expand_store_multiple): Ditto.
26749         * config/nds32/nds32-multiple.md
26750         (load_multiple): Update nds32_expand_load_multiple interface.
26751         (store_multiple): Update nds32_expand_store_multiple interface.
26752         * config/nds32/nds32-predicates.c
26753         (nds32_valid_multiple_load_store): Rename ...
26754         (nds32_valid_multiple_load_store_p): ... to this and refine
26755         implementation.
26756         * config/nds32/predicates.md
26757         (nds32_load_multiple_and_update_address_operation): New predicate.
26758         (nds32_store_multiple_and_update_address_operation): New predicate.
26760 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
26761             Chung-Ju Wu  <jasonwucj@gmail.com>
26763         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
26764         (combo): New attribute.
26765         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
26767 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
26769         * config/nds32/nds32.opt: Change -mcmodel= default value.
26771 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
26772             Monk Chiang  <sh.chiang04@gmail.com>
26773             Chung-Ju Wu  <jasonwucj@gmail.com>
26775         * config/nds32/constants.md (unspec_element): New enum.
26776         * config/nds32/constraints.md (Umw): New constraint.
26777         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
26778         * config/nds32/nds32-intrinsic.md: Likewise.
26779         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
26780         (nds32_valid_smw_lwm_base_p): New.
26781         (nds32_output_smw_single_word): New.
26782         (nds32_output_lmw_single_word): New.
26783         (nds32_expand_unaligned_load): New.
26784         (nds32_expand_unaligned_store): New.
26785         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
26786         (nds32_output_smw_single_word): Declare.
26787         (nds32_output_lmw_single_word): Declare.
26788         (nds32_expand_unaligned_load): Declare.
26789         (nds32_expand_unaligned_store): Declare.
26790         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
26791         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
26792         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
26793         NDS32_BUILTIN_UASTORE_DW.
26794         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
26795         predicate.
26797 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
26798             Kito Cheng  <kito.cheng@gmail.com>
26799             Chung-Ju Wu  <jasonwucj@gmail.com>
26801         * config/nds32/nds32-intrinsic.c
26802         (nds32_expand_builtin_null_ftype_reg): Delete.
26803         (nds32_expand_builtin_reg_ftype_imm): Ditto.
26804         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
26805         (nds32_read_argument): New.
26806         (nds32_legitimize_target): Ditto.
26807         (nds32_legitimize_argument): Ditto.
26808         (nds32_check_constant_argument): Ditto.
26809         (nds32_expand_unop_builtin): Ditto.
26810         (nds32_expand_unopimm_builtin): Ditto.
26811         (nds32_expand_binop_builtin): Ditto.
26812         (nds32_builtin_decl_impl): Ditto.
26813         (builtin_description): Ditto.
26814         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
26815         (nds32_init_builtins_impl): Ditto.
26816         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
26817         (nds32_builtin_decl): New.
26818         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
26819         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
26821 2018-03-02  Jeff Law  <law@redhat.com>
26823         * reorg.c (stop_search_p): Handle DEBUG_INSN.
26824         (redundant_insn, fill_simple_delay_slots): Likewise.
26825         (fill_slots_from_thread): Likewise.
26826         * resource.c (mark_referenced_resources): Likewise.
26827         (mark_set_resources, find_dead_or_set_registers): Likewise.
26829 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
26831         * substring-locations.h (format_warning_va): Formatting fix for
26832         ATTRIBUTE_GCC_DIAG.
26833         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
26834         argument.
26835         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
26836         * substring-locations.c: Include intl.h.
26837         (format_warning_va): Turned into small wrapper around
26838         format_warning_n_va, renamed to ...
26839         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
26840         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
26841         use ngettext.
26842         (format_warning_at_substring_n): New function.
26843         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
26844         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
26845         format_warning_at_substring with just a shorter name instead of
26846         const function pointer.
26847         (fmtwarn_n): New function.
26848         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
26849         appropriate, get rid of all the fmtstr temporaries, move conditionals
26850         with G_() wrapped string literals directly into fmtwarn arguments,
26851         cast dir.len to (int), formatting fixes.
26853 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
26855         * doc/invoke.texi: Remove "Cilk Plus" references.
26857 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
26858             Richard Biener  <rguenther@suse.de>
26860         PR ipa/84628
26861         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
26862         for error or warning attributes if CALL_FROM_THUNK_P is set.
26863         Formatting fixes.
26865 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
26867         PR target/56540
26868         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
26869         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
26871         PR target/56540
26872         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
26873         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
26875         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
26876         instead of -1U in last predictors element's probability member.
26878 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
26880         PR ipa/83983
26881         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
26882         arguments if they are comparable.
26884 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
26886         PR tree-optimization/84634
26887         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
26888         masks and masked_loop_p with a single loop_masks, making sure it's
26889         null for bb vectorization.
26891 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
26893         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
26894         (vect_analyze_data_ref_access): Use loop->safe_len rather than
26895         loop->force_vectorize to check whether there is no alias.
26897 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
26899         PR target/84614
26900         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
26901         prototypes.
26902         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
26903         comments.
26904         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
26905         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
26906         instead of a loop around prev_real_insn.
26907         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
26908         prev_real_insn.
26910         PR inline-asm/84625
26911         * config/i386/i386.c (ix86_print_operand): Use conditional
26912         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
26913         zero vector.
26915 2018-03-02  Richard Biener  <rguenther@suse.de>
26917         PR tree-optimization/84427
26918         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
26919         (bitmap_set_subtract_values): Rewrite to handle multiple
26920         exprs per value.
26921         (clean): Likewise.
26922         (prune_clobbered_mems): Likewise.
26923         (phi_translate): Take edge instead of pred/phiblock.
26924         (phi_translate_1): Likewise.
26925         (phi_translate_set): Likewise.  Insert all translated
26926         exprs for a value into the set, keeping possibly multiple
26927         expressions per value.
26928         (compute_antic_aux): Adjust for phi_translate changes.
26929         When intersecting union the expressions and prune those
26930         not in the final value set, keeping possibly multiple
26931         expressions per value.  Do not use value-insertion
26932         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
26933         all expressions.  Add verification that the value-sets
26934         only shrink during iteration.
26935         (compute_partial_antic_aux): Adjust for the phi_translate changes.
26936         (do_pre_regular_insertion): Likewise.
26937         (do_pre_partial_partial_insertion): Likewise.
26939 2018-03-02  Richard Biener  <rguenther@suse.de>
26941         PR target/82005
26942         * config/darwin.c (saved_debug_info_level): New static global.
26943         (darwin_asm_lto_start): Disable debug info generation for LTO out.
26944         (darwin_asm_lto_end): Restore debug info generation settings.
26946 2018-03-01  Martin Liska  <mliska@suse.cz>
26948         PR sanitizer/82484
26949         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
26950         volatile arguments.
26952 2018-03-01  Richard Biener  <rguenther@suse.de>
26954         PR debug/84645
26955         * dwarf2out.c (gen_variable_die): Properly handle late VLA
26956         type annotation with LTO when debug was disabled at compile-time.
26958 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
26960         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
26961         XINT with INTVAL.
26962         (mips_final_postscan_insn): Likewise.
26964 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
26966         PR rtl-optimization/84528
26967         * alias.c (init_alias_target): Add commentary.
26968         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
26969         a unique base value if the frame pointer is not eliminated
26970         to the stack pointer.
26972 2018-03-01  Tom de Vries  <tom@codesourcery.com>
26974         PR rtl-optimization/83327
26975         * lra-int.h (hard_regs_spilled_into): Declare.
26976         * lra.c (hard_regs_spilled_into): Define.
26977         (init_reg_info): Init hard_regs_spilled_into.
26978         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
26979         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
26980         (process_bb_lives): Handle hard_regs_spilled_into.
26981         (lra_create_live_ranges_1): Before doing liveness propagation, clear
26982         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
26984 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
26986         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
26987         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
26988         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
26989         * config/rs6000/aix72.h: New file.
26991 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
26993         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
26994         instead of warning_at with conditional singular and plural messages
26995         where possible.
26997         PR target/52991
26998         * stor-layout.c (update_alignment_for_field): For
26999         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
27000         && !DECL_PACKED (field), do the alignment update, just use
27001         only desired_align instead of MAX (type_align, desired_align)
27002         as the alignment.
27003         (place_field): Don't do known_align < desired_align handling
27004         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
27005         is non-NULL, instead do it after rli->prev_field handling and
27006         only if not within a bitfield word.  For DECL_PACKED (field)
27007         use type_align of BITS_PER_UNIT.
27009 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
27011         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
27012         superfluous parentheses and trailing spaces.
27014 2018-02-28  Richard Biener  <rguenther@suse.de>
27016         PR tree-optimization/84584
27017         * graphite-scop-detection.c (scop_detection::add_scop): Discard
27018         SCoPs with fake exit edge.
27020 2018-02-28  Martin Liska  <mliska@suse.cz>
27022         PR testsuite/84597
27023         * timevar.c (timer::print): Fix format to properly print 100%
27024         values.
27026 2018-02-28  Richard Biener  <rguenther@suse.de>
27028         PR middle-end/84607
27029         * genmatch.c (capture_info::walk_match): Do not mark
27030         captured expressions without operands as expr_p given
27031         they act more like predicates and should be subject to
27032         "lost tail" side-effect preserving.
27034 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
27036         PR rtl-optimization/81611
27037         * auto-inc-dec.c (attempt_change): Move dead note from
27038         mem_insn if it's the next use of regno
27039         (find_address): Take address use of reg holding
27040         non-incremented value.  Add parm to limit search to the named
27041         reg only.
27042         (merge_in_block): Attempt to use a mem insn that is the next
27043         use of the original regno.
27045 2018-02-27  Martin Sebor  <msebor@redhat.com>
27047         PR c++/83871
27048         * doc/invoke.texi (-Wmissing-attributes): New option.
27049         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
27051 2018-02-27  Martin Sebor  <msebor@redhat.com>
27053         PR translation/84207
27054         * diagnostic-core.h (warning_n, error_n, inform_n): Change
27055         n argument to unsigned HOST_WIDE_INT.
27056         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
27057         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
27058         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
27059         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
27061 2018-02-27  Richard Biener  <rguenther@suse.de>
27063         PR tree-optimization/84512
27064         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
27065         Do not use the estimate returned from record_stmt_cost for
27066         the scalar iteration cost but sum properly using add_stmt_cost.
27068 2018-02-27  Richard Biener  <rguenther@suse.de>
27070         PR tree-optimization/84466
27071         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
27072         Adjust last change to less strictly validate use operands.
27074 2018-02-27  Martin Liska  <mliska@suse.cz>
27076         PR gcov-profile/84548
27077         * gcov.c (process_file): Allow partial overlap and consider it
27078         also as group functions.
27079         (output_lines): Properly calculate range of lines for a group.
27081 2018-02-27  Martin Liska  <mliska@suse.cz>
27083         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
27084         'ggc' suffixes.  Change first column width.
27085         (timer::print): Fix formatting of the column.
27087 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
27089         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
27090         preserve inline entry blocks for the sake of debug inline
27091         entry point markers alone.
27092         (remove_unused_locals): Suggest in comments a better place to
27093         force the preservation of inline entry blocks that are
27094         otherwise unused, but do not preserve them.
27096 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
27098         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
27100 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
27102         PR target/84039
27103         * config/i386/constraints.md (Bs): Replace
27104         ix86_indirect_branch_register with
27105         TARGET_INDIRECT_BRANCH_REGISTER.
27106         (Bw): Likewise.
27107         * config/i386/i386.md (indirect_jump): Likewise.
27108         (tablejump): Likewise.
27109         (*sibcall_memory): Likewise.
27110         (*sibcall_value_memory): Likewise.
27111         Peepholes of indirect call and jump via memory: Likewise.
27112         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
27113         (*sibcall_value_GOT_32): Likewise.
27114         * config/i386/predicates.md (indirect_branch_operand): Likewise.
27115         (GOT_memory_operand): Likewise.
27116         (call_insn_operand): Likewise.
27117         (sibcall_insn_operand): Likewise.
27118         (GOT32_symbol_operand): Likewise.
27119         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
27121 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
27123         PR rtl-optimization/83496
27124         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
27125         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
27126         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
27127         redundant insn, if any.
27128         (relax_delay_slots): Likewise.
27129         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
27131 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
27133         PR tree-optimization/83965
27134         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
27135         that grouped statements are part of a reduction chain.  Return
27136         true if the statement is not marked as a reduction itself but
27137         is part of a group.
27138         (vect_recog_dot_prod_pattern): Don't check whether the statement
27139         is part of a group here.
27140         (vect_recog_sad_pattern): Likewise.
27141         (vect_recog_widen_sum_pattern): Likewise.
27143 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
27145         PR debug/84545
27146         * final.c (rest_of_clean_state): Also look for calls inside sequences.
27148 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
27150         PR target/84530
27151         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
27152         the bool argument.
27153         (ix86_output_indirect_function_return): New prototype.
27154         (ix86_split_simple_return_pop_internal): Likewise.
27155         * config/i386/i386.c (indirect_return_via_cx): New.
27156         (indirect_return_via_cx_bnd): Likewise.
27157         (indirect_thunk_name): Handle return va CX_REG.
27158         (output_indirect_thunk_function): Create alias for
27159         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
27160         (ix86_output_indirect_jmp): Remove the bool argument.
27161         (ix86_output_indirect_function_return): New function.
27162         (ix86_split_simple_return_pop_internal): Likewise.
27163         * config/i386/i386.md (*indirect_jump): Don't pass false
27164         to ix86_output_indirect_jmp.
27165         (*tablejump_1): Likewise.
27166         (simple_return_pop_internal): Change it to define_insn_and_split.
27167         Call ix86_split_simple_return_pop_internal to split it for
27168         -mfunction-return=.
27169         (simple_return_indirect_internal): Call
27170         ix86_output_indirect_function_return instead of
27171         ix86_output_indirect_jmp.
27173 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
27175         PR bootstrap/84405
27176         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
27177         memset and value initialization afterwards.
27179 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
27181         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
27183 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
27185         PR target/84521
27186         * common/config/aarch64/aarch64-common.c
27187         (aarch_option_optimization_table[]): Switch
27188         off fomit-frame-pointer
27190 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
27191             Chung-Ju Wu  <jasonwucj@gmail.com>
27193         * config/nds32/nds32-multiple.md (load_multiple): Disallow
27194         volatile memory.
27195         (store_multiple): Ditto.
27197 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
27199         * config.gcc: Add --with-cpu support for nds32 target.
27200         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
27201         * config/nds32/nds32.opt: Add -mcpu= option.
27203 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
27205         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
27206         isel=yes): Warn for these deprecated options.
27208 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
27210         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
27211         ISA_2_5_MASKS_EMBEDDED.
27213 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
27215         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
27216         p->max as pointers rather than using iterative_hash_expr.
27218 2018-02-23  Carl Love  <cel@us.ibm.com>
27220         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
27221         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
27222         BU_P8V_OVERLOAD_2.
27223         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
27224         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
27225         P8V_BUILTIN_VEC_VUNSIGNED2.
27227 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
27229         PR target/81572
27230         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
27231         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
27232         LRA_UNKNOWN_ALT.
27233         * lra-constraints.c (curr_insn_transform): Set up
27234         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
27235         LRA_UNKNOWN_ALT.
27236         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
27237         * lra-eliminations.c (spill_pseudos): Ditto.
27238         (process_insn_for_elimination): Ditto.
27239         * lra-lives.c (reg_early_clobber_p): Use the new macros.
27240         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
27241         LRA_NON_CLOBBERED_ALT.
27243 2018-02-22  Martin Sebor  <msebor@redhat.com>
27245         PR tree-optimization/84480
27246         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
27247         to maybe_diag_stxncpy_trunc.  Call it.
27248         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
27249         from gimple_fold_builtin_strcpy.  Print inlining stack.
27250         (handle_builtin_stxncpy): Print inlining stack.
27251         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
27253 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
27255         PR target/84176
27256         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
27257         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
27258         and -fcheck-pointer-bounds are used together.
27259         (indirect_thunk_prefix): New enum.
27260         (indirect_thunk_need_prefix): New function.
27261         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
27262         "_nt" instead of "_bnd" for NOTRACK prefix.
27263         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
27264         (output_indirect_thunk_function): Likewise.
27265         (): Likewise.
27266         (ix86_code_end): Update output_indirect_thunk_function calls.
27267         (ix86_output_indirect_branch_via_reg): Replace
27268         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
27269         (ix86_output_indirect_branch_via_push): Likewise.
27270         (ix86_output_function_return): Likewise.
27271         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
27272         incompatible with -fcf-protection=branch and
27273         -fcheck-pointer-bounds.
27275 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
27277         PR target/83335
27278         * config/aarch64/aarch64.c (aarch64_print_address_internal):
27279         Change gcc_assert call to output_operand_lossage.
27281 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
27283         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
27285 2018-02-22  DJ Delorie  <dj@redhat.com>
27286             Sebastian Perta  <sebastian.perta@renesas.com>
27287             Oleg Endo  <olegendo@gcc.gnu.org>
27289         * config/rx/rx.c (rx_rtx_costs): New function.
27290         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
27292 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
27294         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
27296 2018-02-22  Martin Liska  <mliska@suse.cz>
27298         PR driver/83193
27299         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
27300         Add "native" as a possible value.
27302 2018-02-22  Martin Liska  <mliska@suse.cz>
27304         PR driver/83193
27305         * config/i386/i386.c (ix86_option_override_internal):
27306         Add "native" as a possible value for -march and -mtune.
27308 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
27310         PR target/84502
27311         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
27312         to all type variants.
27314         PR tree-optimization/84503
27315         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
27316         width as info->bitpos + info->bitsize - start.
27317         (merged_store_group::merge_overlapping): Simplify width computation.
27318         (check_no_overlap): New function.
27319         (imm_store_chain_info::try_coalesce_bswap): Compute expected
27320         start + width and last_order of the group, fail if check_no_overlap
27321         fails.
27322         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
27323         to group if check_no_overlap fails.
27325 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
27327         * config/rs6000/altivec.md: Delete contraint arguments to
27328         define_expand, define_split, and define_peephole2, and in
27329         define_insn_and_split if always unused.
27330         * config/rs6000/darwin.md: Ditto.
27331         * config/rs6000/dfp.md: Ditto.
27332         * config/rs6000/rs6000.md: Ditto.
27333         * config/rs6000/sync.md: Ditto.
27334         * config/rs6000/vector.md: Ditto.
27335         * config/rs6000/vsx.md: Ditto.
27337 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
27339         * config/rs6000/altivec.md: Write output control strings as braced
27340         blocks instead of double-quoted strings.
27341         * config/rs6000/darwin.md: Ditto.
27342         * config/rs6000/rs6000.md: Ditto.
27343         * config/rs6000/vector.md: Ditto.
27344         * config/rs6000/vsx.md: Ditto.
27346 2018-02-21  Jason Merrill  <jason@redhat.com>
27348         PR c++/84314 - ICE with templates and fastcall attribute.
27349         * attribs.c (build_type_attribute_qual_variant): Remove assert.
27351 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
27353         * ipa-cp.c (determine_versionability): Fix comment typos.
27355 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
27357         PR c/84229
27358         * ipa-cp.c (determine_versionability): Do not version functions caling
27359         va_arg_pack.
27361 2018-02-21  Martin Liska  <mliska@suse.cz>
27363         PR driver/83193
27364         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
27365         Add "native" as a possible value.
27366         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
27367         the macro when native cpu detection is available.
27369 2018-02-21  Martin Liska  <mliska@suse.cz>
27371         PR driver/83193
27372         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
27373         Add "native" as a possible value.
27374         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
27375         when native cpu detection is available.
27377 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
27378             Martin Sebor  <msebor@redhat.com>
27380         PR tree-optimization/84478
27381         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
27382         false.
27383         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
27384         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
27385         support which is conservatively correct, for 2 only stay conservative
27386         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
27387         argument to the 2 argument get_range_strlen, adjust 6 arg
27388         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
27389         false.
27390         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
27391         (gimple_fold_builtin_strlen): Pass true as last argument to
27392         get_range_strlen.
27394 2018-02-20  Martin Sebor  <msebor@redhat.com>
27396         PR middle-end/84095
27397         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
27398         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
27399         (builtin_memref::builtin_memref): Factor out parts into
27400         set_base_and_offset and call it.
27402 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
27404         PR middle-end/84406
27405         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
27406         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
27407         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
27408         search at the associated MODE_INT.
27410 2018-02-20  Jeff Law  <law@redhat.com>
27412         PR middle-end/82123
27413         PR tree-optimization/81592
27414         PR middle-end/79257
27415         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
27416         for range data rather than using global data.
27417         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
27418         range data rather than using global data.
27419         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
27420         pass it to children as needed.
27421         (struct directive::fmtresult): Similarly.
27422         (struct directive::set_width): Similarly.
27423         (struct directive::set_precision): Similarly.
27424         (format_integer, format_directive, parse_directive): Similarly.
27425         (format_none): Accept unnamed vr_values parameter.
27426         (format_percent, format_floating, format_character): Similarly.
27427         (format_string, format_plain): Similarly.
27428         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
27429         the EVRP range analyzer for range data rather than using global data.
27430         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
27431         gimple-ssa-evrp-analyze.h
27432         (class sprintf_dom_walker): Add after_dom_children member function.
27433         Add evrp_range_analyzer member.
27434         (sprintf_dom_walker::before_dom_children): Call into the EVRP
27435         range analyzer as needed.
27436         (sprintf_dom_walker::after_dom_children): New member function.
27437         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
27438         if not optimizing.
27439         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
27440         (evrp_range_analyzer::pop_to_marker): Likewise.
27442 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
27444         PR tree-optimization/84419
27445         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
27446         with the required type if its current type is compatible but
27447         different.
27449 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
27451         PR middle-end/82004
27452         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
27453         after vectorization.
27455 2018-02-20  Martin Liska  <mliska@suse.cz>
27457         PR driver/83193
27458         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
27459         possible values if we don't have a hint.
27461 2018-02-20  Martin Liska  <mliska@suse.cz>
27463         PR c/84310
27464         PR target/79747
27465         * final.c (shorten_branches): Build align_tab array with one
27466         more element.
27467         * opts.c (finish_options): Add alignment option limit check.
27468         (MAX_CODE_ALIGN): Likewise.
27469         (MAX_CODE_ALIGN_VALUE): Likewise.
27470         * doc/invoke.texi: Document maximum allowed option value for
27471         all -falign-* options.
27473 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
27475         PR target/84146
27476         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
27477         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
27478         * var-tracking.c (emit_note_insn_var_location): Remove all references
27479         to NOTE_INSN_CALL_ARG_LOCATION.
27480         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
27481         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
27482         Use copy_rtx_if_shared.
27483         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
27484         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
27485         (dwarf2out_var_location): Remove handling of
27486         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
27487         on call_insn.
27488         * final.c (final_scan_insn): Remove all references to
27489         NOTE_INSN_CALL_ARG_LOCATION.
27490         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
27491         before dumping final insns.
27492         * except.c (emit_note_eh_region_end): Remove all references to
27493         NOTE_INSN_CALL_ARG_LOCATION.
27494         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
27495         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
27496         * config/arc/arc.c (hwloop_optimize): Likewise.
27497         * config/arm/arm.c (create_fix_barrier): Likewise.
27498         * config/s390/s390.c (s390_chunkify_start): Likewise.
27499         * config/sh/sh.c (find_barrier): Likewise.
27500         * config/i386/i386.c (rest_of_insert_endbranch,
27501         ix86_seh_fixup_eh_fallthru): Likewise.
27502         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
27503         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
27504         * config/frv/frv.c (frv_function_prologue): Likewise.
27505         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
27506         reg note.
27507         (note_outside_basic_block_p): Remove all references to
27508         NOTE_INSN_CALL_ARG_LOCATION.
27509         * gengtype.c (adjust_field_rtx_def): Likewise.
27510         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
27511         Likewise.
27512         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
27513         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
27515         PR c++/84444
27516         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
27517         is ADDR_EXPR.
27519         PR tree-optimization/84452
27520         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
27521         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
27522         is NULL.
27524 2018-02-19  Martin Liska  <mliska@suse.cz>
27526         PR sanitizer/82183
27527         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
27529 2018-02-19  Martin Liska  <mliska@suse.cz>
27530             Richard Sandiford  <richard.sandiford@linaro.org>
27532         PR tree-optimization/82491
27533         * gimple-fold.c (get_base_constructor): Make earlier bail out
27534         to prevent ubsan.
27536 2018-02-19  Carl Love  <cel@us.ibm.com>
27538         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
27539         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
27540         BU_P8V_OVERLOAD_1.
27541         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
27542         P8V_BUILTIN_VEC_NEG.
27544 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
27546         * config/rl78/rl78.md (movdf): New define expand.
27548 2018-02-19  Martin Liska  <mliska@suse.cz>
27550         PR other/80589
27551         * doc/invoke.texi: Fix typo.
27552         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
27554 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
27556         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
27557         handle rs6000_single_float and rs6000_double_float specially for
27558         e500 family CPUs.
27560 2018-02-16  Jeff Law  <law@redhat.com>
27562         * config/rx/rx.c (add_pop_cfi_notes): New function.;
27563         (pop_regs): Use it.
27565 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
27567         PR ipa/84425
27568         * ipa-inline.c (inline_small_functions): Fix a typo.
27570 2018-02-16  Nathan Sidwell  <nathan@acm.org>
27572         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
27574 2018-02-16  Carl Love  <cel@us.ibm.com>
27576         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
27577         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
27578         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
27579         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
27580         expansion to P8V_BUILTIN_VEC_FLOAT2.
27582 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
27584         PR rtl-optimization/70023
27585         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
27586         src_regno into account.
27588 2018-02-16  Carl Love  <cel@us.ibm.com>
27590         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
27591         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
27592         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
27593         * config/rs6000/rs6000.c: Remove case statements for
27594         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
27595         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
27596         and P9V_BUILTIN_VEC_VINSERT4B.
27597         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
27598         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
27599         * config/rs6000/vsx.md:
27600         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
27601         vec_insert4b.
27603 2018-02-16  Carl Love  <cel@us.ibm.com>
27605         * config/rs6000/altivec.h: Add builtin names vec_extract4b
27606         vec_insert4b.
27607         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
27608         definitions.
27609         * config/rs6000/rs6000-c.c: Add the definitions for
27610         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
27611         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
27612         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
27613         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
27614         definition for insert4b and define insn *insert3b_internal.
27615         * doc/extend.texi: Add documentation for vec_extract4b.
27617 2018-02-16  Nathan Sidwell  <nathan@acm.org>
27619         * doc/extend.texi (Backwards Compatibility): Mention friend
27620         injection.  Note for-scope is deprecated.
27621         * doc/invoke.texi (-ffriend-injection): Deprecate.
27623 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
27625         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
27626         that moved to I2, also allow destinations that are a paradoxical
27627         subreg (instead of a normal reg).
27629 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
27631         PR target/83831
27632         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
27633         to QImode.
27635 2018-02-16  Richard Biener  <rguenther@suse.de>
27637         PR tree-optimization/84037
27638         PR tree-optimization/84016
27639         PR target/82862
27640         * config/i386/i386.c (ix86_builtin_vectorization_cost):
27641         Adjust vec_construct for the fact we need additional higher latency
27642         128bit inserts for AVX256 and AVX512 vector builds.
27643         (ix86_add_stmt_cost): Scale vector construction cost for
27644         elementwise loads.
27646 2018-02-16  Richard Biener  <rguenther@suse.de>
27648         PR tree-optimization/84417
27649         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
27650         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
27651         (non_rewritable_lvalue_p): Likewise, use poly-ints.
27653 2018-02-16  Martin Liska  <mliska@suse.cz>
27655         PR sanitizer/84307
27656         * internal-fn.def (ASAN_CHECK): Set proper flags.
27657         (ASAN_MARK): Likewise.
27659 2018-02-16  Julia Koval  <julia.koval@intel.com>
27661         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
27662         from PTA_CANNONLAKE.
27664 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
27666         PR target/84272
27667         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
27668         Use ++iter rather than iter++ for std::list iterators.
27669         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
27670         defer deleting them until all nodes in the forest are processed.  Do
27671         free even leaf nodes.  Change to_process into auto_vec.
27673         PR bootstrap/84405
27674         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
27675         * vec.h (vec_default_construct): Use memset instead of placement new
27676         if BROKEN_VALUE_INITIALIZATION is defined.
27677         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
27678         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
27679         is defined.
27681         PR rtl-optimization/83723
27682         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
27683         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
27684         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
27685         recursive calls.
27686         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
27687         callers.
27688         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
27690 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
27692         PR rtl-optimization/81443
27693         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
27694         from inner REGs to paradoxical SUBREGs.
27696 2018-02-16  Richard Biener  <rguenther@suse.de>
27698         PR tree-optimization/84399
27699         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
27700         For operands we can analyze at their definition make sure we can
27701         analyze them at each use as well.
27703 2018-02-16  Richard Biener  <rguenther@suse.de>
27705         PR tree-optimization/84190
27706         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
27707         volatile accesses if the decl isn't volatile.
27709 2018-02-15  Jason Merrill  <jason@redhat.com>
27711         PR c++/84314 - ICE with templates and fastcall attribute.
27712         * attribs.c (build_type_attribute_qual_variant): Don't clobber
27713         TYPE_CANONICAL on an existing type.
27715 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
27717         PR tree-optimization/84383
27718         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
27719         dstoff nor call operand_equal_p if dstbase is NULL.
27721         PR tree-optimization/84334
27722         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
27723         also a CONSTANT_CLASS_P, punt.
27725 2018-02-14  Jim Wilson  <jimw@sifive.com>
27727         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
27728         first SMALL_OPERAND check.  New local min_second_step.  Move assert
27729         to where locals are set.  Add TARGET_RVC support.
27730         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
27732 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
27734         * doc/invoke.texi: Correct -Wformat-overflow code sample.
27736 2018-02-14  Martin Sebor  <msebor@redhat.com>
27738         PR tree-optimization/83698
27739         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
27740         arrays constrain the offset range to their bounds.
27741         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
27742         (builtin_access::overlap): Avoid setting the size of overlap if it's
27743         already been set.
27744         (maybe_diag_overlap): Also consider arrays when deciding what values
27745         of offsets to include in diagnostics.
27747 2018-02-14  Martin Sebor  <msebor@redhat.com>
27749         PR c/84108
27750         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
27751         that correspond to the kind of a declaration.
27753 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
27755         PR target/83984
27756         * config/pa/pa.md: Load address of PIC label using the linkage table
27757         if the label is nonlocal.
27759 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
27761         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
27762         warning message if user requests -maltivec=be.
27763         * doc/invoke.texi: Document deprecation of -maltivec=be.
27765 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
27767         PR target/84220
27768         * config/rs6000/rs6000-c.c: Update definitions for
27769         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
27770         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
27772 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
27774         PR target/84239
27775         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
27776         add _get_ssp intrinsics. Remove argument from
27777         __builtin_ia32_rdssp[d|q].
27778         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
27779         * config/i386/i386-builtin.def: Remove argument from
27780         __builtin_ia32_rdssp[d|q].
27781         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
27782         ix86_expand_special_args_builtin for _rdssp[d|q].
27783         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
27784         Clear register before usage.
27785         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
27786         Add documentation for new _get_ssp and _inc_ssp intrinsics.
27788 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
27790         PR tree-optimization/84357
27791         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
27792         operand 1 of an ARRAY_REF too.
27794 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
27796         PR target/83831
27797         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
27798         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
27799         declarations.
27800         (set_of_reg): New struct.
27801         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
27802         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
27803         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
27804         functions.
27805         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
27806         Split into bitclr, bitset, bitinvert patterns if appropriate.
27807         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
27808         use rx_fuse_in_memory_bitop.
27809         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
27810         to named insn, correct maximum insn length.
27812 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
27814         PR target/79242
27815         * machmode.def: Define a complex mode for PARTIAL_INT.
27816         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
27817         MODE_PARTIAL_INT.
27818         * doc/rtl.texi: Document CSPImode.
27819         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
27820         handling.
27821         (msp430_hard_regno_nregs_with_padding): Likewise.
27823 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
27825         PR target/84279
27826         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
27828 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
27830         PR rtl-optimization/84169
27831         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
27832         we generated a parallel as new i3 and we split that to new i2 and i3
27833         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
27834         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
27835         those to i2, not i1.  Partially rewrite this scan code.
27837 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
27839         PR c/82210
27840         * stor-layout.c (place_field): For variable length fields, adjust
27841         offset_align afterwards not just based on the field's alignment,
27842         but also on the size.
27844         PR middle-end/84309
27845         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
27846         of exps and logs in the use_exp2 case.
27848 2018-02-13  Jeff Law  <law@redhat.com>
27850         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
27851         entry for "vector".
27853         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
27854         ARGS as unused.
27856 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
27858         PR debug/84342
27859         PR debug/84319
27860         * common.opt (gas-loc-support, gas-locview-support): New.
27861         (ginline-points, ginternal-reset-location-views): New.
27862         * doc/invoke.texi: Document them.  Use @itemx where intended.
27863         (gvariable-location-views): Adjust.
27864         * target.def (reset_location_view): New.
27865         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
27866         (TARGET_RESET_LOCATION_VIEW): New.
27867         * doc/tm.texi: Rebuilt.
27868         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
27869         (dwarf2out_default_as_locview_support): New.
27870         (output_asm_line_debug_info): Use option variables.
27871         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
27872         (output_loc_list): Likewise.
27873         (add_high_low_attributes): Check option variables.
27874         Don't output entry view attribute in strict mode.
27875         (gen_inlined_subroutine_die): Check option variables.
27876         (dwarf2out_inline_entry): Likewise.
27877         (init_sections_and_labels): Likewise.
27878         (dwarf2out_early_finish): Likewise.
27879         (maybe_reset_location_view): New, from...
27880         (dwarf2out_var_location): ... here.  Call it.
27881         * debug.h (dwarf2out_default_as_loc_support): Declare.
27882         (dwarf2out_default_as_locview_support): Declare.
27883         * hooks.c (hook_int_rtx_insn_0): New.
27884         * hooks.h (hook_int_rtx_insn_0): Declare.
27885         * toplev.c (process_options): Take -gas-loc-support and
27886         -gas-locview-support from dwarf2out.  Enable
27887         -gvariable-location-views by default only with locview
27888         assembler support.  Enable -ginternal-reset-location-views by
27889         default only if the target defines the corresponding hook.
27890         Enable -ginline-points by default if location views are
27891         enabled; force it disabled if statement frontiers are
27892         disabled.
27893         * tree-inline.c (expand_call_inline): Check option variables.
27894         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
27896 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
27898         PR tree-optimization/84321
27899         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
27900         handling.  Also check whether the anti-range contains any values
27901         that satisfy the mask; switch to a VR_RANGE if not.
27903 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
27905         PR sanitizer/84340
27906         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
27908 2018-02-13  Martin Jambor  <mjambor@suse.cz>
27910         PR c++/83990
27911         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
27912         of call statements, also set location of a load to a temporary.
27914 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
27916         * config/rl78/rl78.c (add_vector_labels): New function.
27917         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
27918         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
27919         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
27920         which checks that no arguments are passed.
27921         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
27922         * doc/extend.texi: Documentation for the new attribute.
27924 2018-02-13  Andreas Schwab  <schwab@suse.de>
27926         * config/riscv/linux.h (CPP_SPEC): Define.
27928 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
27930         PR target/84335
27931         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
27932         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
27933         OPTION_MASK_ISA_AES as first argument to def_builtin_const
27934         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
27935         instead of OPTION_MASK_ISA_PCLMUL as first argument to
27936         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
27937         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
27938         temporarily for AES and PCLMUL builtins.
27940         PR tree-optimization/84339
27941         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
27942         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
27943         Formatting fixes.
27945         PR middle-end/84309
27946         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
27947         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
27948         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
27949         inline function.
27950         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
27951         inline function.
27952         * omp-simd-clone.h: New file.
27953         * omp-simd-clone.c: Include omp-simd-clone.h.
27954         (expand_simd_clones): No longer static.
27955         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
27956         cgraph.h and omp-simd-clone.h.
27957         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
27958         (vect_recog_widen_shift_pattern): Formatting fix.
27959         (vect_pattern_recog_1): Don't check optab for calls.
27961         PR target/84336
27962         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
27963         operands[2] into a REG before using gen_lowpart on it.
27965 2018-02-12  Jeff Law  <law@redhat.com>
27967         PR target/83760
27968         * config/sh/sh.c (find_barrier): Consider a sibling call
27969         a barrier as well.
27971         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
27972         successfully back substituting a reg.
27974 2018-02-12  Richard Biener  <rguenther@suse.de>
27976         PR tree-optimization/84037
27977         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
27978         parameter, move visited init to caller.
27979         (vect_slp_analyze_operations): Separate cost from validity
27980         check, initialize visited once for all instances.
27981         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
27982         for all instances.
27983         * tree-vect-stmts.c (vect_model_simple_cost): Make early
27984         out an assert.
27985         (vect_model_promotion_demotion_cost): Likewise.
27986         (vectorizable_bswap): Guard cost modeling with !slp_node
27987         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
27988         SLP stmts.
27989         (vectorizable_call): Likewise.
27990         (vectorizable_conversion): Likewise.
27991         (vectorizable_assignment): Likewise.
27992         (vectorizable_shift): Likewise.
27993         (vectorizable_operation): Likewise.
27994         (vectorizable_store): Likewise.
27995         (vectorizable_load): Likewise.
27996         (vectorizable_condition): Likewise.
27997         (vectorizable_comparison): Likewise.
27999 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
28001         PR sanitizer/84307
28002         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
28003         (ASAN_MARK): Fix fnspec to account for return value, change pointer
28004         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
28006 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
28008         PR middle-end/83665
28009         * params.def (inline-min-speedup): Increase from 8 to 15.
28010         (max-inline-insns-auto): Decrease from 40 to 30.
28011         * ipa-split.c (consider_split): Add some buffer for function to
28012         be considered inlining candidate.
28013         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
28014         default values.
28016 2018-02-12  Richard Biener  <rguenther@suse.de>
28018         PR tree-optimization/84037
28019         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
28020         matched stmts if we cannot swap the non-matched ones.
28022 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
28024         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
28025         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
28026         _mm_maskz_scalef_round_ss): New intrinsics.
28027         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
28028         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
28029         __builtin_ia32_scalefss_round): Remove.
28030         (__builtin_ia32_scalefsd_mask_round,
28031         __builtin_ia32_scalefss_mask_round): New intrinsics.
28032         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
28033         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
28034         ((match_operand:VF_128 2 "<round_nimm_predicate>"
28035         "<round_constraint>")): Changed to ...
28036         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
28037         "<round_scalar_constraint>")): ... this.
28038         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
28039         %0, %1, %2<round_op3>}"): Changed to ...
28040         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
28041         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
28042         %2<round_scalar_mask_op3>}"): ... this.
28043         * config/i386/subst.md (round_scalar_nimm_predicate): New.
28045 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
28047         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
28048         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
28049         (_mm_maskz_sqrt_round_ss): New intrinsics.
28050         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
28051         (__builtin_ia32_sqrtsd_mask_round)
28052         (__builtin_ia32_sqrtss_mask_round): New builtins.
28053         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
28054         (__builtin_ia32_sqrtss_round): Remove.
28055         (__builtin_ia32_sqrtsd_mask_round)
28056         (__builtin_ia32_sqrtss_mask_round): New builtins.
28057         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
28058         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
28059         ((match_operand:VF_128 1 "vector_operand"
28060         "xBm,<round_constraint>")): Changed to ...
28061         ((match_operand:VF_128 1 "vector_operand"
28062         "xBm,<round_scalar_constraint>")): ... this.
28063         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
28064         %0, %2, %<iptr>1<round_op3>}): Changed to ...
28065         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
28066         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
28067         %<iptr>1<round_scalar_mask_op3>}): ... this.
28068         ((set_attr "prefix" "<round_prefix>")): Changed to ...
28069         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
28071 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
28073         PR target/84266
28074         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
28075         Cast vec_cmpeq result to correct type.
28076         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
28077         Cast vec_cmpgt result to correct type.
28079 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
28081         * final.c (final_scan_insn_1): Renamed from...
28082         (final_scan_insn): ... this.  New wrapper, to recover
28083         seen from the outermost call in recursive ones.
28084         * config/sparc/sparc.c (output_return): Drop seen from call.
28085         (output_sibcall): Likewise.
28086         * config/visium/visium.c (output_branch): Likewise.
28088 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
28090         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
28091         function label.
28093 2018-02-10  Alan Modra  <amodra@gmail.com>
28095         PR target/84300
28096         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
28097         Specify LR as an input.
28099 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
28101         PR sanitizer/83987
28102         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
28103         remove_member_access_dummy_vars): New functions.
28104         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
28105         lower_omp_1, execute_lower_omp): Use them.
28107         PR rtl-optimization/84308
28108         * shrink-wrap.c (spread_components): Release todo vector.
28110 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
28112         PR rtl-optimization/57193
28113         * ira-color.c (struct allocno_color_data): Add member
28114         conflict_allocno_hard_prefs.
28115         (update_conflict_allocno_hard_prefs): New.
28116         (bucket_allocno_compare_func): Add a preference based on
28117         conflict_allocno_hard_prefs.
28118         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
28119         (color_allocnos): Remove a dead code.  Initiate
28120         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
28122 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
28124         PR target/84226
28125         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
28126         constraint from =wa to wa.  Avoid a subreg on the output operand,
28127         instead use a pseudo and subreg it in a move.
28128         (p9_xxbrd_<mode>): Changed to ...
28129         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
28130         (p9_xxbrd_v2df): New expander.
28131         (p9_xxbrw_<mode>): Changed to ...
28132         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
28133         (p9_xxbrw_v4sf): New expander.
28135 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
28137         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
28139 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
28141         PR target/83926
28142         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
28143         multiply in 32-bit mode.
28144         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
28145         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
28146         mode.
28148 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
28150         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
28151         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
28152         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
28153         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
28155 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
28157         PR lto/84213
28158         * dwarf2out.c (is_trivial_indirect_ref): New function.
28159         (dwarf2out_late_global_decl): Do not generate a location
28160         attribute for variables that have a non-trivial DECL_VALUE_EXPR
28161         and that are not defined in the current unit.
28163 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
28165         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
28166         instead of a libcall for UNORDERED.
28168 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
28170         PR target/82641
28171         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
28172         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
28174 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
28176         PR target/PR84295
28177         * config/s390/s390.c (s390_set_current_function): Invoke
28178         s390_indirect_branch_settings also if fndecl didn't change.
28180 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
28182         * config/rs6000/rs6000.md (blockage): Set length to zero.
28184 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
28186         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
28188 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
28190         PR sanitizer/84285
28191         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
28192         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
28193         -static-lib*san.
28195         PR debug/84252
28196         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
28197         PARALLEL incoming that failed vt_get_decl_and_offset check.
28199         PR middle-end/84237
28200         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
28201         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
28202         TREE_READONLY bit.
28203         (get_variable_section): For decls in named .bss* sections pass true as
28204         second argument to bss_initializer_p.
28206 2018-02-09  Marek Polacek  <polacek@redhat.com>
28207             Jakub Jelinek  <jakub@redhat.com>
28209         PR c++/83659
28210         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
28211         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
28212         Sync some changes from cxx_fold_indirect_ref.
28214 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
28216         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
28217         markers.
28218         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
28219         (BLOCK_INLINE_ENTRY_LABEL): New.
28220         (dwarf2out_var_location): Disregard inline entry markers.
28221         (inline_entry_data): New struct.
28222         (inline_entry_data_hasher): New hashtable type.
28223         (inline_entry_data_hasher::hash): New.
28224         (inline_entry_data_hasher::equal): New.
28225         (inline_entry_data_table): New variable.
28226         (add_high_low_attributes): Add DW_AT_entry_pc and
28227         DW_AT_GNU_entry_view attributes if a pending entry is found
28228         in inline_entry_data_table.  Add old entry_pc attribute only
28229         if debug nonbinding markers are disabled.
28230         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
28231         markers are enabled.
28232         (block_within_block_p, dwarf2out_inline_entry): New.
28233         (dwarf2out_finish): Check that no entries remained in
28234         inline_entry_data_table.
28235         * final.c (reemit_insn_block_notes): Handle inline entry notes.
28236         (final_scan_insn, notice_source_line): Likewise.
28237         (rest_of_clean_state): Skip inline entry markers.
28238         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
28239         markers.
28240         * gimple.c (gimple_build_debug_inline_entry): New.
28241         * gimple.h (enum gimple_debug_subcode): Add
28242         GIMPLE_DEBUG_INLINE_ENTRY.
28243         (gimple_build_debug_inline_entry): Declare.
28244         (gimple_debug_inline_entry_p): New.
28245         (gimple_debug_nonbind_marker_p): Adjust.
28246         * insn-notes.def (INLINE_ENTRY): New.
28247         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
28248         inline entry marker notes.
28249         (print_insn): Likewise.
28250         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
28251         (INSN_DEBUG_MARKER_KIND): Likewise.
28252         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
28253         * tree-inline.c (expand_call_inline): Build and insert
28254         debug_inline_entry stmt.
28255         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
28256         inline entry blocks early, if nonbind markers are enabled.
28257         (dump_scope_block): Dump fragment info.
28258         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
28259         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
28260         (gimple_build_debug_inline_entry): New.
28261         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
28262         Enable/disable inline entry points too.
28263         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
28264         (DEBUG_INSN): Describe inline entry markers.
28266         * common.opt (gvariable-location-views): New.
28267         (gvariable-location-views=incompat5): New.
28268         * config.in: Rebuilt.
28269         * configure: Rebuilt.
28270         * configure.ac: Test assembler for view support.
28271         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
28272         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
28273         * dwarf2out.c (var_loc_view): New typedef.
28274         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
28275         (dwarf2out_locviews_in_attribute): New.
28276         (dwarf2out_locviews_in_loclist): New.
28277         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
28278         (enum dw_line_info_opcode): Add LI_adv_address.
28279         (struct dw_line_info_table): Add view.
28280         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
28281         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
28282         (zero_view_p): New variable.
28283         (ZERO_VIEW_P): New macro.
28284         (output_asm_line_debug_info): New.
28285         (struct var_loc_node): Add view.
28286         (add_AT_view_list, AT_loc_list): New.
28287         (add_var_loc_to_decl): Add view param.  Test it against last.
28288         (new_loc_list): Add view params.  Record them.
28289         (AT_loc_list_ptr): Handle loc and view lists.
28290         (view_list_to_loc_list_val_node): New.
28291         (print_dw_val): Handle dw_val_class_view_list.
28292         (size_of_die): Likewise.
28293         (value_format): Likewise.
28294         (loc_list_has_views): New.
28295         (gen_llsym): Set vl_symbol too.
28296         (maybe_gen_llsym, skip_loc_list_entry): New.
28297         (dwarf2out_maybe_output_loclist_view_pair): New.
28298         (output_loc_list): Output view list or entries too.
28299         (output_view_list_offset): New.
28300         (output_die): Handle dw_val_class_view_list.
28301         (output_dwarf_version): New.
28302         (output_compilation_unit_header): Use it.
28303         (output_skeleton_debug_sections): Likewise.
28304         (output_rnglists, output_line_info): Likewise.
28305         (output_pubnames, output_aranges): Update version comments.
28306         (output_one_line_info_table): Output view numbers in asm comments.
28307         (dw_loc_list): Determine current endview, pass it to new_loc_list.
28308         Call maybe_gen_llsym.
28309         (loc_list_from_tree_1): Adjust.
28310         (add_AT_location_description): Create view list attribute if
28311         needed, check it's absent otherwise.
28312         (convert_cfa_to_fb_loc_list): Adjust.
28313         (maybe_emit_file): Call output_asm_line_debug_info for test.
28314         (dwarf2out_var_location): Reset views as needed.  Precompute
28315         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
28316         attribute.  Set view.
28317         (new_line_info_table): Reset next view.
28318         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
28319         (dwarf2out_source_line): Likewise.  Output view resets and labels to
28320         the assembler, or select appropriate line info opcodes.
28321         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
28322         (optimize_string_length): Catch it.  Adjust.
28323         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
28324         dw_val_class_view_list, and remove it if no longer needed.
28325         (hash_loc_list): Hash view numbers.
28326         (loc_list_hasher::equal): Compare them.
28327         (optimize_location_lists): Check whether a view list symbol is
28328         needed, and whether the locview attribute is present, and
28329         whether they match.  Remove the locview attribute if no longer
28330         needed.
28331         (index_location_lists): Call skip_loc_list_entry for test.
28332         (dwarf2out_finish): Call output_asm_line_debug_info for test.
28333         Use output_dwarf_version.
28334         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
28335         (struct dw_val_node): Add val_view_list.
28336         * final.c (SEEN_NEXT_VIEW): New.
28337         (set_next_view_needed): New.
28338         (clear_next_view_needed): New.
28339         (maybe_output_next_view): New.
28340         (final_start_function): Rename to...
28341         (final_start_function_1): ... this.  Take pointer to FIRST,
28342         add SEEN parameter.  Emit param bindings in the initial view.
28343         (final_start_function): Reintroduce SEEN-less interface.
28344         (final): Rename to...
28345         (final_1): ... this.  Take SEEN parameter.  Output final pending
28346         next view at the end.
28347         (final): Reintroduce seen-less interface.
28348         (final_scan_insn): Output pending next view before switching
28349         sections or ending a block.  Mark the next view as needed when
28350         outputting variable locations.  Notify debug backend of section
28351         changes, and of location view changes.
28352         (rest_of_handle_final): Adjust.
28353         * toplev.c (process_options): Autodetect value for debug variable
28354         location views option.  Warn on incompat5 without -gdwarf-5.
28355         * doc/invoke.texi (gvariable-location-views): New.
28356         (gvariable-location-views=incompat5): New.
28357         (gno-variable-location-views): New.
28359 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
28361         PR tree-optimization/84136
28362         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
28363         that the result of find_edge is non-NULL.
28365 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
28367         PR target/83008
28368         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
28369         storing integer register in SImode.  Fix cost of 256 and 512
28370         byte aligned SSE register store.
28372 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
28374         * config/i386/i386.c (ix86_multiplication_cost): Fix
28375         multiplication cost for TARGET_AVX512DQ.
28377 2018-02-08  Marek Polacek  <polacek@redhat.com>
28379         PR tree-optimization/84238
28380         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
28381         get_range_strlen.
28383 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
28385         PR tree-optimization/84265
28386         * tree-vect-stmts.c (vectorizable_store): Don't treat
28387         VMAT_CONTIGUOUS accesses as grouped.
28388         (vectorizable_load): Likewise.
28390 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
28392         PR tree-optimization/81635
28393         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
28394         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
28395         (test_round_for_mask): New functions.
28396         (wide_int_cc_tests): Call test_round_for_mask.
28397         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
28398         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
28399         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
28400         range returned by get_range_info.
28402 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
28404         PR ipa/81360
28405         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
28406         * symtab.c: Include builtins.h
28407         (symtab_node::output_to_lto_symbol_table_p): Move here
28408         from lto-streamer-out.c:output_symbol_p.
28409         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
28410         (output_symbol_p): Move all logic to symtab.c
28411         (produce_symtab): Update.
28413 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
28415         * config/s390/s390-opts.h (enum indirect_branch): Define.
28416         * config/s390/s390-protos.h (s390_return_addr_from_memory)
28417         (s390_indirect_branch_via_thunk)
28418         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
28419         (enum s390_indirect_branch_type): Define.
28420         * config/s390/s390.c (struct s390_frame_layout, struct
28421         machine_function): Remove.
28422         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
28423         (indirect_branch_table_label_no, indirect_branch_table_name):
28424         Define variables.
28425         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
28426         (enum s390_indirect_branch_option): Define.
28427         (s390_return_addr_from_memory): New function.
28428         (s390_handle_string_attribute): New function.
28429         (s390_attribute_table): Add new attribute handler.
28430         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
28431         (s390_indirect_branch_via_thunk): New function.
28432         (s390_indirect_branch_via_inline_thunk): New function.
28433         (s390_function_ok_for_sibcall): When jumping via thunk disallow
28434         sibling call optimization for non z10 compiles.
28435         (s390_emit_call): Force indirect branch target to be a single
28436         register.  Add r1 clobber for non-z10 compiles.
28437         (s390_emit_epilogue): Emit return jump via return_use expander.
28438         (s390_reorg): Handle JUMP_INSNs as execute targets.
28439         (s390_option_override_internal): Perform validity checks for the
28440         new command line options.
28441         (s390_indirect_branch_attrvalue): New function.
28442         (s390_indirect_branch_settings): New function.
28443         (s390_set_current_function): Invoke s390_indirect_branch_settings.
28444         (s390_output_indirect_thunk_function):  New function.
28445         (s390_code_end): Implement target hook.
28446         (s390_case_values_threshold): Implement target hook.
28447         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
28448         macros.
28449         * config/s390/s390.h (struct s390_frame_layout)
28450         (struct machine_function): Move here from s390.c.
28451         (TARGET_INDIRECT_BRANCH_NOBP_RET)
28452         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
28453         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
28454         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
28455         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
28456         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
28457         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
28458         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
28459         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
28460         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
28461         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
28462         (mnemonic attribute): Add values which aren't recognized
28463         automatically.
28464         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
28465         pattern for branch conversion.  Fix mnemonic attribute.
28466         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
28467         indirect branch via thunk if requested.
28468         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
28469         ("*indirect_jump"): Disable for branch conversion using out of
28470         line thunks.
28471         ("indirect_jump_via_thunk<mode>_z10")
28472         ("indirect_jump_via_thunk<mode>")
28473         ("indirect_jump_via_inlinethunk<mode>_z10")
28474         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
28475         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
28476         ("casesi_jump_via_inlinethunk<mode>_z10")
28477         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
28478         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
28479         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
28480         ("*indirect2_jump"): Disable for branch conversion.
28481         ("casesi_jump"): Turn into expander and expand patterns for branch
28482         conversion.
28483         ("return_use"): New expander.
28484         ("*return"): Emit return via thunk and rename it to ...
28485         ("*return<mode>"): ... this one.
28486         * config/s390/s390.opt: Add new options and and enum for the
28487         option values.
28489 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
28491         * lra-constraints.c (match_reload): Unconditionally use
28492         gen_lowpart_SUBREG, rather than selecting between that
28493         and equivalent gen_rtx_SUBREG code.
28495 2018-02-08  Richard Biener  <rguenther@suse.de>
28497         PR tree-optimization/84233
28498         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
28499         changed flag instead of boguously re-using phi_inserted.
28501 2018-02-08  Martin Jambor  <mjambor@suse.cz>
28503         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
28504         static local variables.
28506 2018-02-08  Richard Biener  <rguenther@suse.de>
28508         PR tree-optimization/84278
28509         * tree-vect-stmts.c (vectorizable_store): When looking for
28510         smaller vector types to perform grouped strided loads/stores
28511         make sure the mode is supported by the target.
28512         (vectorizable_load): Likewise.
28514 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
28516         * config/aarch64/aarch64.c (aarch64_components_for_bb):
28517         Increase LDP/STP opportunities by adding adjacent callee-saves.
28519 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
28521         PR rtl-optimization/84068
28522         PR rtl-optimization/83459
28523         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
28525 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
28527         PR tree-optimization/84224
28528         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
28529         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
28530         non-zero arguments.
28532 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
28534         PR target/84113
28535         * config/rs6000/altivec.md (*restore_world): Remove LR use.
28536         * config/rs6000/predicates.md (restore_world_operation): Adjust op
28537         count, remove one USE.
28539 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
28541         * doc/install.texi (Configuration): Document the
28542         --with-long-double-format={ibm,ieee} PowerPC configuration
28543         options.
28545         PR target/84154
28546         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
28547         Convert from define_expand to be define_insn_and_split.  Rework
28548         float/double/_Float128 conversions to QI/HI/SImode to work with
28549         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
28550         conversions to QI/HImode types did a store and then a load to
28551         truncate the value.  For conversions to VSX registers, don't split
28552         the insn, instead emit the code directly.  Use the code iterator
28553         any_fix to combine signed and unsigned conversions.
28554         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
28555         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
28556         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
28557         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
28558         (fix_<mode>di2_hw): Likewise.
28559         (fixuns_<mode>di2_hw): Likewise.
28560         (fix_<mode>si2_hw): Likewise.
28561         (fixuns_<mode>si2_hw): Likewise.
28562         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
28563         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
28564         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
28565         fix<uns>_trunc<SFDF:mode>si2_p8.
28566         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
28567         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
28568         (fix<uns>_<mode>_mem): Likewise.
28569         (fctiw<u>z_<mode>_mem): Likewise.
28570         (fix<uns>_<mode>_mem): Likewise.
28571         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
28572         the register allocator from doing a direct move to the GPRs to do
28573         a store, and instead use the ISA 3.0 store byte/half-word from
28574         vector register instruction.  For IEEE 128-bit floating point,
28575         also optimize stores of 32-bit ints.
28576         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
28578 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
28580         * genextract.c (push_pathstr_operand): New function to support
28581         [a-zA-Z].
28582         (walk_rtx): Call push_pathstr_operand.
28583         (print_path): Support [a-zA-Z].
28585 2018-02-07  Richard Biener  <rguenther@suse.de>
28587         PR tree-optimization/84037
28588         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
28589         (cse_and_gimplify_to_preheader): Declare.
28590         (vect_get_place_in_interleaving_chain): Likewise.
28591         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
28592         ivexpr_map.
28593         (_loop_vec_info::~_loop_vec_info): Delete it.
28594         (cse_and_gimplify_to_preheader): New function.
28595         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
28596         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
28597         (vectorizable_load): Likewise.  For grouped stores always base
28598         the IV on the first element.
28599         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
28600         condition before gimplifying.
28602 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
28604         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
28605         *DIV_EXPR and *MOD_EXPR.
28607 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
28609         PR target/84248
28610         * config/i386/i386.c (ix86_option_override_internal): Mask out
28611         the CF_SET bit when checking -fcf-protection.
28613 2018-02-07  Tom de Vries  <tom@codesourcery.com>
28615         PR libgomp/84217
28616         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
28617         enough.
28619 2018-02-07  Richard Biener  <rguenther@suse.de>
28621         PR tree-optimization/84204
28622         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
28623         this place.
28625         PR tree-optimization/84205
28626         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
28627         special-case isl_ast_op_zdiv_r.
28629         PR tree-optimization/84223
28630         * graphite-scop-detection.c (gather_bbs::before_dom_children):
28631         Only add conditions from within the region.
28632         (gather_bbs::after_dom_children): Adjust.
28634 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
28636         PR target/84209
28637         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
28638         * config/avr/avr.md: Only post-reload split REG-REG moves if
28639         either register is GENERAL_REG_P.
28641 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
28643         PR tree-optimization/84235
28644         * tree-ssa-scopedtables.c
28645         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
28646         if the subtraction is performed in floating point type where NaNs are
28647         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
28648         build 1.  Formatting fix.
28650 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
28652         PR target/84146
28653         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
28654         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
28655         and skip it regardless of bb boundaries.  Use CALL_P macro,
28656         don't test INSN_P (insn) together with CALL_P or JUMP_P check
28657         unnecessarily, formatting fix.
28659 2018-02-06  Michael Collison  <michael.collison@arm.com>
28661         * config/arm/thumb2.md:
28662         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
28663         (*thumb_mov_notscc): Ditto.
28665 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
28667         PR target/84154
28668         * config/rs6000/rs6000.md (su code attribute): Use "u" for
28669         unsigned_fix, not "s".
28671 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
28673         * configure.ac (gcc_fn_eh_frame_ro): New function.
28674         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
28675         correct .eh_frame permissions.
28676         * configure: Regenerate.
28678 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
28680         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
28681         irrelevant options.
28683 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
28685         * config/rs6000/rs6000.c (rs6000_option_override_internal):
28686         Display warning message for -mno-speculate-indirect-jumps.
28688 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
28690         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
28691         Undocumented.
28692         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
28694 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
28696         PR tree-optimization/84225
28697         * tree-eh.c (find_trapping_overflow): Only call
28698         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
28700 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
28702         PR target/84145
28703         * config/i386/i386.c: Reimplement the check of possible options
28704         -mibt/-mshstk conbination. Change error messages.
28705         * doc/invoke.texi: Fix a typo: remove extra '='.
28707 2018-02-06  Marek Polacek  <polacek@redhat.com>
28709         PR tree-optimization/84228
28710         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
28712 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
28714         PR target/82641
28715         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
28716         emitted arch directives.
28717         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
28718         __ARM_FEATURE_COPROC before changing architectures.
28720 2018-02-06  Richard Biener  <rguenther@suse.de>
28722         * config/i386/i386.c (print_reg): Fix typo.
28723         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
28725 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
28727         * configure: Regenerate.
28729 2018-02-05  Martin Sebor  <msebor@redhat.com>
28731         PR tree-optimization/83369
28732         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
28733         inlining context.
28735 2018-02-05  Martin Liska  <mliska@suse.cz>
28737         * doc/invoke.texi: Cherry-pick upstream r323995.
28739 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
28741         * ira.c (ira_init_register_move_cost): Adjust comment.
28743 2018-02-05  Martin Liska  <mliska@suse.cz>
28745         PR gcov-profile/84137
28746         * doc/gcov.texi: Fix typo in documentation.
28748 2018-02-05  Martin Liska  <mliska@suse.cz>
28750         PR gcov-profile/83879
28751         * doc/gcov.texi: Document necessity of --dynamic-list-data when
28752         using dlopen functionality.
28754 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
28756         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
28757         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
28758         _mm_maskz_range_ss, _mm_mask_range_round_ss,
28759         _mm_maskz_range_round_ss): New intrinsics.
28760         (__builtin_ia32_rangesd128_round)
28761         (__builtin_ia32_rangess128_round): Remove.
28762         (__builtin_ia32_rangesd128_mask_round,
28763         __builtin_ia32_rangess128_mask_round): New builtins.
28764         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
28765         __builtin_ia32_rangess128_round): Remove.
28766         (__builtin_ia32_rangesd128_mask_round,
28767         __builtin_ia32_rangess128_mask_round): New builtins.
28768         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
28769         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
28770         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
28771         "<round_saeonly_constraint>")): Changed to ...
28772         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
28773         "<round_saeonly_scalar_constraint>")): ... this.
28774         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
28775         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
28776         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
28777         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
28778         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
28780 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
28782         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
28783         options.
28784         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
28785         Remove all values except native, 8540 and 8548.
28787 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
28789         * config/i386/i386.c (ix86_output_function_return): Pass
28790         INVALID_REGNUM, instead of -1, as invalid register number to
28791         indirect_thunk_name and output_indirect_thunk.
28793 2018-02-02  Julia Koval  <julia.koval@intel.com>
28795         * config.gcc: Add -march=icelake.
28796         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
28797         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
28798         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
28799         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
28800         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
28801         (processor_target_table): Add icelake.
28802         (ix86_option_override_internal): Handle new PTAs.
28803         (get_builtin_code_for_version): Handle icelake.
28804         (M_INTEL_COREI7_ICELAKE): New.
28805         (fold_builtin_cpu): Handle icelake.
28806         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
28807         * doc/invoke.texi: Add -march=icelake.
28809 2018-02-02  Julia Koval  <julia.koval@intel.com>
28811         * config/i386/i386.c (ix86_option_override_internal): Change flags type
28812         to wide_int_bitmask.
28813         * wide-int-bitmask.h: New.
28815 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
28817         PR target/84066
28818         * config/i386/i386.md: Replace Pmode with word_mode in
28819         builtin_setjmp_setup and builtin_longjmp to support x32.
28821 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
28823         PR target/56010
28824         PR target/83743
28825         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
28826         #include "opts.h".
28827         (rs6000_supported_cpu_names): New static variable.
28828         (linux_cpu_translation_table): Likewise.
28829         (elf_platform) <cpu>: Define new static variable and use it.
28830         Translate kernel AT_PLATFORM name to canonical name if needed.
28831         Error if platform name is unknown.
28833 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
28835         PR target/84089
28836         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
28838 2018-02-01  Jeff Law  <law@redhat.com>
28840         PR target/84128
28841         * config/i386/i386.c (release_scratch_register_on_entry): Add new
28842         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
28843         the scratch if RELEASE_VIA_POP is false.
28844         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
28845         If we have to save a temporary register, decrement SIZE appropriately.
28846         Pass new arguments to release_scratch_register_on_entry.
28847         (ix86_adjust_stack_and_probe): Likewise.
28848         (ix86_emit_probe_stack_range): Pass new arguments to
28849         release_scratch_register_on_entry.
28851 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
28853         PR rtl-optimization/84157
28854         * combine.c (change_zero_ext): Use REG_P predicate in
28855         front of HARD_REGISTER_P predicate.
28857 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
28859         * config/avr/avr.c (avr_option_override): Move disabling of
28860         -fdelete-null-pointer-checks to...
28861         * common/config/avr/avr-common.c (avr_option_optimization_table):
28862         ...here.
28864 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
28866         PR tree-optimization/81635
28867         * tree-data-ref.c (split_constant_offset_1): For types that
28868         wrap on overflow, try to use range info to prove that wrapping
28869         cannot occur.
28871 2018-02-01  Renlin Li  <renlin.li@arm.com>
28873         PR target/83370
28874         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
28875         TAILCALL_ADDR_REGS.
28876         (aarch64_register_move_cost): Likewise.
28877         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
28878         TAILCALL_ADDR_REGS.
28879         (REG_CLASS_NAMES): Likewise.
28880         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
28881         TAILCALL_ADDR_REGS. Remove IP registers.
28882         * config/aarch64/aarch64.md (Ucs): Update register constraint.
28884 2018-02-01  Richard Biener  <rguenther@suse.de>
28886         * domwalk.h (dom_walker::dom_walker): Add additional constructor
28887         for specifying RPO order and allow NULL for that.
28888         * domwalk.c (dom_walker::dom_walker): Likewise.
28889         (dom_walker::walk): Handle NULL RPO order.
28890         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
28891         in RPO order.
28892         (rewrite_update_dom_walker): Likewise.
28893         (mark_def_dom_walker): Likewise.
28895 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
28897         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
28898         (aarch64_maybe_expand_sve_subreg_move): Declare.
28899         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
28900         * config/aarch64/predicates.md (aarch64_any_register_operand): New
28901         predicate.
28902         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
28903         that are semantically a reverse operation.
28904         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
28905         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
28906         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
28907         functions.
28908         (aarch64_can_change_mode_class): For big-endian, forbid changes
28909         between two SVE modes if they have different element sizes.
28911 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
28913         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
28914         the TImode handling for big-endian targets.
28916 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
28918         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
28919         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
28920         not just bytes.
28921         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
28922         Remove BSWAP handing for big-endian targets and use the form of
28923         LD1RQ appropariate for the mode.
28925 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
28927         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
28928         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
28929         duplicated element.
28931 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
28933         PR tearget/83845
28934         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
28935         check for operands that need to go through aarch64_sve_reload_be.
28937 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
28939         PR tree-optimization/81661
28940         PR tree-optimization/84117
28941         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
28942         * tree-eh.c: Include gimplify.h.
28943         (find_trapping_overflow, replace_trapping_overflow,
28944         rewrite_to_non_trapping_overflow): New functions.
28945         * tree-vect-loop.c: Include tree-eh.h.
28946         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
28947         * tree-data-ref.c: Include tree-eh.h.
28948         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
28950 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
28952         PR rtl-optimization/84123
28953         * combine.c (change_zero_ext): Check if hard register satisfies
28954         can_change_dest_mode before calling gen_lowpart_SUBREG.
28956 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
28958         PR target/82444
28959         * ira.c (ira_init_register_move_cost): Remove assert.
28961 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
28963         PR rtl-optimization/84071
28964         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
28965         * doc/tm.texi: Regenerate.
28967 2018-01-31  Richard Biener  <rguenther@suse.de>
28969         PR tree-optimization/84132
28970         * tree-data-ref.c (analyze_miv_subscript): Properly
28971         check whether evolution_function_is_affine_multivariate_p
28972         before calling gcd_of_steps_may_divide_p.
28974 2018-01-31  Julia Koval  <julia.koval@intel.com>
28976         PR target/83618
28977         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
28978         * config/i386/i386.md (rdpid_rex64) New.
28979         (rdpid): Make 32bit only.
28981 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
28983         PR lto/84105
28984         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
28985         an IDENTIFIER_NODE for FUNCTION_TYPE's.
28987 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
28989         Revert
28990         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
28992         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
28994 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
28996         PR rtl-optimization/84071
28997         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
28998         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
29000 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
29002         * config/arc/arc.c (arc_handle_aux_attribute): New function.
29003         (arc_attribute_table): Add 'aux' attribute.
29004         (arc_in_small_data_p): Consider aux like variables.
29005         (arc_is_aux_reg_p): New function.
29006         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
29007         (arc_get_aux_arg): New function.
29008         (prepare_move_operands): Handle aux-register access.
29009         (arc_handle_aux_attribute): New function.
29010         * doc/extend.texi (ARC Variable attributes): Add subsection.
29012 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
29014         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
29015         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
29016         (arc_attribute_table): Add 'uncached' attribute.
29017         (arc_print_operand): Print '.di' flag for uncached memory
29018         accesses.
29019         (arc_in_small_data_p): Do not consider for small data the uncached
29020         types.
29021         (arc_is_uncached_mem_p): New function.
29022         * config/arc/predicates.md (compact_store_memory_operand): Check
29023         for uncached memory accesses.
29024         (nonvol_nonimm_operand): Likewise.
29025         * doc/extend.texi (ARC Type Attribute): New subsection.
29027 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
29029         PR c/84100
29030         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
29031         falign-loops=): Add Optimization flag.
29033 2018-01-30  Jeff Law  <law@redhat.com>
29035         PR target/84064
29036         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
29037         INT_REGISTERS_SAVED.  Check it prior to calling
29038         get_scratch_register_on_entry.
29039         (ix86_adjust_stack_and_probe): Similarly.
29040         (ix86_emit_probe_stack_range): Similarly.
29041         (ix86_expand_prologue): Corresponding changes.
29043 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
29045         PR target/40411
29046         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
29047         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
29049 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
29051         PR target/84112
29052         * lra-constraints.c (curr_insn_transform): Process AND in the
29053         address.
29055 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
29057         PR rtl-optimization/83986
29058         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
29059         dependence against last_pending_memory_flush in addition to
29060         pending_jump_insns.
29062 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
29064         PR tree-optimization/81611
29065         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
29066         copies.
29068 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
29070         PR target/83758
29071         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
29072         a reg rtx.
29074 2018-01-30  Richard Biener  <rguenther@suse.de>
29075             Jakub Jelinek  <jakub@redhat.com>
29077         PR tree-optimization/84111
29078         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
29079         inner loops added during recursion, as they don't have up-to-date
29080         SSA form.
29082 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
29084         PR ipa/81360
29085         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
29086         (can_inline_edge_by_limits_p): ... here.
29087         (can_early_inline_edge_p, check_callers,
29088         update_caller_keys, update_callee_keys, recursive_inlining,
29089         add_new_edges_to_heap, speculation_useful_p,
29090         inline_small_functions,
29091         inline_small_functions, flatten_function,
29092         inline_to_all_callers_1): Update.
29094 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
29096         * profile-count.c (profile_count::combine_with_ipa_count): Handle
29097         zeros correctly.
29099 2018-01-30  Richard Biener  <rguenther@suse.de>
29101         PR tree-optimization/83008
29102         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
29103         invariant and constant vector uses in stmts when they need
29104         more than one stmt.
29106 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
29108         PR bootstrap/84017
29109         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
29110         * configure: Regenerate.
29112 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
29114         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
29115         pattern.
29116         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
29117         Use gen_rtx_REG rather than gen_lowpart.
29119 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
29121         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
29122         rather than 0 when creating partial subregs.
29124 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
29126         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
29127         of usage.
29129 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
29131         PR target/81550
29132         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
29133         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
29134         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
29135         flags.  This restores the settings used before the 2017-07-24.
29136         Turning off pre increment/decrement/modify allows IVOPTS to
29137         optimize DF/SF loops where the index is an int.
29139 2018-01-29  Richard Biener  <rguenther@suse.de>
29140             Kelvin Nilsen  <kelvin@gcc.gnu.org>
29142         PR bootstrap/80867
29143         * tree-vect-stmts.c (vectorizable_call): Don't call
29144         targetm.vectorize_builtin_md_vectorized_function if callee is
29145         NULL.
29147 2018-01-22  Carl Love  <cel@us.ibm.com>
29149         * doc/extend.tex: Fix typo in second arg in
29150         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
29152 2018-01-29  Richard Biener  <rguenther@suse.de>
29154         PR tree-optimization/84086
29155         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
29156         (flush_ssaname_freelist): When SSA names were released reset
29157         the SCEV hash table.
29159 2018-01-29  Richard Biener  <rguenther@suse.de>
29161         PR tree-optimization/84057
29162         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
29163         removed paths when removing edges.
29165 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
29167         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
29168         -mfunction-return=@var{choice}.
29170 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
29172         PR diagnostic/84034
29173         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
29174         Handle CR like TAB.
29175         (layout::print_source_line): Likewise.
29176         (test_get_line_width_without_trailing_whitespace): Add test cases.
29178 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
29180         PR middle-end/84040
29181         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
29182         debug insns.
29184 2018-01-26  Jim Wilson  <jimw@sifive.com>
29186         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
29188         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
29189         specified.
29191 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
29193         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
29194         and CMP + SUB-immediate -> SUBS.
29196 2018-01-26  Martin Sebor  <msebor@redhat.com>
29198         PR tree-optimization/83896
29199         * tree-ssa-strlen.c (get_string_len): Rename...
29200         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
29201         Avoid assuming length is constant.
29202         (handle_char_store): Use HOST_WIDE_INT for string length.
29204 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
29206         PR target/81763
29207         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
29208         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
29210 2018-01-26  Richard Biener  <rguenther@suse.de>
29212         PR rtl-optimization/84003
29213         * dse.c (record_store): Only record redundant stores when
29214         the earlier store aliases at least all accesses the later one does.
29216 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
29218         PR rtl-optimization/83985
29219         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
29220         REG_CFA_RESTORE insns.
29221         (delete_unmarked_insns): Don't ignore separate shrink wrapping
29222         REG_CFA_RESTORE insns here.
29224         PR c/83989
29225         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
29226         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
29228 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
29230         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
29231         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
29232         (arc_init): Likewise.
29233         (arc_override_options): Likewise.
29234         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
29235         value.
29236         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
29237         support.
29238         * config/arc/arc.h (TARGET_DBNZ): Define.
29239         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
29240         properly set the tune attribute.
29241         (dbnz): Use TARGET_DBNZ guard.
29242         * config/arc/arc.opt (mtune): Add core3 option.
29244 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
29246         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
29247         recognize new pic like addresses.
29248         (arc_delegitimize_address): Clean up.
29250 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
29252         * config/arc/arc-arches.def: Option mrf16 valid for all
29253         architectures.
29254         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
29255         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
29256         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
29257         * config/arc/arc-tables.opt: Regenerate.
29258         * config/arc/arc.c (arc_conditional_register_usage): Handle
29259         reduced register file case.
29260         (arc_file_start): Set must have build attributes.
29261         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
29262         mrf16 option value.
29263         * config/arc/arc.opt (mrf16): Add new option.
29264         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
29265         * config/arc/genmultilib.awk: Handle new mrf16 option.
29266         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
29267         * config/arc/t-multilib: Regenerate.
29268         * doc/invoke.texi (ARC Options): Document mrf16 option.
29270 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
29272         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
29273         * config/arc/arc.c (arc_handle_secure_attribute): New function.
29274         (arc_attribute_table): Add 'secure_call' attribute.
29275         (arc_print_operand): Print secure call operand.
29276         (arc_function_ok_for_sibcall): Don't optimize tail calls when
29277         secure.
29278         (arc_is_secure_call_p): New function.  * config/arc/arc.md
29279         (call_i): Add support for sjli instruction.
29280         (call_value_i): Likewise.
29281         * config/arc/constraints.md (Csc): New constraint.
29283 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
29284             John Eric Martin  <John.Martin@emmicro-us.com>
29286         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
29287         * config/arc/arc.c (_arc_jli_section): New struct.
29288         (arc_jli_section): New type.
29289         (rc_jli_sections): New static variable.
29290         (arc_handle_jli_attribute): New function.
29291         (arc_attribute_table): Add jli_always and jli_fixed attribute.
29292         (arc_file_end): New function.
29293         (TARGET_ASM_FILE_END): Define.
29294         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
29295         (arc_add_jli_section): New function.
29296         (jli_call_scan): Likewise.
29297         (arc_reorg): Call jli_call_scan.
29298         (arc_output_addsi): Remove 'S' from printing asm operand.
29299         (arc_is_jli_call_p): New function.
29300         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
29301         operand.
29302         (movhi_insn): Likewise.
29303         (movsi_insn): Likewise.
29304         (movsi_set_cc_insn): Likewise.
29305         (loadqi_update): Likewise.
29306         (load_zeroextendqisi_update): Likewise.
29307         (load_signextendqisi_update): Likewise.
29308         (loadhi_update): Likewise.
29309         (load_zeroextendhisi_update): Likewise.
29310         (load_signextendhisi_update): Likewise.
29311         (loadsi_update): Likewise.
29312         (loadsf_update): Likewise.
29313         (movsicc_insn): Likewise.
29314         (bset_insn): Likewise.
29315         (bxor_insn): Likewise.
29316         (bclr_insn): Likewise.
29317         (bmsk_insn): Likewise.
29318         (bicsi3_insn): Likewise.
29319         (cmpsi_cc_c_insn): Likewise.
29320         (movsi_ne): Likewise.
29321         (movsi_cond_exec): Likewise.
29322         (clrsbsi2): Likewise.
29323         (norm_f): Likewise.
29324         (normw): Likewise.
29325         (swap): Likewise.
29326         (divaw): Likewise.
29327         (flag): Likewise.
29328         (sr): Likewise.
29329         (kflag): Likewise.
29330         (ffs): Likewise.
29331         (ffs_f): Likewise.
29332         (fls): Likewise.
29333         (call_i): Remove 'S' asm letter, add jli instruction.
29334         (call_value_i): Likewise.
29335         * config/arc/arc.op (mjli-always): New option.
29336         * config/arc/constraints.md (Cji): New constraint.
29337         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
29338         operand.
29339         (subsf3_fpx): Likewise.
29340         (mulsf3_fpx): Likewise.
29341         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
29342         asm operand.
29343         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
29344         function attrbutes.
29345         * doc/invoke.texi (ARC): Document mjli-always option.
29347 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
29349         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
29350         avoid addition with 0 and use incw and decw where possible.
29352 2018-01-26  Richard Biener  <rguenther@suse.de>
29354         PR tree-optimization/81082
29355         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
29356         association if it requires casting to unsigned.
29357         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
29358         from fold_plusminus_mult_expr to catch important cases late when
29359         range info is available.
29361 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
29363         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
29364         * configure.ac (hidden_linkonce): New test.
29365         * configure: Regenerate.
29366         * config.in: Regenerate.
29368 2018-01-26  Julia Koval  <julia.koval@intel.com>
29370         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
29371         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
29372         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
29373         _mm_mask_bitshuffle_epi64_mask): Fix type.
29374         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
29375         USI_FTYPE_V4DI_V4DI_USI): Remove.
29376         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
29377         __builtin_ia32_vpshufbitqmb256_mask,
29378         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
29379         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
29380         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
29382 2018-01-26  Alan Modra  <amodra@gmail.com>
29384         PR target/84033
29385         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
29386         UNSPEC_VBPERMQ.  Sort other unspecs.
29388 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
29390         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
29392 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
29394         PR middle-end/83055
29395         * predict.c (drop_profile): Do not push/pop cfun; update also
29396         node->count.
29397         (handle_missing_profiles): Fix logic looking for zero profiles.
29399 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
29401         PR middle-end/83977
29402         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
29403         on functions with #pragma omp declare simd or functions with simd
29404         attribute.
29405         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
29406         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
29407         Remove trailing \n from warning_at calls.
29409 2018-01-25  Tom de Vries  <tom@codesourcery.com>
29411         PR target/84028
29412         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
29413         for neutered workers.
29415 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
29417         PR target/68467
29418         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
29419         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
29421 2018-01-24  Jeff Law  <law@redhat.com>
29423         PR target/83994
29424         * i386.c (get_probe_interval): Move to earlier point.
29425         (ix86_compute_frame_layout): If -fstack-clash-protection and
29426         the frame is larger than the probe interval, then use pushes
29427         to save registers rather than reg->mem moves.
29428         (ix86_expand_prologue): Remove conditional for int_registers_saved
29429         assertion.
29431 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
29433         PR target/84014
29434         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
29435         min/max for never referenced object.
29437 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
29439         PR middle-end/83977
29440         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
29441         here.
29442         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
29443         attributes from DECL_ATTRIBUTES (decl) without affecting
29444         DECL_ATTRIBUTES (current_function_decl).
29445         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
29446         functions with non-NULL DECL_ABSTRACT_ORIGIN.
29448 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
29450         PR tree-optimization/83979
29451         * fold-const.c (fold_comparison): Use constant_boolean_node
29452         instead of boolean_{true,false}_node.
29454 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
29456         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
29457         with zero counts.
29459 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29461         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
29462         Simplify the clause that sets the length attribute.
29463         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
29464         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
29465         clause that sets the length attribute.
29466         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
29468 2018-01-24  Tom de Vries  <tom@codesourcery.com>
29470         PR target/83589
29471         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
29472         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
29473         Add strict parameter.
29474         (prevent_branch_around_nothing): Insert dummy insn between branch to
29475         label and label with no ptx insn inbetween.
29476         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
29478 2018-01-24  Tom de Vries  <tom@codesourcery.com>
29480         PR target/81352
29481         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
29482         for neutered threads in warp.
29483         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
29485 2018-01-24  Richard Biener  <rguenther@suse.de>
29487         PR tree-optimization/83176
29488         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
29489         operands.
29491 2018-01-24  Richard Biener  <rguenther@suse.de>
29493         PR tree-optimization/82819
29494         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
29495         code generating pluses that are no-ops in the target precision.
29497 2018-01-24  Richard Biener  <rguenther@suse.de>
29499         PR middle-end/84000
29500         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
29502 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
29504         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
29505         to merge probabilities.
29506         * predict.c (probably_never_executed): Also mark as cold functions
29507         with global 0 profile and guessed local profile.
29508         * profile-count.c (profile_probability::combine_with_count): New
29509         member function.
29510         * profile-count.h (profile_probability::operator*,
29511         profile_probability::operator*=, profile_probability::operator/,
29512         profile_probability::operator/=): Reduce precision to adjusted
29513         and set value to guessed on contradictory divisions.
29514         (profile_probability::combine_with_freq): Remove.
29515         (profile_probability::combine_wiht_count): Declare.
29516         (profile_count::force_nonzero):: Set to adjusted.
29517         (profile_count::probability_in):: Set quality to adjusted.
29518         * tree-ssa-tail-merge.c (replace_block_by): Use
29519         combine_with_count.
29521 2018-01-23  Andrew Waterman  <andrew@sifive.com>
29522             Jim Wilson  <jimw@sifive.com>
29524         * config/riscv/riscv.c (riscv_stack_boundary): New.
29525         (riscv_option_override): Set riscv_stack_boundary.  Handle
29526         riscv_preferred_stack_boundary_arg.
29527         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
29528         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
29529         (STACK_BOUNDARY): Set to riscv_stack_boundary.
29530         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
29531         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
29532         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
29534 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
29536         PR target/83905
29537         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
29538         of struct ix86_frame.
29539         (ix86_expand_epilogue): Likewise.  Add a local variable for
29540         the reg_save_offset field in struct ix86_frame.
29542 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
29544         PR tree-optimization/82604
29545         * tree-loop-distribution.c (enum partition_kind): New enum item
29546         PKIND_PARTIAL_MEMSET.
29547         (partition_builtin_p): Support above new enum item.
29548         (generate_code_for_partition): Ditto.
29549         (compute_access_range): Differentiate cases that equality can be
29550         proven at all loops, the innermost loops or no loops.
29551         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
29552         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
29553         (finalize_partitions, distribute_loop): Don't fuse partition of
29554         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
29555         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
29556         parloop is enabled.
29558 2018-01-23  Martin Liska  <mliska@suse.cz>
29560         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
29561         order to ignore the predictor.
29562         (PRED_POLYMORPHIC_CALL): Likewise.
29563         (PRED_RECURSIVE_CALL): Likewise.
29565 2018-01-23  Martin Liska  <mliska@suse.cz>
29567         * tree-profile.c (tree_profiling): Print function header to
29568         aware reader which function we are working on.
29569         * value-prof.c (gimple_find_values_to_profile): Do not print
29570         not interesting value histograms.
29572 2018-01-23  Martin Liska  <mliska@suse.cz>
29574         * profile-count.h (enum profile_quality): Add
29575         profile_uninitialized as the first value. Do not number values
29576         as they are zero based.
29577         (profile_count::verify): Update sanity check.
29578         (profile_probability::verify): Likewise.
29580 2018-01-23  Nathan Sidwell  <nathan@acm.org>
29582         * doc/invoke.texi (ffor-scope): Deprecate.
29584 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
29586         PR tree-optimization/83510
29587         * domwalk.c (set_all_edges_as_executable): New function.
29588         (dom_walker::dom_walker): Convert bool param
29589         "skip_unreachable_blocks" to enum reachability.  Move setup of
29590         edge flags to set_all_edges_as_executable and only do it when
29591         reachability is REACHABLE_BLOCKS.
29592         * domwalk.h (enum dom_walker::reachability): New enum.
29593         (dom_walker::dom_walker): Convert bool param
29594         "skip_unreachable_blocks" to enum reachability.
29595         (set_all_edges_as_executable): New decl.
29596         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
29597         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
29598         "reachability".
29599         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
29600         but converting true to REACHABLE_BLOCKS.
29601         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
29602         * tree-vrp.c
29603         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
29604         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
29605         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
29606         REACHABLE_BLOCKS.
29607         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
29608         if check_all_array_refs will be called.
29610 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
29612         * tree.c (selftest::test_location_wrappers): Add more test
29613         coverage.
29615 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
29617         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
29618         (selftest::test_bit_in_range): Likewise.
29620 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
29622         PR testsuite/83888
29623         * doc/sourcebuild.texi (vect_float): Say that the selector
29624         only describes the situation when -funsafe-math-optimizations is on.
29625         (vect_float_strict): Document.
29627 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
29629         PR tree-optimization/83965
29630         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
29631         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
29632         instead of checking only for a reduction.
29633         (vect_recog_widen_sum_pattern): Likewise.
29635 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
29637         * predict.c (probably_never_executed): Only use precise profile info.
29638         (compute_function_frequency): Skip after inlining hack since we now
29639         have quality checking.
29641 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
29643         * profile-count.h (profile_probability::very_unlikely,
29644         profile_probability::unlikely, profile_probability::even): Set
29645         precision to guessed.
29647 2018-01-23  Richard Biener  <rguenther@suse.de>
29649         PR tree-optimization/83963
29650         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
29651         Properly terminate dominator walk when crossing the exit edge not
29652         when visiting its source block.
29654 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
29656         PR c++/83918
29657         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
29658         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
29660 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
29662         PR tree-optimization/83957
29663         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
29664         semicolon after for body surrounded by braces.
29666         PR tree-optimization/83081
29667         * profile-count.h (profile_probability::split): New method.
29668         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
29669         Use profile_probability::split.
29670         (do_compare_rtx_and_jump): Fix adjustment of probabilities
29671         when splitting a single conditional jump into 2.
29673 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
29675         PR tree-optimization/69452
29676         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
29677         decl.
29679 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
29681         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
29682         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
29683         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
29685 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
29687         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
29688         declaration.
29689         * config/rl78/rl78.md (movdi): New define_expand.
29690         * config/rl78/rl78.c (rl78_split_movdi): New function.
29692 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
29694         PR target/83862
29695         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
29696         no longer used.
29697         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
29698         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
29699         128-bit to produce an UNSPEC move to get the double word with the
29700         signbit and then a shift directly to do signbit.
29701         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
29702         implementation with a new version that just does either a direct
29703         move or a regular move.  Move memory interface to separate insns.
29704         Move insns so they are next to the expander.
29705         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
29706         with signbit move.  Split big and little endian case.
29707         (signbit<mode>2_dm_mem_le): Likewise.
29708         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
29709         (signbit<mode>2_dm2): Likewise.
29711 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
29713         * config/rl78/rl78.md (anddi3): New define_expand.
29715 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
29717         * config/rl78/rl78.md (umindi3): New define_expand.
29719 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
29721         * config/rl78/rl78.md (smindi3): New define_expand.
29723 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
29725         * config/rl78/rl78.md (smaxdi3): New define_expand.
29727 2018-01-22  Carl Love  <cel@us.ibm.com>
29729         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
29730         LVX_V1TI): Add macro expansion.
29731         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
29732         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
29733         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
29734         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
29735         Change check to determine if the instruction is a byte reversing
29736         entry.  Fix typo in comment.
29737         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
29738         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
29739         Add def_builtin calls for new builtins.
29740         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
29741         Add define_insn expansion.
29743 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
29745         * config/rl78/rl78.md (umaxdi3): New define_expand.
29747 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
29749         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
29750         for non-QImode registers.
29752 2018-01-22  Richard Biener  <rguenther@suse.de>
29754         PR tree-optimization/83963
29755         * graphite-scop-detection.c (scop_detection::get_sese): Delay
29756         including the loop exit block.
29757         (scop_detection::merge_sese): Likewise.
29758         (scop_detection::add_scop): Do it here instead.
29760 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
29762         * doc/sourcebuild.texi (arm_softfloat): Document.
29764 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
29766         PR gcc/77734
29767         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
29768         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
29769         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
29771 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29772             David Edelsohn  <dje.gcc@gmail.com>
29774         PR target/83946
29775         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
29776         Change "crset eq" to "crset 2".
29777         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
29778         (*call_indirect_aix<mode>_nospec): Likewise.
29779         (*call_value_indirect_aix<mode>_nospec): Likewise.
29780         (*call_indirect_elfv2<mode>_nospec): Likewise.
29781         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
29782         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
29783         change assembly output from . to $.
29784         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
29785         (indirect_jump<mode>_nospec): Change assembly output from . to $.
29786         (*tablejump<mode>_internal1_nospec): Likewise.
29788 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
29790         PR target/80870
29791         * config/sh/sh_optimize_sett_clrt.cc:
29792         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
29794 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
29796         PR tree-optimization/83940
29797         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
29798         offset_dt to vect_constant_def rather than vect_unknown_def_type.
29799         (vect_check_load_store_mask): Add a mask_dt_out parameter and
29800         use it to pass back the definition type.
29801         (vect_check_store_rhs): Likewise rhs_dt_out.
29802         (vect_build_gather_load_calls): Add a mask_dt argument and use
29803         it instead of a call to vect_is_simple_use.
29804         (vectorizable_store): Update calls to vect_check_load_store_mask
29805         and vect_check_store_rhs.  Use the dt returned by the latter instead
29806         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
29807         instead of calls to vect_is_simple_use.  Pass the scalar rather
29808         than the vector operand to vect_is_simple_use when handling
29809         second and subsequent copies of an rhs value.
29810         (vectorizable_load): Update calls to vect_check_load_store_mask
29811         and vect_build_gather_load_calls.  Use the cached mask_dt and
29812         gs_info.offset_dt instead of calls to vect_is_simple_use.
29814 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
29816         PR middle-end/83945
29817         * tree-emutls.c: Include gimplify.h.
29818         (lower_emutls_2): New function.
29819         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
29820         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
29821         it before further processing.
29823         PR target/83930
29824         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
29825         UINTVAL (trueop1) instead of INTVAL (op1).
29827 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
29829         PR debug/81570
29830         PR debug/83728
29831         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
29832         INCOMING_FRAME_SP_OFFSET if not defined.
29833         (scan_trace): Add ENTRY argument.  If true and
29834         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
29835         emit a note to adjust the CFA offset.
29836         (create_cfi_notes): Adjust scan_trace callers.
29837         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
29838         INCOMING_FRAME_SP_OFFSET in the CIE.
29839         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
29840         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
29841         Likewise.
29842         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
29843         * doc/tm.texi: Regenerated.
29845 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
29847         PR rtl-optimization/83147
29848         * lra-constraints.c (remove_inheritance_pseudos): Use
29849         lra_substitute_pseudo_within_insn.
29851 2018-01-19  Tom de Vries  <tom@codesourcery.com>
29852             Cesar Philippidis  <cesar@codesourcery.com>
29854         PR target/83920
29855         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
29857 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
29859         PR target/83790
29860         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
29861         spaces for function labels.
29863 2018-01-19  Martin Liska  <mliska@suse.cz>
29865         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
29866         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
29867         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
29868         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
29869         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
29870         (PRED_CONST_RETURN): Change from 69 to 65.
29871         (PRED_NULL_RETURN): Change from 91 to 71.
29872         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
29873         (PRED_LOOP_GUARD): Change from 66 to 73.
29875 2018-01-19  Martin Liska  <mliska@suse.cz>
29877         * predict.c (predict_insn_def): Add new assert.
29878         (struct branch_predictor): Change type to signed integer.
29879         (test_prediction_value_range): Amend test to cover
29880         PROB_UNINITIALIZED.
29881         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
29882         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
29883         (PRED_LOOP_ITERATIONS_MAX): Likewise.
29884         (PRED_LOOP_IV_COMPARE): Likewise.
29885         * predict.h (PROB_UNINITIALIZED): Define new constant.
29887 2018-01-19  Martin Liska  <mliska@suse.cz>
29889         * predict.c (dump_prediction): Add new format for
29890         analyze_brprob.py script which is enabled with -details
29891         suboption.
29892         * profile-count.h (precise_p): New function.
29894 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
29896         PR tree-optimization/83922
29897         * tree-vect-loop.c (vect_verify_full_masking): Return false if
29898         there are no statements that need masking.
29899         (vect_active_double_reduction_p): New function.
29900         (vect_analyze_loop_operations): Use it when handling phis that
29901         are not in the loop header.
29903 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
29905         PR tree-optimization/83914
29906         * tree-vect-loop.c (vectorizable_induction): Don't convert
29907         init_expr or apply the peeling adjustment for inductions
29908         that are nested within the vectorized loop.
29910 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
29912         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
29913         instead of NEG.
29915 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
29917         PR sanitizer/81715
29918         PR testsuite/83882
29919         * function.h (gimplify_parameters): Add gimple_seq * argument.
29920         * function.c: Include gimple.h and options.h.
29921         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
29922         for the added local temporaries if needed.
29923         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
29924         if there are any parameter cleanups, wrap whole body into a
29925         try/finally with the cleanups.
29927 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
29929         PR target/82964
29930         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
29931         Use GET_MODE_CLASS for scalar floating point.
29933 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
29935         PR ipa/82256
29936         patch by PaX Team
29937         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
29938         Fix call of call_cgraph_insertion_hooks.
29940 2018-01-18  Martin Sebor  <msebor@redhat.com>
29942         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
29944 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
29946         PR ipa/83619
29947         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
29948         frequencies.
29950 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
29952         PR other/70268
29953         * common.opt: (-ffile-prefix-map): New option.
29954         * opts.c (common_handle_option): Defer it.
29955         * opts-global.c (handle_common_deferred_options): Handle it.
29956         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
29957         * file-prefix-map.h: New file.
29958         (remap_debug_filename, add_debug_prefix_map): ...here.
29959         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
29960         * final.c (debug_prefix_map, add_debug_prefix_map
29961         remap_debug_filename): Move to...
29962         * file-prefix-map.c: New file.
29963         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
29964         generalize, get rid of alloca(), use strrchr() instead of strchr().
29965         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
29966         Implement in terms of add_prefix_map().
29967         (remap_macro_filename, remap_debug_filename): Implement in term of
29968         remap_filename().
29969         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
29970         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
29971         * dbxout.c: Include file-prefix-map.h.
29972         * varasm.c: Likewise.
29973         * vmsdbgout.c: Likewise.
29974         * xcoffout.c: Likewise.
29975         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
29976         * doc/cppopts.texi (-fmacro-prefix-map): Document.
29977         * doc/invoke.texi (-ffile-prefix-map): Document.
29978         (-fdebug-prefix-map): Update description.
29980 2018-01-18  Martin Liska  <mliska@suse.cz>
29982         * config/i386/i386.c (indirect_thunk_name): Document that also
29983         lfence is emitted.
29984         (output_indirect_thunk): Document why both instructions
29985         (pause and lfence) are generated.
29987 2018-01-18  Richard Biener  <rguenther@suse.de>
29989         PR tree-optimization/83887
29990         * graphite-scop-detection.c
29991         (scop_detection::get_nearest_dom_with_single_entry): Remove.
29992         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
29993         (scop_detection::merge_sese): Re-implement with a flood-fill
29994         algorithm that properly finds a SESE region if it exists.
29996 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
29998         PR c/61240
29999         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
30000         pointer_diff optimizations use view_convert instead of convert.
30002 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
30004         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
30005         Generate different code for -mno-speculate-indirect-jumps.
30006         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
30007         (*call_indirect_aix<mode>): Disable for
30008         -mno-speculate-indirect-jumps.
30009         (*call_indirect_aix<mode>_nospec): New define_insn.
30010         (*call_value_indirect_aix<mode>): Disable for
30011         -mno-speculate-indirect-jumps.
30012         (*call_value_indirect_aix<mode>_nospec): New define_insn.
30013         (*sibcall_nonlocal_sysv<mode>): Generate different code for
30014         -mno-speculate-indirect-jumps.
30015         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
30017 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
30019         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
30020         long double type, set the flags for noting the default long double
30021         type, even if we don't pass or return a long double type.
30023 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
30025         PR ipa/83051
30026         * ipa-inline.c (flatten_function): Do not overwrite final inlining
30027         failure.
30029 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
30031         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
30032         support for merge[hl].
30033         (fold_mergehl_helper): New helper function.
30034         (tree-vector-builder.h): New #include for tree_vector_builder usage.
30035         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
30036         (altivec_vmrglw_direct): Add xxmrglw insn.
30038 2018-01-17  Andrew Waterman  <andrew@sifive.com>
30040         * config/riscv/riscv.c (riscv_conditional_register_usage): If
30041         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
30043 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
30045         PR lto/83121
30046         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
30047         call the lto_location_cache before reading the
30048         DECL_SOURCE_LOCATION of the types.
30050 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
30051             Richard Sandiford  <richard.sandiford@linaro.org>
30053         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
30054         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
30055         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
30056         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
30057         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
30058         Add declaration.
30059         * config/aarch64/constraints.md (aarch64_movti_operand):
30060         Limit immediates.
30061         * config/aarch64/predicates.md (Uti): Add new constraint.
30063 2018-01-17  Carl Love  <cel@us.ibm.com>
30065         * config/rs6000/vsx.md (define_expand xl_len_r,
30066         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
30067         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
30068         lxvll.
30069         (define_expand, define_insn): Move the shift left from  the
30070         define_insn to the define_expand for lxvl and stxvl instructions.
30071         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
30072         and XL_LEN_R definitions to PURE.
30074 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
30076         * config/i386/i386.c (indirect_thunk_name): Declare regno
30077         as unsigned int.  Compare regno with INVALID_REGNUM.
30078         (output_indirect_thunk): Ditto.
30079         (output_indirect_thunk_function): Ditto.
30080         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
30081         in the call to output_indirect_thunk_function.
30083 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
30085         PR middle-end/83884
30086         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
30087         rather than the size of inner_type to determine the stack slot size
30088         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
30090 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
30092         PR target/83546
30093         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
30094         to PTA_SILVERMONT.
30096 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
30098         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
30099         endian Linux systems to optionally enable multilibs for selecting
30100         the long double type if the user configured an explicit type.
30101         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
30102         have no long double multilibs if not defined.
30103         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
30104         warn if the user used -mabi={ieee,ibm}longdouble and we built
30105         multilibs for long double.
30106         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
30107         appropriate multilib option.
30108         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
30109         multilib options.
30110         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
30111         for building long double multilibs.
30112         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
30114 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
30116         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
30117         copies.
30119         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
30120         64 bits.
30121         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
30122         128 bits.
30124         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
30125         variables.
30127         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
30128         return value.
30130 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
30132         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
30133         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
30135 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
30137         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
30138         different rtl trees depending on TARGET_64BIT.
30139         (rs6000_gen_lvx): Likewise.
30141 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
30143         * config/visium/visium.md (nop): Tweak comment.
30144         (hazard_nop): Likewise.
30146 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
30148         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
30149         -mspeculate-indirect-jumps.
30150         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
30151         for -mno-speculate-indirect-jumps.
30152         (*call_indirect_elfv2<mode>_nospec): New define_insn.
30153         (*call_value_indirect_elfv2<mode>): Disable for
30154         -mno-speculate-indirect-jumps.
30155         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
30156         (indirect_jump): Emit different RTL for
30157         -mno-speculate-indirect-jumps.
30158         (*indirect_jump<mode>): Disable for
30159         -mno-speculate-indirect-jumps.
30160         (*indirect_jump<mode>_nospec): New define_insn.
30161         (tablejump): Emit different RTL for
30162         -mno-speculate-indirect-jumps.
30163         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
30164         (tablejumpsi_nospec): New define_expand.
30165         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
30166         (tablejumpdi_nospec): New define_expand.
30167         (*tablejump<mode>_internal1): Disable for
30168         -mno-speculate-indirect-jumps.
30169         (*tablejump<mode>_internal1_nospec): New define_insn.
30170         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
30171         option.
30173 2018-01-16  Artyom Skrobov tyomitch@gmail.com
30175         * caller-save.c (insert_save): Drop unnecessary parameter.  All
30176         callers updated.
30178 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
30179             Richard Biener  <rguenth@suse.de>
30181         PR libgomp/83590
30182         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
30183         return early, inline manually is_gimple_sizepos.  Make sure if we
30184         call gimplify_expr we don't end up with a gimple constant.
30185         * tree.c (variably_modified_type_p): Don't return true for
30186         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
30187         * gimplify.h (is_gimple_sizepos): Remove.
30189 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
30191         PR tree-optimization/83857
30192         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
30193         vectorizable_live_operation for pure SLP statements.
30194         (vectorizable_live_operation): Handle PHIs.
30196 2018-01-16  Richard Biener  <rguenther@suse.de>
30198         PR tree-optimization/83867
30199         * tree-vect-stmts.c (vect_transform_stmt): Precompute
30200         nested_in_vect_loop_p since the scalar stmt may get invalidated.
30202 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
30204         PR c/83844
30205         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
30206         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
30207         If off is not INTEGER_CST, issue a may not be aligned warning
30208         rather than isn't aligned.  Use isn%'t rather than isn't.
30209         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
30210         into MULT_EXPR.
30211         <case MULT_EXPR>: Improve the case when bottom and one of the
30212         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
30213         operand, in that case check if the other operand is multiple of
30214         bottom divided by the INTEGER_CST operand.
30216 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
30218         PR target/83858
30219         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
30220         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
30221         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
30222         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
30223         * config/pa/pa.c (pa_function_arg_advance): Likewise.
30224         (pa_function_arg, pa_arg_partial_bytes): Likewise.
30225         (pa_function_arg_size): New function.
30227 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
30229         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
30230         in a separate statement.
30232 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
30234         PR tree-optimization/83847
30235         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
30236         group gathers and scatters.
30238 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
30240         PR rtl-optimization/86620
30241         * params.def (max-sched-ready-insns): Bump minimum value to 1.
30243         PR rtl-optimization/83213
30244         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
30245         to last if both are JUMP_INSNs.
30247         PR tree-optimization/83843
30248         * gimple-ssa-store-merging.c
30249         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
30250         store_immediate_info for bswap/nop orig_stores.
30252 2018-01-15  Andrew Waterman  <andrew@sifive.com>
30254         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
30255         !TARGET_MUL.
30256         <UDIV>: Increase cost if !TARGET_DIV.
30258 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
30260         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
30261         (define_attr "cr_logical_3op"): New.
30262         (cceq_ior_compare): Adjust.
30263         (cceq_ior_compare_complement): Adjust.
30264         (*cceq_rev_compare): Adjust.
30265         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
30266         (is_cracked_insn): Adjust.
30267         (insn_must_be_first_in_group): Adjust.
30268         * config/rs6000/40x.md: Adjust.
30269         * config/rs6000/440.md: Adjust.
30270         * config/rs6000/476.md: Adjust.
30271         * config/rs6000/601.md: Adjust.
30272         * config/rs6000/603.md: Adjust.
30273         * config/rs6000/6xx.md: Adjust.
30274         * config/rs6000/7450.md: Adjust.
30275         * config/rs6000/7xx.md: Adjust.
30276         * config/rs6000/8540.md: Adjust.
30277         * config/rs6000/cell.md: Adjust.
30278         * config/rs6000/e300c2c3.md: Adjust.
30279         * config/rs6000/e500mc.md: Adjust.
30280         * config/rs6000/e500mc64.md: Adjust.
30281         * config/rs6000/e5500.md: Adjust.
30282         * config/rs6000/e6500.md: Adjust.
30283         * config/rs6000/mpc.md: Adjust.
30284         * config/rs6000/power4.md: Adjust.
30285         * config/rs6000/power5.md: Adjust.
30286         * config/rs6000/power6.md: Adjust.
30287         * config/rs6000/power7.md: Adjust.
30288         * config/rs6000/power8.md: Adjust.
30289         * config/rs6000/power9.md: Adjust.
30290         * config/rs6000/rs64.md: Adjust.
30291         * config/rs6000/titan.md: Adjust.
30293 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
30295         * config/i386/predicates.md (indirect_branch_operand): Rewrite
30296         ix86_indirect_branch_register logic.
30298 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
30300         * config/i386/constraints.md (Bs): Update
30301         ix86_indirect_branch_register check.  Don't check
30302         ix86_indirect_branch_register with GOT_memory_operand.
30303         (Bw): Likewise.
30304         * config/i386/predicates.md (GOT_memory_operand): Don't check
30305         ix86_indirect_branch_register here.
30306         (GOT32_symbol_operand): Likewise.
30308 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
30310         * config/i386/predicates.md (constant_call_address_operand):
30311         Rewrite ix86_indirect_branch_register logic.
30312         (sibcall_insn_operand): Likewise.
30314 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
30316         * config/i386/constraints.md (Bs): Replace
30317         ix86_indirect_branch_thunk_register with
30318         ix86_indirect_branch_register.
30319         (Bw): Likewise.
30320         * config/i386/i386.md (indirect_jump): Likewise.
30321         (tablejump): Likewise.
30322         (*sibcall_memory): Likewise.
30323         (*sibcall_value_memory): Likewise.
30324         Peepholes of indirect call and jump via memory: Likewise.
30325         * config/i386/i386.opt: Likewise.
30326         * config/i386/predicates.md (indirect_branch_operand): Likewise.
30327         (GOT_memory_operand): Likewise.
30328         (call_insn_operand): Likewise.
30329         (sibcall_insn_operand): Likewise.
30330         (GOT32_symbol_operand): Likewise.
30332 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
30334         PR middle-end/83837
30335         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
30336         type rather than type addr's type points to.
30337         (expand_omp_atomic_mutex): Likewise.
30338         (expand_omp_atomic): Likewise.
30340 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
30342         PR target/83839
30343         * config/i386/i386.c (output_indirect_thunk_function): Use
30344         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
30345         for  __x86_return_thunk.
30347 2018-01-15  Richard Biener  <rguenther@suse.de>
30349         PR middle-end/83850
30350         * expmed.c (extract_bit_field_1): Fix typo.
30352 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
30354         PR target/83687
30355         * config/arm/iterators.md (VF): New mode iterator.
30356         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
30357         Remove integer-related logic from pattern.
30358         (neon_vabd<mode>_3): Likewise.
30360 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
30362         PR middle-end/82694
30363         * common.opt (fstrict-overflow): No longer an alias.
30364         (fwrapv-pointer): New option.
30365         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
30366         also for pointer types based on flag_wrapv_pointer.
30367         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
30368         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
30369         opts->x_flag_wrapv got set.
30370         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
30371         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
30372         POINTER_TYPE_OVERFLOW_UNDEFINED.
30373         * match.pd: Likewise in address comparison pattern.
30374         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
30376 2018-01-15  Richard Biener  <rguenther@suse.de>
30378         PR lto/83804
30379         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
30380         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
30381         Reset type names to their identifier if their TYPE_DECL doesn't
30382         have linkage (and thus is used for ODR and devirt).
30383         (save_debug_info_for_decl): Remove.
30384         (save_debug_info_for_type): Likewise.
30385         (add_tree_to_fld_list): Adjust.
30386         * tree-pretty-print.c (dump_generic_node): Make dumping of
30387         type names more robust.
30389 2018-01-15  Richard Biener  <rguenther@suse.de>
30391         * BASE-VER: Bump to 8.0.1.
30393 2018-01-14  Martin Sebor  <msebor@redhat.com>
30395         PR other/83508
30396         * builtins.c (check_access): Avoid warning when the no-warning bit
30397         is set.
30399 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
30401         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
30402         * ira-color (allocno_hard_regs_compare): Likewise.
30404 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
30406         PR target/83013
30407         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
30408         Use .pushsection/.popsection.
30410 2018-01-14  Martin Sebor  <msebor@redhat.com>
30412         PR c++/81327
30413         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
30415 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
30417         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
30418         entry from extra_headers.
30419         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
30420         extra_headers, make the list bitwise identical to the i?86-*-* one.
30422 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
30424         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
30425         -mcmodel=large with -mindirect-branch=thunk,
30426         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
30427         -mfunction-return=thunk-extern.
30428         * doc/invoke.texi: Document -mcmodel=large is incompatible with
30429         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
30430         -mfunction-return=thunk and -mfunction-return=thunk-extern.
30432 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
30434         * config/i386/i386.c (print_reg): Print the name of the full
30435         integer register without '%'.
30436         (ix86_print_operand): Handle 'V'.
30437         * doc/extend.texi: Document 'V' modifier.
30439 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
30441         * config/i386/constraints.md (Bs): Disallow memory operand for
30442         -mindirect-branch-register.
30443         (Bw): Likewise.
30444         * config/i386/predicates.md (indirect_branch_operand): Likewise.
30445         (GOT_memory_operand): Likewise.
30446         (call_insn_operand): Likewise.
30447         (sibcall_insn_operand): Likewise.
30448         (GOT32_symbol_operand): Likewise.
30449         * config/i386/i386.md (indirect_jump): Call convert_memory_address
30450         for -mindirect-branch-register.
30451         (tablejump): Likewise.
30452         (*sibcall_memory): Likewise.
30453         (*sibcall_value_memory): Likewise.
30454         Disallow peepholes of indirect call and jump via memory for
30455         -mindirect-branch-register.
30456         (*call_pop): Replace m with Bw.
30457         (*call_value_pop): Likewise.
30458         (*sibcall_pop_memory): Replace m with Bs.
30459         * config/i386/i386.opt (mindirect-branch-register): New option.
30460         * doc/invoke.texi: Document -mindirect-branch-register option.
30462 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
30464         * config/i386/i386-protos.h (ix86_output_function_return): New.
30465         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
30466         set function_return_type.
30467         (indirect_thunk_name): Add ret_p to indicate thunk for function
30468         return.
30469         (output_indirect_thunk_function): Pass false to
30470         indirect_thunk_name.
30471         (ix86_output_indirect_branch_via_reg): Likewise.
30472         (ix86_output_indirect_branch_via_push): Likewise.
30473         (output_indirect_thunk_function): Create alias for function
30474         return thunk if regno < 0.
30475         (ix86_output_function_return): New function.
30476         (ix86_handle_fndecl_attribute): Handle function_return.
30477         (ix86_attribute_table): Add function_return.
30478         * config/i386/i386.h (machine_function): Add
30479         function_return_type.
30480         * config/i386/i386.md (simple_return_internal): Use
30481         ix86_output_function_return.
30482         (simple_return_internal_long): Likewise.
30483         * config/i386/i386.opt (mfunction-return=): New option.
30484         (indirect_branch): Mention -mfunction-return=.
30485         * doc/extend.texi: Document function_return function attribute.
30486         * doc/invoke.texi: Document -mfunction-return= option.
30488 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
30490         * config/i386/i386-opts.h (indirect_branch): New.
30491         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
30492         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
30493         with local indirect jump when converting indirect call and jump.
30494         (ix86_set_indirect_branch_type): New.
30495         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
30496         (indirectlabelno): New.
30497         (indirect_thunk_needed): Likewise.
30498         (indirect_thunk_bnd_needed): Likewise.
30499         (indirect_thunks_used): Likewise.
30500         (indirect_thunks_bnd_used): Likewise.
30501         (INDIRECT_LABEL): Likewise.
30502         (indirect_thunk_name): Likewise.
30503         (output_indirect_thunk): Likewise.
30504         (output_indirect_thunk_function): Likewise.
30505         (ix86_output_indirect_branch_via_reg): Likewise.
30506         (ix86_output_indirect_branch_via_push): Likewise.
30507         (ix86_output_indirect_branch): Likewise.
30508         (ix86_output_indirect_jmp): Likewise.
30509         (ix86_code_end): Call output_indirect_thunk_function if needed.
30510         (ix86_output_call_insn): Call ix86_output_indirect_branch if
30511         needed.
30512         (ix86_handle_fndecl_attribute): Handle indirect_branch.
30513         (ix86_attribute_table): Add indirect_branch.
30514         * config/i386/i386.h (machine_function): Add indirect_branch_type
30515         and has_local_indirect_jump.
30516         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
30517         to true.
30518         (tablejump): Likewise.
30519         (*indirect_jump): Use ix86_output_indirect_jmp.
30520         (*tablejump_1): Likewise.
30521         (simple_return_indirect_internal): Likewise.
30522         * config/i386/i386.opt (mindirect-branch=): New option.
30523         (indirect_branch): New.
30524         (keep): Likewise.
30525         (thunk): Likewise.
30526         (thunk-inline): Likewise.
30527         (thunk-extern): Likewise.
30528         * doc/extend.texi: Document indirect_branch function attribute.
30529         * doc/invoke.texi: Document -mindirect-branch= option.
30531 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
30533         PR ipa/83051
30534         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
30536 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
30538         * ipa-inline.c (want_inline_small_function_p): Return false if
30539         inlining has already failed with CIF_FINAL_ERROR.
30540         (update_caller_keys): Call want_inline_small_function_p before
30541         can_inline_edge_p.
30542         (update_callee_keys): Likewise.
30544 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
30546         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
30547         New function.
30548         (rs6000_quadword_masked_address_p): Likewise.
30549         (quad_aligned_load_p): Likewise.
30550         (quad_aligned_store_p): Likewise.
30551         (const_load_sequence_p): Add comment to describe the outer-most loop.
30552         (mimic_memory_attributes_and_flags): New function.
30553         (rs6000_gen_stvx): Likewise.
30554         (replace_swapped_aligned_store): Likewise.
30555         (rs6000_gen_lvx): Likewise.
30556         (replace_swapped_aligned_load): Likewise.
30557         (replace_swapped_load_constant): Capitalize argument name in
30558         comment describing this function.
30559         (rs6000_analyze_swaps): Add a third pass to search for vector loads
30560         and stores that access quad-word aligned addresses and replace
30561         with stvx or lvx instructions when appropriate.
30562         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
30563         New function prototype.
30564         (rs6000_quadword_masked_address_p): Likewise.
30565         (rs6000_gen_lvx): Likewise.
30566         (rs6000_gen_stvx): Likewise.
30567         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
30568         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
30569         when memory address is aligned.
30570         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
30571         this split to select lvx instruction when memory address is aligned.
30572         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
30573         instruction when memory address is aligned.
30574         (*vsx_le_perm_load_v16qi): Likewise.
30575         (four unnamed splitters): Modify to select the stvx instruction
30576         when memory is aligned.
30578 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
30580         * predict.c (determine_unlikely_bbs): Handle correctly BBs
30581         which appears in the queue multiple times.
30583 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30584             Alan Hayward  <alan.hayward@arm.com>
30585             David Sherwood  <david.sherwood@arm.com>
30587         * tree-vectorizer.h (vec_lower_bound): New structure.
30588         (_loop_vec_info): Add check_nonzero and lower_bounds.
30589         (LOOP_VINFO_CHECK_NONZERO): New macro.
30590         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
30591         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
30592         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
30593         fields.  Make seg_len the distance travelled, not including the
30594         access size.
30595         (dr_direction_indicator): Declare.
30596         (dr_zero_step_indicator): Likewise.
30597         (dr_known_forward_stride_p): Likewise.
30598         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
30599         tree-ssanames.h.
30600         (runtime_alias_check_p): Allow runtime alias checks with
30601         variable strides.
30602         (operator ==): Compare access_size and align.
30603         (prune_runtime_alias_test_list): Rework for new distinction between
30604         the access_size and seg_len.
30605         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
30606         segment lengths.
30607         (get_segment_min_max): New function.
30608         (create_intersect_range_checks): Use it.
30609         (dr_step_indicator): New function.
30610         (dr_direction_indicator): Likewise.
30611         (dr_zero_step_indicator): Likewise.
30612         (dr_known_forward_stride_p): Likewise.
30613         * tree-loop-distribution.c (data_ref_segment_size): Return
30614         DR_STEP * (niters - 1).
30615         (compute_alias_check_pairs): Update call to the dr_with_seg_len
30616         constructor.
30617         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
30618         (vect_preserves_scalar_order_p): New function, split out from...
30619         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
30620         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
30621         (vect_vfa_access_size): New function.
30622         (vect_vfa_align): Likewise.
30623         (vect_compile_time_alias): Take access_size_a and access_b arguments.
30624         (dump_lower_bound): New function.
30625         (vect_check_lower_bound): Likewise.
30626         (vect_small_gap_p): Likewise.
30627         (vectorizable_with_step_bound_p): Likewise.
30628         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
30629         depencies if the vectorization factor is 1.  Convert the checks
30630         for nonzero steps into checks on the bounds of DR_STEP.  Try using
30631         a bunds check for variable steps if the minimum required step is
30632         relatively small. Update calls to the dr_with_seg_len
30633         constructor and to vect_compile_time_alias.
30634         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
30635         function.
30636         (vect_loop_versioning): Call it.
30637         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
30638         when retrying.
30639         (vect_estimate_min_profitable_iters): Account for any bounds checks.
30641 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30642             Alan Hayward  <alan.hayward@arm.com>
30643             David Sherwood  <david.sherwood@arm.com>
30645         * doc/sourcebuild.texi (vect_scatter_store): Document.
30646         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
30647         optabs.
30648         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
30649         Document.
30650         * genopinit.c (main): Add supports_vec_scatter_store and
30651         supports_vec_scatter_store_cached to target_optabs.
30652         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
30653         IFN_MASK_SCATTER_STORE.
30654         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
30655         functions.
30656         * internal-fn.h (internal_store_fn_p): Declare.
30657         (internal_fn_stored_value_index): Likewise.
30658         * internal-fn.c (scatter_store_direct): New macro.
30659         (expand_scatter_store_optab_fn): New function.
30660         (direct_scatter_store_optab_supported_p): New macro.
30661         (internal_store_fn_p): New function.
30662         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
30663         IFN_MASK_SCATTER_STORE.
30664         (internal_fn_mask_index): Likewise.
30665         (internal_fn_stored_value_index): New function.
30666         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
30667         for scatter stores.
30668         * optabs-query.h (supports_vec_scatter_store_p): Declare.
30669         * optabs-query.c (supports_vec_scatter_store_p): New function.
30670         * tree-vectorizer.h (vect_get_store_rhs): Declare.
30671         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
30672         true for scatter stores.
30673         (vect_gather_scatter_fn_p): Handle scatter stores too.
30674         (vect_check_gather_scatter): Consider using scatter stores if
30675         supports_vec_scatter_store_p.
30676         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
30677         scatter stores too.
30678         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
30679         internal_fn_stored_value_index.
30680         (check_load_store_masking): Handle scatter stores too.
30681         (vect_get_store_rhs): Make public.
30682         (vectorizable_call): Use internal_store_fn_p.
30683         (vectorizable_store): Handle scatter store internal functions.
30684         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
30685         when deciding whether the end of the group has been reached.
30686         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
30687         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
30688         (mask_scatter_store<mode>): New insns.
30690 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30691             Alan Hayward  <alan.hayward@arm.com>
30692             David Sherwood  <david.sherwood@arm.com>
30694         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
30695         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
30696         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
30697         function.
30698         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
30699         Use vect_truncate_gather_scatter_offset if we can't treat the
30700         operation as a normal gather load or scatter store.
30701         (get_group_load_store_type): Take the gather_scatter_info
30702         as argument.  Try using a gather load or scatter store for
30703         single-element groups.
30704         (get_load_store_type): Update calls to get_group_load_store_type
30705         and vect_use_strided_gather_scatters_p.
30707 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30708             Alan Hayward  <alan.hayward@arm.com>
30709             David Sherwood  <david.sherwood@arm.com>
30711         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
30712         optional tree argument.
30713         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
30714         null target hooks.
30715         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
30716         but continue to use the current value as a fallback.
30717         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
30718         to compare the updates.
30719         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
30720         (get_load_store_type): Use it when handling a strided access.
30721         (vect_get_strided_load_store_ops): New function.
30722         (vect_get_data_ptr_increment): Likewise.
30723         (vectorizable_load): Handle strided gather loads.  Always pass
30724         a step to vect_create_data_ref_ptr and bump_vector_ptr.
30726 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30727             Alan Hayward  <alan.hayward@arm.com>
30728             David Sherwood  <david.sherwood@arm.com>
30730         * doc/md.texi (gather_load@var{m}): Document.
30731         (mask_gather_load@var{m}): Likewise.
30732         * genopinit.c (main): Add supports_vec_gather_load and
30733         supports_vec_gather_load_cached to target_optabs.
30734         * optabs-tree.c (init_tree_optimization_optabs): Use
30735         ggc_cleared_alloc to allocate target_optabs.
30736         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
30737         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
30738         functions.
30739         * internal-fn.h (internal_load_fn_p): Declare.
30740         (internal_gather_scatter_fn_p): Likewise.
30741         (internal_fn_mask_index): Likewise.
30742         (internal_gather_scatter_fn_supported_p): Likewise.
30743         * internal-fn.c (gather_load_direct): New macro.
30744         (expand_gather_load_optab_fn): New function.
30745         (direct_gather_load_optab_supported_p): New macro.
30746         (direct_internal_fn_optab): New function.
30747         (internal_load_fn_p): Likewise.
30748         (internal_gather_scatter_fn_p): Likewise.
30749         (internal_fn_mask_index): Likewise.
30750         (internal_gather_scatter_fn_supported_p): Likewise.
30751         * optabs-query.c (supports_at_least_one_mode_p): New function.
30752         (supports_vec_gather_load_p): Likewise.
30753         * optabs-query.h (supports_vec_gather_load_p): Declare.
30754         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
30755         and memory_type field.
30756         (NUM_PATTERNS): Bump to 15.
30757         * tree-vect-data-refs.c: Include internal-fn.h.
30758         (vect_gather_scatter_fn_p): New function.
30759         (vect_describe_gather_scatter_call): Likewise.
30760         (vect_check_gather_scatter): Try using internal functions for
30761         gather loads.  Recognize existing calls to a gather load function.
30762         (vect_analyze_data_refs): Consider using gather loads if
30763         supports_vec_gather_load_p.
30764         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
30765         (vect_get_gather_scatter_offset_type): Likewise.
30766         (vect_convert_mask_for_vectype): Likewise.
30767         (vect_add_conversion_to_patterm): Likewise.
30768         (vect_try_gather_scatter_pattern): Likewise.
30769         (vect_recog_gather_scatter_pattern): New pattern recognizer.
30770         (vect_vect_recog_func_ptrs): Add it.
30771         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
30772         internal_fn_mask_index and internal_gather_scatter_fn_p.
30773         (check_load_store_masking): Take the gather_scatter_info as an
30774         argument and handle gather loads.
30775         (vect_get_gather_scatter_ops): New function.
30776         (vectorizable_call): Check internal_load_fn_p.
30777         (vectorizable_load): Likewise.  Handle gather load internal
30778         functions.
30779         (vectorizable_store): Update call to check_load_store_masking.
30780         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
30781         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
30782         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
30783         (aarch64_gather_scale_operand_d): New predicates.
30784         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
30785         (mask_gather_load<mode>): New insns.
30787 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30788             Alan Hayward  <alan.hayward@arm.com>
30789             David Sherwood  <david.sherwood@arm.com>
30791         * optabs.def (fold_left_plus_optab): New optab.
30792         * doc/md.texi (fold_left_plus_@var{m}): Document.
30793         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
30794         * internal-fn.c (fold_left_direct): Define.
30795         (expand_fold_left_optab_fn): Likewise.
30796         (direct_fold_left_optab_supported_p): Likewise.
30797         * fold-const-call.c (fold_const_fold_left): New function.
30798         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
30799         * tree-parloops.c (valid_reduction_p): New function.
30800         (gather_scalar_reductions): Use it.
30801         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
30802         (vect_finish_replace_stmt): Declare.
30803         * tree-vect-loop.c (fold_left_reduction_fn): New function.
30804         (needs_fold_left_reduction_p): New function, split out from...
30805         (vect_is_simple_reduction): ...here.  Accept reductions that
30806         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
30807         (vect_force_simple_reduction): Also store the reduction type in
30808         the assignment's STMT_VINFO_REDUC_TYPE.
30809         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
30810         (merge_with_identity): New function.
30811         (vect_expand_fold_left): Likewise.
30812         (vectorize_fold_left_reduction): Likewise.
30813         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
30814         scalar phi in place for it.  Check for target support and reject
30815         cases that would reassociate the operation.  Defer the transform
30816         phase to vectorize_fold_left_reduction.
30817         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
30818         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
30819         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
30821 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30823         * tree-if-conv.c (predicate_mem_writes): Remove redundant
30824         call to ifc_temp_var.
30826 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30827             Alan Hayward  <alan.hayward@arm.com>
30828             David Sherwood  <david.sherwood@arm.com>
30830         * target.def (legitimize_address_displacement): Take the original
30831         offset as a poly_int.
30832         * targhooks.h (default_legitimize_address_displacement): Update
30833         accordingly.
30834         * targhooks.c (default_legitimize_address_displacement): Likewise.
30835         * doc/tm.texi: Regenerate.
30836         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
30837         as an argument, moving assert of ad->disp == ad->disp_term to...
30838         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
30839         Try calling targetm.legitimize_address_displacement before expanding
30840         the address rather than afterwards, and adjust for the new interface.
30841         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
30842         Match the new hook interface.  Handle SVE addresses.
30843         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
30844         new hook interface.
30846 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30848         * Makefile.in (OBJS): Add early-remat.o.
30849         * target.def (select_early_remat_modes): New hook.
30850         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
30851         * doc/tm.texi: Regenerate.
30852         * targhooks.h (default_select_early_remat_modes): Declare.
30853         * targhooks.c (default_select_early_remat_modes): New function.
30854         * timevar.def (TV_EARLY_REMAT): New timevar.
30855         * passes.def (pass_early_remat): New pass.
30856         * tree-pass.h (make_pass_early_remat): Declare.
30857         * early-remat.c: New file.
30858         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
30859         function.
30860         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
30862 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30863             Alan Hayward  <alan.hayward@arm.com>
30864             David Sherwood  <david.sherwood@arm.com>
30866         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
30867         vfm1 with a bound_epilog parameter.
30868         (vect_do_peeling): Update calls accordingly, and move the prologue
30869         call earlier in the function.  Treat the base bound_epilog as 0 for
30870         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
30871         this base when peeling for gaps.
30872         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
30873         with fully-masked loops.
30874         (vect_estimate_min_profitable_iters): Handle the single peeled
30875         iteration in that case.
30877 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30878             Alan Hayward  <alan.hayward@arm.com>
30879             David Sherwood  <david.sherwood@arm.com>
30881         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
30882         single-element interleaving even if the size is not a power of 2.
30883         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
30884         accesses for single-element interleaving if the group size is
30885         not a power of 2.
30887 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30888             Alan Hayward  <alan.hayward@arm.com>
30889             David Sherwood  <david.sherwood@arm.com>
30891         * doc/md.texi (fold_extract_last_@var{m}): Document.
30892         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
30893         * optabs.def (fold_extract_last_optab): New optab.
30894         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
30895         * internal-fn.c (fold_extract_direct): New macro.
30896         (expand_fold_extract_optab_fn): Likewise.
30897         (direct_fold_extract_optab_supported_p): Likewise.
30898         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
30899         * tree-vect-loop.c (vect_model_reduction_cost): Handle
30900         EXTRACT_LAST_REDUCTION.
30901         (get_initial_def_for_reduction): Do not create an initial vector
30902         for EXTRACT_LAST_REDUCTION reductions.
30903         (vectorizable_reduction): Leave the scalar phi in place for
30904         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
30905         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
30906         epilogue code for EXTRACT_LAST_REDUCTION and defer the
30907         transform phase to vectorizable_condition.
30908         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
30909         split out from...
30910         (vect_finish_stmt_generation): ...here.
30911         (vect_finish_replace_stmt): New function.
30912         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
30913         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
30914         pattern.
30915         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
30917 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30918             Alan Hayward  <alan.hayward@arm.com>
30919             David Sherwood  <david.sherwood@arm.com>
30921         * doc/md.texi (extract_last_@var{m}): Document.
30922         * optabs.def (extract_last_optab): New optab.
30923         * internal-fn.def (EXTRACT_LAST): New internal function.
30924         * internal-fn.c (cond_unary_direct): New macro.
30925         (expand_cond_unary_optab_fn): Likewise.
30926         (direct_cond_unary_optab_supported_p): Likewise.
30927         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
30928         loops using EXTRACT_LAST.
30929         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
30930         (extract_last_<mode>): ...this optab.
30931         (vec_extract<mode><Vel>): Update accordingly.
30933 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30934             Alan Hayward  <alan.hayward@arm.com>
30935             David Sherwood  <david.sherwood@arm.com>
30937         * target.def (empty_mask_is_expensive): New hook.
30938         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
30939         * doc/tm.texi: Regenerate.
30940         * targhooks.h (default_empty_mask_is_expensive): Declare.
30941         * targhooks.c (default_empty_mask_is_expensive): New function.
30942         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
30943         if the target says that empty masks are expensive.
30944         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
30945         New function.
30946         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
30948 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30949             Alan Hayward  <alan.hayward@arm.com>
30950             David Sherwood  <david.sherwood@arm.com>
30952         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
30953         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
30954         (vect_use_loop_mask_for_alignment_p): New function.
30955         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
30956         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
30957         niters_skip argument.  Make sure that the first niters_skip elements
30958         of the first iteration are inactive.
30959         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
30960         Update call to vect_set_loop_masks_directly.
30961         (get_misalign_in_elems): New function, split out from...
30962         (vect_gen_prolog_loop_niters): ...here.
30963         (vect_update_init_of_dr): Take a code argument that specifies whether
30964         the adjustment should be added or subtracted.
30965         (vect_update_init_of_drs): Likewise.
30966         (vect_prepare_for_masked_peels): New function.
30967         (vect_do_peeling): Skip prologue peeling if we're using a mask
30968         instead.  Update call to vect_update_inits_of_drs.
30969         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
30970         mask_skip_niters.
30971         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
30972         alignment.  Do not include the number of peeled iterations in
30973         the minimum threshold in that case.
30974         (vectorizable_induction): Adjust the start value down by
30975         LOOP_VINFO_MASK_SKIP_NITERS iterations.
30976         (vect_transform_loop): Call vect_prepare_for_masked_peels.
30977         Take the number of skipped iterations into account when calculating
30978         the loop bounds.
30979         * tree-vect-stmts.c (vect_gen_while_not): New function.
30981 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30982             Alan Hayward  <alan.hayward@arm.com>
30983             David Sherwood  <david.sherwood@arm.com>
30985         * doc/sourcebuild.texi (vect_fully_masked): Document.
30986         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
30987         default value to 0.
30988         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
30989         split out from...
30990         (vect_analyze_loop_2): ...here. Don't check the vectorization
30991         factor against the number of loop iterations if the loop is
30992         fully-masked.
30994 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30995             Alan Hayward  <alan.hayward@arm.com>
30996             David Sherwood  <david.sherwood@arm.com>
30998         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
30999         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
31000         (dump_groups): Update accordingly.
31001         (iv_use::mem_type): New member variable.
31002         (address_p): New function.
31003         (record_use): Add a mem_type argument and initialize the new
31004         mem_type field.
31005         (record_group_use): Add a mem_type argument.  Use address_p.
31006         Remove obsolete null checks of base_object.  Update call to record_use.
31007         (find_interesting_uses_op): Update call to record_group_use.
31008         (find_interesting_uses_cond): Likewise.
31009         (find_interesting_uses_address): Likewise.
31010         (get_mem_type_for_internal_fn): New function.
31011         (find_address_like_use): Likewise.
31012         (find_interesting_uses_stmt): Try find_address_like_use before
31013         calling find_interesting_uses_op.
31014         (addr_offset_valid_p): Use the iv mem_type field as the type
31015         of the addressed memory.
31016         (add_autoinc_candidates): Likewise.
31017         (get_address_cost): Likewise.
31018         (split_small_address_groups_p): Use address_p.
31019         (split_address_groups): Likewise.
31020         (add_iv_candidate_for_use): Likewise.
31021         (autoinc_possible_for_pair): Likewise.
31022         (rewrite_groups): Likewise.
31023         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
31024         (determine_group_iv_cost): Update after split of USE_ADDRESS.
31025         (get_alias_ptr_type_for_ptr_address): New function.
31026         (rewrite_use_address): Rewrite address uses in calls that were
31027         identified by find_address_like_use.
31029 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31030             Alan Hayward  <alan.hayward@arm.com>
31031             David Sherwood  <david.sherwood@arm.com>
31033         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
31034         TARGET_MEM_REFs.
31035         * gimple-expr.h (is_gimple_addressable: Likewise.
31036         * gimple-expr.c (is_gimple_address): Likewise.
31037         * internal-fn.c (expand_call_mem_ref): New function.
31038         (expand_mask_load_optab_fn): Use it.
31039         (expand_mask_store_optab_fn): Likewise.
31041 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31042             Alan Hayward  <alan.hayward@arm.com>
31043             David Sherwood  <david.sherwood@arm.com>
31045         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
31046         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
31047         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
31048         (cond_umax@var{mode}): Document.
31049         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
31050         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
31051         (cond_umin_optab, cond_umax_optab): New optabs.
31052         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
31053         (COND_IOR, COND_XOR): New internal functions.
31054         * internal-fn.h (get_conditional_internal_fn): Declare.
31055         * internal-fn.c (cond_binary_direct): New macro.
31056         (expand_cond_binary_optab_fn): Likewise.
31057         (direct_cond_binary_optab_supported_p): Likewise.
31058         (get_conditional_internal_fn): New function.
31059         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
31060         Cope with reduction statements that are vectorized as calls rather
31061         than assignments.
31062         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
31063         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
31064         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
31065         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
31066         (UNSPEC_COND_EOR): New unspecs.
31067         (optab): Add mappings for them.
31068         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
31069         (sve_int_op, sve_fp_op): New int attributes.
31071 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31072             Alan Hayward  <alan.hayward@arm.com>
31073             David Sherwood  <david.sherwood@arm.com>
31075         * optabs.def (while_ult_optab): New optab.
31076         * doc/md.texi (while_ult@var{m}@var{n}): Document.
31077         * internal-fn.def (WHILE_ULT): New internal function.
31078         * internal-fn.h (direct_internal_fn_supported_p): New override
31079         that takes two types as argument.
31080         * internal-fn.c (while_direct): New macro.
31081         (expand_while_optab_fn): New function.
31082         (convert_optab_supported_p): Likewise.
31083         (direct_while_optab_supported_p): New macro.
31084         * wide-int.h (wi::udiv_ceil): New function.
31085         * tree-vectorizer.h (rgroup_masks): New structure.
31086         (vec_loop_masks): New typedef.
31087         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
31088         and fully_masked_p.
31089         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
31090         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
31091         (vect_max_vf): New function.
31092         (slpeel_make_loop_iterate_ntimes): Delete.
31093         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
31094         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
31095         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
31096         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
31097         internal-fn.h, stor-layout.h and optabs-query.h.
31098         (vect_set_loop_mask): New function.
31099         (add_preheader_seq): Likewise.
31100         (add_header_seq): Likewise.
31101         (interleave_supported_p): Likewise.
31102         (vect_maybe_permute_loop_masks): Likewise.
31103         (vect_set_loop_masks_directly): Likewise.
31104         (vect_set_loop_condition_masked): Likewise.
31105         (vect_set_loop_condition_unmasked): New function, split out from
31106         slpeel_make_loop_iterate_ntimes.
31107         (slpeel_make_loop_iterate_ntimes): Rename to..
31108         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
31109         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
31110         (vect_do_peeling): Update call accordingly.
31111         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
31112         loops.
31113         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
31114         mask_compare_type, can_fully_mask_p and fully_masked_p.
31115         (release_vec_loop_masks): New function.
31116         (_loop_vec_info): Use it to free the loop masks.
31117         (can_produce_all_loop_masks_p): New function.
31118         (vect_get_max_nscalars_per_iter): Likewise.
31119         (vect_verify_full_masking): Likewise.
31120         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
31121         retries, and free the mask rgroups before retrying.  Check loop-wide
31122         reasons for disallowing fully-masked loops.  Make the final decision
31123         about whether use a fully-masked loop or not.
31124         (vect_estimate_min_profitable_iters): Do not assume that peeling
31125         for the number of iterations will be needed for fully-masked loops.
31126         (vectorizable_reduction): Disable fully-masked loops.
31127         (vectorizable_live_operation): Likewise.
31128         (vect_halve_mask_nunits): New function.
31129         (vect_double_mask_nunits): Likewise.
31130         (vect_record_loop_mask): Likewise.
31131         (vect_get_loop_mask): Likewise.
31132         (vect_transform_loop): Handle the case in which the final loop
31133         iteration might handle a partial vector.  Call vect_set_loop_condition
31134         instead of slpeel_make_loop_iterate_ntimes.
31135         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
31136         (check_load_store_masking): New function.
31137         (prepare_load_store_mask): Likewise.
31138         (vectorizable_store): Handle fully-masked loops.
31139         (vectorizable_load): Likewise.
31140         (supportable_widening_operation): Use vect_halve_mask_nunits for
31141         booleans.
31142         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
31143         (vect_gen_while): New function.
31144         * config/aarch64/aarch64.md (umax<mode>3): New expander.
31145         (aarch64_uqdec<mode>): New insn.
31147 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31148             Alan Hayward  <alan.hayward@arm.com>
31149             David Sherwood  <david.sherwood@arm.com>
31151         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
31152         (reduc_xor_scal_optab): New optabs.
31153         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
31154         (reduc_xor_scal_@var{m}): Document.
31155         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
31156         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
31157         internal functions.
31158         * fold-const-call.c (fold_const_call): Handle them.
31159         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
31160         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
31161         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
31162         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
31163         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
31164         (UNSPEC_XORV): New unspecs.
31165         (optab): Add entries for them.
31166         (BITWISEV): New int iterator.
31167         (bit_reduc_op): New int attributes.
31169 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31170             Alan Hayward  <alan.hayward@arm.com>
31171             David Sherwood  <david.sherwood@arm.com>
31173         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
31174         * internal-fn.def (VEC_SHL_INSERT): New internal function.
31175         * optabs.def (vec_shl_insert_optab): New optab.
31176         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
31177         (duplicate_and_interleave): Likewise.
31178         * tree-vect-loop.c: Include internal-fn.h.
31179         (neutral_op_for_slp_reduction): New function, split out from
31180         get_initial_defs_for_reduction.
31181         (get_initial_def_for_reduction): Handle option 2 for variable-length
31182         vectors by loading the neutral value into a vector and then shifting
31183         the initial value into element 0.
31184         (get_initial_defs_for_reduction): Replace the code argument with
31185         the neutral value calculated by neutral_op_for_slp_reduction.
31186         Use gimple_build_vector for constant-length vectors.
31187         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
31188         but the first group_size elements have a neutral value.
31189         Use duplicate_and_interleave otherwise.
31190         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
31191         Update call to get_initial_defs_for_reduction.  Handle SLP
31192         reductions for variable-length vectors by creating one vector
31193         result for each scalar result, with the elements associated
31194         with other scalar results stubbed out with the neutral value.
31195         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
31196         Require IFN_VEC_SHL_INSERT for double reductions on
31197         variable-length vectors, or SLP reductions that have
31198         a neutral value.  Require can_duplicate_and_interleave_p
31199         support for variable-length unchained SLP reductions if there
31200         is no neutral value, such as for MIN/MAX reductions.  Also require
31201         the number of vector elements to be a multiple of the number of
31202         SLP statements when doing variable-length unchained SLP reductions.
31203         Update call to vect_create_epilog_for_reduction.
31204         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
31205         and remove initial values.
31206         (duplicate_and_interleave): Make public.
31207         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
31208         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
31210 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31211             Alan Hayward  <alan.hayward@arm.com>
31212             David Sherwood  <david.sherwood@arm.com>
31214         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
31215         (can_duplicate_and_interleave_p): New function.
31216         (vect_get_and_check_slp_defs): Take the vector of statements
31217         rather than just the current one.  Remove excess parentheses.
31218         Restriction rejectinon of vect_constant_def and vect_external_def
31219         for variable-length vectors to boolean types, or types for which
31220         can_duplicate_and_interleave_p is false.
31221         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
31222         (duplicate_and_interleave): New function.
31223         (vect_get_constant_vectors): Use gimple_build_vector for
31224         constant-length vectors and suitable variable-length constant
31225         vectors.  Use duplicate_and_interleave for other variable-length
31226         vectors.  Don't defer the update when inserting new statements.
31228 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31229             Alan Hayward  <alan.hayward@arm.com>
31230             David Sherwood  <david.sherwood@arm.com>
31232         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
31233         min_profitable_iters doesn't go negative.
31235 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31236             Alan Hayward  <alan.hayward@arm.com>
31237             David Sherwood  <david.sherwood@arm.com>
31239         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
31240         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
31241         * optabs.def (vec_mask_load_lanes_optab): New optab.
31242         (vec_mask_store_lanes_optab): Likewise.
31243         * internal-fn.def (MASK_LOAD_LANES): New internal function.
31244         (MASK_STORE_LANES): Likewise.
31245         * internal-fn.c (mask_load_lanes_direct): New macro.
31246         (mask_store_lanes_direct): Likewise.
31247         (expand_mask_load_optab_fn): Handle masked operations.
31248         (expand_mask_load_lanes_optab_fn): New macro.
31249         (expand_mask_store_optab_fn): Handle masked operations.
31250         (expand_mask_store_lanes_optab_fn): New macro.
31251         (direct_mask_load_lanes_optab_supported_p): Likewise.
31252         (direct_mask_store_lanes_optab_supported_p): Likewise.
31253         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
31254         parameter.
31255         (vect_load_lanes_supported): Likewise.
31256         * tree-vect-data-refs.c (strip_conversion): New function.
31257         (can_group_stmts_p): Likewise.
31258         (vect_analyze_data_ref_accesses): Use it instead of checking
31259         for a pair of assignments.
31260         (vect_store_lanes_supported): Take a masked_p parameter.
31261         (vect_load_lanes_supported): Likewise.
31262         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
31263         vect_store_lanes_supported and vect_load_lanes_supported.
31264         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
31265         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
31266         parameter.  Don't allow gaps for masked accesses.
31267         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
31268         and vect_load_lanes_supported.
31269         (get_load_store_type): Take a masked_p parameter and update
31270         call to get_group_load_store_type.
31271         (vectorizable_store): Update call to get_load_store_type.
31272         Handle IFN_MASK_STORE_LANES.
31273         (vectorizable_load): Update call to get_load_store_type.
31274         Handle IFN_MASK_LOAD_LANES.
31276 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31277             Alan Hayward  <alan.hayward@arm.com>
31278             David Sherwood  <david.sherwood@arm.com>
31280         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
31281         modes for SVE.
31282         * config/aarch64/aarch64-protos.h
31283         (aarch64_sve_struct_memory_operand_p): Declare.
31284         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
31285         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
31286         (VPRED, vpred): Handle SVE structure modes.
31287         * config/aarch64/constraints.md (Utx): New constraint.
31288         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
31289         (aarch64_sve_struct_nonimmediate_operand): New predicates.
31290         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
31291         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
31292         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
31293         structure modes.  Split into pieces after RA.
31294         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
31295         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
31296         New patterns.
31297         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
31298         SVE structure modes.
31299         (aarch64_classify_address): Likewise.
31300         (sizetochar): Move earlier in file.
31301         (aarch64_print_operand): Handle SVE register lists.
31302         (aarch64_array_mode): New function.
31303         (aarch64_sve_struct_memory_operand_p): Likewise.
31304         (TARGET_ARRAY_MODE): Redefine.
31306 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31307             Alan Hayward  <alan.hayward@arm.com>
31308             David Sherwood  <david.sherwood@arm.com>
31310         * target.def (array_mode): New target hook.
31311         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
31312         * doc/tm.texi: Regenerate.
31313         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
31314         * hooks.c (hook_optmode_mode_uhwi_none): New function.
31315         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
31316         targetm.array_mode.
31317         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
31318         type sizes.
31320 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31321             Alan Hayward  <alan.hayward@arm.com>
31322             David Sherwood  <david.sherwood@arm.com>
31324         * fold-const.c (fold_binary_loc): Check the argument types
31325         rather than the result type when testing for a vector operation.
31327 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31329         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
31330         * doc/tm.texi: Regenerate.
31332 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31333             Alan Hayward  <alan.hayward@arm.com>
31334             David Sherwood  <david.sherwood@arm.com>
31336         * doc/invoke.texi (-msve-vector-bits=): Document new option.
31337         (sve): Document new AArch64 extension.
31338         * doc/md.texi (w): Extend the description of the AArch64
31339         constraint to include SVE vectors.
31340         (Upl, Upa): Document new AArch64 predicate constraints.
31341         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
31342         enum.
31343         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
31344         (msve-vector-bits=): New option.
31345         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
31346         SVE when these are disabled.
31347         (sve): New extension.
31348         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
31349         modes.  Adjust their number of units based on aarch64_sve_vg.
31350         (MAX_BITSIZE_MODE_ANY_MODE): Define.
31351         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
31352         aarch64_addr_query_type.
31353         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
31354         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
31355         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
31356         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
31357         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
31358         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
31359         (aarch64_simd_imm_zero_p): Delete.
31360         (aarch64_check_zero_based_sve_index_immediate): Declare.
31361         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
31362         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
31363         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
31364         (aarch64_sve_float_mul_immediate_p): Likewise.
31365         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
31366         rather than an rtx.
31367         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
31368         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
31369         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
31370         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
31371         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
31372         (aarch64_regmode_natural_size): Likewise.
31373         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
31374         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
31375         left one place.
31376         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
31377         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
31378         for VG and the SVE predicate registers.
31379         (V_ALIASES): Add a "z"-prefixed alias.
31380         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
31381         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
31382         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
31383         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
31384         (REG_CLASS_NAMES): Add entries for them.
31385         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
31386         and the predicate registers.
31387         (aarch64_sve_vg): Declare.
31388         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
31389         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
31390         (REGMODE_NATURAL_SIZE): Define.
31391         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
31392         SVE macros.
31393         * config/aarch64/aarch64.c: Include cfgrtl.h.
31394         (simd_immediate_info): Add a constructor for series vectors,
31395         and an associated step field.
31396         (aarch64_sve_vg): New variable.
31397         (aarch64_dbx_register_number): Handle VG and the predicate registers.
31398         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
31399         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
31400         (VEC_ANY_DATA, VEC_STRUCT): New constants.
31401         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
31402         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
31403         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
31404         (aarch64_get_mask_mode): New functions.
31405         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
31406         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
31407         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
31408         predicate modes and predicate registers.  Explicitly restrict
31409         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
31410         to store a vector mode if it is recognized by
31411         aarch64_classify_vector_mode.
31412         (aarch64_regmode_natural_size): New function.
31413         (aarch64_hard_regno_caller_save_mode): Return the original mode
31414         for predicates.
31415         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
31416         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
31417         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
31418         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
31419         functions.
31420         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
31421         does not overlap dest if the function is frame-related.  Handle
31422         SVE constants.
31423         (aarch64_split_add_offset): New function.
31424         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
31425         them aarch64_add_offset.
31426         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
31427         and update call to aarch64_sub_sp.
31428         (aarch64_add_cfa_expression): New function.
31429         (aarch64_expand_prologue): Pass extra temporary registers to the
31430         functions above.  Handle the case in which we need to emit new
31431         DW_CFA_expressions for registers that were originally saved
31432         relative to the stack pointer, but now have to be expressed
31433         relative to the frame pointer.
31434         (aarch64_output_mi_thunk): Pass extra temporary registers to the
31435         functions above.
31436         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
31437         IP0 and IP1 values for SVE frames.
31438         (aarch64_expand_vec_series): New function.
31439         (aarch64_expand_sve_widened_duplicate): Likewise.
31440         (aarch64_expand_sve_const_vector): Likewise.
31441         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
31442         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
31443         into the register, rather than emitting a SET directly.
31444         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
31445         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
31446         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
31447         (offset_9bit_signed_scaled_p): New functions.
31448         (aarch64_replicate_bitmask_imm): New function.
31449         (aarch64_bitmask_imm): Use it.
31450         (aarch64_cannot_force_const_mem): Reject expressions involving
31451         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
31452         (aarch64_classify_index): Handle SVE indices, by requiring
31453         a plain register index with a scale that matches the element size.
31454         (aarch64_classify_address): Handle SVE addresses.  Assert that
31455         the mode of the address is VOIDmode or an integer mode.
31456         Update call to aarch64_classify_symbol.
31457         (aarch64_classify_symbolic_expression): Update call to
31458         aarch64_classify_symbol.
31459         (aarch64_const_vec_all_in_range_p): New function.
31460         (aarch64_print_vector_float_operand): Likewise.
31461         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
31462         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
31463         and the FP immediates 1.0 and 0.5.
31464         (aarch64_print_address_internal): Handle SVE addresses.
31465         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
31466         (aarch64_regno_regclass): Handle predicate registers.
31467         (aarch64_secondary_reload): Handle big-endian reloads of SVE
31468         data modes.
31469         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
31470         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
31471         (aarch64_convert_sve_vector_bits): New function.
31472         (aarch64_override_options): Use it to handle -msve-vector-bits=.
31473         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
31474         rather than an rtx.
31475         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
31476         Handle SVE vector and predicate modes.  Accept VL-based constants
31477         that need only one temporary register, and VL offsets that require
31478         no temporary registers.
31479         (aarch64_conditional_register_usage): Mark the predicate registers
31480         as fixed if SVE isn't available.
31481         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
31482         Return true for SVE vector and predicate modes.
31483         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
31484         rather than an unsigned int.  Handle SVE modes.
31485         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
31486         SVE modes.
31487         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
31488         if SVE is enabled.
31489         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
31490         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
31491         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
31492         (aarch64_sve_float_mul_immediate_p): New functions.
31493         (aarch64_sve_valid_immediate): New function.
31494         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
31495         Explicitly reject structure modes.  Check for INDEX constants.
31496         Handle PTRUE and PFALSE constants.
31497         (aarch64_check_zero_based_sve_index_immediate): New function.
31498         (aarch64_simd_imm_zero_p): Delete.
31499         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
31500         vector modes.  Accept constants in the range of CNT[BHWD].
31501         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
31502         ask for an Advanced SIMD mode.
31503         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
31504         (aarch64_simd_vector_alignment): Handle SVE predicates.
31505         (aarch64_vectorize_preferred_vector_alignment): New function.
31506         (aarch64_simd_vector_alignment_reachable): Use it instead of
31507         the vector size.
31508         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
31509         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
31510         functions.
31511         (MAX_VECT_LEN): Delete.
31512         (expand_vec_perm_d): Add a vec_flags field.
31513         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
31514         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
31515         (aarch64_evpc_ext): Don't apply a big-endian lane correction
31516         for SVE modes.
31517         (aarch64_evpc_rev): Rename to...
31518         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
31519         (aarch64_evpc_rev_global): New function.
31520         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
31521         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
31522         MAX_VECT_LEN.
31523         (aarch64_evpc_sve_tbl): New function.
31524         (aarch64_expand_vec_perm_const_1): Update after rename of
31525         aarch64_evpc_rev.  Handle SVE permutes too, trying
31526         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
31527         than aarch64_evpc_tbl.
31528         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
31529         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
31530         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
31531         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
31532         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
31533         (aarch64_expand_sve_vcond): New functions.
31534         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
31535         of aarch64_vector_mode_p.
31536         (aarch64_dwarf_poly_indeterminate_value): New function.
31537         (aarch64_compute_pressure_classes): Likewise.
31538         (aarch64_can_change_mode_class): Likewise.
31539         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
31540         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
31541         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
31542         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
31543         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
31544         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
31545         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
31546         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
31547         constraints.
31548         (Dn, Dl, Dr): Accept const as well as const_vector.
31549         (Dz): Likewise.  Compare against CONST0_RTX.
31550         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
31551         of "vector" where appropriate.
31552         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
31553         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
31554         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
31555         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
31556         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
31557         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
31558         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
31559         (v_int_equiv): Extend to SVE modes.
31560         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
31561         mode attributes.
31562         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
31563         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
31564         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
31565         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
31566         (SVE_COND_FP_CMP): New int iterators.
31567         (perm_hilo): Handle the new unpack unspecs.
31568         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
31569         attributes.
31570         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
31571         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
31572         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
31573         (aarch64_equality_operator, aarch64_constant_vector_operand)
31574         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
31575         (aarch64_sve_nonimmediate_operand): Likewise.
31576         (aarch64_sve_general_operand): Likewise.
31577         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
31578         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
31579         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
31580         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
31581         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
31582         (aarch64_sve_float_arith_immediate): Likewise.
31583         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
31584         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
31585         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
31586         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
31587         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
31588         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
31589         (aarch64_sve_float_arith_operand): Likewise.
31590         (aarch64_sve_float_arith_with_sub_operand): Likewise.
31591         (aarch64_sve_float_mul_operand): Likewise.
31592         (aarch64_sve_vec_perm_operand): Likewise.
31593         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
31594         (aarch64_mov_operand): Accept const_poly_int and const_vector.
31595         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
31596         as well as const_vector.
31597         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
31598         in file.  Use CONST0_RTX and CONSTM1_RTX.
31599         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
31600         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
31601         Use aarch64_simd_imm_zero.
31602         * config/aarch64/aarch64-sve.md: New file.
31603         * config/aarch64/aarch64.md: Include it.
31604         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
31605         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
31606         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
31607         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
31608         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
31609         (sve): New attribute.
31610         (enabled): Disable instructions with the sve attribute unless
31611         TARGET_SVE.
31612         (movqi, movhi): Pass CONST_POLY_INT operaneds through
31613         aarch64_expand_mov_immediate.
31614         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
31615         CNT[BHSD] immediates.
31616         (movti): Split CONST_POLY_INT moves into two halves.
31617         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
31618         Split additions that need a temporary here if the destination
31619         is the stack pointer.
31620         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
31621         (*add<mode>3_poly_1): New instruction.
31622         (set_clobber_cc): New expander.
31624 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31626         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
31627         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
31628         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
31629         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
31630         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
31631         Change innermode from fixed_mode_size to machine_mode.
31632         (simplify_subreg): Update call accordingly.  Handle a constant-sized
31633         subreg of a variable-length CONST_VECTOR.
31635 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31636             Alan Hayward  <alan.hayward@arm.com>
31637             David Sherwood  <david.sherwood@arm.com>
31639         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
31640         (add_offset_to_base): New function, split out from...
31641         (create_mem_ref): ...here.  When handling a scale other than 1,
31642         check first whether the address is valid without the offset.
31643         Add it into the base if so, leaving the index and scale as-is.
31645 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
31647         PR c++/83778
31648         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
31649         fold_for_warn before checking if arg2 is INTEGER_CST.
31651 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
31653         * config/rs6000/predicates.md (load_multiple_operation): Delete.
31654         (store_multiple_operation): Delete.
31655         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
31656         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
31657         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
31658         guarded by TARGET_STRING.
31659         (rs6000_output_load_multiple): Delete.
31660         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
31661         OPTION_MASK_STRING / TARGET_STRING handling.
31662         (print_operand) <'N', 'O'>: Add comment that these are unused now.
31663         (const rs6000_opt_masks) <"string">: Change mask to 0.
31664         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
31665         (MASK_STRING): Delete.
31666         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
31667         parts.  Simplify.
31668         (load_multiple): Delete.
31669         (*ldmsi8): Delete.
31670         (*ldmsi7): Delete.
31671         (*ldmsi6): Delete.
31672         (*ldmsi5): Delete.
31673         (*ldmsi4): Delete.
31674         (*ldmsi3): Delete.
31675         (store_multiple): Delete.
31676         (*stmsi8): Delete.
31677         (*stmsi7): Delete.
31678         (*stmsi6): Delete.
31679         (*stmsi5): Delete.
31680         (*stmsi4): Delete.
31681         (*stmsi3): Delete.
31682         (movmemsi_8reg): Delete.
31683         (corresponding unnamed define_insn): Delete.
31684         (movmemsi_6reg): Delete.
31685         (corresponding unnamed define_insn): Delete.
31686         (movmemsi_4reg): Delete.
31687         (corresponding unnamed define_insn): Delete.
31688         (movmemsi_2reg): Delete.
31689         (corresponding unnamed define_insn): Delete.
31690         (movmemsi_1reg): Delete.
31691         (corresponding unnamed define_insn): Delete.
31692         * config/rs6000/rs6000.opt (mno-string): New.
31693         (mstring): Replace by deprecation warning stub.
31694         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
31696 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
31698         * regrename.c (regrename_do_replace): If replacing the same
31699         reg multiple times, try to reuse last created gen_raw_REG.
31701         PR debug/81155
31702         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
31703         main to workaround a bug in GDB.
31705 2018-01-12  Tom de Vries  <tom@codesourcery.com>
31707         PR target/83737
31708         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
31710 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
31712         PR rtl-optimization/80481
31713         * ira-color.c (get_cap_member): New function.
31714         (allocnos_conflict_by_live_ranges_p): Use it.
31715         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
31716         (setup_slot_coalesced_allocno_live_ranges): Ditto.
31718 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
31720         PR target/83628
31721         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
31722         (*saddl_se_1): Ditto.
31723         (*ssubsi_1): Ditto.
31724         (*ssubl_se_1): Ditto.
31726 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
31728         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
31729         rather than wi::to_widest for DR_INITs.
31730         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
31731         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
31732         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
31733         INTEGER_CSTs.
31734         (vect_analyze_group_access_1): Note that here.
31736 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
31738         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
31739         polynomial type sizes.
31741 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
31743         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
31744         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
31745         (gimple_add_tmp_var): Likewise.
31747 2018-01-12  Martin Liska  <mliska@suse.cz>
31749         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
31750         (gimple_alloc_sizes): Likewise.
31751         (dump_gimple_statistics): Use PRIu64 in printf format.
31752         * gimple.h: Change uint64_t to int.
31754 2018-01-12  Martin Liska  <mliska@suse.cz>
31756         * tree-core.h: Use uint64_t instead of int.
31757         * tree.c (tree_node_counts): Likewise.
31758         (tree_node_sizes): Likewise.
31759         (dump_tree_statistics): Use PRIu64 in printf format.
31761 2018-01-12  Martin Liska  <mliska@suse.cz>
31763         * Makefile.in: As qsort_chk is implemented in vec.c, add
31764         vec.o to linkage of gencfn-macros.
31765         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
31766         passing the info to record_node_allocation_statistics.
31767         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
31768         and pass the info.
31769         * ggc-common.c (struct ggc_usage): Add operator== and use
31770         it in operator< and compare function.
31771         * mem-stats.h (struct mem_usage): Likewise.
31772         * vec.c (struct vec_usage): Remove operator< and compare
31773         function. Can be simply inherited.
31775 2018-01-12  Martin Jambor  <mjambor@suse.cz>
31777         PR target/81616
31778         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
31779         * tree-ssa-math-opts.c: Include domwalk.h.
31780         (convert_mult_to_fma_1): New function.
31781         (fma_transformation_info): New type.
31782         (fma_deferring_state): Likewise.
31783         (cancel_fma_deferring): New function.
31784         (result_of_phi): Likewise.
31785         (last_fma_candidate_feeds_initial_phi): Likewise.
31786         (convert_mult_to_fma): Added deferring logic, split actual
31787         transformation to convert_mult_to_fma_1.
31788         (math_opts_dom_walker): New type.
31789         (math_opts_dom_walker::after_dom_children): New method, body moved
31790         here from pass_optimize_widening_mul::execute, added deferring logic
31791         bits.
31792         (pass_optimize_widening_mul::execute): Moved most of code to
31793         math_opts_dom_walker::after_dom_children.
31794         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
31795         * config/i386/i386.c (ix86_option_override_internal): Added
31796         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
31798 2018-01-12  Richard Biener  <rguenther@suse.de>
31800         PR debug/83157
31801         * dwarf2out.c (gen_variable_die): Do not reset old_die for
31802         inline instance vars.
31804 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
31806         PR target/81819
31807         * config/rx/rx.c (rx_is_restricted_memory_address):
31808         Handle SUBREG case.
31810 2018-01-12  Richard Biener  <rguenther@suse.de>
31812         PR tree-optimization/80846
31813         * target.def (split_reduction): New target hook.
31814         * targhooks.c (default_split_reduction): New function.
31815         * targhooks.h (default_split_reduction): Declare.
31816         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
31817         target requests first reduce vectors by combining low and high
31818         parts.
31819         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
31820         (get_vectype_for_scalar_type_and_size): Export.
31821         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
31822         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
31823         * doc/tm.texi: Regenerate.
31824         * config/i386/i386.c (ix86_split_reduction): Implement
31825         TARGET_VECTORIZE_SPLIT_REDUCTION.
31827 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
31829         PR target/83368
31830         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
31831         in PIC mode except for TARGET_VXWORKS_RTP.
31832         * config/sparc/sparc.c: Include cfgrtl.h.
31833         (TARGET_INIT_PIC_REG): Define.
31834         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
31835         (sparc_pic_register_p): New predicate.
31836         (sparc_legitimate_address_p): Use it.
31837         (sparc_legitimize_pic_address): Likewise.
31838         (sparc_delegitimize_address): Likewise.
31839         (sparc_mode_dependent_address_p): Likewise.
31840         (gen_load_pcrel_sym): Remove 4th parameter.
31841         (load_got_register): Adjust call to above.  Remove obsolete stuff.
31842         (sparc_expand_prologue): Do not call load_got_register here.
31843         (sparc_flat_expand_prologue): Likewise.
31844         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
31845         (sparc_use_pseudo_pic_reg): New function.
31846         (sparc_init_pic_reg): Likewise.
31847         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
31848         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
31850 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
31852         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
31853         Add item for branch_cost.
31855 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
31857         PR rtl-optimization/83565
31858         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
31859         not extend the result to a larger mode for rotate operations.
31860         (num_sign_bit_copies1): Likewise.
31862 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
31864         PR target/40411
31865         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
31866         -symbolic.
31867         Use values-Xc.o for -pedantic.
31868         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
31870 2018-01-12  Martin Liska  <mliska@suse.cz>
31872         PR ipa/83054
31873         * ipa-devirt.c (final_warning_record::grow_type_warnings):
31874         New function.
31875         (possible_polymorphic_call_targets): Use it.
31876         (ipa_devirt): Likewise.
31878 2018-01-12  Martin Liska  <mliska@suse.cz>
31880         * profile-count.h (enum profile_quality): Use 0 as invalid
31881         enum value of profile_quality.
31883 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
31885         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
31886         -mext-string options.
31888 2018-01-12  Richard Biener  <rguenther@suse.de>
31890         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
31891         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
31892         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
31893         Likewise.
31894         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
31896 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
31898         * configure.ac (--with-long-double-format): Add support for the
31899         configuration option to change the default long double format on
31900         PowerPC systems.
31901         * config.gcc (powerpc*-linux*-*): Likewise.
31902         * configure: Regenerate.
31903         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
31904         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
31905         used without modification.
31907 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
31909         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
31910         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
31911         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
31912         MISC_BUILTIN_SPEC_BARRIER.
31913         (rs6000_init_builtins): Likewise.
31914         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
31915         enum value.
31916         (speculation_barrier): New define_insn.
31917         * doc/extend.texi: Document __builtin_speculation_barrier.
31919 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
31921         PR target/83203
31922         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
31923         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
31924         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
31925         iterators.
31926         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
31927         integral modes instead of "ss" and "sd".
31928         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
31929         vectors with 32-bit and 64-bit elements.
31930         (vecdupssescalarmodesuffix): New mode attribute.
31931         (vec_dup<mode>): Use it.
31933 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
31935         PR target/83330
31936         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
31937         frame if argument is passed on stack.
31939 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
31941         PR target/82682
31942         * ree.c (combine_reaching_defs): Optimize also
31943         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
31944         reg2=any_extend(exp); reg1=reg2;, formatting fix.
31946 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
31948         PR middle-end/83189
31949         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
31951 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
31953         PR middle-end/83718
31954         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
31955         after they are computed.
31957 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
31959         PR tree-optimization/83695
31960         * gimple-loop-linterchange.cc
31961         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
31962         reset cached scev information after interchange.
31963         (pass_linterchange::execute): Remove call to scev_reset_htab.
31965 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
31967         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
31968         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
31969         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
31970         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
31971         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
31972         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
31973         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
31974         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
31975         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
31976         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
31977         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
31978         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
31979         (V_lane_reg): Likewise.
31980         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
31981         New define_expand.
31982         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
31983         (vfmal_lane_low<mode>_intrinsic,
31984         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
31985         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
31986         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
31987         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
31988         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
31989         vfmsl_lane_high<mode>_intrinsic): New define_insns.
31991 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
31993         * config/arm/arm-cpus.in (fp16fml): New feature.
31994         (ALL_SIMD): Add fp16fml.
31995         (armv8.2-a): Add fp16fml as an option.
31996         (armv8.3-a): Likewise.
31997         (armv8.4-a): Add fp16fml as part of fp16.
31998         * config/arm/arm.h (TARGET_FP16FML): Define.
31999         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
32000         when appropriate.
32001         * config/arm/arm-modes.def (V2HF): Define.
32002         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
32003         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
32004         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
32005         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
32006         vfmsl_low, vfmsl_high): New set of builtins.
32007         * config/arm/iterators.md (PLUSMINUS): New code iterator.
32008         (vfml_op): New code attribute.
32009         (VFMLHALVES): New int iterator.
32010         (VFML, VFMLSEL): New mode attributes.
32011         (V_reg): Define mapping for V2HF.
32012         (V_hi, V_lo): New mode attributes.
32013         (VF_constraint): Likewise.
32014         (vfml_half, vfml_half_selector): New int attributes.
32015         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
32016         define_expand.
32017         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
32018         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
32019         New define_insn.
32020         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
32021         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
32022         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
32023         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
32024         documentation.
32025         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
32026         Document new effective target and option set.
32028 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
32030         * config/arm/arm-cpus.in (armv8_4): New feature.
32031         (ARMv8_4a): New fgroup.
32032         (armv8.4-a): New arch.
32033         * config/arm/arm-tables.opt: Regenerate.
32034         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
32035         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
32036         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
32037         Add matching rules for -march=armv8.4-a and extensions.
32038         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
32040 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
32042         PR target/81821
32043         * config/rx/rx.md (BW): New mode attribute.
32044         (sync_lock_test_and_setsi): Add mode suffix to insn output.
32046 2018-01-11  Richard Biener  <rguenther@suse.de>
32048         PR tree-optimization/83435
32049         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
32050         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
32051         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
32053 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
32054             Alan Hayward  <alan.hayward@arm.com>
32055             David Sherwood  <david.sherwood@arm.com>
32057         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
32058         field.
32059         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
32060         (aarch64_print_address_internal): Use it to check for a zero offset.
32062 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
32063             Alan Hayward  <alan.hayward@arm.com>
32064             David Sherwood  <david.sherwood@arm.com>
32066         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
32067         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
32068         Return a poly_int64 rather than a HOST_WIDE_INT.
32069         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
32070         rather than a HOST_WIDE_INT.
32071         * config/aarch64/aarch64.h (aarch64_frame): Protect with
32072         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
32073         hard_fp_offset, frame_size, initial_adjust, callee_offset and
32074         final_offset from HOST_WIDE_INT to poly_int64.
32075         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
32076         to_constant when getting the number of units in an Advanced SIMD
32077         mode.
32078         (aarch64_builtin_vectorized_function): Check for a constant number
32079         of units.
32080         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
32081         GET_MODE_SIZE.
32082         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
32083         attribute instead of GET_MODE_NUNITS.
32084         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
32085         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
32086         GET_MODE_SIZE for fixed-size registers.
32087         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
32088         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
32089         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
32090         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
32091         (aarch64_print_operand, aarch64_print_address_internal)
32092         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
32093         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
32094         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
32095         Handle polynomial GET_MODE_SIZE.
32096         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
32097         wider than SImode without modification.
32098         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
32099         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
32100         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
32101         passing and returning SVE modes.
32102         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
32103         rather than GEN_INT.
32104         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
32105         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
32106         (aarch64_allocate_and_probe_stack_space): Likewise.
32107         (aarch64_layout_frame): Cope with polynomial offsets.
32108         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
32109         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
32110         polynomial offsets.
32111         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
32112         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
32113         poly_int64 rather than a HOST_WIDE_INT.
32114         (aarch64_get_separate_components, aarch64_process_components)
32115         (aarch64_expand_prologue, aarch64_expand_epilogue)
32116         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
32117         (aarch64_anchor_offset): New function, split out from...
32118         (aarch64_legitimize_address): ...here.
32119         (aarch64_builtin_vectorization_cost): Handle polynomial
32120         TYPE_VECTOR_SUBPARTS.
32121         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
32122         GET_MODE_NUNITS.
32123         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
32124         number of elements from the PARALLEL rather than the mode.
32125         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
32126         rather than GET_MODE_BITSIZE.
32127         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
32128         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
32129         (aarch64_expand_vec_perm_const_1): Handle polynomial
32130         d->perm.length () and d->perm elements.
32131         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
32132         Apply to_constant to d->perm elements.
32133         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
32134         polynomial CONST_VECTOR_NUNITS.
32135         (aarch64_move_pointer): Take amount as a poly_int64 rather
32136         than an int.
32137         (aarch64_progress_pointer): Avoid temporary variable.
32138         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
32139         the mode attribute instead of GET_MODE.
32141 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
32142             Alan Hayward  <alan.hayward@arm.com>
32143             David Sherwood  <david.sherwood@arm.com>
32145         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
32146         x exists before using it.
32147         (aarch64_add_constant_internal): Rename to...
32148         (aarch64_add_offset_1): ...this.  Replace regnum with separate
32149         src and dest rtxes.  Handle the case in which they're different,
32150         including when the offset is zero.  Replace scratchreg with an rtx.
32151         Use 2 additions if there is no spare register into which we can
32152         move a 16-bit constant.
32153         (aarch64_add_constant): Delete.
32154         (aarch64_add_offset): Replace reg with separate src and dest
32155         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
32156         Use aarch64_add_offset_1.
32157         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
32158         an rtx rather than an int.  Take the delta as a poly_int64
32159         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
32160         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
32161         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
32162         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
32163         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
32164         and aarch64_add_sp.
32165         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
32166         aarch64_add_constant.
32168 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
32170         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
32171         Use scalar_float_mode.
32173 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
32175         * config/aarch64/aarch64-simd.md
32176         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
32177         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
32178         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
32179         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
32180         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
32181         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
32182         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
32183         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
32184         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
32185         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
32187 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
32189         PR target/83514
32190         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
32191         targ_options->x_arm_arch_string is non NULL.
32193 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
32195         * config/aarch64/aarch64.h
32196         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
32198 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
32200         PR target/82096
32201         * expmed.c (emit_store_flag_force): Swap if const op0
32202         and change VOIDmode to mode of op0.
32204 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
32206         PR rtl-optimization/83761
32207         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
32208         than bytes to mode_for_size.
32210 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
32212         PR middle-end/83189
32213         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
32214         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
32215         profile.
32217 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
32219         PR middle-end/83575
32220         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
32221         when in layout mode.
32222         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
32223         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
32224         partition fixup.
32226 2018-01-10  Michael Collison  <michael.collison@arm.com>
32228         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
32229         * config/aarch64/aarch64-option-extension.def: Add
32230         AARCH64_OPT_EXTENSION of 'fp16fml'.
32231         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
32232         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
32233         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
32234         * config/aarch64/constraints.md (Ui7): New constraint.
32235         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
32236         (VFMLA_SEL_W): Ditto.
32237         (f16quad): Ditto.
32238         (f16mac1): Ditto.
32239         (VFMLA16_LOW): New int iterator.
32240         (VFMLA16_HIGH): Ditto.
32241         (UNSPEC_FMLAL): New unspec.
32242         (UNSPEC_FMLSL): Ditto.
32243         (UNSPEC_FMLAL2): Ditto.
32244         (UNSPEC_FMLSL2): Ditto.
32245         (f16mac): New code attribute.
32246         * config/aarch64/aarch64-simd-builtins.def
32247         (aarch64_fmlal_lowv2sf): Ditto.
32248         (aarch64_fmlsl_lowv2sf): Ditto.
32249         (aarch64_fmlalq_lowv4sf): Ditto.
32250         (aarch64_fmlslq_lowv4sf): Ditto.
32251         (aarch64_fmlal_highv2sf): Ditto.
32252         (aarch64_fmlsl_highv2sf): Ditto.
32253         (aarch64_fmlalq_highv4sf): Ditto.
32254         (aarch64_fmlslq_highv4sf): Ditto.
32255         (aarch64_fmlal_lane_lowv2sf): Ditto.
32256         (aarch64_fmlsl_lane_lowv2sf): Ditto.
32257         (aarch64_fmlal_laneq_lowv2sf): Ditto.
32258         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
32259         (aarch64_fmlalq_lane_lowv4sf): Ditto.
32260         (aarch64_fmlsl_lane_lowv4sf): Ditto.
32261         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
32262         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
32263         (aarch64_fmlal_lane_highv2sf): Ditto.
32264         (aarch64_fmlsl_lane_highv2sf): Ditto.
32265         (aarch64_fmlal_laneq_highv2sf): Ditto.
32266         (aarch64_fmlsl_laneq_highv2sf): Ditto.
32267         (aarch64_fmlalq_lane_highv4sf): Ditto.
32268         (aarch64_fmlsl_lane_highv4sf): Ditto.
32269         (aarch64_fmlalq_laneq_highv4sf): Ditto.
32270         (aarch64_fmlsl_laneq_highv4sf): Ditto.
32271         * config/aarch64/aarch64-simd.md:
32272         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
32273         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
32274         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
32275         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
32276         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
32277         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
32278         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
32279         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
32280         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
32281         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
32282         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
32283         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
32284         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
32285         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
32286         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
32287         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
32288         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
32289         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
32290         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
32291         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
32292         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
32293         (vfmlsl_low_u32): Ditto.
32294         (vfmlalq_low_u32): Ditto.
32295         (vfmlslq_low_u32): Ditto.
32296         (vfmlal_high_u32): Ditto.
32297         (vfmlsl_high_u32): Ditto.
32298         (vfmlalq_high_u32): Ditto.
32299         (vfmlslq_high_u32): Ditto.
32300         (vfmlal_lane_low_u32): Ditto.
32301         (vfmlsl_lane_low_u32): Ditto.
32302         (vfmlal_laneq_low_u32): Ditto.
32303         (vfmlsl_laneq_low_u32): Ditto.
32304         (vfmlalq_lane_low_u32): Ditto.
32305         (vfmlslq_lane_low_u32): Ditto.
32306         (vfmlalq_laneq_low_u32): Ditto.
32307         (vfmlslq_laneq_low_u32): Ditto.
32308         (vfmlal_lane_high_u32): Ditto.
32309         (vfmlsl_lane_high_u32): Ditto.
32310         (vfmlal_laneq_high_u32): Ditto.
32311         (vfmlsl_laneq_high_u32): Ditto.
32312         (vfmlalq_lane_high_u32): Ditto.
32313         (vfmlslq_lane_high_u32): Ditto.
32314         (vfmlalq_laneq_high_u32): Ditto.
32315         (vfmlslq_laneq_high_u32): Ditto.
32316         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
32317         (AARCH64_FL_FOR_ARCH8_4): New.
32318         (AARCH64_ISA_F16FML): New ISA flag.
32319         (TARGET_F16FML): New feature flag for fp16fml.
32320         (doc/invoke.texi): Document new fp16fml option.
32322 2018-01-10  Michael Collison  <michael.collison@arm.com>
32324         * config/aarch64/aarch64-builtins.c:
32325         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
32326         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
32327         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
32328         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
32329         (AARCH64_ISA_SHA3): New ISA flag.
32330         (TARGET_SHA3): New feature flag for sha3.
32331         * config/aarch64/iterators.md (sha512_op): New int attribute.
32332         (CRYPTO_SHA512): New int iterator.
32333         (UNSPEC_SHA512H): New unspec.
32334         (UNSPEC_SHA512H2): Ditto.
32335         (UNSPEC_SHA512SU0): Ditto.
32336         (UNSPEC_SHA512SU1): Ditto.
32337         * config/aarch64/aarch64-simd-builtins.def
32338         (aarch64_crypto_sha512hqv2di): New builtin.
32339         (aarch64_crypto_sha512h2qv2di): Ditto.
32340         (aarch64_crypto_sha512su0qv2di): Ditto.
32341         (aarch64_crypto_sha512su1qv2di): Ditto.
32342         (aarch64_eor3qv8hi): Ditto.
32343         (aarch64_rax1qv2di): Ditto.
32344         (aarch64_xarqv2di): Ditto.
32345         (aarch64_bcaxqv8hi): Ditto.
32346         * config/aarch64/aarch64-simd.md:
32347         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
32348         (aarch64_crypto_sha512su0qv2di): Ditto.
32349         (aarch64_crypto_sha512su1qv2di): Ditto.
32350         (aarch64_eor3qv8hi): Ditto.
32351         (aarch64_rax1qv2di): Ditto.
32352         (aarch64_xarqv2di): Ditto.
32353         (aarch64_bcaxqv8hi): Ditto.
32354         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
32355         (vsha512h2q_u64): Ditto.
32356         (vsha512su0q_u64): Ditto.
32357         (vsha512su1q_u64): Ditto.
32358         (veor3q_u16): Ditto.
32359         (vrax1q_u64): Ditto.
32360         (vxarq_u64): Ditto.
32361         (vbcaxq_u16): Ditto.
32362         * config/arm/types.md (crypto_sha512): New type attribute.
32363         (crypto_sha3): Ditto.
32364         (doc/invoke.texi): Document new sha3 option.
32366 2018-01-10  Michael Collison  <michael.collison@arm.com>
32368         * config/aarch64/aarch64-builtins.c:
32369         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
32370         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
32371         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
32372         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
32373         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
32374         (AARCH64_ISA_SM4): New ISA flag.
32375         (TARGET_SM4): New feature flag for sm4.
32376         * config/aarch64/aarch64-simd-builtins.def
32377         (aarch64_sm3ss1qv4si): Ditto.
32378         (aarch64_sm3tt1aq4si): Ditto.
32379         (aarch64_sm3tt1bq4si): Ditto.
32380         (aarch64_sm3tt2aq4si): Ditto.
32381         (aarch64_sm3tt2bq4si): Ditto.
32382         (aarch64_sm3partw1qv4si): Ditto.
32383         (aarch64_sm3partw2qv4si): Ditto.
32384         (aarch64_sm4eqv4si): Ditto.
32385         (aarch64_sm4ekeyqv4si): Ditto.
32386         * config/aarch64/aarch64-simd.md:
32387         (aarch64_sm3ss1qv4si): Ditto.
32388         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
32389         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
32390         (aarch64_sm4eqv4si): Ditto.
32391         (aarch64_sm4ekeyqv4si): Ditto.
32392         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
32393         (sm3part_op): Ditto.
32394         (CRYPTO_SM3TT): Ditto.
32395         (CRYPTO_SM3PART): Ditto.
32396         (UNSPEC_SM3SS1): New unspec.
32397         (UNSPEC_SM3TT1A): Ditto.
32398         (UNSPEC_SM3TT1B): Ditto.
32399         (UNSPEC_SM3TT2A): Ditto.
32400         (UNSPEC_SM3TT2B): Ditto.
32401         (UNSPEC_SM3PARTW1): Ditto.
32402         (UNSPEC_SM3PARTW2): Ditto.
32403         (UNSPEC_SM4E): Ditto.
32404         (UNSPEC_SM4EKEY): Ditto.
32405         * config/aarch64/constraints.md (Ui2): New constraint.
32406         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
32407         * config/arm/types.md (crypto_sm3): New type attribute.
32408         (crypto_sm4): Ditto.
32409         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
32410         (vsm3tt1aq_u32): Ditto.
32411         (vsm3tt1bq_u32): Ditto.
32412         (vsm3tt2aq_u32): Ditto.
32413         (vsm3tt2bq_u32): Ditto.
32414         (vsm3partw1q_u32): Ditto.
32415         (vsm3partw2q_u32): Ditto.
32416         (vsm4eq_u32): Ditto.
32417         (vsm4ekeyq_u32): Ditto.
32418         (doc/invoke.texi): Document new sm4 option.
32420 2018-01-10  Michael Collison  <michael.collison@arm.com>
32422         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
32423         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
32424         (AARCH64_FL_FOR_ARCH8_4): New.
32425         (AARCH64_FL_V8_4): New flag.
32426         (doc/invoke.texi): Document new armv8.4-a option.
32428 2018-01-10  Michael Collison  <michael.collison@arm.com>
32430         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
32431         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
32432         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
32433         * config/aarch64/aarch64-option-extension.def: Add
32434         AARCH64_OPT_EXTENSION of 'sha2'.
32435         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
32436         (crypto): Disable sha2 and aes if crypto disabled.
32437         (crypto): Enable aes and sha2 if enabled.
32438         (simd): Disable sha2 and aes if simd disabled.
32439         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
32440         New flags.
32441         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
32442         (TARGET_SHA2): New feature flag for sha2.
32443         (TARGET_AES): New feature flag for aes.
32444         * config/aarch64/aarch64-simd.md:
32445         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
32446         conditional on TARGET_AES.
32447         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
32448         (aarch64_crypto_sha1hsi): Make pattern conditional
32449         on TARGET_SHA2.
32450         (aarch64_crypto_sha1hv4si): Ditto.
32451         (aarch64_be_crypto_sha1hv4si): Ditto.
32452         (aarch64_crypto_sha1su1v4si): Ditto.
32453         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
32454         (aarch64_crypto_sha1su0v4si): Ditto.
32455         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
32456         (aarch64_crypto_sha256su0v4si): Ditto.
32457         (aarch64_crypto_sha256su1v4si): Ditto.
32458         (doc/invoke.texi): Document new aes and sha2 options.
32460 2018-01-10  Martin Sebor  <msebor@redhat.com>
32462         PR tree-optimization/83781
32463         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
32464         as string arrays.
32466 2018-01-11  Martin Sebor  <msebor@gmail.com>
32467             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
32469         PR tree-optimization/83501
32470         PR tree-optimization/81703
32472         * tree-ssa-strlen.c (get_string_cst): Rename...
32473         (get_string_len): ...to this.  Handle global constants.
32474         (handle_char_store): Adjust.
32476 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
32477             Jim Wilson  <jimw@sifive.com>
32479         * config/riscv/riscv-protos.h (riscv_output_return): New.
32480         * config/riscv/riscv.c (struct machine_function): New naked_p field.
32481         (riscv_attribute_table, riscv_output_return),
32482         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
32483         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
32484         (riscv_compute_frame_info): Only compute frame->mask if not a naked
32485         function.
32486         (riscv_expand_prologue): Add early return for naked function.
32487         (riscv_expand_epilogue): Likewise.
32488         (riscv_function_ok_for_sibcall): Return false for naked function.
32489         (riscv_set_current_function): New.
32490         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
32491         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
32492         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
32493         * doc/extend.texi (RISC-V Function Attributes): New.
32495 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
32497         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
32498         check for 128-bit long double before checking TCmode.
32499         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
32500         128-bit long doubles before checking TFmode or TCmode.
32501         (FLOAT128_IBM_P): Likewise.
32503 2018-01-10  Martin Sebor  <msebor@redhat.com>
32505         PR tree-optimization/83671
32506         * builtins.c (c_strlen): Unconditionally return zero for the empty
32507         string.
32508         Use -Warray-bounds for warnings.
32509         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
32510         for non-constant array indices with COMPONENT_REF, arrays of
32511         arrays, and pointers to arrays.
32512         (gimple_fold_builtin_strlen): Determine and set length range for
32513         non-constant character arrays.
32515 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
32517         PR middle-end/81897
32518         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
32519         empty blocks.
32521 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
32523         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
32525 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
32527         PR target/83399
32528         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
32529         VECTOR_MEM_ALTIVEC_OR_VSX_P.
32530         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
32531         indexed_or_indirect_operand predicate.
32532         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
32533         (*vsx_le_perm_load_v8hi): Likewise.
32534         (*vsx_le_perm_load_v16qi): Likewise.
32535         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
32536         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
32537         (*vsx_le_perm_store_v8hi): Likewise.
32538         (*vsx_le_perm_store_v16qi): Likewise.
32539         (eight unnamed splitters): Likewise.
32541 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
32543         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
32544         * config/rs6000/emmintrin.h: Likewise.
32545         * config/rs6000/mmintrin.h: Likewise.
32546         * config/rs6000/xmmintrin.h: Likewise.
32548 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
32550         PR c++/43486
32551         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
32552         "public_flag".
32553         * tree.c (tree_nop_conversion): Return true for location wrapper
32554         nodes.
32555         (maybe_wrap_with_location): New function.
32556         (selftest::check_strip_nops): New function.
32557         (selftest::test_location_wrappers): New function.
32558         (selftest::tree_c_tests): Call it.
32559         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
32560         (maybe_wrap_with_location): New decl.
32561         (EXPR_LOCATION_WRAPPER_P): New macro.
32562         (location_wrapper_p): New inline function.
32563         (tree_strip_any_location_wrapper): New inline function.
32565 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
32567         PR target/83735
32568         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
32569         stack_realign_offset for the largest alignment of stack slot
32570         actually used.
32571         (ix86_find_max_used_stack_alignment): New function.
32572         (ix86_finalize_stack_frame_flags): Use it.  Set
32573         max_used_stack_alignment if we don't realign stack.
32574         * config/i386/i386.h (machine_function): Add
32575         max_used_stack_alignment.
32577 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
32579         * config/arm/arm.opt (-mbranch-cost): New option.
32580         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
32581         account.
32583 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
32585         PR target/83629
32586         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
32587         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
32589 2018-01-10  Richard Biener  <rguenther@suse.de>
32591         PR debug/83765
32592         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
32593         early out so it also covers the case where we have a non-NULL
32594         origin.
32596 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
32598         PR tree-optimization/83753
32599         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
32600         for non-strided grouped accesses if the number of elements is 1.
32602 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
32604         PR target/81616
32605         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
32606         * i386.h (TARGET_USE_GATHER): Define.
32607         * x86-tune.def (X86_TUNE_USE_GATHER): New.
32609 2018-01-10  Martin Liska  <mliska@suse.cz>
32611         PR bootstrap/82831
32612         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
32613         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
32614         partitioning.
32615         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
32616         CLEANUP_NO_PARTITIONING is not set.
32618 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
32620         * doc/rtl.texi: Remove documentation of (const ...) wrappers
32621         for vectors, as a partial revert of r254296.
32622         * rtl.h (const_vec_p): Delete.
32623         (const_vec_duplicate_p): Don't test for vector CONSTs.
32624         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
32625         * expmed.c (make_tree): Likewise.
32627         Revert:
32628         * common.md (E, F): Use CONSTANT_P instead of checking for
32629         CONST_VECTOR.
32630         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
32631         checking for CONST_VECTOR.
32633 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
32635         PR middle-end/83575
32636         * predict.c (force_edge_cold): Handle in more sane way edges
32637         with no prediction.
32639 2018-01-09  Carl Love  <cel@us.ibm.com>
32641         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
32642         V4SI, V4SF types.
32643         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
32644         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
32645         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
32646         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
32647         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
32648         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
32649         * config/rs6000/rs6000-protos.h: Add extern defition for
32650         rs6000_generate_float2_double_code.
32651         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
32652         function.
32653         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
32654         (float2_v2df): Add define_expand.
32656 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
32658         PR target/83628
32659         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
32660         op_mode in the force_to_mode call.
32662 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
32664         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
32665         instead of checking each element individually.
32666         (aarch64_evpc_uzp): Likewise.
32667         (aarch64_evpc_zip): Likewise.
32668         (aarch64_evpc_ext): Likewise.
32669         (aarch64_evpc_rev): Likewise.
32670         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
32671         instead of checking each element individually.  Return true without
32672         generating rtl if
32673         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
32674         whether all selected elements come from the same input, instead of
32675         checking each element individually.  Remove calls to gen_rtx_REG,
32676         start_sequence and end_sequence and instead assert that no rtl is
32677         generated.
32679 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
32681         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
32682         order of HIGH and CONST checks.
32684 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
32686         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
32687         if the destination isn't an SSA_NAME.
32689 2018-01-09  Richard Biener  <rguenther@suse.de>
32691         PR tree-optimization/83668
32692         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
32693         move prologue...
32694         (canonicalize_loop_form): ... here, renamed from ...
32695         (canonicalize_loop_closed_ssa_form): ... this and amended to
32696         swap successor edges for loop exit blocks to make us use
32697         the RPO order we need for initial schedule generation.
32699 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
32701         PR tree-optimization/64811
32702         * match.pd: When optimizing comparisons with Inf, avoid
32703         introducing or losing exceptions from comparisons with NaN.
32705 2018-01-09  Martin Liska  <mliska@suse.cz>
32707         PR sanitizer/82517
32708         * asan.c (shadow_mem_size): Add gcc_assert.
32710 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
32712         Don't save registers in main().
32714         PR target/83738
32715         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
32716         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
32717         * config/avr/avr.c (avr_set_current_function): Don't error if
32718         naked, OS_task or OS_main are specified at the same time.
32719         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
32720         OS_main.
32721         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
32722         attribute.
32723         * common/config/avr/avr-common.c (avr_option_optimization_table):
32724         Switch on -mmain-is-OS_task for optimizing compilations.
32726 2018-01-09  Richard Biener  <rguenther@suse.de>
32728         PR tree-optimization/83572
32729         * graphite.c: Include cfganal.h.
32730         (graphite_transform_loops): Connect infinite loops to exit
32731         and remove fake edges at the end.
32733 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
32735         * ipa-inline.c (edge_badness): Revert accidental checkin.
32737 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
32739         PR ipa/80763
32740         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
32741         symbols; not inline clones.
32743 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
32745         PR target/83507
32746         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
32747         hard registers.  Formatting fixes.
32749         PR preprocessor/83722
32750         * gcc.c (try_generate_repro): Pass
32751         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
32752         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
32753         do_report_bug.
32755 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
32756             Kito Cheng  <kito.cheng@gmail.com>
32758         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
32759         (riscv_leaf_function_p): Delete.
32760         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
32762 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
32764         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
32765         function.
32766         (do_ifelse): New function.
32767         (do_isel): New function.
32768         (do_sub3): New function.
32769         (do_add3): New function.
32770         (do_load_mask_compare): New function.
32771         (do_overlap_load_compare): New function.
32772         (expand_compare_loop): New function.
32773         (expand_block_compare): Call expand_compare_loop() when appropriate.
32774         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
32775         option description.
32776         (-mblock-compare-inline-loop-limit): New option.
32778 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
32780         PR target/83677
32781         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
32782         Reverse order of second and third operands in first alternative.
32783         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
32784         of first and second elements in UNSPEC_VPERMR vector.
32785         (altivec_expand_vec_perm_le): Likewise.
32787 2018-01-08  Jeff Law  <law@redhat.com>
32789         PR rtl-optimizatin/81308
32790         * tree-switch-conversion.c (cfg_altered): New file scoped static.
32791         (process_switch): If group_case_labels makes a change, then set
32792         cfg_altered.
32793         (pass_convert_switch::execute): If a switch is converted, then
32794         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
32796         PR rtl-optimization/81308
32797         * recog.c (split_all_insns): Conditionally cleanup the CFG after
32798         splitting insns.
32800 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
32802         PR target/83663 - Revert r255946
32803         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
32804         generation for cases where splatting a value is not useful.
32805         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
32806         across a vec_duplicate and a paradoxical subreg forming a vector
32807         mode to a vec_concat.
32809 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
32811         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
32812         -march=armv8.3-a variants.
32813         * config/arm/t-multilib: Likewise.
32814         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
32816 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
32818         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
32819         to generate rtl.
32820         (cceq_ior_compare_complement): Give it a name so I can use it, and
32821         change boolean_or_operator predicate to boolean_operator so it can
32822         be used to generate a crand.
32823         (eqne): New code iterator.
32824         (bd/bd_neg): New code_attrs.
32825         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
32826         a single define_insn.
32827         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
32828         decrement (bdnzt/bdnzf/bdzt/bdzf).
32829         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
32830         with the new names of the branch decrement patterns, and added the
32831         names of the branch decrement conditional patterns.
32833 2018-01-08  Richard Biener  <rguenther@suse.de>
32835         PR tree-optimization/83563
32836         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
32837         cache.
32839 2018-01-08  Richard Biener  <rguenther@suse.de>
32841         PR middle-end/83713
32842         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
32844 2018-01-08  Richard Biener  <rguenther@suse.de>
32846         PR tree-optimization/83685
32847         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
32848         references to abnormals.
32850 2018-01-08  Richard Biener  <rguenther@suse.de>
32852         PR lto/83719
32853         * dwarf2out.c (output_indirect_strings): Handle empty
32854         skeleton_debug_str_hash.
32855         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
32857 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
32859         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
32860         (emit_store_direct): Likewise.
32861         (arc_trampoline_adjust_address): Likewise.
32862         (arc_asm_trampoline_template): New function.
32863         (arc_initialize_trampoline): Use asm_trampoline_template.
32864         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
32865         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
32866         * config/arc/arc.md (flush_icache): Delete pattern.
32868 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
32870         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
32871         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
32872         munaligned-access.
32874 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
32876         PR target/83681
32877         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
32878         by not USED_FOR_TARGET.
32879         (make_pass_resolve_sw_modes): Likewise.
32881 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
32883         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
32884         USED_FOR_TARGET.
32886 2018-01-08  Richard Biener  <rguenther@suse.de>
32888         PR middle-end/83580
32889         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
32891 2018-01-08  Richard Biener  <rguenther@suse.de>
32893         PR middle-end/83517
32894         * match.pd ((t * 2) / 2) -> t): Add missing :c.
32896 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
32898         PR middle-end/81897
32899         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
32900         basic blocks with a small number of successors.
32901         (convert_control_dep_chain_into_preds): Improve handling of
32902         forwarder blocks.
32903         (dump_predicates): Split apart into...
32904         (dump_pred_chain): ...here...
32905         (dump_pred_info): ...and here.
32906         (can_one_predicate_be_invalidated_p): Add debugging printfs.
32907         (can_chain_union_be_invalidated_p): Improve check for invalidation
32908         of paths.
32909         (uninit_uses_cannot_happen): Avoid unnecessary if
32910         convert_control_dep_chain_into_preds yielded nothing.
32912 2018-01-06  Martin Sebor  <msebor@redhat.com>
32914         PR tree-optimization/83640
32915         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
32916         subtracting negative offset from size.
32917         (builtin_access::overlap): Adjust offset bounds of the access to fall
32918         within the size of the object if possible.
32920 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
32922         PR rtl-optimization/83699
32923         * expmed.c (extract_bit_field_1): Restrict the vector usage of
32924         extract_bit_field_as_subreg to cases in which the extracted
32925         value is also a vector.
32927         * lra-constraints.c (process_alt_operands): Test for the equivalence
32928         substitutions when detecting a possible reload cycle.
32930 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
32932         PR debug/83480
32933         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
32934         by default if flag_selective_schedling{,2}.  Formatting fixes.
32936         PR rtl-optimization/83682
32937         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
32938         if it has non-VECTOR_MODE element mode.
32939         (vec_duplicate_p): Likewise.
32941         PR middle-end/83694
32942         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
32943         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
32945 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
32947         PR target/83604
32948         * config/i386/i386-builtin.def
32949         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
32950         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
32951         Require also OPTION_MASK_ISA_AVX512F in addition to
32952         OPTION_MASK_ISA_GFNI.
32953         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
32954         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
32955         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
32956         to OPTION_MASK_ISA_GFNI.
32957         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
32958         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
32959         OPTION_MASK_ISA_AVX512BW.
32960         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
32961         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
32962         addition to OPTION_MASK_ISA_GFNI.
32963         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
32964         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
32965         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
32966         to OPTION_MASK_ISA_GFNI.
32967         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
32968         a requirement for all ISAs rather than any of them with a few
32969         exceptions.
32970         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
32971         processing.
32972         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
32973         bitmasks to be enabled with 3 exceptions, instead of requiring any
32974         enabled ISA with lots of exceptions.
32975         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
32976         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
32977         Change avx512bw in isa attribute to avx512f.
32978         * config/i386/sgxintrin.h: Add license boilerplate.
32979         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
32980         to __AVX512F__ and __AVX512VL to __AVX512VL__.
32981         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
32982         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
32983         defined.
32984         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
32985         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
32986         temporarily sse2 rather than sse if not enabled already.
32988         PR target/83604
32989         * config/i386/sse.md (VI248_VLBW): Rename to ...
32990         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
32991         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
32992         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
32993         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
32994         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
32995         mode iterator instead of VI248_VLBW.
32997 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
32999         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
33000         (record_modified): Skip clobbers; add debug output.
33001         (param_change_prob): Use sreal frequencies.
33003 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
33005         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
33006         punt for user-aligned variables.
33008 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
33010         * tree-chrec.c (chrec_contains_symbols): Return true for
33011         POLY_INT_CST.
33013 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
33015         PR target/82439
33016         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
33017         of (x|y) == x for BICS pattern.
33019 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
33021         PR tree-optimization/83605
33022         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
33023         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
33024         can throw.
33026 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
33028         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
33029         * config/epiphany/rtems.h: New file.
33031 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
33032             Uros Bizjak  <ubizjak@gmail.com>
33034         PR target/83554
33035         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
33036         QIreg_operand instead of register_operand predicate.
33037         * config/i386/i386.c (ix86_rop_should_change_byte_p,
33038         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
33039         comments instead of -fmitigate[-_]rop.
33041 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
33043         PR bootstrap/81926
33044         * cgraphunit.c (symbol_table::compile): Switch to text_section
33045         before calling assembly_start debug hook.
33046         * run-rtl-passes.c (run_rtl_passes): Likewise.
33047         Include output.h.
33049 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
33051         * tree-vrp.c (extract_range_from_binary_expr_1): Check
33052         range_int_cst_p rather than !symbolic_range_p before calling
33053         extract_range_from_multiplicative_op_1.
33055 2018-01-04  Jeff Law  <law@redhat.com>
33057         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
33058         redundant test in assertion.
33060 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
33062         * doc/rtl.texi: Document machine_mode wrapper classes.
33064 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
33066         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
33067         using tree_to_uhwi.
33069 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
33071         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
33072         the VEC_PERM_EXPR fold to fail.
33074 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
33076         PR debug/83585
33077         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
33078         to switched_sections.
33080 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
33082         PR target/83680
33083         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
33084         test for d.testing.
33086 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
33088         PR target/83387
33089         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
33090         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
33092 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
33094         PR debug/83666
33095         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
33096         is BLKmode and bitpos not zero or mode change is needed.
33098 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
33100         PR target/83675
33101         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
33102         TARGET_VIS2.
33104 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
33106         PR target/83628
33107         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
33108         instead of MULT rtx.  Update all corresponding splitters.
33109         (*saddl_se): Ditto.
33110         (*ssub<modesuffix>): Ditto.
33111         (*ssubl_se): Ditto.
33112         (*cmp_sadd_di): Update split patterns.
33113         (*cmp_sadd_si): Ditto.
33114         (*cmp_sadd_sidi): Ditto.
33115         (*cmp_ssub_di): Ditto.
33116         (*cmp_ssub_si): Ditto.
33117         (*cmp_ssub_sidi): Ditto.
33118         * config/alpha/predicates.md (const23_operand): New predicate.
33119         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
33120         Look for ASHIFT, not MULT inner operand.
33121         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
33123 2018-01-04  Martin Liska  <mliska@suse.cz>
33125         PR gcov-profile/83669
33126         * gcov.c (output_intermediate_file): Add version to intermediate
33127         gcov file.
33128         * doc/gcov.texi: Document new field 'version' in intermediate
33129         file format. Fix location of '-k' option of gcov command.
33131 2018-01-04  Martin Liska  <mliska@suse.cz>
33133         PR ipa/82352
33134         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
33136 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
33138         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
33140 2018-01-03  Martin Sebor  <msebor@redhat.com>
33142         PR tree-optimization/83655
33143         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
33144         checking calls with invalid arguments.
33146 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33148         * tree-vect-stmts.c (vect_get_store_rhs): New function.
33149         (vectorizable_mask_load_store): Delete.
33150         (vectorizable_call): Return false for masked loads and stores.
33151         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
33152         instead of gimple_assign_rhs1.
33153         (vectorizable_load): Handle IFN_MASK_LOAD.
33154         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
33156 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33158         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
33159         split out from..,
33160         (vectorizable_mask_load_store): ...here.
33161         (vectorizable_load): ...and here.
33163 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33165         * tree-vect-stmts.c (vect_build_all_ones_mask)
33166         (vect_build_zero_merge_argument): New functions, split out from...
33167         (vectorizable_load): ...here.
33169 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33171         * tree-vect-stmts.c (vect_check_store_rhs): New function,
33172         split out from...
33173         (vectorizable_mask_load_store): ...here.
33174         (vectorizable_store): ...and here.
33176 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33178         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
33179         split out from...
33180         (vectorizable_mask_load_store): ...here.
33182 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33184         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
33185         (vect_model_store_cost): Take a vec_load_store_type instead of a
33186         vect_def_type.
33187         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
33188         (vect_model_store_cost): Take a vec_load_store_type instead of a
33189         vect_def_type.
33190         (vectorizable_mask_load_store): Update accordingly.
33191         (vectorizable_store): Likewise.
33192         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
33194 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33196         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
33197         IFN_MASK_LOAD calls here rather than...
33198         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
33200 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33201             Alan Hayward  <alan.hayward@arm.com>
33202             David Sherwood  <david.sherwood@arm.com>
33204         * expmed.c (extract_bit_field_1): For vector extracts,
33205         fall back to extract_bit_field_as_subreg if vec_extract
33206         isn't available.
33208 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33209             Alan Hayward  <alan.hayward@arm.com>
33210             David Sherwood  <david.sherwood@arm.com>
33212         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
33213         they are variable or constant sized.
33214         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
33215         slots for constant-sized data.
33217 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33218             Alan Hayward  <alan.hayward@arm.com>
33219             David Sherwood  <david.sherwood@arm.com>
33221         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
33222         handling COND_EXPRs with boolean comparisons, try to find a better
33223         basis for the mask type than the boolean itself.
33225 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33227         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
33228         is calculated and how it can be overridden.
33229         * genmodes.c (max_bitsize_mode_any_mode): New variable.
33230         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
33231         if defined.
33232         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
33233         if nonzero.
33235 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33236             Alan Hayward  <alan.hayward@arm.com>
33237             David Sherwood  <david.sherwood@arm.com>
33239         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
33240         Remove the mode argument.
33241         (aarch64_simd_valid_immediate): Remove the mode and inverse
33242         arguments.
33243         * config/aarch64/iterators.md (bitsize): New iterator.
33244         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
33245         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
33246         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
33247         aarch64_simd_valid_immediate.
33248         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
33249         (aarch64_reg_or_bic_imm): Likewise.
33250         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
33251         with an insn_type enum and msl with a modifier_type enum.
33252         Replace element_width with a scalar_mode.  Change the shift
33253         to unsigned int.  Add constructors for scalar_float_mode and
33254         scalar_int_mode elements.
33255         (aarch64_vect_float_const_representable_p): Delete.
33256         (aarch64_can_const_movi_rtx_p)
33257         (aarch64_simd_scalar_immediate_valid_for_move)
33258         (aarch64_simd_make_constant): Update call to
33259         aarch64_simd_valid_immediate.
33260         (aarch64_advsimd_valid_immediate_hs): New function.
33261         (aarch64_advsimd_valid_immediate): Likewise.
33262         (aarch64_simd_valid_immediate): Remove mode and inverse
33263         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
33264         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
33265         and aarch64_float_const_representable_p on the result.
33266         (aarch64_output_simd_mov_immediate): Remove mode argument.
33267         Update call to aarch64_simd_valid_immediate and use of
33268         simd_immediate_info.
33269         (aarch64_output_scalar_simd_mov_immediate): Update call
33270         accordingly.
33272 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33273             Alan Hayward  <alan.hayward@arm.com>
33274             David Sherwood  <david.sherwood@arm.com>
33276         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
33277         (mode_nunits): Likewise CONST_MODE_NUNITS.
33278         * machmode.def (ADJUST_NUNITS): Document.
33279         * genmodes.c (mode_data::need_nunits_adj): New field.
33280         (blank_mode): Update accordingly.
33281         (adj_nunits): New variable.
33282         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
33283         parameter.
33284         (emit_mode_size_inline): Set need_bytesize_adj for all modes
33285         listed in adj_nunits.
33286         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
33287         listed in adj_nunits.  Don't emit case statements for such modes.
33288         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
33289         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
33290         nothing if adj_nunits is nonnull.
33291         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
33292         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
33293         (emit_mode_fbit): Update use of print_maybe_const_decl.
33294         (emit_move_size): Likewise.  Treat the array as non-const
33295         if adj_nunits.
33296         (emit_mode_adjustments): Handle adj_nunits.
33298 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33300         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
33301         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
33302         (VECTOR_MODES): Use it.
33303         (make_vector_modes): Take the prefix as an argument.
33305 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33306             Alan Hayward  <alan.hayward@arm.com>
33307             David Sherwood  <david.sherwood@arm.com>
33309         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
33310         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
33311         for MODE_VECTOR_BOOL.
33312         * machmode.def (VECTOR_BOOL_MODE): Document.
33313         * genmodes.c (VECTOR_BOOL_MODE): New macro.
33314         (make_vector_bool_mode): New function.
33315         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
33316         MODE_VECTOR_BOOL.
33317         * lto-streamer-in.c (lto_input_mode_table): Likewise.
33318         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
33319         Likewise.
33320         * stor-layout.c (int_mode_for_mode): Likewise.
33321         * tree.c (build_vector_type_for_mode): Likewise.
33322         * varasm.c (output_constant_pool_2): Likewise.
33323         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
33324         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
33325         for MODE_VECTOR_BOOL.
33326         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
33327         of mode class checks.
33328         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
33329         instead of a list of mode class checks.
33330         (expand_vector_scalar_condition): Likewise.
33331         (type_for_widest_vector_mode): Handle BImode as an inner mode.
33333 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33334             Alan Hayward  <alan.hayward@arm.com>
33335             David Sherwood  <david.sherwood@arm.com>
33337         * machmode.h (mode_size): Change from unsigned short to
33338         poly_uint16_pod.
33339         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
33340         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
33341         or if measurement_type is not polynomial.
33342         (fixed_size_mode::includes_p): Check for constant-sized modes.
33343         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
33344         return a poly_uint16 rather than an unsigned short.
33345         (emit_mode_size): Change the type of mode_size from unsigned short
33346         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
33347         (emit_mode_adjustments): Cope with polynomial vector sizes.
33348         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
33349         for GET_MODE_SIZE.
33350         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
33351         for GET_MODE_SIZE.
33352         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
33353         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
33354         * caller-save.c (setup_save_areas): Likewise.
33355         (replace_reg_with_saved_mem): Likewise.
33356         * calls.c (emit_library_call_value_1): Likewise.
33357         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
33358         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
33359         (gen_lowpart_for_combine): Likewise.
33360         * convert.c (convert_to_integer_1): Likewise.
33361         * cse.c (equiv_constant, cse_insn): Likewise.
33362         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
33363         (cselib_subst_to_values): Likewise.
33364         * dce.c (word_dce_process_block): Likewise.
33365         * df-problems.c (df_word_lr_mark_ref): Likewise.
33366         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
33367         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
33368         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
33369         (rtl_for_decl_location): Likewise.
33370         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
33371         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
33372         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
33373         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
33374         (expand_expr_real_1): Likewise.
33375         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
33376         (pad_below): Likewise.
33377         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
33378         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
33379         * ira.c (get_subreg_tracking_sizes): Likewise.
33380         * ira-build.c (ira_create_allocno_objects): Likewise.
33381         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
33382         (ira_sort_regnos_for_alter_reg): Likewise.
33383         * ira-costs.c (record_operand_costs): Likewise.
33384         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
33385         (resolve_simple_move): Likewise.
33386         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
33387         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
33388         (lra_constraints): Likewise.
33389         (CONST_POOL_OK_P): Reject variable-sized modes.
33390         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
33391         (add_pseudo_to_slot, lra_spill): Likewise.
33392         * omp-low.c (omp_clause_aligned_alignment): Likewise.
33393         * optabs-query.c (get_best_extraction_insn): Likewise.
33394         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
33395         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
33396         (expand_mult_highpart, valid_multiword_target_p): Likewise.
33397         * recog.c (offsettable_address_addr_space_p): Likewise.
33398         * regcprop.c (maybe_mode_change): Likewise.
33399         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
33400         * regrename.c (build_def_use): Likewise.
33401         * regstat.c (dump_reg_info): Likewise.
33402         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
33403         (find_reloads, find_reloads_subreg_address): Likewise.
33404         * reload1.c (eliminate_regs_1): Likewise.
33405         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
33406         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
33407         (simplify_binary_operation_1, simplify_subreg): Likewise.
33408         * targhooks.c (default_function_arg_padding): Likewise.
33409         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
33410         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
33411         (verify_gimple_assign_ternary): Likewise.
33412         * tree-inline.c (estimate_move_cost): Likewise.
33413         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
33414         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
33415         (get_address_cost_ainc): Likewise.
33416         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
33417         (vect_supportable_dr_alignment): Likewise.
33418         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
33419         (vectorizable_reduction): Likewise.
33420         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
33421         (vectorizable_operation, vectorizable_load): Likewise.
33422         * tree.c (build_same_sized_truth_vector_type): Likewise.
33423         * valtrack.c (cleanup_auto_inc_dec): Likewise.
33424         * var-tracking.c (emit_note_insn_var_location): Likewise.
33425         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
33426         (ADDR_VEC_ALIGN): Likewise.
33428 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33429             Alan Hayward  <alan.hayward@arm.com>
33430             David Sherwood  <david.sherwood@arm.com>
33432         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
33433         unsigned short.
33434         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
33435         or if measurement_type is polynomial.
33436         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
33437         * combine.c (make_extraction): Likewise.
33438         * dse.c (find_shift_sequence): Likewise.
33439         * dwarf2out.c (mem_loc_descriptor): Likewise.
33440         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
33441         (extract_bit_field, extract_low_bits): Likewise.
33442         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
33443         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
33444         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
33445         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
33446         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
33447         * reload.c (find_reloads): Likewise.
33448         * reload1.c (alter_reg): Likewise.
33449         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
33450         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
33451         * tree-if-conv.c (predicate_mem_writes): Likewise.
33452         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
33453         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
33454         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
33455         * valtrack.c (dead_debug_insert_temp): Likewise.
33456         * varasm.c (mergeable_constant_section): Likewise.
33457         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
33459 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33460             Alan Hayward  <alan.hayward@arm.com>
33461             David Sherwood  <david.sherwood@arm.com>
33463         * expr.c (expand_assignment): Cope with polynomial mode sizes
33464         when assigning to a CONCAT.
33466 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33467             Alan Hayward  <alan.hayward@arm.com>
33468             David Sherwood  <david.sherwood@arm.com>
33470         * machmode.h (mode_precision): Change from unsigned short to
33471         poly_uint16_pod.
33472         (mode_to_precision): Return a poly_uint16 rather than an unsigned
33473         short.
33474         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
33475         or if measurement_type is not polynomial.
33476         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
33477         in which the mode is already known to be a scalar_int_mode.
33478         * genmodes.c (emit_mode_precision): Change the type of mode_precision
33479         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
33480         initializer.
33481         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
33482         for GET_MODE_PRECISION.
33483         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
33484         for GET_MODE_PRECISION.
33485         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
33486         as polynomial.
33487         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
33488         (expand_field_assignment, make_extraction): Likewise.
33489         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
33490         (get_last_value): Likewise.
33491         * convert.c (convert_to_integer_1): Likewise.
33492         * cse.c (cse_insn): Likewise.
33493         * expr.c (expand_expr_real_1): Likewise.
33494         * lra-constraints.c (simplify_operand_subreg): Likewise.
33495         * optabs-query.c (can_atomic_load_p): Likewise.
33496         * optabs.c (expand_atomic_load): Likewise.
33497         (expand_atomic_store): Likewise.
33498         * ree.c (combine_reaching_defs): Likewise.
33499         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
33500         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
33501         * tree.h (type_has_mode_precision_p): Likewise.
33502         * ubsan.c (instrument_si_overflow): Likewise.
33504 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33505             Alan Hayward  <alan.hayward@arm.com>
33506             David Sherwood  <david.sherwood@arm.com>
33508         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
33509         polynomial numbers of units.
33510         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
33511         (valid_vector_subparts_p): New function.
33512         (build_vector_type): Remove temporary shim and take the number
33513         of units as a poly_uint64 rather than an int.
33514         (build_opaque_vector_type): Take the number of units as a
33515         poly_uint64 rather than an int.
33516         * tree.c (build_vector_from_ctor): Handle polynomial
33517         TYPE_VECTOR_SUBPARTS.
33518         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
33519         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
33520         (build_vector_from_val): If the number of units is variable,
33521         use build_vec_duplicate_cst for constant operands and
33522         VEC_DUPLICATE_EXPR otherwise.
33523         (make_vector_type): Remove temporary is_constant ().
33524         (build_vector_type, build_opaque_vector_type): Take the number of
33525         units as a poly_uint64 rather than an int.
33526         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
33527         VECTOR_CST_NELTS.
33528         * cfgexpand.c (expand_debug_expr): Likewise.
33529         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
33530         (store_constructor, expand_expr_real_1): Likewise.
33531         (const_scalar_mask_from_tree): Likewise.
33532         * fold-const-call.c (fold_const_reduction): Likewise.
33533         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
33534         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
33535         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
33536         (fold_relational_const): Likewise.
33537         (native_interpret_vector): Likewise.  Change the size from an
33538         int to an unsigned int.
33539         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
33540         TYPE_VECTOR_SUBPARTS.
33541         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
33542         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
33543         duplicating a non-constant operand into a variable-length vector.
33544         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
33545         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
33546         * ipa-icf.c (sem_variable::equals): Likewise.
33547         * match.pd: Likewise.
33548         * omp-simd-clone.c (simd_clone_subparts): Likewise.
33549         * print-tree.c (print_node): Likewise.
33550         * stor-layout.c (layout_type): Likewise.
33551         * targhooks.c (default_builtin_vectorization_cost): Likewise.
33552         * tree-cfg.c (verify_gimple_comparison): Likewise.
33553         (verify_gimple_assign_binary): Likewise.
33554         (verify_gimple_assign_ternary): Likewise.
33555         (verify_gimple_assign_single): Likewise.
33556         * tree-pretty-print.c (dump_generic_node): Likewise.
33557         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
33558         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
33559         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
33560         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
33561         (vect_shift_permute_load_chain): Likewise.
33562         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
33563         (expand_vector_condition, optimize_vector_constructor): Likewise.
33564         (lower_vec_perm, get_compute_type): Likewise.
33565         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
33566         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
33567         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
33568         (vect_recog_mask_conversion_pattern): Likewise.
33569         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
33570         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
33571         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
33572         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
33573         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
33574         (vectorizable_shift, vectorizable_operation, vectorizable_store)
33575         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
33576         (supportable_widening_operation): Likewise.
33577         (supportable_narrowing_operation): Likewise.
33578         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
33579         Likewise.
33580         * varasm.c (output_constant): Likewise.
33582 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33583             Alan Hayward  <alan.hayward@arm.com>
33584             David Sherwood  <david.sherwood@arm.com>
33586         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
33587         so that both the length == 3 and length != 3 cases set up their
33588         own permute vectors.  Add comments explaining why we know the
33589         number of elements is constant.
33590         (vect_permute_load_chain): Likewise.
33592 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33593             Alan Hayward  <alan.hayward@arm.com>
33594             David Sherwood  <david.sherwood@arm.com>
33596         * machmode.h (mode_nunits): Change from unsigned char to
33597         poly_uint16_pod.
33598         (ONLY_FIXED_SIZE_MODES): New macro.
33599         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
33600         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
33601         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
33602         New typedefs.
33603         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
33604         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
33605         or if measurement_type is not polynomial.
33606         * genmodes.c (ZERO_COEFFS): New macro.
33607         (emit_mode_nunits_inline): Make mode_nunits_inline return a
33608         poly_uint16.
33609         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
33610         Use ZERO_COEFFS when emitting initializers.
33611         * data-streamer.h (bp_pack_poly_value): New function.
33612         (bp_unpack_poly_value): Likewise.
33613         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
33614         for GET_MODE_NUNITS.
33615         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
33616         for GET_MODE_NUNITS.
33617         * tree.c (make_vector_type): Remove temporary shim and make
33618         the real function take the number of units as a poly_uint64
33619         rather than an int.
33620         (build_vector_type_for_mode): Handle polynomial nunits.
33621         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
33622         * emit-rtl.c (const_vec_series_p_1): Likewise.
33623         (gen_rtx_CONST_VECTOR): Likewise.
33624         * fold-const.c (test_vec_duplicate_folding): Likewise.
33625         * genrecog.c (validate_pattern): Likewise.
33626         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
33627         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
33628         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
33629         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
33630         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
33631         * rtlanal.c (subreg_get_info): Likewise.
33632         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
33633         (vect_grouped_load_supported): Likewise.
33634         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
33635         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
33636         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
33637         (simplify_const_unary_operation, simplify_binary_operation_1)
33638         (simplify_const_binary_operation, simplify_ternary_operation)
33639         (test_vector_ops_duplicate, test_vector_ops): Likewise.
33640         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
33641         instead of CONST_VECTOR_NUNITS.
33642         * varasm.c (output_constant_pool_2): Likewise.
33643         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
33644         explicit-encoded elements in the XVEC for variable-length vectors.
33646 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33648         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
33650 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33651             Alan Hayward  <alan.hayward@arm.com>
33652             David Sherwood  <david.sherwood@arm.com>
33654         * coretypes.h (fixed_size_mode): Declare.
33655         (fixed_size_mode_pod): New typedef.
33656         * builtins.h (target_builtins::x_apply_args_mode)
33657         (target_builtins::x_apply_result_mode): Change type to
33658         fixed_size_mode_pod.
33659         * builtins.c (apply_args_size, apply_result_size, result_vector)
33660         (expand_builtin_apply_args_1, expand_builtin_apply)
33661         (expand_builtin_return): Update accordingly.
33663 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33665         * cse.c (hash_rtx_cb): Hash only the encoded elements.
33666         * cselib.c (cselib_hash_rtx): Likewise.
33667         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
33668         CONST_VECTOR encoding.
33670 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
33671             Jeff Law  <law@redhat.com>
33673         PR target/83641
33674         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
33675         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
33676         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
33677         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
33679         PR target/83641
33680         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
33681         explicitly probe *sp in a noreturn function if there were any callee
33682         register saves or frame pointer is needed.
33684 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
33686         PR debug/83621
33687         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
33688         BLKmode for ternary, binary or unary expressions.
33690         PR debug/83645
33691         * var-tracking.c (delete_vta_debug_insn): New inline function.
33692         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
33693         insns from get_insns () to NULL instead of each bb separately.
33694         Use delete_vta_debug_insn.  No longer static.
33695         (vt_debug_insns_local, variable_tracking_main_1): Adjust
33696         delete_vta_debug_insns callers.
33697         * rtl.h (delete_vta_debug_insns): Declare.
33698         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
33699         instead of variable_tracking_main.
33701 2018-01-03  Martin Sebor  <msebor@redhat.com>
33703         PR tree-optimization/83603
33704         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
33705         arguments past the endof the argument list in functions declared
33706         without a prototype.
33707         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
33708         Avoid checking when arguments are null.
33710 2018-01-03  Martin Sebor  <msebor@redhat.com>
33712         PR c/83559
33713         * doc/extend.texi (attribute const): Fix a typo.
33714         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
33715         issuing -Wsuggest-attribute for void functions.
33717 2018-01-03  Martin Sebor  <msebor@redhat.com>
33719         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
33720         offset_int::from instead of wide_int::to_shwi.
33721         (maybe_diag_overlap): Remove assertion.
33722         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
33723         * gimple-ssa-sprintf.c (format_directive): Same.
33724         (parse_directive): Same.
33725         (sprintf_dom_walker::compute_format_length): Same.
33726         (try_substitute_return_value): Same.
33728 2018-01-03  Jeff Law  <law@redhat.com>
33730         PR middle-end/83654
33731         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
33732         non-constant residual for zero at runtime and avoid probing in
33733         that case.  Reorganize code for trailing problem to mirror handling
33734         of the residual.
33736 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
33738         PR tree-optimization/83501
33739         * tree-ssa-strlen.c (get_string_cst): New.
33740         (handle_char_store): Call get_string_cst.
33742 2018-01-03  Martin Liska  <mliska@suse.cz>
33744         PR tree-optimization/83593
33745         * tree-ssa-strlen.c: Include tree-cfg.h.
33746         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
33747         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
33748         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
33749         to false.
33750         (strlen_dom_walker::before_dom_children): Call
33751         gimple_purge_dead_eh_edges. Dump tranformation with details
33752         dump flags.
33753         (strlen_dom_walker::before_dom_children): Update call by adding
33754         new argument cleanup_eh.
33755         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
33757 2018-01-03  Martin Liska  <mliska@suse.cz>
33759         PR ipa/83549
33760         * cif-code.def (VARIADIC_THUNK): New enum value.
33761         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
33762         thunks.
33764 2018-01-03  Jan Beulich  <jbeulich@suse.com>
33766         * sse.md (mov<mode>_internal): Tighten condition for when to use
33767         vmovdqu<ssescalarsize> for TI and OI modes.
33769 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
33771         Update copyright years.
33773 2018-01-03  Martin Liska  <mliska@suse.cz>
33775         PR ipa/83594
33776         * ipa-visibility.c (function_and_variable_visibility): Skip
33777         functions with noipa attribure.
33779 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
33781         * gcc.c (process_command): Update copyright notice dates.
33782         * gcov-dump.c (print_version): Ditto.
33783         * gcov.c (print_version): Ditto.
33784         * gcov-tool.c (print_version): Ditto.
33785         * gengtype.c (create_file): Ditto.
33786         * doc/cpp.texi: Bump @copying's copyright year.
33787         * doc/cppinternals.texi: Ditto.
33788         * doc/gcc.texi: Ditto.
33789         * doc/gccint.texi: Ditto.
33790         * doc/gcov.texi: Ditto.
33791         * doc/install.texi: Ditto.
33792         * doc/invoke.texi: Ditto.
33794 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33796         * vector-builder.h (vector_builder::m_full_nelts): Change from
33797         unsigned int to poly_uint64.
33798         (vector_builder::full_nelts): Update prototype accordingly.
33799         (vector_builder::new_vector): Likewise.
33800         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
33801         (vector_builder::operator ==): Likewise.
33802         (vector_builder::finalize): Likewise.
33803         * int-vector-builder.h (int_vector_builder::int_vector_builder):
33804         Take the number of elements as a poly_uint64 rather than an
33805         unsigned int.
33806         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
33807         from unsigned int to poly_uint64.
33808         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
33809         (vec_perm_indices::new_vector): Likewise.
33810         (vec_perm_indices::length): Likewise.
33811         (vec_perm_indices::nelts_per_input): Likewise.
33812         (vec_perm_indices::input_nelts): Likewise.
33813         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
33814         number of elements per input as a poly_uint64 rather than an
33815         unsigned int.  Use the original encoding for variable-length
33816         vectors, rather than clamping each individual element.
33817         For the second and subsequent elements in each pattern,
33818         clamp the step and base before clamping their sum.
33819         (vec_perm_indices::series_p): Handle polynomial element counts.
33820         (vec_perm_indices::all_in_range_p): Likewise.
33821         (vec_perm_indices_to_tree): Likewise.
33822         (vec_perm_indices_to_rtx): Likewise.
33823         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
33824         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
33825         (tree_vector_builder::new_binary_operation): Handle polynomial
33826         element counts.  Return false if we need to know the number
33827         of elements at compile time.
33828         * fold-const.c (fold_vec_perm): Punt if the number of elements
33829         isn't known at compile time.
33831 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33833         * vec-perm-indices.h (vec_perm_builder): Change element type
33834         from HOST_WIDE_INT to poly_int64.
33835         (vec_perm_indices::element_type): Update accordingly.
33836         (vec_perm_indices::clamp): Handle polynomial element_types.
33837         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
33838         (vec_perm_indices::all_in_range_p): Likewise.
33839         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
33840         than shwi trees.
33841         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
33842         polynomial vec_perm_indices element types.
33843         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
33844         * fold-const.c (fold_vec_perm): Likewise.
33845         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
33846         * tree-vect-generic.c (lower_vec_perm): Likewise.
33847         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
33848         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
33849         element type to HOST_WIDE_INT.
33851 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33852             Alan Hayward  <alan.hayward@arm.com>
33853             David Sherwood  <david.sherwood@arm.com>
33855         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
33856         rather than an int.  Use plus_constant.
33857         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
33858         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
33860 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33861             Alan Hayward  <alan.hayward@arm.com>
33862             David Sherwood  <david.sherwood@arm.com>
33864         * calls.c (emit_call_1, expand_call): Change struct_value_size from
33865         a HOST_WIDE_INT to a poly_int64.
33867 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33868             Alan Hayward  <alan.hayward@arm.com>
33869             David Sherwood  <david.sherwood@arm.com>
33871         * calls.c (load_register_parameters): Cope with polynomial
33872         mode sizes.  Require a constant size for BLKmode parameters
33873         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
33874         forces a parameter to be padded at the lsb end in order to
33875         fill a complete number of words, require the parameter size
33876         to be ordered wrt UNITS_PER_WORD.
33878 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33879             Alan Hayward  <alan.hayward@arm.com>
33880             David Sherwood  <david.sherwood@arm.com>
33882         * reload1.c (spill_stack_slot_width): Change element type
33883         from unsigned int to poly_uint64_pod.
33884         (alter_reg): Treat mode sizes as polynomial.
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         * reload.c (complex_word_subreg_p): New function.
33891         (reload_inner_reg_of_subreg, push_reload): Use it.
33893 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33894             Alan Hayward  <alan.hayward@arm.com>
33895             David Sherwood  <david.sherwood@arm.com>
33897         * lra-constraints.c (process_alt_operands): Reject matched
33898         operands whose sizes aren't ordered.
33899         (match_reload): Refer to this check here.
33901 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33902             Alan Hayward  <alan.hayward@arm.com>
33903             David Sherwood  <david.sherwood@arm.com>
33905         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
33906         that the mode size is in the set {1, 2, 4, 8, 16}.
33908 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33909             Alan Hayward  <alan.hayward@arm.com>
33910             David Sherwood  <david.sherwood@arm.com>
33912         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
33913         Use plus_constant instead of gen_rtx_PLUS.
33915 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33916             Alan Hayward  <alan.hayward@arm.com>
33917             David Sherwood  <david.sherwood@arm.com>
33919         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
33920         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
33921         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
33922         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
33923         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
33924         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
33925         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
33926         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
33927         * config/i386/i386.c (ix86_push_rounding): ...this new function.
33928         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
33929         a poly_int64.
33930         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
33931         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
33932         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
33933         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
33934         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
33935         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
33936         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
33937         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
33938         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
33939         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
33940         function.
33941         * expr.c (emit_move_resolve_push): Treat the input and result
33942         of PUSH_ROUNDING as a poly_int64.
33943         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
33944         (emit_push_insn): Likewise.
33945         * lra-eliminations.c (mark_not_eliminable): Likewise.
33946         * recog.c (push_operand): Likewise.
33947         * reload1.c (elimination_effects): Likewise.
33948         * rtlanal.c (nonzero_bits1): Likewise.
33949         * calls.c (store_one_arg): Likewise.  Require the padding to be
33950         known at compile time.
33952 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33953             Alan Hayward  <alan.hayward@arm.com>
33954             David Sherwood  <david.sherwood@arm.com>
33956         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
33957         Use plus_constant instead of gen_rtx_PLUS.
33959 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33960             Alan Hayward  <alan.hayward@arm.com>
33961             David Sherwood  <david.sherwood@arm.com>
33963         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
33964         rather than an int.
33966 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33967             Alan Hayward  <alan.hayward@arm.com>
33968             David Sherwood  <david.sherwood@arm.com>
33970         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
33971         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
33972         via stack temporaries.  Treat the mode size as polynomial too.
33974 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33975             Alan Hayward  <alan.hayward@arm.com>
33976             David Sherwood  <david.sherwood@arm.com>
33978         * expr.c (expand_expr_real_2): When handling conversions involving
33979         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
33980         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
33981         as a poly_uint64 too.
33983 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33984             Alan Hayward  <alan.hayward@arm.com>
33985             David Sherwood  <david.sherwood@arm.com>
33987         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
33989 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33990             Alan Hayward  <alan.hayward@arm.com>
33991             David Sherwood  <david.sherwood@arm.com>
33993         * combine.c (can_change_dest_mode): Handle polynomial
33994         REGMODE_NATURAL_SIZE.
33995         * expmed.c (store_bit_field_1): Likewise.
33996         * expr.c (store_constructor): Likewise.
33997         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
33998         and polynomial REGMODE_NATURAL_SIZE.
33999         (gen_lowpart_common): Likewise.
34000         * reginfo.c (record_subregs_of_mode): Likewise.
34001         * rtlanal.c (read_modify_subreg_p): Likewise.
34003 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34004             Alan Hayward  <alan.hayward@arm.com>
34005             David Sherwood  <david.sherwood@arm.com>
34007         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
34008         numbers of elements.
34010 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34011             Alan Hayward  <alan.hayward@arm.com>
34012             David Sherwood  <david.sherwood@arm.com>
34014         * match.pd: Cope with polynomial numbers of vector elements.
34016 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34017             Alan Hayward  <alan.hayward@arm.com>
34018             David Sherwood  <david.sherwood@arm.com>
34020         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
34021         in a POINTER_PLUS_EXPR.
34023 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34024             Alan Hayward  <alan.hayward@arm.com>
34025             David Sherwood  <david.sherwood@arm.com>
34027         * omp-simd-clone.c (simd_clone_subparts): New function.
34028         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
34029         (ipa_simd_modify_function_body): Likewise.
34031 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34032             Alan Hayward  <alan.hayward@arm.com>
34033             David Sherwood  <david.sherwood@arm.com>
34035         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
34036         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
34037         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
34038         (expand_vector_condition, vector_element): Likewise.
34039         (subparts_gt): New function.
34040         (get_compute_type): Use subparts_gt.
34041         (count_type_subparts): Delete.
34042         (expand_vector_operations_1): Use subparts_gt instead of
34043         count_type_subparts.
34045 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34046             Alan Hayward  <alan.hayward@arm.com>
34047             David Sherwood  <david.sherwood@arm.com>
34049         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
34050         (vect_compile_time_alias): ...this new function.  Do the calculation
34051         on poly_ints rather than trees.
34052         (vect_prune_runtime_alias_test_list): Update call accordingly.
34054 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34055             Alan Hayward  <alan.hayward@arm.com>
34056             David Sherwood  <david.sherwood@arm.com>
34058         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
34059         numbers of units.
34060         (vect_schedule_slp_instance): Likewise.
34062 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34063             Alan Hayward  <alan.hayward@arm.com>
34064             David Sherwood  <david.sherwood@arm.com>
34066         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
34067         constant and extern definitions for variable-length vectors.
34068         (vect_get_constant_vectors): Note that the number of units
34069         is known to be constant.
34071 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34072             Alan Hayward  <alan.hayward@arm.com>
34073             David Sherwood  <david.sherwood@arm.com>
34075         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
34076         of units as polynomial.  Choose between WIDE and NARROW based
34077         on multiple_p.
34079 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34080             Alan Hayward  <alan.hayward@arm.com>
34081             David Sherwood  <david.sherwood@arm.com>
34083         * tree-vect-stmts.c (simd_clone_subparts): New function.
34084         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
34086 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34087             Alan Hayward  <alan.hayward@arm.com>
34088             David Sherwood  <david.sherwood@arm.com>
34090         * tree-vect-stmts.c (vectorizable_call): Treat the number of
34091         vectors as polynomial.  Use build_index_vector for
34092         IFN_GOMP_SIMD_LANE.
34094 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34095             Alan Hayward  <alan.hayward@arm.com>
34096             David Sherwood  <david.sherwood@arm.com>
34098         * tree-vect-stmts.c (get_load_store_type): Treat the number of
34099         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
34100         for variable-length vectors.
34101         (vectorizable_mask_load_store): Treat the number of units as
34102         polynomial, asserting that it is constant if the condition has
34103         already been enforced.
34104         (vectorizable_store, vectorizable_load): Likewise.
34106 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34107             Alan Hayward  <alan.hayward@arm.com>
34108             David Sherwood  <david.sherwood@arm.com>
34110         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
34111         of units as polynomial.  Punt if we can't tell at compile time
34112         which vector contains the final result.
34114 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34115             Alan Hayward  <alan.hayward@arm.com>
34116             David Sherwood  <david.sherwood@arm.com>
34118         * tree-vect-loop.c (vectorizable_induction): Treat the number
34119         of units as polynomial.  Punt on SLP inductions.  Use an integer
34120         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
34121         cast of such a series for variable-length floating-point
34122         reductions.
34124 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34125             Alan Hayward  <alan.hayward@arm.com>
34126             David Sherwood  <david.sherwood@arm.com>
34128         * tree.h (build_index_vector): Declare.
34129         * tree.c (build_index_vector): New function.
34130         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
34131         of units as polynomial, forcibly converting it to a constant if
34132         vectorizable_reduction has already enforced the condition.
34133         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
34134         to create a {1,2,3,...} vector.
34135         (vectorizable_reduction): Treat the number of units as polynomial.
34136         Choose vectype_in based on the largest scalar element size rather
34137         than the smallest number of units.  Enforce the restrictions
34138         relied on above.
34140 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34141             Alan Hayward  <alan.hayward@arm.com>
34142             David Sherwood  <david.sherwood@arm.com>
34144         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
34145         number of units as polynomial.
34147 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34148             Alan Hayward  <alan.hayward@arm.com>
34149             David Sherwood  <david.sherwood@arm.com>
34151         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
34152         * target.def (autovectorize_vector_sizes): Return the vector sizes
34153         by pointer, using vector_sizes rather than a bitmask.
34154         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
34155         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
34156         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
34157         Likewise.
34158         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
34159         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
34160         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
34161         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
34162         * omp-general.c (omp_max_vf): Likewise.
34163         * omp-low.c (omp_clause_aligned_alignment): Likewise.
34164         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
34165         * tree-vect-loop.c (vect_analyze_loop): Likewise.
34166         * tree-vect-slp.c (vect_slp_bb): Likewise.
34167         * doc/tm.texi: Regenerate.
34168         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
34169         to a poly_uint64.
34170         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
34171         the vector size as a poly_uint64 rather than an unsigned int.
34172         (current_vector_size): Change from an unsigned int to a poly_uint64.
34173         (get_vectype_for_scalar_type): Update accordingly.
34174         * tree.h (build_truth_vector_type): Take the size and number of
34175         units as a poly_uint64 rather than an unsigned int.
34176         (build_vector_type): Add a temporary overload that takes
34177         the number of units as a poly_uint64 rather than an unsigned int.
34178         * tree.c (make_vector_type): Likewise.
34179         (build_truth_vector_type): Take the number of units as a poly_uint64
34180         rather than an unsigned int.
34182 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34183             Alan Hayward  <alan.hayward@arm.com>
34184             David Sherwood  <david.sherwood@arm.com>
34186         * target.def (get_mask_mode): Take the number of units and length
34187         as poly_uint64s rather than unsigned ints.
34188         * targhooks.h (default_get_mask_mode): Update accordingly.
34189         * targhooks.c (default_get_mask_mode): Likewise.
34190         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
34191         * doc/tm.texi: Regenerate.
34193 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34194             Alan Hayward  <alan.hayward@arm.com>
34195             David Sherwood  <david.sherwood@arm.com>
34197         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
34198         * omp-general.c (omp_max_vf): Likewise.
34199         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
34200         (expand_omp_simd): Handle polynomial safelen.
34201         * omp-low.c (omplow_simd_context): Add a default constructor.
34202         (omplow_simd_context::max_vf): Change from int to poly_uint64.
34203         (lower_rec_simd_input_clauses): Update accordingly.
34204         (lower_rec_input_clauses): Likewise.
34206 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34207             Alan Hayward  <alan.hayward@arm.com>
34208             David Sherwood  <david.sherwood@arm.com>
34210         * tree-vectorizer.h (vect_nunits_for_cost): New function.
34211         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
34212         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
34213         (vect_analyze_slp_cost): Likewise.
34214         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
34215         (vect_model_load_cost): Likewise.
34217 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34218             Alan Hayward  <alan.hayward@arm.com>
34219             David Sherwood  <david.sherwood@arm.com>
34221         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
34222         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
34223         from an unsigned int * to a poly_uint64_pod *.
34224         (calculate_unrolling_factor): New function.
34225         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
34227 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34228             Alan Hayward  <alan.hayward@arm.com>
34229             David Sherwood  <david.sherwood@arm.com>
34231         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
34232         from an unsigned int to a poly_uint64.
34233         (_loop_vec_info::slp_unrolling_factor): Likewise.
34234         (_loop_vec_info::vectorization_factor): Change from an int
34235         to a poly_uint64.
34236         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
34237         (vect_get_num_vectors): New function.
34238         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
34239         (vect_get_num_copies): Use vect_get_num_vectors.
34240         (vect_analyze_data_ref_dependences): Change max_vf from an int *
34241         to an unsigned int *.
34242         (vect_analyze_data_refs): Change min_vf from an int * to a
34243         poly_uint64 *.
34244         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
34245         than an unsigned HOST_WIDE_INT.
34246         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
34247         (vect_analyze_data_ref_dependence): Change max_vf from an int *
34248         to an unsigned int *.
34249         (vect_analyze_data_ref_dependences): Likewise.
34250         (vect_compute_data_ref_alignment): Handle polynomial vf.
34251         (vect_enhance_data_refs_alignment): Likewise.
34252         (vect_prune_runtime_alias_test_list): Likewise.
34253         (vect_shift_permute_load_chain): Likewise.
34254         (vect_supportable_dr_alignment): Likewise.
34255         (dependence_distance_ge_vf): Take the vectorization factor as a
34256         poly_uint64 rather than an unsigned HOST_WIDE_INT.
34257         (vect_analyze_data_refs): Change min_vf from an int * to a
34258         poly_uint64 *.
34259         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
34260         vfm1 as a poly_uint64 rather than an int.  Make the same change
34261         for the returned bound_scalar.
34262         (vect_gen_vector_loop_niters): Handle polynomial vf.
34263         (vect_do_peeling): Likewise.  Update call to
34264         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
34265         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
34266         be constant.
34267         * tree-vect-loop.c (vect_determine_vectorization_factor)
34268         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
34269         (vect_get_known_peeling_cost): Likewise.
34270         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
34271         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
34272         (vect_transform_loop): Likewise.  Use the lowest possible VF when
34273         updating the upper bounds of the loop.
34274         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
34275         rather than an int.
34276         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
34277         polynomial unroll factors.
34278         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
34279         (vect_make_slp_decision): Likewise.
34280         (vect_supported_load_permutation_p): Likewise, and polynomial
34281         vf too.
34282         (vect_analyze_slp_cost): Handle polynomial vf.
34283         (vect_slp_analyze_node_operations): Likewise.
34284         (vect_slp_analyze_bb_1): Likewise.
34285         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
34286         than an unsigned HOST_WIDE_INT.
34287         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
34288         (vectorizable_load): Handle polynomial vf.
34289         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
34290         a poly_uint64.
34291         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
34293 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34294             Alan Hayward  <alan.hayward@arm.com>
34295             David Sherwood  <david.sherwood@arm.com>
34297         * match.pd: Handle bit operations involving three constants
34298         and try to fold one pair.
34300 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34302         * tree-vect-loop-manip.c: Include gimple-fold.h.
34303         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
34304         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
34305         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
34306         Add a path that uses a step of VF instead of 1, but disable it
34307         for now.
34308         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
34309         and niters_no_overflow parameters.  Update calls to
34310         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
34311         Create a new SSA name if the latter choses to use a ste other
34312         than zero, and return it via niters_vector_mult_vf_var.
34313         * tree-vect-loop.c (vect_transform_loop): Update calls to
34314         vect_do_peeling, vect_gen_vector_loop_niters and
34315         slpeel_make_loop_iterate_ntimes.
34316         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
34317         (vect_gen_vector_loop_niters): Update declarations after above changes.
34319 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
34321         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
34322         128-bit round to integer instructions.
34323         (ceil<mode>2): Likewise.
34324         (btrunc<mode>2): Likewise.
34325         (round<mode>2): Likewise.
34327 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
34329         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
34330         unaligned VSX load/store on P8/P9.
34331         (expand_block_clear): Allow the use of unaligned VSX
34332         load/store on P8/P9.
34334 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
34336         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
34337         New function.
34338         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
34339         swap associated with both a load and a store.
34341 2018-01-02  Andrew Waterman  <andrew@sifive.com>
34343         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
34344         * config/riscv/riscv.md (clear_cache): Use it.
34346 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
34348         * web.c: Remove out-of-date comment.
34350 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34352         * expr.c (fixup_args_size_notes): Check that any existing
34353         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
34354         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
34355         (emit_single_push_insn): ...here.
34357 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34359         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
34360         (const_vector_encoded_nelts): New function.
34361         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
34362         (const_vector_int_elt, const_vector_elt): Declare.
34363         * emit-rtl.c (const_vector_int_elt_1): New function.
34364         (const_vector_elt): Likewise.
34365         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
34366         of CONST_VECTOR_ELT.
34368 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34370         * expr.c: Include rtx-vector-builder.h.
34371         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
34372         directly on the tree encoding.
34373         (const_vector_from_tree): Likewise.
34374         * optabs.c: Include rtx-vector-builder.h.
34375         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
34376         sequence of "u" values.
34377         * vec-perm-indices.c: Include rtx-vector-builder.h.
34378         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
34379         directly on the vec_perm_indices encoding.
34381 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34383         * doc/rtl.texi (const_vector): Describe new encoding scheme.
34384         * Makefile.in (OBJS): Add rtx-vector-builder.o.
34385         * rtx-vector-builder.h: New file.
34386         * rtx-vector-builder.c: Likewise.
34387         * rtl.h (rtx_def::u2): Add a const_vector field.
34388         (CONST_VECTOR_NPATTERNS): New macro.
34389         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
34390         (CONST_VECTOR_DUPLICATE_P): Likewise.
34391         (CONST_VECTOR_STEPPED_P): Likewise.
34392         (CONST_VECTOR_ENCODED_ELT): Likewise.
34393         (const_vec_duplicate_p): Check for a duplicated vector encoding.
34394         (unwrap_const_vec_duplicate): Likewise.
34395         (const_vec_series_p): Check for a non-duplicated vector encoding.
34396         Say that the function only returns true for integer vectors.
34397         * emit-rtl.c: Include rtx-vector-builder.h.
34398         (gen_const_vec_duplicate_1): Delete.
34399         (gen_const_vector): Call gen_const_vec_duplicate instead of
34400         gen_const_vec_duplicate_1.
34401         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
34402         (gen_const_vec_duplicate): Use rtx_vector_builder.
34403         (gen_const_vec_series): Likewise.
34404         (gen_rtx_CONST_VECTOR): Likewise.
34405         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
34406         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
34407         Build a new vector rather than modifying a CONST_VECTOR in-place.
34408         (handle_special_swappables): Update call accordingly.
34409         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
34410         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
34411         Build a new vector rather than modifying a CONST_VECTOR in-place.
34412         (handle_special_swappables): Update call accordingly.
34414 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34416         * simplify-rtx.c (simplify_const_binary_operation): Use
34417         CONST_VECTOR_ELT instead of XVECEXP.
34419 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34421         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
34422         the selector elements to be different from the data elements
34423         if the selector is a VECTOR_CST.
34424         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
34425         ssizetype for the selector.
34427 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34429         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
34430         before testing each element individually.
34431         * tree-vect-generic.c (lower_vec_perm): Likewise.
34433 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34435         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
34436         * selftest-run-tests.c (selftest::run_tests): Call it.
34437         * vector-builder.h (vector_builder::operator ==): New function.
34438         (vector_builder::operator !=): Likewise.
34439         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
34440         (vec_perm_indices::all_from_input_p): New function.
34441         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
34442         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
34443         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
34444         instead of reading the VECTOR_CST directly.  Detect whether both
34445         vector inputs are the same before constructing the vec_perm_indices,
34446         and update the number of inputs argument accordingly.  Use the
34447         utility functions added above.  Only construct sel2 if we need to.
34449 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34451         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
34452         the broadcast of the low byte.
34453         (expand_mult_highpart): Use an explicit encoding for the permutes.
34454         * optabs-query.c (can_mult_highpart_p): Likewise.
34455         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
34456         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
34457         (vectorizable_bswap): Likewise.
34458         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
34459         explicit encoding for the power-of-2 permutes.
34460         (vect_permute_store_chain): Likewise.
34461         (vect_grouped_load_supported): Likewise.
34462         (vect_permute_load_chain): Likewise.
34464 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34466         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
34467         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
34468         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
34469         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
34470         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
34471         (vect_gen_perm_mask_any): Likewise.
34473 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34475         * int-vector-builder.h: New file.
34476         * vec-perm-indices.h: Include int-vector-builder.h.
34477         (vec_perm_indices): Redefine as an int_vector_builder.
34478         (auto_vec_perm_indices): Delete.
34479         (vec_perm_builder): Redefine as a stand-alone class.
34480         (vec_perm_indices::vec_perm_indices): New function.
34481         (vec_perm_indices::clamp): Likewise.
34482         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
34483         (vec_perm_indices::new_vector): New function.
34484         (vec_perm_indices::new_expanded_vector): Update for new
34485         vec_perm_indices class.
34486         (vec_perm_indices::rotate_inputs): New function.
34487         (vec_perm_indices::all_in_range_p): Operate directly on the
34488         encoded form, without computing elided elements.
34489         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
34490         encoding.  Update for new vec_perm_indices class.
34491         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
34492         the given vec_perm_builder.
34493         (expand_vec_perm_var): Update vec_perm_builder constructor.
34494         (expand_mult_highpart): Use vec_perm_builder instead of
34495         auto_vec_perm_indices.
34496         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
34497         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
34498         or double series encoding as appropriate.
34499         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
34500         vec_perm_indices instead of auto_vec_perm_indices.
34501         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
34502         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
34503         (vect_permute_store_chain): Likewise.
34504         (vect_grouped_load_supported): Likewise.
34505         (vect_permute_load_chain): Likewise.
34506         (vect_shift_permute_load_chain): Likewise.
34507         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
34508         (vect_transform_slp_perm_load): Likewise.
34509         (vect_schedule_slp_instance): Likewise.
34510         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
34511         (vectorizable_mask_load_store): Likewise.
34512         (vectorizable_bswap): Likewise.
34513         (vectorizable_store): Likewise.
34514         (vectorizable_load): Likewise.
34515         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
34516         vec_perm_indices instead of auto_vec_perm_indices.  Use
34517         tree_to_vec_perm_builder to read the vector from a tree.
34518         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
34519         vec_perm_builder instead of a vec_perm_indices.
34520         (have_whole_vector_shift): Use vec_perm_builder and
34521         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
34522         truncation to calc_vec_perm_mask_for_shift.
34523         (vect_create_epilog_for_reduction): Likewise.
34524         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
34525         from auto_vec_perm_indices to vec_perm_indices.
34526         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
34527         instead of changing individual elements.
34528         (aarch64_vectorize_vec_perm_const): Use new_vector to install
34529         the vector in d.perm.
34530         * config/arm/arm.c (expand_vec_perm_d::perm): Change
34531         from auto_vec_perm_indices to vec_perm_indices.
34532         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
34533         instead of changing individual elements.
34534         (arm_vectorize_vec_perm_const): Use new_vector to install
34535         the vector in d.perm.
34536         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
34537         Update vec_perm_builder constructor.
34538         (rs6000_expand_interleave): Likewise.
34539         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
34540         (rs6000_expand_interleave): Likewise.
34542 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34544         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
34545         to qimode could truncate the indices.
34546         * optabs.c (expand_vec_perm_var): Likewise.
34548 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34550         * Makefile.in (OBJS): Add vec-perm-indices.o.
34551         * vec-perm-indices.h: New file.
34552         * vec-perm-indices.c: Likewise.
34553         * target.h (vec_perm_indices): Replace with a forward class
34554         declaration.
34555         (auto_vec_perm_indices): Move to vec-perm-indices.h.
34556         * optabs.h: Include vec-perm-indices.h.
34557         (expand_vec_perm): Delete.
34558         (selector_fits_mode_p, expand_vec_perm_var): Declare.
34559         (expand_vec_perm_const): Declare.
34560         * target.def (vec_perm_const_ok): Replace with...
34561         (vec_perm_const): ...this new hook.
34562         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
34563         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
34564         * doc/tm.texi: Regenerate.
34565         * optabs.def (vec_perm_const): Delete.
34566         * doc/md.texi (vec_perm_const): Likewise.
34567         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
34568         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
34569         expand_vec_perm for constant permutation vectors.  Assert that
34570         the mode of variable permutation vectors is the integer equivalent
34571         of the mode that is being permuted.
34572         * optabs-query.h (selector_fits_mode_p): Declare.
34573         * optabs-query.c: Include vec-perm-indices.h.
34574         (selector_fits_mode_p): New function.
34575         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
34576         is defined, instead of checking whether the vec_perm_const_optab
34577         exists.  Use targetm.vectorize.vec_perm_const instead of
34578         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
34579         fit in the vector mode before using a variable permute.
34580         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
34581         vec_perm_indices instead of an rtx.
34582         (expand_vec_perm): Replace with...
34583         (expand_vec_perm_const): ...this new function.  Take the selector
34584         as a vec_perm_indices rather than an rtx.  Also take the mode of
34585         the selector.  Update call to shift_amt_for_vec_perm_mask.
34586         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
34587         Use vec_perm_indices::new_expanded_vector to expand the original
34588         selector into bytes.  Check whether the indices fit in the vector
34589         mode before using a variable permute.
34590         (expand_vec_perm_var): Make global.
34591         (expand_mult_highpart): Use expand_vec_perm_const.
34592         * fold-const.c: Includes vec-perm-indices.h.
34593         * tree-ssa-forwprop.c: Likewise.
34594         * tree-vect-data-refs.c: Likewise.
34595         * tree-vect-generic.c: Likewise.
34596         * tree-vect-loop.c: Likewise.
34597         * tree-vect-slp.c: Likewise.
34598         * tree-vect-stmts.c: Likewise.
34599         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
34600         Delete.
34601         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
34602         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
34603         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
34604         (aarch64_vectorize_vec_perm_const): ...this new function.
34605         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
34606         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
34607         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
34608         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
34609         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
34610         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
34611         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
34612         into...
34613         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
34614         check for NEON modes.
34615         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
34616         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
34617         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
34618         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
34619         into...
34620         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
34621         the old VEC_PERM_CONST conditions.
34622         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
34623         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
34624         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
34625         (ia64_vectorize_vec_perm_const_ok): Merge into...
34626         (ia64_vectorize_vec_perm_const): ...this new function.
34627         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
34628         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
34629         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
34630         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
34631         * config/mips/mips.c (mips_expand_vec_perm_const)
34632         (mips_vectorize_vec_perm_const_ok): Merge into...
34633         (mips_vectorize_vec_perm_const): ...this new function.
34634         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
34635         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
34636         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
34637         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
34638         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
34639         (rs6000_expand_vec_perm_const): Delete.
34640         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
34641         Delete.
34642         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
34643         (altivec_expand_vec_perm_const_le): Take each operand individually.
34644         Operate on constant selectors rather than rtxes.
34645         (altivec_expand_vec_perm_const): Likewise.  Update call to
34646         altivec_expand_vec_perm_const_le.
34647         (rs6000_expand_vec_perm_const): Delete.
34648         (rs6000_vectorize_vec_perm_const_ok): Delete.
34649         (rs6000_vectorize_vec_perm_const): New function.
34650         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
34651         an element count and rtx array.
34652         (rs6000_expand_extract_even): Update call accordingly.
34653         (rs6000_expand_interleave): Likewise.
34654         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
34655         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
34656         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
34657         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
34658         (rs6000_expand_vec_perm_const): Delete.
34659         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
34660         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
34661         (altivec_expand_vec_perm_const_le): Take each operand individually.
34662         Operate on constant selectors rather than rtxes.
34663         (altivec_expand_vec_perm_const): Likewise.  Update call to
34664         altivec_expand_vec_perm_const_le.
34665         (rs6000_expand_vec_perm_const): Delete.
34666         (rs6000_vectorize_vec_perm_const_ok): Delete.
34667         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
34668         reference to the SPE evmerge intructions.
34669         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
34670         an element count and rtx array.
34671         (rs6000_expand_extract_even): Update call accordingly.
34672         (rs6000_expand_interleave): Likewise.
34673         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
34674         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
34675         new function.
34676         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
34678 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34680         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
34681         vector mode and that that mode matches the mode of the data
34682         being permuted.
34683         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
34684         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
34685         directly using expand_vec_perm_1 when forcing selectors into
34686         registers.
34687         (expand_vec_perm_var): New function, split out from expand_vec_perm.
34689 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34691         * optabs-query.h (can_vec_perm_p): Delete.
34692         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
34693         * optabs-query.c (can_vec_perm_p): Split into...
34694         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
34695         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
34696         particular selector is valid.
34697         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
34698         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
34699         (vect_grouped_load_supported): Likewise.
34700         (vect_shift_permute_load_chain): Likewise.
34701         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
34702         (vect_transform_slp_perm_load): Likewise.
34703         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
34704         (vectorizable_bswap): Likewise.
34705         (vect_gen_perm_mask_checked): Likewise.
34706         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
34707         implementations of variable permutation vectors into account
34708         when deciding which selector to use.
34709         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
34710         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
34711         with a false third argument.
34712         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
34713         to test whether the constant selector is valid and can_vec_perm_var_p
34714         to test whether a variable selector is valid.
34716 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34718         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
34719         * optabs-query.c (can_vec_perm_p): Likewise.
34720         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
34721         instead of vec_perm_indices.
34722         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
34723         (vect_gen_perm_mask_checked): Likewise,
34724         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
34725         (vect_gen_perm_mask_checked): Likewise,
34727 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34729         * optabs-query.h (qimode_for_vec_perm): Declare.
34730         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
34731         (qimode_for_vec_perm): ...this new function.
34732         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
34734 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
34736         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
34737         does not have a conditional at the top.
34739 2018-01-02  Richard Biener  <rguenther@suse.de>
34741         * ipa-inline.c (big_speedup_p): Fix expression.
34743 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
34745         PR target/81616
34746         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
34747         for generic 4->6.
34749 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
34751         PR target/81616
34752         Generic tuning.
34753         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
34754         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
34755         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
34756         cond_taken_branch_cost 3->4.
34758 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
34760         PR tree-optimization/83581
34761         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
34762         TODO_cleanup_cfg if any changes have been made.
34764         PR middle-end/83608
34765         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
34766         convert_modes if target mode has the right side, but different mode
34767         class.
34769         PR middle-end/83609
34770         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
34771         last argument when extracting from CONCAT.  If either from_real or
34772         from_imag is NULL, use expansion through memory.  If result is not
34773         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
34774         the parts directly to inner mode, if even that fails, use expansion
34775         through memory.
34777         PR middle-end/83623
34778         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
34779         check for bswap in mode rather than HImode and use that in expand_unop
34780         too.
34782 Copyright (C) 2018 Free Software Foundation, Inc.
34784 Copying and distribution of this file, with or without modification,
34785 are permitted in any medium without royalty provided the copyright
34786 notice and this notice are preserved.