[AArch64][SVE] Remove unnecessary PTRUEs from integer arithmetic
[official-gcc.git] / gcc / ChangeLog
blob95c1a4a8029dfc41e5791c40fac510909c0b05b5
1 2018-12-07  Richard Sandiford  <richard.sandiford@arm.com>
3         * config/aarch64/aarch64-sve.md (*mul<mode>3, *v<optab><mode>3):
4         Split the patterns after reload if we don't need the predicate
5         operand.
6         (*post_ra_mul<mode>3, *post_ra_v<optab><mode>3): New patterns.
8 2018-12-07  Richard Sandiford  <richard.sandiford@arm.com>
10         * config/aarch64/iterators.md (SVE_UNPRED_FP_BINARY): New code
11         iterator.
12         (sve_fp_op): Handle minus and mult.
13         * config/aarch64/aarch64-sve.md (*add<mode>3, *sub<mode>3)
14         (*mul<mode>3): Split the patterns after reload if we don't
15         need the predicate operand.
16         (*post_ra_<sve_fp_op><mode>3): New pattern.
18 2018-12-07  Bin Cheng  <bin.cheng@linux.alibaba.com>
20         * profile-count.h (profile_count::oeprator>=): Fix typo by inverting
21         return condition when *this is precise zero.
23 2018-12-07  Jakub Jelinek  <jakub@redhat.com>
25         PR target/85593
26         * final.c (rest_of_handle_final): Don't call collect_fn_hard_reg_usage
27         for functions with naked attribute.
29         PR c/88367
30         * tree-vrp.c (extract_range_from_binary_expr): For POINTER_PLUS_EXPR
31         with -fno-delete-null-pointer-checks, set_nonnull only if the pointer
32         is non-NULL and offset is known to have most significant bit clear.
33         * vr-values.c (vr_values::vrp_stmt_computes_nonzero): For ADDR_EXPR
34         of MEM_EXPR, return true if the MEM_EXPR has non-zero offset with
35         most significant bit clear.  If offset does have most significant bit
36         set and -fno-delete-null-pointer-checks, don't return true even if
37         the base pointer is non-NULL.
39 2018-12-06  Alexandre Oliva  <aoliva@redhat.com>
41         * cselib.c (cselib_record_sets): Skip strict low part sets
42         with NULL src_elt.
44 2018-12-06  Paul A. Clarke  <pc@us.ibm.com>
46         PR target/88316
47         * config/rs6000/smmintrin.h: New file.
48         * config.gcc: Add smmintrin.h to extra_headers for powerpc*-*-*.
50 2018-12-06  Paul A. Clarke  <pc@us.ibm.com>
52         PR target/88316
53         * config/rs6000/mmintrin.h (_mm_unpackhi_pi8): Fix for big-endian.
54         (_mm_unpacklo_pi8): Likewise.
55         (_mm_mulhi_pi16): Likewise.
56         (_mm_packs_pi16): Fix for big-endian. Use preferred API.
57         (_mm_packs_pi32): Likewise.
58         (_mm_packs_pu16): Likewise.
59         * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix for big-endian.
60         (_mm_cvtss_si64): Likewise.
61         (_mm_cvtpi32x2_ps): Likewise.
62         (_mm_shuffle_ps): Likewise.
63         (_mm_movemask_pi8): Likewise.
64         (_mm_mulhi_pu16): Likewise.
65         (_mm_sad_pu8): Likewise.
66         (_mm_sad_pu8): Likewise.
67         (_mm_cvtpu16_ps): Fix for big-endian. Use preferred API.
68         (_mm_cvtpu8_ps): Likewise.
69         (_mm_movemask_ps): Better #else case for big-endian (no functional
70         change).
71         (_mm_shuffle_pi16): Likewise.
72         * config/rs6000/emmintrin.h (_mm_movemask_pd): Fix for big-endian.
73         Better #else case for big-endian (no functional change).
74         (_mm_movemask_epi8): Likewise.
75         (_mm_shufflehi_epi16): Likewise.
76         (_mm_shufflelo_epi16): Likewise.
77         (_mm_shuffle_epi32): Likewise.
78         (_mm_mul_epu32): Fix for big-endian.
79         (_mm_bsrli_si128): Likewise.
80         (_mm_cvtps_pd): Better #else case for big endian.
81         (_mm_mulhi_epi16): Likewise.
82         (_mm_mul_epu32): Likewise.
83         (_mm_slli_si128): Likewise.
84         (_mm_sll_epi16): Likewise.
85         (_mm_sll_epi32): Likewise.
86         (_mm_sra_epi16): Likewise.
87         (_mm_sra_epi32): Likewise.
88         (_mm_srl_epi16): Likewise.
89         (_mm_srl_epi32): Likewise.
90         (_mm_mulhi_epu16): Likewise.
91         (_mm_sad_epu8): Likewise.
92         * config/rs6000/pmmintrin.h (_mm_hadd_ps): Fix for big-endian.
93         (_mm_sub_ps): Likewise.
94         * config/rs6000/mmintrin.h (_mm_cmpeq_pi8): Fix for 32-bit mode.
95         * gcc/config/rs6000/tmmintrin.h (_mm_alignr_epi8): Use ENDIAN
96         macros consistently (no functional changes).
97         (_mm_alignr_pi8): Likewise.
99 2018-12-06  Iain Sandoe  <iain@sandoe.co.uk>
101         PR c++/87380
102         * config/darwin.h (TARGET_WEAK_NOT_IN_ARCHIVE_TOC) Remove, use the
103         default.
104         * config/rs6000/darwin7.h (TARGET_WEAK_NOT_IN_ARCHIVE_TOC): New.
106 2018-12-06  Vladimir Makarov  <vmakarov@redhat.com>
108         PR target/88282
109         * ira.c (ira_init_register_move_cost): Use info from
110         hard_regno_mode_ok instead of contains_reg_of_mode.
111         * ira-costs.c (contains_reg_of_mode): Don't use cost from bigger
112         hard register class for some fixed hard registers.
114 2018-12-06  Segher Boessenkool  <segher@kernel.crashing.org>
116         * doc/extend.texi (Using Assembly Language with C): Document asm inline.
117         (Size of an asm): Fix typo.  Document asm inline.
118         * gimple-pretty-print.c (dump_gimple_asm): Handle asm inline.
119         * gimple.h (enum gf_mask): Add GF_ASM_INLINE.
120         (gimple_asm_set_volatile): Fix typo.
121         (gimple_asm_inline_p): New.
122         (gimple_asm_set_inline): New.
123         * gimplify.c (gimplify_asm_expr): Propagate the asm inline flag from
124         tree to gimple.
125         * ipa-icf-gimple.c (func_checker::compare_gimple_asm): Compare the
126         gimple_asm_inline_p flag, too.
127         * tree-core.h (tree_base): Document that protected_flag is ASM_INLINE_P
128         in an ASM_EXPR.
129         * tree-inline.c (estimate_num_insns): If gimple_asm_inline_p return
130         a minimum size for an asm.
131         * tree.h (ASM_INLINE_P): New.
133 2018-12-06  Segher Boessenkool  <segher@kernel.crashing.org>
135         PR inline-asm/55681
136         * doc/extend.texi (Basic Asm): Update grammar.
137         (Extended Asm): Update grammar.
139 2018-12-06  Iain Sandoe  <iain@sandoe.co.uk>
141         PR target/78444
142         * config/i386/darwin.h (STACK_BOUNDARY): Remove macro.
143         * config/i386/i386.c (ix86_compute_frame_layout): Ensure at least 128b
144         stack alignment in non-leaf functions.
146 2018-12-06  Jakub Jelinek  <jakub@redhat.com>
148         PR target/87598
149         * config/aarch64/aarch64.c (aarch64_print_address_internal): Don't
150         call output_operand_lossage on VOIDmode CONST_INTs.  After
151         output_operand_lossage do return false.
153 2018-12-06  Richard Biener  <rguenther@suse.de>
155         * df-problems.c (df_rd_local_compute): Use bitmap_release.
156         (df_live_free): Likewise.
157         (df_md_local_compute): Likewise.
158         (df_md_free): Release df_md_scratch bitmap.
159         * loop-invariant.c (calculate_loop_reg_pressure): Use
160         bitmap_release.
161         * sched-deps.c (true_dependency_cache, output_dependency_cache,
162         anti_dependency_cache, control_dependency_cache,
163         spec_dependency_cache): Use bitmap instead of bitmap_head *.
164         * sched-ebb.c (schedule_ebbs_init): Initialize non-GTY
165         dont_calc_deps as bitmap allocated from obstack not GC.
166         (schedule_ebbs_finish): Use bitmap_release.
167         * sched-rgn.c (schedule_insns): Initialize non-GTY
168         not_in_df as bitmap allocated from obstack not GC.
169         Use bitmap_release.
170         * sel-sched.c (_forced_ebb_heads): Remove premature optimization.
171         (sel_region_init): Allocate forced_ebb_heads.
172         (sel_region_finish): Free forced_ebb_heads.
174 2018-12-06  Richard Biener  <rguenther@suse.de>
176         * bitmap.c (bitmap_head::crashme): Define.
177         * bitmap.h (bitmap_head): Add constexpr default constructor
178         poisoning the obstack member.
179         (bitmap_head::crashme): Declare.
180         (bitmap_release): New function clearing a bitmap and poisoning
181         the obstack member.
182         * gengtype.c (main): Make it recognize CONSTEXPR.
183         * lra-constraints.c (lra_inheritance): Use bitmap_release
184         instead of bitmap_clear.
185         * ira.c (ira): Work around class-memaccess warning.
186         * regrename.c (create_new_chain): Likewise.
188 2018-12-06  Jakub Jelinek  <jakub@redhat.com>
190         PR tree-optimization/85726
191         * generic-match-head.c (optimize_successive_divisions_p): New function.
192         * gimple-match-head.c (optimize_successive_divisions_p): Likewise.
193         * match.pd: Don't combine successive divisions if they aren't exact
194         and optimize_successive_divisions_p is false.
196         PR fortran/88304
197         * tree-nested.c (convert_nonlocal_reference_stmt): Remove clobbers
198         for non-local automatic decls.
200 2018-12-05  David Edelsohn  <dje.gcc@gmail.com>
202         * config/rs6000/aix72.h (ASM_DEFAULT_SPEC): Match Power7 processor
203         default. 
205 2018-12-05  Uros Bizjak  <ubizjak@gmail.com>
207         * dwarf2out.c (field_byte_offset): Remove
208         #ifdef PCC_BITFIELD_TYPE_MATTERS check.
210 2018-12-05  Richard Biener  <rguenther@suse.de>
211             Martin Sebor  <msebor@redhat.com>
213         PR c/87028
214         * calls.c (get_attr_nonstring_decl): Avoid setting *REF to
215         SSA_NAME_VAR.
216         * gcc/gimple-low.c (lower_stmt): Fold builtin calls here.
217         * gimplify (maybe_fold_stmt): Avoid folding builtin calls.
219 2018-12-05  Iain Sandoe  <iain@sandoe.co.uk>
221         * configure.ac (gcc_cv_otool): Set.
222         * configure: Regenerate.
224 2018-12-05  Uros Bizjak  <ubizjak@gmail.com>
226         * config/i386/cygming.h (PCC_BITFIELD_TYPE_MATTERS): Remove.
227         (GROUP_BITFIELDS_BY_ALIGN): Ditto.
229 2018-12-05  Richard Sandiford  <richard.sandiford@arm.com>
231         PR tree-optimization/88064
232         * tree-vect-patterns.c (vect_convert_input): Convert the result of
233         an existing cast if it has the right width but the wrong sign.
234         Do not test the signedness of the required result when
235         considering whether to split an existing cast; instead split to
236         a type with the same signedness as the source of the cast, then
237         convert it to the opposite signedness where necessary.
238         (vect_recog_over_widening_pattern): Handle sign changes between
239         the final PLUS_EXPR and the RSHIFT_EXPR.
240         (vect_recog_average_pattern): Use an unsigned operation when
241         truncating an addition, subtraction or multiplication.  Cast the
242         result back to the "real" signedness before promoting.
244 2018-12-05  Richard Biener  <rguenther@suse.de>
246         PR tree-optimization/86637
247         * tree-vectorizer.c (pass_slp_vectorize::execute): Reset
248         vect_location at the end.
250 2018-12-05  Jakub Jelinek  <jakub@redhat.com>
252         PR tree-optimization/87360
253         * gimple-loop-jam.c (tree_loop_unroll_and_jam): On failure to analyze
254         data dependencies, don't return false, just continue.  Formatting
255         fixes.
256         (merge_loop_tree, bb_prevents_fusion_p, unroll_jam_possible_p,
257         fuse_loops): Formatting fixes.
259         PR sanitizer/88333
260         * cfgexpand.c (expand_stack_vars): If asan_vec is empty, start with
261         aligning frame offset to ASAN_RED_ZONE_SIZE bytes.
263 2018-12-05  Xianmiao Qu  <xianmiao_qu@c-sky.com>
265         * config.gcc (csky-*-linux-gnu*): Force .init_array support.
267 2018-12-05  Segher Boessenkool  <segher@kernel.crashing.org>
269         * config/rs6000/rs6000.c (rs6000_function_arg): Only do the special
270         aggregate handling on actual AIX, not on somewhat similar systems.
271         (rs6000_arg_partial_bytes): Ditto.
273 2018-12-04  Vladimir Makarov  <vmakarov@redhat.com>
275         PR rtl-optimization/88317
276         * lra-constraints.c (split_reg): Don't set up check_only_regs if
277         we are outside the inheritance pass.
279 2018-12-04  Jan Hubicka  <hubicka@ucw.cz>
281         * ipa-prop.c (jump_function_useful_p): New.
282         (ipa_read_node_info): Do not allocated useless jump functions.
284 2018-12-04  David Malcolm  <dmalcolm@redhat.com>
286         PR c/82967
287         * spellcheck.c (selftest::test_suggestions): Add another assertion.
289 2018-12-04  Martin Sebor  <msebor@redhat.com>
291         * doc/extend.texi (__builtin_has_attribute): Fix typo.
293 2018-12-04  Jakub Jelinek  <jakub@redhat.com>
295         PR target/88188
296         * config/rs6000/rs6000.c (ccr_bit): Return -1 instead of assertion
297         failures.
298         (print_operand): Use REG_P instead of GET_CODE == REG.
299         <case 'D'>: Also check CR_REGNO_P (REGNO (x)).
300         <case 't'>: Likewise.  Remove GET_MODE check.
301         * config/rs6000/rs6000.md (scc patterns): Assert ccr_bit didn't
302         return -1.
304 2018-12-04  Martin Sebor  <msebor@redhat.com>
306         * doc/extend.texi (attribute aligned): Expand.
308 2018-12-04  David Edelsohn  <dje.gcc@gmail.com>
310         PR target/61976
311         * config/rs6000/rs6000.c (rs6000_function_arg): Don't pass aggregates
312         in FPRs on AIX.
313         (rs6000_arg_partial_bytes): Same.
315 2018-12-04  Vladimir Makarov  <vmakarov@redhat.com>
317         PR target/88282
318         * ira-costs.c (exec): Try bigger class to use smaller register
319         move cost.
321 2018-12-04  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
323         PR ipa/88297
324         * ipa-cp.c (create_specialized_node): Track clone counters by
325         node assembler names.
326         (ipcp_driver): Change type of clone_num_suffixes key to const char*.
328 2018-12-04  Richard Biener  <rguenther@suse.de>
330         * tree-vect-loop.c (vect_transform_loop): Fix epilogue iterations
331         for epilogue vectorization.
333 2018-12-04  Richard Biener  <rguenther@suse.de>
335         PR tree-optimization/88301
336         * tree-vrp.c (register_edge_assert_for_2): Fix sign-conversion
337         issues in last commit.
339 2018-12-04  Richard Biener  <rguenther@suse.de>
341         PR tree-optimization/88315
342         * tree-vect-loop.c (get_initial_defs_for_reduction): Simplify
343         and fix initialization vector for SAD and DOT_PROD SLP reductions.
345 2018-12-03  Sandra Loosemore  <sandra@codesourcery.com>
347         PR c/59039
348         * doc/extend.texi (Nonlocal gotos): New section.
350 2018-12-03  Uros Bizjak  <ubizjak@gmail.com>
352         * config/i386/sse.md (vec_concatv2df): Change (v,xm,C)
353         alternative to (v,vm,c).
355 2018-12-03  Segher Boessenkool  <segher@kernel.crashing.org>
357         * gcc/config.gcc (Unsupported targets): Add powerpc*-*-linux*paired*.
358         (powerpc*-*-linux*): Don't handle it here.
360 2018-12-03  Jeff Law  <law@redhat.com>
362         * config/h8300/h8300.md (<code>qi3_1): Add gcc_unreachable to keep
363         warnings quiet.
365         * config/h8300/h8300.md (low byte masking peepholes): Only accept
366         nonimmediate_operand for the to-be-masked operand.
368 2018-12-03  Richard Biener  <rguenther@suse.de>
370         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
371         allow expected function-pointer cast re-instantiation.
373 2018-12-03  Ilya Leoshkevich  <iii@linux.ibm.com>
375         * common/config/s390/s390-common.c (s390_option_init_struct):
376         Use section anchors by default.
377         * config/s390/s390.c (s390_check_symref_alignment): Handle
378         anchors.
379         (TARGET_MAX_ANCHOR_OFFSET): Use short displacement.
380         * output.h (assemble_align): Pass `align' as unsigned int, so
381         that the value 0x80000000, which corresponds to `aligned(1 <<
382         28)', would pass the `align > BITS_PER_UNIT' check.
383         * varasm.c (assemble_align): Likewise.
385 2018-12-03  Julian Brown  <julian@codesourcery.com>
387         * tree-pretty-print.c (dump_omp_clause): Make default case
388         gcc_unreachable.
390 2018-12-03  Richard Biener  <rguenther@suse.de>
392         PR tree-optimization/88301
393         * tree-vrp.c (register_edge_assert_for_2): Handle conversions
394         that do not change the value by registering the same assert
395         for the operand.
397 2018-12-03  Richard Biener  <rguenther@suse.de>
399         * tree-vect-loop.c (vect_transform_loop): Properly compute
400         upper bound for the epilogue when doing epilogue vectorization.
402 2018-12-03  Ilya Leoshkevich  <iii@linux.ibm.com>
404         PR target/80080
405         * cfgcleanup.c (class pass_postreload_jump): New pass.
406         (pass_postreload_jump::execute): Likewise.
407         (make_pass_postreload_jump): Likewise.
408         * passes.def: Add pass_postreload_jump before
409         pass_postreload_cse.
410         * tree-pass.h (make_pass_postreload_jump): New pass.
412 2018-12-02  Uros Bizjak  <ubizjak@gmail.com>
414         * config/i386/i386.c (inline_memory_move_cost): Correctly
415         compute number of TFmode GPR moves.
417 2018-12-02  Jakub Jelinek  <jakub@redhat.com>
419         PR target/88278
420         * config/i386/sse.md (*vec_concatv4sf_0, *vec_concatv4si_0): New insns.
422 2018-12-02  Jeff Law  <law@redhat.com>
424         * config/h8300/h8300.md (call, call_value): Drop mode from
425         operand containing number of bytes pushed.
426         (call_insn, call_value_insn): Use mode iterator for number
427         of bytes pushed operand.  Make pattern name vary appropriately.
429 2018-12-02  Jan Hubicka  <jh@suse.cz>
431         * bb-reorer.c (find_rarely_executed_basic_blocks_and_crossin_edges):
432         trust precise profiles.
434 2018-12-02  Jakub Jelinek  <jakub@redhat.com>
436         * tree-nested.c (convert_nonlocal_omp_clauses,
437         convert_local_omp_clauses): Handle OMP_CLAUSE_IN_REDUCTION,
438         OMP_CLAUSE_TASK_REDUCTION and OMP_CLAUSE__SIMT_ clauses.
439         (convert_nonlocal_reference_stmt, convert_local_reference_stmt):
440         Convert clauses for GIMPLE_OMP_TASKGROUP.
442         * omp-low.c (check_omp_nesting_restrictions): Allow cancel or
443         cancellation point with taskgroup clause inside of taskloop.  Consider
444         a taskloop construct without nogroup clause as implicit taskgroup for
445         diagnostics if cancel/cancellation point with taskgroup clause is
446         closely nested inside of taskgroup region.
448         PR sanitizer/88291
449         * asan.c (asan_clear_shadow): Move assert that len is multiple of 4
450         to the start of the function.
451         (asan_emit_stack_protection): When emitting clearing sequence for
452         epilogue, align offset down to ASAN_RED_ZONE_SIZE granularity,
453         add last_size_aligned which is last_size padded to multiples of
454         ASAN_RED_ZONE_SIZE and emit asan_clear_shadow always on 4 byte
455         boundaries.
457 2018-12-01  Jakub Jelinek  <jakub@redhat.com>
459         PR sanitizer/88289
460         * asan.c (asan_redzone_buffer::flush_redzone_payload): Fix up
461         an off-by-one for BYTES_BIG_ENDIAN.
463         PR target/54589
464         * combine.c (find_split_point): For invalid memory address
465         nonobj + obj + const, if reg + obj + const is valid addressing
466         mode, split at nonobj.  Use if rather than else if for the
467         fallback.  Comment fixes.
469 2018-11-30  Indu Bhagat  <indu.bhagat@oracle.com>
471         * coverage.c (get_coverage_counts): Use from_function_decl for precise
472         function location.
473         * profile-count.c (profile_count::dump): Add handling for precise
474         profile quality.
475         * profile.c (compute_branch_probabilities): Rely on exec_counts instead
476         of profile_info to set profile_status of function.
477         (branch_prob): Do not set profile_status of function based on
478         profile_info. Done above based on exec_counts.
480 2018-11-30  Jakub Jelinek  <jakub@redhat.com>
482         PR tree-optimization/88274
483         * tree-ssa-reassoc.c (optimize_range_tests_xor,
484         optimize_range_tests_diff): If type has smaller precision than
485         corresponding mode or if it has non-standard min/max, compute
486         everything in a standard type for the precision.
488         PR testsuite/85368
489         * params.def (PARAM_LOGICAL_OP_NON_SHORT_CIRCUIT): New param.
490         * tree-ssa-ifcombine.c (ifcombine_ifandif): If
491         --param logical-op-non-short-circuit is present, override
492         LOGICAL_OP_NON_SHORT_CIRCUIT value from the param.
493         * fold-const.c (fold_range_test, fold_truth_andor): Likewise.
495 2018-11-30  Jeff Law  <law@redhat.com>
497         * optabs.c (expand_binop): Use "machine_mode" rather than
498         "enum machine mode" in most recent change.
500 2018-11-30  Wilco Dijkstra  <wdijkstr@arm.com>
502         PR middle-end/64242
503         * builtins.c (expand_builtin_longjmp): Use a temporary when restoring
504         the frame pointer.
505         (expand_builtin_nonlocal_goto): Likewise.
507 2018-11-30  David Malcolm  <dmalcolm@redhat.com>
509         * diagnostic-core.h (emit_diagnostic): New decl.
510         * diagnostic.c (emit_diagnostic): New overload, taking a
511         rich_location *.
513 2018-11-30  David Malcolm  <dmalcolm@redhat.com>
515         * pretty-print.c (class selftest::test_pretty_printer): New
516         subclass of pretty_printer.
517         (selftest::test_prefixes_and_wrapping): New test.
518         (selftest::pretty_print_c_tests): Call it.
520 2018-11-30  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
522         Minimize clone counter memory usage in create_virtual_clone.
523         * cgraph.h (clone_function_name): Add a variant that takes a
524         tree decl.
525         * cgraph.h (cgraph_node::create_virtual_clone): Add a new
526         argument: num_suffix.
527         * cgraphclones.c (cgraph_node::create_virtual_clone): Pass
528         num_suffix to clone_function_name.
529         (clone_function_name): Add a variant that takes a tree decl.
530         * ipa-cp.c (create_specialized_node): Keep track of clone
531         counters in clone_num_suffixes hash map.
532         (ipcp_driver): Free the counter hash map.
533         * ipa-hsa.c (process_hsa_functions): Creates at most one hsa
534         clone per function.
536 2018-11-30  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
537         Make function assembly more independent.
539         This is achieved by having clone_function_name assign unique clone
540         numbers for each function independently.
542         * cgraphclones.c: Replaced clone_fn_id_num with clone_fn_ids;
543         hash map.
544         (clone_function_name_numbered): Use clone_fn_ids.
546 2018-11-30  Vladimir Makarov  <vmakarov@redhat.com>
548         PR rtl-optimization/88179
549         * lra-constraints.c (address_eliminator::address_eliminator):
550         Don't eleminate regs in illegitimate address.
552 2018-11-30  David Malcolm  <dmalcolm@redhat.com>
554         PR preprocessor/88257
555         * input.c (get_substring_ranges_for_loc): Fix indentation.
556         Bulletproof against getting a different files back from
557         linemap_resolve_location and expand_location_to_spelling_point.
559 2018-11-30  Alexander Monakov  <amonakov@ispras.ru>
561         PR gcov-profile/88279
562         * tree-profile.c (init_ic_make_global_vars): Call
563         decl_default_tls_model for variable and not it's type.
565 2018-11-30  Sam Tebbs  <sam.tebbs@arm.com>
567         * config/arm/arm.h (TARGET_DOTPROD): Add TARGET_VFP5 constraint.
569 2018-11-30  Martin Liska  <mliska@suse.cz>
571         PR sanitizer/81715
572         * asan.c (asan_shadow_cst): Remove, partially transform
573         into flush_redzone_payload.
574         (RZ_BUFFER_SIZE): New.
575         (struct asan_redzone_buffer): New.
576         (asan_redzone_buffer::emit_redzone_byte): Likewise.
577         (asan_redzone_buffer::flush_redzone_payload): Likewise.
578         (asan_redzone_buffer::flush_if_full): Likewise.
579         (asan_emit_stack_protection): Use asan_redzone_buffer class
580         that is responsible for proper aligned stores and flushing
581         of shadow memory payload.
582         * asan.h (ASAN_MIN_RED_ZONE_SIZE): New.
583         (asan_var_and_redzone_size): Likewise.
584         * cfgexpand.c (expand_stack_vars): Use smaller alignment
585         (ASAN_MIN_RED_ZONE_SIZE) in order to make shadow memory
586         for automatic variables more compact.
588 2018-11-30  Alan Modra  <amodra@gmail.com>
590         * config/rs6000/predicates.md (easy_fp_constant): Avoid long
591         dependent insn sequences.
592         * config/rs6000/rs6000.c (num_insns_constant): Support long
593         double constants.
594         * config/rs6000/rs6000.md (mov<mode>_softfloat <FMOVE128>): Adjust
595         length attribute.
597 2018-11-30  Alan Modra  <amodra@gmail.com>
599         * config/rs6000/rs6000.c (num_insns_constant_gpr): Renamed from
600         num_insns_constant_wide.  Make static.  Revise comment.
601         (num_insns_constant_multi): New function.
602         (num_insns_constant): Formatting.  Correct CONST_WIDE_INT
603         calculation.  Simplify and extract code common to both
604         CONST_INT and CONST_DOUBLE.  Add gcc_unreachable for unhandled
605         const_double modes.
606         * config/rs6000/rs6000-protos.h (num_insns_const_wide): Delete.
608 2018-11-30  Richard Biener  <rguenther@suse.de>
610         PR tree-optimization/88274
611         * tree-vrp.c (ranges_from_anti_range): Fix handling of
612         TYPE_MIN/MAX_VALUE.
614 2018-11-29  Andi Kleen  <ak@linux.intel.com>
616         * config/i386/i386.c (current_fentry_section): Add.
617         (x86_function_profiler): Handle fentry section.
618         (ix86_attribute_table): Add fentry section.
619         * config/i386/i386.opt: Add -mfentry-section.
620         * doc/extend.texi: Document fentry_section attribute.
621         * doc/invoke.texi: Document -mfentry-section.
623 2018-11-29  Andi Kleen  <ak@linux.intel.com>
625         * config/i386/i386.c (x86_print_call_or_nop): Handle nop name.
626         (current_fentry_name): Add.
627         (x86_function_profiler): Handle fentry_name attribute.
628         (ix86_handle_fentry_name): Add.
629         (ix86_attribute_table): Add fentry_name.
630         * config/i386/i386.opt: Add -mfentry-name
631         * doc/extend.texi: Document fentry_name.
632         * doc/invoke.texi: Document minstrument-return.
634 2018-11-29  Andi Kleen  <ak@linux.intel.com>
636         * config/i386/i386-opts.h (enum instrument_return): Add.
637         * config/i386/i386.c (output_return_instrumentation): Add.
638         (ix86_output_function_return): Call output_return_instrumentation.
639         (ix86_output_call_insn): Call output_return_instrumentation.
640         * config/i386/i386.opt: Add -minstrument-return=.
641         * doc/invoke.texi (-minstrument-return): Document.
643 2018-11-29  Eric Botcazou  <ebotcazou@adacore.com>
645         PR target/87807
646         * config/sparc/sparc-modes.def: Minor tweak.
647         * config/sparc/sparc.c: Minor reordering.
648         (sparc_pass_by_reference): Move around.
649         (traverse_record_type): Change offset from HOST_WIDE_INT to int.
650         (classify_registers): Likewise for bitpos.
651         (function_arg_slotno): Remove dead test and tweak comments.
652         <MODE_RANDOM>: Remove useless assertion and test whether the
653         parameter is named in order to pass it in FP registers.  Return
654         the regno for floating-point vector types.
655         (compute_int_layout): Change bitpos from HOST_WIDE_INT to int.
656         (compute_fp_layout): Likewise.
657         (count_registers): Likewise.
658         (assign_int_registers): Likewise.
659         (assign_fp_registers): Likewise.
660         (assign_registers): Likewise.
661         (function_arg_record_value): Change size from HOST_WIDE_INT to int
662         and use CEIL_NWORDS to compute the number of registers.
663         (function_arg_union_value): Minor tweaks.
664         (function_arg_vector_value): Add slotno and named parameters, use
665         CEIL_NWORDS to compute the number of registers.
666         (sparc_function_arg_1): Rework handling of vector types.  Change
667         size from HOST_WIDE_INT to int.
668         (sparc_arg_partial_bytes): Rework handling of 32-bit ABI and deal
669         with vector types for the 64-bt ABI.
670         (sparc_function_arg_advance): Likewise.
671         (sparc_return_in_memory): Add reference to -fpcc-struct-return.
672         (sparc_struct_value_rtx): Return NULL_RTX instead of 0.
673         (sparc_function_value_1): Rework handling of vector types.  Change
674         size from HOST_WIDE_INT to int.
676 2018-11-29  Jakub Jelinek  <jakub@redhat.com>
678         PR target/88152
679         * config/i386/sse.md (*<sse>_movmsk<ssemodesuffix><avxsizesuffix>_lt,
680         *<sse>_movmsk<ssemodesuffix><avxsizesuffix>_zext_lt,
681         *<sse>_movmsk<ssemodesuffix><avxsizesuffix>_shift,
682         *<sse>_movmsk<ssemodesuffix><avxsizesuffix>_zext_shift,
683         *<sse2_avx2>_pmovmskb_lt, *<sse2_avx2>_pmovmskb_zext_lt): New
684         define_insn_and_split patterns.
686         PR target/54700
687         * config/i386/sse.md
688         (*<sse4_1>_blendv<ssemodesuffix><avxsizesuffix>_lt,
689         *<sse4_1>_blendv<ssefltmodesuffix><avxsizesuffix>_ltint,
690         *<sse4_1_avx2>_pblendvb_lt): Change define_insn into
691         define_insn_and_split.
693 2018-11-29  Peter Bergner  <bergner@linux.ibm.com>
695         PR target/87496
696         * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
697         -mabi=ieeelongdouble without both -mpopcntd and -mvsx.
699 2018-11-29  Uros Bizjak  <ubizjak@gmail.com>
701         * config/i386/i386.c (inline_memory_move_cost):
702         Check "in" for 2 in MMX_CLASS_P case.
703         * config/i386/mmx.md (*mov<mode>_internal): Correct
704         TARGET_INTER_UNIT_MOVES_FROM_VEC and TARGET_INTER_UNIT_MOVES_TO_VEC
705         alternatives in preferred_for_speed attribute calculation.
707 2018-11-29  Martin Sebor  <msebor@redhat.com>
709         PR c/88172
710         PR testsuite/88208
711         * doc/extend.texi (attribute constructor): Clarify.
713 2018-11-29  Martin Liska  <mliska@suse.cz>
715         PR middle-end/88246
716         * builtins.c (expand_movstr): Fix thinko introduced
717         when switching to the new enum.
719 2018-11-29  qing zhao  <qing.zhao@oracle.com>
721         * cif-code.def (EXTERN_LIVE_ONLY_STATIC): New CIF code.
722         * common.opt: Add -flive-patching flag.
723         * doc/invoke.texi: Document -flive-patching.
724         * flag-types.h (enum live_patching_level): New enum.
725         * ipa-inline.c (can_inline_edge_p): Disable external functions from
726         inlining when flag_live_patching is LIVE_PATCHING_INLINE_ONLY_STATIC.
727         * opts.c (control_options_for_live_patching): New function.
728         (finish_options): Make flag_live_patching incompatible with flag_lto.
729         Control IPA optimizations based on different levels of
730         flag_live_patching.
732 2018-11-29  Giuliano Belinassi  <giuliano.belinassi@usp.br>
734         * match.pd (sinh (atanh (x))): New simplification rules.
735         (cosh (atanh (x))): Likewise.
737 2018-11-29  Jakub Jelinek  <jakub@redhat.com>
739         PR target/54700
740         * config/i386/sse.md (ssebytemode): Add V16SI, V8SI and V4SI entries.
741         (ssefltmodesuffix, ssefltvecmode): New define_mode_attrs.
742         (*<sse4_1>_blendv<ssemodesuffix><avxsizesuffix>_lt,
743         *<sse4_1>_blendv<ssefltmodesuffix><avxsizesuffix>_ltint,
744         *<sse4_1_avx2>_pblendvb_lt): New define_insns.
746         PR target/88152
747         * tree.h (build_uniform_cst, uniform_integer_cst_p): Declare.
748         * tree.c (build_uniform_cst, uniform_integer_cst_p): New functions.
749         * match.pd (define_predicates): Add uniform_integer_cst_p.
750         (cmp @0 INTEGER_CST@1, cmp (convert?@2 @0) INTEGER_CST@1): Adjust
751         so that it works also for vector comparisons with uniform constants
752         with INTEGER_CST element.
754         PR target/88234
755         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): For
756         vec_add and vec_sub builtins, perform PLUS_EXPR or MINUS_EXPR
757         in unsigned_type_for instead of vector integral type where overflow
758         doesn't wrap.
760 2018-11-29  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
762         There can be at most one .resolver clone per function
763         * config/rs6000/rs6000.c (make_resolver_func): Generate
764         resolver symbol with clone_function_name instead of
765         clone_function_name_numbered.
767 2018-11-29  Richard Biener  <rguenther@suse.de>
769         PR tree-optimization/88243
770         * tree-vect-patterns.c (vect_mark_pattern_stmts): Set the def
771         type of all pattern-sequence stmts to vect_internal_def.
773 2018-11-29  Andre Vieira  <andre.simoesdiasvieira@arm.com>
775         PR target/88224
776         * config/arm/arm-cpus.in (armv7-r): Add FP16conv configurations.
777         (cortex-r7, cortex-r8): Update default and add new configuration.
778         * doc/invoke.texi (armv7-r): Add two new vfp options.
779         (nofp.dp): Add cortex-r7 and cortex-r8 to the list of targets that
780         support this option.
782 2018-11-29  Alan Modra  <amodra@gmail.com>
784         * config/rs6000/rs6000.c (rs6000_emit_move): Disable long
785         double split for targets other than Darwin.
787 2018-11-29  Alan Modra  <amodra@gmail.com>
789         * config/rs6000/rs6000.md (movdi_internal64): Correct lengths.
791 2018-11-29  Alan Modra  <amodra@gmail.com>
793         * config/rs6000/predicates.md (easy_fp_constant): Remove code
794         dealing with integers in const_double.  Assert on unexpected
795         modes.  Delete superfluous ABI_V4 test.
796         * config/rs6000/rs6000.c (rs6000_emit_move): Comment fixes.
797         Don't call easy_fp_constant for Pmode.
798         (rs6000_hash_constant): Remove code dealing with integers in
799         const_double.
800         (rs6000_legitimate_constant_p): Likewise.
801         (output_toc): Formatting, use CONST_DOUBLE_P.
803 2018-11-29  Alan Modra  <amodra@gmail.com>
805         * config/rs6000/constraints.md (G, H): Comment on purpose of
806         constraint.  Correct mode comments and "G" mode test.
807         * config/rs6000/rs6000.md (movdi_internal32): Remove "GH" from
808         alternative handling "F".  Add length attr.  Formatting.
809         (mov<mode>_softfloat <FMOVE128>): Delete "GH" from
810         alternative, and move "F" to separate alternative.  Correct
811         insn lengths.
813 2018-11-29  Alan Modra  <amodra@gmail.com>
815         * config/rs6000/predicates.md (easy_vector_constant): Don't call
816         easy_fp_constant.
818 2018-11-29  Alan Modra  <amodra@gmail.com>
820         * config.in (HAVE_AS_PLTSEQ): Add.
821         * config/rs6000/predicates.md (indirect_call_operand): New.
822         * config/rs6000/rs6000-protos.h (rs6000_pltseq_template),
823         (rs6000_sibcall_sysv): Declare.
824         * config/rs6000/rs6000.c (init_cumulative_args): Set cookie
825         CALL_LONG for -fno-plt.
826         (print_operand <T, z, 0>): Handle UNSPEC_PLTSEQ.
827         (rs6000_indirect_call_template_1): Emit .reloc directives for
828         UNSPEC_PLTSEQ calls.
829         (rs6000_pltseq_template): New function.
830         (rs6000_longcall_ref): Add arg parameter.  Use PLT16 insns if
831         relocs supported by assembler.  Move SYMBOL_REF test to callers.
832         (rs6000_call_aix): Adjust rs6000_longcall_ref call.  Package
833         insns in UNSPEC_PLTSEQ, preserving original func_desc.
834         (rs6000_call_sysv): Likewise.
835         (rs6000_sibcall_sysv): New function.
836         * config/rs6000/rs6000.h (HAVE_AS_PLTSEQ): Provide default.
837         * config/rs6000/rs6000.md (UNSPEC_PLTSEQ, UNSPEC_PLT16_HA,
838         UNSPEC_PLT16_LO): New.
839         (pltseq_tocsave, pltseq_plt16_ha, pltseq_plt16_lo, pltseq_mtctr): New.
840         (call_indirect_nonlocal_sysv): Don't differentiate zero from non-zero
841         cookie in constraints.  Test explicitly for flags in length attr.
842         Handle unspec operand 1.
843         (call_value_indirect_nonlocal_sysv): Likewise.
844         (call_indirect_aix, call_value_indirect_aix): Handle unspec operand 1.
845         (call_indirect_elfv2, call_value_indirect_elfv2): Likewise.
846         (sibcall, sibcall_value): Use rs6000_sibcall_sysv.
847         (sibcall_indirect_nonlocal_sysv): New pattern.
848         (sibcall_value_indirect_nonlocal_sysv): Likewise.
849         (sibcall_nonlocal_sysv, sibcall_value_nonlocal_sysv): Remove indirect
850         call alternatives.
851         * configure.ac: Check for gas plt sequence marker support.
852         * configure: Regenerate.
854 2018-11-29  Alan Modra  <amodra@gmail.com>
856         * config/rs6000/predicates.md (unspec_tls): New.
857         * config/rs6000/rs6000-protos.h (rs6000_call_template),
858         (rs6000_sibcall_template): Update prototype.
859         (rs6000_longcall_ref): Delete.
860         (rs6000_call_sysv): Declare.
861         * config/rs6000/rs6000.c (edit_tls_call_insn): New function.
862         (global_tlsarg): New variable.
863         (rs6000_legitimize_tls_address): Rewrite __tls_get_addr call
864         handling.
865         (print_operand): Extract UNSPEC_TLSGD address operand.
866         (rs6000_call_template, rs6000_sibcall_template): Remove arg
867         parameter, extract from second call operand instead.
868         (rs6000_longcall_ref): Make static, localize vars.
869         (rs6000_call_aix): Rename parameter to reflect new usage.  Take
870         tlsarg from global_tlsarg.  Don't create unused rtl or nop insns.
871         (rs6000_sibcall_aix): Rename parameter to reflect new usage.  Take
872         tlsarg from global_tlsarg.
873         (rs6000_call_sysv): New function.
874         * config/rs6000/rs6000.md: Adjust rs6000_call_template and
875         rs6000_sibcall_template throughout.
876         (tls_gd_aix, tls_gd_sysv, tls_gd_call_aix, tls_gd_call_sysv): Delete.
877         (tls_ld_aix, tls_ld_sysv, tls_ld_call_aix, tls_ld_call_sysv): Delete.
878         (tls_gdld_nomark): New insn.
879         (tls_gd): Swap operand order.  Simplify mode selection.
880         (tls_gd_high, tls_gd_low): Swap operand order.
881         (tls_ld): Remove const_int 0 vector element from UNSPEC_TLSLD.
882         Simplify mode selection.
883         (tls_ld_high, tls_ld_low): Similarly adjust UNSPEC_TLSLD.
884         (call, call_value): Don't assert for second call operand.
885         Use rs6000_call_sysv.
887 2018-11-29  Alan Modra  <amodra@gmail.com>
889         * config/rs6000/darwin.md (call_indirect_nonlocal_darwin64),
890         (call_nonlocal_darwin64, call_value_indirect_nonlocal_darwin64),
891         (call_value_nonlocal_darwin64): Remove constraints from second call
892         arg, the rounded_stack_size_rtx arg.
893         * config/rs6000/rs6000.md (tls_gd_aix, tls_gd_sysv, tls_gd_call_aix),
894         (tls_gd_call_sysv, tls_ld_aix, tls_ld_sysv, tls_ld_call_aix),
895         (tls_ld_call_sysv, call_local32, call_local64, call_value_local32),
896         (call_value_local64, call_indirect_nonlocal_sysv),
897         (call_nonlocal_sysv, call_nonlocal_sysv_secure),
898         (call_value_indirect_nonlocal_sysv, call_value_nonlocal_sysv),
899         (call_value_nonlocal_sysv_secure, call_local_aix),
900         (call_value_local_aix, call_nonlocal_aix, call_value_nonlocal_aix),
901         (call_indirect_aix, call_value_indirect_aix, call_indirect_elfv2),
902         (call_value_indirect_elfv2, sibcall_local32, sibcall_local64),
903         (sibcall_value_local32, sibcall_value_local64, sibcall_aix),
904         (sibcall_value_aix): Likewise.
906 2018-11-29  Alan Modra  <amodra@gmail.com>
908         * config/rs6000/rs6000.md (TLSmode): Delete mode iterator.  Replace
909         with P throughout except for call mems which should use SI.
910         (tls_abi_suffix, tls_sysv_suffix, tls_insn_suffix): Delete mode
911         attributes.  Replace with bits, mode and ptrload respectively.
913 2018-11-29  Alan Modra  <amodra@gmail.com>
915         * config/rs6000/rs6000-protos.h (rs6000_indirect_call_template),
916         (rs6000_indirect_sibcall_template): Declare.
917         * config/rs6000/rs6000.c (rs6000_indirect_call_template_1),
918         (rs6000_indirect_call_template, rs6000_indirect_sibcall_template):
919         New functions.
920         * config/rs6000/rs6000.md (call_indirect_nonlocal_sysv),
921         (call_value_indirect_nonlocal_sysv, sibcall_nonlocal_sysv),
922         (call_indirect_aix, call_value_indirect_aix): Use
923         rs6000_indirect_call_template and rs6000_indirect_sibcall_template.
924         call_indirect_elfv2, call_value_indirect_elfv2): Likewise, and
925         handle both speculation and non-speculation cases.
926         (call_indirect_aix_nospec, call_value_indirect_aix_nospec): Delete.
927         (call_indirect_elfv2_nospec, call_value_indirect_elfv2_nospec): Delete.
929 2018-11-29  Alan Modra  <amodra@gmail.com>
931         * config/rs6000/rs6000-protos.h (rs6000_call_template): Declare.
932         (rs6000_sibcall_template): Declare.
933         (macho_call_template): Rename from output_call.
934         * config/rs6000/rs6000.c (rs6000_call_template_1): New function.
935         (rs6000_call_template, rs6000_sibcall_template): Likewise.
936         (macho_call_template): Rename from output_call.
937         * config/rs6000/rs6000.md (tls_gd_aix, tls_gd_sysv),
938         (tls_gd_call_aix, tls_gd_call_sysv, tls_ld_aix, tls_ld_sysv),
939         (tls_ld_call_aix, tls_ld_call_sysv, call_nonlocal_sysv),
940         (call_nonlocal_sysv_secure, call_value_nonlocal_sysv),
941         (call_value_nonlocal_sysv_secure, call_nonlocal_aix),
942         (call_value_nonlocal_aix): Use rs6000_call_template and update
943         occurrences of output_call to macho_call_template.
944         (sibcall_nonlocal_sysv, sibcall_value_nonlocal_sysv, sibcall_aix),
945         (sibcall_value_aix): Use rs6000_sibcall_template.
947 2018-11-28  Aaron Sawdey  <acsawdey@linux.ibm.com>
949         * config/rs6000/rs6000-string.c (expand_block_clear): Change how
950         we determine if unaligned vsx is ok.
952 2018-11-28  Jan Hubicka  <jh@suse.cz>
954         * predict.c (determine_unlikely_bbs): Forward declare; also determine
955         edges that are always known to be taken because it is only likely
956         edge out of given BB.
957         (tree_estimate_probability): Call before profile guessing to get bit
958         of extra precision.
960 2018-11-28  Jan Hubicka  <jh@suse.cz>
962         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Handle
963         profile_probability::always better.
965 2018-11-28  Jan Hubicka  <jh@suse.cz>
967         * profile-count.h (profile_count::split): Give better result when
968         splitting profile_probability::always.
970 2018-11-28  Vladimir Makarov  <vmakarov@redhat.com>
972         PR target/88207
973         * ira-costs.c (scan_one_insn): Process subregs when updating costs
974         for pseudos and allocnos from insn.
976 2018-11-28  David Edelsohn  <dje.gcc@gmail.com>
978         * config/rs6000/aix72.h: Update to match aix71.h changes.
980 2018-11-28  Jeff Law  <law@redhat.com>
982         * config/h8300/constraints.md: Add "C" constraint for call insns.
983         * config/h8300/h8300.md (call, call_value): Turn into a define_expand
984         and define_insn pair.  Move invalid call targets into a register in
985         the expander and fix constraints in the matching pattern.
986         * config/h8300/predicates.md (call_expander_operand): Renamed from
987         call_insn_operand.  Reject things we shouldn't be trying to handle.
988         (call_insn_operand): New predicate for use by the call/call_value
989         insns.
990         (small_call_insn_operand): Update appropriately.
992 2018-11-28  Sam Tebbs  <sam.tebbs@arm.com>
994         * config/aarch64/aarch64.c (aarch64_process_target_attr): Replace
995         calls to strtok with strtok_r.
997 2018-11-28  Richard Biener  <rguenther@suse.de>
999         PR tree-optimization/88223
1000         * tree-ssa-sccvn.c (vn_reference_lookup_3): When skipping
1001         over a stored-same value may-alias store make sure to consider
1002         partial overlaps which are valid when TBAA reasonings do not
1003         apply and byte-granular overlaps are possible at all.
1005 2018-11-28  Richard Biener  <rguenther@suse.de>
1007         PR tree-optimization/88217
1008         * vr-values.c (vr_values::extract_range_from_phi_node): Make
1009         sure to handle results > +INF and < -INF correctly when
1010         trying to drop down to +INF - 1 or -INF + 1.
1012 2018-11-28  Alan Modra  <amodra@gmail.com>
1014         * xcoffout.c (do_block): Signed/unsigned warning fix.
1016 2018-11-28  Richard Biener  <rguenther@suse.de>
1018         PR tree-optimization/79351
1019         * tree-ssa-sccvn.c (vn_reference_lookup_3): For assignments from
1020         empty CONSTRUCTORs ensure the store is at a constant position.
1022 2018-11-28  Richard Biener  <rguenther@suse.de>
1024         PR tree-optimization/88229
1025         * tree-ssa.c (non_rewritable_mem_ref_base): Check DECL_SIZE_UNIT
1026         is an INTEGER_CST before accessing it so.
1028 2018-11-28  Sam Tebbs  <sam.tebbs@arm.com>
1030         * doc/invoke.texi (-mtune=): Remove obsolete CPU names.
1032 2018-11-28  Jakub Jelinek  <jakub@redhat.com>
1034         PR target/88189
1035         * config/i386/i386.c (ix86_expand_sse_movcc): Handle DFmode and
1036         SFmode using sse4_1_blendvs[sd] with TARGET_SSE4_1.  Formatting fixes.
1037         * config/i386/sse.md (sse4_1_blendv<ssemodesuffix>): New pattern.
1039 2018-11-27  Martin Liska  <mliska@suse.cz>
1041         * gcov.c (generate_results): Append current_working_directory
1042         only when exists.
1044 2018-11-27  Mike Gulick  <mgulick@mathworks.com>
1046         PR preprocessor/83173
1047         * input.c (dump_location_info): Dump reason and included_from
1048         fields from line_map_ordinary struct.  Fix indentation when
1049         location > 5 digits.
1050         * diagnostic-show-locus.c (num_digits, num_digits): Move to
1051         diagnostic.c to allow it to be utilized by input.c.
1052         * diagnostic.c (num_digits, selftest::test_num_digits): Moved
1053         here.
1054         (selftest::diagnostic_c_tests): Run selftest::test_num_digits.
1055         * diagnostic.h (num_digits): Add extern definition.
1057 2018-11-27  Fredrik Noring  <noring@nocrew.org>
1059         * config/mips/mips.c (mips_reorg_process_insns)
1060         (mips_option_override): Handle `-mfix-r5900'.
1061         * config/mips/mips.h (ASM_SPEC): Add `mfix-r5900' and
1062         `mno-fix-r5900'.
1063         * config/mips/mips.opt (mfix-r5900): New option.
1064         * doc/invoke.texi: Document the `r5900' processor name, and
1065         `-mfix-r5900' and `-mno-fix-r5900' options.
1067 2018-11-27  Jakub Jelinek  <jakub@redhat.com>
1069         PR target/88188
1070         * config/rs6000/rs6000.c (print_operand) <case 'D'>: Use
1071         output_operand_lossage instead of gcc_assert.
1072         <case 't'>: Likewise.
1073         <case 'z'>: Likewise.
1074         <case 'V'>: Use output_operand_lossage instead of gcc_unreachable.
1076 2018-11-27  Jeff Law  <law@redhat.com>
1078         * config/riscv/riscv (riscv_block_mvoe_straight): Use RETURN_BEGIN
1079         in call to move_by_pieces.
1081         * config/sh/sh-mem.c (expand_block_move): Use RETURN_BEGIN in call
1082         to move_by_pieces.
1084         * config/lm32/lm32.c (lm32_block_move_inline): Use RETURN_BEGIN in
1085         call to move_by_pieces.
1087         * config/mips/mips.c (mips_block_move_straight): Use RETURN_BEGIN
1088         in call to move_by_pieces.
1090         * config/microblaze/microblaze.c (microblaze_block_move_straight): Use
1091         RETURN_BEGIN in call to move_by_pieces.
1092         (microblaze_expand_block_move): Likewise.
1094 2018-11-27  Tamar Christina  <tamar.christina@arm.com>
1096         * doc/md.texi (xorsign): Document it.
1098 2018-11-27  Martin Liska  <mliska@suse.cz>
1100         * config/gnu-user.h (TARGET_F951_OPTIONS): New.
1101         * gcc.c (find_fortran_preinclude_file): New function
1102         to handle Fortran pre-include.
1104 2018-11-27  Martin Liska  <mliska@suse.cz>
1106         * asan.c (asan_emit_stack_protection): Use new enum values
1107         instead of int constants.
1108         * builtins.c (expand_builtin_memory_copy_args): Replace int
1109         type with memop_ret enum type.
1110         (expand_builtin_mempcpy_args): Likewise.
1111         (expand_builtin_memcpy): Use new enum values
1112         instead of int constants. Likewise.
1113         (expand_builtin_mempcpy): Likewise.
1114         (expand_movstr): Likewise.
1115         (expand_builtin_strcpy_args): Likewise.
1116         (expand_builtin_stpcpy_1): Likewise.
1117         (expand_builtin_strncpy): Likewise.
1118         (expand_builtin_memset_args): Likewise.
1119         * expr.c (move_by_pieces_d::finish_endp): Rename to ...
1120         (move_by_pieces_d::finish_retmode): ... this.
1121         (move_by_pieces): Change last argument type to memop_ret.
1122         (store_by_pieces): Use new enum values
1123         instead of int constants.
1124         (emit_block_move_hints): Likewise.
1125         (emit_push_insn): Likewise.
1126         (store_expr): Likewise.
1127         * expr.h (store_by_pieces): Change int to newly added enum
1128         type.
1129         * rtl.h (enum memop_ret): Define.
1130         (move_by_pieces): Use the enum type.
1132 2018-11-27  Alan Modra  <amodra@gmail.com>
1134         * config/rs6000/aix71.h (ASM_SPEC): Don't select default -maix64
1135         cpu here.
1136         (ASM_CPU_SPEC): Do so here.  Rewrite using if .. else if .. specs
1137         form.  Error on missing -mcpu case.
1138         * config/rs6000/driver-rs6000.c (asm_names <_AIX>): Update NULL case.
1139         (asm_names <!_AIX>): Add missing cpus.  Update NULL case.  Apply
1140         PR63177 fix for -mcpu=power8 and -mcpu=powerpc64le.
1141         * config/rs6000/rs6000.h (ASM_CPU_SPEC): Rewrite using if ..
1142         else if .. specs form.  Error on missing -mcpu case.  Don't output
1143         duplicate -maltivec.  Apply PR63177 fix for -mcpu=powerpc64le.
1145 2018-11-26  David Malcolm  <dmalcolm@redhat.com>
1147         * dump-context.h (dump_context::dump_loc): Convert 1st param from
1148         dump_flags_t to const dump_metadata_t &.  Convert 2nd param from
1149         const dump_location_t & to const dump_user_location_t &.
1150         (dump_context::dump_loc_immediate): Convert 2nd param from
1151         const dump_location_t & to const dump_user_location_t &.
1152         (dump_context::dump_gimple_stmt): Convert 1st param from
1153         dump_flags_t to const dump_metadata_t &.
1154         (dump_context::void dump_gimple_stmt_loc): Likewise; convert
1155         2nd param from const dump_location_t & to
1156         const dump_user_location_t &.
1157         (dump_context::dump_gimple_expr): Convert 1st param from
1158         dump_flags_t to const dump_metadata_t &.
1159         (dump_context::dump_gimple_expr_loc): Likewise; convert
1160         2nd param from const dump_location_t & to
1161         const dump_user_location_t &.
1162         (dump_context::dump_generic_expr): Convert 1st param from
1163         dump_flags_t to const dump_metadata_t &.
1164         (dump_context::dump_generic_expr_loc): Likewise; convert
1165         2nd param from const dump_location_t & to
1166         const dump_user_location_t &.
1167         (dump_context::dump_printf_va): Convert 1st param from
1168         dump_flags_t to const dump_metadata_t &.
1169         (dump_context::dump_printf_loc_va): Likewise; convert
1170         2nd param from const dump_location_t & to
1171         const dump_user_location_t &.
1172         (dump_context::dump_dec): Convert 1st param from
1173         dump_flags_t to const dump_metadata_t &.
1174         (dump_context::dump_symtab_node): Likewise.
1175         (dump_context::begin_scope): Split out 2nd param into
1176         user and impl locations.
1177         (dump_context::ensure_pending_optinfo): Add metadata param.
1178         (dump_context::begin_next_optinfo): Replace dump_location_t param
1179         with metadata and user location.
1180         * dumpfile.c (dump_context::dump_loc): Convert 1st param from
1181         dump_flags_t to const dump_metadata_t &.  Convert 2nd param from
1182         const dump_location_t & to const dump_user_location_t &.
1183         (dump_context::dump_loc_immediate): Convert 2nd param from
1184         const dump_location_t & to const dump_user_location_t &.
1185         (dump_context::dump_gimple_stmt): Convert 1st param from
1186         dump_flags_t to const dump_metadata_t &.
1187         (dump_context::void dump_gimple_stmt_loc): Likewise; convert
1188         2nd param from const dump_location_t & to
1189         const dump_user_location_t &.
1190         (dump_context::dump_gimple_expr): Convert 1st param from
1191         dump_flags_t to const dump_metadata_t &.
1192         (dump_context::dump_gimple_expr_loc): Likewise; convert
1193         2nd param from const dump_location_t & to
1194         const dump_user_location_t &.
1195         (dump_context::dump_generic_expr): Convert 1st param from
1196         dump_flags_t to const dump_metadata_t &.
1197         (dump_context::dump_generic_expr_loc): Likewise; convert
1198         2nd param from const dump_location_t & to
1199         const dump_user_location_t &.
1200         (dump_context::dump_printf_va): Convert 1st param from
1201         dump_flags_t to const dump_metadata_t &.
1202         (dump_context::dump_printf_loc_va): Likewise; convert
1203         2nd param from const dump_location_t & to
1204         const dump_user_location_t &.
1205         (dump_context::dump_dec): Convert 1st param from
1206         dump_flags_t to const dump_metadata_t &.
1207         (dump_context::dump_symtab_node): Likewise.
1208         (dump_context::begin_scope): Split out 2nd param into
1209         user and impl locations.
1210         (dump_context::ensure_pending_optinfo): Add metadata param.
1211         (dump_context::begin_next_optinfo): Replace dump_location_t param
1212         with metadata and user location.
1213         (dump_gimple_stmt): Convert 1st param from dump_flags_t to
1214         const dump_metadata_t &.
1215         (dump_gimple_stmt_loc): Likewise; convert 2nd param from
1216         const dump_location_t & to const dump_user_location_t &.
1217         (dump_gimple_expr): Convert 1st param from dump_flags_t to
1218         const dump_metadata_t &.
1219         (dump_gimple_expr_loc): Likewise; convert 2nd param from
1220         const dump_location_t & to const dump_user_location_t &.
1221         (dump_generic_expr): Convert 1st param from dump_flags_t to
1222         const dump_metadata_t &.
1223         (dump_generic_expr_loc): Likewise; convert 2nd param from
1224         const dump_location_t & to const dump_user_location_t &.
1225         (dump_printf): Convert 1st param from dump_flags_t to
1226         const dump_metadata_t &.
1227         (dump_printf_loc): Likewise; convert 2nd param from
1228         const dump_location_t & to const dump_user_location_t &.
1229         (dump_dec): Convert 1st param from dump_flags_t to
1230         const dump_metadata_t &.
1231         (dump_symtab_node): Likewise.
1232         (dump_begin_scope): Split out 2nd param into user and impl
1233         locations.
1234         (selftest::assert_impl_location_eq): New function.
1235         (ASSERT_IMPL_LOCATION_EQ): New macro.
1236         (selftest::test_impl_location): Update to use
1237         ASSERT_IMPL_LOCATION_EQ.
1238         (selftest::test_capture_of_dump_calls): Convert "loc" to
1239         dump_user_location_t.  Add ASSERT_IMPL_LOCATION_EQ throughout,
1240         verifying line numbers of dump emissions.
1241         * dumpfile.h (class dump_metadata_t): New class.
1242         (dump_printf): Convert 1st param from dump_flags_t to
1243         const dump_metadata_t &.
1244         (dump_printf_loc): Likewise; convert 2nd param from
1245         const dump_location_t & to const dump_user_location_t &.
1246         (dump_generic_expr_loc): Likewise.
1247         (dump_generic_expr): Convert 1st param from dump_flags_t to
1248         const dump_metadata_t &.
1249         (dump_gimple_stmt_loc): Likewise; convert 2nd param from
1250         const dump_location_t & to const dump_user_location_t &.
1251         (dump_gimple_stmt): Convert 1st param from dump_flags_t to
1252         const dump_metadata_t &.
1253         (dump_gimple_expr_loc): Likewise; convert 2nd param from
1254         const dump_location_t & to const dump_user_location_t &.
1255         (dump_gimple_expr): Convert 1st param from dump_flags_t to
1256         const dump_metadata_t &.
1257         (dump_symtab_node): Likewise.
1258         (dump_dec): Likewise.
1259         (dump_begin_scope): Split out 2nd param into user and impl
1260         locations.
1261         (auto_dump_scope::auto_dump_scope): Split "loc" param into a user
1262         location and impl_location, and capture the impl_location.
1263         (AUTO_DUMP_SCOPE): Rename param from LOC to USER_LOC.
1264         * loop-unroll.c (report_unroll): Update for changes to
1265         dump_printf_loc and dump_printf.
1266         * opt-problem.cc (opt_problem::opt_problem): Update for change to
1267         dump_loc.
1268         * optinfo-emit-json.cc
1269         (selftest::test_building_json_from_dump_calls): Convert "loc" from
1270         dump_location_t to dump_user_location_t.
1271         * optinfo.cc (optinfo::emit_for_opt_problem): Update for change in
1272         dump_loc_immediate.
1273         * profile.c (compute_branch_probabilities): Update for change to
1274         dump_printf_loc.
1275         * selftest.h (ASSERT_STR_CONTAINS_AT): New macro.
1276         * tree-vect-slp.c (vect_print_slp_tree): Update for change to
1277         dump_printf_loc.
1279 2018-11-27  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1281         * doc/sourcebuild.texi: Document check_effective_target_int_eq_float
1282         and check_effective_target_ptr_eq_long.
1284 2018-11-27  Alan Modra  <amodra@gmail.com>
1286         * config.gcc (powerpc*-*-freebsd*, powerpc-*-netbsd*),
1287         (powerpc-*-eabisimaltivec*, powerpc-*-eabisim*, powerpc-*-elf*),
1288         (powerpc-*-eabialtivec*, powerpc-*-eabi*, powerpc-*-rtems*),
1289         (powerpc-wrs-vxworks*, powerpc-*-lynxos*, powerpcle-*-elf*),
1290         (powerpcle-*-eabisim*, powerpcle-*-eabi*): Add gnu-user.h to tm_file.
1291         * config/rs6000/freebsd.h (CPLUSPLUS_CPP_SPEC),
1292         (LINK_GCC_C_SEQUENCE_SPEC): Undef.
1293         (ASM_APP_ON, ASM_APP_OFF): Don't define.
1294         * config/rs6000/freebsd64.h (ASM_APP_ON, ASM_APP_OFF): Don't define.
1295         * config/rs6000/lynx.h (ASM_APP_ON, ASM_APP_OFF): Don't define.
1296         * config/rs6000/linux64.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
1297         * config/rs6000/netbsd.h (CPLUSPLUS_CPP_SPEC),
1298         (LINK_GCC_C_SEQUENCE_SPEC): Undef.
1299         * config/rs6000/rtems.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
1300         * config/rs6000/sysv4.h (GNU_USER_TARGET_CRTI): Redefine.
1301         (GNU_USER_TARGET_CRTN): Redefine.
1302         (CC1_SPEC): Use GNU_USER_TARGET_CC1_SPEC.
1303         (LIB_LINUX_SPEC): Use GNU_USER_TARGET_LIB_SPEC.
1304         (CRTOFFLOADBEGIN, CRTOFFLOADEND): Don't define.
1305         (STARTFILE_LINUX_SPEC): Define as GNU_USER_TARGET_STARTFILE_SPEC.
1306         (ENDFILE_LINUX_SPEC): Define as GNU_USER_TARGET_ENDFILE_SPEC.
1307         (UCLIBC_DYNAMIC_LINKER, CHOOSE_DYNAMIC_LINKER): Don't define.
1308         (LINK_EH_SPEC): Don't define.
1310 2018-11-26  Martin Sebor  <msebor@redhat.com>
1312         PR 87756
1313         * expr.c (string_constant): Handle top-level decls of all character
1314         types and subobjects of narrow character type.
1316 2018-11-27  Alan Modra  <amodra@gmail.com>
1318         * config.gcc (powerpc*-*-linux*): Add linux.h to tm_file.
1319         * config/rs6000/linux.h (TARGET_OS_CPP_BUILTINS): Use
1320         GNU_USER_TARGET_OS_CPP_BUILTINS.
1321         (RS6000_ABI_NAME): Define.
1322         * config/rs6000/linux64.h (TARGET_OS_CPP_BUILTINS): Use
1323         GNU_USER_TARGET_OS_CPP_BUILTINS.
1324         (MUSL_DYNAMIC_LINKER32): Undef before defining.
1325         (UCLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER64): Don't define.
1326         (CHOOSE_DYNAMIC_LINKER): Don't define.
1327         (GNU_USER_DYNAMIC_LINKER32, GNU_USER_DYNAMIC_LINKER64): Don't define.
1328         * config/rs6000/sysv4.h (MUSL_DYNAMIC_LINKER): Undef before defining.
1329         (CHOOSE_DYNAMIC_LINKER, GNU_USER_DYNAMIC_LINKER): Only define when
1330         not already defined.
1331         (CPP_OS_LINUX_SPEC): Remove defines and asserts handled by
1332         TARGET_OS_CPP_BUILTINS.
1334 2018-11-26  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1336         * doc/sourcebuild.texi: Document check_effective_target_newlib_nano_io.
1338 2018-11-26  Jakub Jelinek  <jakub@redhat.com>
1340         PR target/88195
1341         * config/i386/i386.c (def_builtin2): If tcode == VOID_FTYPE_UINT64
1342         and !TARGET_64BIT, return NULL_TREE.
1344         PR c++/86900
1345         * dwarf2out.c (secname_for_decl): For functions with
1346         DECL_SECTION_NAME if in_cold_section_p, try to return
1347         current_function_section's name if it is a named section.
1349 2018-11-26  Maya Rashish  <coypu@sdf.org>
1351         PR target/58397
1352         * config.host (*-*-netbsd*): Use x-netbsd and host-netbsd.o.
1353         * config/x-netbsd: New file.
1354         * config/host-netbsd: New file.
1356 2018-11-26  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1358         * doc/sourcebuild.texi: Document check_effective_target_size20plus.
1359         Clarify documentation for check_effective_target_size32plus.
1361 2018-11-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
1363         * config/rs6000/rs6000-string.c (expand_cmp_vec_sequence): Rename
1364         and modify expand_strncmp_vec_sequence.
1365         (emit_final_compare_vec): Rename and modify emit_final_str_compare_vec.
1366         (generate_6432_conversion): New function.
1367         (expand_block_compare): Add support for vsx.
1368         (expand_block_compare_gpr): New function.
1369         * config/rs6000/rs6000.opt (rs6000_block_compare_inline_limit): Increase
1370         default limit to 63 because of more compact vsx code.
1372 2018-11-26  Uros Bizjak  <ubizjak@gmail.com>
1374         PR target/88178
1375         * config/i386/i386.c (dbx_register_map): Use IGNORED_DWARF_REGNUM
1376         for registers for which no debug information can be generated.
1377         Use INVALID_REGNUM for non-existent registers.
1378         (dbx64_register_map): Ditto.
1379         (svr4_dbx_register_map): Ditto.
1381 2018-11-26  Sandra Loosemore  <sandra@codesourcery.com>
1383         PR c/57182
1384         * doc/invoke.texi (Optimize Options): Document that
1385         -freorder-functions also uses "hot" and "cold" attributes.
1387 2018-11-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1389         * config/aarch64/aarch64.c (aarch64_mangle_type): Fix typo in comment.
1391 2018-11-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1393         * config/arm/types.md (mul64): Rename to...
1394         (widen_mul64): ... This.
1395         * config/arm/arm-generic.md: Rename mul64 to widen_mul64.
1396         * config/arm/cortex-a15.md: Likewise.
1397         * config/arm/cortex-a5.md: Likewise.
1398         * config/arm/cortex-a53.md: Likewise.
1399         * config/arm/cortex-a57.md: Likewise.
1400         * config/arm/cortex-a7.md: Likewise.
1401         * config/arm/cortex-m4.md: Likewise.
1402         * config/arm/exynos-m1.md: Likewise.
1403         * config/arm/marvell-pj4.md: Likewise.
1404         * config/arm/xgene1.md: Likewise.
1406 2018-11-26  Richard Biener  <rguenther@suse.de>
1408         PR tree-optimization/88182
1409         * tree-vect-loop.c (vectorizable_reduction): Pick up single
1410         correct reduc_def_info.
1411         * tree-vect-slp.c (vect_analyze_slp_instance): Set
1412         STMT_VINFO_REDUC_DEF of the first stmt.
1414 2018-11-26  Andreas Krebbel  <krebbel@linux.ibm.com>
1416         * doc/invoke.texi: Document z14/arch12 -march option.
1418 2018-11-25  Sandra Loosemore  <sandra@codesourcery.com>
1420         PR c/57166
1421         * doc/invoke.texi (Option Summary): Add -Wmissing-noreturn.
1422         (Warning Options): Likewise.
1424 2018-11-25  Sandra Loosemore  <sandra@codesourcery.com>
1426         PR web/79738
1427         * doc/extend.texi (Common Function Attributes): Clarify that
1428         functions with "const" attribute can read const global variables.
1430 2018-11-26  Alan Modra  <amodra@gmail.com>
1432         * config/rs6000/rs6000.h (OBJECT_PEF, TARGET_MACOS): Delete.
1434 2018-11-25  Sandra Loosemore  <sandra@codesourcery.com>
1436         PR other/54265
1437         * doc/extend.texi (Common Variable Attributes): Use preferred
1438         placement of type attributes in examples, plus whitespace fixes.
1439         (Type Attributes): Clarify why placement of attributes
1440         immediately after struct/union/enum keyword is preferred.
1441         (Common Type Attributes): Use preferred placement of type
1442         attributes in examples, plus more whitespace fixes.
1444 2018-11-25  Paul Koning  <ni1d@arrl.net>
1446         * config/pdp11/pdp11.h (TARGET_HAS_NO_HW_DIVIDE): Define.
1448 2018-11-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1450         * doc/sourcebuild.texi (Effective-Target Keywords, Environment
1451         attributes): Document d_runtime.
1453 2018-11-25  Vladimir Makarov  <vmakarov@redhat.com>
1455         PR bootstrap/88157
1456         * ira-costs.c (record_operand_costs): Initiate register move cost
1457         for mode.
1459 2018-11-23  Jeff Law  <law@redhat.com>
1461         PR rtl-optimization/87468
1462         * tree-ssa-threadupdate.c (create_block_for_threading): Clear
1463         EDGE_IGNORE on all outgoing edges of the duplicate block.
1465 2018-11-23  Vladimir Makarov  <vmakarov@redhat.com>
1467         PR bootstrap/88157
1468         * ira-costs.c (record_operand_costs): Use bigger hard reg class if
1469         its mode does not fit to the original class.
1471 2018-11-23  Martin Sebor  <msebor@redhat.com>
1473         PR tree-optimization/87756
1474         * expr.c (string_constant): Synthesize a string literal from
1475         the address of a constant character.
1476         * tree.c (build_string_literal): Add an argument.
1477         * tree.h (build_string_literal): Same.
1479 2018-11-23  Christoph Muellner  <christoph.muellner@theobroma-systems.com>
1481         * config/aarch64/aarch64-cores.def: Define emag.
1482         * config/aarch64/aarch64-tune.md: Regenerated with emag.
1483         * config/aarch64/aarch64.c (emag_tunings): New struct.
1484         * doc/invoke.texi: Document mtune value.
1486 2018-11-23  Christoph Muellner  <christoph.muellner@theobroma-systems.com>
1487             Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
1489         * config/aarch64/aarch64.c (xgene1_tunings): Optimize Xgene1 tunings
1490         for GCC 9.
1491         * config/aarch64/aarch64.c (xgene1_tunings): Add Xgene1 specific
1492         prefetch tunings.
1493         * config/aarch64/aarch64.c (xgene1_addrcost_table): Correct the post-modify
1494         costs.
1495         * config/arm/aarch-cost-tables.h (xgene1_extra_costs): Update the cost table
1496         for XGene1.
1498 2018-11-23  Richard Biener  <rguenther@suse.de>
1500         PR tree-optimization/88149
1501         * tree-vect-slp.c (vect_slp_analyze_node_operations): Detect
1502         the case where there are two different def types for the
1503         same operand at different operand position in the same stmt.
1505 2018-23-11  Mihail Ionescu  <mihail.ionescu@arm.com>
1507         * config/arm/arm.c (arm_expand_compare_and_swap): Simplify and call
1508         gen_atomic_compare_swap_1.
1509         (arm_evpc_neon_vuzp): Likewise gen_neon_vuzp_internal.
1510         (arm_evpc_neon_vtrn): Likewise gen_neon_vtrn_internal.
1511         (arm_evpc_neon_vext): Likewise gen_neon_vext_internal.
1512         (arm_evpc_neon_vzip): Likewise gen_neon_vzip_internal.
1513         (arm_evpc_neon_vrev): Replace the function pointer and simplify the mode
1514         checks.
1515         * config/arm/arm.md (neon_vext<mode>),
1516         (neon_vrev64<mode>, neon_vrev32<mode>),
1517         (neon_vrev16<mode>, neon_vtrn<mode>_internal),
1518         (neon_vzip<mode>_internal, neon_vuzp<mode>_internal): Add an '@'character
1519         before the pattern name.
1520         * config/arm/sync.md:
1521         (atomic_compare_and_swap<CCSI:arch><NARROW:mode>_1),
1522         (atomic_compare_and_swap<CCSI:arch><SIDI:mode>_1): Likewise.
1524 2018-11-23  Jakub Jelinek  <jakub@redhat.com>
1526         PR tree-optimization/86614
1527         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return early
1528         if TREE_NO_WARNING is set on ref.ref.
1530 2018-11-22  Sandra Loosemore  <sandra@codesourcery.com>
1531             Alan Coopersmith  <alan.coopersmith@oracle.com>
1533         PR c/53608
1534         * doc/extend.texi (Designated Inits): Clarify handling of multiple
1535         initializers for unions.
1537 2018-11-22  Jan Hubicka  <jh@suse.cz>
1539         PR lto/88142
1540         * ipa-devirt.c (type_variants_equivalent_p): Drop warn and warned
1541         parameters; do not warn here.
1542         (odr_subtypes_equivalent_p): Likewise.
1543         (warn_odr): Fix typo.
1544         (warn_types_mismatch): Do not output confused warnings on integer types.
1545         (odr_types_equivalent_p): Update.
1547 2018-11-22  Jakub Jelinek  <jakub@redhat.com>
1549         * config/i386/i386.c (ix86_option_override_internal,
1550         ix86_can_inline_p, classify_argument, construct_container,
1551         ix86_expand_prologue, ix86_expand_split_stack_prologue,
1552         ix86_expand_carry_flag_compare, expand_set_or_movmem_via_loop,
1553         expand_setmem_epilogue_via_loop, promote_duplicated_reg,
1554         ix86_expand_set_or_movmem, ix86_init_builtins_va_builtins_abi):
1555         Formatting fixes.
1557         * config/i386/i386.c (ix86_option_override_internal): For
1558         stack_protector_guard related options, use opts_set->x_ instead
1559         of global_options_set. and prefix options with opts->x_ .  Move
1560         defaults for offset and reg into else block.
1562 2018-11-22  Uros Bizjak  <ubizjak@gmail.com>
1564         * config/i386/i386.c (ix86_check_avx_upper_register):
1565         Return true for all SSE registers with mode bitsize > 128.
1567 2018-11-22  Vladimir Makarov  <vmakarov@redhat.com>
1569         PR rtl-optimization/87718
1570         * ira-costs.c: Remove trailing white-spaces.
1571         (record_operand_costs): Add a special treatment for moves
1572         involving a hard register.
1574 2018-11-22  Uros Bizjak  <ubizjak@gmail.com>
1576         * config/i386/i386.c (ix86_avx_emit_vzeroupper): Remove.
1577         (ix86_emit_mode_set) <case AVX_U128>: Emit vzeroupper here.
1579 2018-11-22  Martin Liska  <mliska@suse.cz>
1581         * common/config/i386/i386-common.c (processor_names): Add
1582         static assert and add missing "znver2".
1583         (ix86_get_valid_option_values): Add checking assert for null
1584         values and add "native" value if feasible.
1585         * config/i386/i386.h: Do not declare size of processor_names.
1586         * common/config/i386/i386-common.c:
1587         * config/i386/i386.c: Add static assert for size
1588         of processor_cost_table.
1590 2018-11-22  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
1592         * target-insns.def (stack_protect_combined_set): Define new standard
1593         pattern name.
1594         (stack_protect_combined_test): Likewise.
1595         * cfgexpand.c (stack_protect_prologue): Try new
1596         stack_protect_combined_set pattern first.
1597         * function.c (stack_protect_epilogue): Try new
1598         stack_protect_combined_test pattern first.
1599         * config/arm/arm.c (require_pic_register): Add pic_reg and compute_now
1600         parameters to control which register to use as PIC register and force
1601         reloading PIC register respectively.  Insert in the stream of insns if
1602         possible.
1603         (legitimize_pic_address): Expose above new parameters in prototype and
1604         adapt recursive calls accordingly.  Use pic_reg if non null instead of
1605         cached one.
1606         (arm_load_pic_register): Add pic_reg parameter and use it if non null.
1607         (arm_legitimize_address): Adapt to new legitimize_pic_address
1608         prototype.
1609         (thumb_legitimize_address): Likewise.
1610         (arm_emit_call_insn): Adapt to require_pic_register prototype change.
1611         (arm_expand_prologue): Adapt to arm_load_pic_register prototype change.
1612         (thumb1_expand_prologue): Likewise.
1613         * config/arm/arm-protos.h (legitimize_pic_address): Adapt to prototype
1614         change.
1615         (arm_load_pic_register): Likewise.
1616         * config/arm/predicated.md (guard_addr_operand): New predicate.
1617         (guard_operand): New predicate.
1618         * config/arm/arm.md (movsi expander): Adapt to legitimize_pic_address
1619         prototype change.
1620         (builtin_setjmp_receiver expander): Adapt to thumb1_expand_prologue
1621         prototype change.
1622         (stack_protect_combined_set): New expander..
1623         (stack_protect_combined_set_insn): New insn_and_split pattern.
1624         (stack_protect_set_insn): New insn pattern.
1625         (stack_protect_combined_test): New expander.
1626         (stack_protect_combined_test_insn): New insn_and_split pattern.
1627         (arm_stack_protect_test_insn): New insn pattern.
1628         * config/arm/thumb1.md (thumb1_stack_protect_test_insn): New insn pattern.
1629         * config/arm/unspecs.md (UNSPEC_SP_SET): New unspec.
1630         (UNSPEC_SP_TEST): Likewise.
1631         * doc/md.texi (stack_protect_combined_set): Document new standard
1632         pattern name.
1633         (stack_protect_set): Clarify that the operand for guard's address is
1634         legal.
1635         (stack_protect_combined_test): Document new standard pattern name.
1636         (stack_protect_test): Clarify that the operand for guard's address is
1637         legal.
1639 2018-11-22  Richard Biener  <rguenther@suse.de>
1641         PR tree-optimization/88148
1642         * tree-ssa-loop-niter.c (simplify_replace_tree): Get optional
1643         valueization callback parameter and handle it.
1644         * tree-ssa-loop-niter.h (simplify_replace_tree): Export.
1645         * tree-ssa-sccvn.c (process_bb): Eliminate in loop niter trees.
1647 2018-11-22  Richard Biener  <rguenther@suse.de>
1649         PR lto/87229
1650         PR lto/88112
1651         * lto-streamer-out.c (lto_is_streamable): Allow CALL_EXPRs
1652         which can appear in size expressions.
1653         * tree-streamer-in.c (unpack_ts_base_value_fields): Stream
1654         CALL_EXPR_BY_DESCRIPTOR.
1655         (streamer_read_tree_bitfields): Stream CALL_EXPR_IFN.
1656         * tree-streamer-out.c (pack_ts_base_value_fields): Stream
1657         CALL_EXPR_BY_DESCRIPTOR.
1658         (streamer_write_tree_bitfields): Stream CALL_EXPR_IFN.
1660         Revert
1661         PR lto/87229
1662         * tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
1663         sizepos values.
1665 2018-11-22  Richard Biener  <rguenther@suse.de>
1667         PR tree-optimization/88069
1668         * tree-ssa-sccvn.c (visit_phi): Tweak previous fix to not
1669         apply to default defs.
1671 2018-11-22  Jakub Jelinek  <jakub@redhat.com>
1673         PR target/85644
1674         PR target/86832
1675         * config/i386/i386.c (ix86_option_override_internal): Default
1676         ix86_stack_protector_guard to SSP_TLS only if TARGET_THREAD_SSP_OFFSET
1677         is defined.
1678         * config/i386/i386.md (stack_protect_set, stack_protect_set_<mode>,
1679         stack_protect_test, stack_protect_test_<mode>): Use empty condition
1680         instead of TARGET_SSP_TLS_GUARD.
1682 2018-11-22  Martin Liska  <mliska@suse.cz>
1684         PR sanitizer/88017
1685         * config/i386/i386.c (ix86_option_override_internal): Error
1686         about usage -mabi=ms and -fsanitize=thread.
1688 2018-11-21  Uros Bizjak  <ubizjak@gmail.com>
1690         Revert the revert:
1691         2013-10-26  Vladimir Makarov  <vmakarov@redhat.com>
1693         Revert:
1694         2013-10-25  Vladimir Makarov  <vmakarov@redhat.com>
1696         * lra-spills.c (lra_final_code_change): Remove useless move insns.
1698 2018-11-21  Uros Bizjak  <ubizjak@gmail.com>
1700         PR middle-end/88129
1701         * function.c (expand_function_end): Do not emit extra blockage insn.
1703 2018-11-21  Lokesh Janghel  <lokeshjanghel91@gmail.com>
1705         PR target/85667
1706         * config/i386/i386.c (function_value_ms_64): Return AX_REG instead
1707         of FIRST_SSE_REG for 4 or 8 byte modes.
1709 2018-11-21  Jan Hubicka  <jh@suse.cz>
1711         PR lto/87957
1712         * tree.c (fld_decl_context): Break out from ...
1713         (free_lang_data_in_decl): ... here; free TREE_PUBLIC, TREE_PRIVATE
1714         DECL_ARTIFICIAL of TYPE_DECL; do not free TREE_TYPE of TYPE_DECL.
1715         (fld_incomplete_type_of): Build copy of TYP_DECL.
1716         * ipa-devirt.c (free_enum_values): Rename to ...
1717         (free_odr_warning_data): ... this one; free also duplicated TYPE_DECLs
1718         and TREE_TYPEs of TYPE_DECLs.
1719         (get_odr_type): Initialize odr_vtable_hash if needed.
1721 2018-11-21  Alexandre Oliva <oliva@adacore.com>
1723         * final.c (compute_discriminator): Declare.  Renamed from...
1724         (maybe_set_discriminator): ... this.  Set and return a local.
1725         (override_discriminator): New.
1726         (final_scan_insn_1): Set it.
1727         (notice_source_line): Adjust.  Always set discriminator.
1729 2018-11-21  Jakub Jelinek  <jakub@redhat.com>
1731         PR target/87839
1732         * config/aarch64/atomics.md (@aarch64_compare_and_swap<mode>): Use
1733         rIJ constraint for aarch64_plus_operand rather than rn.
1735 2018-11-21  Renlin Li  <renlin.li@arm.com>
1737         PR middle-end/84877
1738         * explow.h (get_dynamic_stack_size): Declare it as external.
1739         * explow.c (record_new_stack_level): Remove function static attribute.
1740         * function.c (assign_stack_local_1): Dynamically align the stack slot
1741         addr for parameter copy on the stack.
1743 2018-11-21  Richard Biener  <rguenther@suse.de>
1745         PR bootstrap/88133
1746         * bitmap.c (bitmap_last_set_bit): Refactor to avoid warning.
1747         * Makefile.in (bitmap.o-warn): Remove again.
1749 2018-11-20  Jeff Law  <law@redhat.com>
1751         PR tree-optimization/88069
1752         * tree-ssa-dom.c (record_equivalences_from_phis): Propagate away
1753         degenerate virtual PHIs.
1755 2018-11-21  H.J. Lu  <hongjiu.lu@intel.com>
1757         PR target/87317
1758         * config/i386/sse.md (sse4_1_<code>v8qiv8hi2<mask_name>): Replace
1759         nonimmediate_operand with register_operand.
1760         (avx2_<code>v8qiv8si2<mask_name>): Likewise.
1761         (sse4_1_<code>v4qiv4si2<mask_name>): Likewise.
1762         (sse4_1_<code>v4hiv4si2<mask_name>): Likewise.
1763         (sse4_1_<code>v2qiv2di2<mask_name>): Likewise.
1764         (avx512f_<code>v8qiv8di2<mask_name>): Likewise.
1765         (avx2_<code>v4qiv4di2<mask_name>): Likewise.
1766         (avx2_<code>v4hiv4di2<mask_name>): Likewise.
1767         (sse4_1_<code>v2hiv2di2<mask_name>): Likewise.
1768         (sse4_1_<code>v2siv2di2<mask_name>): Likewise.
1769         (*sse4_1_<code>v8qiv8hi2<mask_name>_1): New pattern.
1770         (*sse4_1_<code>v8qiv8hi2<mask_name>_2): Likewise.
1771         (*avx2_<code>v8qiv8si2<mask_name>_1): Likewise.
1772         (*avx2_<code>v8qiv8si2<mask_name>_2): Likewise.
1773         (*sse4_1_<code>v4qiv4si2<mask_name>_1): Likewise.
1774         (*sse4_1_<code>v4qiv4si2<mask_name>_2): Likewise.
1775         (*sse4_1_<code>v4hiv4si2<mask_name>_1): Likewise.
1776         (*sse4_1_<code>v4hiv4si2<mask_name>_2): Likewise.
1777         (*avx512f_<code>v8qiv8di2<mask_name>_1): Likewise.
1778         (*avx512f_<code>v8qiv8di2<mask_name>_2): Likewise.
1779         (*avx2_<code>v4qiv4di2<mask_name>_1): Likewise.
1780         (*avx2_<code>v4qiv4di2<mask_name>_2): Likewise.
1781         (*avx2_<code>v4hiv4di2<mask_name>_1): Likewise.
1782         (*avx2_<code>v4hiv4di2<mask_name>_2): Likewise.
1783         (*sse4_1_<code>v2hiv2di2<mask_name>_1): Likewise.
1784         (*sse4_1_<code>v2hiv2di2<mask_name>_2): Likewise.
1785         (*sse4_1_<code>v2siv2di2<mask_name>_1): Likewise.
1786         (*sse4_1_<code>v2siv2di2<mask_name>_2): Likewise.
1788 2018-11-21  H.J. Lu  <hongjiu.lu@intel.com>
1790         * read-rtl.c (apply_subst_iterator): Handle define_split and
1791         define_insn_and_split.
1793 2018-11-21  Jakub Jelinek  <jakub@redhat.com>
1795         PR rtl-optimization/87817
1796         * config/i386/i386.md (bmi2_bzhi_<mode>3, *bmi2_bzhi_<mode>3,
1797         *bmi2_bzhi_<mode>3_1, *bmi2_bzhi_<mode>3_1_ccz): Use IF_THEN_ELSE
1798         in the pattern to avoid triggering UB when operands[2] is zero.
1799         (tbm_bextri_<mode>): New expander.  Renamed the old define_insn to ...
1800         (*tbm_bextri_<mode>): ... this.
1802 2018-11-21  Tom de Vries  <tdevries@suse.de>
1804         PR driver/79855
1805         * params.def (HOT_BB_COUNT_FRACTION): Terminate help message with
1806         period.
1808 2018-11-21  Andreas Krebbel  <krebbel@linux.ibm.com>
1810         * configure.ac: Add check for Binutils to determine whether vector
1811         load/store alignments hints are being supported.
1812         * config.in: Regenerate.
1813         * configure: Regenerate.
1814         * config/s390/s390.c (print_operand): Support new output
1815         modifier A.
1816         * config/s390/s390.md ("movti"): Append alignment hint output
1817         using the new output modifier 'A'.
1818         * config/s390/vector.md ("mov<mode>", "*vec_tf_to_v1tf")
1819         ("*vec_ti_to_v1ti"): Likewise.
1821 2018-11-20  Martin Sebor  <msebor@redhat.com>
1823         * doc/extend.texi (Other Builtins): Add __builtin_has_attribute.
1825 2018-11-20  Jan Hubicka  <hubicka@ucw.cz>
1827         PR lto/84044
1828         * ipa-devirt.c (odr_types_equivalent_p): Use operand_equal_p to
1829         compare ENUM values.
1831 2018-11-20  Jakub Jelinek  <jakub@redhat.com>
1833         PR tree-optimization/87895
1834         * omp-simd-clone.c (ipa_simd_modify_function_body): When removing
1835         or replacing GIMPLE_RETURN, set EDGE_FALLTHRU on the edge to EXIT.
1836         (simd_clone_adjust): Don't set EDGE_FALLTHRU here. In a loop that
1837         redirects edges to EXIT to edges to incr_bb, iterate while EXIT
1838         has any preds and always use EDGE_PRED (, 0).
1840 2018-11-20  Uros Bizjak  <ubizjak@gmail.com>
1842         PR target/88070
1843         * mode-switching.c (create_pre_exit): After reload, always split the
1844         fallthrough edge to the exit block.
1846 2018-11-20  Jan Hubicka  <hubicka@ucw.cz>
1848         * ipa-devirt.c (add_type_duplicate): Do not ICE on incomplete enums.
1849         * tree.c (build_array_type_1): Forward declare.
1850         (fld_type_variant_equal_p): Add INNER_TYPE parameter.
1851         (fld_type_variant): Likewise.
1852         (fld_simplified_types): New hash.
1853         (fld_process_array_type): New function.
1854         (fld_incomplete_type_of): Handle array and enumeration types.
1855         (fld_simplified_type): Handle simplification of arrays.
1856         (free_lang_data): Allocate and free simplified types hash.
1858 2018-11-20  Jan Hubicka  <hubicka@ucw.cz>
1860         PR lto/87957
1861         * ipa-devirt.c (odr_subtypes_equivalent_p): Report ODR violation
1862         when sybtype already violates ODR.
1863         (get_odr_type): Do not ICE when insert is false and type duplicate
1864         is not registered yet.
1865         (register_odr_type): Be sure to register subtypes first.
1867 2018-11-20  Andreas Krebbel  <krebbel@linux.ibm.com>
1869         * config/s390/s390.md ("clztidi2"): Swap the RTX's written to the
1870         DImode parts of the target operand.
1872 2018-11-20  Nathan Sidwell  <nathan@acm.org>
1874         PR 87926
1875         * Makefile.in (bitmap.o-warn): Use -Wno-error=array-bounds.
1877 2018-11-20  Jan Hubicka  <hubicka@ucw.cz>
1879         PR lto/87997
1880         * tree.c (free_lang_data_in_cgraph): Add argument fld; break out
1881         type checking to...
1882         (free_lang_data) ... here; update call of free_lang_data_in_cgraph.
1884 2018-11-20  Jan Hubicka  <hubicka@ucw.cz>
1886         PR ipa/87706
1887         * ipa-fnsummary.c (pass_ipa_fnsummary): Do not remove functions
1888         * ipa.c (possible_inline_candidate_p): Break out from ..
1889         (process_references): ... here ; drop before_inlining_p;
1890         cleanup handling of alises.
1891         (walk_polymorphic_call_targets): Likewise.
1892         (symbol_table::remove_unreachable_nodes): Likewise.
1893         * passes.c (pass_data_ipa_remove_symbols): New structure.
1894         (pass_ipa_remove_symbols): New pass.
1895         (make_pass_ipa_remove_symbols): New function.
1896         * tree-pass.h (make_pass_ipa_remove_symbols): Declare.
1897         * passes.def (pass_ipa_remove_symbols): Schedule after early passes.
1899 2018-11-20  Richard Biener  <rguenther@suse.de>
1901         * tree-vect-stmts.c (vectorizable_condition): Do not get
1902         at else_clause vect def for EXTRACT_LAST_REDUCTION.  Remove
1903         pointless vect_is_simple_use calls.
1905 2018-11-20  Richard Biener  <rguenther@suse.de>
1907         PR tree-optimization/88074
1908         * tree-ssa-dom.c (pass_dominator::execute): Do not walk
1909         backedges.
1911 2018-11-20  Richard Biener  <rguenther@suse.de>
1913         PR tree-optimization/88069
1914         * tree-ssa-sccvn.c (visit_phi): Do not value-number to unvisited
1915         virtual PHI arguments.
1917 2018-11-20  Ilya Leoshkevich  <iii@linux.ibm.com>
1919         PR target/88083
1920         * config/s390/s390.md: Skip LT(G) peephole when literal pool is
1921         involved.
1922         * rtl.h (contains_constant_pool_address_p): New function.
1923         * rtlanal.c (contains_constant_pool_address_p): Likewise.
1925 2018-11-20  Richard Biener  <rguenther@suse.de>
1927         PR middle-end/83215
1928         * alias.c (component_uses_parent_alias_set_from): Remove
1929         alias-set zero and TYPE_TYPELESS_STORAGE case both already
1930         handled in other ways.
1932 2018-11-20  Richard Biener  <rguenther@suse.de>
1934         PR tree-optimization/88087
1935         * tree-ssa-pre.c (create_expression_by_pieces): Re-materialize
1936         call fntype.
1937         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Remember
1938         call fntype.
1940 2018-11-20  Richard Biener  <rguenther@suse.de>
1942         PR middle-end/88089
1943         * tree-data-ref.c (lambda_matrix_right_hermite): Use abs_hwi.
1945 2018-11-19  Jan Hubicka  <hubicka@ucw.cz>
1947         PR lto/87957
1948         * ipa-devirt.c (free_enum_values): Do not ICE on ODR vilations.
1950 2018-11-19  Sandra Loosemore  <sandra@codesourcery.com>
1952         PR driver/50250
1953         * doc/invoke.texi (Link Options): Mention shared libraries
1954         in documentation for the -l option.  Simplify discussion and
1955         point to the system linker documentation for details.
1957 2018-11-19  Peter Bergner  <bergner@linux.ibm.com>
1959         PR rtl-optimization/88033
1960         * ira-lives.c (non_conflicting_reg_copy_p): Skip copies from a register
1961         to itself.  Use HARD_REGISTER_NUM_P.
1963 2018-11-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1965         * tree-vect-loop.c (vect_transform_loop): Disable further unrolling
1966         of the loop if vf is non-constant.
1968 2018-11-19  David Malcolm  <dmalcolm@redhat.com>
1970         PR tree-optimization/87025
1971         * dumpfile.c (dump_context::begin_scope): Call end_any_optinfo
1972         immediately after creating the scope optinfo.
1973         (selftest::test_pr87025): New function.
1974         (selftest::dumpfile_c_tests): Call it.
1975         * optinfo-emit-json.cc (optrecord_json_writer::pop_scope): Assert
1976         that we're not popping the top-level records array.
1977         * optinfo.cc (optinfo::handle_dump_file_kind): Assert that we're
1978         not changing the kind of a "scope" optinfo.
1980 2018-11-19  David Malcolm  <dmalcolm@redhat.com>
1982         PR tree-optimization/87025
1983         * dump-context.h: Include "optinfo.h".
1984         (class optrecord_json_writer): New forward decl.
1985         (dump_context::forcibly_enable_optinfo_p): Delete.
1986         (dump_context::optinfo_enabled_p): New member function.
1987         (dump_context::optimization_records_enabled_p): New member
1988         function.
1989         (dump_context::set_json_writer): New member function.
1990         (dump_context::emit_optinfo): New member function.
1991         (dump_context::m_forcibly_enable_optinfo): Delete.
1992         (dump_context::m_json_writer): New member data.
1993         * dumpfile.c (dump_context::set_json_writer): New member function.
1994         (dump_context::finish_any_json_writer): New member function.
1995         (dump_context::end_scope): Replace call to
1996         optimization_records_maybe_pop_dump_scope with call to
1997         m_json_writer->pop_scope.
1998         (dump_context::optinfo_enabled_p): New member function.
1999         (dump_context::end_any_optinfo): Replace call to optinfo::emit with call
2000         to dump_context::emit_optinfo.
2001         (dump_context::emit_optinfo): New member function.
2002         (temp_dump_context::temp_dump_context): Replace
2003         m_forcibly_enable_optinfo with call to set_json_writer.
2004         (temp_dump_context::~temp_dump_context): Clean up any json writer.
2005         * optinfo-emit-json.cc (class optrecord_json_writer): Move to
2006         optinfo-emit-json.h
2007         (the_json_writer): Delete.
2008         (optimization_records_start): Delete.
2009         (optimization_records_finish): Delete.
2010         (optimization_records_enabled_p): Delete, in favor of
2011         dump_context::optimization_records_enabled_p.
2012         (optimization_records_maybe_record_optinfo): Delete.
2013         (optimization_records_maybe_pop_dump_scope): Delete.
2014         * optinfo-emit-json.h: Include "json.h".  Delete forward
2015         decl of opt_pass.
2016         (optimization_records_start): Delete.
2017         (optimization_records_finish): Delete.
2018         (optimization_records_enabled_p): Delete.
2019         (optimization_records_maybe_record_optinfo): Delete.
2020         (optimization_records_maybe_pop_dump_scope): Delete.
2021         (class optrecord_json_writer): Move here from
2022         optinfo-emit-json.cc.
2023         * optinfo.cc (optinfo::emit_for_opt_problem): Replace call
2024         to optinfo::emit with call to dump_context::emit_optinfo.
2025         (optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
2026         (optinfo_enabled_p): Delete, in favor of
2027         dump_context::optinfo_enabled_p.
2028         (optinfo_wants_inlining_info_p): Update for conversion o
2029         optimization_records_enabled_p to a member function of
2030         dump_context.
2031         * optinfo.h (optinfo_enabled_p): Delete, in favor of
2032         dump_context::optinfo_enabled_p.
2033         (optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
2034         * toplev.c: Include "dump-context.h".
2035         (compile_file): Replace call to optimization_records_finish with
2036         dump_context::finish_any_json_writer.
2037         (do_compile): Replace call to optimization_records_start with
2038         conditionally creating a optrecord_json_writer for the
2039         dump_context.
2041 2018-11-19  Jakub Jelinek  <jakub@redhat.com>
2043         PR tree-optimization/88071
2044         * tree-vect-loop.c (vectorize_fold_left_reduction): Pass true instead
2045         of false as last argument to gsi_remove.
2046         * tree-vect-stmts.c (vect_finish_replace_stmt): Pass true instead of
2047         false as last argument to gsi_replace.
2049         PR debug/87039
2050         * omp-expand.c: Don't include debug.h.
2051         (adjust_context_and_scope): Add REGION argument.  Find DECL_CONTEXT
2052         from innermost outer parallel, task, teams or target that has a
2053         child_fn set, or, if there is no such outer region, use
2054         current_function_decl.  Do the DECL_CONTEXT adjustment regardless of
2055         whether a suitable BLOCK is found or not.
2056         (expand_parallel_call, expand_teams_call): Don't call
2057         adjust_context_and_scope here.
2058         (grid_expand_target_grid_body): Revert 2017-01-25 changes.
2059         (expand_omp_taskreg, expand_omp_target): Likewise.  Call
2060         adjust_context_and_scope.
2061         * dwarf2out.c (dwarf2out_early_global_decl): For
2062         decl_function_context recurse instead of calling dwarf2out_decl.
2064 2018-11-20  Eric Botcazou  <ebotcazou@adacore.com>
2066         PR rtl-optimization/85925
2067         * rtl.h (word_register_operation_p): New predicate.
2068         * combine.c (record_dead_and_set_regs_1): Only apply specific handling
2069         for WORD_REGISTER_OPERATIONS targets to word_register_operation_p RTX.
2070         * rtlanal.c (nonzero_bits1): Likewise.  Adjust couple of comments.
2071         (num_sign_bit_copies1): Likewise.
2073 2018-11-19  Richard Biener  <rguenther@suse.de>
2075         PR lto/87229
2076         * tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
2077         sizepos values.
2079 2018-11-19  Eric Botcazou  <ebotcazou@adacore.com>
2081         * compare-elim.c (struct comparison): Add not_in_a field.
2082         (is_not): New static function.
2083         (strip_not): Likewise.
2084         (conforming_compare): Handle a NOT in the first operand.
2085         (can_eliminate_compare): Likewise.
2086         (find_comparison_dom_walker::before_dom_children): Likewise.
2087         (try_eliminate_compare): Likewise.
2088         * config/visium/visium.md (negsi2_insn_set_carry): Turn into...
2089         (neg<mode>2_insn_set_carry): ...this and add missing NEG operation.
2091 2018-11-19  Jonathan Wakely  <jwakely@redhat.com>
2093         * doc/extend.texi (Common Type Attributes): Fix typos.
2095 2018-11-19  Martin Liska  <mliska@suse.cz>
2097         PR gcov-profile/88045
2098         * coverage.c (coverage_begin_function): Add assert.
2100 2018-11-18  Sandra Loosemore  <sandra@codesourcery.com>
2102         PR other/40498
2103         * doc/extend.texi (Common Function Attributes): Document that
2104         no_instrument_function applies to -p and -pg, too.
2105         * doc/invoke.texi (Instrumentation Options): Add cross-references
2106         to docs for -p, -pg, and -finstrument-functions.
2108 2018-11-18  Alan Modra  <amodra@gmail.com>
2110         * config/gnu-user.h (GNU_USER_TARGET_CRTI): Define.
2111         (GNU_USER_TARGET_STARTFILE_SPEC): Use it here.
2112         (GNU_USER_TARGET_CRTN): Define.
2113         (GNU_USER_TARGET_ENDFILE_SPEC): Use it here.
2114         (GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC): Define.
2116 2018-11-18  Alan Modra  <amodra@gmail.com>
2118         * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Delete
2119         !HAVE_LD_PIE variant.
2120         (GNU_USER_TARGET_ENDFILE_SPEC): Likewise.
2122 2018-11-17  Nick Clifton  <nickc@redhat.com>
2123             Sandra Loosemore  <sandra@codesourcery.com>
2125         PR driver/31357
2126         * doc/invoke.texi (Overall Options): Document that --help and
2127         --help=<value> options cannot be combined.
2129 2018-11-17  Jim Wilson  <jimw@sifive.com>
2131         * config/riscv/riscv.c (epilogue_cfa_sp_offset): New.
2132         (riscv_restore_reg): If restoring HARD_FRAME_POINTER_REGNUM, and
2133         epilogue_cfa_sp_offset set, then add REG_CFA_DEF_CFA regnote.
2134         (riscv_expand_epilogue): Initialize epilogue_cfa_sp_offset.  Set it
2135         to step2 if frame_pointer_needed and step1 is 0.
2137 2018-11-17  Sandra Loosemore  <sandra@codesourcery.com>
2139         PR c++/4225
2140         * doc/cpp.texi (System Headers): Add note about implicit
2141         extern "C" block on targets that define SYSTEM_IMPLICIT_EXTERN_C.
2143 2018-11-17  Sandra Loosemore  <sandra@codesourcery.com>
2145         PR c++/4025
2146         * doc/invoke.texi (C++ Dialect Options): Clarify usage of
2147         -fno-implicit-templates.
2149 2018-11-17  Jakub Jelinek  <jakub@redhat.com>
2151         PR tree-optimization/87546
2152         * tree-vect-patterns.c (vect_look_through_possible_promotion): Add
2153         min_precision variable, initially set it to orig_precision, only does
2154         something if op_type's precision is <= min_precision and update
2155         min_precision whenever calling set_op.
2157 2018-11-16  Jan Hubicka  <hubicka@ucw.cz>
2159         PR ipa/87957
2160         * ipa-devirt.c (warn_odr): Look for main variant to get TYPE_DECL.
2162 2018-11-16  Sandra Loosemore  <sandra@codesourcery.com>
2164         * doc/invoke.texi (Option Summary): Fix whitespace and line
2165         breaks in @gccoptlist environments.
2166         (Warning Options): Likewise.
2167         (Optimize Options): Likewise.
2168         (PowerPC SPE Options): Likewise.
2169         (RS/6000 and PowerPC Options): Likewise.
2171 2018-11-16  Jeff Law  <law@redhat.com>
2173         * config/mn10300/mn10300.md (adddi3_degenerate): Remove bogus
2174         gcc_assert.
2176 2018-11-16  Sandra Loosemore  <sandra@codesourcery.com>
2178         PR middle-end/23197
2179         * doc/invoke.texi (Optimize Options): Update options enabled by
2180         fprofile-generate, -fprofile-use, and -fauto-profile.
2182 2018-11-16  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2184         PR target/87927
2185         * target-def.h: Initialize TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP.
2186         Add them to the TARGET_ASM_{,UN}ALIGNED_INT_OP structs.
2187         * target.def: Enumerate TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP in
2188         the byte_op hook.
2189         * target.h: Add psi, pdi, pti to struct asm_int_op definition.
2190         * targhooks.c (default_print_patchable_function_entry): Assert
2191         asm_int_op does not return a NULL string.
2192         * varasm.c (integer_asm_op): Return the op for a partial int type
2193         when the requested size does not correspond to an integer type.
2194         * config/msp430/msp430.c: Initialize TARGET_ASM_{,UN}ALIGNED_PSI_OP.
2195         * doc/tm.texi: Regenerate.
2197 2018-11-12  Jason Merrill  <jason@redhat.com>
2199         * gimplify.c (gimplify_case_label_expr): Handle hot/cold attributes.
2201 2018-11-16  Michael Meissner  <meissner@linux.ibm.com>
2203         * config/rs6000/constraints.md (wF constraint): Remove power9
2204         fusion documentation.  Just document wF's use for power8 fusion.
2205         * config/rs6000/predicates.md (p9_fusion_reg_operand): Delete.
2206         (fusion_gpr_addis): Delete power9 fusion support.  Change power8
2207         fusion support to require the upper 12 bits to be all 0's or all
2208         1's.
2209         (fusion_gpr_mem_load): Add comment.
2210         (fusion_addis_mem_combo_load): Remove power9 fusion support.
2211         (fusion_addis_mem_combo_store): Delete.
2212         (fusion_offsettable_mem_operand): Delete.
2213         * config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Do not set
2214         power8 fusion here.
2215         (ISA_3_0_MASKS_SERVER): Delete power9 fusion.
2216         (POWERPC_MASKS): Delete power9 fusion.
2217         * config/rs6000/rs6000-protos.h (emit_fusion_load_store): Delete.
2218         (fusion_p9_p): Delete.
2219         (expand_fusion_p9_load): Delete.
2220         (expand_fusion_p9_store): Delete.
2221         (emit_fusion_p9_load): Delete.
2222         (emit_fusion_p9_store): Delete.
2223         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Delete power9
2224         fusion support.
2225         (rs6000_option_override_internal): Set power8 fusion based on
2226         whether we are tuning for power8.  Delete power9 fusion support.
2227         (rs6000_opt_masks): Delete -mpower9-fusion switch.
2228         (emit_fusion_load): Rename emit_fusion_load_store to
2229         emit_fusion_load, and drop fusion store support.  Update callers.
2230         (emit_fusion_load_store): Likewise.
2231         (emit_fusion_gpr_load): Likewise.
2232         (fusion_p9_p): Delete.
2233         (expand_fusion_p9_load): Delete.
2234         (expand_fusion_p9_store): Delete.
2235         (emit_fusion_p9_load): Delete.
2236         (emit_fusion_p9_store): Delete.
2237         * config/rs6000/rs6000.md (UNSPEC_FUSION_P9): Delete.
2238         (GPR_FUSION): Delete.
2239         (FPR_FUSION): Delete.
2240         (power9 fusion peephole2s): Delete.
2241         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Delete.
2242         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Delete.
2243         (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_load): Delete.
2244         (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_store): Delete.
2245         (fusion_p9_<mode>_constant): Delete.
2246         * config/rs6000/rs6000.opt (-mpower9-fusion): Delete undocumented
2247         power9 fusion switch.
2248         * doc/md.texi (PowerPC constraints): Update wF constraint
2249         documentation for power8 fusion only.
2251 2018-11-16  Jakub Jelinek  <jakub@redhat.com>
2253         PR rtl-optimization/87475
2254         * cfgrtl.c (patch_jump_insn): Allow redirection failure for
2255         CROSSING_JUMP_P insns.
2256         (cfg_layout_redirect_edge_and_branch): Don't ICE if ret is NULL.
2258 2018-11-16  Uros Bizjak  <ubizjak@gmail.com>
2260         PR target/88051
2261         * config/i386/i386.md (floatunsdidf2): Allow only 64bit AVX512F targets.
2262         * config/i386/sse.md (UNSPEC_MOVDI_TO_SSE): New UNSPEC.
2263         (movdi_to_sse): Rewrite using UNSPEC_MOVDI_TO_SSE unspec.
2265 2018-11-16  Jakub Jelinek  <jakub@redhat.com>
2267         PR middle-end/88032
2268         * optabs.c (expand_binop): For op0_mode use GET_MODE (op0), unless it
2269         is VOIDmode, in which case use int_mode.  Similarly for op1_mode.
2271 2018-11-16  Eric Botcazou  <ebotcazou@adacore.com>
2273         * tree-switch-conversion.h (switch_decision_tree::emit_case_nodes): Add
2274         location_t parameter.
2275         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
2276         (switch_decision_tree::do_jump_if_equal): Likewise.
2277         * tree-switch-conversion.c (switch_decision_tree::emit): Pass location
2278         of switch statement to emit_case_nodes.
2279         (switch_decision_tree::emit_cmp_and_jump_insns): Add LOC parameter and
2280         set it on the newly built GIMPLE comparison statement.
2281         (switch_decision_tree::do_jump_if_equal): Likewise.
2282         (switch_decision_tree::emit_case_nodes): Add LOC parameter and pass it
2283         in calls to do_jump_if_equal as well as recursive calls.
2285 2018-11-16  Andi Kleen  <ak@linux.intel.com>
2287         * config/i386/i386.md: Allow memory operands to ptwrite.
2289 2018-11-16  Michael Matz  <matz@suse.de>
2291         * system.h (PRsa): New macro.
2292         (SIZE_AMOUNT): Cast number to uint64_t.
2293         * alloc-pool.h (pool_usage::dump): Don't use %zu but PRsa.
2294         (pool_usage::dump_footer): Likewise and also use PRIu64.
2295         * bitmap.h (bitmap_usage::dump): Likewise.
2296         * ggc-common.c (ggc_usage::dump): Likewise.
2297         * ggc-page.c (ggc_print_statistics): Likewise.
2298         * input.c (dump_line_table_statistics): Likewise.
2299         * mem-stats.h (mem_usage::dump): Likewise.
2300         (mem_usage::dump_footer): Likewise.
2301         * rtl.c (dump_rtx_statistics): Likewise.
2302         * tree-cfg.c (dump_cfg_stats): Likewise.
2303         * tree-dfa.c (dump_dfa_stats): Likewise.
2304         * tree-phinodes.c (phinodes_print_statistics): Likewise.
2305         * tree-ssanames (ssanames_print_statistics): Likewise.
2306         * vec.c (vec_usage::dump): Likewise.
2307         (vec_usage::dump_footer): Likewise.
2309 2018-11-16  Richard Biener  <rguenther@suse.de>
2311         PR tree-optimization/88011
2312         * tree-vrp.c (extract_range_from_binary_expr): Fix error in
2313         replacing set_value_range_to_undefined and
2314         set_value_range_to_varying with method calls.
2316 2018-11-16  Ilya Leoshkevich  <iii@linux.ibm.com>
2318         * config/s390/s390.md
2319         (*r<noxa>sbg_<mode>_srl_bitmask): Do not delegate arithmetic to
2320         assembler.
2321         (*r<noxa>sbg_<mode>_sll): Likewise.
2322         (*r<noxa>sbg_<mode>_srl): Likewise.
2323         (*r<noxa>sbg_sidi_srl): New pattern.
2325 2018-11-16  Jerome Lambourg  <lambourg@adacore.com>
2327         * config/vxworks.h (TARGET_VXWORKS_HAVE_CTORS_DTORS): New macro.
2328         Default to TARGET_VXWORKS_RTP.
2329         (SUPPORTS_INIT_PRIORITY): Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
2330         of TARGET_VXWORKS_RTP.
2331         * config/vxworksae.h: Also define TARGET_VXWORKS_HAVE_CTORS_DTORS.
2332         * config/vxworks.c: Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
2333         of TARGET_VXWORKS_RTP to set targetm.have_ctors_dtors.
2335 2018-11-15  Sandra Loosemore  <sandra@codesourcery.com>
2337         PR c++/25759
2338         * doc/extend.texi (Common Type Attributes): Make it explicit
2339         that attribute "packed" can apply to C++ classes.
2341 2018-11-15  Martin Sebor  <msebor@redhat.com>
2343         PR c++/87541
2344         PR c++/87542
2345         * tree.c (type_argument_type): New function.
2346         * tree.h (type_argument_type): Declare it.
2347         * gcc/doc/extend.texi (alloc_align): Update and clarify.
2348         (alloc_size, nonnull, sentinel): Same.
2350 2018-11-15  Andrew Stubbs  <ams@codesourcery.com>
2351             Kwok Cheung Yeung  <kcy@codesourcery.com>
2353         * tree-vect-stmts.c (vectorizable_store): Don't ICE when
2354         int_mode_for_size fails.
2355         (vectorizable_load): Likewise.
2357 2018-11-15  David Malcolm  <dmalcolm@redhat.com>
2359         * doc/ux.texi (Group logically-related diagnostics): Move
2360         discussion of auto_diagnostic_group into this new subsection.
2361         Give an example of where this grouping is used.
2363 2018-11-15  David Malcolm  <dmalcolm@redhat.com>
2365         PR other/19165
2366         * Makefile.in (OBJS): Move json.o to...
2367         (OBJS-libcommon): ...here and add diagnostic-format-json.o.
2368         * common.opt (fdiagnostics-format=): New option.
2369         (diagnostics_output_format): New enum.
2370         * diagnostic-format-json.cc: New file.
2371         * diagnostic.c (default_diagnostic_final_cb): New function, taken
2372         from start of diagnostic_finish.
2373         (diagnostic_initialize): Initialize final_cb to
2374         default_diagnostic_final_cb.
2375         (diagnostic_finish): Move "being treated as errors" messages to
2376         default_diagnostic_final_cb.  Call any final_cb.
2377         (default_diagnostic_finalizer): Add diagnostic_t param.
2378         (diagnostic_report_diagnostic): Pass "orig_diag_kind" to
2379         diagnostic_finalizer callback.
2380         * diagnostic.h (enum diagnostics_output_format): New enum.
2381         (diagnostic_finalizer_fn): Reimplement, adding diagnostic_t param.
2382         (struct diagnostic_context): Add "final_cb".
2383         (default_diagnostic_finalizer): Add diagnostic_t param.
2384         (diagnostic_output_format_init): New decl.
2385         * doc/invoke.texi (-fdiagnostics-format): New option.
2386         * dwarf2out.c (gen_producer_string): Ignore
2387         OPT_fdiagnostics_format_.
2388         * gcc.c (driver_handle_option): Handle OPT_fdiagnostics_format_.
2389         * lto-wrapper.c (append_diag_options): Ignore it.
2390         * opts.c (common_handle_option): Handle it.
2392 2018-11-15  David Malcolm  <dmalcolm@redhat.com>
2394         PR tree-optimization/88015
2395         * graphite-isl-ast-to-gimple.c
2396         (translate_isl_ast_to_gimple::scop_to_isl_ast): Add missing check
2397         for dump_enabled_p.
2398         * graphite-sese-to-poly.c (build_poly_scop): Likewise.
2400 2018-11-15  Richard Biener  <rguenther@suse.de>
2402         PR middle-end/88029
2403         * gimple.c (gimple_call_flags): Union flags from decl, type
2404         and call fntype.
2405         * trans-mem.c (is_tm_pure_call): Simplify.
2407 2018-11-15  Richard Biener  <rguenther@suse.de>
2409         PR tree-optimization/88031
2410         * tree-vect-loop.c (vectorizable_reduction): Move check
2411         for multiple types earlier so we get the expected dump.
2412         Simplify calls to vectorizable_condition.
2413         * tree-vect-stmts.h (vectorizable_condition): Update prototype.
2414         * tree-vect-stmts.c (vectorizable_condition): Instead of
2415         reduc_def and reduc_index take just a flag.  Simplify
2416         code-generation now that we can rely on the defs being set up.
2417         (vectorizable_comparison): Remove unused argument.
2419 2018-11-15  Richard Biener  <rguenther@suse.de>
2421         PR tree-optimization/88030
2422         * tree-complex.c (need_eh_cleanup): New global.
2423         (update_complex_assignment): Mark blocks that need EH update.
2424         (expand_complex_comparison): Likewise.
2425         (tree_lower_complex): Allocate and deallocate need_eh_cleanup,
2426         perform EH cleanup and schedule CFG cleanup if that did anything.
2428 2018-11-15  Jakub Jelinek  <jakub@redhat.com>
2430         PR rtl-optimization/88018
2431         * cfgrtl.c (fixup_abnormal_edges): Guard moving insns to fallthru edge
2432         on the presence of fallthru edge, rather than if it is a USE or not.
2434 2018-11-15  Richard Biener  <rguenther@suse.de>
2436         PR middle-end/87917
2437         * tree-data-ref.c (analyze_miv_subscript): Guard calls to
2438         analyze_subscript_affine_affine properly.
2440 2018-11-15  Xianmiao Qu  <xianmiao_qu@c-sky.com>
2442         * config/csky/csky-linux-elf.h (LINUX_DYNAMIC_LINKER): Remove.
2443         (GLIBC_DYNAMIC_LINKER): Define.
2444         (LINUX_TARGET_LINK_SPEC): Update the dynamic linker's name.
2446 2018-11-15  Bin Cheng  <bin.cheng@linux.alibaba.com>
2448         PR tree-optimization/84648
2449         * tree-ssa-loop-niter.c (adjust_cond_for_loop_until_wrap): New.
2450         (number_of_iterations_cond): Adjust exit cond for loop-until-wrap case
2451         by calling adjust_cond_for_loop_until_wrap.
2453 2018-11-15  Sandra Loosemore  <sandra@codesourcery.com>
2455         PR other/56334
2456         * doc/extend.texi (Common Function Attributes): Clarify linker
2457         restrictions on "aligned" attribute.
2458         (Common Variable Attributes): Likewise.  Mention that linker
2459         restrictions don't apply to stack-allocated variables.
2461 2018-11-15  Joern Rennecke  <joern.rennecke@riscy-ip.com>
2463         * gensupport.c (add_predicate_code): Properly handle ZERO_EXTRACT
2464         as an lvalue.
2466 2018-11-14  Sandra Loosemore  <sandra@codesourcery.com>
2468         PR lto/55102
2469         PR lto/56700
2470         * doc/invoke.texi (Optimize Options): Remove bad example about
2471         interaction between -flto and -O.  Replace it with a note that
2472         you need to compile with -O and not just link.  Copy-edit -flto
2473         discussion to reduce verbiage and improve flow.
2475 2018-11-14  Sandra Loosemore  <sandra@codesourcery.com>
2477         PR middle-end/59658
2478         * doc/invoke.texi (Optimize Options): Clarify that -O0 and -Og
2479         also suppress many optimizations.  Alphabetize option lists for
2480         -O1, -O2, and -Os.  Add list of options disabled with -Og, and
2481         correct documentation for those options to say that.
2482         * opts.c (default_options_table): Sort table by level and option
2483         name, to make it easier to correlate to the manual.
2485 2018-11-14  Uros Bizjak  <ubizjak@gmail.com>
2487         * config/i386/i386.c (ix86_print_operand_address_as): Simplify
2488         printing of the names of segment registers.
2490 2018-11-14  Nathan Sidwell  <nathan@acm.org>
2492         PR debug/88006
2493         PR debug/87462
2494         * dwarf2out.c (dwarf2out_finish): Apply resolve_addr to comdat
2495         type list.
2497 2018-11-14  David Malcolm  <dmalcolm@redhat.com>
2499         * Makefile.in (CFLAGS-optinfo-emit-json.o): Add $(ZLIBINC).
2501 2018-11-14  Jakub Jelinek  <jakub@redhat.com>
2503         P1236R1 - Signed integers are two's complement
2504         * doc/invoke.texi (Wshift-overflow): Adjust documentation for c++2a.
2506         PR bootstrap/86739
2507         * hash-map.h (hash_map::iterator::reference_pair): New class.
2508         (hash_map::iterator::operator*): Return it rather than std::pair.
2510 2018-11-14  Jeff Law  <law@redhat.com>
2512         * optabs.c (expand_binop): Pass INT_MODE to operand_subword_force
2513         iff the operand is a constant.
2515 2018-11-14  Aldy Hernandez  <aldyh@redhat.com>
2517         * gimple-ssa-evrp-analyze.c
2518         (evrp_range_analyzer::record_ranges_from_incoming_edge): Rename
2519         ignore_equivs_equal_p to equal_p.
2520         * ipa-cp.c (meet_with_1): Use equal_p instead of
2521         ignore_equivs_equal_p.
2522         * ipa-prop.c (ipa_vr_ggc_hash_traits::equal): Same.
2523         * tree-vrp.c (value_range::ignore_equivs_equal_p): Remove.
2524         (value_range::operator==): Remove.
2525         (value_range::operator!=): Remove.
2526         (vrp_prop::visit_stmt): Use equal_p.
2527         * tree-vrp.h (value_range): Remove operator==, operator!=,
2528         ignore_equivs_equal_p.
2529         * vr-values.c (update_value_range): Use equal_p.
2531 2018-11-14  Michael Matz  <matz@suse.de>
2533         PR middle-end/86575
2534         * gimplify.c (collect_fallthrough_labels): Add new argument,
2535         return location via that, don't modify statements.
2536         (warn_implicit_fallthrough_r): Adjust call, don't use
2537         statement location directly.
2539 2018-11-14  Richard Biener  <rguenther@suse.de>
2541         PR middle-end/87985
2542         * tree-data-ref.c (split_constant_offset): Add wrapper
2543         allocating a cache hash-map.
2544         (split_constant_offset_1): Cache results of expanding
2545         expressions from SSA def stmts.
2547 2018-11-14  Richard Biener  <rguenther@suse.de>
2549         PR middle-end/88021
2550         * tree-data-ref.c (lambda_matrix_row_add): Change const1 argument
2551         to lambda_int.
2552         (lambda_vector_mult_const): Likewise.
2553         (lambda_matrix_right_hermite): Use lambda_int temporaries.
2555 2018-11-14  Wilco Dijkstra  <wdijkstr@arm.com>
2556             Jackson Woodruff  <jackson.woodruff@arm.com>
2558         PR 71026/tree-optimization
2559         * match.pd: Simplify floating point comparisons.
2561 2018-11-14  Jakub Jelinek  <jakub@redhat.com>
2563         PR rtl-optimization/87817
2564         * config/i386/i386.c (ix86_fold_builtin): For _bzhi_u{32,64} if
2565         last argument has low 8 bits clear, fold to 0.
2567 2018-11-14  Iain Sandoe  <iain@sandoe.co.uk>
2569         * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Cast
2570         MAX_OFILE_ALIGNMENT as needed.
2572 2018-11-14  Richard Biener  <rguenther@suse.de>
2574         PR tree-optimization/88019
2575         * graphite-isl-ast-to-gimple.c (ternary_op_to_tree): Rewrite
2576         COND_EXPR arguments to non-trapping overflow.
2578 2018-11-14  Claudiu Zissulescu  <claziss@synopsys.com>
2580         * config/arc/arc.h (reg_class): Reorder registers classes, remove
2581         unused register classes.
2582         (REG_CLASS_NAMES): Likewise.
2583         (REG_CLASS_CONTENTS): Likewise.
2584         (FIXED_REGISTERS): Make lp_count fixed.
2585         (BASE_REG_CLASS): Remove ACC16_BASE_REGS reference.
2586         (PROGRAM_COUNTER_REGNO): Remove.
2587         * config/arc/arc.c (arc_conditional_register_usage): Remove unused
2588         register classes, use constants for register numbers, remove
2589         reg_class_contents references.
2590         (arc_process_double_reg_moves): Add asserts.
2591         (arc_secondary_reload): Remove LPCOUNT_REG reference, use
2592         lra_in_progress predicate.
2593         (arc_init_reg_tables): Remove unused register classes.
2594         (arc_register_move_cost): Likewise.
2595         (arc_preferred_reload_class): Likewise.
2596         (hwloop_optimize): Update rtx patterns involving lp_count register.
2597         (arc_return_address_register): Rename ILINK1, INLINK2 regnums macros.
2598         * config/arc/constraints.md ("c"): Choose between GENERAL_REGS and
2599         CHEAP_CORE_REGS.  Former one will be used for LRA.
2600         ("Rac"): Choose between GENERAL_REGS and ALL_CORE_REGS.  Former
2601         one will be used for LRA.
2602         ("w"): Choose between GENERAL_REGS and WRITABLE_CORE_REGS.  Former
2603         one will be used for LRA.
2604         ("W"): Choose between GENERAL_REGS and MPY_WRITABLE_CORE_REGS.
2605         Former one will be used for LRA.
2606         ("f"): Delete constraint.
2607         ("k"): Likewise.
2608         ("e"): Likewise.
2609         ("l"): Change it from register constraint to constraint.
2610         * config/arc/arc.md (movqi_insn): Remove unsed lp_count constraints.
2611         (movhi_insn): Likewise.
2612         (movsi_insn): Update pattern.
2613         (arc_lp): Likewise.
2614         (dbnz): Likewise.
2615         (stack_tie): Remove 'b' constraint letter.
2616         (R4_REG): Define.
2617         (R9_REG, R15_REG, R16_REG, R25_REG): Likewise.
2618         (R32_REG, R40_REG, R41_REG, R42_REG, R43_REG, R44_REG): Likewise.
2619         (R57_REG, R59_REG, PCL_REG): Likewise.
2620         (ILINK1_REGNUM): Renamed to ILINK1_REG.
2621         (ILINK2_REGNUM): Renamed to ILINK2_REG.
2622         (Rgp): Remove.
2623         (SP_REGS): Likewise.
2624         (Rcw): Remove unused reg classes.
2625         * config/arc/predicates.md (dest_reg_operand): Just default on
2626         register_operand predicate.
2627         (mpy_dest_reg_operand): Likewise.
2628         (move_dest_operand): Use macros instead of constants.
2629         * config/arc/arc.opt (mlra): Switch to lra as default.
2631 2018-11-14  Richard Biener  <rguenther@suse.de>
2633         PR tree-optimization/87974
2634         * tree-vect-loop.c (vectorizable_reduction): When computing
2635         the vectorized reduction PHI vector type ignore constant
2636         and external defs.
2638 2018-11-14  Jakub Jelinek  <jakub@redhat.com>
2640         PR tree-optimization/87977
2641         * tree-ssa-math-opts.c (optimize_recip_sqrt): Don't reuse division
2642         stmt, build a new one and replace the old one with it.  Formatting fix.
2643         Call release_ssa_name (x) if !has_other_use and !delete_div.
2644         (pass_cse_reciprocals::execute): Before calling optimize_recip_sqrt
2645         verify lhs of stmt is still def.
2647 2018-11-13  Peter Bergner  <bergner@linux.ibm.com>
2649         PR rtl-optimization/87507
2650         * lower-subreg.c (operand_for_swap_move_operator): New function.
2651         (simple_move): Strip simple operators.
2652         (find_pseudo_copy): Likewise.
2653         (resolve_operand_for_swap_move_operator): New function.
2654         (resolve_simple_move): Strip simple operators and swap operands.
2656 2018-11-13  Jakub Jelinek  <jakub@redhat.com>
2658         PR tree-optimization/87898
2659         * omp-simd-clone.c (ipa_simd_modify_stmt_ops): Formatting fix.
2660         (ipa_simd_modify_function_body): Remove debug stmts where the first
2661         argument was changed into a non-decl.
2663 2018-11-13  Peter Bergner  <bergner@linux.ibm.com>
2665         PR rtl-optimization/87899
2666         * lra-lives.c (start_living): Update white space in comment.
2667         (enum point_type): New.
2668         (sparseset_contains_pseudos_p): New function.
2669         (update_pseudo_point): Likewise.
2670         (make_hard_regno_live): Use HARD_REGISTER_NUM_P macro.
2671         (make_hard_regno_dead): Likewise.  Remove ignore_reg_for_conflicts
2672         handling.  Move early exit after adding conflicts.
2673         (mark_pseudo_live): Use HARD_REGISTER_NUM_P macro.  Add early exit
2674         if regno is already live.  Remove all handling of program points.
2675         (mark_pseudo_dead): Use HARD_REGISTER_NUM_P macro.  Add early exit
2676         after adding conflicts.  Remove all handling of program points and
2677         ignore_reg_for_conflicts.
2678         (mark_regno_live): Use HARD_REGISTER_NUM_P macro.  Remove return value
2679         and do not guard call to mark_pseudo_live.
2680         (mark_regno_dead): Use HARD_REGISTER_NUM_P macro.  Remove return value
2681         and do not guard call to mark_pseudo_dead.
2682         (check_pseudos_live_through_calls): Use HARD_REGISTER_NUM_P macro.
2683         (process_bb_lives): Use HARD_REGISTER_NUM_P and HARD_REGISTER_P macros.
2684         Use new function update_pseudo_point.  Handle register copies by
2685         removing the source register from the live set.  Handle INOUT operands.
2686         Update to the next program point using the unused_set, dead_set and
2687         start_dying sets.
2688         (lra_create_live_ranges_1): Use HARD_REGISTER_NUM_P macro.
2690 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
2692         * builtins.c: Replace "source_location" with "location_t".
2693         * diagnostic-show-locus.c: Likewise.
2694         * diagnostic.c: Likewise.
2695         * dumpfile.c: Likewise.
2696         * gcc-rich-location.h: Likewise.
2697         * genmatch.c: Likewise.
2698         * gimple.h: Likewise.
2699         * gimplify.c: Likewise.
2700         * input.c: Likewise.
2701         * input.h: Likewise.  Eliminate the typedef.
2702         * omp-expand.c: Likewise.
2703         * selftest.h: Likewise.
2704         * substring-locations.h (get_source_location_for_substring):
2705         Rename to...
2706         (get_location_within_string): ...this.
2707         * tree-cfg.c: Replace "source_location" with "location_t".
2708         * tree-cfgcleanup.c: Likewise.
2709         * tree-diagnostic.c: Likewise.
2710         * tree-into-ssa.c: Likewise.
2711         * tree-outof-ssa.c: Likewise.
2712         * tree-parloops.c: Likewise.
2713         * tree-phinodes.c: Likewise.
2714         * tree-phinodes.h: Likewise.
2715         * tree-ssa-loop-ivopts.c: Likewise.
2716         * tree-ssa-loop-manip.c: Likewise.
2717         * tree-ssa-phiopt.c: Likewise.
2718         * tree-ssa-phiprop.c: Likewise.
2719         * tree-ssa-threadupdate.c: Likewise.
2720         * tree-ssa.c: Likewise.
2721         * tree-ssa.h: Likewise.
2722         * tree-vect-loop-manip.c: Likewise.
2724 2018-11-13  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
2726         * doc/extend.texi: Fix typo in the weakref description.
2728 2018-11-13  Richard Biener  <rguenther@suse.de>
2730         PR tree-optimization/86991
2731         * tree-vect-loop.c (vect_is_slp_reduction): Delay reduction
2732         group building until we have successfully detected the SLP
2733         reduction.
2734         (vect_is_simple_reduction): Remove fixup code here.
2736 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
2738         * dumpfile.c (VERIFY_DUMP_ENABLED_P): New macro.
2739         (dump_gimple_stmt): Use it.
2740         (dump_gimple_stmt_loc): Likewise.
2741         (dump_gimple_expr): Likewise.
2742         (dump_gimple_expr_loc): Likewise.
2743         (dump_generic_expr): Likewise.
2744         (dump_generic_expr_loc): Likewise.
2745         (dump_printf): Likewise.
2746         (dump_printf_loc): Likewise.
2747         (dump_dec): Likewise.
2748         (dump_dec): Likewise.
2749         (dump_hex): Likewise.
2750         (dump_symtab_node): Likewise.
2751         * gimple-loop-interchange.cc (tree_loop_interchange::interchange):
2752         Guard dump call with dump_enabled_p.
2753         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl): Likewise.
2754         * graphite-optimize-isl.c (optimize_isl): Likewise.
2755         * graphite.c (graphite_transform_loops): Likewise.
2756         * tree-loop-distribution.c (pass_loop_distribution::execute): Likewise.
2757         * tree-parloops.c (parallelize_loops): Likewise.
2758         * tree-ssa-loop-niter.c (number_of_iterations_exit): Likewise.
2759         * tree-vect-data-refs.c (vect_analyze_group_access_1): Likewise.
2760         (vect_prune_runtime_alias_test_list): Likewise.
2761         * tree-vect-loop.c (vect_update_vf_for_slp): Likewise.
2762         (vect_estimate_min_profitable_iters): Likewise.
2763         * tree-vect-slp.c (vect_record_max_nunits): Likewise.
2764         (vect_build_slp_tree_2): Likewise.
2765         (vect_supported_load_permutation_p): Likewise.
2766         (vect_slp_analyze_operations): Likewise.
2767         (vect_slp_analyze_bb_1): Likewise.
2768         (vect_slp_bb): Likewise.
2769         * tree-vect-stmts.c (vect_analyze_stmt): Likewise.
2770         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.
2771         (pass_slp_vectorize::execute): Likewise.
2772         (increase_alignment): Likewise.
2774 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
2776         PR ipa/87955
2777         * ipa-inline.c (report_inline_failed_reason): Guard calls to
2778         cl_target_option_print_diff and cl_optimization_print_diff with
2779         if (dump_file).
2781 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
2783         * doc/invoke.texi (-fsave-optimization-record): Note that the
2784         output is compressed.
2785         * optinfo-emit-json.cc: Include <zlib.h>.
2786         (optrecord_json_writer::write): Compress the output.
2788 2018-11-13  Aldy Hernandez  <aldyh@redhat.com>
2790         * tree-vrp.c (value_range_base::dump): Dump type.
2791         Do not use INF nomenclature for 1-bit types.
2792         (dump_value_range): Group all variants to common dumping code.
2793         (debug): New overloaded functions for value_ranges.
2794         (value_range_base::dump): Remove no argument version.
2795         (value_range::dump): Same.
2797 2018-11-13  Richard Biener  <rguenther@suse.de>
2799         PR tree-optimization/87931
2800         * tree-vect-loop.c (vect_is_simple_reduction): Restrict
2801         nested cycles we support to latch computations vectorizable_reduction
2802         handles.
2804 2018-11-13  Martin Liska  <mliska@suse.cz>
2806         PR tree-optimization/87885
2807         * cfghooks.c (account_profile_record): Rename
2808         to ...
2809         (profile_record_check_consistency): ... this.
2810         Calculate missing num_mismatched_freq_in.
2811         (profile_record_account_profile): New function
2812         that calculates time and size of a function.
2813         * cfghooks.h (struct profile_record): Remove
2814         all tuples.
2815         (struct cfg_hooks): Remove after_pass flag.
2816         (account_profile_record): Rename to ...
2817         (profile_record_check_consistency): ... this.
2818         (profile_record_account_profile): New.
2819         * cfgrtl.c (rtl_account_profile_record): Remove
2820         after_pass flag.
2821         * passes.c (check_profile_consistency): Do only
2822         checking.
2823         (account_profile): Calculate size and time of
2824         function only.
2825         (pass_manager::dump_profile_report): Reformat
2826         output.
2827         (execute_one_ipa_transform_pass): Call
2828         consistency check before clean upand call account_profile
2829         after a clean up is done.
2830         (execute_one_pass): Call check_profile_consistency and
2831         account_profile instead of using after_pass flag..
2832         * tree-cfg.c (gimple_account_profile_record): Likewise.
2834 2018-11-13  Martin Liska  <mliska@suse.cz>
2836         PR sanitizer/87930
2837         * config/i386/i386.c (ix86_option_override_internal): Error
2838         about usage -mabi=ms and -fsanitize={,kernel-}address.
2840 2018-11-13  Andre Vieira  <andre.simoesdiasvieira@arm.com>
2842         * config/aarch64/aarch64.c
2843         (aarch64_vectorize_preferred_vector_alignment): Change return type to
2844         poly_uint64.
2845         (aarch64_simd_vector_alignment_reachable): Adapt to preferred vector
2846         alignment being a poly int.
2847         * doc/tm.texi (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Change
2848         return type to poly_uint64.
2849         * target.def (default_preferred_vector_alignment): Likewise.
2850         * targhooks.c (default_preferred_vector_alignment): Likewise.
2851         * targhooks.h (default_preferred_vector_alignment): Likewise.
2852         * tree-vect-data-refs.c (vect_calculate_target_alignment): Likewise.
2853         (vect_compute_data_ref_alignment): Adapt to vector alignment being a
2854         poly int.
2855         (vect_update_misalignment_for_peel): Likewise.
2856         (vect_enhance_data_refs_alignment): Likewise.
2857         (vect_find_same_alignment_drs): Likewise.
2858         (vect_duplicate_ssa_name_ptr_info): Likewise.
2859         (vect_setup_realignment): Likewise.
2860         (vect_can_force_dr_alignment_p): Change alignment parameter type to
2861         poly_uint64.
2862         * tree-vect-loop-manip.c (get_misalign_in_elems): Learn to construct a
2863         mask with a compile time variable vector alignment.
2864         (vect_gen_prolog_loop_niters): Adapt to vector alignment being a poly
2865         int.
2866         (vect_do_peeling): Exit early if vector alignment is not constant.
2867         * tree-vect-stmts.c (ensure_base_align): Adapt to vector alignment being
2868         a poly int.
2869         (vectorizable_store): Likewise.
2870         (vectorizable_load): Likweise.
2871         * tree-vectorizer.h (struct dr_vec_info): Make target_alignment field a
2872         poly_uint64.
2873         (vect_known_alignment_in_bytes): Adapt to vector alignment being a
2874         poly int.
2875         (vect_can_force_dr_alignment_p): Change alignment parameter type to
2876         poly_uint64.
2878 2018-11-13  Richard Biener  <rguenther@suse.de>
2880         PR tree-optimization/87962
2881         * tree-vect-loop.c (vect_is_simple_reduction): More reliably
2882         detect outer reduction for disqualifying in-loop uses.
2884 2018-11-13  Richard Biener  <rguenther@suse.de>
2886         PR tree-optimization/87967
2887         * tree-vect-loop.c (vect_transform_loop): Also copy PHIs
2888         for constants for the scalar loop.
2890 2018-11-13  Alan Modra  <amodra@gmail.com>
2892         * config/rs6000/linux64.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Exclude
2893         integer constants when -mcmodel=medium.
2895 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
2897         * config/arc/arc.h (FUNCTION_PROFILER): Redefine to empty.
2898         * config/arc/elf.h (PROFILE_HOOK): Define.
2899         * config/arc/linux.h (PROFILE_HOOK): Likewise.
2901 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
2903         * config/arc/arc.c (hwloop_optimize): Bailout when detecting a
2904         jump table data in the text section.
2906 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
2908         * config/arc/arc.c (arc_eh_return_address_location): Repurpose it
2909         to fit the eh_return pattern.
2910         * config/arc/arc.md (eh_return): Define.
2911         (VUNSPEC_ARC_EH_RETURN): Likewise.
2912         * config/arc/arc-protos.h (arc_eh_return_address_location): Match
2913         new implementation.
2914         * config/arc/arc.h (EH_RETURN_HANDLER_RTX): Remove it.
2917 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
2919         * common/config/arc/arc-common.c (arc_option_optimization_table):
2920         Millicode optimization is default on for size optimizations.
2921         * config/arc/arc-protos.h (arc_check_multi): New function.
2922         * config/arc/arc.c (RTX_OK_FOR_OFFSET_P): Rearange.
2923         (ENTER_LEAVE_START_REG): Define.
2924         (ENTER_LEAVE_END_REG): Likewise.
2925         (arc_override_options): Disable millicode when long calls option
2926         is on.
2927         (arc_frame_info): Change it from int to bool.
2928         (arc_compute_frame_size): Clean up.
2929         (arc_save_restore): Remove.
2930         (frame_save_reg): New function.
2931         (frame_restore_reg): Likewise.
2932         (arc_enter_leave_p): Likewise.
2933         (arc_save_callee_saves): Likewise.
2934         (arc_restore_callee_saves): Likewise.
2935         (arc_save_callee_enter): Likewise.
2936         (arc_restore_callee_leave): Likewise.
2937         (arc_save_callee_milli): Likewise.
2938         (arc_restore_callee_milli): Likewise.
2939         (arc_expand_prologue): Reimplement to emit enter/leave
2940         instructions.
2941         (arc_expand_epilogue): Likewise.
2942         (arc_check_multi): New function.
2943         * config/arc/arc.md (push_multi_fp): New pattern.
2944         (push_multi_fp_blink): Likewise.
2945         (pop_multi_fp): Likewise.
2946         (pop_multi_fp_blink): Likewise.
2947         (pop_multi_fp_ret): Likewise.
2948         (pop_multi_fp_blink_ret): Likewise.
2949         * config/arc/arc.opt (mmillicode): Update option.
2950         (mcode-density-frame): New option.
2951         * config/arc/predicates.md (push_multi_operand): New predicate.
2952         (pop_multi_operand): Likewise.
2953         * doc/invoke.texi (ARC): Update ARC options information.
2956 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
2958         * config/arc/arc-protos.h (gen_operands_ldd_std): Add.
2959         * config/arc/arc.c (operands_ok_ldd_std): New function.
2960         (mem_ok_for_ldd_std): Likewise.
2961         (gen_operands_ldd_std): Likewise.
2962         * config/arc/arc.md: Add peephole2 rules for std/ldd.
2964 2018-11-13  Eric Botcazou  <ebotcazou@adacore.com>
2966         * toplev.c (output_stack_usage): Turn test on flag_stack_usage into
2967         test on stack_usage_file.
2968         (lang_dependent_init): Do not open the .su file if generating LTO.
2970 2018-11-13  Jakub Jelinek  <jakub@redhat.com>
2972         PR rtl-optimization/87918
2973         * simplify-rtx.c (simplify_merge_mask): For COMPARISON_P, use
2974         simplify_gen_relational rather than simplify_gen_binary.
2976 2018-11-13  Richard Biener  <rguenther@suse.de>
2978         * tree-ssanames.h (set_range_info): Use value_range_base.
2979         (get_range_info): Likewise.
2980         * tree-ssanames.c (set_range_info): Likewise.
2981         (get_range_info): Likewise.
2982         * tree-vrp.c (value_range_base::union_helper): Split
2983         out common parts of value_range[_base]::union_.
2984         (value_range_base::union_): Update.
2985         (value_range::union_): Likewise.
2986         (determine_value_range_1): Use value_range_base.
2987         (determine_value_range): Likewise.
2988         * tree-vrp.h (value_range_base::union_helper): Move ...
2989         (value_range::union_helper): ... from here.
2991 2018-11-13  Alan Modra  <amodra@gmail.com>
2993         * config/rs6000/rs6000.c (rs6000_secondary_reload_inner): Negate
2994         offset for PRE_DEC.
2995         (rs6000_secondary_reload_gpr): Don't call find_replacement.
2997 2018-11-13  Sandra Loosemore  <sandra@codesourcery.com>
2999         PR middle-end/59634
3000         * doc/invoke.texi (Optimize Options): Clarify that the
3001         l1-cache-line-size, l1-cache-size, and l2-cache-size parameters
3002         apply to data cache size.
3004 2018-11-13  Alan Modra  <amodra@gmail.com>
3006         * config/rs6000/predicates.md (logical_const_operand),
3007         (logical_operand): Correct comment.
3008         * config/rs6000/rs6000.c (rs6000_emit_prologue): Comment fix.
3010 2018-11-13  Alan Modra  <amodra@gmail.com>
3012         * config/rs6000/rs6000.md (addsi3_high): Prefix with '*'.
3014 2018-11-13  Alan Modra  <amodra@gmail.com>
3016         * gcc/doc/md.texi (Machine Constraints): Correct rs6000 h constraint
3017         description.
3018         * config/rs6000/rs6000.md (movsi_internal1): Delete MT%0 case
3019         covered by alternative.
3020         (movcc_internal1): Ignore h for register preference.
3021         (mov<mode>_hardfloat64): Likewise.
3022         (mov<mode>_softfloat): Ignore c, l, h for register preference.
3024 2018-11-12  Sandra Loosemore  <sandra@codesourcery.com>
3026         PR preprocessor/47823
3027         * doc/cpp.texi (Alternatives to Wrapper #ifndef): Move #pragma once
3028         documentation to...
3029         (Pragmas): ...here.
3030         * doc/extend.texi (Pragmas): Note additional pragmas documented
3031         in the CPP manual.
3033 2018-11-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
3035         PR middle-end/86677
3036         PR middle-end/87528
3037         * tree-scalar-evolution.c (expression_expensive_p): Make
3038         BUILTIN POPCOUNT as expensive when backend does not define it.
3040 2018-11-12  Fredrik Noring  <noring@nocrew.org>
3042         * config.gcc: Update with-llsc defaults for MIPS r5900.
3044 2018-11-12  Martin Liska  <mliska@suse.cz>
3046         PR gcov-profile/87442
3047         * common.opt: Add -fprofile-filter-files and -fprofile-exclude-files
3048         options.
3049         * doc/invoke.texi: Document them.
3050         * tree-profile.c (parse_profile_filter): New.
3051         (parse_profile_file_filtering): Likewise.
3052         (release_profile_file_filtering): Likewise.
3053         (include_source_file_for_profile): Likewise.
3054         (tree_profiling): Filter source files based on the
3055         newly added options.
3057 2018-11-12  Martin Liska  <mliska@suse.cz>
3059         PR target/87903
3060         * doc/extend.texi: Add missing values for __builtin_cpu_is and
3061         __builtin_cpu_supports for x86 target.
3063 2018-11-12  Sandra Loosemore  <sandra@codesourcery.com>
3065         PR middle-end/21110
3066         * doc/rtl.texi (Constants): Clarify that mode of "high" doesn't
3067         have to be Pmode.
3068         (Arithmetic): Likewise for "lo_sum".
3070 2018-11-12  Renlin Li  <renlin.li@arm.com>
3072         PR target/87815
3073         * dse.c (get_stored_val): Add check for compile-time constantness
3074         of gap.
3076 2018-11-12  Sudakshina Das  <sudi.das@arm.com>
3078         * config/arm/arm-cpus.in (armv8_5, sb, predres): New features.
3079         (ARMv8_5a): New fgroup.
3080         (armv8.5-a): New arch.
3081         (armv8-a, armv8.1-a, armv8.2-a, armv8.3-a, armv8.4-a): New options
3082         sb and predres.
3083         * config/arm/arm-tables.opt: Regenerate.
3084         * config/arm/t-aprofile: Add matching rules for -march=armv8.5-a
3085         * config/arm/t-arm-elf (all_v8_archs): Add armv8.5-a.
3086         * config/arm/t-multilib (v8_5_a_simd_variants): New variable.
3087         Add matching rules for -march=armv8.5-a and extensions.
3088         * doc/invoke.texi (ARM options): Document -march=armv8.5-a.
3089         Add sb and predres to all armv8-a except armv8.5-a.
3091 2018-11-12  Richard Biener  <rguenther@suse.de>
3093         * tree-vrp.h (value_range[_base]::set): Make public.  Provide
3094         overload for single value.
3095         (value_range[_base]::set_nonnull): New.
3096         (value_range[_base]::set_null): Likewise.
3097         (value_range): Document bitmap copying behavior, mark
3098         copy constructor and assignment operator deleted.
3099         (value_range::move): New.
3100         (value_range::set_and_canonicalize): Default bitmap to zero.
3101         (set_value_range_to_nonnull): Remove.
3102         (set_value_range_to_null): Likewise.
3103         (set_value_range): Likewise.
3104         (set_value_range_to_value): Likewise.
3105         (extract_range_from_unary_expr): Work on value_range_base.
3106         (extract_range_from_binary_expr_1): Likewise.  Rename to...
3107         (extract_range_from_binary_expr): ... this.
3108         * tree-vrp.c (value_range::update): Clear equiv bitmap
3109         if required.
3110         (value_range::move): New, move equiv bitmap.
3111         (value_range_base::set_undefined): Avoid assignment.
3112         (value_range::set_undefined): Likewise.
3113         (value_range_base::set_varying): Likewise.
3114         (value_range::set_varying): Likewise.
3115         (set_value_range): Remove.
3116         (value_range_base::set): New overload for value.
3117         (value_range::set): Likewise.
3118         (set_value_range_to_nonnull): Remove.
3119         (value_range_base::set_nonnull): New.
3120         (value_range::set_nonnull): Likewise.
3121         (set_value_range_to_null): Remove.
3122         (value_range_base::set_null): New.
3123         (value_range::set_null): Likewise.
3124         (range_is_null): Work on value_range_base.
3125         (range_is_nonnull): Likewise.
3126         (ranges_from_anti_range): Likewise.
3127         (extract_range_into_wide_ints): Likewise.
3128         (extract_range_from_multiplicative_op): Likewise.
3129         (extract_range_from_binary_expr): Likewise.  Update for API changes.
3130         (extract_range_from_unary_expr): Likewise.  Remove OBJ_TYPE_REF
3131         handling.
3132         (value_range::intersect_helper): Avoid copy and assignment.
3133         (value_range::union_helper): Likewise.
3134         (determine_value_range_1): Adjust.
3135         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
3136         Avoid assignment by using move.
3137         (evrp_range_analyzer::record_ranges_from_stmt): Avoid assignment.
3138         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
3139         Likewise.
3140         * tree-ssanames.c (get_range_info): Likewise.
3141         * vr-values.h (vr_values::get_vr_for_comparison): Adjust API.
3142         * vr-values.c (vr_values::get_value_range): Adjust.
3143         (vr_values::update_value_range): Likewise.
3144         (symbolic_range_based_on_p): Work on value_range_base.
3145         (vr_values::extract_range_from_binary_expr): Use value_range_base.
3146         (vr_values::extract_range_from_unary_expr): Likewise.
3147         (vr_values::extract_range_from_cond_expr): Avoid assignment.
3148         (vr_values::extract_range_from_comparison): Adjust.
3149         (vr_values::check_for_binary_op_overflow): Use value_range_base.
3150         (vr_values::extract_range_basic): Adjust.
3151         (vr_values::adjust_range_with_scev): Likewise.
3152         (vr_values::vrp_visit_assignment_or_call): Likewise.
3153         (vr_values::get_vr_for_comparison): Change API to avoid
3154         assignment and copy construction.
3155         (vr_values::compare_name_with_value): Adjust accordingly.
3156         (vr_values::compare_names): Likewise.
3157         (vr_values::extract_range_from_phi_node): Avoid assignment and
3158         bogus in-place modify of equiv bitmap.
3159         (vr_values::simplify_bit_ops_using_ranges): Use value_range_base.
3160         * ipa-prop.c (ipa_compute_jump_functions_for_edge): Adjust
3161         for extract_range_from_unary_expr API change.
3162         * ipa-cp.c (ipa_vr_operation_and_type_effects): Likewise.
3164 2018-11-12  Eric Botcazou  <ebotcazou@adacore.com>
3166         * config/mcore/mcore.h (WORD_REGISTER_OPERATIONS): Remove duplicate.
3168 2018-11-12  Richard Biener  <rguenther@suse.de>
3170         * tree-vrp.h (value_range_base::symbolic_p,
3171         value_range_base::constant_p, value_range_base::zero_p,
3172         value_range_base::singleton_p): Move from value_range.
3173         (value_range::dump): Add.
3174         * gimple-ssa-evrp-analyze.c
3175         (evrp_range_analyzer::record_ranges_from_phis): Use set_varying.
3176         * ipa-cp.c (ipcp_vr_lattice::print): Use dump_value_range.
3177         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
3178         Use set_varying.
3179         * tree-vrp.c (value_range::symbolic_p): Move to value_range_base.
3180         (value_range::constant_p): Likewise.
3181         (value_range::singleton_p): Likewise.
3182         (value_range_base::dump): Add.
3183         (set_value_range_to_undefined): Remove.
3184         (set_value_range_to_varying): Likewise.
3185         (range_int_cst_p): Take value_range_base argument.
3186         (range_int_cst_singleton_p): Likewise.
3187         (value_range_constant_singleton): Likewise.
3188         (vrp_set_zero_nonzero_bits): Likewise.
3189         (extract_range_from_multiplicative_op): Use set_varying.
3190         (extract_range_from_binary_expr_1): Likewise. Use set_undefined.
3191         (extract_range_from_unary_expr): Likewise.
3192         (dump_value_range_base): Change to overload of dump_value_range.
3193         (vrp_prop::vrp_initialize): Use set_varying and set_undefined.
3194         (vrp_prop::visit_stmt): Likewise.
3195         (value_range::intersect_helper): Likewise.
3196         (value_range::union_helper): Likewise.
3197         (determine_value_range_1): Likewise.
3199 2018-11-12  Richard Biener  <rguenther@suse.de>
3201         * tree-vrp.c (set_value_range_to_nonnull): Clear equiv.
3202         (set_value_range_to_null): Likewise.
3203         * vr-values.c (vr_values::extract_range_from_comparison):
3204         Clear equiv for constant singleton ranges.
3206 2018-11-12 Wei Xiao <wei3.xiao@intel.com>
3208         * config/i386/sse.md: Combine VFIXUPIMM* patterns
3209         (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
3210         (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
3211         (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Remove.
3212         (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
3213         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
3214         (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Remove.
3216 2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>
3218         PR c/69502
3219         * doc/extend.texi (Common Type Attributes): For the align type
3220         attribute, copy language about decreasing alignment from the
3221         corresponding variable attribute.
3223 2018-11-11  Xianmiao Qu  <xianmiao_qu@c-sky.com>
3225         * config/csky/csky.md (*fpuv2_nmulsf3_1, *fpuv2_nmuldf3_1): Handle
3226         -frounding-math.
3228 2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>
3230         PR c++/43105
3231         * doc/invoke.texi (C++ Dialect Options): Add warning about mixing
3232         -frtti and -fno-rtti code.
3234 2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>
3236         PR c/26366
3237         * doc/extend.texi (Other Builtins): Document probability associated
3238         with __builtin_expect.
3240 2018-11-11  Uros Bizjak  <ubizjak@gmail.com>
3242         PR target/87928
3243         * config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI
3244         instead of (TARGET_64BIT && ix86_abi == MS_ABI).
3245         * config/i386/darwin.h (STACK_BOUNDARY): Ditto.
3246         * config/i386/cygming.h (STACK_BOUNDARY): Remove.
3248 2018-11-11  Xianmiao Qu  <xianmiao_qu@c-sky.com>
3250         * config/csky/csky-linux-elf.h (CC1_SPEC): Support -profile.
3252 2018-11-11  Xianmiao Qu  <xianmiao_qu@c-sky.com>
3254         * config/csky/csky.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
3256 2018-11-11  Richard Biener  <rguenther@suse.de>
3258         * tree-vrp.h (class value_range_base): New base class for
3259         value_range containing all but the m_equiv member.
3260         (dump_value_range_base): Add.
3261         (range_includes_zero_p): Work on value_range_base.
3262         * tree-vrp.c (value_range_base::set): Split out base handling
3263         from...
3264         (value_range::set): this.
3265         (value_range::set_equiv): New.
3266         (value_range_base::value_range_base): New constructors.
3267         (value_range_base::check): Split out base handling from...
3268         (value_range::check): this.
3269         (value_range::equal_p): Refactor in terms of
3270         ignore_equivs_equal_p which is now member of the base.
3271         (value_range_base::set_undefined): New.
3272         (value_range_base::set_varying): Likewise.
3273         (value_range_base::dump):Split out base handling from...
3274         (value_range::dump): this.
3275         (value_range_base::set_and_canonicalize): Split out base handling
3276         from...
3277         (value_range::set_and_canonicalize): this.
3278         (value_range_base::union_): New.
3279         * ipa-prop.h (struct ipa_jump_func): Use value_range_base *
3280         for m_vr.
3281         * ipa-cp.c (class ipcp_vr_lattice): Use value_range_base
3282         instead of value_range everywhere.
3283         (ipcp_vr_lattice::print): Use dump_value_range_base.
3284         (ipcp_vr_lattice::meet_with): Adjust.
3285         (ipcp_vr_lattice::meet_with_1): Likewise.
3286         (ipa_vr_operation_and_type_effects): Likewise.
3287         (propagate_vr_across_jump_function): Likewise.
3288         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Likewise.
3289         (ipa_get_value_range): Likewise.
3290         (ipa_set_jfunc_vr): Likewise.
3291         (ipa_compute_jump_functions_for_edge): Likewise.
3293 2018-11-10  Sandra Loosemore  <sandra@codesourcery.com>
3295         PR middle-end/65703
3296         * doc/invoke.texi (Optimize Options): Add @opindex entries
3297         for the positive forms of -fno-xxx and -mno-xxx options
3298         that were lacking them.
3300 2018-11-10  Segher Boessenkool  <segher@kernel.crashing.org>
3302         * combine.c (make_more_copies): Only make an intermediate copy if the
3303         dest of a move is a pseudo.
3305 2018-11-09  Maya Rashish  <coypu@sdf.org>
3307         PR target/87221
3308         * config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): Use crtbeginS.o for PIE.
3309         (NETBSD_ENDFILE_SPEC): Use crtendS.o for PIE.
3311 2018-11-09  Sandra Loosemore  <sandra@codesourcery.com>
3313         PR driver/41179
3314         PR middle-end/65703
3315         * doc/invoke.texi (Optimize Options): Clarify default behavior
3316         for -fno-toplevel-reorder, -fno-defer-pop, and -fno-branch-count-reg.
3318 2018-11-09  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3320         PR tree-optimization/87940
3321         * expr.c (string_constant): Don't strip NOPS in subexpressions.
3322         Fold PLUS_EXPR correctly.
3324 2018-11-09  Ilya Leoshkevich  <iii@linux.ibm.com>
3326         PR target/87762
3327         * config/s390/s390.c (s390_safe_relative_long_p): New function.
3328         (annotate_constant_pool_refs): Skip insns which support
3329         relative addressing.
3330         (annotate_constant_pool_refs_1): New helper function.
3331         (find_constant_pool_ref): Skip insns which support relative
3332         addression.
3333         (find_constant_pool_ref_1): New helper function.
3334         (replace_constant_pool_ref): Skip insns which support
3335         relative addressing.
3336         (replace_constant_pool_ref_1): New helper function.
3337         (s390_mainpool_start): Adapt to the new signature.
3338         (s390_mainpool_finish): Likewise.
3339         (s390_chunkify_start): Likewise.
3340         (s390_chunkify_finish): Likewise.
3341         (pass_s390_early_mach::execute): Likewise.
3342         (s390_prologue_plus_offset): Likewise.
3343         (s390_emit_prologue): Likewise.
3344         (s390_emit_epilogue): Likewise.
3346 2018-11-09  Jakub Jelinek  <jakub@redhat.com>
3348         * gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid
3349         but unsupported lastprivate with conditional modifier.
3351 2018-11-09  Jeff Law  <law@redhat.com>
3353         * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): Handle
3354         unused argument better.  Add gcc_unreachable to silence warning.
3356 2018-11-09  Martin Sebor  <msebor@redhat.com>
3358         PR middle-end/81824
3359         * attribs.c (has_attribute): New helper function.
3360         (decls_mismatched_attributes, maybe_diag_alias_attributes): Same.
3361         * attribs.h (decls_mismatched_attributes): Declare.
3362         * cgraphunit.c (handle_alias_pairs): Call maybe_diag_alias_attributes.
3363         (maybe_diag_incompatible_alias): Use OPT_Wattribute_alias_.
3364         * common.opt (-Wattribute-alias): Take an argument.
3365         (-Wno-attribute-alias): New option.
3366         * doc/extend.texi (Common Function Attributes): Document copy.
3367         (Common Variable Attributes): Same.
3368         * doc/invoke.texi (-Wmissing-attributes): Document enhancement.
3369         (-Wattribute-alias): Document new option argument.
3371 2018-11-09  Richard Earnshaw  <rearnsha@arm.com>
3373         * config/arm/parsecpu.awk (/alias/): Tighten invisible alias
3374         matching criteria.  Remove unused array initializer.
3376 2018-11-09  Bill Schmidt  <wschmidt@linux.ibm.com>
3377             Jinsong Ji  <jji@us.ibm.com>
3379         * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix incorrect
3380         constraints by introducing a new temporary.
3381         (_mm_cvtss_si64): Likewise.
3383 2018-11-09  Martin Liska  <mliska@suse.cz>
3385         * common.opt: Add -fipa-stack-alignment flag.
3386         * doc/invoke.texi: Document it.
3387         * final.c (rest_of_clean_state): Guard stack
3388         shrinking with flag.
3390 2018-11-09  Martin Liska  <mliska@suse.cz>
3392         * cgraph.h (ipa_discover_readonly_nonaddressable_vars): Rename
3393         to ...
3394         (ipa_discover_variable_flags): ... this.
3395         * common.opt: Come up with new flag -fipa-reference-addressable.
3396         * doc/invoke.texi: Document it.
3397         * ipa-reference.c (propagate): Call the renamed fn.
3398         * ipa-visibility.c (whole_program_function_and_variable_visibility):
3399         Likewise.
3400         * ipa.c (ipa_discover_readonly_nonaddressable_vars): Renamed to
3401         ...
3402         (ipa_discover_variable_flags): ... this.  Discover
3403         non-addressable variables only with the newly added flag.
3404         * opts.c: Enable the newly added flag with -O1 and higher
3405         optimization level.
3407 2018-11-09  David Malcolm  <dmalcolm@redhat.com>
3409         * json.cc (selftest::test_writing_literals): Fix comment.
3411 2018-11-09  Martin Liska  <mliska@suse.cz>
3413         * config/aarch64/aarch64.c (aarch64_parse_arch): Do not copy
3414         string to a stack buffer.
3415         (aarch64_parse_cpu): Likewise.
3416         (aarch64_parse_tune): Likewise.
3418 2018-11-09  Richard Biener  <rguenther@suse.de>
3420         PR tree-optimization/87953
3421         * tree-vect-loop.c (vectorizable_reduction): For analysis
3422         always pass ops[0] to vectorizable_condition.
3424 2018-11-09  Stafford Horne  <shorne@gmail.com>
3425             Richard Henderson  <rth@twiddle.net>
3426             Joel Sherrill  <joel@rtems.org>
3428         * common/config/or1k/or1k-common.c: New file.
3429         * config/or1k/*: New.
3430         * config.gcc (or1k*-*-*): New.
3431         * configure.ac (or1k*-*-*): New test for openrisc tls.
3432         * configure: Regenerated.
3433         * doc/install.texi: Document OpenRISC triplets.
3434         * doc/invoke.texi: Document OpenRISC arguments.
3435         * doc/md.texi: Document OpenRISC.
3437 2018-11-09  Richard Earnshaw  <rearnsha@arm.com>
3439         * config/arm/arm-cpus.in (arm7tdmi): Add an alias for arm7tdmi-s.
3440         (arm7tdmi-s): Delete CPU.
3441         (arm710t): Add aliases for arm720t and arm740t.
3442         (arm720t, arm740t): Delete CPUs.
3443         (arm920t): Add aliases for arm920, arm922t and arm940t.
3444         (arm920, arm922t, arm940t): Delete CPUs.
3445         (arm10tdmi): Add alias for arm1020t.
3446         (arm1020t): Delete CPU.
3447         (arm9e): Add aliases for arm946e-s, arm966e-s and arm968e-s.
3448         (arm946e-s, arm966e-s, arm968e-s): Delete CPUs.
3449         (arm10e): Add aliases for arm1020e and arm1022e.
3450         (arm1020e, arm1022e): Delete CPU.
3451         * config/arm/arm.md (generic_sched): Remove entries that are now
3452         handled by aliases.
3453         (generic_vfp): Likewise.
3454         * config/arm/arm1020e.md: Simplify tuning selection based on alias
3455         changes.
3456         * config/arm/arm-tune.md: Regenerated.
3457         * config/arm/arm-tables.opt: Regenerated.
3459 2018-11-09  Richard Biener  <rguenther@suse.de>
3461         PR tree-optimization/87621
3462         * tree-vect-loop.c (vectorizable_reduction): Handle reduction
3463         op with only phi inputs.
3464         * tree-ssa-loop-ch.c: Include tree-ssa-sccvn.h.
3465         (ch_base::copy_headers): Run CSE on copied loop headers.
3466         (pass_ch_vect::process_loop_p): Simplify.
3468 2018-11-09  Alexandre Oliva <oliva@adacore.com>
3470         * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Adjust
3471         for non-w64 x86_64 biarch.
3473 2018-11-09  Alexandre Oliva <aoliva@redhat.com>
3475         PR rtl-optimization/86438
3476         * compare-elim.c (try_eliminate_compare): Use SET_SRC instead
3477         of in_b for the compare if in_b is SET_DEST.
3479         PR target/87793
3480         * config/i386/i386.c (ix86_const_not_ok_for_debug_p): Reject
3481         non-toplevel UNSPEC.
3483 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
3485         * tree-vrp.c (value_range::check): Do not access internals
3486         directly.
3487         (value_range::singleton_p): Same.
3488         (value_range::type): Same.
3489         (vrp_finalize): Use value_range API.
3491 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
3493         * tree-vrp.c (may_contain_p): Do not access m_min/m_max directly.
3495 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
3497         * vr-values.c (vr_values::get_value_range): Use value_range API
3498         instead of piecing together ranges.
3499         (vr_values::update_value_range): Same.
3501 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
3503         * gimple-fold.c (size_must_be_zero_p): Use value_range API instead
3504         of performing ad-hoc calculations.
3505         * tree-ssanames.c (set_range_info): New overloaded function
3506         accepting value_range &.
3507         (get_range_info): Same.
3508         * tree-ssanames.h (set_range_info_raw): Remove.
3509         (set_range_info): New prototype.
3510         (get_range_info): Same.
3511         * tree-vrp.h (value_range::null_p): Rename to zero_p.
3512         * tree-vrp.c (value_range::null_p): Same.
3514 2018-11-09  Jan Hubicka  <jh@suse.cz>
3516         * tree.c (fld_type_variant_equal_p): Test user align flag.
3517         (flt_type_variant): Copy user align flag.
3518         (fld_incomplete_type_of): Clear it.
3520 2018-11-09  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3522         * config/arm/neon.md (div<mode>3): New pattern.
3524 2018-11-08  Andi Kleen  <ak@linux.intel.com>
3526         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET): New.
3527         (OPTION_MASK_ISA_PTWRITE_UNSET): New.
3528         (ix86_handle_option): Handle OPT_mptwrite.
3529         * config/i386/cpuid.h (bit_PTWRITE): Add.
3530         * config/i386/driver-i386.c (host_detect_local_cpu): Detect ptwrite.
3531         * config/i386/i386-builtin.def (BDESC): Add ptwrite32/64.
3532         * config/i386/i386-c.c (ix86_target_macros_internal): Define __PTWRITE__.
3533         * config/i386/i386.c (ix86_target_string): Handle ptwrite.
3534         (ix86_option_override_internal): Handle PTA_PTWRITE.
3535         (ix86_valid_target_attribute_inner_p): Define ptwrite.
3536         (def_builtin2): Force UINT64 to be 64bit only.
3537         * config/i386/i386.h (TARGET_PTWRITE): Add.
3538         (TARGET_PTWRITE_P): Add.
3539         (PTA_PTWRITE): Add.
3540         * config/i386/i386.md: Define ptwrite.
3541         * config/i386/i386.opt: Add -mptwrite.
3542         * config/i386/immintrin.h (_ptwrite64): Add.
3543         (_ptwrite32): Add
3544         * doc/extend.texi: Document __builtin_ia32_ptwrite*.
3545         * doc/invoke.texi: Document -mptwrite.
3547 2018-11-08  Peter Bergner  <bergner@linux.ibm.com>
3549         PR rtl-optimization/87600
3550         * cfgexpand.c (expand_asm_stmt): Catch illegal asm constraint usage.
3551         * lra-constraints.c (process_alt_operands): Skip illegal hard
3552         register usage.  Prefer reloading non hard register operands.
3554 2018-11-08  Sandra Loosemore  <sandra@codesourcery.com>
3556         PR other/36572
3557         * doc/invoke.texi (Optimize Options): Clarify default behavior
3558         for -fno-sched-interblock and -fno-sched-spec.
3560 2018-11-08  Roman Geissler  <roman.geissler@amadeus.com>
3562         * collect2.c (linker_select):  Add USE_LLD_LD.
3563         (ld_suffixes): Add ld.lld.
3564         (main): Handle -fuse-ld=lld.
3565         * common.opt (-fuse-ld=lld): New option.
3566         * doc/invoke.texi (-fuse-ld=lld): Document.
3567         * opts.c (common_handle_option): Handle OPT_fuse_ld_lld.
3569 2018-11-08  Paul Koning  <ni1d@arrl.net>
3571         * config/pdp11/constraints.md: Add "Z" series constraints for use
3572         with pre-dec and post-inc addressing.
3573         * config/pdp11/pdp11-protos.m (expand_block_move): Delete.
3574         (pdp11_expand_operands): Add int argument (word count).
3575         (pdp11_sp_frame_offset): Delete.
3576         (pdp11_cmp_length): New function.
3577         (pushpop_regeq): New function.
3578         * config/pdp11/pdp11.c (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P):
3579         Add hook.
3580         (pdp11_expand_prologue, pdp11_expand_epilogue): Rewrite for new
3581         frame layout.
3582         (pdp11_initial_elimination_offset): Ditto.
3583         (pdp11_expand_operands): Add word count argument.  Bugfixes.
3584         (output_move_multiple): Change how pointer adjustment is done.
3585         (pdp11_gen_int_label): Correct format.
3586         (output_ascii): Ditto.
3587         (pdp11_asm_output_var): Add code for DEC assembler case.
3588         (pdp11_asm_print_operand): Bugfix for CONST_DOUBLE holding integer
3589         value.
3590         (legitimate_const_double_p): Ditto.
3591         (pdp11_register_move_cost): Adjust for new register classes.
3592         (pdp11_regno_reg_class): Ditto.
3593         (expand_block_move): Delete.
3594         (pushpop_regeq): New function.
3595         (pdp11_legitimate_address_p): Bugfix in check for constant
3596         offset.
3597         (pdp11_sp_frame_offset): Delete.
3598         (pdp11_reg_save_size): New helper function for new frame layout.
3599         (output_addr_const_pdp11): Remove CONST_DOUBLE case.
3600         (pdp11_expand_shift): Bugfix in check for constant shift count.
3601         (pdp11_shift_length): Ditto.
3602         (pdp11_assemble_shift): Copy input to pdp11_expand_operands.
3603         (pdp11_cmp_length): New function.
3604         * config/pdp11/pdp11.h (TARGET_CPU_CPP_BUILTINS): Add macros for
3605         some compile options.
3606         (FIXED_REGISTERS): Remove HARD_FRAME_POINTER_REGNUM.
3607         (CALL_USED_REGISTERS): Ditto.
3608         (ELIMINABLE_REGS): Ditto.
3609         (REGISTER_NAMES): Ditto.
3610         (reg_class): Add classes NOTR0_REG through NOTSP_REG for use by Z
3611         constraints.
3612         (REG_CLASS_NAMES): Ditto.
3613         (REG_CLASS_CONTENTS): Ditto.  Also remove
3614         HARD_FRAME_POINTER_REGNUM.
3615         (CPU_REG_CLASS): New macro.
3616         (CLASS_MAX_NREGS): Adjust for new register classes.
3617         (FUNCTION_PROFILER): Make no-op.
3618         (may_call_alloca): Remove unused declaration.
3619         (ASM_OUTPUT_ALIGN): Add workaround for PR87795.
3620         (ASM_OUTPUT_SKIP): Fix format.
3621         * config/pdp11/pdp11.md (unspecv): Add UNSPECV_MOVMEM.
3622         (HARD_FRAME_POINTER_REGNUM): Remove.
3623         (return): Delete.
3624         (*rts): Rename.  Remove epilogue related checks.
3625         (cmpsi, cmpdi): New insn.
3626         (cbranch<mode>4): Change to apply to SI and DI modes as well.
3627         (mov<mode>): Change constraints to enforce that push/pop
3628         destination cannot use the same register as source.
3629         (*mov<mode><cc_cc>): Ditto.
3630         (movmemhi, movmemhi1, movmemhi_nocc): Change to expand block move
3631         at assembly output rather than as RTL expander.
3632         (zero_extendqihi2): Bugfix in check for same registers.
3633         (adddi3_nocc): Bugfix in check for constant operand.
3634         (addsi3_nocc): Ditto.
3635         (subdi3_nocc): Ditto.
3636         (subsi3_nocc): Ditto.
3637         (negdi2_nocc): Copy input to pdp11_expand_operands.
3638         (negsi2_nocc): Ditto.
3639         (bswap2_nocc): Ditto.
3640         * config/pdp11/pdp11.opt (mlra): Fix documentation.
3641         * config/pdp11/t-pdp11: Use -Os.
3643 2018-11-08  Richard Earnshaw  <rearnsha@arm.com>
3645         * config/arm/parsecpu.awk (/alias/): New parsing rule.
3646         (/begin cpu/): Check that the cpu name hasn't been previously defined.
3647         (gen_comm_data): Print out CPU alias tables.
3648         (check_cpu): Match aliases when checking the CPU name.
3649         * config/arm/arm-protos.h (cpu_alias): New structure.
3650         (cpu_option): Add entry for aliases.
3651         * config/arm/arm-cpus.in (strongarm): Add aliases for strongarm110
3652         strongarm1100 and strongarm1110.
3653         (strongarm110, strongarm1100, strongarm1110): Delete CPU entries.
3654         (config/arm/arm-generic.md): Remove redundant references to
3655         strongarm110, strongarm1100 and strongarm1110.
3656         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
3657         Scan aliases for additional hints.
3658         (arm_parse_cpu_option_name): Also match a cpu name against the list
3659         of aliases.
3660         * config/arm/arm-tables.opt: Regenerated.
3661         * config/arm/arm-tune.md: Regenerated.
3663 2018-11-08  Jakub Jelinek  <jakub@redhat.com>
3665         * builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
3666         BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
3667         BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
3668         BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
3669         BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
3670         BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
3671         * gengtype.c (open_base_files): Add omp-general.h.
3672         * gimple.c (gimple_build_omp_critical):
3673         (gimple_build_omp_taskgroup): Add CLAUSES argument.  Call
3674         gimple_omp_taskgroup_set_clauses.
3675         (gimple_build_omp_atomic_load): Add mo argument, call
3676         gimple_omp_atomic_set_memory_order.
3677         (gimple_build_omp_atomic_store): Likewise.
3678         (gimple_copy): Adjust handling of GIMPLE_OMP_TASKGROUP.
3679         * gimple.def (GIMPLE_OMP_TASKGROUP): Use GSS_OMP_SINGLE_LAYOUT
3680         instead of GSS_OMP.
3681         (GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
3682         of GSS_OMP_SINGLE_LAYOUT, adjust comments.
3683         * gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST, GF_OMP_TASK_TASKWAIT
3684         and GF_OMP_ATOMIC_MEMORY_ORDER.  Remove GF_OMP_ATOMIC_SEQ_CST, use
3685         different value for GF_OMP_ATOMIC_NEED_VALUE.
3686         (struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
3687         comments.
3688         (struct gimple_statement_omp_single_layout): And remove here.
3689         (struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
3690         than gimple_statement_omp_single_layout.
3691         (is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
3692         GIMPLE_OMP_TEAMS.
3693         (is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
3694         (gimple_omp_subcode): Formatting fix.
3695         (gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
3696         gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
3697         gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
3698         gimple_omp_teams_host, gimple_omp_teams_set_host,
3699         gimple_omp_task_taskwait_p, gimple_omp_task_set_taskwait_p,
3700         gimple_omp_taskgroup_clauses, gimple_omp_taskgroup_clauses_ptr,
3701         gimple_omp_taskgroup_set_clauses): New inline functions.
3702         (gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
3703         (gimple_build_omp_atomic_store): Likewise.
3704         (gimple_omp_atomic_seq_cst_p): Remove.
3705         (gimple_omp_atomic_memory_order): New function.
3706         (gimple_omp_atomic_set_seq_cst): Remove.
3707         (gimple_omp_atomic_set_memory_order): New function.
3708         (gimple_build_omp_taskgroup): Add clauses argument.
3709         * gimple-pretty-print.c (dump_gimple_omp_taskgroup): New function.
3710         (dump_gimple_omp_task): Print taskwait with depend clauses.
3711         (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Use
3712         dump_omp_atomic_memory_order.
3713         (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
3714         * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALLOC_ONLY,
3715         GOVD_MAP_FROM_ONLY and GOVD_NONTEMPORAL.
3716         (enum omp_region_type): Reserve bits 1 and 2 for auxiliary flags,
3717         renumber values of most of ORT_* enumerators, add ORT_HOST_TEAMS,
3718         ORT_COMBINED_HOST_TEAMS, ORT_TASKGROUP, ORT_TASKLOOP and
3719         ORT_UNTIED_TASKLOOP enumerators.
3720         (enum gimplify_defaultmap_kind): New.
3721         (struct gimplify_omp_ctx): Remove target_map_scalars_firstprivate and
3722         target_map_pointers_as_0len_arrays members, add defaultmap.
3723         (new_omp_context): Initialize defaultmap member.
3724         (gimple_add_tmp_var): Handle ORT_TASKGROUP like ORT_WORKSHARE.
3725         (maybe_fold_stmt): Don't fold even in host teams regions.
3726         (omp_firstprivatize_variable): Handle ORT_TASKGROUP like
3727         ORT_WORKSHARE.  Test ctx->defaultmap[GDMK_SCALAR] instead of
3728         ctx->omp_firstprivatize_variable.
3729         (omp_add_variable): Don't add private/firstprivate for VLAs in
3730         ORT_TASKGROUP.
3731         (omp_default_clause): Print "taskloop" rather than "task" if
3732         ORT_*TASKLOOP.
3733         (omp_notice_variable): Handle ORT_TASKGROUP like ORT_WORKSHARE.
3734         Handle new defaultmap clause kinds.
3735         (omp_is_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.  Allow simd
3736         iterator to be lastprivate or private.  Fix up diagnostics if linear
3737         is used on collapse>1 simd iterator.
3738         (omp_check_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.
3739         (gimplify_omp_depend): New function.
3740         (gimplify_scan_omp_clauses): Add shared clause on parallel for
3741         combined parallel master taskloop{, simd} if taskloop has
3742         firstprivate, lastprivate or reduction clause.  Handle
3743         OMP_CLAUSE_REDUCTION_TASK diagnostics.  Adjust tests for
3744         ORT_COMBINED_TEAMS.  Gimplify depend clauses with iterators.  Handle
3745         cancel and simd OMP_CLAUSE_IF_MODIFIERs.  Handle
3746         OMP_CLAUSE_NONTEMPORAL.  Handle new defaultmap clause kinds.  Handle
3747         OMP_CLAUSE_{TASK,IN}_REDUCTION.  Diagnose invalid conditional
3748         lastprivate.
3749         (gimplify_adjust_omp_clauses_1): Ignore GOVD_NONTEMPORAL.  Handle
3750         GOVD_MAP_ALLOC_ONLY and GOVD_MAP_FROM_ONLY.
3751         (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NONTEMPORAL.  Handle
3752         OMP_CLAUSE_{TASK,IN}_REDUCTION.
3753         (gimplify_omp_task): Handle taskwait with depend clauses.
3754         (gimplify_omp_for): Add shared clause on parallel for combined
3755         parallel master taskloop{, simd} if taskloop has firstprivate,
3756         lastprivate or reduction clause.  Use ORT_TASKLOOP or
3757         ORT_UNTIED_TASKLOOP instead of ORT_TASK or ORT_UNTIED_TASK.  Adjust
3758         tests for ORT_COMBINED_TEAMS.  Handle C++ range for loops with
3759         NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS.  Firstprivatize
3760         __for_end and __for_range temporaries on OMP_PARALLEL for
3761         distribute parallel for{, simd}.  Move OMP_CLAUSE_REDUCTION
3762         and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
3763         sandwiched in between two taskloops.
3764         (computable_teams_clause): Test ctx->defaultmap[GDMK_SCALAR]
3765         instead of ctx->omp_firstprivatize_variable.
3766         (gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
3767         ORT_COMBINED_HOST_TEAMS if not inside of target construct.  If
3768         host teams, use gimplify_and_return_first etc. for body like
3769         for target or target data constructs, and at the end call
3770         gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
3771         (gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
3772         of OMP_ATOMIC_SEQ_CST, pass it as new argument to
3773         gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
3774         gimple_omp_atomic_set_seq_cst calls.
3775         (gimplify_expr) <case OMP_TASKGROUP>: Move handling into a separate
3776         case, handle taskgroup clauses.
3777         * lto-streamer-out.c (hash_tree): Handle
3778         OMP_CLAUSE_{TASK,IN}_REDUCTION.
3779         * Makefile.in (GTFILES): Add omp-general.h.
3780         * omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND,
3781         BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
3782         BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
3783         BUILT_IN_GOMP_LOOP_START, BUILT_IN_GOMP_LOOP_ORDERED_START,
3784         BUILT_IN_GOMP_LOOP_DOACROSS_START,
3785         BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
3786         BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
3787         BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
3788         BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
3789         BUILT_IN_GOMP_LOOP_ULL_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_START,
3790         BUILT_IN_GOMP_LOOP_ULL_DOACROSS_START,
3791         BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
3792         BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
3793         BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
3794         BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME,
3795         BUILT_IN_GOMP_PARALLEL_REDUCTIONS, BUILT_IN_GOMP_SECTIONS2_START,
3796         BUILT_IN_GOMP_TEAMS_REG, BUILT_IN_GOMP_TASKGROUP_REDUCTION_REGISTER,
3797         BUILT_IN_GOMP_TASKGROUP_REDUCTION_UNREGISTER,
3798         BUILT_IN_GOMP_TASK_REDUCTION_REMAP,
3799         BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER): New builtins.
3800         * omp-expand.c (workshare_safe_to_combine_p): Return false for
3801         non-worksharing loops.
3802         (omp_adjust_chunk_size): Don't adjust anything if chunk_size is zero.
3803         (determine_parallel_type): Don't combine parallel with worksharing
3804         which has _reductemp_ clause.
3805         (expand_parallel_call): Emit the GOMP_*nonmonotonic_runtime* or
3806         GOMP_*maybe_nonmonotonic_runtime* builtins instead of GOMP_*runtime*
3807         if there is nonmonotonic modifier or if there is no modifier and no
3808         ordered clause.  For dynamic and guided schedule without monotonic
3809         and nonmonotonic modifier, default to nonmonotonic.
3810         (expand_omp_for): Likewise.  Adjust expand_omp_for_generic caller, use
3811         GOMP_loop{,_ull}{,_ordered,_doacross}_start builtins if there are
3812         task reductions.
3813         (expand_task_call): Add GOMP_TASK_FLAG_REDUCTION flag to flags if
3814         there are any reduction clauses.
3815         (expand_taskwait_call): New function.
3816         (expand_teams_call): New function.
3817         (expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
3818         expand_teams_call for it.  Formatting fix.  Handle taskwait with
3819         depend clauses.
3820         (expand_omp_for_generic): Add SCHED_ARG argument.  Handle expansion
3821         of worksharing loops with task reductions.
3822         (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
3823         expansion of worksharing loops with task reductions.
3824         (expand_omp_sections): Handle expansion of sections with task
3825         reductions.
3826         (expand_omp_synch): For host teams call expand_omp_taskreg.
3827         (omp_memory_order_to_memmodel): New function.
3828         (expand_omp_atomic_load, expand_omp_atomic_store,
3829         expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
3830         instead of gimple_omp_atomic_seq_cst_p.
3831         (build_omp_regions_1, omp_make_gimple_edges): Treat taskwait with
3832         depend clauses as a standalone directive.
3833         * omp-general.c (enum omp_requires): New variable.
3834         (omp_extract_for_data): Initialize have_reductemp member.  Allow
3835         NE_EXPR even in OpenMP loops, transform them into LT_EXPR or
3836         GT_EXPR loops depending on incr sign.  Formatting fixes.
3837         * omp-general.h (struct omp_for_data): Add have_reductemp member.
3838         (enum omp_requires): New enum.
3839         (omp_requires_mask): Declare.
3840         * omp-grid.c (grid_eliminate_combined_simd_part): Formatting fix.
3841         Fix comment typos.
3842         * omp-low.c (struct omp_context): Add task_reductions and
3843         task_reduction_map fields.
3844         (is_host_teams_ctx): New function.
3845         (is_taskreg_ctx): Return true also if is_host_teams_ctx.
3846         (use_pointer_for_field): Use is_global_var instead of
3847         TREE_STATIC || DECL_EXTERNAL, and apply only if not privatized
3848         in outer contexts.
3849         (build_outer_var_ref): Ignore taskgroup outer contexts.
3850         (delete_omp_context): Release task_reductions and task_reduction_map.
3851         (scan_sharing_clauses): Don't add any fields for reduction clause on
3852         taskloop.  Handle OMP_CLAUSE__REDUCTEMP_.  Handle
3853         OMP_CLAUSE_{IN,TASK}_REDUCTION and OMP_CLAUSE_REDUCTION with task
3854         modifier.  Don't ignore shared clauses in is_host_teams_ctx contexts.
3855         Handle OMP_CLAUSE_NONTEMPORAL.
3856         (add_taskreg_looptemp_clauses): Add OMP_CLAUSE__REDUCTEMP_ clause if
3857         needed.
3858         (scan_omp_parallel): Add _reductemp_ clause if there are any reduction
3859         clauses with task modifier.
3860         (scan_omp_task): Handle taskwait with depend clauses.
3861         (finish_taskreg_scan): Move field corresponding to _reductemp_ clause
3862         first.  Move also OMP_CLAUSE__REDUCTEMP_ clause in front if present.
3863         Handle GIMPLE_OMP_TEAMS like GIMPLE_OMP_PARALLEL.
3864         (scan_omp_for): Fix comment formatting.
3865         (scan_omp_teams): Handle host teams constructs.
3866         (check_omp_nesting_restrictions): Allow teams with no outer
3867         OpenMP context.  Adjust diagnostics for teams strictly nested into
3868         some explicit OpenMP construct other than target.  Allow OpenMP atomics
3869         inside of simd regions.
3870         (scan_omp_1_stmt): Call scan_sharing_clauses for taskgroups.
3871         (scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
3872         taskreg_nesting_level while scanning host teams construct.
3873         (task_reduction_read): New function.
3874         (lower_rec_input_clauses): Handle OMP_CLAUSE_REDUCTION on taskloop
3875         construct.  Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE__REDUCTEMP_
3876         clauses.  Handle OMP_CLAUSE_REDUCTION with task modifier.  Remove
3877         second argument create_tmp_var if it is NULL.  Don't ignore shared
3878         clauses in is_host_teams_ctx contexts.  Handle
3879         OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
3880         clauses.
3881         (lower_reduction_clauses): Ignore reduction clauses with task
3882         modifier.  Remove second argument create_tmp_var if it is NULL.
3883         Initialize OMP_ATOMIC_MEMORY_ORDER to relaxed.
3884         (lower_send_clauses): Ignore reduction clauses with task modifier.
3885         Handle OMP_CLAUSE__REDUCTEMP_.  Don't send anything for
3886         OMP_CLAUSE_REDUCTION on taskloop.  Handle OMP_CLAUSE_IN_REDUCTION.
3887         (maybe_add_implicit_barrier_cancel): Add OMP_RETURN argument, don't
3888         rely that it is the last stmt in body so far.  Ignore outer taskgroup
3889         contexts.
3890         (omp_task_reductions_find_first, omp_task_reduction_iterate,
3891         lower_omp_task_reductions): New functions.
3892         (lower_omp_sections): Handle reduction clauses with taskgroup
3893         modifiers.  Adjust maybe_add_implicit_barrier_cancel caller.
3894         (lower_omp_single): Adjust maybe_add_implicit_barrier_cancel caller.
3895         (lower_omp_for): Likewise.  Handle reduction clauses with taskgroup
3896         modifiers.
3897         (lower_omp_taskgroup): Handle taskgroup reductions.
3898         (create_task_copyfn): Copy over OMP_CLAUSE__REDUCTEMP_ pointer.
3899         Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE_REDUCTION clauses.
3900         (lower_depend_clauses): If there are any
3901         OMP_CLAUSE_DEPEND_DEPOBJ or OMP_CLAUSE_DEPEND_MUTEXINOUTSET
3902         depend clauses, use a new array format.  If OMP_CLAUSE_DEPEND_LAST is
3903         seen, assume lowering is done already and return early.  Set kind
3904         on artificial depend clause to OMP_CLAUSE_DEPEND_LAST.
3905         (lower_omp_taskreg): Handle reduction clauses with task modifier on
3906         parallel construct.  Handle reduction clause on taskloop construct.
3907         Handle taskwait with depend clauses.
3908         (lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
3909         for host teams constructs.
3910         * tree.c (omp_clause_num_ops): Add in_reduction, task_reduction,
3911         nontemporal and _reductemp_ clause entries.
3912         (omp_clause_code_name): Likewise.
3913         (walk_tree_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION,
3914         OMP_CLAUSE_NONTEMPORAL and OMP_CLAUSE__REDUCTEMP_.
3915         * tree-core.h (enum omp_clause_code): Add
3916         OMP_CLAUSE_{{IN,TASK}_REDUCTION,NONTEMPORAL,_REDUCTEMP_}.
3917         (enum omp_clause_defaultmap_kind, enum omp_memory_order): New.
3918         (struct tree_base): Add omp_atomic_memory_order field into union.
3919         Remove OMP_ATOMIC_SEQ_CST comment.
3920         (enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_MUTEXINOUTSET
3921         and OMP_CLAUSE_DEPEND_DEPOBJ.
3922         (struct tree_omp_clause): Add subcode.defaultmap_kind.
3923         * tree.def (OMP_TASKGROUP): Add another operand, move next to other
3924         OpenMP constructs with body and clauses operands.
3925         * tree.h (OMP_BODY): Use OMP_MASTER instead of OMP_TASKGROUP.
3926         (OMP_CLAUSES): Use OMP_TASKGROUP instead of OMP_SINGLE.
3927         (OMP_TASKGROUP_CLAUSES): Define.
3928         (OMP_CLAUSE_DECL): Use OMP_CLAUSE__REDUCTEMP_ instead of
3929         OMP_CLAUSE__LOOPTEMP_.
3930         (OMP_ATOMIC_SEQ_CST): Remove.
3931         (OMP_ATOMIC_MEMORY_ORDER, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE,
3932         OMP_CLAUSE_LASTPRIVATE_CONDITIONAL): Define.
3933         (OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INIT,
3934         OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER,
3935         OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
3936         OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Handle
3937         OMP_CLAUSE_{,IN_,TASK_}REDUCTION.
3938         (OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_REDUCTION_INSCAN,
3939         OMP_CLAUSE_DEFAULTMAP_KIND, OMP_CLAUSE_DEFAULTMAP_CATEGORY,
3940         OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_SET_KIND):
3941         Define.
3942         * tree-inline.c (remap_gimple_stmt): Remap taskgroup clauses.
3943         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
3944         OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE_NONTEMPORAL.
3945         (convert_local_omp_clauses): Likewise.  Remove useless test.
3946         * tree-parloops.c (create_call_for_reduction_1): Pass
3947         OMP_MEMORY_ORDER_RELAXED as new argument to
3948         dump_gimple_omp_atomic_load and dump_gimple_omp_atomic_store.
3949         * tree-pretty-print.c (dump_omp_iterators): New function.
3950         (dump_omp_clause): Handle OMP_CLAUSE__REDUCTEMP_,
3951         OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_{TASK,IN}_REDUCTION.  Print
3952         reduction modifiers.  Handle OMP_CLAUSE_DEPEND_DEPOBJ and
3953         OMP_CLAUSE_DEPEND_MUTEXINOUTSET.  Print iterators in depend clauses.
3954         Print __internal__ for OMP_CLAUSE_DEPEND_LAST.  Handle cancel and
3955         simd OMP_CLAUSE_IF_MODIFIERs.  Handle new kinds of
3956         OMP_CLAUSE_DEFAULTMAP. Print conditional: for
3957         OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
3958         (dump_omp_atomic_memory_order): New function.
3959         (dump_generic_node): Use it.  Print taskgroup clauses.  Print
3960         taskwait with depend clauses.
3961         * tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
3962         * tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
3963         Handle OMP_CLAUSE_{TASK,IN}_REDUCTION.
3964         * tree-streamer-out.c (pack_ts_omp_clause_value_fields,
3965         write_ts_omp_clause_tree_pointers): Likewise.
3967 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
3969         PR ipa/86395
3970         * doc/invoke.texi (-fdump-ipa-): Document the "-optimized",
3971         "-missed", "-note", and "-all" sub-options.
3972         * ipa-inline.c (caller_growth_limits): Port from fprintf to dump
3973         API.
3974         (can_early_inline_edge_p): Likewise.
3975         (want_early_inline_function_p): Likewise.
3976         (want_inline_self_recursive_call_p): Likewise.
3977         (recursive_inlining): Likewise.
3978         (inline_small_functions): Likewise.
3979         (flatten_function): Likewise.
3980         (ipa_inline): Likewise.
3981         (inline_always_inline_functions): Likewise.
3982         (early_inline_small_functions): Likewise.
3983         (early_inliner): Likewise.
3984         * tree-inline.c (expand_call_inline): Likewise.
3986 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
3988         * pretty-print.c (pp_format): Handle %f.
3989         (selftest::test_pp_format): Add test of %f.
3990         * pretty-print.h (pp_double): New macro.
3992 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
3994         * dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro.
3995         * dumpfile.c (make_item_for_dump_cgraph_node): Move to before...
3996         (dump_pretty_printer::decode_format): Implement "%C" for
3997         cgraph_node *.
3998         (selftest::test_capture_of_dump_calls): Rename "where" to
3999         "stmt_loc".  Convert test_decl to a function decl and set its
4000         location.  Add a symbol_table_test RAII instance and a
4001         cgraph_node, using it to test "%C" and dump_symtab_node.
4003 2018-11-08  Eric Botcazou  <ebotcazou@adacore.com>
4005         PR middle-end/87916
4006         * cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P.
4008 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
4010         * cgraph.c: Include "selftest.h".
4011         (saved_symtab): New variable.
4012         (selftest::symbol_table_test::symbol_table_test): New ctor.
4013         (selftest::symbol_table_test::~symbol_table_test): New dtor.
4014         (selftest::test_symbol_table_test): New test.
4015         (selftest::cgraph_c_tests): New.
4016         * cgraph.h (saved_symtab): New decl.
4017         (selftest::symbol_table_test): New class.
4018         * selftest-run-tests.c (selftest::run_tests): Call
4019         selftest::cgraph_c_tests.
4020         * selftest.h (selftest::cgraph_c_tests): New decl.
4022 2018-11-08  Richard Biener  <rguenther@suse.de>
4024         * tree-data-ref.h (lambda_int): New typedef.
4025         (lambda_vector_gcd): Adjust.
4026         (lambda_vector_new): Likewise.
4027         (lambda_matrix_new): Likewise.
4028         * tree-data-ref.c  (print_lambda_vector): Adjust.
4030 2018-11-08  Richard Biener  <rguenther@suse.de>
4032         PR tree-optimization/87929
4033         * tree-complex.c (expand_complex_comparison): Clean EH.
4035 2018-11-08  Martin Liska  <mliska@suse.cz>
4037         * doc/extend.texi: Reword.
4038         * predict.c (expr_expected_value_1): Likewise.
4040 2018-11-08  Richard Biener  <rguenther@suse.de>
4042         PR tree-optimization/87913
4043         * tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares
4044         of extreme values to ordered comparisons.
4046 2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
4048         PR middle-end/42726
4049         * doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior.
4051 2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
4053         * doc/invoke.texi: Remove leading dash from @opindex entries
4054         throughout the file.
4056 2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
4058         PR driver/80828
4059         * doc/invoke.texi (Option Summary): Add -e and --entry.
4060         (Link Options): Likewise.
4062 2018-11-07  Nathan Sidwell  <nathan@acm.org>
4064         PR 87926
4065         * Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak
4066         --disable-checking bootstrap.
4068 2018-11-07  Hafiz Abid Qadeer  <abidh@codesourcery.com>
4070         * configure: Regenerated.
4072 2018-11-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
4074         PR c/87691
4075         * stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE
4076         to the mode of the widest field iff the widest field has mode class
4077         MODE_INT, or MODE_PARTIAL_INT and the union would be passed by
4078         reference.
4080 2018-11-07  Nikolai Merinov  <n.merinov@inango-systems.com>
4082         * common.opt: Add -Wattribute-warning.
4083         * doc/invoke.texi: Add documentation for -Wno-attribute-warning.
4084         * expr.c (expand_expr_real_1): Add new attribute to warning_at
4085         call to allow user configure behavior of "warning" attribute.
4087 2018-11-07  Segher Boessenkool  <segher@kernel.crashing.org>
4089         * target.def: Put @: after every vs., e.g., and i.e. where it is
4090         followed by whitespace.
4091         * doc/extend.texi: Ditto.
4092         * doc/fragments.texi: Ditto.
4093         * doc/gimple.texi: Ditto.
4094         * doc/implement-c.texi: Ditto.
4095         * doc/install.texi: Ditto.
4096         * doc/invoke.texi: Ditto.
4097         * doc/md.texi: Ditto.
4098         * doc/plugins.texi: Ditto.
4099         * doc/rtl.texi: Ditto.
4100         * doc/sourcebuild.texi: Ditto.
4101         * doc/tm.texi.in: Ditto.
4102         * doc/ux.texi: Ditto.
4103         * doc/tm.texi: Regenerate.
4105 2018-11-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4107         * config/arm/arm-cpus.in (ares): New entry.
4108         * config/arm/arm-tables.opt: Regenerate.
4109         * config/arm/arm-tune.md: Likewise.
4110         * doc/invoke.texi (ARM Options): Document ares.
4112 2018-11-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4114         * config/aarch64/aarch64-cores.def (ares): Define.
4115         * config/aarch64/aarch64-tune.md: Regenerate.
4116         * doc/invoke.texi (AArch64 Options): Document ares value for mtune.
4118 2018-11-07  Jan Hubicka  <jh@suse.cz>
4120         * tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE.
4121         (free_lang_data_in_decl): Set TREE_ADDRESSABLE for public vars and
4122         functions; clear TYPE_DECL_SUPPRESS_DEBUG and DECL_MODE for
4123         TYPE_DECL.
4125 2018-11-07  Richard Biener  <rguenther@suse.de>
4127         PR tree-optimization/87914
4128         * tree-vect-loop.c (vect_is_simple_reduction): Improve detection
4129         of nested cycles.
4130         (vectorizable_reduction): Handle shifts and rotates by dispatching
4131         to vectorizable_shift.
4132         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Handle
4133         in-loop uses of vect_nested_cycle defs.  Merge cycle and internal
4134         def cases.
4135         (vectorizable_shift): Export and handle being called as
4136         vect_nested_cycle.
4137         (vect_analyze_stmt): Call vectorizable_shift after
4138         vectorizable_reduction.
4139         * tree-vectorizer.h (vectorizable_shift): Declare.
4141 2018-11-07  Jan Hubicka  <jh@suse.cz>
4143         * ipa-devirt.c (odr_types_equivalent_p): Expect constants
4144         than const decls in TREE_VALUE of enum.
4145         (dump_type_inheritance_graph): Improve duplicate dumping.
4146         (free_enum_values): New.
4147         (build_type_inheritance_graph): Use it.
4148         * tree.c (free_lang_data_in_type): Free TYPE_VALUES of enums
4149         which are not main variants or not ODR types.
4150         (verify_type_variant): Expect variants to have no TYPE_VALUES.
4152 2018-11-07  Richard Biener  <rguenther@suse.de>
4154         * ipa-inline.c (want_inline_small_function_p): Compute
4155         big_speedup_p lazily and last.
4157 2018-11-07  Jan Hubicka  <jh@suse.cz>
4159         * tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
4160         building incomplete variant of complete type.
4161         (fld_type_variant): Do not copy TYPE_ALIGN when building incomplete
4162         variant of complete type.
4164 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
4166         * config/mips/mips.c: Fix typo in documentation of
4167         mips_loongson_ext2_prefetch_cookie.
4168         (mips_option_override): fix brain twister logical.
4169         * config/mips/mips.h: Fix typo in documentation of
4170         ISA_HAS_CTZ_CTO and define pattern.
4171         * config/mips/mips.md (prefetch): Hoist EXT2 above
4172         the 2EF/EXT block.
4173         (prefetch_indexed): Hoist EXT2 above the EXT block.
4175 2018-11-07  Jan Hubicka  <jh@suse.cz>
4177         * tree.c (free_lang_data_in_type): Add fld parameter; simplify
4178         return and parameter types of function and method types.
4179         (free_lang_data_in_cgraph): Update.
4181 2018-11-07  Martin Liska  <mliska@suse.cz>
4183         PR rtl-optimization/87868
4184         * postreload-gcse.c (eliminate_partially_redundant_load): Set
4185         threshold to max_count if we would overflow.
4186         * profile-count.h: Make max_count a public constant.
4188 2018-11-07  Martin Liska  <mliska@suse.cz>
4190         * mem-stats.h: Fix GNU coding style.
4192 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
4194         * config/mips/gs264e.md: New.
4195         * config/mips/mips-cpus.def: Define gs264e.
4196         * config/mips/mips-tables.opt: Regenerate.
4197         * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
4198         gs264e.
4199         (mips_issue_rate): Add support for gs264e.
4200         (mips_multipass_dfa_lookahead): Likewise.
4201         * config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
4202         (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
4203         (MIPS_ASE_MSA_SPEC): New.
4204         (BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
4205         (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
4206         (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
4207         * config/mips/mips.md: Include gs264e.md.
4208         (processor): Add gs264e.
4209         * config/mips/mips.opt (MSA): Use Mask instead of Var.
4210         * doc/invoke.texi: Add gs264e to supported architectures.
4212 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
4214         * config/mips/gs464e.md: New.
4215         * config/mips/mips-cpus.def: Define gs464e.
4216         * config/mips/mips-tables.opt: Regenerate.
4217         * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
4218         gs464e.
4219         (mips_issue_rate): Add support for gs464e.
4220         (mips_multipass_dfa_lookahead): Likewise.
4221         (mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
4222         * config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
4223         (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
4224         (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
4225         (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
4226         * config/mips/mips.md: Include gs464e.md.
4227         (processor): Add gs464e.
4228         * doc/invoke.texi: Add gs464e to supported architectures.
4230 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
4232         * config/mips/loongson3a.md: Rename to ...
4233         * config/mips/gs464.md: ... here.
4234         * config/mips/mips-cpus.def: Define gs464; Add loongson3a
4235         as an alias of gs464 processor.
4236         * config/mips/mips-tables.opt: Regenerate.
4237         * config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
4238         instead of PROCESSOR_LOONGSON_3A.
4239         (mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
4240         TUNE_LOONGSON_3A.
4241         (mips_option_override): Enable MMI and EXT for gs464.
4242         * config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
4243         Rename TUNE_LOONGSON_3A to TUNE_GS464.
4244         (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
4245         (ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
4246         ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
4247         TARGET_LOONGSON_3A.
4248         * config/mips/mips.md: Include gs464.md instead of loongson3a.md.
4249         (processor): Add gs464;
4250         * doc/invoke.texi: Add gs464 to supported architectures.
4252 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
4254         * config/mips/mips-protos.h
4255         (mips_loongson_ext2_prefetch_cookie): New prototype.
4256         * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
4257         (mips_option_override): Enable TARGET_LOONGSON_EXT when
4258         TARGET_LOONGSON_EXT2 is true.
4259         * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
4260         __mips_loongson_ext2, __mips_loongson_ext_rev=2.
4261         (ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
4262         (ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
4263         TARGET_LOONGSON_EXT2.
4264         (ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
4265         (define_insn "ctz<mode>2"): New insn pattern.
4266         (define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
4267         (define_insn "prefetch_indexed_<mode>"): Include
4268         TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
4269         * config/mips/mips.opt (-mloongson-ext2): Add option.
4270         * gcc/doc/invoke.texi (-mloongson-ext2): Document.
4272 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
4274         * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
4275         __mips_loongson_ext.
4276         (MIPS_ASE_LOONGSON_EXT_SPEC): New.
4277         (BASE_DRIVER_SELF_SPECS): march=loongson3a implies
4278         -mloongson-ext.
4279         (ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
4280         * config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
4281         <u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
4282         instead of TARGET_LOONGSON_3A.
4283         * config/mips/mips.opt (-mloongson-ext): Add option.
4284         * gcc/doc/invoke.texi (-mloongson-ext): Document.
4286 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
4288         * config.gcc (extra_headers): Add loongson-mmiintrin.h.
4289         * config/mips/loongson.md: Move to ...
4290         * config/mips/loongson-mmi.md: here; Adjustment.
4291         * config/mips/loongson.h: Move to ...
4292         State as deprecated. Include loongson-mmiintrin.h for back
4293         compatibility and warning.
4294         * config/mips/loongson-mmiintrin.h: ... here.
4295         * config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
4296         mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
4297         TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
4298         (mips_option_override): Make sure MMI use hard float;
4299         (mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
4300         mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
4301         mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
4302         TARGET_LOONGSON_VECTORS.
4303         * gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
4304         (TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
4305         (MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
4306         (BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
4307         -mloongson-mmi.
4308         (SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
4309         TARGET_LOONGSON_VECTORS.
4310         * gcc/config/mips/mips.md (MOVE64, MOVE128): Use
4311         TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
4312         (Loongson MMI patterns): Include loongson-mmi.md instead of
4313         loongson.md.
4314         * gcc/config/mips/mips.opt (-mloongson-mmi): New option.
4315         * gcc/doc/invoke.texi (-mloongson-mmi): Document.
4317 2018-11-07  Richard Biener  <rguenther@suse.de>
4319         PR lto/87906
4320         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
4321         BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
4323 2018-11-07  Alexandre Oliva <aoliva@redhat.com>
4325         PR rtl-optimization/87874
4326         * lra.c (lra_substitute_pseudo): Do not create a subreg for
4327         const wide ints.
4329 2018-11-06  Aaron Sawdey  <acsawdey@linux.ibm.com>
4331         * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
4332         if not in indexed or indirect form.
4333         (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
4334         (bswap<mode>2_store): Ditto.
4336 2018-11-06  Richard Earnshaw  <rearnsha@arm.com>
4338         * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
4339         the UNSPEC.
4341 2018-11-06  Richard Biener  <rguenther@suse.de>
4343         PR tree-optimization/86850
4344         * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
4345         instead of src.m_vec.
4347 2018-11-06  Jan Hubicka  <jh@suse.cz>
4349         * tree.c (fld_simplified_type_name): Break out form ...
4350         (free_lang_data_in_type): ... here.
4351         (fld_type_variant_equal_p): Use it.
4353 2018-11-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4355         * config/default-d.c: Include memmodel.h.
4357         * config/sol2-d.c: New file.
4358         * config/t-sol2 (sol2-d.o): New rule.
4359         * config.gcc <*-*-solaris2*>: Set d_target_objs,
4360         target_has_targetdm.
4362 2018-11-06  Jan Hubicka  <jh@suse.cz>
4364         * tree.c (fld_type_variant): Also copy alignment; be sure that
4365         new variant is equal.
4367 2018-11-06  Ilya Leoshkevich  <iii@linux.ibm.com>
4369         PR target/87762
4370         * config/s390/s390.md: Add relative_long attribute.
4372 2018-11-06  Jan Hubicka  <jh@suse.cz>
4374         * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
4375         * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
4376         * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
4377         stream TYPE_NEEDS_CONSTRUCTING.
4378         * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
4379         * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
4381 2018-11-06  Richard Biener  <rguenther@suse.de>
4383         * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
4384         dump-scope ...
4385         (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
4387 2018-11-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
4389         * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
4390         REG_CLASS_CONTENTS[GEN_REGS].
4391         (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
4393 2018-11-06  Jan Hubicka  <jh@suse.cz>
4395          * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
4397 2018-11-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4399         PR sanitizer/80953
4400         * config/sol2.h (ASAN_CC1_SPEC): Define.
4401         (LD_WHOLE_ARCHIVE_OPTION): Define.
4402         (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
4403         (ASAN_REJECT_SPEC): Provide default.
4404         (LIBASAN_EARLY_SPEC): Define.
4405         (LIBTSAN_EARLY_SPEC): Define.
4406         (LIBLSAN_EARLY_SPEC): Define.
4407         * config/i386/sol2.h (CC1_SPEC): Redefine.
4408         (ASAN_REJECT_SPEC): Define.
4410         * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
4411         (TARGET_ASAN_SHADOW_OFFSET): Define.
4412         (sparc_asan_shadow_offset): New function.
4413         * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
4414         (ASAN_REJECT_SPEC): Define.
4416 2018-11-06  Jan Hubicka  <jh@suse.cz>
4418         * tree.c (fld_type_variant): Copy canonical type.
4419         (fld_incomplete_type_of): Check that canonical types looks sane;
4420         copy canonical type.
4421         (verify_type): Accept when incomplete type has complete canonical type.
4423 2018-11-06  Jan Hubicka  <jh@suse.cz>
4425         * tree.c (free_lang_data): Reset overwite_assembler_name,
4426         print_xnode, print_decl, print_type and print_identifier of
4427         langhooks.
4429 2018-11-06  Richard Biener  <rguenther@suse.de>
4431         PR tree-optimization/87889
4432         * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
4433         Do nothing if old and new arg are the same
4435 2018-11-06  Andreas Krebbel  <krebbel@linux.ibm.com>
4437         PR target/87723
4438         * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
4439         attributes for operands 3 and 4.
4441 2018-11-06  Richard Biener  <rguenther@suse.de>
4443         PR middle-end/18041
4444         * simplify-rtx.c (simplify_binary_operation_1): Add pattern
4445         matching bitfield insertion.
4447 2018-11-06  Alexandre Oliva <aoliva@redhat.com>
4449         * auto-inc-dec.c: Include valtrack.h.  Improve comments.
4450         (reg_next_debug_use): New.
4451         (attempt_change): Propagate adjusted expression into affected
4452         debug insns.
4453         (merge_in_block): Track uses in debug insns.
4454         (pass_inc_dec::execute): Allocate and release
4455         reg_next_debug_use.
4457 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
4459         * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
4460         (_mm512_fixupimm_round_pd): Update parameters and builtin.
4461         (_mm512_maskz_fixupimm_round_pd): Ditto.
4462         (_mm512_fixupimm_round_ps): Ditto.
4463         (_mm512_maskz_fixupimm_round_ps): Ditto.
4464         (_mm_fixupimm_round_sd): Ditto.
4465         (_mm_maskz_fixupimm_round_sd): Ditto.
4466         (_mm_fixupimm_round_ss): Ditto.
4467         (_mm_maskz_fixupimm_round_ss): Ditto.
4468         (_mm512_fixupimm_pd): Ditto.
4469         (_mm512_maskz_fixupimm_pd): Ditto.
4470         (_mm512_fixupimm_ps): Ditto.
4471         (_mm512_maskz_fixupimm_ps): Ditto.
4472         (_mm_fixupimm_sd): Ditto.
4473         (_mm_maskz_fixupimm_sd): Ditto.
4474         (_mm_fixupimm_ss): Ditto.
4475         (_mm_maskz_fixupimm_ss): Ditto.
4476         (_mm512_mask_fixupimm_round_pd): Update builtin.
4477         (_mm512_mask_fixupimm_round_ps): Ditto.
4478         (_mm_mask_fixupimm_round_sd): Ditto.
4479         (_mm_mask_fixupimm_round_ss): Ditto.
4480         (_mm512_mask_fixupimm_pd): Ditto.
4481         (_mm512_mask_fixupimm_ps): Ditto.
4482         (_mm_mask_fixupimm_sd): Ditto.
4483         (_mm_mask_fixupimm_ss): Ditto.
4484         * config/i386/avx512vlintrin.h:
4485         (_mm256_fixupimm_pd): Update parameters and builtin.
4486         (_mm256_maskz_fixupimm_pd): Ditto.
4487         (_mm256_fixupimm_ps): Ditto.
4488         (_mm256_maskz_fixupimm_ps): Ditto.
4489         (_mm_fixupimm_pd): Ditto.
4490         (_mm_maskz_fixupimm_pd): Ditto.
4491         (_mm_fixupimm_ps): Ditto.
4492         (_mm_maskz_fixupimm_ps): Ditto.
4493         (_mm256_mask_fixupimm_pd): Update builtin.
4494         (_mm256_mask_fixupimm_ps): Ditto.
4495         (_mm_mask_fixupimm_pd): Ditto.
4496         (_mm_mask_fixupimm_ps): Ditto.
4497         * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
4498         * config/i386/i386-builtin.def: Update builtin definitions.
4499         * config/i386/i386.c: Handle new builtin types and remove useless ones.
4500         * config/i386/sse.md: Update VFIXUPIMM* patterns.
4501         (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
4502         (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
4503         (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
4504         (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
4505         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
4506         (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
4507         * config/i386/subst.md:
4508         (round_saeonly_sd_mask_operand4): Add new subst_attr.
4509         (round_saeonly_sd_mask_op4): Ditto.
4510         (round_saeonly_expand_operand5): Ditto.
4511         (round_saeonly_expand): Update.
4513 2018-11-05  Max Filippov  <jcmvbkbc@gmail.com>
4515         * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
4517 2018-11-05  Segher Boessenkool  <segher@kernel.crashing.org>
4519         PR rtl-optimization/87871
4520         * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
4522 2018-11-05  Paul Koning  <ni1d@arrl.net>
4524         * doc/sourcebuild.texi (target attributes): Document new "inf"
4525         effective target keyword.
4527 2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
4529         * config/s390/s390.c (s390_register_move_cost): Increase costs for
4530         moves involving the CC reg.
4532 2018-11-05  Richard Biener  <rguenther@suse.de>
4534         PR tree-optimization/87873
4535         * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
4536         argument.
4537         * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
4538         * tree-vect-loop.c (vect_transform_loop): When splitting the
4539         loop exit also create forwarder PHIs for constants.
4540         * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
4541         Handle constant to_arg, add extra checking we match up the correct
4542         PHIs.
4544 2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
4546         * config/s390/s390.md: QImode and HImode for load on condition.
4548 2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
4550         * config/s390/predicates.md: Fix typo.
4551         * config/s390/s390.md: Allow immediates for load on condition.
4553 2018-11-05  Martin Liska  <mliska@suse.cz>
4555         * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
4556         * bitmap.h (struct bitmap_usage): Likewise.
4557         * ggc-common.c (SCALE): Remove.
4558         (LABEL): Likewise.
4559         (struct ggc_usage): Use SIZE_AMOUNT. And update
4560         compare method.
4561         * ggc-page.c (SCALE): Remove.
4562         (STAT_LABEL): Remove.
4563         (ggc_print_statistics): Use SIZE_AMOUNT.
4564         * gimple.h (SCALE): Remove.
4565         (LABEL): Likewise.
4566         * input.c (ONE_K): Remove.
4567         (ONE_M): Likewise.
4568         (SCALE): Likewise.
4569         (STAT_LABEL): Likewise.
4570         (FORMAT_AMOUNT): Likewise.
4571         (dump_line_table_statistics): Use SIZE_AMOUNT.
4572         * mem-stats.h (struct mem_usage): Likewise.
4573         * rtl.c (dump_rtx_statistics): Likewise.
4574         (rtx_alloc_counts): Change type to size_t.
4575         (rtx_alloc_sizes): Likewise.
4576         (rtx_count_cmp): New.
4577         (dump_rtx_statistics): Sort first based on counts.
4578         * tree.c (tree_nodes_cmp): New.
4579         (tree_codes_cmp): New.
4580         (dump_tree_statistics): Sort first based on counts.
4581         * system.h (ONE_K): New.
4582         (ONE_M): Likewise.
4583         (SIZE_SCALE): Likewise.
4584         (SIZE_LABEL): Likewise.
4585         (SIZE_AMOUNT): Likewise.
4586         * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
4587         * tree-dfa.c (dump_dfa_stats): Likewise.
4588         * tree-phinodes.c (phinodes_print_statistics): Likewise.
4589         * tree-ssanames.c (ssanames_print_statistics): Likewise.
4590         * tree.c (dump_tree_statistics): Likewise.
4591         * vec.c (struct vec_usage): Likewise.
4592         * trans-mem.c (tm_mangle): Enlarge buffer in order to not
4593         trigger a -Werror=format-overflow with
4594         --enable-gather-detailed-stats.
4596 2018-11-05  Martin Liska  <mliska@suse.cz>
4598         * mem-stats.h (mem_alloc_description::release_instance_overhead):
4599         Return T *.
4600         * vec.c (struct vec_usage): Register m_element_size.
4601         (vec_prefix::register_overhead): New arguments: elements and
4602         element_size.
4603         (vec_prefix::release_overhead): Subtract elements.
4604         * vec.h (struct vec_prefix): Change signature.
4605         (va_heap::reserve): Pass proper arguments.
4606         (va_heap::release): Likewise.
4608 2018-11-05  Martin Liska  <mliska@suse.cz>
4610         * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
4611         style.
4612         * vec.c: Likewise.
4614 2018-11-05  Richard Biener  <rguenther@suse.de>
4616         * tree-scalar-evolution.h (final_value_replacement_loop): Update
4617         prototype.
4618         * tree-scalar-evolution.c (final_value_replacement_loop): Return
4619         whether anything was done.
4620         (scev_const_prop): Remove constant propagation part, fold
4621         remains into ...
4622         * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
4623         (pass_data_scev_cprop): TODO_cleanup_cfg is now done
4624         conditionally.
4626 2018-11-05  Jakub Jelinek  <jakub@redhat.com>
4628         PR tree-optimization/87859
4629         * gimple-ssa-store-merging.c (struct merged_store_group): Add
4630         only_constants and first_nonmergeable_order members.
4631         (merged_store_group::merged_store_group): Initialize them.
4632         (merged_store_group::do_merge): Clear only_constants member if
4633         adding something other than INTEGER_CST store.
4634         (imm_store_chain_info::coalesce_immediate_stores): Don't merge
4635         stores with order >= first_nonmergeable_order.  Use
4636         merged_store->only_constants instead of always recomputing it.
4637         Set merged_store->first_nonmergeable_order if we've skipped any
4638         stores.  Attempt to merge overlapping INTEGER_CST stores that
4639         we would otherwise skip.
4641         PR sanitizer/87837
4642         * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
4644 2018-11-05  Xuepeng Guo  <xuepeng.guo@intel.com>
4646         PR target/87853
4647         * config/i386/emmintrin.h (__v16qs): New to cope with option
4648         -funsigned-char.
4649         (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
4650         (_mm_cmplt_epi8): Likewise.
4651         (_mm_cmpgt_epi8): Likewise.
4653 2018-11-05  Richard Biener  <rguenther@suse.de>
4655         PR rtl-optimization/87852
4656         * fwprop.c (use_killed_between): Only consider single-defs of the
4657         use whose definition statement dominates the use.
4659 2018-11-05  Martin Liska  <mliska@suse.cz>
4661         PR web/87829
4662         * doc/invoke.texi: Remove options that are
4663         not disabled with -Os.
4665 2018-11-05  Martin Liska  <mliska@suse.cz>
4667         PR c/87811
4668         * doc/extend.texi: Update constrain about the last argument
4669         of __builtin_expect_with_probability.
4671 2018-11-05  Martin Liska  <mliska@suse.cz>
4673         PR c/87811
4674         * predict.c (expr_expected_value_1): Verify
4675         that last argument is a real constants and emit
4676         error.
4678 2018-11-05  Martin Liska  <mliska@suse.cz>
4680         PR gcov-profile/77698
4681         * ipa-profile.c (ipa_profile): Adjust hotness threshold
4682         only in LTO mode.
4684 2018-11-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4686         PR tree-optimization/86572
4687         * builtins.c (c_strlen): Handle negative offsets in a safe way.
4689 2018-11-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4691         PR tree-optimization/87672
4692         * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
4693         * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
4695 2018-11-04  Uros Bizjak  <ubizjak@gmail.com>
4697         PR middle-end/58372
4698         * cfgexpand.c (pass_expand::execute): Move the call to
4699         finish_eh_generation in front of the call to expand_stack_alignment.
4701 2018-11-04  Venkataramanan Kumar <venkataramanan.kumar@amd.com>
4703         * common/config/i386/i386-common.c (processor_alias_table): Add
4704         znver2 entry.
4705         * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
4706         (case ${target}): Add znver2.
4707         * config/i386/driver-i386.c: (host_detect_local_cpu): Let
4708         -march=native recognize znver2 processors.
4709         * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
4710         * config/i386/i386.c (m_znver2): New definition.
4711         (m_ZNVER): New definition.
4712         (m_AMD_MULTIPLE): Includes m_znver2.
4713         (processor_cost_table): Add znver2 entry.
4714         (processor_target_table): Add znver2 entry.
4715         (get_builtin_code_for_version): Set priority for
4716         PROCESSOR_ZNVER2.
4717         (processor_model): Add M_AMDFAM17H_ZNVER2.
4718         (arch_names_table): Ditto.
4719         (ix86_reassociation_width): Include znver2.
4720         * config/i386/i386.h (TARGET_znver2): New definition.
4721         (struct ix86_size_cost): Add TARGET_ZNVER2.
4722         (enum processor_type): Add PROCESSOR_ZNVER2.
4723         * config/i386/i386.md (define_attr "cpu"): Add znver2.
4724         * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
4725         * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
4726         (ix86_adjust_cost): Add znver2.
4727         * config/i386/x86-tune.def:  Replace m_ZNVER1 by m_ZNVER.
4728         * gcc/doc/extend.texi: Add details about znver2.
4729         * gcc/doc/invoke.texi: Add details about znver2.
4731 2018-11-03  Sandra Loosemore  <sandra@codesourcery.com>
4733         PR target/87079
4735         * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
4736         pattern.
4738 2018-11-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
4740         * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
4741         attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
4743 2018-11-02  Richard Earnshaw  <rearnsha@arm.com>
4745         * config/aarch64/aarch64.c ((aarch64_override_options): Disable
4746         shrink-wrapping when -mtrack-speculation.
4748 2018-11-02  Richard Biener  <rguenther@suse.de>
4750         * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
4751         (pop_cost_one_pair): Do not free pair.
4752         (pop_best_coalesce): Likewise.
4753         (create_coalesce_list): Initialize obstack.
4754         (delete_coalesce_list): Free obstack.
4755         (find_coalesce_pair): Obstack-allocate coalesce pairs.
4756         (add_cost_one_coalesce): Likewise.
4757         (struct live_track): Remove bitmap pointer indirections.
4758         (new_live_track): Adjust.
4759         (delete_live_track): Likewise.
4760         (live_track_remove_partition): Likewise.
4761         (live_track_add_partition): Likewise.
4762         (live_track_live_p): Likewise.
4763         (live_track_process_def): Likewise.
4764         (live_track_clear_base_vars): Likewise.
4766 2018-11-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4768         * configure.ac (gcc_cv_as_sparc_register_op): Remove.
4769         * configure: Regenerate.
4770         * config.in: Regenerate.
4771         * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
4772         HAVE_AS_REGISTER_PSEUDO_OP guard.
4773         * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
4774         !HAVE_AS_REGISTER_PSEUDO_OP support.
4775         (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
4776         guard.
4778 2018-11-02  Richard Biener  <rguenther@suse.de>
4780         * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
4781         with is_type_die.
4783 2018-11-02  Richard Biener  <rguenther@suse.de>
4785         PR tree-optimization/87776
4786         * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
4787         executable when iterating but running into rpo-vn-max-loop-depth
4788         and not eliding the iteration.
4790 2018-11-30  Jan Hubicka  <jh@suse.cz>
4792         * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
4793         TYPE_DECL.
4795 2018-11-01  Aaron Sawdey  <acsawdey@linux.ibm.com>
4797         * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
4798         prototype.
4799         * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
4800         Combine with rs6000_address_for_fpconvert.
4801         (rs6000_address_for_fpconvert): Combine with
4802         rs6000_force_indexed_or_indirect_mem.
4803         (rs6000_expand_vector_init): Change function call from
4804         rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
4805         * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
4806         rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
4807         (floatsi<mode>2_lfiwax_mem): Ditto.
4808         (floatunssi<mode>2_lfiwzx): Ditto.
4809         (floatunssi<mode>2_lfiwzx_mem): Ditto.
4810         (float<QHI:mode><FP_ISA3:mode>2): Ditto.
4811         (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
4812         (fix_trunc<mode>si2_stfiwx): Ditto.
4813         (fixuns_trunc<mode>si2_stfiwx): Ditto.
4814         (float_<mode>si2_hw): Ditto.
4815         (floatuns_<mode>si2_hw): Ditto.
4816         * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
4817         (vsx_splat_<mode>): Ditto.
4819 2018-11-01  Joseph Myers  <joseph@codesourcery.com>
4821         * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
4822         at end of assembler input text.
4823         * configure: Regenerate.
4825 2018-11-01  Jakub Jelinek  <jakub@redhat.com>
4827         PR tree-optimization/87826
4828         * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
4829         negative or larger or equal to type's precision.
4831 2018-10-31  Alexandre Oliva <aoliva@redhat.com>
4833         * opts.c (default_options_table): Do not enable
4834         OPT_fdelayed_branch at -Og.
4835         * doc/invoke.texi (-fdelayed-branch): Document it.
4837 2018-10-31  Richard Henderson  <richard.henderson@linaro.org>
4839         * optabs-libfuncs.c (build_libfunc_function_visibility):
4840         New, split out from...
4841         (build_libfunc_function): ... here.
4842         (init_one_libfunc_visibility): New, split out from ...
4843         (init_one_libfunc): ... here.
4845         * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
4846         scratch register need not be early-clobber.  Document the reason
4847         why we cannot use ST<OP>.
4849 2018-10-31  Joseph Myers  <joseph@codesourcery.com>
4851         PR bootstrap/82856
4852         * configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.  Use single
4853         line for second argument of AC_DEFINE_UNQUOTED.
4854         * doc/install.texi (Tools/packages necessary for modifying GCC):
4855         Update to autoconf 2.69 and automake 1.15.1.
4856         * aclocal.m4, config.in, configure: Regenerate.
4858 2018-10-31  Pat Haugen  <pthaugen@us.ibm.com>
4860         * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
4861         initialization.
4863 2018-10-31  Martin Liska  <mliska@suse.cz>
4865         PR driver/83193
4866         * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
4867         Add new argument invalid_extension.
4868         (aarch64_get_all_extension_candidates): New function.
4869         (aarch64_rewrite_selected_cpu): Add NULL to function call.
4870         * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
4871         new argument.
4872         (aarch64_get_all_extension_candidates): New function.
4873         * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
4874         argument invalid_extension.
4875         (aarch64_parse_cpu): Likewise.
4876         (aarch64_print_hint_for_extensions): New function.
4877         (aarch64_validate_mcpu): Provide hint about invalid extension.
4878         (aarch64_validate_march): Likewise.
4879         (aarch64_handle_attr_arch): Pass new argument.
4880         (aarch64_handle_attr_cpu): Provide hint about invalid extension.
4881         (aarch64_handle_attr_isa_flags): Likewise.
4883 2018-10-31  Richard Biener  <rguenther@suse.de>
4885         PR middle-end/70359
4886         PR middle-end/86270
4887         * tree-outof-ssa.c (insert_backedge_copies): Restrict
4888         copy generation to useful cases.  Place the copy before
4889         the definition of the backedge value when possible.
4891 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
4893         * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
4894         * config/arc/arc.c (arc_active_insn): New function.
4895         (check_store_cacheline_hazard): Likewise.
4896         (workaround_arc_anomaly): Use check_store_cacheline_hazard.
4897         (arc_override_options): Disable delay slot scheduler for older
4898         A7.
4899         (arc_store_addr_hazard_p): New implementation, old one renamed to
4900         ...
4901         (arc_store_addr_hazard_internal_p): Renamed.
4902         (arc_reorg): Don't combine into brcc instructions which are part
4903         of hardware hazard solution.
4904         * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
4905         (tune_arc700): Likewise.
4906         * config/arc/arc.opt (arc7xx): New tune value.
4907         * config/arc/arc700.md: Improve A7 scheduler.
4909 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
4911         * config/arc/arc.c (arc_override_options): Remove
4912         TARGET_COMPACT_CASESI.
4913         * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
4914         (CASE_VECTOR_MODE): Likewise.
4915         (CASE_VECTOR_PC_RELATIVE): Likewise.
4916         (CASE_VECTOR_SHORTEN_MODE): Likewise.
4917         (CASE_VECTOR_SHORTEN_MODE1): Delete.
4918         (ADDR_VEC_ALIGN): Update.
4919         (ASM_OUTPUT_CASE_LABEL): Undefine.
4920         (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
4921         (TARGET_BI_BIH): Define.
4922         (DEFAULT_BRANCH_INDEX): Likewise.
4923         * config/arc/arc.md (casesi): Rework to accept BI/BIH
4924         instructions, remove compact_casesi use case.
4925         (casesi_compact_jump): Remove.
4926         (casesi_dispatch): New pattern.
4927         * config/arc/arc.opt: Add mbranch-index option. Deprecate
4928         compact_casesi option.
4929         * doc/invoke.texi: Document mbranch-index option.
4931 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
4933         * config/arc/arc.c (arc_get_tp): Remove function.
4934         (arc_emit_call_tls_get_addr): Likewise.
4935         (arc_call_tls_get_addr): New function.
4936         (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
4937         * config/arc/arc.md (tls_load_tp_soft): Remove.
4938         (tls_gd_get_addr): Likewise.
4940 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
4942         * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
4943         (mulsi3_600_lib): Remove pattern.
4944         (umulsi3_highpart_600_lib_le): Likewise.
4945         (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
4946         (umulsidi3): Remove call to umulsidi3_600_lib.
4947         (umulsidi3_600_lib): Remove pattern.
4948         (peephole2): Remove peephole using the above deprecated patterns.
4950 2018-10-31  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
4952         PR target/87374
4953         * config/arm/arm.c (arm_option_check_internal): Disable the combined
4954         use of -mslow-flash-data and -mword-relocations.
4955         (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
4956         * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
4957         flag_pic.
4958         * doc/invoke.texi (-mword-relocations): Mention conflict with
4959         -mslow-flash-data.
4960         (-mslow-flash-data): Reciprocally.
4962 2018-10-31  Richard Henderson  <richard.henderson@linaro.org>
4964         * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
4965         16-byte modes held in GP registers to use an even regno.
4967         * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
4968         (aarch64_atomic_ldop_supported_p): Remove.
4969         (aarch64_gen_atomic_ldop): Remove.
4970         * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
4971         Fully expand LSE operations here.
4972         (atomic_fetch_<atomic_optab><ALLI>): Likewise.
4973         (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
4974         (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
4975         and use ATOMIC_LDOP instead; use register_operand for the input;
4976         drop the split and emit insns directly.
4977         (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
4978         (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
4979         (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
4981         * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
4982         (aarch64_gen_atomic_ldop): Don't call it.
4983         * config/aarch64/atomics.md (atomic_exchange<ALLI>):
4984         Use aarch64_reg_or_zero.
4985         (aarch64_atomic_exchange<ALLI>): Likewise.
4986         (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
4987         operand 0; use aarch64_reg_or_zero for input; merge ...
4988         (@aarch64_atomic_swp<ALLI>): ... this and remove.
4990         * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
4991         (aarch64_split_compare_and_swap): Use it.
4992         (aarch64_expand_compare_and_swap): Likewise.  Remove convert_modes;
4993         test oldval against the proper predicate.
4994         * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
4995         Use nonmemory_operand for expected.
4996         (cas_short_expected_pred): New.
4997         (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
4998         (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
4999         * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
5000         (aarch64_plushi_operand): New.
5002         * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
5003         Force oldval into the rval register for TARGET_LSE; emit the compare
5004         during initial expansion so that it may be deleted if unused.
5005         (aarch64_gen_atomic_cas): Remove.
5006         * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
5007         Change =&r to +r for operand 0; use match_dup for operand 2;
5008         remove is_weak and mod_f operands as unused.  Drop the split
5009         and merge with...
5010         (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
5011         (@aarch64_compare_and_swap<GPI>_lse): Similarly.
5012         (@aarch64_atomic_cas<GPI>): Similarly.
5014 2018-10-31  Richard Biener  <rguenther@suse.de>
5016         * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
5017         using ABSU_EXPR.
5019 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
5021         * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
5022         * config/aarch64/aarch64.md: Include saphira.md
5023         * config/aarch64/saphira.md: New file for pipeline description.
5025 2018-10-30  Martin Sebor  <msebor@redhat.com>
5027         PR middle-end/87041
5028         * gimple-ssa-sprintf.c (format_directive): Use %G to include
5029         inlining context.
5030         (sprintf_dom_walker::compute_format_length):
5031         Avoid setting POSUNDER4K here.
5032         (get_destination_size): Handle null argument values.
5033         (get_user_idx_format): New function.
5034         (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
5035         functions, including user-defined with attribute format printf.
5036         Use %G to include inlining context.
5037         Set POSUNDER4K here.
5039 2018-10-30  Jan Hubicka  <jh@suse.cz>
5041         * params.def (lto-partitions): Bump from 32 to 128.
5043 2018-10-30  Jan Hubicka  <jh@suse.cz>
5045         * tree.c
5046         (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
5047         head in file.
5048         (free_lang_data_in_type): Forward declare.
5049         (fld_type_variant_equal_p): New function.
5050         (fld_type_variant): New function
5051         (fld_incomplete_types): New hash.
5052         (fld_incomplete_type_of): New function
5053         (fld_simplfied-type): New function.
5054         (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
5055         (free_lang_data): Allocate and free fld_incomplete_type; update call
5056         of free_lang_data_in_decl.
5058 2018-10-30  Eric Botcazou  <ebotcazou@adacore.com>
5060         * gcov.c (output_lines): Remove duplicate line.
5062 2018-10-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
5064         * config/rs6000/rs6000.md (bswapdi2): Force address into register
5065         if not in indexed or indirect form.
5066         (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
5067         (bswapdi2_store): Ditto.
5068         * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
5069         helper function.
5070         * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
5071         Prototype for helper function.
5073 2018-10-30  Martin Sebor  <msebor@redhat.com>
5075         * doc/extend.texi (optimize): Clarify/expand attribute documentation.
5076         (target, pragma GCC optimize, pragma GCC target): Ditto.
5078 2018-10-30  Jonathan Wakely  <jwakely@redhat.com>
5080         * doc/extend.texi: Fix prototype and description of
5081         __builtin_expect_with_probability.
5083 2018-10-30  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
5085         * cgraph.h (clone_function_name_1): Replaced by new
5086           clone_function_name_numbered that takes name as string; for
5087           privatize_symbol_name_1 use only.
5088           (clone_function_name): Renamed to
5089           clone_function_name_numbered to be explicit about numbering.
5090           (clone_function_name): New two-argument function that does
5091           not number its output.
5092           (clone_function_name): New three-argument function that
5093           takes a number to append to its output.
5094         * cgraphclones.c (duplicate_thunk_for_node):
5095           (clone_function_name_1): Renamed.
5096           (clone_function_name_numbered): Two new functions.
5097           (clone_function_name): Improved documentation.
5098           (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
5099         * config/rs6000/rs6000.c (make_resolver_func): Ditto.
5100         * final.c (final_scan_insn_1): Use the new clone_function_name
5101           without numbering.
5102         * multiple_target.c (create_dispatcher_calls): Ditto.
5103           (create_target_clone): Ditto.
5104         * omp-expand.c (grid_expand_target_grid_body): Ditto.
5105         * omp-low.c (create_omp_child_function_name): Ditto.
5106         * omp-simd-clone.c (simd_clone_create): Ditto.
5107         * symtab.c (simd_symtab_node::noninterposable_alias): Use the
5108           new clone_function_name without numbering.
5110 2018-10-30  Richard Earnshaw  <rearnsha@arm.com>
5112         * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
5113         Assert that the allocation size is not zero.
5115 2018-10-30  Richard Biener  <rguenther@suse.de>
5117         PR tree-optimization/87800
5118         * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
5119         non-induction or reduction PHIs.
5121 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
5123         * config/aarch64/falkor-tag-collision-avoidance.c
5124         (execute_tag_collision_avoidance): Call df_note_add_problem.
5126 2018-10-30  Martin Liska  <mliska@suse.cz>
5128         * doc/extend.texi: Fix typo in documentation
5129         of __builtin_expect_with_probability.
5131 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
5133         PR c++/87721
5134         * input.c (get_substring_ranges_for_loc): Detect if
5135         linemap_resolve_location gives us a NULL map, and reject
5136         this case.
5138 2018-10-29  Iain Buclaw  <ibuclaw@gdcproject.org>
5140         * config.gcc (xstormy16-*-elf): Set tm_d_file.
5142 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
5143             Martin Sebor  <msebor@redhat.com>
5144             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
5146         * doc/ux.texi (Quoting): New subsection, adapted from material at
5147         https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
5148         MartinSebor and ManuelLopezIbanez.
5149         (Fix-it hints): Note that fix-it hints shouldn't be marked for
5150         translation.
5152 2018-10-29  Kugan Vivekanandarajah  <kuganv@linaro.org>
5154         PR middle-end/87469
5155         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
5156         max value.
5158 2018-10-29  Paul A. Clarke  <pc@us.ibm.com>
5160         * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
5162 2018-10-29  Paul Koning  <ni1d@arrl.net>
5164         * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
5166 2018-10-29  Paul A. Clarke  <pc@us.ibm.com>
5168         * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
5169         _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
5170         _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
5171         _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
5172         _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
5173         _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
5174         _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
5175         _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
5176         Change 'vector' to '__vector'.
5177         * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
5178         _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
5179         _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
5180         _mm_avg_pu16): Likewise.  And, whitespace corrections.
5182 2018-10-29  Richard Biener  <rguenther@suse.de>
5184         PR tree-optimization/87785
5185         * tree-vect-slp.c (vect_gather_slp_loads): Only gather
5186         internal defs.
5188 2018-10-29  Olivier Hainque  <hainque@adacore.com>
5190         * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
5192 2018-10-29  Olivier Hainque  <hainque@adacore.com>
5194         * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
5195         ports configuration macro, defaults to "gnu".
5196         (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
5197         TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
5199 2018-10-29  Olivier Hainque  <hainque@adacore.com>
5201         * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
5203 2018-10-29  Richard Biener  <rguenther@suse.de>
5205         PR tree-optimization/87790
5206         * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
5207         (vect_make_slp_decision): Adjust.
5208         (vect_slp_analyze_bb_1): Likewise.
5209         (vect_detect_hybrid_slp_stmts): Properly union SLP type over
5210         edges.
5212 2018-10-29  Richard Biener  <rguenther@suse.de>
5214         PR tree-optimization/87785
5215         * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
5216         and processing.
5217         (vect_build_slp_tree): Likewise.
5218         (vect_gather_slp_loads): New function.
5219         (vect_analyze_slp_instance): Gather loads separately from the
5220         SLP tree build.
5222 2018-10-29  Martin Liska  <mliska@suse.cz>
5224         * Makefile.in: Make dependency to json.o.
5225         * doc/gcov.texi: Document new JSON format, remove
5226         old intermediate format documentation.
5227         * gcov.c (struct function_info): Come up with m_name and
5228         m_demangled_name.
5229         (function_info::function_info): Initialize it.
5230         (function_info::~function_info): Release it.
5231         (main): Rename flag_intermediate_format to flag_json_format.
5232         (print_usage): Describe --json-format.
5233         (process_args): Set flag_json_format.
5234         (output_intermediate_line): Remove.
5235         (output_intermediate_json_line): Likewise.
5236         (get_gcov_intermediate_filename): Return new extension
5237         ".gcov.json.gz".
5238         (output_intermediate_file): Implement JSON emission.
5239         (output_json_intermediate_file): Implement JSON emission.
5240         (generate_results): Use ::get_name for function name.
5241         Handle JSON output file.
5242         (read_graph_file): Use ::get_name instead of cplus_demangle.
5243         (read_count_file): Likewise.
5244         (solve_flow_graph): Likewise.
5245         (add_line_counts): Likewise.
5246         (accumulate_line_counts): Use new flag_json_format.
5247         (output_function_details): Use ::get_name instead of cplus_demangle.
5248         (output_lines): Likewise.
5249         * json.cc (test_writing_literals): Add new tests.
5250         * json.h (class literal): Add new boolean constructor.
5252 2018-10-29  Segher Boessenkool  <segher@kernel.crashing.org>
5254         PR rtl-optimization/87701
5255         PR rtl-optimization/87780
5256         * combine.c (make_more_copies): Rewrite.
5258 2018-10-28  Kugan Vivekanandarajah  <kuganv@linaro.org>
5260         * doc/generic.texi (ABSU_EXPR): Document.
5261         * match.pd (absu(x)*absu(x) -> x*x): Handle.
5262         (absu(absu(X)) -> absu(X)): Likewise.
5263         (absu(-X) -> absu(X)): Likewise.
5264         (absu(X)  where X is nonnegative -> X): Likewise.
5266 2018-10-28  Iain Buclaw  <ibuclaw@gdcproject.org>
5268         * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
5269         (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
5270         (tm_d.h, cs-tm_d.h, default-d.o): New rules.
5271         (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
5272         (s-tm-texi): Also check timestamp on d-target.def.
5273         (generated_files): Add TM_D_H and d-target-hooks-def.h.
5274         (build/genhooks.o): Also depend on D_TARGET_DEF.
5275         * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
5276         variables.
5277         * config/aarch64/aarch64-d.c: New file.
5278         * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
5279         Define.
5280         * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
5281         prototype.
5282         * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
5283         * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
5284         * config/arm/arm-d.c: New file.
5285         * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
5286         * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
5287         * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
5288         * config/arm/t-arm (arm-d.o): New rule.
5289         * config/default-d.c: New file.
5290         * config/glibc-d.c: New file.
5291         * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5292         * config/i386/i386-d.c: New file.
5293         * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
5294         * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
5295         * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
5296         (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
5297         * config/i386/t-i386 (i386-d.o): New rule.
5298         * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5299         * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5300         * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
5301         * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5302         * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
5303         * config/mips/mips-d.c: New file.
5304         * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
5305         * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
5306         * config/mips/t-mips (mips-d.o): New rule.
5307         * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5308         * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5309         * config/powerpcspe/powerpcspe-d.c: New file.
5310         * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
5311         New prototype.
5312         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
5313         Support GNU D by using 0 as the language type.
5314         * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
5315         * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
5316         * config/riscv/riscv-d.c: New file.
5317         * config/riscv/riscv-protos.h (riscv_d_target_versions): New
5318         prototype.
5319         * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
5320         * config/riscv/t-riscv (riscv-d.o): New rule.
5321         * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5322         * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
5323         * config/rs6000/rs6000-d.c: New file.
5324         * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
5325         prototype.
5326         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
5327         Support GNU D by using 0 as the language type.
5328         * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
5329         * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
5330         * config/s390/s390-d.c: New file.
5331         * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
5332         * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
5333         * config/s390/t-s390 (s390-d.o): New rule.
5334         * config/sparc/sparc-d.c: New file.
5335         * config/sparc/sparc-protos.h (sparc_d_target_versions): New
5336         prototype.
5337         * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
5338         * config/sparc/t-sparc (sparc-d.o): New rule.
5339         * config/t-glibc (glibc-d.o): New rule.
5340         * configure: Regenerated.
5341         * configure.ac (tm_d_file): New variable.
5342         (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
5343         * doc/contrib.texi (Contributors): Add self for the D frontend.
5344         * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
5345         * doc/install.texi (Configuration): Mention libphobos as an option for
5346         --enable-shared.  Mention d as an option for --enable-languages.
5347         (Testing): Mention check-d as a target.
5348         * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
5349         name suffixes.  Mention d as a -x option.
5350         * doc/sourcebuild.texi (Top Level): Mention libphobos.
5351         * doc/standards.texi (Standards): Add section on D language.
5352         * doc/tm.texi: Regenerated.
5353         * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
5354         TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
5355         * dwarf2out.c (is_dlang): New function.
5356         (gen_compile_unit_die): Use DW_LANG_D for D.
5357         (declare_in_namespace): Return module die for D, instead of adding
5358         extra declarations into the namespace.
5359         (gen_namespace_die): Generate DW_TAG_module for D.
5360         (gen_decl_die): Handle CONST_DECLSs for D.
5361         (dwarf2out_decl): Likewise.
5362         (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
5363         (prune_unused_types_walk): Handle DW_tag_interface_type same as other
5364         kinds of aggregates.
5365         * gcc.c (default_compilers): Add entries for .d, .dd and .di.
5366         * genhooks.c: Include d/d-target.def.
5368 2018-10-28  Iain Sandoe  <iain@sandoe.co.uk>
5370         PR target/85669
5371         * config/rs6000/darwin.h (STACK_BOUNDARY): New.
5372         (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
5373         (STACK_DYNAMIC_OFFSET): Likewise.
5375 2018-10-27  Sandra Loosemore  <sandra@codesourcery.com>
5377         PR target/80024
5378         * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
5379         error message.
5381 2018-10-26  Tulio Magno Quites Machado Filho  <tuliom@linux.ibm.com>
5383         * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
5384         return type and other typos.
5386 2018-10-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
5388         * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
5389         a shorter sequence with fewer branches.
5390         (emit_final_str_compare_gpr): Ditto.
5392 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
5394         * config/rs6000/tmmintrin.h: New file.
5395         * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
5397 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
5399         * config/rs6000/mmintrin.h: Enable 32bit compilation.
5400         * config/rs6000/xmmintrin.h: Likewise.
5402 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
5404         * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
5406 2018-10-26  Richard Biener  <rguenther@suse.de>
5408         * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
5409         and wrapper.
5410         (vect_mark_slp_stmts_relevant): Likewise.
5411         (vect_detect_hybrid_slp_stmts): Likewise.
5412         (vect_bb_slp_scalar_cost): Likewise.
5413         (vect_remove_slp_scalar_calls): Likewise.
5415 2018-10-26  Jan Hubicka  <jh@suse.cz>
5417         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
5418         (warn_types_mismatch): Fix walk of DECL_NAME.
5419         (odr_types_equivalent_p): Fix overactive assert.
5421 2018-10-26  Richard Biener  <rguenther@suse.de>
5423         PR tree-optimization/87105
5424         * tree-vectorizer.h (_slp_tree::refcnt): New member.
5425         * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
5426         refcnt.
5427         (vect_create_new_slp_node): Initialize refcnt to one.
5428         (bst_traits): Move.
5429         (scalar_stmts_set_t, bst_fail): Remove.
5430         (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
5431         (vect_build_slp_tree): Add bst_map argument and lookup
5432         already created SLP nodes.
5433         (vect_print_slp_tree): Handle a SLP graph, print SLP node
5434         addresses.
5435         (vect_slp_rearrange_stmts): Handle a SLP graph.
5436         (vect_analyze_slp_instance): Adjust and free SLP nodes from
5437         the CSE map.  Fix indenting.
5438         (vect_schedule_slp_instance): Add short-cut.
5440 2018-10-26  Martin Liska  <mliska@suse.cz>
5442         PR testsuite/86158
5443         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
5444         addr_expr and not with pointers.
5446 2018-10-26  Jan Hubicka  <jh@suse.cz>
5448         * tree.c (free_lang_data_in_type): Only check main variants.
5449         * ipa-devirt.c (warn_odr): Make static.
5450         (types_same_for_odr): Drop strict variant.
5451         (types_odr_comparable): Likewise.
5452         (odr_or_derived_type_p): Look for main variants.
5453         (odr_name_hasher::equal): Cleanup comment.
5454         (odr_subtypes_equivalent): Add warn and warned arguments; check main
5455         variants.
5456         (type_variants_equivalent_p): break out from ...
5457         (odr_types_equivalent): ... here; go for main variants where needed.
5458         (warn_odr): ... here; turn static.
5459         (warn_types_mismatch): Compare mangled names of main variants.
5460         * ipa-utils.h (types_odr_comparable): Drop strict parameter.
5461         (type_with_linkage_p): Sanity check that we look at main variant.
5462         * lto.c (lto_read_decls): Only consider main variant to be ODR type.
5463         * tree.h (types_same_for_odr): Drop strict argument.
5465 2018-10-26  Richard Biener  <rguenther@suse.de>
5467         PR tree-optimization/87746
5468         * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
5469         Simplify and fix WRT strided store groups with size not
5470         equal to step in element count.
5471         (vect_analyze_group_access_1): Dump the whole group.
5473 2018-10-25  Carl Love  <cel@us.ibm.com>
5475         * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
5476         P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
5477         P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name.  Add quad
5478         precicion entry for each overloaded builtin.
5479         * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
5480         VSCEDPUO): Rename overloaded name.
5481         (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
5482         VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
5483         * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
5484         define_expand for xscmpexqp instruction.
5485         (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
5487 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
5488             Jinsong Ji <jji@us.ibm.com>
5490         * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
5491         function with vec_sl.
5492         (_mm_slli_epi32): Likewise.
5493         (_mm_slli_epi64): Likewise.
5494         (_mm_srai_epi16): Replace deprecated function with vec_sra.
5495         (_mm_srai_epi32): Likewise.
5496         (_mm_srli_epi16): Replace deprecated function with vec_sr.
5497         (_mm_srli_epi32): Likewise.
5498         (_mm_srli_epi64): Likewise.
5499         (_mm_sll_epi16): Replace deprecated function with vec_sl.
5500         (_mm_sll_epi32): Likewise.
5501         (_mm_sll_epi64): Likewise.
5502         (_mm_sra_epi16): Replace deprecated function with vec_sra.
5503         (_mm_sra_epi32): Likewise.
5504         (_mm_srl_epi16): Replace deprecated function with vec_sr.
5505         (_mm_srl_epi32): Likewise.
5506         (_mm_srl_epi64): Likewise.
5508 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
5509             Jinsong Ji <jji@us.ibm.com>
5511         * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
5512         comparison operators with vec_cmp* for compatibility due to
5513         unfortunate history; clean up formatting and use types more
5514         appropriately.
5515         (_mm_sll_epi32): Likewise.
5516         (_mm_sll_epi64): Likewise.
5517         (_mm_srl_epi16): Likewise.
5518         (_mm_srl_epi32): Likewise.
5519         (_mm_srl_epi64): Likewise.
5521 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
5522             Jinsong Ji <jji@us.ibm.com>
5524         * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
5525         * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
5526         __vector __bool int.  Use vec_cmpgt in preference to deprecated
5527         function vec_vcmpgtfp.
5528         (_mm_max_ps): Likewise.
5530 2018-10-25  Jeff Law  <law@redhat.com>
5532         * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
5533         if returning false.
5535 2018-10-25  Martin Sebor  <msebor@redhat.com>
5537         * doc/extend.texi (aligned): Expand attribute description.
5538         (Alignment): Rename section.  Discuss function arguments.
5540 2018-10-25  Jan Hubicka  <jh@suse.cz>
5542         * ipa-devirt.c (main_odr_variant): Remove.
5543         (hash_odr_name, types_same_for_odr, types_odr_comparable,
5544         odr_name_hasher::equal, odr_subtypes_equivalent_p):
5545         Drop use of main_odr_variant.
5546         (add_type_duplicate): Silence confused warnings on integer types.
5547         (get_odr_type): Always look for main variant.
5548         (register_odr_type): Simplify.
5550 2018-10-25  Richard Biener  <rguenther@suse.de>
5552         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
5553         Initialize ng to silence error with release checking bootstrap.
5555 2018-10-25  Richard Biener  <rguenther@suse.de>
5557         * tree-if-conv.c: Include tree-ssa-sccvn.h.
5558         (tree_if_conversion): Run CSE on the if-converted loop body.
5560 2018-10-25  Ilya Leoshkevich  <iii@linux.ibm.com>
5562         * config/s390/constraints.md (ZL): New constraint.
5563         * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
5564         operands.
5565         * config/s390/s390.md (movdi_larl): Remove.
5566         (movdi_64): Add the LARL alternative.
5568 2018-10-25  Ilya Leoshkevich  <iii@linux.ibm.com>
5570         PR bootstrap/87747
5571         * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
5572         (RTX_CODE_HWINT_P): New macro.
5573         (rtx_code_size): Use RTX_CODE_HWINT_P ().
5575 2018-10-25  Jan Hubicka  <jh@suse.cz>
5577         * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
5578         is anonymous.
5580 2018-10-25  Richard Biener  <rguenther@suse.de>
5582         PR tree-optimization/87665
5583         PR tree-optimization/87745
5584         * tree-vectorizer.h (get_earlier_stmt): Remove.
5585         (get_later_stmt): Pick up UID from the original non-pattern stmt.
5587 2018-10-25  Sam Tebbs  <sam.tebbs@arm.com>
5589         * options.texi (Deprecated): Move list to Var section.
5591 2018-10-24  Bill Schmidt  <wschmidt@linux.ibm.com>
5592             Jinsong Ji <jji@us.ibm.com>
5594         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
5595         __vector long to __vector long long.
5596         (_mm_cvtpd_ps): Likewise.
5597         (_mm_cvttpd_epi32): Likewise.
5598         (_mm_cvtpi32_pd): Likewise.
5599         (_mm_unpackhi_epi64): Likewise.
5600         (_mm_unpacklo_epi64): Likewise.
5602 2018-10-24  Segher Boessenkool  <segher@kernel.crashing.org>
5604         PR rtl-optimization/87720
5605         * combine.c (make_more_copies): Skip if the dest is pc_rtx.
5607 2018-10-24  Alexandre Oliva <aoliva@redhat.com>
5609         * gimple-ssa-isolate-paths.c
5610         (find_implicit_erroneous_behavior): Do not change code if the
5611         pass is running for warnings only.
5612         (find_explicit_erroneous_behavior): Likewise.
5614 2018-10-24  Michael Meissner  <meissner@linux.ibm.com>
5616         * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
5617         Define as rs6000_mangle_decl_assembler_name.
5618         (rs6000_mangle_decl_assembler_name): If the user switched from IBM
5619         long double to IEEE long double, switch the names of the long
5620         double built-in functions to be <func>f128 instead of <func>l.
5622 2018-10-24  Martin Sebor  <msebor@redhat.com>
5624         * doc/extend.texi (nonnull): List no-argument form.  Reference
5625         -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
5627 2018-10-24  Richard Biener  <rguenther@suse.de>
5629         * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
5631 2018-10-24  Martin Liska  <mliska@suse.cz>
5633         PR tree-optimization/84436
5634         * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
5635         Remove.
5636         (switch_conversion::contains_linear_function_p): New.
5637         (switch_conversion::build_one_array): Support linear
5638         transformation on input.
5639         * tree-switch-conversion.h (struct switch_conversion): Add
5640         contains_linear_function_p declaration.
5642 2018-10-24  Richard Biener  <rguenther@suse.de>
5644         * varasm.c (const_hash_1): Return hash of ADDR_EXPR
5645         if its argument is CONSTANT_CLASS_P.
5647 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
5649         * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
5650         it is wrong for forward declarations.
5652 2018-10-24  Ilya Leoshkevich  <iii@linux.ibm.com>
5654         * config/s390/s390.c (s390_check_qrst_address): Add the missing
5655         SYMBOL_REF_P () check.
5657 2018-10-24  Richard Biener  <rguenther@suse.de>
5659         PR tree-optimization/87105
5660         * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
5661         dump classification.
5662         (vect_analyze_data_ref_accesses): Handle duplicate loads and
5663         stores by splitting the affected group after the fact.
5664         * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
5665         fail the SLP build because of size constraints.
5667 2018-10-24  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5669         * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
5670         * configure: Regenerate.
5671         * config.in: Regenerate.
5672         * varasm.c (mergeable_string_section): Use readonly_data_section
5673         if linker doesn't support SHF_MERGE with alignment > 8.
5674         (mergeable_constant_section): Likewise.
5676 2018-10-24  Richard Biener  <rguenther@suse.de>
5678         PR tree-optimization/84013
5679         * tree-ssa-structalias.c (struct msdi_data): New struct for
5680         marshalling data to walk_stmt_load_store_ops.
5681         (maybe_set_dependence_info): Refactor as callback for
5682         walk_stmt_load_store_ops.
5683         (compute_dependence_clique): Set restrict info on all stmt kinds.
5685 2018-10-24  Martin Liska  <mliska@suse.cz>
5687         * cgraph.c (cgraph_node::dump):
5688         Remove reduntant dumps and make tp_first_run dump more compact.
5690 2018-10-24  Richard Biener  <rguenther@suse.de>
5692         PR tree-optimization/87665
5693         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
5694         to reflect reality.
5696 2018-10-12  Jeff Law  <law@redhat.com>
5698         * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
5699         for H8/S.
5701 2018-10-23  Richard Biener  <rguenther@suse.de>
5703         * tree-vrp.c (add_assert_info): Guard dump_printf with
5704         dump_enabled_p.
5705         * gimple-ssa-evrp-analyze.c
5706         (evrp_range_analyzer::record_ranges_from_incoming_edge):
5707         Use value_range::ignore_equivs_equal_p.
5709 2018-10-23  Richard Biener  <rguenther@suse.de>
5711         PR tree-optimization/87105
5712         PR tree-optimization/87608
5713         * passes.def (pass_all_early_optimizations): Add early phi-opt
5714         after dce.
5715         * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
5716         addition to debug stmts.
5717         (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
5718         and abs replacement early.
5719         * tree-cfg.c (gimple_empty_block_p): Likewise.
5721 2018-10-23  Richard Earnshaw  <rearnsha@arm.com>
5723         PR target/86383
5724         * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
5725         specified to configure.
5726         (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
5728 2018-10-23  Richard Biener  <rguenther@suse.de>
5730         PR tree-optimization/87700
5731         * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
5733 2018-10-23  Jakub Jelinek  <jakub@redhat.com>
5735         PR target/87674
5736         * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
5737         second argument from __mmask16 to __mmask8.
5738         * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
5739         _mm_mask_packs_epi32): Likewise.
5740         * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
5741         Likewise.
5742         (_mm512_mask_prefetch_i64scatter_pd): Likewise.  Formatting fix.
5744 2018-10-23  Richard Biener  <rguenther@suse.de>
5746         * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
5748 2018-10-23  Richard Biener  <rguenther@suse.de>
5750         PR tree-optimization/86144
5751         * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
5752         over simd attribute.
5754 2018-10-23  Richard Biener  <rguenther@suse.de>
5756         PR tree-optimization/87693
5757         * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
5758         the case we do not find the taken edge.
5760 2018-10-22  Bill Schmidt  <wschmidt@linux.ibm.com>
5761             Jinsong Ji  <jji@us.ibm.com>
5763         * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
5764         (_mm_store_pd): Use unaligned vector type for pointer cast.
5765         (_mm_maskmoveu_si128): Likewise.
5766         * config/rs6000/xmmintrin.h (__m128_u): New typedef.
5767         (_mm_store_ps): Use unaligned vector type for pointer cast.
5769 2018-10-22  Paul Koning  <ni1d@arrl.net>
5771         * symtab.c (symtab_node::increase_alignment): Correct max
5772         alignment check.
5774 2018-10-22  Yury Gribov  <tetra2005@gmail.com>
5776         PR tree-optimization/87633
5777         * match.pd: Do not generate unordered integer comparisons.
5779 2018-10-22  Segher Boessenkool  <segher@kernel.crashing.org>
5781         PR rtl-optimization/87600
5782         * combine.c: Add include of expr.h.
5783         (cant_combine_insn_p): Do not combine moves from any hard non-fixed
5784         register to a pseudo.
5785         (make_more_copies): New function, add a copy to a new pseudo after
5786         the moves from hard registers into pseudos.
5787         (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
5788         later.  Call make_more_copies.
5790 2018-10-22  Andrew Stubbs  <ams@codesourcery.com>
5792         * lra-constraints.c (process_alt_operands): New local array,
5793         matching_early_clobber.  Check matching_early_clobber before
5794         decrementing reject, and set matching_early_clobber after.
5796 2018-10-22  Segher Boessenkool  <segher@kernel.crashing.org>
5798         PR target/87598
5799         * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
5800         call output_addr_const and hope for the best.
5802 2018-10-22  Richard Biener  <rguenther@suse.de>
5804         * gimple-ssa-evrp-analyze.c
5805         (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
5806         smarter about what ranges to use.
5807         * tree-vrp.c (add_assert_info): Dump here.
5808         (register_edge_assert_for_2): Instead of here at multiple but
5809         not all places.
5811         * gcc.dg/tree-ssa/evrp12.c: New testcase.
5812         * gcc.dg/predict-6.c: Adjust.
5813         * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
5814         * gcc.dg/tree-ssa/vrp02.c: Likewise.
5815         * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
5817 2018-10-22  Steven Bosscher <steven@gcc.gnu.org>
5818         Richard Biener  <rguenther@suse.de>
5820         * bitmap.h: Update data structure documentation, including a
5821         description of bitmap views as either linked-lists or splay trees.
5822         (struct bitmap_element_def): Update comments for splay tree bitmaps.
5823         (struct bitmap_head_def): Likewise.
5824         (bitmap_list_view, bitmap_tree_view): New prototypes.
5825         (bitmap_initialize_stat): Initialize a bitmap_head's indx and
5826         tree_form fields.
5827         (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
5828         (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
5829         * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
5830         released bitmap element here.
5831         (bitmap_element_free): Remove.
5832         (bitmap_elt_clear_from): Work on splay tree bitmaps.
5833         (bitmap_list_link_element): Renamed from bitmap_element_link.  Move
5834         this function similar ones such that linked-list bitmap implementation
5835         functions are grouped.
5836         (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
5837         and moved for grouping.
5838         (bitmap_list_insert_element_after): Renamed from
5839         bitmap_elt_insert_after, and moved for grouping.
5840         (bitmap_list_find_element): New function spliced from bitmap_find_bit.
5841         (bitmap_tree_link_left, bitmap_tree_link_right,
5842         bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
5843         bitmap_tree_link_element, bitmap_tree_unlink_element,
5844         bitmap_tree_find_element): New functions for splay-tree bitmap
5845         implementation.
5846         (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
5847         Renamed and moved, see above entries.
5848         (bitmap_tree_listify_from): New function to convert part of a splay
5849         tree bitmap to a linked-list bitmap.
5850         (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
5851         (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
5852         (bitmap_find_bit): Remove.
5853         (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
5854         bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
5855         Handle splay tree bitmaps.
5856         (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
5857         bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
5858         bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
5859         bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
5860         bitmap_intersect_compl_p, bitmap_ior_and_compl,
5861         bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
5862         bitmap_hash): Reject trying to act on splay tree bitmaps.  Make
5863         corresponding changes to use linked-list specific bitmap_element
5864         manipulation functions as applicable for efficiency.
5865         (bitmap_tree_to_vec): New function.
5866         (debug_bitmap_elt_file): New function split out from ...
5867         (debug_bitmap_file): ... here.  Handle splay tree bitmaps.
5868         (bitmap_print): Likewise.
5870         PR tree-optimization/63155
5871         * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
5872         SSA edge worklists.
5873         * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
5874         in tree-view.
5876 2018-10-22  Martin Liska  <mliska@suse.cz>
5878         PR tree-optimization/87686
5879         Revert
5880         2018-08-29  Martin Liska  <mliska@suse.cz>
5882         * tree-switch-conversion.c (switch_conversion::expand):
5883         Strenghten assumption about gswitch statements.
5885 2018-10-22  Martin Liska  <mliska@suse.cz>
5887         * ipa-icf.c (sem_item::compare_attributes): Remove.
5888         (sem_item::compare_referenced_symbol_properties): Use
5889         attribute_list_equal instead.
5890         (sem_function::equals_wpa): Likewise.
5891         * ipa-icf.h: Remove compare_attributes.
5893 2018-10-22  Richard Biener  <rguenther@suse.de>
5895         PR middle-end/87682
5896         * mem-stats.h (mem_usage::operator==): Fix pasto.
5898 2018-10-22  Richard Biener  <rguenther@suse.de>
5900         PR tree-optimization/87640
5901         * tree-vrp.c (set_value_range_with_overflow): Decompose
5902         incomplete result.
5903         (extract_range_from_binary_expr_1): Adjust.
5905 2018-10-22  Martin Jambor  <mjambor@suse.cz>
5907         * tree-eh.h (stmt_could_throw_p): Add function parameter.
5908         (stmt_can_throw_external): Likewise.
5909         (stmt_can_throw_internal): Likewise.
5910         * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
5911         (lower_eh_constructs_2): Likewise.
5912         (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
5913         (stmt_can_throw_external): Likewise.
5914         (stmt_can_throw_internal): Likewise.
5915         (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
5916         (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
5917         (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
5918         (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
5919         (pass_lower_eh_dispatch::execute): Pass cfun to
5920         stmt_can_throw_external.
5921         (cleanup_empty_eh): Likewise.
5922         (verify_eh_edges): Pass cfun to stmt_could_throw_p.
5923         * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
5924         stmt_can_throw_external instead of pushing it to cfun.
5925         (symbol_table::create_edge): Likewise.
5926         * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
5927         stmt_can_throw_internal.
5928         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
5929         to stmt_could_throw_p.
5930         * gimple-ssa-store-merging.c (handled_load): Pass cfun to
5931         stmt_can_throw_internal.
5932         (pass_store_merging::execute): Likewise.
5933         * gimple-ssa-strength-reduction.c
5934         (find_candidates_dom_walker::before_dom_children): Pass cfun to
5935         stmt_could_throw_p.
5936         * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
5937         stmt_can_throw_internal.
5938         * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
5939         to stmt_can_throw_external.
5940         (check_stmt): Pass cfun to stmt_could_throw_p.
5941         (check_stmt): Pass cfun to stmt_can_throw_external.
5942         (pass_nothrow::execute): Likewise.
5943         * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
5944         * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
5945         stmt_can_throw_internal.
5946         (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
5947         (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
5948         (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
5949         * tree-complex.c (expand_complex_libcall): Pass cfun to
5950         stmt_could_throw_p and to stmt_can_throw_internal.
5951         (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
5952         * tree-inline.c (copy_edges_for_bb): Likewise.
5953         (maybe_move_debug_stmts_to_successors): Likewise.
5954         * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
5955         stmt_could_throw_p.
5956         * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
5957         * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
5958         * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
5959         stmt_can_throw_internal.
5960         * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
5961         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
5962         stmt_could_throw_p.
5963         (mark_aliased_reaching_defs_necessary_1): Pass cfun to
5964         stmt_can_throw_internal.
5965         * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
5966         * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
5967         stmt_could_throw_p.
5968         * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
5969         (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
5970         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
5971         (convert_mult_to_fma_1): Likewise.
5972         (convert_to_divmod): Likewise.
5973         * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
5974         * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
5975         * tree-ssa-propagate.c
5976         (substitute_and_fold_dom_walker::before_dom_children): Likewise.
5977         * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
5978         (maybe_optimize_range_tests): Likewise.
5979         (linearize_expr_tree): Likewise.
5980         (reassociate_bb): Likewise.
5981         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
5982         * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
5983         * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
5984         (handle_char_store): Likewise.
5985         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
5986         stmt_can_throw_internal.
5987         * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
5988         stmt_could_throw_p.
5989         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
5990         (vectorizable_call): Pass cfun to stmt_can_throw_internal.
5991         (vectorizable_simd_clone_call): Likewise.
5992         * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
5993         (gimple_stringop_fixed_value): Likewise.
5995 2018-10-22  Ilya Leoshkevich  <iii@linux.ibm.com>
5997         * config/s390/s390.c (s390_loadrelative_operand_p): Accept
5998         literal pool references.
5999         (s390_check_qrst_address): Adapt to the new behavior of
6000         s390_loadrelative_operand_p ().
6002 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
6004         PR target/72782
6005         * config/i386/sse.md (*andnot<mode>3_bcst): New.
6007 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
6009         PR target/72782
6010         * config/i386/sse.md (*<code><mode>3_bcst): New.
6012 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
6014         PR target/72782
6015         * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
6016         V4DI, V16SI and V8DI.
6017         (*sub<mode>3<mask_name>_bcst): New.
6018         (*add<mode>3<mask_name>_bcst): Likewise.
6020 2018-10-21  Bill Schmidt  <wschmidt@linux.ibm.com>
6021             Jinsong Ji  <jji@us.ibm.com>
6023         * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
6024         __m64 with __vector unsigned long long for compatibility.
6025         (_mm_movemask_epi8): Likewise.
6026         * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
6027         (_mm_cvttps_pi32): Likewise.
6028         (_mm_cvtpi32_ps): Likewise.
6029         (_mm_cvtps_pi16): Likewise.
6030         (_mm_loadh_pi): Likewise.
6031         (_mm_storeh_pi): Likewise.
6032         (_mm_movehl_ps): Likewise.
6033         (_mm_movelh_ps): Likewise.
6034         (_mm_loadl_pi): Likewise.
6035         (_mm_storel_pi): Likewise.
6036         (_mm_movemask_ps): Likewise.
6037         (_mm_shuffle_pi16): Likewise.
6039 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
6041         PR target/72782
6042         * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
6043         __builtin_ia32_vfnmsubpd512_mask.
6044         (_mm512_mask_fnmsub_round_pd): Likewise.
6045         (_mm512_fnmsub_pd): Likewise.
6046         (_mm512_mask_fnmsub_pd): Likewise.
6047         (_mm512_maskz_fnmsub_round_pd): Use
6048         __builtin_ia32_vfnmsubpd512_maskz.
6049         (_mm512_maskz_fnmsub_pd): Likewise.
6050         (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
6051         (_mm512_mask_fnmsub_round_ps): Likewise.
6052         (_mm512_fnmsub_ps): Likewise.
6053         (_mm512_mask_fnmsub_ps): Likewise.
6054         (_mm512_maskz_fnmsub_round_ps): Use
6055         __builtin_ia32_vfnmsubps512_maskz.
6056         (_mm512_maskz_fnmsub_ps): Likewise.
6057         * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
6058         __builtin_ia32_vfnmsubpd256_mask.
6059         (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
6060         (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
6061         (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
6062         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
6063         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
6064         (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
6065         (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
6066         (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
6067         * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
6068         __builtin_ia32_vfnmsubpd.
6069         (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
6070         (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
6071         (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
6072         (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
6073         (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
6074         * config/i386/i386-builtin.def: Add
6075         __builtin_ia32_vfnmsubpd256_mask,
6076         __builtin_ia32_vfnmsubpd256_maskz,
6077         __builtin_ia32_vfnmsubpd128_mask,
6078         __builtin_ia32_vfnmsubpd128_maskz,
6079         __builtin_ia32_vfnmsubps256_mask,
6080         __builtin_ia32_vfnmsubps256_maskz,
6081         __builtin_ia32_vfnmsubps128_mask,
6082         __builtin_ia32_vfnmsubps128_maskz,
6083         __builtin_ia32_vfnmsubpd512_mask,
6084         __builtin_ia32_vfnmsubpd512_maskz,
6085         __builtin_ia32_vfnmsubps512_mask,
6086         __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
6087         __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
6088         __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
6089         __builtin_ia32_vfnmsubpd256.
6090         * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
6091         (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
6092         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
6093         Likewise.
6094         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
6095         Likewise.
6096         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
6097         Likewise.
6098         (fmai_vmfnmsub_<mode><round_name>): Likewise.
6100 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
6102         PR target/72782
6103         * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
6104         __builtin_ia32_vfnmaddpd512_mask.
6105         (_mm512_mask_fnmadd_round_pd): Likewise.
6106         (_mm512_fnmadd_pd): Likewise.
6107         (_mm512_mask_fnmadd_pd): Likewise.
6108         (_mm512_maskz_fnmadd_round_pd): Use
6109         __builtin_ia32_vfnmaddpd512_maskz.
6110         (_mm512_maskz_fnmadd_pd): Likewise.
6111         (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
6112         (_mm512_mask_fnmadd_round_ps): Likewise.
6113         (_mm512_fnmadd_ps): Likewise.
6114         (_mm512_mask_fnmadd_ps): Likewise.
6115         (_mm512_maskz_fnmadd_round_ps): Use
6116         __builtin_ia32_vfnmaddps512_maskz.
6117         (_mm512_maskz_fnmadd_ps): Likewise.
6118         * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
6119         __builtin_ia32_vfnmaddpd256_mask.
6120         (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
6121         (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
6122         (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
6123         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
6124         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
6125         (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
6126         (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
6127         (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
6128         * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
6129         __builtin_ia32_vfnmaddpd.
6130         (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
6131         (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
6132         (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
6133         (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
6134         (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
6135         * config/i386/i386-builtin.def: Add
6136         __builtin_ia32_vfnmaddpd256_mask,
6137         __builtin_ia32_vfnmaddpd256_maskz,
6138         __builtin_ia32_vfnmaddpd128_mask,
6139         __builtin_ia32_vfnmaddpd128_maskz,
6140         __builtin_ia32_vfnmaddps256_mask,
6141         __builtin_ia32_vfnmaddps256_maskz,
6142         __builtin_ia32_vfnmaddps128_mask,
6143         __builtin_ia32_vfnmaddps128_maskz,
6144         __builtin_ia32_vfnmaddpd512_mask,
6145         __builtin_ia32_vfnmaddpd512_maskz,
6146         __builtin_ia32_vfnmaddps512_mask,
6147         __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
6148         __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
6149         __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
6150         __builtin_ia32_vfnmaddpd256.
6151         * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
6152         (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
6153         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
6154         Likewise.
6155         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
6156         Likewise.
6157         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
6158         Likewise.
6159         (fmai_vmfnmadd_<mode><round_name>): Likewise.
6161 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
6163         PR target/72782
6164         * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
6165         __builtin_ia32_vfmsubpd512_mask.
6166         (_mm512_mask_fmsub_round_pd): Likewise.
6167         (_mm512_fmsub_pd): Likewise.
6168         (_mm512_mask_fmsub_pd): Likewise.
6169         (_mm512_maskz_fmsub_round_pd): Use
6170         __builtin_ia32_vfmsubpd512_maskz.
6171         (_mm512_maskz_fmsub_pd): Likewise.
6172         (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
6173         (_mm512_mask_fmsub_round_ps): Likewise.
6174         (_mm512_fmsub_ps): Likewise.
6175         (_mm512_mask_fmsub_ps): Likewise.
6176         (_mm512_maskz_fmsub_round_ps): Use
6177         __builtin_ia32_vfmsubps512_maskz.
6178         (_mm512_maskz_fmsub_ps): Likewise.
6179         * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
6180         __builtin_ia32_vfmsubpd256_mask.
6181         (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
6182         (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
6183         (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
6184         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
6185         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
6186         (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
6187         (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
6188         (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
6189         * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
6190         __builtin_ia32_vfmsubpd.
6191         (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
6192         (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
6193         (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
6194         (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
6195         (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
6196         * config/i386/i386-builtin.def: Add
6197         __builtin_ia32_vfmsubpd256_mask,
6198         __builtin_ia32_vfmsubpd256_maskz,
6199         __builtin_ia32_vfmsubpd128_mask,
6200         __builtin_ia32_vfmsubpd128_maskz,
6201         __builtin_ia32_vfmsubps256_mask,
6202         __builtin_ia32_vfmsubps256_maskz,
6203         __builtin_ia32_vfmsubps128_mask,
6204         __builtin_ia32_vfmsubps128_maskz,
6205         __builtin_ia32_vfmsubpd512_mask,
6206         __builtin_ia32_vfmsubpd512_maskz,
6207         __builtin_ia32_vfmsubps512_mask,
6208         __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
6209         __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
6210         __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
6211         __builtin_ia32_vfmsubpd256.
6212         * config/i386/sse.md (fma4i_fmsub_<mode>): New.
6213         (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
6214         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
6215         Likewise.
6216         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
6217         Likewise.
6218         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
6219         Likewise.
6220         (fmai_vmfmsub_<mode><round_name>): Likewise.
6222 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
6224         * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
6225         Remove plus.  Renamed to ...
6226         (*sub<mode>3<mask_name>_bcst): This.
6227         (*add<mode>3<mask_name>_bcst_2): Renamede to ...
6228         (*add<mode>3<mask_name>_bcst): This.
6230 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
6232         PR target/72782
6233         * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
6235 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
6237         PR target/87662
6238         * i386/avx512vlintrin.h (_mm256_or_epi32): New.
6239         (_mm_or_epi32): Likewise.
6240         (_mm256_xor_epi32): Likewise.
6241         (_mm_xor_epi32): Likewise.
6242         (_mm256_or_epi64): Likewise.
6243         (_mm_or_epi64): Likewise.
6244         (_mm256_xor_epi64): Likewise.
6245         (_mm_xor_epi64): Likewise.
6247 2018-10-20  H.J. Lu  <hongjiu.lu@intel.com>
6249         PR target/72782
6250         * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
6252 2018-10-20  Jakub Jelinek  <jakub@redhat.com>
6254         PR middle-end/87647
6255         * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
6257 2018-10-20  Andreas Schwab  <schwab@linux-m68k.org>
6259         * doc/ux.texi: Move @section directly after @node.
6261 2018-10-19  Jakub Jelinek  <jakub@redhat.com>
6263         PR middle-end/85488
6264         PR middle-end/87649
6265         * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
6266         depend closely nested inside of loop with ordered clause with
6267         a parameter.
6269 2018-10-19  David Malcolm  <dmalcolm@redhat.com>
6271         * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
6272         * doc/gccint.texi: Include ux.texi and use it in top-level menu.
6273         * doc/ux.texi: New file.
6275 2018-10-19  Segher Boessenkool  <segher@kernel.crashing.org>
6277         * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
6278         be the first CR field allocated.
6280 2018-10-19  Richard Biener  <rguenther@suse.de>
6282         PR target/87657
6283         * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
6284         TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
6286 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
6288         PR target/72782
6289         * config/i386/sse.md
6290         (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
6291         (*add<mode>3<mask_name>_bcst_2): Likewise.
6293 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
6295         * config/i386/sse.md
6296         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
6297         Replace nonimmediate_operand with register_operand.
6298         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
6299         Likewise.
6300         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
6301         Likewise.
6303 2018-10-19  Ilya Leoshkevich  <iii@linux.ibm.com>
6305         PR rtl-optimization/87596
6306         * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
6307         lra_get_insn_recog_data () instead of lra_insn_recog_data[]
6308         for instructions in FROM..TO range.
6310 2018-10-19  Eric Botcazou  <ebotcazou@adacore.com>
6312         * cfgexpand.c (expand_one_var): Use specific wording in error message
6313         for non-local frame variables.
6314         * stor-layout.c (layout_decl): Do not issue a warning for them.
6316 2018-10-19  Robin Dapp  <rdapp@linux.ibm.com>
6318         * haifa-sched.c (priority): Add force_recompute parameter.
6319         (apply_replacement): Call priority () with force_recompute = true.
6320         (restore_pattern): Likewise.
6322 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
6324         * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
6325         HOST_BITS_PER_WIDE_INT.
6326         (test_vector_ops_duplicate): Likewise.
6328 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
6330         PR target/72782
6331         * config/i386/sse.md (VF_AVX512): New.
6332         (avx512bcst): Likewise.
6333         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
6334         Likewise.
6335         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
6336         Likewise.
6337         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
6338         Likewise.
6340 2018-10-18  Jonathan Wakely  <jwakely@redhat.com>
6342         * doc/invoke.texi (-dumpversion): Improve grammar.
6343         (-dumpfullversion): Make more consistent with -dumpversion.
6345 2018-10-18  Uros Bizjak  <ubizjak@gmail.com>
6347         * config/i386/i386.c (ix86_emit_fp_unordered_jump):
6348         Set JUMP_LABEL to the jump insn.
6349         (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
6350         Predict emitted jump and add label to jump insn.
6352 2018-10-18  David Malcolm  <dmalcolm@redhat.com>
6354         PR tree-optimization/87562
6355         * input.c (get_substring_ranges_for_loc): Use
6356         LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
6357         getting the linemap for the endpoint.  Verify that it's either
6358         in the same linemap as the start point's spelling location, or
6359         at least in the same file.
6361 2018-10-18  Richard Biener  <rguenther@suse.de>
6363         * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
6364         feed width-specific load/store costs through ix86_vec_cost.
6365         * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
6366         (k8_cost): Likewise.
6367         (bdver_cost): Likewise.
6368         (znver1_cost): Likewise.
6369         (btver1_cost): Likewise.
6370         (btver2_cost): Likewise.
6372 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
6374         * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
6375         to simplify subreg of vec_merge.
6377 2018-10-18  Richard Biener  <rguenther@suse.de>
6379         * config/i386/i386.c: Fix costing of vector FMA.
6381 2018-10-18  Richard Biener  <rguenther@suse.de>
6383         * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
6384         and argument.
6385         (ix86_builtin_vectorization_cost): For vec_construct properly
6386         cost insertion into SSE regs.
6387         (...): Adjust calls to ix86_vec_cost.
6389 2018-10-18  Richard Biener  <rguenther@suse.de>
6391         PR middle-end/87087
6392         Revert
6393         2018-02-07  Richard Biener  <rguenther@suse.de>
6395         PR tree-optimization/84204
6396         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
6397         this place.
6399 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
6401         PR target/87537
6402         * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
6403         of vec_duplicate.
6404         (test_vector_ops_duplicate): Add test for a scalar subreg of a
6405         VEC_MERGE of a VEC_DUPLICATE.
6407 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
6409         * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
6410         * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
6411         * doc/standards.texi (C Language): Document C2X.
6412         * dwarf2out.c (highest_c_language), config/rl78/rl78.c
6413         (rl78_option_override): Handle "GNU C2X" language name.
6415 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
6417         * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
6418         Document C17 as published in 2018.
6420 2018-10-17  Eric Botcazou  <ebotcazou@adacore.com>
6422         PR middle-end/87623
6423         * fold-const.c (fold_truth_andor_1): If the right side is not constant,
6424         bail out if both sides do not have the same storage order.
6426 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
6428         * bitmap.c (bitmap_head::dump): New.
6429         * bitmap.h (bitmap_head): Add dump().
6430         * gimple-ssa-evrp-analyze.c
6431         (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
6432         (evrp_range_analyzer::set_ssa_range_info): Same.
6433         (evrp_range_analyzer::record_ranges_from_phis): Same.
6434         (evrp_range_analyzer::record_ranges_from_stmt): Same.
6435         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
6436         * gimple-ssa-sprintf.c (get_int_range): Same.
6437         (format_integer): Same.
6438         (sprintf_dom_walker::handle_gimple_call): Same.
6439         * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
6440         (ipcp_vr_lattice::top_p): Same.
6441         (ipcp_vr_lattice::bottom_p): Same.
6442         (ipcp_vr_lattice::set_to_bottom): Same.
6443         (ipa_vr_operation_and_type_effects): Same.
6444         (propagate_vr_across_jump_function): Same.
6445         (ipcp_store_vr_results): Same.
6446         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
6447         (ipa_print_node_jump_functions_for_edge): Same.
6448         (ipa_get_value_range): Same.
6449         (ipa_compute_jump_functions_for_edge): Same.
6450         (ipa_write_jump_function): Same.
6451         * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
6452         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
6453         Same.
6454         * vr-values.c (set_value_range_to_nonnegative): Same.
6455         (set_value_range_to_truthvalue): Same.
6456         (vr_values::get_value_range): Same.
6457         (vr_values::set_defs_to_varying): Same.
6458         (vr_values::update_value_range): Same.
6459         (symbolic_range_based_on_p): Same.
6460         (vr_values::op_with_boolean_value_range_p): Same.
6461         (vr_values::extract_range_for_var_from_comparison_expr): Same.
6462         (vr_values::extract_range_from_ssa_name): Same.
6463         (vr_values::extract_range_from_binary_expr): Same.
6464         (vr_values::extract_range_from_unary_expr): Same.
6465         (vr_values::extract_range_from_cond_expr): Same.
6466         (vr_values::extract_range_from_comparison): Same.
6467         (vr_values::check_for_binary_op_overflow): Same.
6468         (vr_values::extract_range_basic): Same.
6469         (vr_values::extract_range_from_assignment): Same.
6470         (compare_ranges): Same.
6471         (compare_range_with_value): Same.
6472         (vr_values::adjust_range_with_scev): Same.
6473         (vrp_valueize): Same.
6474         (vrp_valueize_1): Same.
6475         (vr_values::get_vr_for_comparison): Same.
6476         (vr_values::compare_name_with_value): Same.
6477         (vr_values::compare_names): Same.
6478         (vr_values::vrp_evaluate_conditional): Same.
6479         (find_case_label_ranges): Same.
6480         (vr_values::vrp_visit_switch_stmt): Same.
6481         (vr_values::extract_range_from_phi_node): Same.
6482         (vr_values::simplify_div_or_mod_using_ranges): Same.
6483         (vr_values::simplify_bit_ops_using_ranges): Same.
6484         (test_for_singularity): Same.
6485         (range_fits_type_p): Same.
6486         (vr_values::simplify_cond_using_ranges_1): Same.
6487         (vr_values::simplify_switch_using_ranges): Same.
6488         (vr_values::simplify_float_conversion_using_ranges): Same.
6489         (vr_values::two_valued_val_range_p): Same.
6490         (vr_values::add_equivalence): Move to value_range::equiv_add.
6491         * vr-values.h (vr_values::add_equivalence): Remove.
6492         (VR_INITIALIZER): Remove.
6493         * tree-vrp.c (value_range::set): New.
6494         (value_range::equiv_add): New.
6495         (value_range::value_range): New.
6496         (value_range::deep_copy): New.
6497         (value_range::check): New.
6498         (value_range::equal_p): New.
6499         (value_range::ignore_equivs_equal_p): New.
6500         (value_range::operator==): New.
6501         (value_range::operator!=): New.
6502         (value_range::symbolic_p): New.
6503         (value_range::numeric_p): New.
6504         (value_range::set_undefined): New.
6505         (value_range::set_varying): New.
6506         (value_range::may_contain_p): New.
6507         (value_range::equiv_clear): New.
6508         (value_range::singleton_p): New.
6509         (value_range::intersect): New.
6510         (value_range::dump): New.
6511         (value_range::set_and_canonicalize): New.
6512         (set_value_range): Adjust for value_range API.
6513         (set_value_range_to_undefined): Same.
6514         (set_value_range_to_varying): Same.
6515         (set_and_canonicalize_value_range): Same.
6516         (set_value_range_to_nonnull): Same.
6517         (set_value_range_to_null): Same.
6518         (range_is_null): Same.
6519         (range_is_nonnull): Same.
6520         (range_int_cst_p): Same.
6521         (range_int_cst_singleton_p): Same.
6522         (symbolic_range_p): Same.
6523         (range_includes_zero_p): Same.
6524         (value_range_constant_singleton): Same.
6525         (vrp_set_zero_nonzero_bits): Same.
6526         (ranges_from_anti_range): Same.
6527         (extract_range_into_wide_ints): Same.
6528         (extract_range_from_multiplicative_op): Same.
6529         (set_value_range_with_overflow): Same.
6530         (extract_range_from_binary_expr_1): Same.
6531         (extract_range_from_unary_expr): Same.
6532         (dump_value_range): Same.
6533         (debug_value_range): Same.
6534         (vrp_prop::check_array_ref): Same.
6535         (vrp_prop::check_mem_ref): Same.
6536         (vrp_prop::vrp_initialize): Same.
6537         (vrp_prop::visit_stmt): Same.
6538         (intersect_ranges): Same.
6539         (vrp_prop::visit_phi): Same.
6540         (vrp_prop::vrp_finalize): Same.
6541         (determine_value_range_1): Same.
6542         (determine_value_range): Same.
6543         (vrp_intersect_ranges_1): Rename to...
6544         (vrp_intersect_1): this.
6545         (vrp_intersect_ranges): Rename to...
6546         (value_range::intersect_helper): ...this.
6547         (vrp_meet_1): Rename to...
6548         (value_range::union_helper): ...this.
6549         (vrp_meet): Rename to...
6550         (value_range::union_): ...this.
6551         (copy_value_range): Remove.
6552         * tree-vrp.h (struct value_range): Rewrite into a proper class.
6553         (value_range::vrtype): New.
6554         (value_range::type): New.
6555         (value_range::equiv): New.
6556         (value_range::min): New.
6557         (value_range::max): New.
6558         (value_range::varying_p): New.
6559         (value_range::undefined_p): New.
6560         (value_range::null_p): New.
6561         (value_range::equiv_add): New.
6562         (copy_value_range): Remove.
6564 2018-10-17  David Malcolm  <dmalcolm@redhat.com>
6566         * Makefile.in (SELFTEST_TARGETS): New.
6567         (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
6568         (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
6569         (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
6570         c/Make-lang.in.
6571         (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
6572         (selftest-c++-gdb, selftest-c++-valgrind): Move to
6573         cp/Make-lang.in.
6574         * configure: Regenerate.
6575         * configure.ac (selftest_languages): New.
6577 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
6579         * tree-vrp.c (extract_range_from_multiplicative_op): Remove
6580         overflow wraps argument.
6581         (extract_range_from_binary_expr_1): Do not pass overflow wraps to
6582         wide_int_range_multiplicative_op.
6583         * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
6584         overflow wraps argument.
6585         (wide_int_range_multiplicative_op): Same.
6586         (wide_int_range_lshift): Same.
6587         (wide_int_range_div): Same.
6588         * wide-int-range.h (wide_int_range_multiplicative_op): Same.
6589         (wide_int_range_lshift): Same.
6590         (wide_int_range_div): Same.
6592 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
6594         * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
6595         use sign as argument.
6596         * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
6597         wide_int_range_shift_undefined_p.
6599 2018-10-16  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6601         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
6602         Rename to...
6603         (@despeculate_copy<ALLI_TI:mode>): ... This.
6604         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
6605         switch statement.
6607 2018-10-16  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6609         * config.gcc: Obsolete *-*-solaris2.10*.
6610         * doc/install.texi (Specific, *-*-solaris2*): Document it.
6612 2018-10-12  Jeff Law  <law@redhat.com>
6614         * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
6615         reg + sym +- const_int addressing modes.
6617 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
6619         * common.opt (fdiagnostics-minimum-margin-width=): New option.
6620         * diagnostic-show-locus.c (layout::layout): Apply the minimum
6621         margin width.
6622         (layout::start_annotation_line): Only print up to 3 of the
6623         margin character, to avoid touching the left-hand side.
6624         (selftest::test_diagnostic_show_locus_fixit_lines): Update for
6625         minimum margin width, as set by test_diagnostic_context's ctor.
6626         (selftest::test_fixit_insert_containing_newline): Likewise.
6627         (selftest::test_fixit_insert_containing_newline_2): Likewise.
6628         (selftest::test_line_numbers_multiline_range): Clear
6629         dc.min_margin_width.
6630         * diagnostic.c (diagnostic_initialize): Initialize
6631         min_margin_width.
6632         * diagnostic.h (struct diagnostic_context): Add field
6633         "min_margin_width".
6634         * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
6635         * opts.c (common_handle_option): Handle
6636         OPT_fdiagnostics_minimum_margin_width_.
6637         * selftest-diagnostic.c
6638         (selftest::test_diagnostic_context::test_diagnostic_context):
6639         Initialize min_margin_width to 6.
6640         * toplev.c (general_init): Initialize global_dc->min_margin_width.
6642 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
6644         * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
6645         Fix usage of "error_at_rich_loc" in the comment.
6647 2018-10-15  Renlin Li  <renlin.li@arm.com>
6649         PR target/87563
6650         * tree-vectorizer.c (try_vectorize_loop_1): Don't use
6651         if-conversioned loop when it contains ifn with types not
6652         supported by backend.
6653         * internal-fn.c (expand_direct_optab_fn): Add an assert.
6654         (direct_internal_fn_supported_p): New helper function.
6655         * internal-fn.h (direct_internal_fn_supported_p): Declare.
6657 2018-10-15  Jakub Jelinek  <jakub@redhat.com>
6659         PR target/87572
6660         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
6661         Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
6662         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
6664 2018-10-15  Bin Cheng  <bin.cheng@linux.alibaba.com>
6666         PR tree-optimization/87022
6667         * tree-loop-distribution.c (pg_add_dependence_edges): Check all
6668         bits in dist vector rather than the first one.
6670 2018-10-15  Richard Biener  <rguenther@suse.de>
6672         PR middle-end/87610
6673         * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
6674         (visit_loadstore): When a used restrict tag escaped verify that
6675         the points-to solution of "other" pointers do not include
6676         escaped.
6677         (compute_dependence_clique): If a used restrict tag escaped
6678         communicated that down to visit_loadstore.
6680 2018-10-15  Andreas Krebbel  <krebbel@linux.ibm.com>
6682         * config/s390/s390.c (s390_expand_vec_init): Force vector element
6683         into reg if it isn't a general operand.
6685 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
6687         PR target/87599
6688         * config/i386/sse.md (*vec_dupv2di): Add register source to
6689         movddup.
6691 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
6693         PR target/87572
6694         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
6695         Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
6696         OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
6697         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
6699 2018-10-13  Eric Botcazou  <ebotcazou@adacore.com>
6701         * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
6702         (notice_args_size): Set it in the current trace if no insn that can
6703         throw internally has been seen yet.
6704         (connect_traces): When connecting args_size between traces, allow the
6705         incoming values not to match if there is an insn setting it before the
6706         first insn that can throw internally; in that case, force the creation
6707         of a CFI note on this latter insn.
6709 2018-10-13  Jonathan Wakely  <jwakely@redhat.com>
6711         * opt-problem.h (opt_wrapper): Use template-argument-list when naming
6712         the base class, because using the injected-class-name was not clearly
6713         specified until DR 176.
6715 2018-10-12  Paul Koning  <ni1d@arrl.net>
6717         * config/pdp11/pdp11.md (doloop_end): New expander.
6718         (doloop_end_insn): renamed from "doloop_end".
6719         (addqi3): New pattern.
6720         (subqi3): New pattern.
6721         * config/pdp11/predicates.md (incdec_operand): New predicate.
6723 2018-10-12  Yury Gribov  <tetra2005@gmail.com>
6725         PR middle-end/81376
6726         * real.c (format_helper::can_represent_integral_type_p): New function
6727         * real.h (format_helper::can_represent_integral_type_p): Ditto.
6728         * match.pd: New pattern.
6730 2018-10-12  Alexandre Oliva <oliva@adacore.com>
6732         * configure.ac: Introduce --enable-large-address-aware
6733         to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
6734         * doc/install.texi: Document it.
6735         * configure, config.in: Rebuilt.
6736         * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
6737         based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
6738         (LINK_SPEC): Insert it.
6739         * config/i386/mingw-w64.h: Likewise.
6741         * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
6743 2018-10-12  Peter Bergner  <bergner@linux.ibm.com>
6745         PR rtl-optimization/87600
6746         * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
6748 2018-10-12  Paul Koning  <ni1d@arrl.net>
6750         * doc/md.texi (doloop_end): Document that the pattern code may
6751         need to check operand mode.
6753 2018-10-12  Wilco Dijkstra  <wdijkstr@arm.com>
6755         * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
6756         to zero-extend between int and floating-point registers.
6757         (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
6758         ldp into floating-point registers.  Add type and arch attributes.
6759         (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
6760         Use f_loads for type attribute.
6762 2018-10-11  Martin Sebor  <msebor@redhat.com>
6764         * doc/extend.texi (attribute packed): Correct typos.
6766 2018-10-11  Martin Sebor  <msebor@redhat.com>
6768         * doc/extend.texi (attribute flatten): Mention interaction with
6769         noinline.
6771 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
6773         PR target/87156
6774         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
6775         Set new_decl virtual flag to zero.
6777 2018-10-11  Martin Sebor  <msebor@redhat.com>
6779         PR middle-end/87593
6780         * doc/extend.texi (attribute format_arg): Discuss using multiple
6781         attributes on a single function.
6783 2018-10-11  Giuliano Belinassi  <giuliano.belinassi@usp.br>
6785         PR tree-optimization/86829
6786         * match.pd (sin (atan (x))): New simplification rules.
6787         (cos (atan (x))): Likewise.
6788         * real.c (build_sinatan_real): New function.
6789         * real.h (build_sinatan_real): Prototype.
6791 2018-10-11  Will Schmidt <will_schmidt@vnet.ibm.com>
6793         * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
6794         function.
6795         (fold_mergeeo_helper): New helper function.
6796         (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
6797         intrinsics.  Correct some whitespace indentation issues.
6799 2018-10-11  Wilco Dijkstra  <wdijkstr@arm.com>
6801         PR target/87511
6802         * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
6803         Use HOST_WIDE_INT_1U for shift.
6805 2018-10-11  Doug Rupp  <rupp@adacore.com>
6806             Olivier Hainque  <hainque@adacore.com>
6808         * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
6809         Pass --relax to the linker for RTPs.
6810         (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
6812 2018-10-11  Andrew Stubbs  <ams@codesourcery.com>
6813             Jan Hubicka  <jh@suse.cz>
6814             Martin Jambor  <mjambor@suse.cz>
6816         * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
6817         the same elements are repeated rather than printing all of them.
6818         * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
6819         "repeated" elements.
6820         * read-rtl-function.c (test_loading_repeat): New function.
6821         (read_rtl_function_c_tests): Call test_loading_repeat.
6822         * rtl-tests.c (test_dumping_repeat): New function.
6823         (rtl_tests_c_tests): Call test_dumping_repeat.
6825 2018-10-11  Richard Biener  <rguenther@suse.de>
6827         * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
6828         bdver?_cost): Unify to ...
6829         (bdver_memcpy, bdver_memset, bdver_cost): ... this.
6830         * config/i386/i386.c (processor_cost_table): Adjust.
6832 2018-10-10  Eric Botcazou  <ebotcazou@adacore.com>
6834         PR middle-end/87574
6835         * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
6836         the thunk when expanding to GIMPLE.
6838 2018-10-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6840         PR bootstrap/87551
6841         * varasm.c (mergeable_string_section): Don't try to move zero-length
6842         strings to the merge section.
6844 2018-10-10  Uros Bizjak  <ubizjak@gmail.com>
6846         PR target/87573
6847         * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
6849 2018-10-10  Jakub Jelinek  <jakub@redhat.com>
6851         PR target/87550
6852         * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
6853         to special_args set.
6855 2018-10-10  Richard Biener  <rguenther@suse.de>
6857         * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
6858         reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
6859         reduc_plus_scal_v4sf): Merge into pattern reducing to half width
6860         and recursing and pattern terminating the recursion on SSE
6861         vector width using ix86_expand_reduc.
6862         (reduc_sminmax_scal_<mode>): Split into part reducing to half
6863         width and recursing and SSE2 vector variant doing the final
6864         reduction with ix86_expand_reduc.
6865         (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
6866         with terminating the recursion at AVX level, splitting that
6867         to SSE there.
6869 2018-10-09  David Malcolm  <dmalcolm@redhat.com>
6871         * genmatch.c (error_cb): Rename to...
6872         (diagnostic_cb): ...this, converting int params to enums.
6873         (fatal_at): Update for renaming.
6874         (warning_at): Likewise.
6875         (main): Likewise.
6876         * input.c (selftest::ebcdic_execution_charset::apply):
6877         Update for renaming of...
6878         (selftest::ebcdic_execution_charset::on_error): ...this, renaming
6879         to...
6880         (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
6881         converting level and reason to enums.
6882         (class selftest::lexer_error_sink): Rename to...
6883         (class selftest::lexer_test_options): ...this, renaming field
6884         "m_errors" to "m_diagnostics".
6885         (selftest::lexer_test_options::apply): Update for renaming of...
6886         (selftest::lexer_test_options::on_error): ...this, renaming to...
6887         (selftest::lexer_test_options::on_diagnostic): ...this
6888         converting level and reason to enums.
6889         (selftest::test_lexer_string_locations_raw_string_unterminated):
6890         Update for renamings.
6891         * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
6892         "reason".
6894 2018-10-09  Paul A. Clarke  <pc@us.ibm.com>
6896         * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
6897         * config/rs6000/pmmintrin.h: New file.
6899 2018-10-09  Eric Botcazou  <ebotcazou@adacore.com>
6901         PR tree-optimization/86659
6902         * gimple-match.h (gimple_match_op constructors): Initialize reverse.
6904 2018-10-09  Richard Biener  <rguenther@suse.de>
6906         PR tree-optimization/63155
6907         * tree-ssa-structalias.c: Include tree-ssa.h.
6908         (get_constraint_for_ssa_var): For undefs return nothing_id.
6909         (find_func_aliases): Cleanup PHI handling.
6911 2018-10-09  Richard Biener  <rguenther@suse.de>
6913         * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
6914         replacements.
6916 2018-10-09  Martin Liska  <mliska@suse.cz>
6918         * asan.c (asan_emit_stack_protection): If a stack variable
6919         is located in a same file as current function, then emit
6920         line info into variable definition string.
6922 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
6924         * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
6925         information.
6927 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
6929         * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
6930         on the thunk.
6932 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
6934         PR tree-optimization/86659
6935         * gimple-match.h (struct gimple_match_op): Add reverse field.
6936         (gimple_match_op::set_op): New overloaded method.
6937         * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
6938         the REF_REVERSE_STORAGE_ORDER flag on the value.
6939         (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
6940         REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
6942 2018-10-08  Richard Sandiford  <richard.sandiford@arm.com>
6944         PR middle-end/63155
6945         * gimple-ssa-backprop.c (backprop::intersect_uses): Use
6946         FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
6948 2018-10-08  H.J. Lu  <hongjiu.lu@intel.com>
6950         PR target/87517
6951         * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
6952         Defined with __builtin_ia32_vfmaddsubpd512_mask.
6954 2018-10-08  Richard Biener  <rguenther@suse.de>
6956         * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
6957         cost the same as AVX128 ones.
6959 2018-10-08  Paul Koning  <ni1d@arrl.net>
6961         * config/pdp11/pdp11-protos.h (output_block_move): Remove.
6962         (expand_block_move): New function.
6963         * config/pdp11/pdp11.c (output_block_move): Remove.
6964         (expand_block_move): New function.
6965         * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
6966         * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
6967         (*movmemhi1): Remove.
6969 2018-10-08  Robin Dapp  <rdapp@linux.ibm.com>
6971         * config/s390/2827.md: Increase latencies for some FP instructions.
6973 2018-10-08  Richard Biener  <rguenther@suse.de>
6975         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
6976         Open a dump scope.
6977         * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
6978         * tree-vectorizer.h (dump_stmt_cost): Adjust.
6979         (add_stmt_cost): Dump return value of the hook.
6981 2018-10-08  Richard Biener  <rguenther@suse.de>
6983         PR tree-optimization/63155
6984         * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
6985         (ssa_propagation_engine::ssa_propagate): Remove redundant
6986         bitmap bit clearing.
6988 2018-10-05  Peter Bergner  <bergner@linux.ibm.com>
6990         PR rtl-optimization/86939
6991         PR rtl-optimization/87479
6992         * ira.h (non_conflicting_reg_copy_p): New prototype.
6993         * ira-lives.c (ignore_reg_for_conflicts): New static variable.
6994         (make_hard_regno_dead): Don't add conflicts for register
6995         ignore_reg_for_conflicts.
6996         (make_object_dead): Likewise.
6997         (non_conflicting_reg_copy_p): New function.
6998         (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
6999         Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
7000         * lra-lives.c (ignore_reg_for_conflicts): New static variable.
7001         (make_hard_regno_dead): Don't add conflicts for register
7002         ignore_reg_for_conflicts.  Remove special conflict handling of
7003         REAL_PIC_OFFSET_TABLE_REGNUM.  Remove now unused argument
7004         check_pic_pseudo_p and update callers.
7005         (mark_pseudo_dead): Don't add conflicts for register
7006         ignore_reg_for_conflicts.
7007         (process_bb_lives): Set ignore_reg_for_conflicts for copies.
7009 2018-10-05  Andrew Waterman  <andrew@sifive.com>
7010             Jim Wilson  <jimw@sifive.com>
7012         * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
7013         Add define_expand.  Add ! HONOR_SNANS check to current pattern.  Add
7014         new pattern using HONOR_SNANS that emits one extra instruction.
7016 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
7018         * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
7019         patterns): Merge SI and DI patterns to a GPR pattern.
7020         (unnamed define_insn and define_split for record form of that): Merge
7021         to a single define_insn_and_split pattern.
7023 2018-10-05  David Malcolm  <dmalcolm@redhat.com>
7025         PR c++/56856
7026         * input.c (expand_location_to_spelling_point): Add param "aspect"
7027         and use rather than hardcoding LOCATION_ASPECT_CARET.
7028         (get_substring_ranges_for_loc): Handle the case of a single token
7029         within a macro expansion.
7030         * input.h (expand_location_to_spelling_point): Add "aspect" param,
7031         defaulting to LOCATION_ASPECT_CARET.
7033 2018-10-05  Paul Koning  <ni1d@arrl.net>
7035         * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
7036         (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
7037         (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
7038         (pdp11_guard_type): New function.
7040 2018-10-05  Paul Koning  <ni1d@arrl.net>
7042         * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
7043         * config/pdp11/pdp11.opt (mfloat32): Remove.
7044         (mfloat64): Remove.
7045         * doc/invoke.texi (pdp11 -mfloat32): Remove:
7046         (pdp11 -mfloat64): Remove.
7048 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
7050         * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
7051         (*cmp<mode>_cc_i387): Ditto.
7052         (*cmpu<mode>_cc_i387): Ditto.
7053         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
7054         * config/i386/i386.c (ix86_expand_fp_compare): Remove
7055         "scratch" argument.
7056         <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
7057         Emit x86_sahf_1 pattern.
7058         (ix86_expand_compare): Update call to ix86_expand_fp_compare.
7059         (ix86_expand_carry_flag_compare): Ditto.
7061 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
7063         * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
7064         to reg_or_0_operand.  Add "C" constraint.
7065         (*cmpxf_cc_i387): Ditto.
7066         (*cmp<mode>_i387): Change operand 2 predicate
7067         to nonimm_or_0_operand.  Add "C" constraint.
7068         (*cmp<mode>_cc_i387): Ditto.
7069         (*cmp<mode>_0_i387): Remove insn pattern.
7070         (*cmp<mode>_0_cc_i387): Ditto.
7072 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
7074         * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
7075         * config/i386/predicates.md (nonimm_or_0_operand): Rename
7076         from vector_move_operand.  Update all uses.
7078 2018-10-05  Martin Sebor  <msebor@redhat.com>
7080         PR tree-optimization/87490
7081         * builtins.c (expand_builtin_strnlen): Handle a null data.decl
7082         consistently.
7084 2018-10-05  Richard Biener  <rguenther@suse.de>
7086         PR tree-optimization/63155
7087         * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
7088         vertical space in dumpfiles.
7089         * tree-ssa-propagate.h
7090         (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
7091         * tree-ssa-propagate.c (cfg_blocks_back): New global.
7092         (ssa_edge_worklist_back): Likewise.
7093         (curr_order): Likewise.
7094         (cfg_blocks_get): Remove abstraction.
7095         (cfg_blocks_add): Likewise.
7096         (cfg_blocks_empty_p): Likewise.
7097         (add_ssa_edge): Add to current or next worklist based on
7098         RPO index.
7099         (add_control_edge): Likewise.
7100         (ssa_propagation_engine::process_ssa_edge_worklist): Fold
7101         into ...
7102         (ssa_propagation_engine::ssa_propagate): ... here.  Unify
7103         iteration from CFG and SSA edge worklist so we process
7104         everything in RPO order, prioritizing forward progress
7105         over iteration.
7106         (ssa_prop_init): Allocate new worklists, do not dump
7107         immediate uses.
7108         (ssa_prop_fini): Free new worklists.
7110 2018-10-05  Richard Biener  <rguenther@suse.de>
7112         * tree-core.h (tree_block::abstract_flag): Remove.
7113         (tree_block::block_num): Make full 32bits.
7114         * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
7115         * tree.h (BLOCK_ABSTRACT): Remove.
7116         * dwarf2out.c (gen_lexical_block_die): Remove dead code
7117         resulting from BLOCK_ABSTRACT being always false.
7118         (gen_inlined_subroutine_die): Likewise.
7119         (gen_block_die): Likewise.
7120         * tree.c (block_ultimate_origin): Likewise.
7121         * tree-pretty-print.c (dump_block_node): Remove code dealing
7122         with BLOCK_ABSTRACT.
7123         * tree-ssa-live.c (dump_scope_block): Likewise.
7124         * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
7125         * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
7127 2018-10-05   Richard Biener  <rguenther@suse.de>
7129         * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
7130         is asked for initialize mode to the component mode of the
7131         vector type.
7133 2018-10-05  H.J. Lu  <hongjiu.lu@intel.com>
7135         PR target/87522
7136         * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
7137         assembler for -mavx.
7138         * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
7140 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
7142         PR target/87509
7143         * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
7144         RS6000_BTM_DFP.
7145         * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
7146         to be DImode.  When using mffscrn, force the operand to a register.
7148 2018-10-04  Uros Bizjak  <ubizjak@gmail.com>
7150         * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
7151         from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
7152         X87MODEF mode iterator.
7153         (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
7154         *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
7155         X87MODEF mode iterator.
7157 2018-10-04  Vinay Kumar  <vinay.kumar@blackfigtech.com>
7159         * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
7160         -Wno-prio-ctor-dtor.
7162 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
7164         * Makefile.in (OBJS): Add opt-problem.o.
7165         * dump-context.h: Include "selftest.h.
7166         (selftest::temp_dump_context): New forward decl.
7167         (class dump_context): Make friend of class
7168         selftest::temp_dump_context.
7169         (dump_context::dump_loc_immediate): New decl.
7170         (class dump_pretty_printer): Move here from dumpfile.c.
7171         (class temp_dump_context): Move to namespace selftest.
7172         (temp_dump_context::temp_dump_context): Add param
7173         "forcibly_enable_dumping".
7174         (selftest::verify_dumped_text):
7175         (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
7176         (selftest::verify_item):
7177         (ASSERT_IS_TEXT): Move here from dumpfile.c.
7178         (ASSERT_IS_TREE): Likewise.
7179         (ASSERT_IS_GIMPLE): Likewise.
7180         * dumpfile.c (dump_context::dump_loc): Move immediate dumping
7181         to...
7182         (dump_context::dump_loc_immediate): ...this new function.
7183         (class dump_pretty_printer): Move to dump-context.h.
7184         (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
7185         (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
7186         (temp_dump_context::temp_dump_context): Move to "selftest"
7187         namespace.  Add param "forcibly_enable_dumping", and use it to
7188         conditionalize the use of m_pp;
7189         (selftest::verify_dumped_text): Make non-static.
7190         (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
7191         (selftest::verify_item): Make non-static.
7192         (ASSERT_IS_TEXT): Move to dump-context.h.
7193         (ASSERT_IS_TREE): Likewise.
7194         (ASSERT_IS_GIMPLE): Likewise.
7195         (selftest::test_capture_of_dump_calls): Pass "true" for new
7196         param of temp_dump_context.
7197         * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
7198         it to MSG_ALL_PRIORITIES.  Update values of TDF_COMPARE_DEBUG and
7199         TDF_COMPARE_DEBUG.
7200         * opt-problem.cc: New file.
7201         * opt-problem.h: New file.
7202         * optinfo-emit-json.cc
7203         (selftest::test_building_json_from_dump_calls): Pass "true" for
7204         new param of temp_dump_context.
7205         * optinfo.cc (optinfo_kind_to_dump_flag): New function.
7206         (optinfo::emit_for_opt_problem): New function.
7207         (optinfo::emit): Clarity which emit_item is used.
7208         * optinfo.h (optinfo::get_dump_location): New accessor.
7209         (optinfo::emit_for_opt_problem): New decl.
7210         (optinfo::emit): Make const.
7211         * selftest-run-tests.c (selftest::run_tests): Call
7212         selftest::opt_problem_cc_tests.
7213         * selftest.h (selftest::opt_problem_cc_tests): New decl.
7214         * tree-data-ref.c (dr_analyze_innermost): Convert return type from
7215         bool to opt_result, converting fprintf messages to
7216         opt_result::failure_at calls.  Add "stmt" param for use by the
7217         failure_at calls.
7218         (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
7219         (runtime_alias_check_p): Convert return type from bool to
7220         opt_result, converting dump_printf calls to
7221         opt_result::failure_at, using the statement DDR_A for their
7222         location.
7223         (find_data_references_in_stmt): Convert return type from bool to
7224         opt_result, converting "return false" to opt_result::failure_at
7225         with a new message.
7226         * tree-data-ref.h: Include "opt-problem.h".
7227         (dr_analyze_innermost): Convert return type from bool to opt_result,
7228         and add a const gimple * param.
7229         (find_data_references_in_stmt): Convert return type from bool to
7230         opt_result.
7231         (runtime_alias_check_p): Likewise.
7232         * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
7233         dr_analyze_innermost.
7234         * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
7235         Convert return type from bool to opt_result, adding a message for
7236         the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
7237         (vect_analyze_data_ref_dependence): Convert return type from bool
7238         to opt_result.  Change sense of return type from "false"
7239         effectively meaning "no problems" to "false" meaning a problem,
7240         so that "return false" becomes "return opt_result::success".
7241         Convert "return true" calls to opt_result::failure_at, using
7242         the location of statement A rather than vect_location.
7243         (vect_analyze_data_ref_dependences): Convert return type from bool
7244         to opt_result.
7245         (verify_data_ref_alignment): Likewise, converting dump_printf_loc
7246         calls to opt_result::failure_at, using the stmt location rather
7247         than vect_location.
7248         (vect_verify_datarefs_alignment): Convert return type from bool
7249         to opt_result.
7250         (vect_enhance_data_refs_alignment): Likewise.  Split local "stat"
7251         into multiple more-tightly-scoped copies.
7252         (vect_analyze_data_refs_alignment): Convert return type from bool
7253         to opt_result.
7254         (vect_analyze_data_ref_accesses): Likewise, converting a
7255         "return false" to a "return opt_result::failure_at", adding a
7256         new message.
7257         (vect_prune_runtime_alias_test_list): Convert return type from
7258         bool to opt_result, converting dump_printf_loc to
7259         opt_result::failure_at.  Add a %G to show the pertinent statement,
7260         and use the stmt's location rather than vect_location.
7261         (vect_find_stmt_data_reference): Convert return type from
7262         bool to opt_result, converting dump_printf_loc to
7263         opt_result::failure_at, using stmt's location.
7264         (vect_analyze_data_refs):  Convert return type from bool to
7265         opt_result.  Convert "return false" to "return
7266         opt_result::failure_at", adding messages as needed.
7267         * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
7268         type from bool to opt_result.
7269         (vect_determine_vf_for_stmt): Likewise.
7270         (vect_determine_vectorization_factor): Likewise, converting
7271         dump_printf_loc to opt_result::failure_at, using location of phi
7272         rather than vect_location.
7273         (vect_analyze_loop_form_1): Convert return type from bool to
7274         opt_result, converting dump_printf_loc calls, retaining the use of
7275         vect_location.
7276         (vect_analyze_loop_form): Convert return type from loop_vec_info
7277         to opt_loop_vec_info.
7278         (vect_analyze_loop_operations): Convert return type from bool to
7279         opt_result, converting dump_printf_loc calls, using the location
7280         of phi/stmt rather than vect_location where available.  Convert
7281         various "return false" to "return opt_result::failure_at" with
7282         "unsupported phi" messages.
7283         (vect_get_datarefs_in_loop): Convert return type from bool to
7284         opt_result.  Add a message for the
7285         PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
7286         (vect_analyze_loop_2): Convert return type from bool to
7287         opt_result.  Ensure "ok" is set to a opt_result::failure_at before
7288         each "goto again;", adding new messages where needed.
7289         Add "unsupported grouped {store|load}" messages.
7290         (vect_analyze_loop): Convert return type from loop_vec_info to
7291         opt_loop_vec_info.
7292         * tree-vect-slp.c (vect_analyze_slp): Convert return type from
7293         bool to opt_result.
7294         * tree-vect-stmts.c (process_use): Likewise, converting
7295         dump_printf_loc call and using stmt location, rather than
7296         vect_location.
7297         (vect_mark_stmts_to_be_vectorized): Likeise.
7298         (vect_analyze_stmt): Likewise, adding a %G.
7299         (vect_get_vector_types_for_stmt): Convert return type from bool to
7300         opt_result, converting dump_printf_loc calls and using stmt
7301         location, rather than vect_location.
7302         (vect_get_mask_type_for_stmt): Convert return type from tree to
7303         opt_tree, converting dump_printf_loc calls and using stmt location.
7304         * tree-vectorizer.c: Include "opt-problem.h.
7305         (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
7306         MSG_PRIORITY_INTERNALS.  Convert local "loop_vinfo" from
7307         loop_vec_info to opt_loop_vec_info.  If if fails, and dumping is
7308         enabled, use it to report at the top level "couldn't vectorize
7309         loop" followed by the problem.
7310         * tree-vectorizer.h (opt_loop_vec_info): New typedef.
7311         (vect_mark_stmts_to_be_vectorized): Convert return type from bool
7312         to opt_result.
7313         (vect_analyze_stmt): Likewise.
7314         (vect_get_vector_types_for_stmt): Likewise.
7315         (tree vect_get_mask_type_for_stmt): Likewise.
7316         (vect_analyze_data_ref_dependences): Likewise.
7317         (vect_enhance_data_refs_alignment): Likewise.
7318         (vect_analyze_data_refs_alignment): Likewise.
7319         (vect_verify_datarefs_alignment): Likewise.
7320         (vect_analyze_data_ref_accesses): Likewise.
7321         (vect_prune_runtime_alias_test_list): Likewise.
7322         (vect_find_stmt_data_reference): Likewise.
7323         (vect_analyze_data_refs): Likewise.
7324         (vect_analyze_loop): Convert return type from loop_vec_info to
7325         opt_loop_vec_info.
7326         (vect_analyze_loop_form): Likewise.
7327         (vect_analyze_slp): Convert return type from bool to opt_result.
7329 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
7331         * doc/invoke.texi (-fopt-info): Document new "internals"
7332         sub-option.
7333         * dump-context.h (dump_context::apply_dump_filter_p): New decl.
7334         * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
7335         MSG_ALL_KINDS.
7336         (optinfo_verbosity_options): Add "internals".
7337         (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
7338         (dump_context::apply_dump_filter_p): New member function.
7339         (dump_context::dump_loc): Use apply_dump_filter_p rather than
7340         explicitly masking the dump_kind.
7341         (dump_context::begin_scope): Increment the scope depth first.  Use
7342         apply_dump_filter_p rather than explicitly masking the dump_kind.
7343         (dump_context::emit_item): Use apply_dump_filter_p rather than
7344         explicitly masking the dump_kind.
7345         (dump_dec): Likewise.
7346         (dump_hex): Likewise.
7347         (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
7348         (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
7349         (opt_info_switch_p): Update handling of default
7350         MSG_OPTIMIZED_LOCATIONS to cope with default of
7351         MSG_PRIORITY_USER_FACING.
7352         (dump_basic_block): Use apply_dump_filter_p rather than explicitly
7353         masking the dump_kind.
7354         (selftest::test_capture_of_dump_calls): Update test_dump_context
7355         instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
7356         than MSG_ALL.  Generalize scope test to be run at all four
7357         combinations of with/without MSG_PRIORITY_USER_FACING and
7358         MSG_PRIORITY_INTERNALS, adding examples of explicit priority
7359         for each of the two values.
7360         * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
7361         Rename MSG_ALL to MSG_ALL_KINDS.  Add MSG_PRIORITY_USER_FACING,
7362         MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
7363         values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
7364         (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
7365         with MSG_PRIORITY_*.
7366         * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
7367         dump messages as MSG_PRIORITY_USER_FACING.
7368         * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
7369         about the interaction with MSG_PRIORITY_*.
7371 2018-10-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7373         * varasm.c (output_constant): Add new parameter merge_strings.
7374         Make strings properly zero terminated in merge string sections.
7375         (mergeable_string_section): Don't fail if the last char is non-zero.
7376         (assemble_variable_contents): Handle merge string sections.
7377         (assemble_variable): Likewise.
7378         (assemble_constant_contents): Likewise.
7379         (output_constant_def_contents): Likewise.
7380         (output_constructor_array_range,
7381         output_constructor_regular_field): Adjust call to output_constant.
7382         (output_object_block): Adjust call to assemble_constant_contents
7383         and assemble_variable_contents.
7385 2018-10-04  Martin Liska  <mliska@suse.cz>
7387         PR c/87483
7388         * cgraphunit.c (process_function_and_variable_attributes):
7389         Warn about a function with alias attribute and a body.
7391 2018-10-04  Martin Liska  <mliska@suse.cz>
7393         PR ipa/82625
7394         * multiple_target.c (redirect_to_specific_clone): New function.
7395         (ipa_target_clone): Use it.
7396         * tree-inline.c: Fix comment.
7398 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
7400         * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
7401         fields.
7402         (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
7403         (gcc::dump_manager::register_pass): New member function, adapted
7404         from loop body in gcc::pass_manager::register_pass, adding a
7405         call to update_dfi_for_opt_info.
7406         (gcc::dump_manager::opt_info_enable_passes): Store the
7407         -fopt-info options into the new fields.  Move the loop
7408         bodies into...
7409         (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
7410         function.
7411         * dumpfile.h (struct opt_pass): New forward decl.
7412         (gcc::dump_manager::register_pass): New decl.
7413         (gcc::dump_manager::update_dfi_for_opt_info): New decl.
7414         (class gcc::dump_manager): Add fields "m_optgroup_flags",
7415         "m_optinfo_flags", and "m_optinfo_filename".
7416         * passes.c (gcc::pass_manager::register_pass): Move all of the
7417         dump-handling code to gcc::dump_manager::register_pass.
7419 2018-10-04  Peter Bergner  <bergner@linux.ibm.com>
7421         PR rtl-optimization/87466
7422         * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
7423         * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
7424         * doc/tm.texi: Regenerate.
7425         * ira-lives.c (process_bb_node_lives): Use the new target hook.
7426         * lra-lives.c (process_bb_lives): Likewise.
7427         * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
7428         Define.
7430 2018-10-04  Tamar Christina  <tamar.christina@arm.com>
7432         * params.c (add_params): Fix initialization.
7434 2018-10-04  Martin Liska  <mliska@suse.cz>
7436         PR gcov-profile/84107
7437         * tree-profile.c (init_ic_make_global_vars):
7438         Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
7439         Come up with new ic_tuple* variables.  Emit
7440         __gcov_indirect_call{,_topn} variables.
7441         (gimple_gen_ic_profiler): Access the variable
7442         and emit gimple.
7443         (gimple_gen_ic_func_profiler): Access
7444         __gcov_indirect_call.callee field.
7445         (gimple_init_gcov_profiler): Use ptr_type_node.
7446         * value-prof.c (gimple_ic): Use ptr_type_node.
7448 2018-10-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
7450         PR tree-optimization/85787
7451         * ipa-pure-const.c (malloc_candidate_p_1): Move most of
7452         malloc_candidate_p into this function and add support for
7453         detecting multiple phis.
7454         (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
7456 2018-10-04  Martin Liska  <mliska@suse.cz>
7458         PR ipa/87491
7459         * ipa-inline.c (inline_to_all_callers_1):
7460         Call ultimate_alias_target for node being inlined.
7462 2018-10-03  Jeff Law  <law@redhat.com>
7464         * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
7465         target's wchar_t.
7466         * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
7467         * tree.h (get_typenode_from_name): Prototype.
7469 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
7471         * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
7472         Change operand 2 predicate to nonimmediate_operand.
7473         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
7475 2018-10-03  Martin Sebor  <msebor@redhat.com>
7476             Jeff Law  <law@redhat.com>
7478         * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
7479         initialize it.
7480         (get_string_length): Detect unterminated arrays.
7481         (format_string): Same.
7482         (format_directive): Warn about unterminated arrays.
7483         (handle_gimple_call): Mark statements with no_warning as needed.
7485 2018-10-03  Jim Wilson  <jimw@sifive.com>
7487         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
7488         also define __riscv_abi_rve.  Delete trailing white space.
7490 2018-10-03  Paul Koning  <ni1d@arrl.net>
7492         Enable LRA register allocator for PDP11.
7493         * config/pdp11/constraints.md (Q): Use define_memory_constraint.
7494         (R): Likewise.
7495         (D): Likewise.
7496         * config/pdp11/pdp11.c (pdp11_lra_p): New function.
7497         * config/pdp11/pdp11.opt (-mlra): New option.
7498         * doc/invoke.texi (PDP-11 Options): Document -mlra.
7500 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
7502         * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
7503         (*<absneg:code>extend<mode>xf2): Ditto.
7505 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
7507         PR tree-optimization/87415
7508         * tree-vrp.c (set_value_range_with_overflow): Special case one bit
7509         precision fields.
7511 2018-10-02  Jeff Law  <law@redhat.com>
7513         * gimple-fold.c (get_range_strlen): Only set *nonstr when
7514         an unterminated string is discovered.  Bubble up range
7515         even for unterminated strings.
7516         (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
7517         indicates the string was not terminated via NONSTR.
7519 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
7521         * tree-vrp.c (extract_range_from_unary_expr): Special case all
7522         pointer conversions.
7523         Do not do anything special for anti-ranges.
7525 2018-10-03  Jérôme Lambourg  <lambourg@adacore.com>
7527         * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
7528         DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
7530 2018-10-03  Martin Liska  <mliska@suse.cz>
7532         PR gcov-profile/86109
7533         * coverage.c (coverage_begin_function): Do not
7534         mark lambdas as artificial.
7535         * tree-core.h (struct GTY): Remove tm_clone_flag
7536         and introduce new lambda_function.
7537         * tree.h (DECL_LAMBDA_FUNCTION): New macro.
7539 2018-10-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
7541         PR target/87474
7542         * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
7543         P8_VECTOR and VSX are enabled.
7545 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
7547         * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
7548         0x3907 as CPU model number.
7550 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
7552         * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
7553         * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
7554         PF_Z14.  Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
7555         TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
7556         TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
7557         * config/s390/s390.md: Likewise. Rename also the cpu attribute
7558         value from arch12 to z14.
7560 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
7562         * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
7563         (isinfxf2): Ditto.
7564         (isinf<mode>2): Ditto.
7566 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
7568         * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
7569         before emitting fxam.  Perform calculations in XFmode.
7571 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
7573         * match.pd (((X /[ex] A) +- B) * A): New transformation.
7575 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
7577         PR middle-end/87319
7578         * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
7579         * tree.c (signed_or_unsigned_type_for): Handle complex.
7581 2018-10-02  Jeff Law  <law@redhat.com>
7583         * gimple-fold.c (get_range_strlen): Remove dead code.
7585 2018-10-02  Martin Sebor  <msebor@redhat.com>
7586             Jeff Law  <law@redhat.com>
7588         * builtins.c (unterminated_array): Add new arguments.
7589         If argument is not terminated, bubble up size and exact
7590         state to callers.
7591         (expand_builtin_strnlen): Detect, avoid expanding
7592         and diagnose unterminated arrays.
7593         (c_strlen): Fill in offset of start of unterminated strings.
7594         * builtins.h (unterminated_array): Update prototype.
7596 2018-10-02  Richard Biener  <rguenther@suse.de>
7598         * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
7599         of haddv4df, first reduce to SSE width and exploit the fact
7600         that we only need element zero with the reduction result.
7601         (reduc_plus_scal_v2df): Likewise.
7603 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
7605         * dojump.h (do_jump): Delete.
7606         (do_jump_1): Likewise.
7607         (split_comparison): Move around.
7608         * dojump.c (do_jump): Make static.
7609         (do_jump_1): Likewise.
7610         (jumpifnot): Move around.
7611         (jumpifnot_1): Likewise.
7612         (jumpif): Likewise.
7613         (jumpif_1): Likewise.
7614         * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
7616 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
7618         * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
7619         insns in the delay slot and add_insn_after for the jump insn.
7621 2018-10-02  Richard Biener  <rguenther@suse.de>
7623         * tree-inline.c (expand_call_inline): Use the location of
7624         the callee declaration for the inline-entry marker.
7625         * final.c (notice_source_line): Remove special-casing of
7626         NOTE_INSN_INLINE_ENTRY.
7628 2018-10-01  Carl Love  <cel@us.ibm.com>
7630         PR 69431
7631         * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
7632         (__builtin_mtfsb0): New.
7633         (__builtin_mtfsb1): New.
7634         ( __builtin_set_fpscr_rn): New.
7635         (__builtin_set_fpscr_drn): New.
7636         * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
7637         (rs6000_expand_set_fpscr_rn_builtin): Add.
7638         (rs6000_expand_set_fpscr_drn_builtin): Add.
7639         (rs6000_expand_builtin): Add case statement entries for
7640         RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
7641         RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
7642         RS6000_BUILTIN_MFFSL.
7643         (rs6000_init_builtins): Add ftype initialization and def_builtin
7644         calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
7645         __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
7646         * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
7647         rs6000_mffscdrn): Add define_insn.
7648         (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
7649         * doc/extend.texi: Add documentation for the builtins.
7651 2018-10-01  Richard Biener  <rguenther@suse.de>
7653         PR tree-optimization/87465
7654         * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
7655         causing branch miscounts.
7657 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
7659         * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
7660         aarch64_option_default_param):  New.
7661         (params.h): Include.
7662         (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
7663         * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
7664         stack-clash protection validation code.
7666 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
7668         * params.c (validate_param): New.
7669         (add_params): Use it.
7670         (set_param_value): Refactor param validation into validate_param.
7671         (diagnostic.h): Include.
7672         * diagnostic.h (diagnostic_ready_p): New.
7674 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
7676         * params.c (set_param_value):
7677         Add index of parameter being validated.
7678         * common/common-target.def (option_validate_param): New.
7679         * common/common-targhooks.h (default_option_validate_param): New.
7680         * common/common-targhooks.c (default_option_validate_param): New.
7681         * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
7682         * doc/tm.texi: Regenerate.
7684 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
7686         PR target/86486
7687         * config/aarch64/aarch64.c (aarch64_override_options_internal):
7688         Add validation for stack-clash parameters and set defaults.
7690 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
7692         PR target/86486
7693         * configure.ac: Add stack-clash-protection-guard-size.
7694         * doc/install.texi: Document it.
7695         * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
7696         * params.def: Update comment for guard-size.
7697         (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
7698         PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
7699         * configure: Regenerate.
7701 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
7703         PR target/86486
7704         * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
7705         STACK_DYNAMIC_OFFSET): New.
7706         * config/aarch64/aarch64.c (aarch64_layout_frame):
7707         Update outgoing args size.
7708         (aarch64_stack_clash_protection_alloca_probe_range,
7709         TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
7711 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
7713         PR target/86486
7714         * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
7715         probe ranges.
7716         * target.def (stack_clash_protection_alloca_probe_range): New.
7717         (stack_clash_protection_final_dynamic_probe): Remove.
7718         * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
7719         (default_stack_clash_protection_final_dynamic_probe): Remove.
7720         * targhooks.c: Likewise.
7721         * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
7722         (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
7723         * doc/tm.texi: Regenerate.
7725 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
7727         PR target/86486
7728         * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
7729         * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
7730         aarch64_clamp_to_uimm12_shift): New.
7731         (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
7732         * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
7734 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
7736         PR target/86486
7737         * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
7739 2018-10-01  Jeff Law  <law@redhat.com>
7740             Richard Sandiford <richard.sandiford@linaro.org>
7741             Tamar Christina  <tamar.christina@arm.com>
7743         PR target/86486
7744         * config/aarch64/aarch64.md
7745         (probe_stack_range): Add k (SP) constraint.
7746         * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
7747         STACK_CLASH_MAX_UNROLL_PAGES): New.
7748         * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
7749         stack probes for stack clash.
7750         (aarch64_allocate_and_probe_stack_space): New.
7751         (aarch64_expand_prologue): Use it.
7752         (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
7753         (aarch64_sub_sp): Add emit_move_imm optional param.
7755 2018-10-01  MCC CS <deswurstes@users.noreply.github.com>
7757         PR tree-optimization/87261
7758         * match.pd: Remove trailing whitespace.
7759         Add (x & y) | ~(x | y) -> ~(x ^ y),
7760         (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
7762 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
7764         * config/arc/arc.md (*add_n): Clean up pattern, update instruction
7765         constraints.
7766         (ashlsi3_insn): Update instruction constraints.
7767         (ashrsi3_insn): Likewise.
7768         (rotrsi3): Likewise.
7769         (add_shift): Likewise.
7770         * config/arc/constraints.md (Csz): New 32 bit constraint. It
7771         avoids placing in the limm field small constants which, otherwise,
7772         could end into a small instruction.
7774 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
7776         * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
7777         destination register is not odd-even.
7778         (umaddsidi4_split): Likewise.
7780 2018-10-01  Richard Biener  <rguenther@suse.de>
7782         * tree-inline.c (expand_call_inline): Store origin of fn
7783         in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
7784         * tree.c (block_ultimate_origin): Simplify and do some
7785         checking.
7787 2018-09-30  Uros Bizjak  <ubizjak@gmail.com>
7789         * config/i386/mmx.md (EMMS): New int iterator.
7790         (emms): New int attribute.
7791         (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
7792         EMMS int iterator.  Explicitly declare clobbers.
7793         (mmx_emms): Remove expander.
7794         (mmx_femms): Ditto.
7795         * config/i386/predicates.md (emms_operation): Remove predicate.
7796         (vzeroall_pattern): New predicate.
7797         (vzeroupper_pattern): Rename from vzeroupper_operation.
7798         * config/i386/i386.c (ix86_avx_u128_mode_after): Use
7799         vzeroupper_pattern and vzeroall_pattern predicates.
7801 2018-09-30  Peter Bergner  <bergner@linux.ibm.com>
7803         PR rtl-optimization/86939
7804         * ira-lives.c (make_hard_regno_born): Rename from this...
7805         (make_hard_regno_live): ... to this.  Remove update to conflict
7806         information.  Update function comment.
7807         (make_hard_regno_dead): Add conflict information update.  Update
7808         function comment.
7809         (make_object_born): Rename from this...
7810         (make_object_live): ... to this.  Remove update to conflict information.
7811         Update function comment.
7812         (make_object_dead):  Add conflict information update.  Update function
7813         comment.
7814         (mark_pseudo_regno_live): Call make_object_live.
7815         (mark_pseudo_regno_subword_live): Likewise.
7816         (mark_hard_reg_dead): Update function comment.
7817         (mark_hard_reg_live): Call make_hard_regno_live.
7818         (process_bb_node_lives): Likewise.
7819         * lra-lives.c (make_hard_regno_born): Rename from this...
7820         (make_hard_regno_live): ... to this.  Remove update to conflict
7821         information.  Remove now uneeded check_pic_pseudo_p argument.
7822         Update function comment.
7823         (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
7824         to conflict information.  Update function comment.
7825         (mark_pseudo_live): Remove update to conflict information.  Update
7826         function comment.
7827         (mark_pseudo_dead): Add conflict information update.
7828         (mark_regno_live): Call make_hard_regno_live.
7829         (mark_regno_dead): Call make_hard_regno_dead with new arguement.
7830         (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
7832 2018-09-29  H.J. Lu  <hongjiu.lu@intel.com>
7834         PR target/87370
7835         * config/i386/i386.c (construct_container): Use TImode for
7836         BLKmode values in 2 integer registers.
7838 2018-09-29  Jeff Law  <law@redhat.com>
7840         * builtins.c (unterminated_array): Pass in c_strlen_data * to
7841         c_strlen rather than just a tree *.
7842         (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
7843         Update recursive calls appropriately.  If caller did not provide a
7844         suitable data pointer, create a local one.  When a non-terminated
7845         string is discovered, bubble up information about the string via the
7846         c_strlen_data object.
7847         * builtins.h (c_strlen): Update prototype.
7848         (c_strlen_data): New structure.
7849         * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
7850         For a type 2 call, if c_strlen indicates a non-terminated string
7851         use the length of the non-terminated string.
7852         (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
7854 2018-09-29  Jakub Jelinek  <jakub@redhat.com>
7856         PR target/87467
7857         * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
7858         __m512d type for __A argument rather than __m512.
7860 2018-09-28  John David Anglin  <danglin@gcc.gnu.org>
7862         * match.pd (simple_comparison): Don't optimize if either operand is
7863         a function pointer when target needs function pointer canonicalization.
7865 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
7867         * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
7868         power5 .. power9 to remove indirection.
7869         * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
7870         ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
7871         ASM_CPU_476_SPEC): Delete.
7872         (ASM_CPU_SPEC): Adjust.
7873         (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
7874         asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
7876 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
7878         * config.in: Delete HAVE_AS_DCI.
7879         * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
7880         * config/rs6000/rs6000.h: Ditto.
7881         * configure.ac: Delete HAVE_AS_DCI.
7882         * configure: Regenerate.
7884 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
7886         * config.in (HAVE_AS_LWSYNC): Delete.
7887         * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
7888         * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
7889         do it as a .long .
7890         * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
7891         * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
7892         as a .long .
7893         * configure.ac: Delete HAVE_AS_LWSYNC.
7894         * configure: Regenerate.
7896 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
7897             Pierre-Marie de Rodat  <derodat@adacore.com>
7899         * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
7900         * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
7901         (cgraph_node::create_thunk): Add indirect_offset parameter.
7902         (thunk_adjust): Likewise.
7903         * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
7904         and initialize the corresponding field with it.
7905         (cgraph_node::dump): Dump indirect_offset field.
7906         * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
7907         * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
7908         (thunk_adjust): Add indirect_offset parameter and deal with it.
7909         (cgraph_node::expand_thunk): Deal with the indirect_offset field and
7910         pass it to thunk_adjust.  Do not call the target hook if it's non-zero
7911         or if the thunk is external or local.  Fix formatting.  Do not chain
7912         the RESULT_DECL to BLOCK_VARS.  Pass the static chain to the target,
7913         if any, in the GIMPLE representation.
7914         * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
7915         * lto-cgraph.c (lto_output_node): Write indirect_offset field.
7916         (input_node): Read indirect_offset field.
7917         * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
7918         call to thunk_adjust.
7919         * tree-nested.c (struct nesting_info): Add thunk_p field.
7920         (create_nesting_tree): Set it.
7921         (convert_all_function_calls): Copy static chain from targets to thunks.
7922         (finalize_nesting_tree_1): Return early for thunks.
7923         (unnest_nesting_tree_1): Do not finalize thunks.
7924         (gimplify_all_functions): Do not gimplify thunks.
7926 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
7928         * opt-suggestions.c (option_proposer::build_option_suggestions):
7929         Release "option_values".
7931 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
7933         * coverage.c (get_coverage_counts): Convert problem-reporting dump
7934         messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
7935         * dumpfile.c (kind_as_string): New function.
7936         (dump_loc): Rather than a hardcoded prefix of "note: ", use
7937         kind_as_string to vary the prefix based on dump_kind.
7938         (selftest::test_capture_of_dump_calls): Update for above.
7940 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
7942         * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
7943         (GET_SSE_REGNO): Rename from SSE_REGNO.  Update all uses for rename.
7945 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
7947         * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
7948         * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
7949         INVALID_REGNUM instead of FPSR_REG.
7950         (ix86_md_asm_adjust): Do not clobber FPSR_REG.
7951         * config/i386/i386.md: Update comment of FP compares.
7952         (fldenv): Do not clobber FPSR_REG.
7954 2018-09-28  Richard Biener  <rguenther@suse.de>
7956         * tree.h (BLOCK_ORIGIN): New.
7957         * omp-expand.c (grid_expand_target_grid_body): Assign
7958         BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
7959         * tree-inline.c (remap_block): Likewise.
7960         * auto-profile.c (get_function_decl_from_block): Simplify
7961         by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
7962         * langhooks.c (lhd_print_error_function): Likewise.
7963         * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
7964         Likewise.
7965         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
7966         * tree.c (block_nonartificial_location): Likewise.
7967         (block_ultimate_origin): Likewise.
7968         * tree-pretty-print.c (percent_K_format): Likewise.  Remove
7969         no longer needed LTO case.
7971 2018-09-28  Andrew Stubbs  <ams@codesourcery.com>
7972             Jan Hubicka  <jh@suse.cz>
7973             Martin Jambor  <mjambor@suse.cz>
7975         * simplify-rtx.c (simplify_merge_mask): New function.
7976         (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
7977         same masks are used in op1 or op2.
7978         (test_vec_merge): New function.
7979         (test_vector_ops): Call test_vec_merge.
7981 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
7983         * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
7984         * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
7985         * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
7986         (cypress_costs): Set it.
7987         (supersparc_costs): Likewise.
7988         (hypersparc_costs): Likewise.
7989         (leon_cost): Likewise.
7990         (leon3_costs): Likewise.
7991         (sparclet_costs): Likewise.
7992         (ultrasparc_costs): Likewise.
7993         (ultrasparc_costs): Likewise.
7994         (niagara_costs): Likewise.
7995         (niagara2_costs): Likewise.
7996         (niagara3_costs): Likewise.
7997         (niagara4_costs): Likewise.
7998         (niagara7_costs): Likewise.
7999         (m8_costs): Likewise.
8000         (TARGET_CAN_FOLLOW_JUMP): Define.
8001         (pass_work_around_errata::gate): Minor tweak.
8002         (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
8003         Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
8004         Automaitcally clear MASK_FSMULD mask for V7 processors.
8005         (sparc_can_follow_jump): New static function.
8006         (output_ubranch): Deal with CROSSING_JUMP_P.
8007         (sparc_use_sched_lookahead): Rewrite using switch statement.
8008         (sparc_issue_rate): Reorder.
8009         (sparc_branch_cost): New function.
8011 2018-09-27  Martin Sebor  <msebor@redhat.com>
8013         * tree.h (tree_to_shwi): Add attribute nonnull and pure.
8014         (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
8015         (int_fits_type_p): Same.
8017 2018-09-27  Uros Bizjak  <ubizjak@gmail.com>
8019         * config/i386/i386.md (FPCR_REG): Remove.
8020         (UNSPEC_FLDCW): Remove.
8021         (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
8022         (x86_fldcw_1): Remove insn pattern.
8023         (fnstenv): Do not clobber FPCR_REG.
8024         (fldenv): Ditto.
8025         * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
8026         (CALL_USED_REGISTERS): Ditto.
8027         (REG_ALLOC_ORDER): Ditto.
8028         (REG_CLASS_CONTENTS): Ditto.
8029         (HI_REGISTER_NAMES): Ditto.
8030         (ADDITIONAL_REGISTER_NAMES): Use defines instead
8031         of numerical constants.
8032         * config/i386/i386.c (regclass_map): Remove fpsr register.
8033         (dbx_register_map): Ditto.
8034         (dbx64_register_map): Ditto.
8035         (svr4_dbx_register_map): Ditto.
8036         (print_reg): Do not handle FPCR_REG.
8038 2018-09-27  Segher Boessenkool  <segher@kernel.crashing.org>
8040         PR target/87149
8041         * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
8042         HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
8043         Delete, always treat as true.
8044         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
8045         Ditto.  Simplify remaining code.
8046         * config/powerpcspe/powerpcspe.h: Ditto.
8047         * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
8048         Simplify remaining code.
8049         (rs6000_expand_builtin): Ditto.
8050         * config/rs6000/rs6000.h: Ditto.
8051         * configure.ac: Ditto.
8052         * configure: Regenerate.
8054 2018-09-27  Martin Liska  <mliska@suse.cz>
8056         * coverage.c (get_coverage_counts): Revert the formatting
8057         of missing profile opt info.
8059 2018-09-27  Richard Biener  <rguenther@suse.de>
8061         PR debug/37801
8062         PR debug/87440
8063         * dwarf2out.c (set_block_origin_self): Do not mark outermost
8064         block as we do not output that.
8065         (gen_inlined_subroutine_die): Elide the originally outermost
8066         block, matching what we do for concrete instances.
8067         (decls_for_scope): Add parameter specifying whether to recurse
8068         to subblocks.
8070 2018-09-27  Andrew Stubbs  <ams@codesourcery.com>
8071             Tom de Vries  <tom@codesourcery.com>
8073         PR 82089
8075         * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
8076         STORE_FLAG_VALUE == 1.
8078 2018-09-27  Andreas Krebbel  <krebbel@linux.ibm.com>
8080         * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
8081         constant definitions.
8082         ("tx_assist"): Replace magic number with PPA_TX_ABORT.
8083         ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
8084         ("speculation_barrier"): New expander definition.
8086 2018-09-26  Indu Bhagat  <indu.bhagat@oracle.com>
8088         PR gcov-profile/86957
8089         * common.opt: New warning option -Wmissing-profile.
8090         * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
8091         * doc/invoke.texi: Document -Wmissing-profile.
8093 2018-09-26  Jim Wilson  <jimw@sifive.com>
8095         * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
8096         (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
8098 2018-09-26  Martin Sebor  <msebor@redhat.com>
8100         * tree.c (zerop): Change return type to bool.
8101         (integer_zerop, integer_onep, integer_each_onep): Same.
8102         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
8103         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
8104         (real_onep, real_minus_onep, chain_index): Same.
8105         (print_type_hash_statistics, type_list_equal): Same.
8106         * tree.h (zerop): Same.
8107         (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
8108         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
8109         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
8110         (real_onep, real_minus_onep, chain_index): Same.
8111         (print_type_hash_statistics, type_list_equal): Same.
8113 2018-09-26  Jim Wilson  <jimw@sifive.com>
8115         * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
8117 2018-09-26  Jakub Jelinek  <jakub@redhat.com>
8119         PR target/87414
8120         * config/i386/i386.c: Include debug.h and dwarf2out.h.
8121         (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
8122         call.
8124 2018-09-25  Andrew Stubbs  <ams@codesourcery.com>
8126         * builtins.c (get_builtin_sync_mem): Force address mode conversion.
8128 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
8130         * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
8131         and FP_SECOND_SSE_REGS.
8132         (REG_CLASS_NAMES): Ditto.
8133         (REG_CLASS_CONTENTS): Ditto.
8134         * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
8135         FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
8136         (ix86_preferred_output_reload_class): Ditto.
8137         * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
8138         clobber constraint to "=&f".
8139         (fix_truncdi_i387): Ditto.
8140         (lrintxfdi2): Ditto.
8141         (fistdi2_<rounding>): Ditto.
8142         (fpremxf4_i387): Change "=u" constraint to "=f".
8143         (fprem1xf4_i387): Ditto.
8144         (sincosxf3): Ditto.
8145         (fptanxf4_i387): Ditto.
8146         (fxtractxf3_i387): Ditto.
8147         (fscalexf4_i387): Ditto.
8148         (atan2xf3): Change "u" constraint to "f".
8149         (fyl2xxf3_i387): Ditto.
8150         (fyl2xp1xf3_i387): Ditto.
8152 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
8154         PR target/87439
8155         * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
8156         for removed I387_MASK_PM entity.
8159 2018-09-26  Jeff Law  <law@redhat.com>
8160         Revert
8161         2018-09-26  Alexey Neyman  <stilor@att.net>
8163         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
8164         headers are no longer pulled in by <isl/val.h>.
8166 2018-09-26  Richard Biener  <rguenther@suse.de>
8168         PR debug/87443
8169         * dwarf2out.c (gen_lexical_block_die): Do not equate inline
8170         or concrete instance DIE to the tree.  Create abstract origin
8171         attributes also for concrete instances.
8173 2018-09-26  Alexey Neyman  <stilor@att.net>
8175         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
8176         headers are no longer pulled in by <isl/val.h>.
8178 2018-09-26  Matthew Malcomson  <matthew.malcomson@arm.com>
8180         * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
8181         Use new helper functions.
8182         * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
8183         Use new helper functions.
8184         * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
8185         aarch_mm_needs_release): New declarations.
8186         * config/arm/aarch-common.c (aarch_mm_needs_acquire,
8187         aarch_mm_needs_release): New.
8189 2018-09-26  Eric Botcazou  <ebotcazou@adacore.com>
8191         * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
8192         (arm32_output_mi_thunk): Deal with long calls.
8194 2018-09-26  Richard Biener  <rguenther@suse.de>
8196         PR debug/87428
8197         PR debug/87362
8198         * tree-inline.c (expand_call_inline): When the location
8199         of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
8200         or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
8201         the inserted BLOCK to make inlined_function_outer_scope_p
8202         recognize it.
8203         * dwarf2out.c (add_call_src_coords_attributes): Do not add
8204         coords for reserved locations.
8206 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
8208         * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
8209         (*call_indirect_nonlocal_sysv<mode>): Ditto.
8210         (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
8211         (*sibcall_nonlocal_sysv<mode>): Ditto.
8212         (*sibcall_value_nonlocal_sysv<mode>): Ditto.
8213         (<bd>_<mode>): Ditto.
8214         (<bd>tf_<mode>): Ditto.
8216 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
8218         * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
8219         control string as a list of templates instead of as C code.
8220         (*altivec_movti): Ditto.
8221         * config/rs6000/darwin.md (movdf_low_di): Ditto.
8223 2018-09-25  Jim Wilson  <jimw@sifive.com>
8225         * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
8226         when target symbol is weak.
8228 2018-09-25  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8230         PR c/87387
8231         * builtins.c (unterminated_array): Simplify.
8232         * expr.c (string_constant): Handle SSA_NAME.  Add more exceptions
8233         where pointer arithmetic is safe.
8235 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
8237         PR target/86987
8238         * config/rs6000/altivec.md (altivec_vspltb): Use
8239         const_0_to_15_operand instead of u5bit_cint_operand.
8240         (*altivec_vspltb_internal): Ditto.
8241         (altivec_vspltb_direct): Ditto.
8242         (altivec_vsplth): Use const_0_to_7_operand instead of
8243         u5bit_cint_operand.
8244         (*altivec_vsplth_internal): Ditto.
8245         (altivec_vsplth_direct): Ditto.
8246         (altivec_vspltw): Use const_0_to_3_operand instead of
8247         u5bit_cint_operand.
8248         (*altivec_vspltw_internal): Ditto.
8249         (altivec_vspltw_direct): Ditto.
8250         (altivec_vspltsf): Ditto.
8251         (*altivec_vspltsf_internal): Ditto.
8252         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
8253         various splats with the proper size immediate.  Reorder the various
8254         cases by ascending size of immediate, and put all such together.
8256 2018-09-25  Richard Biener  <rguenther@suse.de>
8258         PR debug/83941
8259         * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
8260         GC-ification.
8261         (maybe_create_die_with_external_ref): Do not create
8262         DW_TAG_imported_unit here.
8263         (add_abstract_origin_attribute): Handle external BLOCK refs.
8264         (dwarf2out_abstract_function): Simplify LTO case.
8265         (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
8266         rather than using maybe_create_die_with_external_ref.
8268 2018-09-25  Uros Bizjak  <ubizjak@gmail.com>
8270         PR target/71278
8271         * config/i386/i386.md (frndintxf2_mask_pm): Remove.
8272         (frndintxf2_mask_pm_i387): Ditto.
8273         (nearbyintxf2): Rewrite expander pattern to match rintxf2.
8274         Enable for !flag_trapping_math.
8275         (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
8276         Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
8277         Change operand 1 predicate to nonimmediate_operand.
8278         (attr "i387_cw"): Remove mask_pm.
8279         * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
8280         (enum ix86_entity): Remove I387_MASK_PM.
8281         * config/i386/i386.c (ix86_i387_mode_needed): Do not
8282         handle I387_MASK_PM.
8283         (ix86_mode_needed): Ditto.
8284         (ix86_mode_after): Ditto.
8285         (ix86_mode_entry): Ditto.
8286         (ix86_mode_exit): Ditto.
8287         (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
8289 2018-09-25  Jakub Jelinek  <jakub@redhat.com>
8291         * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
8292         to_update_switch_stmts to vNULL instead of calling create on them
8293         immediately.
8295 2018-09-25  Richard Biener  <rguenther@suse.de>
8297         PR tree-optimization/87402
8298         * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
8299         (visit_phi): Re-instantiate handling of supposed to be VARYING
8300         but non-VARYING backedge value.
8302 2018-09-25  Richard Biener  <rguenther@suse.de>
8304         PR debug/83941
8305         * dwarf2out.c (struct sym_off_pair): New.
8306         (external_die_map): New global.
8307         (lookup_decl_die): When in LTO create DIEs lazily from the
8308         external_die_map.
8309         (lookup_block_die): New function, create DIEs lazily in LTO.
8310         (equate_block_to_die): New function.
8311         (dwarf2out_die_ref_for_decl): During WPA get the association
8312         from the external DIE map.
8313         (dwarf2out_register_external_die): Record mapping into the
8314         external DIE map.
8315         (maybe_create_die_with_external_ref): New function split out from
8316         DIE generation part of old dwarf2out_register_external_die.
8317         (add_abstract_origin_attribute): Do not return the DIE.  When
8318         in LTO reference externals directly.
8319         (dwarf2out_abstract_function): When in LTO ignore calls for
8320         decls with external DIEs (already present abstract instances).
8321         (gen_call_site_die): Adjust.
8322         (add_high_low_attributes): Likewise.
8323         (gen_lexical_block_die): Likewise.
8324         (gen_inlined_subroutine_die): Likewie.
8325         (gen_block_die): Likewise.
8326         (dwarf2out_inline_entry): Likewise.
8327         (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
8328         DIEs.
8330 2018-09-25  Martin Liska  <mliska@suse.cz>
8332         * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
8333         integers and not by a float value.
8335 2018-09-25  Martin Liska  <mliska@suse.cz>
8337         PR fortran/87394
8338         * dbgcnt.c (dbg_cnt_process_single_pair): Return false
8339         instead of NULL.
8340         * dumpfile.c (dump_enable_all): Remove extra parenthesis.
8341         * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
8342         * godump.c (go_format_type): Remove extra parenthesis.
8344 2018-09-25  Martin Liska  <mliska@suse.cz>
8346         * alias.c (set_dest_equal_p): Remove unused function.
8347         * config/i386/i386.c (def_builtin_pure2): Likewise.
8348         * diagnostic-show-locus.c (class layout): Remove
8349         unused field.
8350         (layout::layout): Likewise here.
8351         * dump-context.h (class temp_dump_context): Likewise.
8352         * dwarf2out.c (add_AT_fde_ref): Remove unused function.
8353         (add_AT_loclistsptr): Likewise.
8354         (add_AT_offset): Likewise.
8355         (get_AT_hi_pc): Likewise.
8356         (is_comdat_die): Likewise.
8357         (type_is_enum): Likewise.
8358         (ceiling): Likewise.
8359         (add_AT_vms_delta): Likewise.
8360         (is_class_die): Likewise.
8361         * edit-context.c (class line_event): Remove unused field.
8362         * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
8363         unused function.
8364         * ipa-cp.c (ipa_get_vr_lat): Likewise.
8365         * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
8366         (ok_for_base_p_nonstrict): Likewise.
8367         * tree-chrec.c (is_not_constant_evolution): Likewise.
8368         (chrec_fold_poly_cst): Likewise.
8369         * tree-if-conv.c (has_pred_critical_p): Likewise.
8370         * tree-ssa-coalesce.c (print_exprs): Likewise.
8371         * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
8372         * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
8373         * tree-vrp.c (value_ranges_intersect_p): Likewise.
8374         (value_range_nonnegative_p): Likewise.
8376 2018-09-25  Martin Liska  <mliska@suse.cz>
8378         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
8379         Do not handle "GNU Pascal".
8380         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
8381         Likewise.
8382         * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
8383         from documentation. Likewise.
8384         * dbxout.c (dbxout_range_type): Likewise.
8385         * doc/cpp.texi: Likewise.
8386         * doc/extend.texi: Likewise.
8387         * doc/frontends.texi: Likewise.
8388         * doc/invoke.texi: Remove Pascal entry.
8389         * tree.def (CLEANUP_POINT_EXPR): Likewise.
8390         * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
8392 2018-09-25  Martin Liska  <mliska@suse.cz>
8394         PR middle-end/86078
8395         * doc/invoke.texi: Document all parameters and remove default
8396         of the parameters.
8398 2018-09-25  Ilya Leoshkevich  <iii@linux.ibm.com>
8400         PR bootstrap/87417
8401         * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
8402         contains HOST_WIDE_INTs when computing its size.
8404 2018-09-24  Jim Wilson  <jimw@sifive.com>
8406         PR target/87391
8407         * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
8408         not TARGET_RVE.
8409         (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
8411 2018-09-24  Andrew Pinski  <apinski@marvell.com>
8413         *  config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
8414         access prev before checking it for NULLness in the
8415         AARCH64_FUSE_CMP_BRANCH case.
8417 2018-09-24  H.J. Lu  <hongjiu.lu@intel.com>
8419         PR target/82699
8420         * config/i386/i386.c (rest_of_insert_endbranch): Set
8421         endbr_queued_at_entrance to true and don't insert ENDBR if
8422         x86_function_profiler will be called.
8423         (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
8424         is true.
8425         * config/i386/i386.h (machine_function): Add
8426         endbr_queued_at_entrance.
8428 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
8430         * genattrtab.c (mk_attr_alt): Use alternative_mask.
8431         (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
8432         types.
8433         (check_attr_test): Use alternative_mask.
8434         (get_attr_value): Likewise.
8435         (compute_alternative_mask): Use alternative_mask and XWINT.
8436         (make_alternative_compare): Use alternative_mask.
8437         (attr_alt_subset_p): Use XWINT.
8438         (attr_alt_subset_of_compl_p): Likewise.
8439         (attr_alt_intersection): Use alternative_mask and XWINT.
8440         (attr_alt_union): Likewise.
8441         (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
8442         (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
8443         (simplify_test_exp): Use alternative_mask and XWINT.
8444         (write_test_expr): Use alternative_mask and XWINT, adjust bit
8445         number calculation to support 64 bits.  Generate code that
8446         checks 64-bit masks.
8447         (main): Use alternative_mask.
8448         * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
8450 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
8452         PR target/80080
8453         * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
8454         RETURN+USE when returning via %r14.
8456 2018-09-24  Martin Liska  <mliska@suse.cz>
8458         * gcov.c (output_lines): Print colorization legend
8459         for both flag_use_colors and flag_use_hotness_colors.
8460         Reword the help.
8462 2018-09-24  Martin Liska  <mliska@suse.cz>
8464         * coverage.c (get_coverage_counts): Use warning_at
8465         with current_function_decl location. Use %qD in warning
8466         message.
8468 2018-09-24  Martin Liska  <mliska@suse.cz>
8470         * memory-block.h (memory_block_pool::release): Annotate with
8471         valgrind that the memory is not accessible.
8473 2018-09-24  Martin Liska  <mliska@suse.cz>
8475         PR sanitizer/85774
8476         * asan.c: Make asan_handled_variables extern.
8477         * asan.h: Likewise.
8478         * cfgexpand.c (expand_stack_vars): Make sure
8479         a representative is unpoison if another
8480         variable in the partition is handled by
8481         use-after-scope sanitization.
8483 2018-09-24  Richard Biener  <rguenther@suse.de>
8485         PR tree-optimization/63155
8486         * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
8487         the worklist when the edge of the respective argument isn't
8488         executable.
8490 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
8492         * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
8493         ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
8494         (MASK_CLASS_P): Update for rename.
8495         (MAYBE_MASK_CLASS_P): Ditto.
8496         (REG_CLASS_NAMES): Update.
8497         (REG_CLASS_CONTENT): Update.
8498         * config/i386/i386.c (regclass_map): Update for MASK_REG
8499         and ALL_MASK_REGS rename.
8500         * config/i386/constraints.md (Yk): Update for rename.
8501         (k): Ditto.
8503 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
8505         * config/i386/i386.h (enum reg_class): Remove
8506         EVEX_SSE_REGS and MOD4_SSE_REGS.
8507         (REG_CLASS_NAMES): Update.
8508         (REG_CLASS_CONTENT): Update.
8509         * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
8510         registers as ALL_SSE_REGS.
8511         (ix86_additional_allocno_class_p): Remove.
8512         (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
8513         (ix86_register_priority): Lower priority of EVEX SSE registers.
8514         Use IN_RANGE macro where appropriate.
8515         (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
8516         AVX-5124VNNIW checks.
8517         (ix86_modes_tieable_p): Tie 512-bit SSE modes.
8518         * config/i386/sse.md (avx5124fmaddps_4fmaddps)
8519         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
8520         (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
8521         (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
8522         (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
8523         (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
8524         (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
8525         (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
8526         (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
8527         (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
8528         * config/i386/constraints.md (Yh): Remove.
8530 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
8532         * config/i386/i386.c (regclass_map): Declare integer REX registers
8533         as GENERAL_REGS.
8535 2018-09-23  Gerald Pfeifer  <gerald@pfeifer.com>
8537         * doc/service.texi (Service): Switch the fsf.org link to https.
8539 2018-09-22  Chung-Ju Wu  <jasonwucj@gmail.com>
8541         PR target/86798
8542         * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8543         Define to speculation_safe_value_not_needed.
8545 2018-09-21  Florian Weimer  <fweimer@redhat.com>
8547         PR middle-end/81035
8548         * doc/extend.texi (Common Function Attributes): Mention that
8549         noreturn suppresses tail call optimization.
8551 2018-09-21  Jeff Law  <law@redhat.com>
8553         * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
8554         vr_values::cleanup_edges_and_switches.
8555         * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
8556         vr_values class.
8557         (identify_jump_threads): Remove EDGE_IGNORE handling.
8558         (execute_vrp): Move handling of to_remove_edges and
8559         to_update_switch_stmts into vr_values class member functions.
8560         * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
8561         (to_update_switch_stmts): Likewise.
8562         * vr-values.c: Include cfghooks.h.
8563         (vr_values::vr_values): Initialize to_remove_edges and
8564         to_update_switch_stmts.
8565         (vr_values::~vr_values): Verify to_remove_edges and
8566         to_update_switch_stmts are empty.
8567         (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
8568         (vr_values::cleanup_edges_and_switches): New member function.
8569         * vr-values.h (vr_values): Add cleanup_edges_and_switches member
8570         function.  Add new data members.
8572 2018-09-21  David Malcolm  <dmalcolm@redhat.com>
8574         PR tree-optimization/87309
8575         * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
8576         calls with pflags and alt_flags.
8577         (selftest::test_capture_of_dump_calls): Add test of interaction of
8578         MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
8580 2018-09-21  Olivier Hainque  <hainque@adacore.com>
8582         * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
8584 2018-09-21  Olivier Hainque  <hainque@adacore.com>
8586         * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
8588 2018-09-21  Olivier Hainque  <hainque@adacore.com>
8590         * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
8591         Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
8592         (VXWORKS_LIBS_RTP): Minor reordering.
8594 2018-09-21  Olivier Hainque  <hainque@adacore.com>
8596         * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
8597         (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
8599 2018-09-21  Olivier Hainque  <hainque@adacore.com>
8601         * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
8602         (PTRDIFF_TYPE): Likewise.
8604 2018-09-21  Olivier Hainque  <hainque@adacore.com>
8606         * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
8607         triplet, similar to support for VxWorks7.
8608         * config/vxworks-dummy.h: Provide a default definition
8609         of TARGET_VXWORKS64 to 0.
8611 2018-09-21  Olivier Hainque  <hainque@adacore.com>
8613         * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
8614         * config/vxworks-dummy.h: here.
8616 2018-09-21  Olivier Hainque  <hainque@adacore.com>
8618         * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
8620 2018-09-21  Shaokun Zhang  <zhangshaokun@hisilicon.com>
8621             Bo Zhou  <zbo.zhou@hisilicon.com>
8623         * config/aarch64/aarch64-cores.def (tsv110): New CPU.
8624         * config/aarch64/aarch64-tune.md: Regenerated.
8625         * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
8626         * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
8627         * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
8629 2018-09-21  Andrew Stubbs  <ams@codesourcery.com>
8630             Julian Brown  <julian@codesourcery.com>
8632         * builtins.c (get_builtin_sync_mem): Handle address spaces.
8634 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
8636         * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
8637         if the call takes a static chain.
8639 2018-09-21  Martin Liska  <mliska@suse.cz>
8641         * auto-profile.c (autofdo_source_profile::read): Do not
8642         set sum_all.
8643         (read_profile): Do not add working sets.
8644         (read_autofdo_file): Remove sum_all.
8645         (afdo_callsite_hot_enough_for_early_inline): Remove const
8646         qualifier.
8647         * coverage.c (struct counts_entry): Remove gcov_summary.
8648         (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
8649         do not support GCOV_TAG_PROGRAM_SUMMARY.
8650         (get_coverage_counts): Remove summary and expected
8651         arguments.
8652         * coverage.h (get_coverage_counts): Likewise.
8653         * doc/gcov-dump.texi: Remove -w option.
8654         * gcov-dump.c (dump_working_sets): Remove.
8655         (main): Do not support '-w' option.
8656         (print_usage): Likewise.
8657         (tag_summary): Likewise.
8658         * gcov-io.c (gcov_write_summary): Do not dump
8659         histogram.
8660         (gcov_read_summary): Likewise.
8661         (gcov_histo_index): Remove.
8662         (gcov_histogram_merge): Likewise.
8663         (compute_working_sets): Likewise.
8664         * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
8665         it not obsolete.
8666         (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
8667         (GCOV_TAG_SUMMARY_LENGTH): Adjust.
8668         (GCOV_HISTOGRAM_SIZE): Remove.
8669         (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
8670         (struct gcov_summary): Simplify rapidly just
8671         to runs and sum_max fields.
8672         (gcov_histo_index): Remove.
8673         (NUM_GCOV_WORKING_SETS): Likewise.
8674         (compute_working_sets): Likewise.
8675         * gcov-tool.c (print_overlap_usage_message): Remove
8676         trailing empty line.
8677         * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
8678         (output_lines): Remove program related line.
8679         * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
8680         * lto-cgraph.c (output_profile_summary): Do not stream GCOV
8681         histogram.
8682         (input_profile_summary): Do not read it.
8683         (merge_profile_summaries): And do not merge it.
8684         (input_symtab): Do not call removed function.
8685         * modulo-sched.c (sms_schedule): Do not print sum_max.
8686         * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
8687         removed when histogram method was invented.
8688         (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
8689         mode.
8690         * postreload-gcse.c (eliminate_partially_redundant_load): Fix
8691         GCOV coding style.
8692         * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
8693         and dump selected value.
8694         * profile.c (add_working_set): Remove.
8695         (get_working_sets): Likewise.
8696         (find_working_set): Likewise.
8697         (get_exec_counts): Do not work with working sets.
8698         (read_profile_edge_counts): Do not inform as sum_max is removed.
8699         (compute_branch_probabilities): Likewise.
8700         (compute_value_histograms): Remove argument for call of
8701         get_coverage_counts.
8702         * profile.h: Do not make gcov_summary const.
8704 2018-09-21  Monk Chiang  <sh.chiang04@gmail.com>
8706         * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
8708 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
8710         PR tree-optimization/86990
8711         * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
8712         Check that the entire merged store group is made of constants only for
8713         overlapping stores.
8715 2018-09-20  Allan Sandfeld Jensen  <allan.jensen@qt.io>
8717         * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
8718         (VTABLE_VERIFICATION_SPEC): Likewise.
8719         (SANITIZER_EARLY_SPEC): Likewise.
8720         (SANITIZER_SPEC): Likewise.
8721         * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
8722         * doc/invoke.texi (Link Options): Document -r.
8724 2018-09-20  Richard Biener <rguenther@suse.de>
8726         PR middle-end/87054
8727         * gimplify.c (gimplify_expr): Retain alignment of
8728         addressable lvalue in dereference.
8730 2018-09-20  Alexandre Oliva <aoliva@redhat.com>
8732         PR bootstrap/87013
8733         * configure.ac: Check for .loc is_stmt support.
8734         * configure, config.in: Rebuilt.
8735         * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
8736         if not supported.
8738 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
8740         * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
8741         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
8742         -misel=no.
8744 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
8746         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
8747         VECTOR_OTHER.
8748         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
8749         case VECTOR_OTHER.
8751 2018-09-20  Marek Polacek  <polacek@redhat.com>
8753         * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
8755 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
8757         PR tree-optimization/87288
8758         * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
8759         into account when determining PEELING_FOR_NITERS.
8761 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
8763         PR tree-optimization/86877
8764         * tree-vect-loop.c (vect_analyze_loop_2): Call
8765         vect_verify_datarefs_alignment.
8767 2018-09-19  Marek Polacek  <polacek@redhat.com>
8769         * doc/invoke.texi: Document -Wclass-conversion.
8771 2018-09-19  John David Anglin  <danglin@gcc.gnu.org>
8773         * config/pa/pa.c (pa_adjust_priority): Delete.
8774         (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
8776         * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
8777         (atomic_storehi): Likewise.
8778         (atomic_storesi): Likewise.
8779         (atomic_loaddi): Restore compare and swap exchange loop code.
8781 2018-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
8783         PR rtl-optimization/86902
8784         * combine.c (try_combine): When changing the CC mode used, don't change
8785         an unrelated mode in other_insn to that new CC mode.
8787 2018-09-19  David Malcolm  <dmalcolm@redhat.com>
8789         * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
8790         with %T in place of calls to dump_generic_expr.
8791         (prune_runtime_alias_test_list): Likewise.
8792         (create_runtime_alias_checks): Likewise.
8793         * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
8794         (vect_analyze_data_ref_dependence): Likewise.
8795         (vect_slp_analyze_data_ref_dependence): Likewise.
8796         (vect_record_base_alignment): Likewise.  Use %G in place of call
8797         to dump_gimple_stmt.
8798         (vect_compute_data_ref_alignment): Likewise.
8799         (verify_data_ref_alignment): Likewise.
8800         (vect_find_same_alignment_drs): Likewise.
8801         (vect_analyze_group_access_1): Likewise.
8802         (vect_analyze_data_ref_accesses): Likewise.
8803         (dependence_distance_ge_vf): Likewise.
8804         (dump_lower_bound): Likewise.
8805         (vect_prune_runtime_alias_test_list): Likewise.
8806         (vect_find_stmt_data_reference): Likewise.
8807         (vect_analyze_data_refs): Likewise.
8808         (vect_create_addr_base_for_vector_ref): Likewise.
8809         (vect_create_data_ref_ptr): Likewise.
8810         * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
8811         (vect_can_advance_ivs_p): Likewise.
8812         (vect_update_ivs_after_vectorizer): Likewise.
8813         (vect_gen_prolog_loop_niters): Likewise.
8814         (vect_prepare_for_masked_peels): Likewise.
8815         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
8816         (vect_determine_vectorization_factor): Likewise.
8817         (vect_is_simple_iv_evolution): Likewise.
8818         (vect_analyze_scalar_cycles_1): Likewise.
8819         (vect_analyze_loop_operations): Likewise.
8820         (report_vect_op): Likewise.
8821         (vect_is_slp_reduction): Likewise.
8822         (check_reduction_path): Likewise.
8823         (vect_is_simple_reduction): Likewise.
8824         (vect_create_epilog_for_reduction): Likewise.
8825         (vect_finalize_reduction:): Likewise.
8826         (vectorizable_induction): Likewise.
8827         (vect_transform_loop_stmt): Likewise.
8828         (vect_transform_loop): Likewise.
8829         (optimize_mask_stores): Likewise.
8830         * tree-vect-patterns.c (vect_pattern_detected): Likewise.
8831         (vect_split_statement): Likewise.
8832         (vect_recog_over_widening_pattern): Likewise.
8833         (vect_recog_average_pattern): Likewise.
8834         (vect_determine_min_output_precision_1): Likewise.
8835         (vect_determine_precisions_from_range): Likewise.
8836         (vect_determine_precisions_from_users): Likewise.
8837         (vect_mark_pattern_stmts): Likewise.
8838         (vect_pattern_recog_1): Likewise.
8839         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
8840         (vect_record_max_nunits): Likewise.
8841         (vect_build_slp_tree_1): Likewise.
8842         (vect_build_slp_tree_2): Likewise.
8843         (vect_print_slp_tree): Likewise.
8844         (vect_analyze_slp_instance): Likewise.
8845         (vect_detect_hybrid_slp_stmts): Likewise.
8846         (vect_detect_hybrid_slp_1): Likewise.
8847         (vect_slp_analyze_operations): Likewise.
8848         (vect_slp_analyze_bb_1): Likewise.
8849         (vect_transform_slp_perm_load): Likewise.
8850         (vect_schedule_slp_instance): Likewise.
8851         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
8852         (vect_mark_stmts_to_be_vectorized): Likewise.
8853         (vect_init_vector_1): Likewise.
8854         (vect_get_vec_def_for_operand): Likewise.
8855         (vect_finish_stmt_generation_1): Likewise.
8856         (vect_check_load_store_mask): Likewise.
8857         (vectorizable_call): Likewise.
8858         (vectorizable_conversion): Likewise.
8859         (vectorizable_operation): Likewise.
8860         (vectorizable_load): Likewise.
8861         (vect_analyze_stmt): Likewise.
8862         (vect_is_simple_use): Likewise.
8863         (vect_get_vector_types_for_stmt): Likewise.
8864         (vect_get_mask_type_for_stmt): Likewise.
8865         * tree-vectorizer.c (increase_alignment): Likewise.
8867 2018-09-19  Andrew Stubbs  <ams@codesourcery.com>
8869         * doc/rtl.texi: Adjust vec_select description.
8870         * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
8871         non-constant selectors.
8873 2018-09-19  Matthew Malcomson  <matthew.malcomson@arm.com>
8875         * config/aarch64/aarch64-protos.h
8876         (aarch64_offset_9bit_signed_unscaled_p): New declaration.
8877         * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
8878         (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
8879         * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
8880         (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
8881         (AARCH64_FL_PROFILE): Move index so flags are ordered.
8882         (AARCH64_ISA_RCPC8_4): New flag.
8883         * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
8884         to aarch64_offset_9bit_signed_unscaled_p.
8885         * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
8886         and use stlur.
8887         * config/aarch64/constraints.md (Ust): New constraint.
8888         * config/aarch64/predicates.md.
8889         (aarch64_9bit_offset_memory_operand): New predicate.
8890         (aarch64_rcpc_memory_operand): New predicate.
8892 2018-09-19  Eric Botcazou  <ebotcazou@adacore.com>
8894         PR rtl-optimization/87361
8895         * rtlanal.c (nonzero_bits1): Revert accidental change.
8897 2018-09-19  Richard Biener  <rguenther@suse.de>
8899         PR tree-optimization/87349
8900         PR tree-optimization/87342
8901         * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
8903 2018-09-18  Marek Polacek  <polacek@redhat.com>
8905         P1064R0 - Allowing Virtual Function Calls in Constant Expressions
8906         * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
8908 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
8910         * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
8912 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
8914         PR rtl-optimization/86882
8915         * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
8917 2018-09-18  Uros Bizjak  <ubizjak@gmail.com>
8919         * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
8920         *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
8922 2018-09-18  Jonathan Wakely  <jwakely@redhat.com>
8924         PR other/87353
8925         * doc/invoke.texi (Link Options): Fix formatting and grammar.
8927 2018-09-18  Richard Biener  <rguenther@suse.de>
8929         PR middle-end/63155
8930         * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
8931         (compute_samebase_partition_bases): Likewise.
8932         (coalesce_ssa_name): Always use compute_optimized_partition_bases.
8933         (gimple_can_coalesce_p): Simplify.
8935 2018-09-18  Hans-Peter Nilsson  <hp@bitrange.com>
8937         Handle a library implementation of ffs calling __builtin_ffs.
8938         * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
8939         (mmix_init_libfuncs): New function: make __builtin_ffs expand
8940         to __ffsdi2.
8942 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
8944         * diagnostic-show-locus.c (class layout_range): Add field
8945         "m_original_idx".
8946         (layout_range::layout_range): Add "original_idx" param and use it
8947         to initialize new field.
8948         (make_range): Use 0 for original_idx.
8949         (layout::layout): Pass in index to calls to
8950         maybe_add_location_range.
8951         (layout::maybe_add_location_range): Add param "original_idx" and
8952         pass it on to layout_range.
8953         (layout::print_any_labels): Pass on range->m_original_idx to
8954         get_text call.
8955         (gcc_rich_location::add_location_if_nearby): Use 0 for
8956         original_idx.
8957         * gcc-rich-location.h (text_range_label::get_text): Update for new
8958         param.
8959         (range_label_for_type_mismatch::get_text): Likewise.
8961 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
8963         * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
8965 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
8967         * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
8968         format_string_diagnostic_t.
8969         (fmtwarn_n): Likewise.
8970         * substring-locations.c
8971         (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
8972         (format_warning_n_va): Convert to...
8973         (format_string_diagnostic_t::emit_warning_n_va): ...this.
8974         (format_warning_va): Convert to...
8975         (format_string_diagnostic_t::emit_warning_va): ...this.
8976         (format_warning_at_substring): Convert to...
8977         (format_string_diagnostic_t::emit_warning): ...this.
8978         (format_warning_at_substring_n): Convert to...
8979         (format_string_diagnostic_t::emit_warning_n): ...this.
8980         * substring-locations.h (class format_string_diagnostic_t): New
8981         class.
8982         (format_warning_va): Convert to
8983         format_string_diagnostic_t::emit_warning_va.
8984         (format_warning_n_va): Convert to
8985         format_string_diagnostic_t::emit_warning_n_va.
8986         (format_warning_at_substring): Convert to
8987         format_string_diagnostic_t::emit_warning.
8988         (format_warning_at_substring_n): Convert to
8989         format_string_diagnostic_t::emit_warning_n.
8991 2018-09-17  Cesar Philippidis  <cesar@codesourcery.com>
8992             Bernd Schmidt <bernds_cb1@t-online.de>
8994         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
8995         SImode args.
8997 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
8999         * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
9000         operand 0 predicate to nonimmediate operand.
9001         (rint<mode>2_frndint): Remove insn pattern.
9002         (rint<mode>2): Change operand 1 predicate to general_operand.
9003         Extend operand 1 to XFmode and generate rintxf2 insn.
9004         (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
9005         Do not use X87MODEF mode macro.
9006         (frndintxf2_<rounding>_i387): Rename from
9007         frndint<mode>2_<rounding>_i387.  Do not use X87MODEF mode macro.
9008         (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
9009         to XFmode and generate significandxf3 insn.
9011 2018-09-17  Richard Biener  <rguenther@suse.de>
9013         PR tree-optimization/87328
9014         * tree-ssa-sccvn.c (process_bb): Remove assertion about not
9015         visiting unexecutable backedges when not iterating.
9016         (do_rpo_vn): Mark all edges not executable even when not
9017         iterating.
9019 2018-09-17  Martin Jambor  <mjambor@suse.cz>
9021         PR c/63886
9022         * doc/invoke.texi (Warning Options): Likewise.
9024 2018-09-17  Richard Biener  <rguenther@suse.de>
9026         PR tree-optimization/87301
9027         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
9028         clean EH info from leftover copy assignments.
9030 2018-09-17  Martin Liska  <mliska@suse.cz>
9032         PR gcov-profile/85871
9033         * gcov.c (output_intermediate_file): Fix out of bounds
9034         access.
9036 2018-09-17  Vineet Gupta  <vgupta@synopsys.com>
9038         * config/arc/arc.c: Object attributes for core4 not reflected
9039         correctly.
9040         * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
9041         core3).
9043 2018-09-17  Alexey Brodkin  <abrodkin@synopsys.com>
9045         * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
9047 2018-09-17  Martin Liska  <mliska@suse.cz>
9049         * doc/gcov.texi: Document new option --use-hotness-colors.
9050         * gcov.c (struct source_info): Declare new field.
9051         (source_info::source_info): Set default for maximum_count.
9052         (print_usage): Add new -q option.
9053         (process_args): Process it.
9054         (accumulate_line_info): Save src->maximum_count.
9055         (output_line_beginning): Make color line number if
9056         flag_use_hotness_colors is set.
9057         (output_line_details): Pass default argument value.
9058         (output_lines): Pass src->maximum_count.
9060 2018-09-17  Martin Liska  <mliska@suse.cz>
9062         * common/config/i386/i386-common.c (ix86_get_valid_option_values):
9063         Use processor_names table.
9064         * config/i386/i386.c (ix86_default_align): Use
9065         processor_cost_table for alignment values.
9066         (ix86_option_override_internal): Use processor_names.
9067         (ix86_function_specific_print): Likewise.
9068         * config/i386/i386.h (struct processor_costs):
9069         Add alignment values.
9070         (struct ptt): Remove and replace with const char *.
9071         * config/i386/x86-tune-costs.h (struct processor_costs):
9072         Declare default alignments for all costs.
9074 2018-09-17  Aldy Hernandez  <aldyh@redhat.com>
9076         * tree-vrp.c (extract_range_from_unary_expr): Do not special case
9077         symbolics or VR_VARYING ranges for ABS_EXPR.
9078         * wide-int-range.cc (wide_int_range_abs): Return positive numbers
9079         when range will wrap.
9081 2018-09-15  Eric Botcazou  <ebotcazou@adacore.com>
9083         PR middle-end/86864
9084         * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
9085         before and after a JUMP_TABLE_DATA.
9087 2018-09-14  John David Anglin  <danglin@gcc.gnu.org>
9089         PR middle-end/87188
9090         * dojump.c (do_compare_and_jump): Canonicalize function pointers
9091         when one operand is a function pointer.  Use POINTER_TYPE_P and
9092         FUNC_OR_METHOD_TYPE_P.
9093         * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
9094         * fold-const.c (build_range_check): Likewise.
9095         * match.pd (simple_comparison): Likewise.
9097 2018-09-14  David Malcolm  <dmalcolm@redhat.com>
9099         PR c/82967
9100         * spellcheck.c (get_edit_distance_cutoff): New function.
9101         (selftest::test_edit_distance_unit_test_oneway): Rename to...
9102         (selftest::test_get_edit_distance_one_way): ...this.
9103         (selftest::test_get_edit_distance_unit): Rename to...
9104         (selftest::test_get_edit_distance_both_ways): ...this.
9105         (selftest::test_edit_distances): Move tests to this new function,
9106         and test some more pairs of strings.  Update for above renaming.
9107         (selftest::get_old_cutoff): New function.
9108         (selftest::test_get_edit_distance_cutoff): New function.
9109         (selftest::assert_suggested_for): New function.
9110         (ASSERT_SUGGESTED_FOR): New macro.
9111         (selftest::assert_not_suggested_for): New function.
9112         (ASSERT_NOT_SUGGESTED_FOR): New macro.
9113         (selftest::test_suggestions): New function.
9114         (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
9115         tests to selftest::test_edit_distances and call it.  Add calls to
9116         selftest::test_get_edit_distance_cutoff and
9117         selftest::test_suggestions.
9118         * spellcheck.h (get_edit_distance_cutoff): New function declaration.
9119         (best_match::consider): Replace hard-coded cutoff calculation with
9120         a call to...
9121         (best_match::get_cutoff): New declaration.
9122         (best_match::get_best_meaningful_candidate): Likewise.
9124 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9126         * builtins.c (fold_builtin_strlen): Remove TODO comment.
9128 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9130         revert:
9131         2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9133         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
9134         terminated string literal.
9136 2018-09-14  Martin Sebor  <msebor@redhat.com>
9138         * builtins.c (unterminated_array): Handle ARRAY_REF.
9139         (expand_builtin_stpcpy_1): Detect unterminated char arrays.
9140         * builtins.h (unterminated_array): Declare extern.
9141         * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
9142         arrays.
9143         (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
9144         calls.
9146 2018-09-14  Martin Sebor  <msebor@redhat.com>
9147             Jeff Law  <law@redhat.com>
9149         * builtins.c (unterminated_array): New.
9150         (expand_builtin_strcpy): Adjust.
9151         (expand_builtin_strcpy_args): Detect unterminated arrays.
9152         * gimple-fold.c (get_maxval_strlen): Add argument.  Detect
9153         unterminated arrays.
9154         * gimple-fold.h (get_maxval_strlen): Add argument.
9155         (gimple_fold_builtin_strcpy): Detec unterminated arrays.
9157         * gimple-fold.c (get_range_strlen): Add argument.
9158         (get_maxval_strlen): Adjust.
9159         * gimple-fold.h (get_range_strlen): Add argument.
9161 2018-09-14  Wei Xiao  <wei3.xiao@intel.com>
9163         * config/i386/movdirintrin.h: Fix copyright year.
9165 2018-09-14  Uros Bizjak  <ubizjak@gmail.com>
9167         * reg-stack.c: Include regs.h.
9168         (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
9169         (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
9170         FIRST_STACK_REG, not DFmode.
9171         (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
9172         FIRST_STACK_REG, not XFmode.  Explicitly construct swap RTX.
9173         (change stack): Default register mode to the reg_raw_mode of
9174         FIRST_STACK_REG, not DFmode.
9175         * config/i386/i386.md (*swap<mode>): Remove insn pattern.
9176         (*swapxf): Rename from swapxf.
9178 2018-09-14  Carl Love  <cel@us.ibm.com>
9180         * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
9181         * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
9183 2018-09-14  Segher Boessenkool  <segher@kernel.crashing.org>
9185         PR target/87224
9186         * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
9187         alternatives.
9189 2018-09-14  Sam Tebbs  <sam.tebbs@arm.com>
9191         PR target/85628
9192         * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
9194 2018-09-14  Jason Merrill  <jason@redhat.com>
9196         Fix --enable-gather-detailed-mem-stats.
9197         * hash-table.c (hash_table_usage): Change from variable to function.
9198         * hash-table.h: Adjust.
9199         * Makefile.in: Add missing dependencies on hash-table.h.
9201 2018-09-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9203         PR tree-optimization/87259
9204         PR lto/87283
9205         (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
9206         execute_cse_reciprocals_1 has tried transforming.
9208 2018-09-14  Aldy Hernandez  <aldyh@redhat.com>
9210         * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
9211         VR_VARYING for PLUS/MINUS_EXPR.
9213 2018-09-14  Ilya Leoshkevich  <iii@linux.ibm.com>
9215         * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
9216         formatting.
9218 2018-09-14  Richard Biener  <rguenther@suse.de>
9220         PR middle-end/63155
9221         * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
9222         bits for the merged partition.
9224 2018-09-13  Martin Sebor  <msebor@redhat.com>
9225             Bernd Edlinger  <bernd.edlinger@hotmail.de>
9227         * builtins.h (c_srlen): Add argument.
9228         * builtins.c (warn_string_no_nul): New function.
9229         (c_strlen): Add argument and use it.  Update recursive calls.
9230         Pass DECL argument to string_constant to get info on non
9231         terminated strings.  Update *NONSTR as needed.
9232         (fold_builtin_strlen): Add argument to calls to c_strlen.
9233         Warn for unterminated arrays.
9234         (warn_string_no_null): Add prototype.
9235         * expr.c (string_constant): Update arguments.  Update recursive
9236         calls appropriately.  Detect missing NUL terminator and outermost
9237         declaration its missing in.
9238         Improve checks for arrays with nonzero lower bound or elements
9239         that are not a single byte.  Simplify offset computation.
9240         Simplify checks for non-NUL terminated strings.
9241         * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
9242         * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
9244 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9246         * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
9247         correctly.
9248         * fold-const.c (c_getstr): Fix function comment.  Remove unused third
9249         argument.  Fix range checks.
9250         * fold-const.h (c_getstr): Adjust protoype.
9251         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
9252         string is constant but contains no NUL byte.
9254         * expr.c (string_constant): Adjust function comment.
9255         Remove bogus check for zero termination.
9257         * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
9259         * varasm.c (compare_constant): Compare type size of STRING_CSTs.
9260         (get_constant_size): Don't make STRING_CSTs larger than they are.
9261         (check_string_literal): New check function for STRING_CSTs.
9262         (output_constant): Use it.
9264 2018-09-13  Eric Botcazou  <ebotcazou@adacore.com>
9266         PR target/86812
9267         * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
9269 2018-09-13  Richard Biener  <rguenther@suse.de>
9271         PR tree-optimization/87263
9272         * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
9273         (struct unwind_state): Add max_rpo field.
9274         (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
9275         Compute max_rpo, the max RPO number a block can be backwards reached
9276         from.  Re-write non-iterating mode to a RPO ordered worklist approach,
9277         separating it from the iterating mode.
9279 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
9281         * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
9282         (rfs_decision): New scheduling decision.
9284 2018-09-13  Richard Biener  <rguenther@suse.de>
9286         PR bootstrap/87134
9287         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
9288         (vn_nary_op_insert_pieces_predicated): Do not write useless
9289         valid_dominated_by_p entry outside of the allocated storage.
9291 2018-09-13  Omar Sandoval  <osandov@osandov.com>
9292             Tom de Vries  <tdevries@suse.de>
9294         PR debug/86985
9295         * dwarf2out.c (is_c): New function.
9296         (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
9298 2018-09-13  Sam Tebbs  <sam.tebbs@arm.com>
9300         PR target/85628
9301         * config/aarch64/aarch64.md (*aarch64_bfxil):
9302         Define.
9303         * config/aarch64/constraints.md (Ulc): Define.
9304         * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
9305         Define.
9306         * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
9307         New function.
9309 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
9311         * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
9312         * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
9313         aarch64_layout_frame call.
9314         (aarch64_expand_epilogue): Likewise.
9315         (aarch64_initial_elimination_offset): Likewise.
9316         (aarch64_get_separate_components): Likewise.
9317         (aarch64_use_return_insn_p): Likewise.
9318         (aarch64_layout_frame): Remove unneeded check.
9320 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
9322         * configure.ac: Only append
9323         " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
9324         gcc_config_arguments if it was never reconfigured or last reconfigure
9325         was with different arguments.
9326         * configure: Regenerated.
9328 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
9329             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9331         PR middle-end/87290
9332         * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
9333         (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
9335 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
9337         PR tree-optimization/87287
9338         * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
9339         X % C == 0 to X % (unsigned) C == 0 optimization to ...
9340         * match.pd (X % C == 0): ... here.  New optimization.
9342 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
9344         PR middle-end/82853
9345         * expr.h (maybe_optimize_mod_cmp): Declare.
9346         * expr.c (mod_inv): New function.
9347         (maybe_optimize_mod_cmp): New function.
9348         (do_store_flag): Use it.
9349         * cfgexpand.c (expand_gimple_cond): Likewise.
9351 2018-09-09  Cesar Philippidis  <cesar@codesourcery.com>
9352             Julian Brown  <julian@codesourcery.com>
9354         PR middle-end/86336
9355         * gimplify.c (gimplify_scan_omp_clauses): Set
9356         target_firstprivatize_array_bases in OpenACC parallel and kernels
9357         region contexts.  Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
9358         OpenACC data regions.
9360 2018-09-12  Uros Bizjak  <ubizjak@gmail.com>
9362         * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
9363         (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
9365 2018-09-12  Richard Biener  <rguenther@suse.de>
9367         PR tree-optimization/87280
9368         * tree-ssa-sccvn.c (process_bb): Handle the case of executable
9369         edge but unreachable target.
9370         (do_rpo_vn): For conservatively handling a PHI only mark
9371         the backedge executable but not the block reachable.
9373 2018-09-12  Richard Biener  <rguenther@suse.de>
9375         PR tree-optimization/87266
9376         * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
9377         visited blocks.
9379 2018-09-12  Andreas Krebbel  <krebbel@linux.ibm.com>
9381         * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
9382         constants.
9383         ("trunc<BFP:mode><DFP_ALL:mode>2")
9384         ("trunc<DFP_ALL:mode><BFP:mode>2")
9385         ("extend<BFP:mode><DFP_ALL:mode>2")
9386         ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
9387         according to the target operand type.
9389 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
9390             Andreas Krebbel  <krebbel@linux.ibm.com>
9392         PR tree-optimization/86844
9393         * gimple-ssa-store-merging.c
9394         (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
9395         there are any overlapping stores in between them, make sure they are
9396         also coalesced or we give up completely.
9398 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
9400         PR middle-end/87248
9401         * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
9402         BIT_AND_EXPR's second operand is a power of two.  Formatting fix.
9404 2018-09-12  Tom de Vries  <tdevries@suse.de>
9406         * common.opt (gdescribe-dies): Add option.
9407         * dwarf2out.c (add_name_and_src_coords_attributes): Add description
9408         attribute for artifical and nameless decls.
9409         (dwarf2out_register_external_die): Add description attribute to
9410         external reference die.
9411         (add_desc_attribute): New functions.
9412         (gen_subprogram_die): Add description attribute to
9413         DW_TAG_call_site_parameter.
9414         * tree-pretty-print.c (print_generic_expr_to_str): New function.
9415         * tree-pretty-print.h (print_generic_expr_to_str): Declare.
9416         * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
9417         -gno-describe-dies.
9418         (@item -gdescribe-dies): Add.
9420 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
9422         * tree-vrp.c (vrp_shift_undefined_p): Remove.
9423         (extract_range_from_binary_expr_1: Call
9424         wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
9425         * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
9426         depend on sign.
9428 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
9430         * gimple-ssa-warn-alloca.c
9431         (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
9432         field for ALLOCA_BOUND_*_LARGE.
9434 2018-09-11  Nathan Sidwell  <nathan@acm.org>
9436         * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
9438 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
9440         * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
9441         for clobbers.  Remove obsolete comment.
9443 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
9445         * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
9446         mpxchk, mpxld and mpxst types.
9447         (define_attr length_immediate): Remove all processing of mpx types.
9448         (define_attr prefix_0f): Ditto.
9449         (define_attr memory): Ditto.
9451 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
9453         * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
9454         (log<mode>2): Change operand 1 predicate to general_operand.
9455         Extend operand 1 to XFmode and generate logxf3 insn.
9456         (log10<mode>2): Change operand 1 predicate to general_operand.
9457         Extend operand 1 to XFmode and generate log10xf3 insn.
9458         (log2<mode>2): Change operand 1 predicate to general_operand.
9459         Extend operand 1 to XFmode and generate log2xf3 insn.
9460         (fyl2xp1_extend<mode>xf3_i387): Remove.
9461         (log1p<mode>2): Change operand 1 predicate to general_operand.
9462         Extend operand 1 to XFmode and generate log1pxf3 insn.
9463         (fxtract_extend<mode>xf3_i387): Remove.
9464         (logb<mode>2): Change operand 1 predicate to general_operand.
9465         Extend operand 1 to XFmode and generate logbxf3 insn.
9466         (ilogb<mode>2): Change operand 1 predicate to general_operand.
9467         Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
9468         (significand<mode>2): Change operand 1 predicate to general_operand.
9469         Extend operand 1 to XFmode and generate significandxf3 insn.
9471 2018-09-11  Nathan Sidwell  <nathan@acm.org>
9473         * gcc.c (perror_with_name, pfatal_with_name): Delete.
9474         (load_specs): Use fatal_error.
9475         (DELETE_IF_ORDINARY, process_command): Use error.
9476         (execute, run_attempt): Use fatal_error.
9478 2018-09-11  Andrew Stubbs  <ams@codesourcery.com>
9480         * diagnostic-core.h (sorry_at): New prototype.
9481         * diagnostic.c (sorry_at): New function.
9483 2018-09-11  Aldy Hernandez  <aldyh@redhat.com>
9485         * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
9486         by zero as VR_UNDEFINED.
9488 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
9490         * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
9491         (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
9492         (<sincos>mode2): New expander.
9493         (sincos_extend<mode>xf3_i387): Remove insn pattern.
9494         (sincos -> sin, cos splitters): Remove splitter patterns.
9495         (sincos<mode>3): Change operand 2 predicate to general_operand.
9496         Extend operand 2 to XFmode and generate sincosxf3 insn.
9497         (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
9498         Change operand 3 predicate to const1_operand.
9499         (fptan_extend<mode>xf4_i387): Remove insn pattern.
9500         (tanxf2): Update operands in the call to fptanxf4_i387.
9501         (tan<mode>2): Change operand 1 predicate to general_operand.
9502         Extend operand 1 to XFmode and generate tanxf3 insn.
9503         (atan2xf3): Rename from *fpatanxf3_i387.
9504         (fpatan_extend<mode>xf3_i387): Remove insn pattern.
9505         (atan2xf3): Remove expander.
9506         (atan2<mode<3):  Change operand 1 and 2 predicates to general_operand.
9507         Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
9508         (atan<mode>2): Change operand 1 predicate to general_operand.
9509         Extend operand 1 to XFmode and generate atanxf3 insn.
9511 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
9513         * config/i386/i386.md (x87/SSE constant load splitter): Use
9514         memory_operand instead of nonimmediate_operand for input operand
9515         predicate.
9517 2018-09-09  Uros Bizjak  <ubizjak@gmail.com>
9519         * config/i386/i386.md (float partial SSE register stall splitter): Move
9520         splitter near its instruction pattern.
9521         (float_extend partial SSE register stall splitter): Ditto.
9522         (float_truncate partial SSE register stall splitter): Ditto.
9524 2018-09-09  Hans-Peter Nilsson  <hp@bitrange.com>
9526         PR target/86794
9527         * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
9528         to speculation_safe_value_not_needed.
9530         PR target/85666
9531         * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
9532         non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
9533         (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
9534         leaf_function_p, instead use has_hard_reg_initial_val.
9536 2018-09-09  Nathan Sidwell  <nathan@acm.org>
9538         * gcc.h (pfatal_with_name): Don't declare here.
9539         * gcc.c (pfatal_with_name): Make static.
9541 2018-09-09  Xianmiao Qu  <xianmiao_qu@c-sky.com>
9543         * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
9544         earlyclobber.
9546 2018-09-08  John David Anglin  <danglin@gcc.gnu.org>
9548         PR rtl-optimization/85458
9549         * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
9550         priority hook to reduce the priority of EXPR.
9552 2018-09-07  Uros Bizjak  <ubizjak@gmail.com>
9554         * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
9555         DImode for x87 on 32bit targets.  Conditionally disable x87 modes
9556         with X87_ENABLE_FLOAT.  Remove preparation code.
9557         (*float<SWI48:mode><MODEF:mode>2): Rename from
9558         *float<SWI48:mode><MODEF:mode>2_mixed.  Handle x87, SSE and mixed
9559         math using "enabled" attribute.
9560         (*floatdi<MODEF:mode>2_i387): Rename from
9561         *float<SWI48x:mode><MODEF:mode>2_i387.  Handle only DImode and
9562         enable for 32bit targets only.
9563         (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
9564         splitter.
9565         (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
9566         as operand 1 predicate.  Rewrite as define_insn_and_split.
9567         (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
9569 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
9571         * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
9572         to fallthru to FLOAT case.
9574 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
9576         PR target/86731
9577         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
9578         around folding of vec_sl to handle out of range shift values.
9580 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
9582         * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
9583         Update callers to gen_fix_trunc<mode>_i387_fisttp
9584         (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
9585         nonimmediate_operand.
9586         (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
9587         and corresponding splitters.
9588         (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
9589         (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
9590         (fix_truncdi_i387_with_temp): Remove insn pattern
9591         and corresponding splitters.
9592         (fix_trunc<mode>_i387): Change operand 0 predicate to
9593         nonimmediate_operand.
9594         (fix_trunc<mode>_i387_with_temp): Remove insn pattern
9595         and corresponding splitters.
9596         (*fistdi2_1): Remove.
9597         (fistdi2): Ditto.
9598         (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
9599         (lrintxfdi2): Remove expander.  Reimplement as define_insn.
9600         (*fist<mode>2_1): Remove.
9601         (fist<mode>2): Ditto.
9602         (fist<mode>2_with_temp): Remove insn pattern and corresponding
9603         splitters.
9604         (lrintxf<mode>2): Remove expander.  Reimplement as define_insn.
9605         (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
9606         (fistdi2_<rounding>): Change operand 0 predicate to
9607         nonimmediate_operand.
9608         (fistdi2_<rounding>_with_temp): Remove insn pattern
9609         and corresponding splitters.
9610         (fist<mode>2_<rounding>): Change operand 0 predicate to
9611         nonimmediate_operand.
9612         (fist<mode>2_<rounding>_with_temp): Remove insn pattern
9613         and corresponding splitters.
9615         (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
9617 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9619         * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
9620         the init value.
9622 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
9624         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
9625         early gimple folding of vec_splat().
9626         * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
9627         * gimple-fold.h: Add an extern define for tree_vec_extract().
9629 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
9631         * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
9632         wrappers around TREE_TYPE comparisons.
9634 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
9636         PR target/80080
9637         * config/s390/predicates.md: Add nonsym_memory_operand.
9638         * config/s390/s390.c (s390_legitimize_cs_operand): If operand
9639         contains a SYMBOL_REF, load it into an intermediate pseudo.
9640         (s390_emit_compare_and_swap): Legitimize operand.
9641         * config/s390/s390.md: Use the new nonsym_memory_operand
9642         with UNSPECV_CAS patterns.
9644 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
9646         PR target/80080
9647         * config/s390/s390-passes.def: New file.
9648         * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
9649         declaration.
9650         (make_pass_s390_early_mach): Add declaration.
9651         * config/s390/s390.c (make_pass_s390_early_mach):
9652         (s390_option_override): Remove dynamic registration.
9653         * config/s390/t-s390: Add s390-passes.def.
9655 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
9657         * config/s390/s390.c (s390_decompose_constant_pool_ref):
9658         Remove UNSPEC_LTREL_BASE check.
9659         (annotate_constant_pool_refs): Likewise.
9660         (find_constant_pool_ref): Likewise.
9661         (find_ltrel_base): Removed.
9662         (replace_ltrel_base): Removed.
9663         (s390_mainpool_finish): Remove replace_ltrel_base call.
9664         (s390_chunkify_start): Remove pending LTREL_BASE logic.
9665         (s390_chunkify_finish): Remove replace_ltrel_base call.
9666         * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
9668 2018-09-06  Hans-Peter Nilsson  <hp@axis.com>
9670         PR target/86779
9671         * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
9672         to speculation_safe_value_not_needed.
9674 2018-09-05  Cesar Philippidis  <cesar@codesourcery.com>
9675             Bernd Schmidt  <bernds_cb1@t-online.de>
9677         * config/nvptx/nvptx-opts.h: New file.
9678         * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
9679         * config/nvptx/nvptx.h: Include "nvptx-opts.h".
9680         (ASM_SPEC): Define.
9681         (TARGET_SM35): New macro.
9682         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
9683         correct predicate.
9684         * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
9685         values.
9686         (misa=): New option.
9687         * doc/invoke.texi (Nvidia PTX Options): Document -misa.
9689 2018-09-05  Uros Bizjak  <ubizjak@gmail.com>
9691         * config/i386/i386.md (truncdfsf2): Remove expander.
9692         (truncdfsf2_with_temp): Ditto.
9693         (truncxf<mode>2): Ditto.
9694         (*truncdfsf_fast_mixed): Remove insn pattern.
9695         (*truncdfsf_fast_i387): Ditto.
9696         (*truncdfsf_mixed): Ditto.
9697         (*truncdfsf_i387): Ditto.
9698         (*truncdfsf2_i387_1): Ditto.
9699         (*truncxfsf2_mixed): Ditto.
9700         (*truncxfdf2_mixed): Ditto.
9701         (*truncxf<mode>2_i387_noop): Ditto. Update callers
9702         to call gen_truncxf<mode>2 instead.
9703         (*truncxf<mode>2_i387): Remove.
9704         (reg->reg splitters): Remove splitter pattern.
9705         (reg->mem splitters): Ditto.
9707         (truncdfsf2): New insn pattern.
9708         (truncxf<mode>2): Ditto.
9710 2018-09-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9712         * tree-ssa-math-opts.c (is_mult_by): New function.
9713         (is_square_of): Use the above.
9714         (optimize_recip_sqrt): New function.
9715         (pass_cse_reciprocals::execute): Use the above.
9717 2018-09-05  Richard Biener  <rguenther@suse.de>
9719         PR bootstrap/87134
9720         * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
9721         to zero-init the emplaced vec.
9723 2018-09-05  Martin Liska  <mliska@suse.cz>
9725         PR tree-optimization/87205
9726         * tree-switch-conversion.c (pass_lower_switch::execute):
9727         Group cases for switch statements.
9729 2018-09-05  Richard Biener  <rguenther@suse.de>
9731         PR tree-optimization/87217
9732         * tree-ssa-sccvn.c (vuse_valueize): New.
9733         (vn_reference_lookup_pieces): Use it.
9734         (vn_reference_lookup): Likewise.
9736 2018-09-05  Nathan Sidwell  <nathan@acm.org>
9738         PR c++/87137
9739         * stor-layout.c (place_field): Scan forwards to check last
9740         bitfield when ms_bitfield_placement is in effect.
9742 2018-09-05  Richard Biener  <rguenther@suse.de>
9744         PR bootstrap/87225
9745         * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
9746         return.
9748 2018-09-05  Siddhesh Poyarekar  <siddhesh@sourceware.org>
9749             Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
9751         * config/aarch64/falkor-tag-collision-avoidance.c: New file.
9752         * config.gcc (extra_objs): Build it.
9753         * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
9754         Likewise.
9755         * config/aarch64/aarch64-passes.def
9756         (pass_tag_collision_avoidance): New pass.
9757         * config/aarch64/aarch64.c (qdf24xx_tunings): Add
9758         AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
9759         (aarch64_classify_address): Remove static qualifier.
9760         (aarch64_address_info, aarch64_address_type): Move to...
9761         * config/aarch64/aarch64-protos.h: ... here.
9762         (make_pass_tag_collision_avoidance): New function.
9763         * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
9764         New tuning flag.
9766 2018-09-05  Martin Liska  <mliska@suse.cz>
9768         * doc/gcov.texi: Update documentation of humar
9769         readable mode.
9770         * gcov.c (format_count): Print one decimal place, it provides
9771         more fine number of situations like '1G' vs. '1.4G'.
9773 2018-09-05  Martin Liska  <mliska@suse.cz>
9775         PR target/87164
9776         * config/rs6000/rs6000.opt: Mark the option as Deprecated.
9777         * optc-gen.awk: Allow 'Var' for Deprecated options in order
9778         to generate a MASK value.
9780 2018-09-04  H.J. Lu  <hongjiu.lu@intel.com>
9782         PR debug/86593
9783         * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
9784         if frame pointer isn't used.
9785         (compute_frame_pointer_to_fb_displacement): Likewise.
9787 2018-09-04  Jakub Jelinek  <jakub@redhat.com>
9789         PR target/87198
9790         * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
9791         OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
9792         OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
9793         (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
9794         and OPTION_MASK_ISA_XSAVEC_UNSET.
9796 2018-09-04  Max Filippov  <jcmvbkbc@gmail.com>
9798         * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
9799         XOR operations in NAND case.
9801 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
9803         * wide-int-range.cc (wide_int_range_convert): New.
9804         * wide-int-range.h (wide_int_range_convert): New.
9805         * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
9806         code into wide_int_range_convert.
9807         (extract_range_into_wide_ints): Do not munge anti range constants
9808         into the entire domain.  Just return the range back.
9810 2018-09-04  Martin Liska  <mliska@suse.cz>
9812         * genmatch.c (output_line_directive): Add new argument
9813         fnargs.
9814         (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
9816 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
9818         * doc/invoke.texi (Option Summary): Add whitespace.
9820         * doc/invoke.texi (Option Summary): Add -Waligned-new.
9822 2018-09-04  Richard Biener  <rguenther@suse.de>
9824         PR tree-optimization/87211
9825         * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
9826         backedge value we're supposed to treat as VARYING also number
9827         the PHI to VARYING in case it got a different value-number already.
9829 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
9831         * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
9832         (extract_range_from_binary_expr_1): Do not call
9833         vrp_can_optimize_bit_op.
9834         * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
9835         static.
9836         (wide_int_range_get_mask_and_bounds): New.
9837         (wide_int_range_optimize_bit_op): New.
9838         (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
9839         (wide_int_range_bit_and): Same.
9840         * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
9841         (wide_int_range_optimize_bit_op): New.
9842         (wide_int_range_get_mask_and_bounds): New.
9844 2018-09-04  Richard Biener  <rguenther@suse.de>
9846         PR tree-optimization/87176
9847         * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
9848         variable.  When value-numbering a virtual PHI node make sure
9849         to not value-number to the backedge value.
9851 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
9853         * doc/extend.texi (Long Long, Hex Floats): Document support for
9854         long long and hex floats in more recent versions of ISO C++.
9856 2018-09-03  Richard Biener  <rguenther@suse.de>
9858         PR tree-optimization/87177
9859         * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
9860         cleanup.
9862 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
9864         * bb-reorder.c (edge_order): Convert to C-qsort-style
9865         tri-state comparator.
9866         (reorder_basic_blocks_simple): Change std::stable_sort to
9867         gcc_stablesort.
9869 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
9871         * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
9872         tri-state comparator.
9873         (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
9875 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
9877         * sort.cc (struct sort_ctx): New field 'nlim'.  Use it...
9878         (mergesort): ... here as maximum count for using netsort.
9879         (gcc_qsort): Set nlim to 3 if stable sort is requested.
9880         (gcc_stablesort): New.
9881         * system.h (gcc_stablesort): Declare.
9883 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
9885         * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
9886         * system.h (qsort): Always redirect to gcc_qsort.  Update comment.
9887         * vec.c (qsort_chk): Do not call gcc_qsort.  Update comment.
9889 2018-09-03  Segher Boessenkool  <segher@kernel.crashing.org>
9891         * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
9892         lxsdx and stxsdx alternatives.
9893         (*mov<mode>_hardfloat64): Ditto.
9894         * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
9896 2018-09-03  Richard Biener  <rguenther@suse.de>
9898         PR tree-optimization/87200
9899         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
9900         simplify result.
9902 2018-09-03  Martin Liska  <mliska@suse.cz>
9904         PR tree-optimization/87201
9905         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
9906         Fix parenthesis in an expression.
9908 2018-09-03  Richard Biener  <rguenther@suse.de>
9910         PR tree-optimization/87197
9911         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
9912         visited.  CSE the VN_INFO hashtable lookup.
9914         PR tree-optimization/87169
9915         * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
9916         iterating make sure there's no extra backedges from irreducible
9917         regions feeding the header.  Mark the destination block
9918         executable.
9920 2018-09-03  Martin Liska  <mliska@suse.cz>
9922         PR driver/83193
9923         * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
9924         * common/common-targhooks.c (default_get_valid_option_values):
9925         New function.
9926         * common/common-targhooks.h (default_get_valid_option_values):
9927         Likewise.
9928         * common/config/i386/i386-common.c: Move processor_target_table
9929         from i386.c.
9930         (ix86_get_valid_option_values): New function.
9931         (TARGET_GET_VALID_OPTION_VALUES): New macro.
9932         * config/i386/i386.c (struct ptt): Move to i386-common.c.
9933         (PTA_*): Move all defined masks into i386-common.c.
9934         (ix86_function_specific_restore): Use new processor_cost_table.
9935         * config/i386/i386.h (struct ptt): Moved from i386.c.
9936         (struct pta): Likewise.
9937         * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
9938         * doc/tm.texi.in: Likewise.
9939         * opt-suggestions.c (option_proposer::suggest_option):
9940         Pass prefix to build_option_suggestions.
9941         (option_proposer::get_completions): Likewise.
9942         (option_proposer::build_option_suggestions): Use the new target
9943         hook.
9944         * opts.c (struct option_help_tuple): New struct.
9945         (print_filtered_help): Use the new target hook.
9947 2018-09-03  Martin Liska  <mliska@suse.cz>
9949         PR middle-end/59521
9950         * predict.c (set_even_probabilities): Add likely_edges
9951         argument and handle cases where we have precisely one
9952         likely edge.
9953         (combine_predictions_for_bb): Catch also likely_edges.
9954         (tree_predict_by_opcode): Handle gswitch statements.
9955         * tree-cfg.h (find_case_label_for_value): New declaration.
9956         (find_taken_edge_switch_expr): Likewise.
9957         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
9958         Find pivot in decision tree based on probabily, not by number of
9959         nodes.
9961 2018-09-02  Gerald Pfeifer  <gerald@pfeifer.com>
9963         * doc/standards.texi (Standards): Update Objective-C reference.
9965 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
9967         * doc/install.texi (Prerequisites): Update link for MPC.
9969 2018-09-01  Michael Matz  <matz@suse.de>
9971         PR tree-optimization/87074
9972         * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
9973         PHIs for outer-loop uses.
9975 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
9977         * doc/generic.texi (OpenMP): Adjust link to openmp.org.
9978         * doc/invoke.texi (C Dialect Options): Ditto.
9980 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
9982         * doc/install.texi (Prerequisites): Adjust link mpfr.org.
9984 2018-08-31  Richard Biener  <rguenther@suse.de>
9986         PR tree-optimization/87168
9987         * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
9988         (rpo_elim::eliminate_avail): When OP was not visited it must
9989         be available.
9991 2018-08-31  David Malcolm  <dmalcolm@redhat.com>
9993         * tree-vrp.c (copy_value_range): Convert param "from" from
9994         "value_range *" to "const value_range *".
9995         (range_is_null): Likewise for param "vr".
9996         (range_int_cst_p): Likewise.
9997         (range_int_cst_singleton_p): Likewise.
9998         (symbolic_range_p): Likewise.
9999         (value_ranges_intersect_p): Likewise for both params.
10000         (value_range_nonnegative_p): Likewise for param "vr".
10001         (value_range_constant_singleton): Likewise.
10002         (vrp_set_zero_nonzero_bits): Likewise for param "ar".
10003         (extract_range_into_wide_ints): Likewise for param "vr".
10004         (extract_range_from_multiplicative_op): Likewise for params "vr0"
10005         and "vr1".
10006         (vrp_can_optimize_bit_op): Likewise.
10007         (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
10008         "vr1_".
10009         (extract_range_from_unary_expr): Likewise.
10010         (debug_value_range): Likewise for param "vr".
10011         (value_range::dump): Add "const" qualifier.
10012         (vrp_prop::check_array_ref): Convert local "vr" from
10013         "value_range *" to "const value_range *".
10014         (vrp_prop::check_mem_ref): Likewise.
10015         (vrp_prop::visit_stmt): Likewise for local "old_vr".
10016         (vrp_intersect_ranges_1): Likewise for param "vr_1".
10017         (vrp_intersect_ranges): Likewise.
10018         (simplify_stmt_for_jump_threading): Likewise for local "vr".
10019         (vrp_prop::vrp_finalize): Likewise.
10020         * tree-vrp.h (value_range::dump): Add "const" qualifier.
10021         (vrp_intersect_ranges): Add "const" qualifier to params as above.
10022         (extract_range_from_unary_expr): Likewise.
10023         (value_range_constant_singleton): Likewise.
10024         (symbolic_range_p): Likewise.
10025         (copy_value_range): Likewise.
10026         (extract_range_from_binary_expr_1): Likewise.
10027         (range_int_cst_p): Likewise.
10028         (vrp_set_zero_nonzero_bits): Likewise.
10029         (range_int_cst_singleton_p): Likewise.
10031 2018-08-31  Vlad Lazar  <vlad.lazar@arm.com>
10033         * config/aarch64/arm_neon.h (vabsd_s64): New.
10034         (vnegd_s64): Likewise.
10036 2018-08-31  Martin Jambor  <mjambor@suse.cz>
10038         * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
10040 2018-08-31  Martin Liska  <mliska@suse.cz>
10042         * ipa-icf.c (sem_item::add_type): Use
10043         sem_item::m_type_hash_cache.
10044         * ipa-icf.h: Move the cache from sem_item_optimizer
10045         to sem_item.
10047 2018-08-31  Nathan Sidwell  <nathan@acm.org>
10049         * doc/extend.texi (Backwards Compatibility): Remove implicit
10050         extern C leeway of () being (...).
10052 2018-08-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10054         * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
10056 2018-08-31  Segher Boessenkool  <segher@kernel.crashing.org>
10058         PR target/86684
10059         PR target/87149
10060         * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
10062 2018-08-31  Jakub Jelinek  <jakub@redhat.com>
10064         PR middle-end/87138
10065         * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
10066         gen_int_mode.  Formatting fixes.
10068 2018-08-30  Sandra Loosemore  <sandra@codesourcery.com>
10070         * target.def (custom_function_descriptors): Improve documentation.
10071         * doc/tm.texi.in (Trampolines): Expand discussion of function
10072         descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
10073         beginning of the section.
10074         * doc/tm.texi: Regenerated.
10076 2018-08-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
10078         * cfg.h (class auto_edge_flag): Spell out the template-id of the
10079         base class in the initializer list.  This is a workaround for
10080         building with older GCC.
10081         (class auto_bb_flag): Likewise.
10083 2018-08-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
10085         * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
10086         (altivec_vcmpequ<VI_char>_p): Remove star.
10087         * config/rs6000/rs6000-string.c (do_load_for_compare): Support
10088         vector load modes.
10089         (expand_strncmp_vec_sequence): New function.
10090         (emit_final_str_compare_vec): New function.
10091         (expand_strn_compare): Add support for vector strncmp.
10092         * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
10093         length specification to bytes.
10094         * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
10095         (vcmpnezb_p): New pattern.
10096         * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
10097         for option -mstring-compare-inline-limit.
10099 2018-08-30  Thiago Macieira  <thiago.macieira@intel.com>
10101         * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
10102         (PTA_SKYLAKE): Add PTA_AES.
10103         (PTA_GOLDMONT): Likewise.
10105 2018-08-29  Jan Hubicka  <jh@suse.cz>
10107         PR lto/86517
10108         * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
10109         * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
10111 2018-08-29  Jan Hubicka  <jh@suse.cz>
10113         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
10114         TYPE_STUB_DECL.
10115         (hash_tree): Do not visit TYPE_STUB_DECL.
10116         * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
10117         stream TYPE_STUB_DECL.
10118         * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
10119         * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
10120         after free_lang_data.
10121         (type_in_anonymous_namespace_p): Likewise.
10123 2018-08-29  Jan Hubicka  <jh@suse.cz>
10125         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
10126         comment that it has to be even number.
10127         (class sreal): Change m_sig type to int32_t.
10128         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
10129         int64_t for temporary calculations.
10130         (sreal_verify_basics): Drop one bit from minimum and maximum.
10132 2018-08-30  Richard Biener  <rguenther@suse.de>
10134         PR tree-optimization/87147
10135         * tree-ssa-sccvn.c (SSA_VISITED): New function.
10136         (visit_phi): When the degenerate result is from the backedge and
10137         we didn't visit its definition yet drop to VARYING.
10138         (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
10140 2018-08-29  Jan Hubicka  <jh@suse.cz>
10142         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
10143         DECL_VINDEX.
10144         (hash_tree): Likewise.
10146 2018-08-29  Jan Hubicka  <jh@suse.cz>
10148         * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
10149         and TYPE_NEXT_REF_TO.
10151 2018-08-29  Jan Hubicka  <jh@suse.cz>
10153         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
10154         comment that it has to be even number.
10155         (class sreal): Change m_sig type to int32_t.
10156         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
10157         int64_t for temporary calculations.
10158         (sreal_verify_basics): Drop one bit from minimum and maximum.
10160 2018-08-30  Tamar Christina  <tamar.christina@arm.com>
10162         * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
10164 2018-08-30  Vlad Lazar  <vlad.lazar@arm.com>
10166         PR middle-end/86995
10167         * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
10168         if to_add is negative.
10170 2018-08-29  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10172         PR middle-end/87053
10173         * builtins.c (c_strlen): Improve range checks.
10175 2018-08-29  Martin Sebor  <msebor@redhat.com>
10176             Jeff Law  <law@redhat.com>
10178         PR tree-optimization/86714
10179         PR tree-optimization/86711
10180         * builtins.c (c_strlen): Add arguments to call to string_constant.
10181         * expr.c (string_constant): Add argument.  Detect missing nul
10182         terminator and outermost declaration it's missing in.
10183         * expr.h (string_constant): Add argument.
10184         * fold-const.c (read_from_constant_string): Add arguments to call to
10185         string_constant.
10186         (c_getstr): Likewise.
10187         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
10188         to string_constant.
10189         * tree-ssa-strlen.c (get_stridx): Likewise.
10191 2018-08-29  Jan Hubicka  <jh@suse.cz>
10193         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
10194         Do not stream DECL_VINDEX.
10195         * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
10196         * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
10197         (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
10199 2018-08-29  Richard Biener  <rguenther@suse.de>
10201         * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
10202         virtual operands that are not default defs to honor region
10203         boundaries.
10204         (rpo_vn_valueize): Remove ineffective code here.
10206 2018-08-29  Richard Biener  <rguenther@suse.de>
10208         PR tree-optimization/87132
10209         * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
10210         when skipping defs reachable over backedges.
10212 2018-08-29  Richard Biener  <rguenther@suse.de>
10214         * tree-core.h: Document use of deprecated_flag in SSA_NAME.
10215         * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
10216         * tree-into-ssa.c (pass_build_ssa::execute): Initialize
10217         function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
10218         * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
10219         (vn_reference_lookup_3): Remove use of const_parms.
10220         (free_rpo_vn): Do not free const_parms.
10221         (do_rpo_vn): Do not call init_const_parms.
10222         * tree-ssa-alias.c (refs_may_alias_p_1): Honor
10223         SSA_NAME_POINTS_TO_READONLY_MEMORY.
10224         (call_may_clobber_ref_p_1): Likewise.
10226 2018-08-29  Alexander Monakov  <amonakov@ispras.ru>
10228         PR other/86726
10229         * invoke.texi (Optimization Options): List -ftree-scev-cprop.
10230         (-O): Ditto.
10231         (-ftree-scev-cprop): Document.
10233 2018-08-29  Jan Hubicka  <jh@suse.cz>
10235         * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
10236         parameters.
10237         (sreal constructor): Update.
10238         * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
10239         sreal:operator/): Update.
10241 2018-08-29  Martin Liska  <mliska@suse.cz>
10243         * tree-switch-conversion.c (switch_conversion::expand):
10244         Strenghten assumption about gswitch statements.
10246 2018-08-29  Richard Biener  <rguenther@suse.de>
10248         PR tree-optimization/87117
10249         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
10250         re-value-number released SSA VDEFs.
10252 2018-08-29  Richard Biener  <rguenther@suse.de>
10254         PR tree-optimization/87126
10255         * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
10257 2018-08-28  Jim Wilson  <jimw@sifive.com>
10259         * config/riscv/pic.md: Rewrite.
10260         * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
10261         invalid address.
10262         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
10263         (SOFTF, default_load, softload, softstore): New.
10265 2018-08-28  Jeff Law  <law@redhat.com>
10267         * fold-const.c (fold_binary_loc): Remove recently added assert.
10269 2018-08-28  Joern Rennecke  <joern.rennecke@riscy-ip.com>
10271         * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
10272         to OP parmeter of generated function.
10274 2018-08-28  MCC CS  <deswurstes@users.noreply.github.com>
10276         PR tree-optimization/87009
10277         * match.pd: Add boolean optimizations.
10279 2018-08-28  Martin Sebor  <msebor@redhat.com>
10281         PR middle-end/86631
10282         * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
10283         * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
10284         (pass_walloca::gate): Use it.
10285         (alloca_call_type): Same.
10286         (pass_walloca::execute): Same.
10287         * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
10289 2018-08-28  David Malcolm  <dmalcolm@redhat.com>
10291         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
10292         GCC_VERSION for usage of "__gcc_dump_printf__" format from
10293         >= 3005 to >= 9000.
10295 2018-08-28  Richard Biener  <rguenther@suse.de>
10297         PR tree-optimization/87124
10298         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
10299         constants before looking up avail.
10301 2018-08-28  Jakub Jelinek  <jakub@redhat.com>
10303         PR middle-end/87099
10304         * calls.c (maybe_warn_nonstring_arg): Punt early if
10305         warn_stringop_overflow is zero.  Don't call get_range_strlen
10306         on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
10307         Swap comparison operands to have constants on rhs.  Only use
10308         lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
10309         increment lenrng[0].
10311 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
10313         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
10314         use of tree_to_shwi.  Remove duplicated test for the size being
10315         a whole number of bytes.
10317 2018-08-28  Richard Biener  <rguenther@suse.de>
10319         PR tree-optimization/87117
10320         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
10321         Handle removed stmt without LHS (GIMPLE_NOP).
10323 2018-08-28  Richard Biener  <rguenther@suse.de>
10325         PR tree-optimization/87117
10326         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
10327         void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
10329 2018-08-28  Richard Biener  <rguenther@suse.de>
10331         PR tree-optimization/87117
10332         * tree-ssa-pre.c (compute_avail): Do not make expressions
10333         with predicated values available.
10334         (get_expr_value_id): Assert we do not run into predicated value
10335         expressions.
10337 2018-08-28  Richard Biener  <rguenther@suse.de>
10339         PR tree-optimization/87117
10340         * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
10341         get virtual operands.
10342         (get_expr_operands): Handle STRING_CST like other decls.
10344 2018-08-28  Martin Liska  <mliska@suse.cz>
10346         * tree.h: Update documentation of fndecl_built_in_p
10347         functions.
10350 2018-08-27  Jeff Law  <law@redhat.com>
10351         PR tree-optimization/87110
10352         * tree-ssa-dse.c (compute_trims): Handle non-constant
10353         TYPE_SIZE_UNIT.
10355 2018-08-27  Martin Sebor  <msebor@redhat.com>
10357         PR tree-optimization/86914
10358         * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
10360 2018-08-27  Martin Sebor  <msebor@redhat.com>
10362         PR tree-optimization/87112
10363         * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
10364         the type of the bound argument.
10366 2018-08-27  Jeff Law  <law@redhat.com>
10368         * tree-ssa-dse.c (compute_trims): Handle case where the reference's
10369         type does not have a TYPE_SIZE_UNIT.
10371 2018-08-27  Steve Ellcey  <sellcey@cavium.com>
10373         * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
10374         with include of backend.h.
10376 2018-08-27  Richard Biener  <rguenther@suse.de>
10378         PR tree-optimization/86927
10379         * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
10380         use const cond reduction code.
10382 2018-08-27  Alexander Monakov  <amonakov@ispras.ru>
10384         PR tree-optimization/85758
10385         * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
10387 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
10389         PR c++/87091
10390         * diagnostic-show-locus.c (class layout_range): Update for
10391         conversion of show_caret_p to a tri-state.
10392         (layout_range::layout_range): Likewise.
10393         (make_range): Likewise.
10394         (layout::maybe_add_location_range): Likewise.
10395         (layout::should_print_annotation_line_p): Don't show annotation
10396         lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
10397         (layout::get_state_at_point): Update for conversion of
10398         show_caret_p to a tri-state.  Bail out early for
10399         SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
10400         underlining or source colorization.
10401         (gcc_rich_location::add_location_if_nearby): Update for conversion
10402         of show_caret_p to a tri-state.
10403         (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
10404         (selftest::test_one_liner_fixit_replace_equal_secondary_range):
10405         Likewise.
10406         (selftest::test_one_liner_labels): Likewise.
10407         * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
10408         conversion of show_caret_p to a tri-state.
10409         * pretty-print.c (text_info::set_location): Likewise.
10410         * pretty-print.h (text_info::set_location): Likewise.
10411         * substring-locations.c (format_warning_n_va): Likewise.
10412         * tree-diagnostic.c (default_tree_printer): Likewise.
10413         * tree-pretty-print.c (newline_and_indent): Likewise.
10415 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
10417         PR c++/87091
10418         * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
10419         line above for line-insertion fix-it hints.
10420         (selftest::test_fixit_insert_containing_newline): Update the
10421         expected results, and add a test with line-numbering enabled.
10423 2018-08-27  Martin Liska  <mliska@suse.cz>
10425         PR sanitizer/86962
10426         * sanopt.c (sanitize_rewrite_addressable_params): Ignore
10427         params with DECL_HAS_VALUE_EXPR_P.
10429 2018-08-27  Martin Liska  <mliska@suse.cz>
10431         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
10432         selected expansion strategy.
10434 2018-08-27  Martin Liska  <mliska@suse.cz>
10436         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
10437         * builtins.c (is_builtin_fn): Likewise.
10438         * attribs.c (diag_attr_exclusions): Use new function
10439         fndecl_built_in_p and remove check for FUNCTION_DECL if
10440         possible.
10441         (builtin_mathfn_code): Likewise.
10442         (fold_builtin_expect): Likewise.
10443         (fold_call_expr): Likewise.
10444         (fold_builtin_call_array): Likewise.
10445         (fold_call_stmt): Likewise.
10446         (set_builtin_user_assembler_name): Likewise.
10447         (is_simple_builtin): Likewise.
10448         * calls.c (gimple_alloca_call_p): Likewise.
10449         (maybe_warn_nonstring_arg): Likewise.
10450         * cfgexpand.c (expand_call_stmt): Likewise.
10451         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
10452         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
10453         (cgraph_node::verify_node): Likewise.
10454         * cgraphclones.c (build_function_decl_skip_args): Likewise.
10455         (cgraph_node::create_clone): Likewise.
10456         * config/arm/arm.c (arm_insert_attributes): Likewise.
10457         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
10458         * dse.c (scan_insn): Likewise.
10459         * expr.c (expand_expr_real_1): Likewise.
10460         * fold-const.c (operand_equal_p): Likewise.
10461         (fold_binary_loc): Likewise.
10462         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
10463         * gimple-low.c (lower_stmt): Likewise.
10464         * gimple-pretty-print.c (dump_gimple_call): Likewise.
10465         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
10466         Likewise.
10467         * gimple.c (gimple_build_call_from_tree): Likewise.
10468         (gimple_call_builtin_p): Likewise.
10469         (gimple_call_combined_fn): Likewise.
10470         * gimplify.c (gimplify_call_expr): Likewise.
10471         (gimple_boolify): Likewise.
10472         (gimplify_modify_expr): Likewise.
10473         (gimplify_addr_expr): Likewise.
10474         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
10475         * ipa-cp.c (determine_versionability): Likewise.
10476         * ipa-fnsummary.c (compute_fn_summary): Likewise.
10477         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
10478         * ipa-split.c (visit_bb): Likewise.
10479         (split_function): Likewise.
10480         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
10481         * lto-cgraph.c (input_node): Likewise.
10482         * lto-streamer-out.c (write_symbol): Likewise.
10483         * omp-low.c (setjmp_or_longjmp_p): Likewise.
10484         (lower_omp_1): Likewise.
10485         * predict.c (strip_predict_hints): Likewise.
10486         * print-tree.c (print_node): Likewise.
10487         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
10488         * trans-mem.c (is_tm_irrevocable): Likewise.
10489         (is_tm_load): Likewise.
10490         (is_tm_simple_load): Likewise.
10491         (is_tm_store): Likewise.
10492         (is_tm_simple_store): Likewise.
10493         (is_tm_abort): Likewise.
10494         (tm_region_init_1): Likewise.
10495         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
10496         * tree-cfg.c (verify_gimple_call): Likewise.
10497         (move_stmt_r): Likewise.
10498         (stmt_can_terminate_bb_p): Likewise.
10499         * tree-eh.c (lower_eh_constructs_2): Likewise.
10500         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
10501         * tree-inline.c (remap_gimple_stmt): Likewise.
10502         (copy_bb): Likewise.
10503         (estimate_num_insns): Likewise.
10504         (fold_marked_statements): Likewise.
10505         * tree-sra.c (scan_function): Likewise.
10506         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
10507         (optimize_stack_restore): Likewise.
10508         (pass_fold_builtins::execute): Likewise.
10509         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
10510         (mark_all_reaching_defs_necessary_1): Likewise.
10511         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
10512         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
10513         (pass_forwprop::execute): Likewise.
10514         * tree-ssa-loop-im.c (stmt_cost): Likewise.
10515         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
10516         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
10517         * tree-ssa-strlen.c (get_string_length): Likewise.
10518         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
10519         (find_func_aliases_for_call): Likewise.
10520         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
10521         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
10522         * tree-tailcall.c (find_tail_calls): Likewise.
10523         * tree.c (need_assembler_name_p): Likewise.
10524         (free_lang_data_in_decl): Likewise.
10525         (get_call_combined_fn): Likewise.
10526         * ubsan.c (is_ubsan_builtin_p): Likewise.
10527         * varasm.c (incorporeal_function_p): Likewise.
10528         * tree.h (DECL_BUILT_IN): Remove and replace with
10529         fndecl_built_in_p.
10530         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
10531         (fndecl_built_in_p): New.
10533 2018-08-27  Martin Liska  <mliska@suse.cz>
10535         PR tree-optimization/86847
10536         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
10537         Dump also subtree probability.
10538         (switch_decision_tree::do_jump_if_equal): New function.
10539         (switch_decision_tree::emit_case_nodes): Handle special
10540         situations in balanced tree that can be emitted much simpler.
10541         Fix calculation of probabilities that happen in tree expansion.
10542         * tree-switch-conversion.h (struct cluster): Add
10543         is_single_value_p.
10544         (struct simple_cluster): Likewise.
10545         (struct case_tree_node): Add new function has_child.
10546         (do_jump_if_equal): New.
10548 2018-08-27  Martin Liska  <mliska@suse.cz>
10550         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
10551         Add new argument to bit_test_cluster constructor.
10552         (bit_test_cluster::emit): Set bits really number of values
10553         handlel by a test.
10554         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
10555         probability argument.
10556         * tree-switch-conversion.h (struct bit_test_cluster):
10557         Add m_handles_entire_switch.
10559 2018-08-27  Martin Liska  <mliska@suse.cz>
10561         PR tree-optimization/86702
10562         * tree-switch-conversion.c (jump_table_cluster::emit):
10563         Make probabilities even for values in jump table
10564         according to number of cases handled.
10565         (switch_decision_tree::compute_cases_per_edge): Pass
10566         argument to reset_out_edges_aux function.
10567         (switch_decision_tree::analyze_switch_statement): Likewise.
10568         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
10569         Make it static.
10571 2018-08-27  Martin Liska  <mliska@suse.cz>
10573         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
10574         cfun argument explicitly.
10575         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
10576         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
10577         function gimple_switch_default_bb.
10578         (convert_switch_statements):
10579         (expand_builtins):
10580         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
10581         * stmt.c (label_to_block_fn): Use label_to_block and pass
10582         cfun argument explicitly and use gimple_switch_label_bb.
10583         (expand_case): Likewise.
10584         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
10585         cfun argument explicitly. Likewise.
10586         (make_edges_bb): Likewise.
10587         (make_cond_expr_edges): Likewise.
10588         (get_cases_for_edge): Likewise.
10589         (make_gimple_switch_edges): Likewise.
10590         (label_to_block_fn): Likewise.
10591         (label_to_block): Likewise.
10592         (make_goto_expr_edges): Likewise.
10593         (make_gimple_asm_edges): Likewise.
10594         (main_block_label): Likewise.
10595         (group_case_labels_stmt): Likewise.
10596         (find_taken_edge_computed_goto): Likewise.
10597         (find_taken_edge_switch_expr): Likewise.
10598         (gimple_verify_flow_info): Likewise.
10599         (gimple_redirect_edge_and_branch): Likewise.
10600         (gimple_switch_label_bb): New function.
10601         (gimple_switch_default_bb): Likewise.
10602         (gimple_switch_edge): Likewise.
10603         (gimple_switch_default_edge): Likewise.
10604         * tree-cfg.h (label_to_block_fn): Remove and replace ...
10605         (label_to_block): ... with this.
10606         (gimple_switch_label_bb): New.
10607         (gimple_switch_default_bb): Likewise.
10608         (gimple_switch_edge): Likewise.
10609         (gimple_switch_default_edge): Likewise.
10610         * tree-cfgcleanup.c (convert_single_case_switch): Use
10611         new gimple functions and pass new argument to label_to_block.
10612         (cleanup_control_flow_bb):
10613         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
10614         cfun argument explicitly.
10615         (make_eh_edges): Likewise.
10616         (redirect_eh_dispatch_edge): Likewise.
10617         (lower_resx): Likewise.
10618         (lower_eh_dispatch): Likewise.
10619         (maybe_remove_unreachable_handlers): Likewise.
10620         (unsplit_eh): Likewise.
10621         (cleanup_empty_eh): Likewise.
10622         (verify_eh_edges): Likewise.
10623         (verify_eh_dispatch_edge): Likewise.
10624         * tree-ssa-dom.c (record_edge_info): Likewise.
10625         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
10626         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
10627         (thread_through_normal_block): Likewise.
10628         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
10629         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
10630         * tree-switch-conversion.c (switch_conversion::collect): Use new
10631         gimple functions.
10632         (switch_conversion::check_final_bb): Likewise.
10633         (switch_conversion::gather_default_values): Pass new argument
10634         to label_to_block.
10635         (switch_conversion::build_constructors): Likewise.
10636         (switch_decision_tree::compute_cases_per_edge): Use new
10637         gimple_switch_edge function.
10638         (switch_decision_tree::analyze_switch_statement): Pass new argument
10639         to label_to_block.
10640         (switch_decision_tree::try_switch_expansion): Use
10641         gimple_switch_default_edge.
10642         * tree-vrp.c (find_switch_asserts): Pass new argument
10643         to label_to_block.
10644         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
10645         (vr_values::simplify_switch_using_ranges): Likewise.
10647 2018-08-27  Richard Biener  <rguenther@suse.de>
10649         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
10650         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
10652         * tree-ssa-sccvn.h (struct vn_pval): New structure.
10653         (struct vn_nary_op_s): Add unwind_to member.  Add
10654         predicated_values flag and put result into a union together
10655         with a linked list of vn_pval.
10656         (struct vn_ssa_aux): Add name member to make maintaining
10657         a map of SSA name to vn_ssa_aux possible.  Remove no longer
10658         needed info, dfsnum, low, visited, on_sccstack, use_processed
10659         and range_info_anti_range_p members.
10660         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
10661         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
10662         New functions.
10663         (vn_valueize): New global.
10664         (vn_context_bb): Likewise.
10665         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
10666         VN_INFO_PTR_INFO): Remove.
10667         * tree-ssa-sccvn.c: ... (rewrite)
10668         (pass_fre::execute): For -O2+ initialize loops and run
10669         RPO VN in optimistic mode (iterating).  For -O1 and -Og
10670         run RPO VN in non-optimistic mode.
10671         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
10672         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
10673         * doc/invoke.texi (sccvn-max-scc-size): Remove.
10674         (rpo-vn-max-loop-depth): Document.
10675         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
10676         when valuezing the VUSE signals we walked out of the region.
10677         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
10678         (phi_translate): Set VN context block to use for availability
10679         lookup.
10680         (compute_avail): Likewise.
10681         (pre_valueize): New function.
10682         (pass_pre::execute): Adjust to the RPO VN API.
10684         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
10685         (propagate_constants_for_unrolling): Remove.
10686         (tree_unroll_loops_completely): Perform value-numbering
10687         on the unrolled bodies loop parent.
10689 2018-08-27  Richard Biener  <rguenther@suse.de>
10691         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
10692         for partial antic compute.
10694 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
10696         PR rtl-optimization/87065
10697         * combine.c (simplify_if_then_else): Formatting fix.
10698         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
10699         check.
10700         (known_cond): Don't return const_true_rtx for vector modes.  Use
10701         CONST0_RTX instead of const0_rtx.  Formatting fixes.
10703 2018-08-27  Martin Liska  <mliska@suse.cz>
10705         PR gcov-profile/87069
10706         * gcov.c (process_file): Record files already processed
10707         and warn about a file being processed multiple times.
10709 2018-08-27  Martin Liska  <mliska@suse.cz>
10711         PR driver/83193
10712         * config/aarch64/aarch64.c (aarch64_override_options_internal):
10713         Set default values for x_aarch64_*_string strings.
10714         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
10715         prefix.  For -mabi do not print '=ABI' in help and use
10716         <option_value> format for -msve-vector-bits and -moverride
10717         options.
10719 2018-08-26  Jeff Law  <law@redhat.com>
10721         * config/mips/frame-header-opt.c: Include "backend.h" rather than
10722         "cfg.h"
10724 2018-08-26  Marek Polacek  <polacek@redhat.com>
10726         PR c++/87029, Implement -Wredundant-move.
10727         * doc/invoke.texi: Document -Wredundant-move.
10729 2018-08-25  Martin Sebor  <msebor@redhat.com>
10731         PR tree-optimization/87059
10732         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
10733         to the same type as the other.
10734         * fold-const.c (fold_binary_loc): Assert expectation.
10736 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
10738         * config/darwin.c (machopic_legitimize_pic_address): Clean up
10739         extraneous parentheses, dead code section and formatting.
10741 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
10743         PR c++/87091
10744         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
10745         wide enough for jumps in the line-numbering to be visible.
10746         (layout::print_gap_in_line_numbering): New member function.
10747         (layout::calculate_line_spans): When using line numbering, merge
10748         line spans that are only 1 line apart.
10749         (diagnostic_show_locus): When printing line numbers, show gaps in
10750         line numbering directly, rather than printing headers.
10751         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
10752         line-numbering with multiple line spans.
10753         (selftest::test_fixit_insert_containing_newline_2): Add test of
10754         line-numbering, in which the spans are close enough to be merged.
10756 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
10758         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
10759         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
10760         * tree-vrp.c (range_is_nonnull): Remove.
10761         (range_includes_zero_p): Accept value_range instead of min/max.
10762         (extract_range_from_binary_expr_1): Do not early bail on
10763         POINTER_PLUS_EXPR.
10764         Use range_includes_zero_p instead of range_is_nonnull.
10765         (extract_range_from_unary_expr): Use range_includes_zero_p instead
10766         of range_is_nonnull.
10767         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
10768         special case VR_ANTI_RANGE.
10769         (vrp_finalize): Same.
10770         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
10771         instead of min/max.
10772         (range_is_nonnull): Remove.
10773         * vr-values.c (vrp_stmt_computes_nonzero): Use
10774         range_includes_zero_p instead of range_is_nonnull.
10775         (extract_range_basic): Pass value_range to range_includes_zero_p
10776         instead of range_is_nonnull.
10778 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
10780         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
10781         * emit-rtl.h (rtl_data): Remove return_bnd.
10782         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
10783         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
10784         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
10785         (POINTER_BOUNDS_MODE): Remove definition.
10786         (make_pointer_bounds_mode): Remove.
10787         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
10788         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
10789         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
10790         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
10791         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
10792         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
10793         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
10795         * config/i386/i386-modes.def (BND32, BND64): Remove.
10796         * config/i386/i386.c (dbx_register_map): Remove bound registers.
10797         (dbx64_register_map): Ditto.
10798         (svr4_dbx_register_map): Ditto.
10799         (indirect_thunk_bnd_needed): Remove.
10800         (indirect_thunks_bnd_used): Ditto.
10801         (indirect_return_bnd_needed): Ditto.
10802         (indirect_return_via_cx_bnd): Ditto.
10803         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
10804         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
10805         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
10806         (output_indirect_thunk_function): Remove handling of
10807         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
10808         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
10809         (ix86_save_reg): Remove handling of crtl->return_bnd.
10810         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
10811         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
10812         and UNSPEC_BNDLX_ADDR.
10813         (ix86_output_indirect_branch_via_reg): Remove handling of
10814         indirect_thunk_prefix_bnd.
10815         (ix86_output_indirect_branch_via_push): Ditto.
10816         (ix86_output_function_return): Ditto.
10817         (ix86_output_indirect_function_return): Ditto.
10818         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
10819         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
10820         (CALL_USED_REGISTERS): Ditto.
10821         (REG_ALLOC_ORDER): Update for removal of bound registers.
10822         (HI_REGISTER_NAMES): Ditto.
10823         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
10824         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
10825         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
10826         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
10827         (FIRST_PSEUDO_REG): Update.
10828         (BND): Remove mode iterator.
10829         * config/i386/predicates.md (bnd_mem_operator): Remove.
10831 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
10833         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
10834         vectors.
10836 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
10838         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
10839         the case in which the permute needs only a single element and
10840         repeats for every vector of the result.  Extend that case to
10841         handle variable-length vectors.
10842         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
10844 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
10846         PR debug/79342
10847         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
10848         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
10850 2018-08-24  Richard Biener  <rguenther@suse.de>
10852         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
10853         bb_flags_allocated members.
10854         (auto_flag): New RAII class for allocating flags.
10855         (auto_edge_flag): New RAII class for allocating edge flags.
10856         (auto_bb_flag): New RAII class for allocating bb flags.
10857         * cfgloop.c (verify_loop_structure): Allocate temporary edge
10858         flag dynamically.
10859         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
10860         in favor of temporarily allocated BB flag.
10861         * hsa-brig.c: Re-order includes.
10862         * hsa-dump.c: Likewise.
10863         * hsa-regalloc.c: Likewise.
10864         * print-rtl.c: Likewise.
10865         * profile-count.c: Likewise.
10867 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
10869         PR target/86989
10870         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
10871         the TOC register.
10873 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
10875         PR 87073/bootstrap
10876         * wide-int-range.cc (wide_int_range_div): Do not ignore result
10877         from wide_int_range_multiplicative_op.
10879 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10881         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
10882         "permutaion".
10884 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
10886         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
10887         to 'expanded'.
10889 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
10891         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
10892         full GENERIC expression used for replacement.
10894 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
10896         * tree-vrp.c (abs_extent_range): Remove.
10897         (extract_range_into_wide_ints): Pass wide ints by reference.
10898         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
10899         Pass wide ints by reference in all calls to
10900         extract_range_into_wide_ints.
10901         * wide-int-range.cc (wide_int_range_div): New.
10902         * wide-int-range.h (wide_int_range_div): New.
10903         (wide_int_range_includes_zero_p): New.
10904         (wide_int_range_zero_p): New.
10906 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
10908         * config/aarch64/aarch64.md (arches): New enum.
10909         (arch): New enum attr.
10910         (arch_enabled): New attr.
10911         (enabled): Now uses arch_enabled only.
10912         (simd, sve, fp16): Removed attribute.
10913         (fp): Attr now defined in terms of 'arch'.
10914         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
10915         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
10916         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
10917         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
10918         attributes into 'arch'.
10919         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
10920         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
10921         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
10922         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
10923         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
10924         'simd' attribute into 'arch'.
10925         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
10926         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
10927         Convert use of 'fp' attribute to 'arch'.
10928         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
10929         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
10930         into 'arch'.
10931         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
10932         (different modes) Merge 'fp' and 'simd' into 'arch'.
10933         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
10934         'simd' into 'arch'.
10936 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
10938         PR rtl-optimization/87026
10939         * expmed.c (canonicalize_comparison): If we can no longer create
10940         pseudoregisters, don't.
10942 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
10944         PR target/86951
10945         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
10946         prototype.
10947         * config/arm/arm.c (speculation_barrier_libfunc): New static
10948         variable.
10949         (arm_init_libfuncs): Initialize it.
10950         (arm_emit_speculation_barrier): New function.
10951         * config/arm/arm.md (speculation_barrier): Call
10952         arm_emit_speculation_barrier for architectures that do not have
10953         DSB or ISB.
10954         (speculation_barrier_insn): Only match on Armv7 or later.
10956 2018-08-23  Richard Biener  <rguenther@suse.de>
10958         PR middle-end/87024
10959         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
10960         calls.
10962 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
10964         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
10965         of single-vector TBLs.
10966         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
10967         one input is given.
10969 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
10971         PR target/85910
10972         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
10973         aarch64_evpc_tbl guard.
10975 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10977         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
10978         behaviour.
10980 2018-08-22  Martin Sebor  <msebor@redhat.com>
10982         PR middle-end/87052
10983         * tree-pretty-print.c (pretty_print_string): Add argument.
10984         (dump_generic_node): Call to pretty_print_string with string size.
10986 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
10988         PR rtl-optimization/86771
10989         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
10990         of two SETs into those two SETs, one to be placed at i2, if that SETs
10991         destination is modified between i2 and i3.
10993 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
10995         PR tree-optimization/86725
10996         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
10997         function.
10998         (vect_analyze_scalar_cycles_1): Check it.
11000 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
11002         PR tree-optimization/86725
11003         * tree-vect-loop.c (vect_is_simple_reduction): When treating
11004         an outer loop phi as a double reduction, make sure that the
11005         single user of the phi result is an inner loop phi.
11007 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
11009         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
11010         grouped stores with gaps to a strided group.
11012 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
11014         * tree-vect-stmts.c (get_group_load_store_type)
11015         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
11016         first statement in a group.
11018 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
11020         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
11021         the sequence used in gcc/gcc.c.
11023 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
11025         PR other/704
11026         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
11027         building it.
11029 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
11031         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
11032         Darwin10-specific unwinder-shim.
11033         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
11034         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
11035         New to cater for Darwin10 Rosetta.
11037 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
11039         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
11040         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
11042 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
11044         PR bootstrap/81033
11045         PR target/81733
11046         PR target/52795
11047         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
11048         (dwarf2out_switch_text_section): Generate a local label for the
11049         second function sub-section and apply it as the second FDE start
11050         label.
11051         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
11052         second sub-section start.
11054 2018-08-22  Richard Biener  <rguenther@suse.de>
11056         PR tree-optimization/86988
11057         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
11059 2018-08-22  Richard Biener  <rguenther@suse.de>
11061         PR tree-optimization/86945
11062         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
11064 2018-08-22  Alexandre Oliva <oliva@adacore.com>
11066         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
11067         a comment about how uses of r2 for .sdata2 come about.
11069 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
11071         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
11073 2018-08-21  Marek Polacek  <polacek@redhat.com>
11075         PR c++/86981, Implement -Wpessimizing-move.
11076         * doc/invoke.texi: Document -Wpessimizing-move.
11078 2018-08-21  Jan Hubicka  <jh@suse.cz>
11080         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
11081         * tree.h (is_redundant_typedef): Remove.
11082         * dwarf2out.c (is_redundant_typedef): Turn into static function.
11084 2018-08-21  Jan Hubicka  <jh@suse.cz>
11086         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
11087         when possible.
11089 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
11091         * expmed.c (extract_low_bits): Reject invalid subregs early.
11093 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11095         PR middle-end/86121
11096         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
11097         behaviour.
11099 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
11101         * config/vxworks.h: Guard vxworks_asm_out_constructor and
11102         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
11103         * config/vxworks.c: Likewise.
11105 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
11107         * config/vxworks.c: Set targetm.have_ctors_dtors
11108         if HAVE_INITFINI_ARRAY_SUPPORT.
11109         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
11110         if HAVE_INITFINI_ARRAY_SUPPORT.
11112 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
11114         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
11115         default search path for VxWorks < 7.
11117 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11119         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
11120         (get_format_string): Refer to c_getstr.
11122 2018-08-21  Tom de Vries  <tdevries@suse.de>
11124         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
11125         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
11126         (debuginfo_early_stop): Declare.
11127         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
11128         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
11129         (debuginfo_early_stop): New function.
11130         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
11131         and debuginfo_early_stop.
11132         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
11133         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
11134         (general_init): Call debuginfo_early_init.
11135         (finalize): Call debuginfo_fini.
11136         (do_compile): Call debuginfo_init.
11137         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
11138         -fdump-early-debug.
11139         (@item -fdump-debug, @item -fdump-earlydebug): Add.
11141 2018-08-21  Tom de Vries  <tdevries@suse.de>
11143         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
11144         flag_dump_noaddr and flag_dump_unnumbered.
11146 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
11148         * wide-int-range.cc (wide_int_range_abs): New.
11149         (wide_int_range_order_set): Rename from wide_int_range_min_max.
11150         * wide-int-range.h (wide_int_range_abs): New.
11151         (wide_int_range_min_max): New.
11152         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
11153         case to call wide_int_range_abs.
11154         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
11155         (extract_range_from_abs_expr): Delete.
11157 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
11159         PR target/87033
11160         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
11161         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
11162         for indexed loads.
11164 2018-08-20  Nathan Sidwell  <nathan@acm.org>
11165             Jeff Law <law@redhat.com>
11167         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
11168         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
11170 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
11172         PR other/84889
11173         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
11174         (decl_attributes): Likewise.
11175         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
11176         instance.
11177         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
11178         * diagnostic-core.h (class auto_diagnostic_group): New class.
11179         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
11180         (diagnostic_report_diagnostic): Handle the first diagnostics within
11181         a group.
11182         (emit_diagnostic): Add auto_diagnostic_group instance.
11183         (inform): Likewise.
11184         (inform_n): Likewise.
11185         (warning): Likewise.
11186         (warning_at): Likewise.
11187         (warning_n): Likewise.
11188         (pedwarn): Likewise.
11189         (permerror): Likewise.
11190         (error): Likewise.
11191         (error_n): Likewise.
11192         (error_at): Likewise.
11193         (sorry): Likewise.
11194         (fatal_error): Likewise.
11195         (internal_error): Likewise.
11196         (internal_error_no_backtrace): Likewise.
11197         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
11198         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
11199         * diagnostic.h (struct diagnostic_context): Add fields
11200         "diagnostic_group_nesting_depth",
11201         "diagnostic_group_emission_count", "begin_group_cb",
11202         "end_group_cb".
11203         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
11204         Add auto_diagnostic_group instance(s).
11205         (find_explicit_erroneous_behavior): Likewise.
11206         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
11207         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
11208         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
11209         (gimplify_va_arg_expr): Likewise.
11210         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
11211         (HSA_SORRY_AT): Likewise.
11212         * ipa-devirt.c (compare_virtual_tables): Likewise.
11213         (warn_odr): Likewise.
11214         * multiple_target.c (expand_target_clones): Likewise.
11215         * opts-common.c (cmdline_handle_error): Likewise.
11216         * reginfo.c (globalize_reg): Likewise.
11217         * substring-locations.c (format_warning_n_va): Likewise.
11218         * tree-inline.c (expand_call_inline): Likewise.
11219         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
11220         * tree-ssa-loop-niter.c
11221         (do_warn_aggressive_loop_optimizations): Likewise.
11222         * tree-ssa-uninit.c (warn_uninit): Likewise.
11223         * tree.c (warn_deprecated_use): Likewise.
11225 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
11227         PR target/87014
11228         * config/i386/i386.md (eh_return): Always update EH return
11229         address in word_mode.
11231 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
11233         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
11234         TARGET_SPLIT_COMPLEX_ARG is defined.
11236 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11238         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
11240 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11242         PR target/86984
11243         * expr.c (expand_assignment): Assert that bitpos is positive.
11244         (store_field): Likewise
11245         (expand_expr_real_1): Make sure that bitpos is positive.
11246         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
11247         integer overflow.
11249 2018-08-20  Nathan Sidwell  <nathan@acm.org>
11251         * Makefile.in (CPP_ID_DATA_H): Delete.
11252         (CPP_INTERNAL_H): Don't add it.
11253         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
11254         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
11256 2018-08-20  Richard Biener  <rguenther@suse.de>
11258         PR tree-optimization/78655
11259         * tree-vrp.c (extract_range_from_binary_expr_1): Make
11260         pointer + offset nonnull if either operand is nonnull work.
11262 2018-08-20  Tom de Vries  <tdevries@suse.de>
11264         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
11265         unless the referenced die describes the added property using
11266         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
11267         Otherwise, add a DW_AT_location to the referenced die.
11269 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
11271         PR target/86994
11272         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
11273         register_operand when calling ix86_set_reg_reg_cost.
11274         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
11275         Set *total to 0 for operands that satisfy x86_64_immediate_operand
11276         predicate and to 1 otherwise.
11278 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
11280         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
11281         emit a diagnostic that it is not supported and reset the option.
11282         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
11283         supported and consume the option.  (ASM_FINAL_SPEC): New.
11285 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
11287         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
11288         a sentence.
11290 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
11292         C-SKY port: Documentation
11294         * doc/extend.texi (C-SKY Function Attributes): New section.
11295         * doc/invoke.texi (Option Summary): Add C-SKY options.
11296         (C-SKY Options): New section.
11297         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
11299 2018-08-17  Jojo  <jijie_rong@c-sky.com>
11300             Huibin Wang  <huibin_wang@c-sky.com>
11301             Sandra Loosemore  <sandra@codesourcery.com>
11302             Chung-Lin Tang  <cltang@codesourcery.com>
11304         C-SKY port: Backend implementation
11306         * config/csky/*: New.
11307         * common/config/csky/*: New.
11309 2018-08-17  Jojo  <jijie_rong@c-sky.com>
11310             Huibin Wang  <huibin_wang@c-sky.com>
11311             Sandra Loosemore  <sandra@codesourcery.com>
11312             Chung-Lin Tang  <cltang@codesourcery.com>
11313             Andrew Jenner  <andrew@codesourcery.com>
11315         C-SKY port: Configury
11317         * config.gcc (csky-*-*): New.
11318         * configure.ac: Add csky to targets for dwarf2 debug_line support.
11319         * configure: Regenerated.
11321 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
11323         * dump-context.h: Include "dumpfile.h".
11324         (dump_context::dump_printf_va): Convert final param from va_list
11325         to va_list *.  Convert from ATTRIBUTE_PRINTF to
11326         ATTRIBUTE_GCC_DUMP_PRINTF.
11327         (dump_context::dump_printf_loc_va): Likewise.
11328         * dumpfile.c: Include "stringpool.h".
11329         (make_item_for_dump_printf_va): Delete.
11330         (make_item_for_dump_printf): Delete.
11331         (class dump_pretty_printer): New class.
11332         (dump_pretty_printer::dump_pretty_printer): New ctor.
11333         (dump_pretty_printer::emit_items): New member function.
11334         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
11335         function.
11336         (dump_pretty_printer::emit_item): New member function.
11337         (dump_pretty_printer::stash_item): New member function.
11338         (dump_pretty_printer::format_decoder_cb): New member function.
11339         (dump_pretty_printer::decode_format): New member function.
11340         (dump_context::dump_printf_va): Reimplement in terms of
11341         dump_pretty_printer.
11342         (dump_context::dump_printf_loc_va): Convert final param from va_list
11343         to va_list *.
11344         (dump_context::begin_scope): Reimplement call to
11345         make_item_for_dump_printf.
11346         (dump_printf): Update for change to dump_printf_va.
11347         (dump_printf_loc): Likewise.
11348         (selftest::test_capture_of_dump_calls): Convert "stmt" from
11349         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
11350         with %T, %E, and %G.
11351         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
11352         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
11353         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
11354         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
11355         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
11356         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
11357         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
11358         within a dump_printf_loc call to "%wu".
11359         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
11360         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
11361         missing space after "=".
11362         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
11363         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
11364         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
11365         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
11366         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
11367         duplicate "vectorized" from message.
11369 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
11371         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
11372         polyNxK_t element's TYPE_STRING_FLAG.
11374 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
11376         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
11377         (they were unnamed before).  Fix comments.
11379 2018-08-17  Nathan Sidwell  <nathan@acm.org>
11381         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
11383 2018-08-17  Richard Biener  <rguenther@suse.de>
11385         PR tree-optimization/86841
11386         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
11388 2018-08-17  Martin Liska  <mliska@suse.cz>
11390         * common.opt: Remove Warn, Init and Report for options with
11391         Ignore/Deprecated flag. Warning is done automatically for
11392         Deprecated flags.
11393         * config/i386/i386.opt: Likewise.
11394         * config/ia64/ia64.opt: Likewise.
11395         * config/rs6000/rs6000.opt: Likewise.
11396         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
11397         Remove usage of flag_check_pointer_bounds.
11398         * lto-wrapper.c (merge_and_complain): Do not handle
11399         OPT_fcheck_pointer_bounds.
11400         (append_compiler_options): Likewise.
11401         * opt-functions.awk: Do not handle Deprecated.
11402         * optc-gen.awk: Check that Var, Report and Init are not
11403         used for an option with Ignore/Deprecated flag.
11404         * opts-common.c (decode_cmdline_option): Do not report
11405         CL_ERR_DEPRECATED.
11406         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
11407         options.
11408         * opts.h (struct cl_option): Remove cl_deprecated flag.
11409         (CL_ERR_DEPRECATED): Remove error enum value.
11411 2018-08-17  Richard Biener  <rguenther@suse.de>
11413         PR middle-end/86505
11414         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
11415         across a va-arg-pack using call adjust its return value accordingly.
11417 2018-08-16  Martin Sebor  <msebor@redhat.com>
11419         PR tree-optimization/86853
11420         * gimple-ssa-sprintf.c (struct format_result): Rename member.
11421         (struct fmtresult): Add member and initialize it in ctors.
11422         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
11423         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
11424         (format_directive): Set POSUNDER4K when MAYFAIL is set.
11425         (parse_directive): Handle %C same as %c.
11426         (sprintf_dom_walker::compute_format_length): Adjust.
11427         (is_call_safe): Adjust.
11429 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11431         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
11432         for determining how to count the elements.
11433         * builtins.h (c_strlen): Adjust prototype.
11434         * expr.c (string_constant): Add new parameter mem_size.
11435         Set *mem_size appropriately.
11436         * expr.h (string_constant): Adjust protoype.
11437         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
11438         * gimple-fold.h (get_range_strlen): Adjust prototype.
11439         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
11440         (format_string): Call get_string_length with eltsize.
11442 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
11444         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
11445         to emit the span, rather than setting it as the prefix.
11447 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
11449         * diagnostic-show-locus.c (layout::start_annotation_line): Add
11450         "margin_char" parameter, defaulting to space.  Use it in place
11451         of pp_space for the initial part of the margin.
11452         (layout::print_leading_fixits): Use '+' when filling the margin
11453         of line-insertion fix-it hints.
11455 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
11457         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
11458         Delete.
11460 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
11462         * config/rs6000/altivec.md: Don't set length attribute to the default
11463         value.
11464         * config/rs6000/darwin.md: Ditto.
11465         * config/rs6000/dfp.md: Ditto.
11466         * config/rs6000/htm.md: Ditto.
11467         * config/rs6000/rs6000.md: Ditto.
11468         * config/rs6000/sync.md: Ditto.
11469         * config/rs6000/vsx.md: Ditto.
11471 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
11473         * config/rs6000/altivec.md: Don't set length attribute to the default
11474         value, for branch instructions.
11475         * config/rs6000/darwin.md: Ditto.
11476         * config/rs6000/rs6000.md: Ditto.
11478 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
11480         * config/rs6000/rs6000.md (length): Always define as const_int 4.
11481         (unnamed conditional branch define_insn): Set length to 4 or 8
11482         depending on offset.
11483         (<bd>_<mode>): Similar, for alternative 0.
11484         (<bd>tf_<mode>): Ditto.
11486 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
11488         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
11490 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
11492         * doc/rtl.texi: Replace old RTX class names with new names.
11495 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
11497         * expmed.h (canonicalize_comparison): New declaration.
11498         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
11499         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
11500         * optabs.c (prepare_cmp_insn): Likewise.
11501         * rtl.h (unsigned_condition_p): New function which checks if a
11502         comparison operator is unsigned.
11504 2018-08-16  Nathan Sidwell  <nathan@acm.org>
11506         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
11507         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
11509 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
11511         PR target/84711
11512         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
11513         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
11514         (mov<mov>): ..this and enable unconditionally.
11516 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
11518         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
11520 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
11522         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
11523         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
11524         "Common" with "Target".
11526 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
11528         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
11529         * doc/invoke.texi (mmitigate-rop): Remove.
11530         * config/i386/i386.c: Do not include "regrename.h".
11531         (ix86_rop_should_change_byte_p, reg_encoded_number)
11532         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
11533         Remove.
11534         (ix86_reorg): Remove call to ix86_mitigate_rop.
11535         * config/i386/i386.md (attr "modrm_class"): Remove.
11536         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
11537         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
11538         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
11540 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
11542         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
11543         allow folding of mergeh() and mergel() for the float and double types.
11544         (fold_mergehl_helper): Rework to handle building a permute tree
11545         for float vectors.
11547 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
11549         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
11550         for TARGET_SSE.
11552 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
11554         * common.opt (fdiagnostics-show-labels): New option.
11555         * diagnostic-show-locus.c (class layout_range): Add field
11556         "m_label".
11557         (class layout): Add field "m_show_labels_p".
11558         (layout_range::layout_range): Add param "label" and use it to
11559         initialize m_label.
11560         (make_range): Pass in NULL for new "label" param of layout_range's
11561         ctor.
11562         (layout::layout): Initialize m_show_labels_p.
11563         (layout::maybe_add_location_range): Pass in loc_range->m_label
11564         when constructing layout_range instances.
11565         (struct line_label): New struct.
11566         (layout::print_any_labels): New member function.
11567         (layout::print_line): Call it if label-printing is enabled.
11568         (selftest::test_one_liner_labels): New test.
11569         (selftest::test_diagnostic_show_locus_one_liner): Call it.
11570         * diagnostic.c (diagnostic_initialize): Initialize
11571         context->show_labels_p.
11572         * diagnostic.h (struct diagnostic_context): Add field
11573         "show_labels_p".
11574         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
11575         -fno-diagnostics-show-labels.
11576         * dwarf2out.c (gen_producer_string): Add
11577         OPT_fdiagnostics_show_labels to the ignored options.
11578         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
11579         param.
11580         (gcc_rich_location::maybe_add_expr): Likewise.
11581         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
11582         label" param, defaulting to NULL.
11583         (gcc_rich_location::add_expr): Add "label" param.
11584         (gcc_rich_location::maybe_add_expr): Likewise.
11585         (class text_range_label): New class.
11586         (class range_label_for_type_mismatch): New class.
11587         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
11588         of format_warning_va.
11589         (fmtwarn_n): Likewise for new params of format_warning_n_va.
11590         * lto-wrapper.c (merge_and_complain): Add
11591         OPT_fdiagnostics_show_labels to the "pick one setting" options.
11592         (append_compiler_options): Likewise to the dropped options.
11593         (append_diag_options): Likewise to the passed-on options.
11594         * opts.c (common_handle_option): Handle the new option.
11595         * selftest-diagnostic.c
11596         (test_diagnostic_context::test_diagnostic_context): Enable
11597         show_labels_p.
11598         * substring-locations.c: Include "gcc-rich-location.h".
11599         (format_warning_n_va): Add "fmt_label" and "param_label" params
11600         and use them as appropriate.
11601         (format_warning_va): Add "fmt_label" and "param_label" params,
11602         passing them on to format_warning_n_va.
11603         (format_warning_at_substring): Likewise.
11604         (format_warning_at_substring_n): Likewise.
11605         * substring-locations.h (format_warning_va): Add "fmt_label" and
11606         "param_label" params.
11607         (format_warning_n_va): Likewise.
11608         (format_warning_at_substring): Likewise.
11609         (format_warning_at_substring_n): Likewise.
11610         * toplev.c (general_init): Initialize global_dc->show_labels_p.
11612 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
11614         PR testsuite/86519
11615         * builtins.c (expand_builtin_memcmp): Do not expand the call
11616         when overflow is detected.
11618 2018-08-15  Martin Sebor  <msebor@redhat.com>
11620         PR tree-optimization/71625
11621         * config/aarch64/aarch64-builtins.c
11622         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
11624 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
11626         * config/s390/s390.c (s390_reorg): Remove loop.
11628 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
11630         * config/darwin.c
11631          (darwin_function_switched_text_sections): Delete.
11632         * gcc/config/darwin.h
11633          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
11635 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
11637         PR target/81685
11638         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
11639         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
11640         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
11642 2018-08-15  Martin Liska  <mliska@suse.cz>
11644         PR tree-optimization/86925
11645         * predict.c (expr_expected_value_1): When taking
11646         later predictor, assign also probability.
11647         Use fold_build2_initializer_loc in order to fold
11648         the expression in -frounding-math.
11650 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
11652         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
11653         patterns.
11654         (expand_vec_perm_1): Try the new method.
11656 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
11658         PR target/86547
11659         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
11660         Check whether lra_live_max_point is 0 before dividing.
11662 2018-08-14  Martin Sebor  <msebor@redhat.com>
11664         PR tree-optimization/86650
11665         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
11666         (vrp_prop::check_mem_ref): Same.
11668 2018-08-13  Liu Hao <lh_mouse@126.com>
11670         * pretty-print.c (eat_esc_sequence): Swap the foreground and
11671         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
11672         and clear it thereafter, as it only works for DBCS.
11674 2018-08-13  Liu Hao <lh_mouse@126.com>
11676         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
11677         handle returned by _get_osf_handle().
11679 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
11681         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
11682         for folding vec_perm.
11684 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
11686         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
11687         Add support for gimple-folding of vec_pack() and vec_unpack()
11688         intrinsics.
11690 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
11692         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
11693         vec_xst variants to the list.
11694         (rs6000_gimple_fold_builtin): Add support for folding unaligned
11695         vector loads and stores.
11697 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
11699         * config.gcc (rs6000-ibm-aix4.x): Delete.
11700         (rs6000-ibm-aix5.1): Delete.
11701         (rs6000-ibm-aix5.2): Delete.
11702         (rs6000-ibm-aix5.3): Delete.
11703         * config/rs6000/aix43.h: Delete.
11704         * config/rs6000/aix51.h: Delete.
11705         * config/rs6000/aix52.h: Delete.
11706         * config/rs6000/t-aix43: Delete.
11708 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
11710         * config/s390/s390.c (s390_decompose_constant_pool_ref):
11711         New function.
11712         (s390_decompose_address): Factor out constant pool ref
11713         decomposition.
11715 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
11717         * config/nds32/nds32-predicates.c
11718         (nds32_can_use_bclr_p): Change return type as bool.
11719         (nds32_can_use_bset_p): Ditto.
11720         (nds32_can_use_btgl_p): Ditto.
11721         (nds32_can_use_bitci_p): Ditto.
11722         * config/nds32/nds32-protos.h
11723         (nds32_can_use_bclr_p): Change declaration.
11724         (nds32_can_use_bset_p): Ditto.
11725         (nds32_can_use_btgl_p): Ditto.
11726         (nds32_can_use_bitci_p): Ditto.
11728 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
11730         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
11731         Support -msched-prolog-epilog option.
11732         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
11734 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
11736         * common/config/nds32/nds32-common.c
11737         (nds32_option_optimization_table): Enalbe -malways-align.
11739 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
11741         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
11742         extra_headers.
11743         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
11744         OPT_misr_secure_ case.
11745         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
11746         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
11747         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
11748         secure attribute.
11749         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
11750         (nds32_isr_info): New field security_level.
11751         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
11752         * config/nds32/nds32.md (return_internal): Consider critical attribute.
11753         * config/nds32/nds32.opt (misr-secure): New option.
11754         * config/nds32/nds32_init.inc: New file.
11755         * config/nds32/nds32_isr.h: New file.
11757 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
11759         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
11760         Update comment for atomic instructions.
11761         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
11762         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
11763         Remove.
11764         (atomic_loaddi): Revise fence expansion to only emit fence prior to
11765         load for __ATOMIC_SEQ_CST model.
11766         (atomic_loaddi_1): Remove float register target.
11767         (atomic_storedi): Handle CONST_INT values.
11768         (atomic_storedi_1): Remove float register source.  Add special case
11769         for zero value.
11770         (memory_barrier): New expander and insn.
11772 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
11774         PR tree-optimization/86835
11775         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
11776         new_stmt after def_gsi, make sure to insert new_square_stmt after
11777         that stmt, not 2 stmts before it.
11779 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
11781         PR target/82418
11782         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
11783         instead of SWI48.
11785 2018-08-10  Martin Liska  <mliska@suse.cz>
11787         PR target/83610
11788         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
11789         function type.
11790         * builtins.c (expand_builtin_expect_with_probability):
11791         New function.
11792         (expand_builtin_expect_with_probability): New function.
11793         (build_builtin_expect_predicate): Add new argumnet probability
11794         for BUILT_IN_EXPECT_WITH_PROBABILITY.
11795         (fold_builtin_expect):
11796         (fold_builtin_2):
11797         (fold_builtin_3):
11798         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
11799         * builtins.h (fold_builtin_expect): Set new argument.
11800         * doc/extend.texi: Document __builtin_expect_with_probability.
11801         * doc/invoke.texi: Likewise.
11802         * gimple-fold.c (gimple_fold_call): Pass new argument.
11803         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
11804         also BUILT_IN_EXPECT_WITH_PROBABILITY.
11805         * predict.c (get_predictor_value): New function.
11806         (expr_expected_value): Add new argument probability. Assume
11807         that predictor and probability are always non-null.
11808         (expr_expected_value_1): Likewise.  For __builtin_expect and
11809         __builtin_expect_with_probability set probability.  Handle
11810         combination in binary expressions.
11811         (tree_predict_by_opcode): Simplify code by simply calling
11812         get_predictor_value.
11813         (pass_strip_predict_hints::execute): Add handling of
11814         BUILT_IN_EXPECT_WITH_PROBABILITY.
11815         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
11816         new predictor.
11817         * tree.h (DECL_BUILT_IN_P): New function.
11819 2018-08-10  Martin Liska  <mliska@suse.cz>
11821         PR tree-optimization/85799
11822         * passes.def: Add argument for pass_strip_predict_hints.
11823         * predict.c (class pass_strip_predict_hints): Add new argument
11824         early_p.
11825         (strip_predictor_early): New function.
11826         (pass_strip_predict_hints::execute): Call the function to
11827         strip predictors.
11828         (strip_predict_hints): New function.
11829         * predict.def: Fix comment.
11831 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
11833         * Makefile.in: Clarify which tm.texi to copy over to assert the
11834         right to grant a GFDL license for all.
11836 2018-08-09  Jeff Law  <law@redhat.com>
11838         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
11839         unused variable.
11841 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
11843         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
11844         prototype.
11846 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
11848         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
11849         reductions for variable-length vectors.
11851 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
11853         PR other/84889
11854         * common.opt (fdiagnostics-show-line-numbers): New option.
11855         * diagnostic-show-locus.c (class layout): Add fields
11856         "m_show_line_numbers_p" and "m_linenum_width";
11857         (num_digits): New function.
11858         (test_num_digits): New function.
11859         (layout::layout): Initialize new fields.  Update m_x_offset
11860         logic to handle any left margin.
11861         (layout::print_source_line): Print line number when requested.
11862         (layout::start_annotation_line): New member function.
11863         (layout::print_annotation_line): Call it.
11864         (layout::print_leading_fixits): Likewise.
11865         (layout::print_trailing_fixits): Likewise.  Update calls to
11866         move_to_column for new parameter.
11867         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
11868         it to potentially call start_annotation_line.
11869         (layout::show_ruler): Call start_annotation_line.
11870         (selftest::test_line_numbers_multiline_range): New selftest.
11871         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
11872         and selftest::test_line_numbers_multiline_range.
11873         * diagnostic.c (diagnostic_initialize): Initialize
11874         show_line_numbers_p.
11875         * diagnostic.h (struct diagnostic_context): Add field
11876         "show_line_numbers_p".
11877         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
11878         -fno-diagnostics-show-line-numbers.
11879         * dwarf2out.c (gen_producer_string): Add
11880         OPT_fdiagnostics_show_line_numbers to the ignored options.
11881         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
11882         one setting" options.
11883         (append_compiler_options): Likewise to the dropped options.
11884         (append_diag_options): Likewise to the passed-on options.
11885         * opts.c (common_handle_option): Handle the new option.
11886         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
11888 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11890         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
11891         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
11892         third argument of type "const signed char" to descriptions of
11893         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
11894         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
11895         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
11896         __builtin_bcdsub_ov functions.
11898 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
11900         PR tree-optimization/86858
11901         * tree-vect-loop.c (vect_is_simple_reduction): Restore
11902         flow_bb_inside_loop_p calls.
11904 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
11906         PR tree-optimization/86871
11907         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
11908         instead of gimple_assign_lhs.
11910 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
11912         PR target/86887
11913         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
11914         register constraint to operand 0.
11915         (add<mode>3_carryinC): Likewise.
11916         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
11918 2018-08-09  Martin Liska  <mliska@suse.cz>
11920         PR c/86895
11921         * common.opt: Remove extra line.
11923 2018-08-09  Martin Liska  <mliska@suse.cz>
11925         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
11926         at the end of a line, make first letter capital and end up
11927         a sentence with a dot.
11928         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
11929         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
11930         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
11931         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
11932         (PARAM_MAX_ISL_OPERATIONS): Likewise.
11933         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
11934         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
11935         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
11936         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
11937         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
11938         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
11939         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
11940         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
11941         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
11942         (PARAM_TREE_REASSOC_WIDTH): Likewise.
11943         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
11944         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
11945         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
11947 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
11949         PR target/84332
11950         * config/s390/s390.c (s390_option_override_internal): Reduce the
11951         stack-clash-protection-probe-interval param if it would be too big
11952         for z900.
11954 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
11956         PR target/46179
11957         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
11958         * config/m68k/m68k.c (handle_move_double): Don't call
11959         m68k_final_prescan_insn.
11960         (m68k_adjust_decorated_operand): Renamed from
11961         m68k_final_prescan_insn, remove first and third operand and
11962         simplify.
11963         (print_operand): Call it.
11964         (print_operand_address): Call it.
11966 2018-08-08  Nathan Sidwell  <nathan@acm.org>
11968         * diagnostic.c (diagnostic_report_current_module): Use
11969         linemap_included_from & linemap_included_from_linemap.
11971 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
11973         * config/aarch64/aarch64-cores.def: Add phecda core.
11974         * config/aarch64/aarch64-tune.md: Regenerate.
11975         * doc/invoke.texi: Add phecda core.
11977 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
11979         PR target/85295
11980         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
11981         definitions.
11982         * config/s390/s390.md ("movti"): Add more alternatives for
11983         constant to GPR copies.
11985 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
11987         * config/s390/s390.c: Fix whitespace damage throughout the file.
11988         * config/s390/s390.h: Likewise.
11989         * config/s390/tpf.h: Likewise.
11991 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
11993         * config/s390/s390.c (s390_loadrelative_operand_p):
11994         Remove TARGET_CPU_ZARCH usages.
11995         (s390_rtx_costs): Likewise.
11996         (s390_legitimate_constant_p): Likewise.
11997         (s390_cannot_force_const_mem): Likewise.
11998         (legitimate_reload_constant_p): Likewise.
11999         (s390_preferred_reload_class): Likewise.
12000         (legitimize_pic_address): Likewise.
12001         (legitimize_tls_address): Likewise.
12002         (s390_split_branches): Removed.
12003         (s390_add_execute): Removed.
12004         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
12005         (s390_mainpool_start): Likewise.
12006         (s390_mainpool_finish): Likewise.
12007         (s390_mainpool_cancel): Removed.
12008         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
12009         (s390_chunkify_cancel): Likewise.
12010         (s390_return_addr_rtx): Likewise.
12011         (s390_register_info): Remove split_branches_pending_p uages.
12012         (s390_optimize_register_info): Likewise.
12013         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
12014         split_branches_pending_p usages.
12015         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
12016         (s390_load_got): Likewise.
12017         (s390_expand_split_stack_prologue): Likewise.
12018         (output_asm_nops): Likewise.
12019         (s390_function_profiler): Likewise.
12020         (s390_emit_call): Likewise.
12021         (s390_conditional_register_usage): Likewise.
12022         (s390_optimize_prologue): Likewise.
12023         (s390_reorg): Remove TARGET_CPU_ZARCH and
12024         split_branches_pending_p usages.
12025         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
12026         usages.
12027         (s390_output_indirect_thunk_function): Likewise.
12028         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
12029         (TARGET_CPU_ZARCH_P): Removed.
12030         (struct machine_function): Remove split_branches_pending_p.
12031         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
12033 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
12035         * common/config/s390/s390-common.c (processor_flags_table):
12036         Remove flags.
12037         * config.gcc: Remove with_arch/with_tune support.
12038         * config/s390/2064.md: Remove cpu attribute comparisons.
12039         * config/s390/driver-native.c (s390_host_detect_local_cpu):
12040         Remove MTN.
12041         * config/s390/linux.h (ASM_SPEC):
12042         Remove -march support.
12043         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
12044         Use a table to get an arch level.
12045         * config/s390/s390-opts.h (enum processor_type):
12046         Remove enum values.
12047         * config/s390/s390.c
12048         (processor_table): Remove entries, add arch_level values.
12049         (s390_issue_rate): Remove cases.
12050         (s390_option_override): Adjust
12051         s390_option_override_internal() call.
12052         (s390_option_override_internal): Remove deprecation warning.
12053         (s390_valid_target_attribute_tree): Adjust
12054         s390_option_override_internal() call.
12055         * config/s390/s390.h (struct s390_processor):
12056         Share with s390-c.c, add arch_level field.
12057         * config/s390/s390.md:
12058         Remove occurrences in cpu attribute.
12059         * config/s390/s390.opt: Remove -march/-mtune support.
12060         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
12061         * doc/invoke.texi: Remove deprecation warning.
12063 2018-08-08  Luis Machado  <luis.machado@linaro.org>
12065         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
12066         global.
12067         (qdf24xx_tunings): Set vector cost structure to
12068         qdf24xx_vector_cost.
12070         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
12071         <register_sextend>: Set to 3.
12073 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
12075         PR target/86838
12076         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
12077         * config/aarch64/aarch64-simd.md
12078         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
12079         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
12080         (aarch64_frecpx<mode>): ...this new pattern.
12081         * config/aarch64/aarch64-simd-builtins.def: Remove comment
12082         about aarch64_frecp<FRECP:frecp_suffix><mode>.
12084 2018-08-07  Martin Liska  <mliska@suse.cz>
12086         PR middle-end/83023
12087         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
12088         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
12089         * predict.def (PRED_MALLOC_NONNULL): New predictor.
12090         * doc/extend.texi: Document that malloc attribute adds
12091         hit to compiler.
12093 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
12095         PR target/86785
12096         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12097         Define to speculation_safe_value_not_needed.
12099 2018-08-06  Jeff Law  <law@redhat.com>
12101         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
12102         the vr_values instance to cprop_into_stmt.
12103         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
12104         (cprop_operand): Also query EVRP to determine if OP is a constant.
12106 2018-08-06  Nathan Sidwell  <nathan@acm.org>
12108         * diagnostic.c (diagnostic_report_current_module): Reroll
12109         included-at loop.  Translate text.
12111 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
12113         * function-tests.c (selftest::test_expansion_to_rtl): Call
12114         free_after_compilation.
12116 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
12118         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
12120 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
12122         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
12123         loops with memory block operations from getting unrolled.
12125 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
12127         PR target/86807
12128         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12129         Define to speculation_safe_value_not_needed.
12131 2018-08-06  Jeff Law  <law@redhat.com>
12133         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
12134         assert.
12136 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
12138         PR target/86662
12139         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
12140         with all enabled __intN types.
12142         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
12144 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
12146         * alias.c (record_set): Check for clobber high.
12147         * cfgexpand.c (expand_gimple_stmt): Likewise.
12148         * combine-stack-adj.c (single_set_for_csa): Likewise.
12149         * combine.c (find_single_use_1): Likewise.
12150         (set_nonzero_bits_and_sign_copies): Likewise.
12151         (get_combine_src_dest): Likewise.
12152         (is_parallel_of_n_reg_sets): Likewise.
12153         (try_combine): Likewise.
12154         (record_dead_and_set_regs_1): Likewise.
12155         (reg_dead_at_p_1): Likewise.
12156         (reg_dead_at_p): Likewise.
12157         * dce.c (deletable_insn_p): Likewise.
12158         (mark_nonreg_stores_1): Likewise.
12159         (mark_nonreg_stores_2): Likewise.
12160         * df-scan.c (df_find_hard_reg_defs): Likewise.
12161         (df_uses_record): Likewise.
12162         (df_get_call_refs): Likewise.
12163         * dwarf2out.c (mem_loc_descriptor): Likewise.
12164         * haifa-sched.c (haifa_classify_rtx): Likewise.
12165         * ira-build.c (create_insn_allocnos): Likewise.
12166         * ira-costs.c (scan_one_insn): Likewise.
12167         * ira.c (equiv_init_movable_p): Likewise.
12168         (rtx_moveable_p): Likewise.
12169         (interesting_dest_for_shprep): Likewise.
12170         * jump.c (mark_jump_label_1): Likewise.
12171         * postreload-gcse.c (record_opr_changes): Likewise.
12172         * postreload.c (reload_cse_simplify): Likewise.
12173         (struct reg_use): Add source expr.
12174         (reload_combine): Check for clobber high.
12175         (reload_combine_note_use): Likewise.
12176         (reload_cse_move2add): Likewise.
12177         (move2add_note_store): Likewise.
12178         * print-rtl.c (print_pattern): Likewise.
12179         * recog.c (decode_asm_operands): Likewise.
12180         (store_data_bypass_p): Likewise.
12181         (if_test_bypass_p): Likewise.
12182         * regcprop.c (kill_clobbered_value): Likewise.
12183         (kill_set_value): Likewise.
12184         * reginfo.c (reg_scan_mark_refs): Likewise.
12185         * reload1.c (maybe_fix_stack_asms): Likewise.
12186         (eliminate_regs_1): Likewise.
12187         (elimination_effects): Likewise.
12188         (mark_not_eliminable): Likewise.
12189         (scan_paradoxical_subregs): Likewise.
12190         (forget_old_reloads_1): Likewise.
12191         * reorg.c (find_end_label): Likewise.
12192         (try_merge_delay_insns): Likewise.
12193         (redundant_insn): Likewise.
12194         (own_thread_p): Likewise.
12195         (fill_simple_delay_slots): Likewise.
12196         (fill_slots_from_thread): Likewise.
12197         (dbr_schedule): Likewise.
12198         * resource.c (update_live_status): Likewise.
12199         (mark_referenced_resources): Likewise.
12200         (mark_set_resources): Likewise.
12201         * rtl.c (copy_rtx): Likewise.
12202         * rtlanal.c (reg_referenced_p): Likewise.
12203         (single_set_2): Likewise.
12204         (noop_move_p): Likewise.
12205         (note_stores): Likewise.
12206         * sched-deps.c (sched_analyze_reg): Likewise.
12207         (sched_analyze_insn): Likewise.
12209 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
12211         * cse.c (invalidate_reg): New function extracted from...
12212         (invalidate): ...here.
12213         (canonicalize_insn): Check for clobber high.
12214         (invalidate_from_clobbers): invalidate clobber highs.
12215         (invalidate_from_sets_and_clobbers): Likewise.
12216         (count_reg_usage): Check for clobber high.
12217         (insn_live_p): Likewise.
12218         * cselib.c (cselib_expand_value_rtx_1):Likewise.
12219         (cselib_invalidate_regno): Check for clobber in setter.
12220         (cselib_invalidate_rtx): Pass through setter.
12221         (cselib_invalidate_rtx_note_stores):
12222         (cselib_process_insn): Check for clobber high.
12223         * cselib.h (cselib_invalidate_rtx): Add operand.
12225 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
12227         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
12228         (mark_not_eliminable): Likewise.
12229         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
12230         * lra-lives.c (process_bb_lives): Check for clobber high.
12231         * lra.c (new_insn_reg): Remember clobber highs.
12232         (collect_non_operand_hard_regs): Check for clobber high.
12233         (lra_set_insn_recog_data): Likewise.
12234         (add_regs_to_insn_regno_info): Likewise.
12235         (lra_update_insn_regno_info): Likewise.
12237 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
12239         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
12240         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
12242 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
12244         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
12245         (copy_insn_1): Likewise.
12246         (gen_hard_reg_clobber_high): New gen function.
12247         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
12248         * genemit.c (gen_exp): Likewise.
12249         (gen_emit_seq): Pass through info.
12250         (gen_insn): Check for CLOBBER_HIGH.
12251         (gen_expand): Pass through info.
12252         (gen_split): Likewise.
12253         (output_add_clobbers): Likewise.
12254         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
12255         (remove_clobbers): Likewise.
12256         * rtl.h (gen_hard_reg_clobber_high): New declaration.
12258 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
12260         * doc/rtl.texi (clobber_high): Add.
12261         (parallel): Add in clobber high
12262         * rtl.c (rtl_check_failed_code3): Add function.
12263         * rtl.def (CLOBBER_HIGH): Add expression.
12264         * rtl.h (RTL_CHECKC3): Add macro.
12265         (rtl_check_failed_code3): Add declaration.
12266         (XC3EXP): Add macro.
12268 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
12270         PR target/86386
12271         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
12272         cfun->machine->max_used_stack_alignment if needed.
12274 2018-08-04  Martin Sebor  <msebor@redhat.com>
12276         PR tree-optimization/86571
12277         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
12278         NaN output to 4.
12280 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
12282         PR target/86799
12283         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12284         Define.
12286 2018-08-03  Jeff Law  <law@redhat.com>
12288         PR target/86795
12289         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12290         Define to speculation_safe_value_not_needed.
12292 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
12294         * doc/gcov.texi (-x): Remove duplicate "to".
12295         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
12296         (-Wif-not-aligned): Remove duplicate "is".
12297         (-flto): Remove duplicate "the".
12298         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
12299         duplicate "v5.00.b".
12300         (MSP430 Options): Remove duplicate "and" from the description
12301         of "-mgprel-sec=regexp".
12302         (x86 Options): Remove duplicate copies of "vmldLog102" and
12303         vmlsLog104 from description of "-mveclibabi=type".
12305 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
12307         * internal-fn.h (first_commutative_argument): Declare.
12308         * internal-fn.c (first_commutative_argument): New function.
12309         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
12310         restrictions for pattern statements.  Use first_commutative_argument
12311         to look for commutative operands in calls to internal functions.
12313 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
12315         * Makefile.in (wide-int-range.o): New.
12316         * tree-vrp.c: Move all the wide_int_* functions to...
12317         * wide-int-range.cc: ...here.
12318         * tree-vrp.h: Move all the wide_int_* prototypes to...
12319         * wide-int-range.h: ...here.
12321 2018-08-03  Tom de Vries  <tdevries@suse.de>
12323         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
12324         UI_NONE.
12325         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
12326         * except.c (output_function_exception_table): Do early exit if
12327         targetm_common.except_unwind_info (&global_options) == UI_NONE.
12329 2018-08-03  Martin Liska  <mliska@suse.cz>
12331         * predict.c (dump_prediction): Change to 2 digits
12332         in fraction part.
12334 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
12336         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
12337         neon_dup_q to...
12338         (falkor_am_1_gtov_gtov): ... a new insn reservation.
12340 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
12342         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
12343         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
12344         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
12345         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
12346         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
12348 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
12350         * diagnostic-show-locus.c (diagnostic_show_locus): Use
12351         pp_take_prefix when saving the existing prefix.
12352         * diagnostic.c (diagnostic_append_note): Likewise.
12353         * langhooks.c (lhd_print_error_function): Likewise.
12354         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
12355         param's type.  Free the existing prefix.
12356         (pp_take_prefix): New function.
12357         (pretty_printer::pretty_printer): Drop the prefix parameter.
12358         Rename the length parameter to match the comment.
12359         (pretty_printer::~pretty_printer): Free the prefix.
12360         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
12361         parameter.
12362         (struct pretty_printer): Drop the "const" from "prefix" field's
12363         type and clarify memory management.
12364         (pp_set_prefix): Drop the "const" from the 2nd param.
12365         (pp_take_prefix): New decl.
12367 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
12369         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
12370         for word_mode_ok here instead of passing as argument.
12371         (expand_block_compare): Change select_block_compare_mode() call.
12372         (expand_strncmp_gpr_sequence): New function.
12373         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
12375 2018-08-02  Jeff Law  <law@redhat.com>
12377         PR target/86790
12378         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12379         Define to speculation_safe_value_not_needed.
12381         PR target/86784
12382         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12383         Define to speculation_safe_value_not_needed.
12385 2018-08-02  Tom de Vries  <tdevries@suse.de>
12387         PR target/86660
12388         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
12389         function.  Return UI_TARGET unconditionally.
12390         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
12391         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
12393 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
12395         * genemit.c (print_overload_test): Fix typo.
12397 2018-08-02  Richard Biener  <rguenther@suse.de>
12399         PR tree-optimization/86816
12400         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
12401         which checks for value availability before querying it.
12402         (gvn_uses_equal): Use it.
12403         (same_succ_hash): Likewise.
12404         (gimple_equal_p): Likewise.
12406 2018-08-02  Nick Clifton  <nickc@redhat.com>
12408         PR target/86813
12409         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12410         Define to speculation_safe_value_not_needed.
12412         PR target/86810
12413         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12414         Define to speculation_safe_value_not_needed.
12416         PR target/86810
12417         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12418         Define to speculation_safe_value_not_needed.
12420         PR target/86803
12421         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12422         Define to speculation_safe_value_not_needed.
12424         PR target/86797
12425         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12426         Define to speculation_safe_value_not_needed.
12428         PR target/86791
12429         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12430         Define to speculation_safe_value_not_needed.
12432         PR target/86789
12433         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12434         Define to speculation_safe_value_not_needed.
12436         PR target/86787
12437         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
12438         Define to speculation_safe_value_not_needed.
12440         PR target/86782
12441         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
12442         speculation_safe_value_not_needed.
12444         PR target/86781
12445         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
12446         to speculation_safe_value_not_needed.
12448 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
12450         * doc/md.texi: Expand the documentation of instruction names
12451         to mention port-local uses.  Document '@' in pattern names.
12452         * read-md.h (overloaded_instance, overloaded_name): New structs.
12453         (mapping): Declare.
12454         (md_reader::handle_overloaded_name): New member function.
12455         (md_reader::get_overloads): Likewise.
12456         (md_reader::m_first_overload): New member variable.
12457         (md_reader::m_next_overload_ptr): Likewise.
12458         (md_reader::m_overloads_htab): Likewise.
12459         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
12460         m_next_overload_ptr and m_overloads_htab.
12461         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
12462         (get_mode_token, get_code_token, get_int_token): New functions.
12463         (map_attr_string): Add an optional argument that passes back
12464         the associated iterator.
12465         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
12466         (md_reader::handle_overloaded_name, add_overload_instance): New
12467         functions.
12468         (apply_iterators): Handle '@' names.  Report an error if '@'
12469         is used without iterators.
12470         (initialize_iterators): Initialize the new iterator_group fields.
12471         * genopinit.c (handle_overloaded_code_for)
12472         (handle_overloaded_gen): New functions.
12473         (main): Use them to print declarations of maybe_code_for_* and
12474         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
12475         * genemit.c (print_overload_arguments, print_overload_test)
12476         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
12477         (main): Use it to print definitions of maybe_code_for_* and
12478         maybe_gen_* functions.
12479         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
12480         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
12481         instead of explicit mode checks.
12482         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
12483         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
12484         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
12485         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
12486         (aarch64_expand_compare_and_swap): Likewise
12487         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
12488         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
12489         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
12490         (aarch64_constant_pool_reload_icode): Delete.
12491         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
12492         instead of aarch64_constant_pool_reload_icode.  Use
12493         code_for_aarch64_reload_mov instead of explicit mode checks.
12494         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
12495         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
12496         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
12497         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
12498         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
12499         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
12500         (aarch64_atomic_load_op_code): Delete.
12501         (aarch64_emit_atomic_load_op): Likewise.
12502         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
12503         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
12504         instead of aarch64_emit_atomic_load_op.
12505         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
12506         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
12507         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
12508         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
12509         character before the pattern name.
12510         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
12511         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
12512         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
12513         (aarch64_frecps<mode>): Likewise.
12514         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
12515         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
12516         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
12517         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
12518         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
12520 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
12522         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
12523         Allow HFmode constants if TARGET_FP_F16INST.
12525 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
12527         PR target/86014
12528         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
12529         No longer check last store for clobber of address register.
12531 2018-08-02  Martin Liska  <mliska@suse.cz>
12533         PR gcov-profile/86817
12534         * gcov.c (process_all_functions): New function.
12535         (main): Call it.
12536         (process_file): Move functions processing to
12537         process_all_functions.
12539 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
12541         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
12542         "const" to the "gimple *" and "rtx_insn *" parameters.
12543         * dumpfile.h (dump_user_location_t::dump_user_location_t):
12544         Likewise.
12545         (dump_location_t::dump_location_t): Likewise.
12547 2018-08-01  Martin Sebor  <msebor@redhat.com>
12549         PR tree-optimization/86650
12550         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
12551         rather than a "gcall *".  Directly pass the data of interest
12552         to percent_K_format, rather than building a temporary CALL_EXPR
12553         to hold it.
12554         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
12555         (gimple_fold_builtin_strncat): Adjust.
12556         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
12557         gcall* argument with gimple*.
12558         * gimple-ssa-warn-restrict.c (check_call): Same.
12559         (wrestrict_dom_walker::before_dom_children): Same.
12560         (builtin_access::builtin_access): Same.
12561         (check_bounds_or_overlap): Same
12562         (maybe_diag_overlap): Same.
12563         (maybe_diag_offset_bounds): Same.
12564         * tree-diagnostic.c (default_tree_printer): Move usage of
12565         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
12566         to this callsite.
12567         * tree-pretty-print.c (percent_K_format): Add argument.
12568         * tree-pretty-print.h: Add argument.
12569         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
12570         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
12571         (maybe_diag_stxncpy_trunc): Same.
12572         (handle_builtin_stxncpy): Same.
12573         (handle_builtin_strcat): Same.
12575 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
12577         * match.pd: Optimise pointer range checks.
12579 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
12581         PR tree-optimization/86758
12582         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
12583         to remove pattern statements.
12585 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
12587         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
12588         result of dfs_enumerate_from when constructing stmt_vec_infos,
12589         instead of additionally calling get_loop_body.
12591 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
12593         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
12594         parameter.
12595         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
12596         When creating an iv, assert that the step is not known to be zero.
12597         (vect_setup_realignment): Update call accordingly.
12598         * tree-vect-stmts.c (vectorizable_store): Likewise.
12599         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
12601 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
12603         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
12604         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
12605         (vectorizable_reduction): Likewise.
12606         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
12607         (vect_detect_hybrid_slp_stmts): Likewise.
12608         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
12610 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
12612         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
12613         (wide_int_set_zero_nonzero_bits): ...this.
12614         (zero_nonzero_bits_from_vr): Rename to...
12615         (vrp_set_zero_nonzero_bits): ...this.
12616         (extract_range_from_multiplicative_op_1): Abstract wide int
12617         code...
12618         (wide_int_range_multiplicative_op): ...here.
12619         (extract_range_from_binary_expr_1): Extract wide int binary
12620         operations into their own functions.
12621         (wide_int_range_lshift): New.
12622         (wide_int_range_can_optimize_bit_op): New.
12623         (wide_int_range_shift_undefined_p): New.
12624         (wide_int_range_bit_xor): New.
12625         (wide_int_range_bit_ior): New.
12626         (wide_int_range_bit_and): New.
12627         (wide_int_range_trunc_mod): New.
12628         (extract_range_into_wide_ints): New.
12629         (vrp_shift_undefined_p): New.
12630         (extract_range_from_multiplicative_op): New.
12631         (vrp_can_optimize_bit_op): New.
12632         * tree-vrp.h (value_range::dump): New.
12633         (wide_int_range_multiplicative_op): New.
12634         (wide_int_range_lshift):New.
12635         (wide_int_range_shift_undefined_p): New.
12636         (wide_int_range_bit_xor): New.
12637         (wide_int_range_bit_ior): New.
12638         (wide_int_range_bit_and): New.
12639         (wide_int_range_trunc_mod): New.
12640         (zero_nonzero_bits_from_bounds): Rename to...
12641         (wide_int_set_zero_nonzero_bits): ...this.
12642         (zero_nonzero_bits_from_vr): Rename to...
12643         (vrp_set_zero_nonzero_bits): ...this.
12644         (range_easy_mask_min_max): Rename to...
12645         (wide_int_range_can_optimize_bit_op): this.
12646         * vr-values.c (simplify_bit_ops_using_ranges): Rename
12647         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
12649 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
12651         * tree-vectorizer.h (vect_orig_stmt): New function.
12652         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
12653         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
12654         (vect_create_epilog_for_reduction): Likewise.
12655         (vectorizable_live_operation): Likewise.
12656         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
12657         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
12658         * tree-vect-stmts.c (vectorizable_call): Likewise.
12659         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
12661 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
12663         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
12664         argument.
12665         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
12666         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
12667         (vect_transform_loop): Likewise.
12668         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
12670 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
12672         * tree-vectorizer.h (vect_schedule_slp): Return void.
12673         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
12674         (vect_schedule_slp): Likewise.
12676 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
12678         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
12679         argument.
12680         (vect_transform_loop): Update calls accordingly.  Schedule SLP
12681         instances before the main loop, if any exist.
12683 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
12685         PR tree-optimization/86749
12686         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
12687         If the lhs is used in a COND_EXPR, check that it is being used
12688         as the "then" or "else" value.
12690 2018-08-01  Tom de Vries  <tdevries@suse.de>
12692         PR target/86800
12693         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
12694         speculation_safe_value_not_needed.
12696 2018-08-01  Richard Biener  <rguenther@suse.de>
12698         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
12699         as base and offset.
12701 2018-08-01  Martin Liska  <mliska@suse.cz>
12703         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
12704         format how successful transformation is dumped.
12705         (gimple_mod_pow2_value_transform): Likewise.
12706         (gimple_mod_subtract_transform): Likewise.
12707         (gimple_stringops_transform): Likewise.
12709 2018-08-01  Martin Liska  <mliska@suse.cz>
12711         PR value-prof/35543
12712         * value-prof.c (interesting_stringop_to_profile_p):
12713         Simplify the code and add BUILT_IN_MEMMOVE.
12714         (gimple_stringops_transform): Likewise.
12716 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
12718         * config/aarch64/aarch64-simd.md
12719         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
12720         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
12721         use GPI iterator instead of SI mode.
12723 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
12725         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
12726         rs6000_speculation_barrier.
12727         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
12728         new barrier pattern name.
12730 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
12732         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
12733         (speculation_barrier): New insn.
12735 2018-08-01  Richard Biener  <rguenther@suse.de>
12737         PR bootstrap/86724
12738         * graphite.h: Include isl/id.h and isl/space.h to allow build
12739         with ISL 0.20.
12741 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
12743         PR target/86651
12744         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
12745         mode for COFF targets.
12746         * defaults.h (TARGET_COFF): Define.
12747         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
12748         TARGET_COFF): Define.
12749         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
12750         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
12751         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
12753 2018-07-31  Alexandre Oliva <oliva@adacore.com>
12755         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
12756         * gimple-streamer-out.c (output_bb): Save it.
12757         * lto-streamer-in.c (input_struct_function_base): Restore
12758         instance discriminator if available.  Create map on demand.
12759         * lto-streamer-out.c (output_struct_function_base): Save it if
12760         available.
12761         * final.c (decl_to_instance_map): Document LTO strategy.
12763 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
12764             Olivier Hainque  <hainque@adacore.com>
12766         * debug.h (decl_to_instance_map_t): New type.
12767         (decl_to_instance_map): Declare.
12768         (maybe_create_decl_to_instance_map): New inline function.
12769         * final.c (bb_discriminator, last_bb_discriminator): New statics,
12770         to track basic block discriminators.
12771         (final_start_function_1): Initialize them.
12772         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
12773         bb_discriminator.
12774         (decl_to_instance_map): New variable.
12775         (map_decl_to_instance, maybe_set_discriminator): New functions.
12776         (notice_source_line): Set discriminator.
12778 2018-07-31  Ian Lance Taylor  <iant@golang.org>
12780         * targhooks.c (default_have_speculation_safe_value): Add
12781         ATTRIBUTE_UNUSED.
12783 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
12785         * dump-context.h: Include "pretty-print.h".
12786         (dump_context::refresh_dumps_are_enabled): New decl.
12787         (dump_context::emit_item): New decl.
12788         (class dump_context): Add fields "m_test_pp" and
12789         "m_test_pp_flags".
12790         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
12791         (temp_dump_context::get_dumped_text): New decl.
12792         (class temp_dump_context): Add field "m_pp".
12793         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
12794         (dump_context::refresh_dumps_are_enabled): ...and add a test for
12795         m_test_pp.
12796         (set_dump_file): Update for above change.
12797         (set_alt_dump_file): Likewise.
12798         (dump_loc): New overload, taking a pretty_printer *.
12799         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
12800         to any test pretty-printer.
12801         (make_item_for_dump_gimple_stmt): New function, adapted from
12802         optinfo::add_gimple_stmt.
12803         (dump_context::dump_gimple_stmt): Call it, and use the result,
12804         eliminating the direct usage of dump_file and alt_dump_file in
12805         favor of indirectly using them via emit_item.
12806         (make_item_for_dump_gimple_expr): New function, adapted from
12807         optinfo::add_gimple_expr.
12808         (dump_context::dump_gimple_expr): Call it, and use the result,
12809         eliminating the direct usage of dump_file and alt_dump_file in
12810         favor of indirectly using them via emit_item.
12811         (make_item_for_dump_generic_expr): New function, adapted from
12812         optinfo::add_tree.
12813         (dump_context::dump_generic_expr): Call it, and use the result,
12814         eliminating the direct usage of dump_file and alt_dump_file in
12815         favor of indirectly using them via emit_item.
12816         (make_item_for_dump_printf_va): New function, adapted from
12817         optinfo::add_printf_va.
12818         (make_item_for_dump_printf): New function.
12819         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
12820         and use the result, eliminating the direct usage of dump_file and
12821         alt_dump_file in favor of indirectly using them via emit_item.
12822         (make_item_for_dump_dec): New function.
12823         (dump_context::dump_dec): Call it, and use the result,
12824         eliminating the direct usage of dump_file and alt_dump_file in
12825         favor of indirectly using them via emit_item.
12826         (make_item_for_dump_symtab_node): New function, adapted from
12827         optinfo::add_symtab_node.
12828         (dump_context::dump_symtab_node): Call it, and use the result,
12829         eliminating the direct usage of dump_file and alt_dump_file in
12830         favor of indirectly using them via emit_item.
12831         (dump_context::begin_scope): Reimplement, avoiding direct usage
12832         of dump_file and alt_dump_file in favor of indirectly using them
12833         via emit_item.
12834         (dump_context::emit_item): New member function.
12835         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
12836         Set up test pretty-printer on the underlying context.  Call
12837         refresh_dumps_are_enabled.
12838         (temp_dump_context::~temp_dump_context): Call
12839         refresh_dumps_are_enabled.
12840         (temp_dump_context::get_dumped_text): New member function.
12841         (selftest::verify_dumped_text): New function.
12842         (ASSERT_DUMPED_TEXT_EQ): New macro.
12843         (selftest::test_capture_of_dump_calls): Run all tests twice, with
12844         and then without optinfo enabled.  Add uses of
12845         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
12846         * dumpfile.h: Update comment for the dump_* API.
12847         * optinfo-emit-json.cc
12848         (selftest::test_building_json_from_dump_calls): Update for new
12849         param for temp_dump_context ctor.
12850         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
12851         and "m_owned" field.
12852         (optinfo_item::~optinfo_item): Likewise.
12853         (optinfo::add_item): New member function.
12854         (optinfo::emit): Update comment.
12855         (optinfo::add_string): Delete.
12856         (optinfo::add_printf): Delete.
12857         (optinfo::add_printf_va): Delete.
12858         (optinfo::add_gimple_stmt): Delete.
12859         (optinfo::add_gimple_expr): Delete.
12860         (optinfo::add_tree): Delete.
12861         (optinfo::add_symtab_node): Delete.
12862         (optinfo::add_dec): Delete.
12863         * optinfo.h (class dump_context): New forward decl.
12864         (optinfo::add_item): New decl.
12865         (optinfo::add_string): Delete.
12866         (optinfo::add_printf): Delete.
12867         (optinfo::add_printf_va): Delete.
12868         (optinfo::add_gimple_stmt): Delete.
12869         (optinfo::add_gimple_expr): Delete.
12870         (optinfo::add_tree): Delete.
12871         (optinfo::add_symtab_node): Delete.
12872         (optinfo::add_dec): Delete.
12873         (optinfo::add_poly_int): Delete.
12874         (optinfo_item::optinfo_item): Remove "owned" param.
12875         (class optinfo_item): Remove field "m_owned".
12877 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
12879         PR middle-end/86705
12880         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
12881         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
12882         requested variable alignment.
12883         (expand_one_ssa_partition): Likewise.
12884         (expand_one_var): Likewise.
12886 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
12888         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
12889         to speculation_safe_value_not_needed.
12891 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
12893         * targhooks.h (speculation_safe_value_not_needed): New prototype.
12894         * targhooks.c (speculation_safe_value_not_needed): New function.
12895         * target.def (have_speculation_safe_value): Update documentation.
12896         * doc/tm.texi: Regenerated.
12898 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
12900         * config/aarch64/iterators.md (ALLI_TI): New iterator.
12901         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
12902         expand.
12903         (despeculate_copy<ALLI:mode>_insn): New insn.
12904         (despeculate_copyti_insn): New insn.
12905         (despeculate_simple<ALLI:mode>): New insn
12906         (despeculate_simpleti): New insn.
12907         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
12908         function.
12909         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
12910         aarch64_speculation_safe_value.
12911         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
12913 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
12915         * config/aarch64/aarch64-speculation.cc: New file.
12916         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
12917         before pass_reorder_blocks.
12918         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
12919         prototype.
12920         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
12921         X14 and X15 when tracking speculation.
12922         * config/aarch64/aarch64.md (register name constants): Add
12923         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
12924         (unspec): Add UNSPEC_SPECULATION_TRACKER.
12925         (speculation_barrier): New insn attribute.
12926         (cmp<mode>): Allow SP in comparisons.
12927         (speculation_tracker): New insn.
12928         (speculation_barrier): Add speculation_barrier attribute.
12929         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
12930         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
12931         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
12933 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
12935         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
12936         aarch64_track_speculation is true.
12937         (tb<optab><mode>1): Likewise.
12938         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
12939         generate CB[N]Z when tracking speculation.
12940         (aarch64_split_compare_and_swap): Likewise.
12941         (aarch64_split_atomic_op): Likewise.
12943 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
12945         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
12947 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
12949         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
12950         (speculation_barrier): New insn.
12952 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
12954         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
12955         * config/arm/arm.md (speculation_barrier): New expand.
12956         (speculation_barrier_insn): New pattern.
12958 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
12960         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
12961         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
12962         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
12963         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
12964         list.
12965         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
12966         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
12967         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
12968         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
12969         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
12970         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
12971         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
12972         * builtins.c (expand_speculation_safe_value): New function.
12973         (expand_builtin): Call it.
12974         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
12975         * doc/extend.texi: Document __builtin_speculation_safe_value.
12976         * doc/md.texi: Document "speculation_barrier" pattern.
12977         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
12978         TARGET_HAVE_SPECULATION_SAFE_VALUE.
12979         * doc/tm.texi: Regenerated.
12980         * target.def (have_speculation_safe_value, speculation_safe_value): New
12981         hooks.
12982         * targhooks.c (default_have_speculation_safe_value): New function.
12983         (default_speculation_safe_value): New function.
12984         * targhooks.h (default_have_speculation_safe_value): Add prototype.
12985         (default_speculation_safe_value): Add prototype.
12987 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
12989         * dump-context.h (dump_context::dump_loc): New decl.
12990         * dumpfile.c (dump_context::dump_loc): New member function.
12991         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
12992         and dump_gimple_stmt.
12993         (dump_context::dump_gimple_expr_loc): Likewise, using
12994         dump_gimple_expr.
12995         (dump_context::dump_generic_expr_loc): Likewise, using
12996         dump_generic_expr.
12997         (dump_context::dump_printf_loc_va): Likewise, using
12998         dump_printf_va.
12999         (dump_context::begin_scope): Explicitly using the global function
13000         "dump_loc", rather than the member function.
13002 2018-07-31  Martin Sebor  <msebor@redhat.com>
13004         PR tree-optimization/86741
13005         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
13007 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
13009         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
13010         depend on whether prefetch instructions will be emitted or not.
13011         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
13012         will be emitted or not.
13013         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
13014         (TARGET_SETMEM_PFD): New macros.
13016 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13018         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
13019         (NULL_STMT_VEC_INFO): Delete.
13020         (stmt_vec_info::operator*): Likewise.
13021         (stmt_vec_info::operator gimple *): Likewise.
13022         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
13023         of NULL_STMT_VEC_INFO.
13024         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
13025         (vect_reassociating_reduction_p): Likewise.
13026         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
13027         (vectorizable_store): Likewise.
13028         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
13029         (vec_info::free_stmt_vec_infos): Likewise.
13031 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13033         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
13034         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
13036 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13038         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
13039         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
13040         (vec_info::free_stmt_vec_info): New private member functions.
13041         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
13042         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
13043         * tree-parloops.c (gather_scalar_reductions): Remove calls to
13044         set_stmt_vec_info_vec and free_stmt_vec_infos.
13045         * tree-vect-loop.c (_loop_vec_info): Remove call to
13046         set_stmt_vec_info_vec.
13047         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
13048         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
13049         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
13050         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
13051         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
13052         assignments in {vec_info::,}new_stmt_vec_info that are redundant
13053         with the clearing in the xcalloc.
13054         (stmt_vec_info_vec): Delete.
13055         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
13056         (vectorize_loops): Likewise.
13057         (vec_info::~vec_info): Remove argument from call to
13058         free_stmt_vec_infos.
13059         (vec_info::add_stmt): Remove vinfo argument from call to
13060         new_stmt_vec_info.
13062 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13064         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
13065         rather than a gimple stmt.
13066         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
13067         information for pattern statements when passed the original
13068         statement; instead wait to be passed the pattern statement itself.
13069         Don't call set_vinfo_for_stmt here.
13070         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
13071         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
13072         stmt_vec_infos here.
13073         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
13074         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
13075         stmt_vec_infos entry.
13077 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13079         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
13080         * tree-vectorizer.c (vec_info::replace_stmt): New function.
13081         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
13082         * tree-vect-stmts.c (vectorizable_call): Likewise.
13083         (vectorizable_simd_clone_call): Likewise.
13085 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13087         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
13088         * tree-vectorizer.c (vec_info::remove_stmt): New function.
13089         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
13090         * tree-vect-loop.c (vect_transform_loop): Likewise.
13091         * tree-vect-slp.c (vect_schedule_slp): Likewise.
13092         * tree-vect-stmts.c (vect_remove_stores): Likewise.
13094 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13096         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
13097         (vect_dr_stmt): Delete.
13098         * tree-vectorizer.c (vec_info::lookup_dr): New function.
13099         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
13100         of DR_VECT_AUX.
13101         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
13102         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
13103         (vect_verify_datarefs_alignment, vect_peeling_supportable)
13104         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
13105         (vect_analyze_data_refs): Likewise.
13106         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
13107         argument.
13108         (vect_find_same_alignment_drs): Likewise.
13109         (vect_slp_analyze_node_dependences): Update calls accordingly.
13110         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
13111         instead of DR_VECT_AUX.
13112         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
13113         of a vector data references.  Use vec_info::lookup_dr instead of
13114         DR_VECT_AUX.
13115         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
13116         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
13117         instead of DR_VECT_AUX.
13119 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13121         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
13122         dr_vec_info.
13123         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
13124         accordingly.
13125         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
13126         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
13127         (vect_gen_prolog_loop_niters): Likewise.
13129 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13131         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
13132         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
13133         (vect_known_alignment_in_bytes, vect_dr_behavior)
13134         (vect_get_scalar_dr_size): Take references as dr_vec_infos
13135         instead of data_references.  Update calls to other routines for
13136         which the same change has been made.
13137         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
13138         dr_vec_infos instead of stmt_vec_infos.
13139         (vect_analyze_data_ref_dependence): Update call accordingly.
13140         (vect_slp_analyze_data_ref_dependence)
13141         (vect_record_base_alignments): Use DR_VECT_AUX.
13142         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
13143         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
13144         (vector_alignment_reachable_p, vect_get_data_access_cost)
13145         (vect_peeling_supportable, vect_analyze_group_access_1)
13146         (vect_analyze_group_access, vect_analyze_data_ref_access)
13147         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
13148         (vect_compile_time_alias, vect_small_gap_p)
13149         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
13150         (vect_supportable_dr_alignment): Take references as dr_vec_infos
13151         instead of data_references.  Update calls to other routines for
13152         which the same change has been made.
13153         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
13154         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
13155         (vect_slp_analyze_and_verify_node_alignment)
13156         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
13157         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
13158         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
13159         above changes.
13160         (_vect_peel_info::dr): Replace with...
13161         (_vect_peel_info::dr_info): ...this new field.
13162         (vect_peeling_hash_get_most_frequent)
13163         (vect_peeling_hash_choose_best_peeling): Update accordingly.
13164         (vect_peeling_hash_get_lowest_cost):
13165         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
13166         routines for which the same change has been made.
13167         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
13168         data_reference.
13169         * tree-vect-loop-manip.c (get_misalign_in_elems)
13170         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
13171         above changes.
13172         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
13173         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
13174         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
13175         (get_group_load_store_type, get_negative_load_store_type)
13176         (vect_get_data_ptr_increment, vectorizable_store)
13177         (vectorizable_load): Likewise.
13178         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
13179         Update calls to other routines for which the same change has been made.
13181 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13183         * tree-vectorizer.h (vec_info::move_dr): New member function.
13184         (dataref_aux): Rename to...
13185         (dr_vec_info): ...this and add "dr" and "stmt" fields.
13186         (_stmt_vec_info::dr_aux): Update accordingly.
13187         (_stmt_vec_info::data_ref_info): Delete.
13188         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
13189         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
13190         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
13191         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
13192         of data_ref.
13193         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
13194         (STMT_VINFO_DR_INFO): New macro.
13195         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
13196         (set_dr_misalignment): Update after rename of dataref_aux.
13197         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
13198         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
13199         initialization of STMT_VINFO_DATA_REF.
13200         * tree-vectorizer.c (vec_info::move_dr): New function.
13201         * tree-vect-patterns.c (vect_recog_bool_pattern)
13202         (vect_recog_mask_conversion_pattern)
13203         (vect_recog_gather_scatter_pattern): Use it.
13204         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
13205         the "dr" and "stmt" fields of dr_vec_info instead of
13206         STMT_VINFO_DATA_REF.
13208 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13210         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
13211         (is_pattern_stmt_p): Use it.
13212         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
13213         on pattern statements.
13215 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13217         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
13218         original stmt as a stmt_vec_info rather than a gimple stmt.
13219         (vect_pattern_recog_1): Take the statement directly as a
13220         stmt_vec_info, rather than via a gimple_stmt_iterator.
13221         Update call to vect_mark_pattern_stmts.
13222         (vect_pattern_recog): Update calls accordingly.
13224 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13226         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
13227         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
13228         a vect_def_type for the first argument.
13229         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
13230         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
13231         operand if it isn't defined by a vectorized statement.
13232         (vect_build_gather_load_calls): Remove the mask_dt argument and
13233         update calls to vect_get_vec_def_for_stmt_copy.
13234         (vectorizable_bswap): Likewise the dt argument.
13235         (vectorizable_call): Update calls to vectorizable_bswap and
13236         vect_get_vec_def_for_stmt_copy.
13237         (vectorizable_simd_clone_call, vectorizable_assignment)
13238         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
13239         (vectorizable_comparison): Update calls to
13240         vect_get_vec_def_for_stmt_copy.
13241         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
13242         vect_is_simple_use.
13243         (vect_get_loop_based_defs): Remove dt argument and update call
13244         to vect_get_vec_def_for_stmt_copy.
13245         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
13246         and vect_get_vec_def_for_stmt_copy.
13247         (vectorizable_load): Update calls to vect_build_gather_load_calls
13248         and vect_get_vec_def_for_stmt_copy.
13249         * tree-vect-loop.c (vect_create_epilog_for_reduction)
13250         (vectorizable_reduction, vectorizable_live_operation): Update calls
13251         to vect_get_vec_def_for_stmt_copy.
13253 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13255         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
13256         and gimple stmt arguments with a stmt_vec_info.
13257         (vect_record_base_alignments): Update calls accordingly.
13258         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
13259         and gimple stmt arguments with a stmt_vec_info.
13260         (vect_build_slp_tree_1): Remove vinfo argument and update call
13261         to vect_record_max_nunits.
13262         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
13263         and vect_record_max_nunits.
13265 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13267         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
13268         file and take a stmt_vec_info instead of a gimple stmt.
13269         (supportable_widening_operation, vect_finish_replace_stmt)
13270         (vect_finish_stmt_generation, vect_get_store_rhs)
13271         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
13272         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
13273         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
13274         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
13275         (vect_create_data_ref_ptr, bump_vector_ptr)
13276         (vect_permute_store_chain, vect_setup_realignment)
13277         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
13278         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
13279         (vectorizable_reduction, vectorizable_induction)
13280         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
13281         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
13282         than gimple stmts as arguments.
13283         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
13284         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
13285         (can_group_stmts_p, vect_check_gather_scatter)
13286         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
13287         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
13288         (vect_permute_load_chain, vect_shift_permute_load_chain)
13289         (vect_transform_grouped_load)
13290         (vect_record_grouped_load_vectors): Likewise.
13291         * tree-vect-loop.c (vect_fixup_reduc_chain)
13292         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
13293         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
13294         (vectorizable_reduction, vectorizable_induction)
13295         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
13296         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
13297         (vect_get_load_store_mask): Likewise.
13298         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
13299         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
13300         * tree-vect-stmts.c (vect_mark_relevant)
13301         (is_simple_and_all_uses_invariant)
13302         (exist_non_indexing_operands_for_use_p, process_use)
13303         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
13304         (vect_get_vec_def_for_operand, vect_get_vec_defs)
13305         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
13306         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
13307         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
13308         (get_negative_load_store_type, get_load_store_type)
13309         (vect_check_load_store_mask, vect_check_store_rhs)
13310         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
13311         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
13312         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
13313         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
13314         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
13315         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
13316         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
13317         (supportable_widening_operation): Likewise.
13319 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13321         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
13322         a stmt_vec_info instead of a gcall.
13323         (vect_check_gather_scatter): Update call accordingly.
13324         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
13325         of a gphi.
13326         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
13327         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
13328         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
13329         instead of a gimple stmt.
13330         (vect_transform_loop): Update calls accordingly.
13331         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
13332         stmt_vec_infos instead of gimple stmts.
13333         (vect_analyze_slp_instance): Update use accordingly.
13334         * tree-vect-stmts.c (read_vector_array, write_vector_array)
13335         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
13336         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
13337         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
13338         (vect_gen_widened_results_half, vect_get_loop_based_defs)
13339         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
13340         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
13341         down to subroutines.
13343 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13345         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
13346         of the worklist from a vector of gimple stmts to a vector of
13347         stmt_vec_infos.
13348         * tree-vect-stmts.c (vect_mark_relevant, process_use)
13349         (vect_mark_stmts_to_be_vectorized): Likewise
13351 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13353         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
13354         statement before passing it to vect_analyze_stmt.
13355         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
13356         the chain of phi vector definitions.  Track the exit phi via its
13357         stmt_vec_info.
13358         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
13359         STMT_VINFO_REDUC_DEF.
13360         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
13361         stmt_vec_infos to handle the statement chains.
13362         (vect_get_slp_defs): Record the first statement in the node
13363         using a stmt_vec_info.
13364         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
13365         statements here and pass their stmt_vec_info down to subroutines.
13366         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
13367         down to vect_finish_stmt_generation.
13368         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
13369         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
13370         stmt_vec_infos to subroutines.
13371         (vect_remove_stores): Use stmt_vec_infos to handle the statement
13372         chains.
13374 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13376         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
13377         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
13378         (vect_permute_store_chain, vect_setup_realignment)
13379         (vect_permute_load_chain, vect_shift_permute_load_chain)
13380         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
13381         stmts internally, and when passing values to other vectorizer routines.
13382         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
13383         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
13384         (vect_analyze_loop_operations, get_initial_def_for_reduction)
13385         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
13386         (vectorizable_reduction, vectorizable_induction)
13387         (vectorizable_live_operation, vect_transform_loop_stmt)
13388         (vect_transform_loop): Likewise.
13389         * tree-vect-patterns.c (vect_reassociating_reduction_p)
13390         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
13391         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
13392         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
13393         (vect_slp_analyze_node_operations_1): Likewise.
13394         * tree-vect-stmts.c (vect_mark_relevant, process_use)
13395         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
13396         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
13397         (vect_finish_stmt_generation_1, get_group_load_store_type)
13398         (get_load_store_type, vect_build_gather_load_calls)
13399         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
13400         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
13401         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
13402         (vectorizable_store, vectorizable_load, vectorizable_condition)
13403         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
13404         (supportable_widening_operation): Likewise.
13405         (vect_get_vector_types_for_stmt): Likewise.
13406         * tree-vectorizer.h (vect_dr_behavior): Likewise.
13408 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13410         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
13411         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
13412         (vect_permute_store_chain, vect_permute_load_chain)
13413         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
13414         repeated stmt_vec_info lookups.
13415         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
13416         (vect_update_ivs_after_vectorizer): Likewise.
13417         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
13418         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
13419         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
13420         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
13421         (vect_bb_slp_scalar_cost): Likewise.
13422         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
13424 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13426         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
13427         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
13428         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
13429         to get gassigns and gcalls, rather than operating on generc gimple
13430         stmts.
13431         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
13432         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
13433         (vectorizable_load, vect_analyze_stmt): Likewise.
13434         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
13436 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13438         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
13439         return stmt_vec_infos rather than gimple stmts.  Do not accept
13440         null arguments.
13441         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
13442         of a gimple stmt.
13443         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
13444         Update use of get_later_stmt.
13445         (vect_get_constant_vectors): Update call accordingly.
13446         (vect_schedule_slp_instance): Likewise
13447         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
13448         (vect_slp_analyze_instance_dependence): Likewise.
13449         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
13451 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13453         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
13454         (stmt_info_for_cost::stmt_info): ...this new field.
13455         (add_stmt_costs): Update accordingly.
13456         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
13457         (vect_get_known_peeling_cost): Likewise.
13458         (vect_estimate_min_profitable_iters): Likewise.
13459         * tree-vect-stmts.c (record_stmt_cost): Likewise.
13461 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13463         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
13464         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
13465         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
13466         accordingly.
13467         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
13469 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13471         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
13472         a gimple stmt to a stmt_vec_info.
13473         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
13475 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13477         * tree-vectorizer.h (vec_info::grouped_stores): Change from
13478         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
13479         (_loop_vec_info::reduction_chains): Likewise.
13480         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
13481         accordingly.
13482         * tree-vect-slp.c (vect_analyze_slp): Likewise.
13484 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13486         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
13487         a gimple stmt to a stmt_vec_info.
13488         (_stmt_vec_info::next_element): Likewise.
13489         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
13490         (vect_slp_analyze_and_verify_node_alignment)
13491         (vect_analyze_group_access_1, vect_analyze_group_access)
13492         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
13493         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
13494         (vect_supportable_dr_alignment): Update accordingly.
13495         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
13496         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
13497         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
13498         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
13499         * tree-vect-slp.c (vect_build_slp_tree_1)
13500         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
13501         (vect_split_slp_store_group, vect_analyze_slp_instance)
13502         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
13503         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
13504         (get_group_load_store_type, get_load_store_type)
13505         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
13506         (vect_transform_stmt, vect_remove_stores): Likewise.
13508 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13510         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
13511         than a gimple stmt.
13512         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
13513         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
13514         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
13515         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
13516         (vector_alignment_reachable_p, vect_get_data_access_cost)
13517         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
13518         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
13519         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
13520         (vect_analyze_group_access_1, vect_analyze_group_access)
13521         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
13522         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
13523         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
13524         result of vect_dr_stmt and use the stmt_vec_info instead of
13525         the associated gimple stmt.
13526         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
13527         (vect_gen_prolog_loop_niters): Likewise.
13528         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
13530 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13532         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
13533         to a vec<stmt_vec_info>.
13534         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
13535         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
13536         vec<stmt_vec_info>.
13537         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
13538         to a vec<stmt_vec_info>.
13539         (bst_traits::value_type, bst_traits::value_type): Likewise.
13540         (bst_traits::hash): Update accordingly.
13541         (vect_get_and_check_slp_defs): Change the stmts parameter from
13542         a vec<gimple *> to a vec<stmt_vec_info>.
13543         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
13544         (vect_build_slp_tree): Likewise.
13545         (vect_build_slp_tree_2): Likewise.  Update uses of
13546         SLP_TREE_SCALAR_STMTS.
13547         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
13548         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
13549         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
13550         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
13551         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
13552         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
13553         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
13554         (vect_get_constant_vectors, vect_get_slp_defs)
13555         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
13556         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
13557         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
13558         instead of gimple stmts.
13559         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
13560         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
13561         (vect_slp_analyze_instance_dependence): Update uses of
13562         SLP_TREE_SCALAR_STMTS.
13563         (vect_slp_analyze_and_verify_node_alignment): Likewise.
13564         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
13565         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
13566         (get_initial_defs_for_reduction): Likewise.
13567         (vect_create_epilog_for_reduction): Likewise.
13568         (vectorize_fold_left_reduction): Likewise.
13569         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
13570         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
13571         (can_vectorize_live_stmts): Likewise.
13573 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13575         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
13576         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
13577         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
13578         than gimple stmts.
13579         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
13580         of a gimple stmt.
13581         (gather_scalar_reductions): Update after above interface changes.
13582         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
13583         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
13584         than gimple stmts.
13585         (vect_force_simple_reduction): Likewise.
13586         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
13587         LOOP_VINFO_REDUCTIONS.
13588         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
13590 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13592         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
13593         a gimple stmt to a stmt_vec_info.
13594         * tree-vect-loop.c (vect_active_double_reduction_p)
13595         (vect_force_simple_reduction, vectorizable_reduction): Update
13596         accordingly.
13598 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13600         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
13601         vec<gimple *> to a vec<stmt_vec_info>.
13602         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
13603         the reduction_phis argument from a vec<gimple *> to a
13604         vec<stmt_vec_info>.
13605         (vectorizable_reduction): Likewise the phis local variable that
13606         is passed to vect_create_epilog_for_reduction.  Update for new type
13607         of SLP_TREE_VEC_STMTS.
13608         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
13609         (vectorizable_live_operation): Likewise.
13610         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
13611         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
13613 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13615         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
13616         a gimple stmt to a stmt_vec_info.
13617         (vectorizable_condition, vectorizable_live_operation)
13618         (vectorizable_reduction, vectorizable_induction): Pass back the
13619         vectorized statement as a stmt_vec_info.
13620         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
13621         use of STMT_VINFO_VEC_STMT.
13622         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
13623         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
13624         as stmt_vec_infos rather than gimple stmts.
13625         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
13626         to a stmt_vec_info.
13627         (vectorizable_live_operation): Likewise.
13628         (vectorizable_reduction, vectorizable_induction): Likewise,
13629         updating use of STMT_VINFO_VEC_STMT.
13630         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
13631         of STMT_VINFO_VEC_STMT.
13632         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
13633         (vectorizable_simd_clone_call, vectorizable_conversion)
13634         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
13635         (vectorizable_store, vectorizable_load, vectorizable_condition)
13636         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
13637         from a gimple stmt to a stmt_vec_info.
13638         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
13639         pointer to a stmt_vec_info to the vectorizable_* routines.
13641 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13643         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
13644         a gimple stmt to a stmt_vec_info.
13645         (is_pattern_stmt_p): Update accordingly.
13646         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
13647         (vect_record_grouped_load_vectors): Likewise.
13648         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
13649         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
13650         (vect_model_reduction_cost): Likewise.
13651         (vect_create_epilog_for_reduction): Likewise.
13652         (vectorizable_reduction, vectorizable_induction): Likewise.
13653         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
13654         Return the stmt_vec_info for the pattern statement.
13655         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
13656         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
13657         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
13658         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
13659         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
13660         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
13661         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
13662         (free_stmt_vec_info, vect_is_simple_use): Likewise.
13664 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13666         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
13667         (vect_finish_stmt_generation): Likewise.
13668         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
13669         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
13670         (vect_build_gather_load_calls): Use the return value of the above
13671         functions instead of a separate call to vinfo_for_stmt.  Use narrow
13672         scopes for the input gimple stmt and wider scopes for the associated
13673         stmt_vec_info.  Use vec_info::lookup_def when setting these
13674         stmt_vec_infos from an SSA_NAME definition.
13675         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
13676         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
13677         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
13678         (vectorizable_store, vectorizable_load, vectorizable_condition)
13679         (vectorizable_comparison): Likewise.
13680         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
13681         (vectorizable_reduction): Likewise.
13683 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13685         * tree-vectorizer.h (vect_is_simple_use): Add an optional
13686         stmt_vec_info * parameter before the optional gimple **.
13687         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
13688         (process_use, vect_get_vec_def_for_operand_1): Update callers.
13689         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
13690         * tree-vect-loop.c (vectorizable_reduction): Likewise.
13691         (vectorizable_live_operation): Likewise.
13692         * tree-vect-patterns.c (type_conversion_p): Likewise.
13693         (vect_look_through_possible_promotion): Likewise.
13694         (vect_recog_rotate_pattern): Likewise.
13695         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
13697 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13699         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
13700         a typedef to a wrapper class.
13701         (NULL_STMT_VEC_INFO): New macro.
13702         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
13703         (stmt_vec_info::operator*): New function.
13704         (stmt_vec_info::operator gimple *): Likewise.
13705         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
13706         (add_stmt_costs): Likewise.
13707         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
13708         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
13709         (vect_get_known_peeling_cost): Likewise.
13710         (vect_estimate_min_profitable_iters): Likewise.
13711         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
13712         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
13713         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
13714         (vectorizable_store, free_stmt_vec_infos): Likewise.
13715         (new_stmt_vec_info): Change return type of xcalloc to
13716         _stmt_vec_info *.
13718 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13720         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
13721         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
13722         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
13723         a single_imm_use-based sequence.
13724         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
13726 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13728         * tree-vectorizer.h (vec_info::lookup_def): Declare.
13729         * tree-vectorizer.c (vec_info::lookup_def): New function.
13730         * tree-vect-patterns.c (vect_get_internal_def): Use it.
13731         (vect_widened_op_tree): Likewise.
13732         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
13733         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
13734         (vectorizable_reduction): Likewise.
13735         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
13736         of a gimple *.
13737         (vect_is_slp_reduction): Update calls accordingly.  Use
13738         vec_info::lookup_def.
13739         (vect_is_simple_reduction): Likewise
13740         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
13742 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13744         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
13745         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
13746         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
13747         of vinfo_for_stmt.
13748         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
13749         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
13750         (vect_update_vf_for_slp, vect_analyze_loop_operations)
13751         (vect_is_slp_reduction, vectorizable_induction)
13752         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
13753         * tree-vect-patterns.c (vect_init_pattern_stmt):
13754         (vect_determine_min_output_precision_1, vect_determine_precisions)
13755         (vect_pattern_recog): Likewise.
13756         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
13757         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
13758         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
13759         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
13760         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
13761         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
13762         info field from a loop to a loop_vec_info.
13764 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13766         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
13767         (vec_info::add_stmt): Declare.
13768         * tree-vectorizer.c (vec_info::add_stmt): New function.
13769         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
13770         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
13771         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
13772         (vectorizable_induction): Likewise.
13773         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
13774         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
13775         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
13776         (vectorizable_load): Likewise.
13777         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
13778         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
13779         (vect_recog_gather_scatter_pattern): Likewise.
13780         (append_pattern_def_seq): Likewise.  Remove a check that is
13781         performed by add_stmt itself.
13783 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13785         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
13786         which make_ssa_name was called with new_stmt before new_stmt
13787         had been created.
13789 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13791         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
13792         split out from...
13793         (vect_is_slp_reduction): ...here...
13794         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
13795         that are already known to be false.
13797 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13799         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
13800         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
13801         STMT_VINFO_NUM_SLP_USES when it's true.
13802         (vect_free_slp_instance): Add a final_p parameter and pass it to
13803         vect_free_slp_tree.
13804         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
13805         (vect_analyze_slp_instance): Likewise.
13806         (vect_slp_analyze_operations): Likewise.
13807         (vect_slp_analyze_bb_1): Likewise.
13808         * tree-vectorizer.c (vec_info): Likewise.
13809         * tree-vect-loop.c (vect_transform_loop): Likewise.
13811 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13813         * tree-vect-loop.c (vectorizable_reduction): Assert that the
13814         function is not called for second and subsequent members of
13815         a reduction group.
13817 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13819         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
13820         cases for nested loops from here to ...
13821         (vect_create_epilog_for_reduction): ...here.  Only call
13822         vect_is_simple_use for inner-loop reductions.
13824 2018-07-31  Martin Liska  <mliska@suse.cz>
13826         PR gcov-profile/85338
13827         PR gcov-profile/85350
13828         PR gcov-profile/85372
13829         * profile.c (struct location_triplet): New.
13830         (struct location_triplet_hash): Likewise.
13831         (output_location): Do not output a BB that
13832         is already recorded for a line.
13833         (branch_prob): Use streamed_locations.
13835 2018-07-31  Martin Liska  <mliska@suse.cz>
13837         PR gcov-profile/85370
13838         * coverage.c (coverage_begin_function): Do not mark target
13839         clones as artificial functions.
13841 2018-07-31  Martin Liska  <mliska@suse.cz>
13843         PR gcov-profile/83813
13844         PR gcov-profile/84758
13845         PR gcov-profile/85217
13846         PR gcov-profile/85332
13847         * profile.c (branch_prob): Do not record GOTO expressions
13848         for GIMPLE statements which locations are already streamed.
13850 2018-07-31  Olivier Hainque  <hainque@adacore.com>
13852         * gcc.c (handle_spec_function): Accept a soft_matched_part
13853         argument, as do_spec_1.  Pass it down to ...
13854         (eval_spec_function): Accept a soft_matched_part argument,
13855         and pass it down to ...
13856         (do_spec_2): Accept a soft_matched_part argument, and pass
13857         it down to do_spec_1.
13858         (do_spec_1): Pass soft_matched_part to handle_spec_function.
13859         (handle_braces): Update call to handle_spec_function.
13860         (driver::set_up_specs): Update calls to do_spec_2.
13861         (compare_debug_dump_opt_spec_function): Likewise.
13862         (compare_debug_self_opt_spec_function): Likewise.
13864 2018-07-31  Olivier Hainque  <hainque@adacore.com>
13866         * common.opt (nolibc): New option.
13867         * doc/invoke.texi (Link Options): Document it.
13868         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
13869         * config/alpha/linux.h: Likewise.
13870         * config/arc/elf.h: Likewise.
13871         * config/arm/uclinux-elf.h: Likewise.
13872         * config/arm/unknown-elf.h: Likewise.
13873         * config/avr/avrlibc.h: Likewise.
13874         * config/bfin/bfin.h: Likewise.
13875         * config/bfin/linux.h: Likewise.
13876         * config/bfin/uclinux.h: Likewise.
13877         * config/darwin.h: Likewise.
13878         * config/darwin10.h: Likewise.
13879         * config/darwin12.h: Likewise.
13880         * config/gnu-user.h: Likewise.
13881         * config/lm32/uclinux-elf.h: Likewise.
13882         * config/pa/pa-hpux11.h: Likewise.
13883         * config/pa/pa64-hpux.h: Likewise.
13884         * config/sparc/sparc.h: Likewise.
13886 2018-07-31  Olivier Hainque  <hainque@adacore.com>
13888         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
13889         undefined variables.
13891 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
13893         PR target/86640
13894         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
13895         instead of GEN_INT.
13897 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
13899         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
13900         terminated string literal.
13902 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
13904         PR rtl-optimization/85160
13905         * combine.c (is_just_move): New function.
13906         (try_combine): Allow combining two instructions into two if neither of
13907         the original instructions was a move.
13909 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
13911         PR target/86673
13912         * doc/extend.texi (Global Register Variables): Discourage use of type
13913         qualifiers.
13914         (Local Register Variables): Likewise.
13916 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
13918         PR tree-optimization/86506
13919         * hwint.h (ceil_log2): Resync with hwint.c implementation.
13921 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
13923         PR target/86547
13924         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
13925         hard_regno, make sure no insn between `from` and `to` clobbers it.
13927 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
13928             Tom de Vries  <tdevries@suse.de>
13930         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
13931         (PTX_DEFAULT_RUNTIME_DIM): ... this.
13932         (nvptx_goacc_validate_dims): Set default worker and gang dims to
13933         PTX_DEFAULT_RUNTIME_DIM.
13934         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
13936 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
13938         * config/pa/pa.c (pa_output_addr_vec): Align address table.
13939         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
13940         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
13942 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
13944         * config/rs6000/constraints.md (wG constraint): Delete, no longer
13945         used.
13946         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
13947         predicate to reflect toc fusion has been deleted.
13948         (toc_fusion_mem_raw): Delete, no longer used.
13949         (toc_fusion_mem_wrapped): Likewise.
13950         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
13951         fusion mask bit.
13952         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
13953         Delete, no longer used.
13954         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
13955         meant to be used for toc fusion.
13956         (rs6000_debug_print_mode): Delete toc fusion debugging.
13957         (rs6000_debug_reg_global): Likewise.
13958         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
13959         fusion and secondary reload support that were never used.
13960         (rs6000_option_override_internal): Delete TOC fusion, that was only
13961         partially defined, and it did not work unless you also used the
13962         -mcmodel= switch.
13963         (rs6000_legitimate_address_p): Delete TOC fusion support.
13964         (rs6000_opt_masks): Likewise.
13965         (fusion_wrap_memory_address): Delete function, no longer used.
13966         (fusion_split_address); Delete TOC fusion support.
13967         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
13968         longer used with toc fusion being deleted.
13969         (TARGET_TOC_FUSION_FP): Likewise.
13970         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
13971         UNSPEC.
13972         (toc fusion spliter): Delete TOC fusion support.
13973         (toc_fusionload_<mode>): Likewise.
13974         (toc_fusionload_di): Likewise.
13975         (fusion_gpr_load_<mode>): Delete generator function, this insn no
13976         longer needs to be named.  Rename predicate to delete TOC fusion.
13977         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
13978         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
13979         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
13980         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
13981         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
13983 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13985         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
13986         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
13987         __int128 in built-in function prototypes.
13988         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
13989         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
13991 2018-07-27  Martin Sebor  <msebor@redhat.com>
13993         PR tree-optimization/86696
13994         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
13995         types, including enums.
13996         (handle_char_store): Be prepared for the above function to fail.
13998 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
14000         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
14001         when optimization level is lower than 2 or optimize for size.
14003 2018-07-26  Martin Sebor  <msebor@redhat.com>
14005         PR tree-optimization/86043
14006         PR tree-optimization/86042
14007         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
14008         (get_string_cst_length): Rename...
14009         (get_min_string_length): ...to this.  Add argument.
14010         (handle_char_store): Extend to handle multi-character stores by
14011         MEM_REF.
14012         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
14013         * tree.h (initializer_zerop): Add argument.
14015 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
14017         PR middle-end/86660
14018         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
14019         declare target to variables if they have always,{to,from,tofrom} map
14020         kinds.
14022 2018-07-26  Martin Liska  <mliska@suse.cz>
14024         PR lto/86548
14025         * lto-wrapper.c: Add linker_output as prefix
14026         for ltrans_output_file.
14028 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
14030         PR rtl-optimization/85805
14031         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
14032         value for hard registers if that was written in the same mode.
14034 2018-07-26  Martin Liska  <mliska@suse.cz>
14036         PR gcov-profile/86536
14037         * gcov.c (format_gcov): Use printf format %.*f directly
14038         and do not handle special values.
14040 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
14042         * common/config/arc/arc-common.c (arc_option_optimization_table):
14043         Update default optimizations for size.
14045 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
14047         * config/arc/arc.md (movsf_insn): Add short instruction selection.
14048         * config/arc/constraints.md (CfZ): New constraint.
14049         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
14050         (subsf3_fpu): Likewise.
14051         (cmpsf_fpu): Likewise.
14052         (cmpsf_fpu_uneq): Likewise.
14054 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
14056         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
14057         accesses as well.
14058         (arc_is_uncached_mem_p): uncached applies to both the variable and
14059         the pointer.
14061 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
14063         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
14064         register names.
14066 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
14068         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
14069         field "m_scopes" from vec to auto_vec.
14071 2018-07-25  Martin Liska  <mliska@suse.cz>
14073         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
14074         return type.
14076 2018-07-25  Richard Biener  <rguenther@suse.de>
14078         PR debug/86654
14079         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
14080         special wrt context_die late.
14081         (gen_subprogram_die): Re-use DIEs in local scope.
14083 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
14085         PR tree-optimization/86644
14086         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
14088 2018-07-25  Martin Liska  <mliska@suse.cz>
14090         PR middle-end/86645
14091         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
14092         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
14094 2018-07-25  Martin Liska  <mliska@suse.cz>
14096         PR sanitizer/79635
14097         * params.def: Explain ASan abbreviation and provide
14098         a documentation link.
14100 2018-07-24  Martin Sebor  <msebor@redhat.com>
14102         PR tree-optimization/86622
14103         PR tree-optimization/86532
14104         * builtins.h (string_length): Declare.
14105         * builtins.c (c_strlen): Correct handling of non-constant offsets.
14106         (check_access): Be prepared for non-constant length ranges.
14107         (string_length): Make extern.
14108         * expr.c (string_constant): Only handle the minor non-constant
14109         array index.  Use string_constant to compute the length of
14110         a generic string constant.
14112 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
14114         PR tree-optimization/86618
14115         * tree-vect-stmts.c (vectorizable_call): Don't take the address
14116         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
14118 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
14120         PR tree-optimization/86636
14121         * json.cc (json::object::set): Fix comment.  Add assertions.
14122         (json::array::append): Move here from json.h.  Add comment and an
14123         assertion.
14124         (json::string::string): Likewise.
14125         * json.h (json::array::append): Move to json.cc.
14126         (json::string::string): Likewise.
14127         * optinfo-emit-json.cc
14128         (optrecord_json_writer::impl_location_to_json): Assert that we
14129         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
14130         wrapper around it.  Expand the location once, rather than three
14131         times.
14132         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
14133         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
14134         wrappers.
14135         (optrecord_json_writer::optinfo_to_json): Likewise, in four
14136         places.  Fix some overlong lines.
14138 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
14140         * config/aarch64/aarch64-simd.md
14141         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
14142         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
14143         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
14144         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
14145         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
14146         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
14147         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
14148         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
14149         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
14151 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
14153         PR middle-end/86627
14154         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
14155         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
14156         and abs_d == d, do the power of two handling if profitable.
14158 2018-07-24  Richard Biener  <rguenther@suse.de>
14160         * match.pd: Add BIT_FIELD_REF canonicalizations.
14162 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
14164         PR c/86617
14165         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
14167 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
14169         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
14170         terminated STRING_CST object.
14172 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
14174         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
14176 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
14178         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
14179         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
14180         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
14181         the elements into a register.
14182         (rs6000_split_v4si_init_di_reg): Delete.
14183         (rs6000_split_v4si_init): Delete.
14184         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
14185         (vsx_init_v4si): Rewrite as a define_expand.
14187 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
14189         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
14190         zero_extend argument from memory): New.
14192 2018-07-22  Martin Sebor  <msebor@redhat.com>
14194         PR bootstrap/86621
14195         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
14196         diagnosing calls with unknown arguments unless -Walloca-larger-than
14197         is restricted to less than PTRDIFF_MAX bytes.
14199 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
14201         * doc/gcov.texi (Invoking Gcov): Editorial changes.
14203 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
14205         * pretty-print.c (text_info::set_location): Remove redundant
14206         "line_table" parameter from call to rich_location::set_range.
14208 2018-07-20  Martin Sebor  <msebor@redhat.com>
14210         PR middle-end/82063
14211         * builtins.c (expand_builtin_alloca): Adjust.
14212         * calls.c (alloc_max_size): Simplify.
14213         * cgraphunit.c (cgraph_node::expand): Adjust.
14214         * common.opt (larger_than_size, warn_frame_larger_than): Remove
14215         variables.
14216         (frame_larger_than_size): Same.
14217         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
14218         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
14219         Initialize.
14220         * doc/invoke.texi (GCC Command Options): Document option arguments.
14221         Explain byte-size arguments and suffixes.
14222         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
14223         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
14224         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
14225         * doc/options.texi (UInteger): Expand.
14226         (Host_Wide_Int, ByteSize): Document new properties.
14227         * final.c (final_start_function_1): Include sizes in an error message.
14228         * function.c (frame_offset_overflow): Same.
14229         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
14230         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
14231         Diagnose unbounded alloca calls only for limits of less than
14232         PTRDIFF_MAX.
14233         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
14234         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
14235         for alloca(0).
14236         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
14237         only for limits of less than PTRDIFF_MAX.
14238         * langhooks-def.h (lhd_handle_option): Change function argument
14239         to HOST_WIDE_INT.
14240         * langhooks.c (lhd_handle_option): Same.
14241         * langhooks.h (handle_option): Same.
14242         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
14243         ByteSize flags.
14244         (var_type, var_type_struct): Same.
14245         (var_set): Handle ByteSize flag.
14246         * optc-gen.awk: Add comments to output to ease debugging.  Make
14247         use of HOST_WIDE_INT where appropriate.
14248         * opts-gen-save.awk:  Use %lx to format unsigned long.
14249         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
14250         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
14251         arguments.  Parse bytes-size suffixes.
14252         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
14253         (enum_value_to_arg): Same.
14254         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
14255         (handle_option): Adjust.
14256         (generate_option): Change function argument to HOST_WIDE_INT.
14257         (cmdline_handle_error): Adjust.
14258         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
14259         (set_option): Change function argument to HOST_WIDE_INT.
14260         (option_enabled): Handle cl_host_wide_int.
14261         (get_option_state): Handle CLVC_SIZE.
14262         (control_warning_option): Same.
14263         * opts.c (common_handle_option): Change function argument to
14264         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
14265         OPT_Wvla_larger_than_.
14266         * opts.h (enum cl_var_type): Add an enumerator.
14267         * stor-layout.c (layout_decl): Print a more meaningful warning.
14268         * toplev.c (output_stack_usage): Adjust.
14270 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
14272         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
14273         call to inline_expand_builtin_string_cmp.
14274         (expand_builtin_strcmp): Likewise.
14275         (expand_builtin_strncmp): Likewise.
14276         (inline_string_cmp): Delete the last parameter, change char_type_node
14277         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
14278         two operands.
14279         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
14280         the inlining expansion on target where the type of the call has same or
14281         narrower precision than unsigned char.
14283 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
14285         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
14286         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
14287         * common.opt (fsave-optimization-record): New option.
14288         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
14289         * doc/invoke.texi (-fsave-optimization-record): New option.
14290         * dumpfile.c: Include "optinfo-emit-json.h".
14291         (struct kv_pair): Move to coretypes.h.
14292         (optgroup_options): Make non-static.
14293         (dump_context::end_scope): Call
14294         optimization_records_maybe_pop_dump_scope.
14295         * dumpfile.h (optgroup_options): New decl.
14296         * json.cc: New file.
14297         * json.h: New file.
14298         * optinfo-emit-json.cc: New file.
14299         * optinfo-emit-json.h: New file.
14300         * optinfo.cc: Include "optinfo-emit-json.h".
14301         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
14302         (optinfo_enabled_p): Check optimization_records_enabled_p.
14303         (optinfo_wants_inlining_info_p): Likewise.
14304         * optinfo.h: Update comment.
14305         * profile-count.c (profile_quality_as_string): New function.
14306         * profile-count.h (profile_quality_as_string): New decl.
14307         (profile_count::quality): New accessor.
14308         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
14309         and optinfo_emit_json_cc_tests.
14310         * selftest.h (selftest::json_cc_tests): New decl.
14311         (selftest::optinfo_emit_json_cc_tests): New decl.
14312         * toplev.c: Include "optinfo-emit-json.h".
14313         (compile_file): Call optimization_records_finish.
14314         (do_compile): Call optimization_records_start.
14315         * tree-ssa-live.c: Include optinfo.h.
14316         (remove_unused_scope_block_p): Retain inlining information if
14317         optinfo_wants_inlining_info_p returns true.
14319 2018-07-20  Richard Biener  <rguenther@suse.de>
14321         PR debug/86585
14322         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
14323         to cover -flto-partition=none.
14325 2018-07-20  Martin Liska  <mliska@suse.cz>
14327         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
14328         (get_decl_source_range): Remove unused function.
14330 2018-07-20  Richard Biener  <rguenther@suse.de>
14332         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
14333         (struct vn_phi_s): Likewise.
14334         (struct vn_reference_s): Likewise.
14335         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
14336         for searching the slot of an entry known to be in the hash itself.
14337         (vn_phi_hasher::equal): Likewise.
14338         (vn_reference_hasher::equal): Likewise.
14339         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
14340         globals.
14341         (optimistic_info, current_info): Remove, keeping only valid_info.
14342         (vn_reference_lookup_1): Remove fallback lookup.
14343         (vn_reference_lookup_2): Likewise.
14344         (vn_nary_op_lookup_1): Likewise.
14345         (vn_phi_lookup): Likewise.
14346         (vn_nary_build_or_lookup_1): Make sure to not chain the built
14347         hash element.
14348         (vn_reference_insert): Adjust, chain the inserted hash element
14349         at last_inserted_ref.
14350         (vn_reference_insert_pieces): Likewise.
14351         (visit_reference_op_call): Likewise.
14352         (vn_nary_op_insert_into): Chain the inserted hash element at
14353         last_inserted_nary.
14354         (vn_nary_op_insert_pieces): Adjust.
14355         (vn_nary_op_insert): Likewise.
14356         (vn_nary_op_insert_stmt): Likewise.
14357         (vn_phi_insert): Adjust, chain the inserted hash element at
14358         last_inserted_phi.
14359         (process_scc): Remove clearing and copying the optimistic
14360         table.  Instead remove elements inserted during an optimistic
14361         iteration from the single table we maintain.
14362         (init_scc_vn): Adjust.
14363         (free_scc_vn): Likewise.
14364         (sccvn_dom_walker::record_cond): Likewise.
14365         (sccvn_dom_walker::after_dom_children): Likewise.
14367 2018-07-19  Martin Sebor  <msebor@redhat.com>
14369         PR tree-optimization/84047
14370         PR tree-optimization/83776
14371         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
14372         (check_array_bounds): Call it.
14374 2018-07-19  Martin Sebor  <msebor@redhat.com>
14376         * align.h (align_flags): Use member initialization.
14378 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
14380         * Makefile.in (OBJS): Add optinfo.o.
14381         * coretypes.h (class symtab_node): New forward decl.
14382         (struct cgraph_node): New forward decl.
14383         (class varpool_node): New forward decl.
14384         * dump-context.h: New file.
14385         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
14386         "tree-pass.h".
14387         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
14388         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
14389         (set_alt_dump_file): Likewise.
14390         (dump_context::~dump_context): New dtor.
14391         (dump_gimple_stmt): Move implementation to...
14392         (dump_context::dump_gimple_stmt): ...this new member function.
14393         Add the stmt to any pending optinfo, creating one if need be.
14394         (dump_gimple_stmt_loc): Move implementation to...
14395         (dump_context::dump_gimple_stmt_loc): ...this new member function.
14396         Start a new optinfo and add the stmt to it.
14397         (dump_gimple_expr): Move implementation to...
14398         (dump_context::dump_gimple_expr): ...this new member function.
14399         Add the stmt to any pending optinfo, creating one if need be.
14400         (dump_gimple_expr_loc): Move implementation to...
14401         (dump_context::dump_gimple_expr_loc): ...this new member function.
14402         Start a new optinfo and add the stmt to it.
14403         (dump_generic_expr): Move implementation to...
14404         (dump_context::dump_generic_expr): ...this new member function.
14405         Add the tree to any pending optinfo, creating one if need be.
14406         (dump_generic_expr_loc): Move implementation to...
14407         (dump_context::dump_generic_expr_loc): ...this new member
14408         function.  Add the tree to any pending optinfo, creating one if
14409         need be.
14410         (dump_printf): Move implementation to...
14411         (dump_context::dump_printf_va): ...this new member function.  Add
14412         the text to any pending optinfo, creating one if need be.
14413         (dump_printf_loc): Move implementation to...
14414         (dump_context::dump_printf_loc_va): ...this new member function.
14415         Start a new optinfo and add the stmt to it.
14416         (dump_dec): Move implementation to...
14417         (dump_context::dump_dec): ...this new member function.  Add the
14418         value to any pending optinfo, creating one if need be.
14419         (dump_context::dump_symtab_node): New member function.
14420         (dump_context::get_scope_depth): New member function.
14421         (dump_context::begin_scope): New member function.
14422         (dump_context::end_scope): New member function.
14423         (dump_context::ensure_pending_optinfo): New member function.
14424         (dump_context::begin_next_optinfo): New member function.
14425         (dump_context::end_any_optinfo): New member function.
14426         (dump_context::s_current): New global.
14427         (dump_context::s_default): New global.
14428         (dump_scope_depth): Delete global.
14429         (dumpfile_ensure_any_optinfo_are_flushed): New function.
14430         (dump_symtab_node): New function.
14431         (get_dump_scope_depth): Reimplement in terms of dump_context.
14432         (dump_begin_scope): Likewise.
14433         (dump_end_scope): Likewise.
14434         (selftest::temp_dump_context::temp_dump_context): New ctor.
14435         (selftest::temp_dump_context::~temp_dump_context): New dtor.
14436         (selftest::verify_item): New function.
14437         (ASSERT_IS_TEXT): New macro.
14438         (ASSERT_IS_TREE): New macro.
14439         (ASSERT_IS_GIMPLE): New macro.
14440         (selftest::test_capture_of_dump_calls): New test.
14441         (selftest::dumpfile_c_tests): Call it.
14442         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
14443         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
14444         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
14445         descriptive comment.
14446         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
14447         (dump_node, dump_bb): Move these unrelated decls.
14448         (class dump_manager): Add leading comment.
14449         * optinfo.cc: New file.
14450         * optinfo.h: New file.
14452 2018-07-19  Michael Collison  <michael.collison@arm.com>
14453             Richard Henderson <rth@redhat.com>
14455         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
14456         (subti): Handle op1 zero.
14457         (subvti4, usub4ti4): New.
14458         (*sub<GPI>3_compare1_imm): New.
14459         (sub<GPI>3_carryinCV): New.
14460         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
14461         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
14463 2018-07-19  Michael Collison  <michael.collison@arm.com>
14464             Richard Henderson <rth@redhat.com>
14466         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
14467         (addti3): Create simpler code if low part is already known to be 0.
14468         (addvti4, uaddvti4): New.
14469         (*add<GPI>3_compareC_cconly_imm): New.
14470         (*add<GPI>3_compareC_cconly): New.
14471         (*add<GPI>3_compareC_imm): New.
14472         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
14473         handle constants within this pattern..
14474         (*add<GPI>3_compareV_cconly_imm): New.
14475         (*add<GPI>3_compareV_cconly): New.
14476         (*add<GPI>3_compareV_imm): New.
14477         (add<GPI>3_compareV): New.
14478         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
14479         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
14480         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
14481         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
14482         with 'comparison' operator.
14483         (*add<GPI>3_compareV_cconly_imm): Ditto.
14484         (*add<GPI>3_compareV_cconly): Ditto.
14485         (*add<GPI>3_compareV_imm): Ditto.
14486         (add<GPI>3_compareV): Ditto.
14487         (add<mode>3_carryinC): Ditto.
14488         (*add<mode>3_carryinC_zero): Ditto.
14489         (*add<mode>3_carryinC): Ditto.
14490         (add<mode>3_carryinV): Ditto.
14491         (*add<mode>3_carryinV_zero): Ditto.
14492         (*add<mode>3_carryinV): Ditto.
14494 2018-07-19  Michael Collison  <michael.collison@arm.com>
14495             Richard Henderson <rth@redhat.com>
14497         * config/aarch64/aarch64-modes.def (CC_V): New.
14498         * config/aarch64/aarch64-protos.h
14499         (aarch64_addti_scratch_regs): Declare
14500         (aarch64_subvti_scratch_regs): Declare.
14501         (aarch64_expand_subvti): Declare.
14502         (aarch64_gen_unlikely_cbranch): Declare
14503         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
14504         for signed overflow using CC_Vmode.
14505         (aarch64_get_condition_code_1): Handle CC_Vmode.
14506         (aarch64_gen_unlikely_cbranch): New function.
14507         (aarch64_addti_scratch_regs): New function.
14508         (aarch64_subvti_scratch_regs): New function.
14509         (aarch64_expand_subvti): New function.
14511 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
14513         * config/aarch64/aarch64-option-extensions.def: New entry for profile
14514         extension.
14515         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
14516         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
14517         extension.
14519 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
14521         PR target/83009
14522         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
14523         address check not strict.
14525 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
14527         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
14528         Umq with Umn.
14529         (store_pair_lanes<mode>): Likewise.
14530         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
14531         enum value 'ADDR_QUERY_LDP_STP_N'.
14532         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
14533         (aarch64_print_address_internal): Add declaration.
14534         (aarch64_print_ldpstp_address): Remove.
14535         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
14536         (aarch64_print_operand): Change printing of 'y'.
14537         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
14538         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
14539         'true' rather than '1'.
14540         * config/aarch64/constraints.md (Uml): Likewise.
14541         (Uml): Rename to Umn.
14542         (Umq): Remove.
14544 2018-07-19  Richard Biener  <rguenther@suse.de>
14546         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
14547         a trailing array.
14548         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
14549         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
14550         (vn_reference_hasher): Likewise.
14551         (struct vn_tables_s): Remove obstack and alloc-pool members.
14552         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
14553         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
14554         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
14555         (vn_reference_insert_pieces): Likewise.
14556         (alloc_vn_nary_op_noinit): Adjust.
14557         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
14558         (vn_phi_eq): Adjust.
14559         (shared_lookup_phiargs): Remove.
14560         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
14561         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
14562         (visit_reference_op_call): Likewise.
14563         (copy_nary, copy_phi, copy_reference): Remove.
14564         (process_scc): Rewind the obstack when iterating.  Do not
14565         copy the elements to valid_info but just move them from one
14566         hashtable to the other.
14567         (allocate_vn_table): Adjust.
14568         (free_vn_table): Likewise.
14569         (init_scc_vn): Likewise.
14570         (free_scc_vn): Likewise.
14572 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
14574         PR target/86560
14575         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
14576         indirect_return as function type attribute.
14577         (ix86_attribute_table): Change indirect_return to function
14578         type attribute.
14579         * doc/extend.texi: Update indirect_return attribute.
14581 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
14583         * wide-int.h (widest2_int): New.
14584         * gimple-fold.c (arith_overflowed_p): Use it.
14585         * tree.h (widest2_int_cst): New.
14586         * tree-vrp.c (wide_int_binop_overflow): Rename from
14587         vrp_int_const_binop.
14588         Rewrite to work on trees.
14589         (extract_range_from_multiplicative_op_1): Abstract code to...
14590         (wide_int_range_min_max): ...here.
14591         (wide_int_range_cross_product): ...and here.
14592         (extract_range_from_binary_expr_1): Abstract overflow code to...
14593         (wide_int_range_mult_wrapping): ...here.
14594         * tree-vrp.h (wide_int_range_cross_product): New.
14595         (wide_int_range_mult_wrapping): New.
14597 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
14598             Julia Koval  <julia.koval@intel.com>
14600         * config/i386/x86-tune-costs.h (skylake_memcpy,
14601         skylake_memset): Replace rep_prefix with unrolling for size 512.
14603 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
14605         PR middle-end/86544
14606         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
14607         comparision with EQ_EXPR in last stmt.
14609 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14611         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
14612         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
14613         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
14614         previously known as "PowerPC AltiVec Built-in Functions".  Move
14615         some material to new subsubsections "PowerPC AltiVec Built-in
14616         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
14617         ISA 2.07".
14618         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
14619         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
14620         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
14621         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
14623 2018-07-18  Richard Biener  <rguenther@suse.de>
14625         PR tree-optimization/86557
14626         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
14627         EXACT_DIV_EXPR.
14629 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
14631         * config/s390/s390.c (s390_function_profiler): Generate CFI.
14633 2018-07-17  Jeff Law  <law@redhat.com>
14635         * config/arm/arm.c (get_label_padding): Update for recent
14636         changes to label_to_alignment.
14638         PR tree-optimization/86010
14639         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
14641         * config/mips/mips.c (vr4130_align_insns): Update for recent
14642         changes to label_to_alignment.
14644         * config/frv/frv.c (frv_label_align): Update for recent changes
14645         to label_to_alignment.
14647         * config/nios2/nios2.c (nios2_label_align): Update for recent
14648         changes which dropped ALIGN_LABELS_LOG.
14650 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
14652         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
14653         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
14655 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
14657         * config/arc/arc.c (arc_label_align): Use align_labels instead of
14658         deprecated align_labels_log.
14660 2018-07-17  Richard Biener  <rguenther@suse.de>
14662         PR lto/86456
14663         * dwarf2out.c (init_sections_and_labels): Always generate
14664         a debug_line_str_section for early LTO debug.
14665         (dwarf2out_finish): Reset debug_line_str_hash output early.
14666         Bump counter for extra dwarf5 .debug_loc labels to not conflict
14667         with fat LTO part.
14668         (dwarf2out_early_finish): Output debug_line_str.
14670 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
14672         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
14673         index register on z196 or later.
14675 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
14677         * config/s390/s390.c (s390_default_align): Set default function
14678         alignment to 16.
14679         (s390_override_options_after_change): Call s390_default align.
14680         (s390_option_override_internal): Call s390_default_align.
14681         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
14683 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
14685         PR middle-end/86542
14686         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
14687         to _looptemp_ clauses, other than the first two.
14689 2018-07-17  Martin Liska  <mliska@suse.cz>
14691         * opts.c: Do not enable OPT_falign_* for -Os.
14693 2018-07-17  Martin Liska  <mliska@suse.cz>
14695         * align.h (MAX_CODE_ALIGN): New.
14696         (MAX_CODE_ALIGN_VALUE): New.
14697         * common/config/i386/i386-common.c (ix86_handle_option):
14698         (MAX_CODE_ALIGN): Moved to align.h.
14699         * final.c (MAX_CODE_ALIGN): Likewise.
14700         * opts.c (parse_and_check_align_values):
14701         (MAX_CODE_ALIGN): Likewise.
14702         (MAX_CODE_ALIGN_VALUE): Likewise.
14704 2018-07-17  Martin Liska  <mliska@suse.cz>
14706         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
14707         in order to fulfil coding style.
14708         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
14709         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14710         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
14711         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
14712         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
14713         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
14714         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
14715         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
14716         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14718 2018-07-17  Martin Liska  <mliska@suse.cz>
14720         * align.h: New file.
14721         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
14722         directly.
14723         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
14724         align_flags of label_to_alignment.
14725         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
14726         align_flags class.
14727         * config/m68k/m68k.c: Do not use removed align_labels_value and
14728         align_loops_value.
14729         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
14730         (LOOP_ALIGN): Likewise.
14731         (LABEL_ALIGN): Likewise.
14732         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
14733         Remove not used macro.
14734         (rs6000_loop_align): Change return type to align_flags.
14735         (rs6000_loop_align_max_skip): Remove.
14736         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
14737         Change return type to align_flags.
14738         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
14739         Remove not used macro.
14740         (rs6000_loop_align):  Change return type to align_flags.
14741         (rs6000_loop_align_max_skip): Remove.
14742         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
14743         * config/rx/rx-protos.h (rx_align_for_label): Make it
14744         static function.
14745         * config/rx/rx.c (rx_align_for_label): Change return type
14746         to align_flags.
14747         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
14748         macro definitions.
14749         into align_flags class.
14750         (LABEL_ALIGN): Likewise.
14751         (LOOP_ALIGN): Likewise.
14752         * config/s390/s390.c (s390_label_align): Use align_flags
14753         class member.
14754         (s390_asm_output_function_label): Likewise.
14755         * config/sh/sh.c (sh_override_options_after_change):
14756         Use align_flags class directly without macros.
14757         (find_barrier): Likewise.
14758         (barrier_align): Likewise.
14759         (sh_loop_align): Likewise.
14760         * config/spu/spu.c (spu_option_override):
14761         Use align_flags_tuple::get_value instead of removed macros.
14762         (spu_sched_init): Likewise.
14763         * config/spu/spu.h (GTY): Likewise.
14764         * config/visium/visium.c (visium_option_override):
14765         Set "8" as default secondary alignment.
14766         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
14767         in order to guarantee secondary alignment of 8.
14768         * coretypes.h: Include align.h header file.
14769         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
14770         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
14771         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
14772         * doc/tm.texi.in: Likewise.
14773         * final.c (struct label_alignment): Remove not used structure.
14774         (LABEL_ALIGN): Change type to align_flags.
14775         (LOOP_ALIGN): Likewise.
14776         (JUMP_ALIGN): Likewise.
14777         (default_loop_align_max_skip): Remove.
14778         (default_label_align_max_skip): Likewise.
14779         (default_jump_align_max_skip): Likewise.
14780         (default_label_align_after_barrier_max_skip):
14781         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
14782         (LABEL_TO_MAX_SKIP): Remove.
14783         (label_to_alignment): Return align_flags type instead of integer.
14784         (label_to_max_skip): Remove.
14785         (align_fuzz): Use align_flags type.
14786         (compute_alignments): Use align_flags type and use align_flags::max
14787         to combine multiple alignments.
14788         (grow_label_align): Grow vec instead of C array.
14789         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
14790         (shorten_branches):  Use align_flags type and use align_flags::max
14791         to combine multiple alignments.
14792         (final_scan_insn_1): Remove usage of secondary alignment that comes
14793         from label alignment, but instead use proper secondary alignment
14794         which is computed in grow_label_align.
14795         * flags.h (struct align_flags_tuple): Move to align.h.
14796         (struct align_flags): Likewise.
14797         (state_align_loops): Rename to align_loops.
14798         (state_align_jumps): Rename to align_jumps.
14799         (state_align_labels): Rename to align_labels.
14800         (state_align_functions): Rename to align_functions.
14801         (align_loops_log): Remove.
14802         (align_jumps_log): Remove.
14803         (align_labels_log): Remove.
14804         (align_functions_log): Remove.
14805         (align_loops_max_skip): Remove.
14806         (align_jumps_max_skip): Remove.
14807         (align_labels_max_skip): Remove.
14808         (align_functions_max_skip): Remove.
14809         (align_loops_value): Remove.
14810         (align_jumps_value): Remove.
14811         (align_labels_value): Remove.
14812         (align_functions_value): Remove.
14813         * output.h (label_to_alignment): Change return type to align_flags.
14814         (label_to_max_skip): Remove.
14815         * target.def: Remove loop_align_max_skip, label_align_max_skip,
14816         jump_align_max_skip macros.
14817         * targhooks.h (default_loop_align_max_skip): Remove.
14818         (default_label_align_max_skip): Likewise.
14819         (default_jump_align_max_skip): Likewise.
14820         (default_label_align_after_barrier_max_skip): Remove.
14821         * toplev.c (read_log_maxskip): Use ::normalize function.
14822         (parse_N_M): Remove not used argument and also call ::normalize.
14823         (parse_alignment_opts): Do not pass unused arguments.
14824         * varasm.c (assemble_start_function): Use directly align_functions
14825         instead of removed macros.
14826         * system.h: Do not poison removed macros.
14828 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
14830         PR middle-end/86539
14831         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
14832         and cond temporaries don't have reference type if iterator has
14833         pointer type.  For init use &for_pre_body instead of pre_p if
14834         for_pre_body is non-empty.
14836 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
14838         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
14839         double-double modes to SFmode directly directly.
14840         (trunc<mode>sf2_fprs): Delete.
14842 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
14844         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
14845         for conversions between IFmode and the decimal floating point modes.
14846         (init_float128_ieee): Use the correct names for conversions between
14847         KFmode and the decimal floating point modes.
14849 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
14851         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
14852         for the conversions between TDmode and IFmode.
14853         (init_float128_ieee): Use more correct names for the conversions
14854         between TDmode and KFmode.
14856 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
14858         PR tree-optimization/86526
14859         * builtins.c (expand_builtin_memcmp): Formatting fixes.
14860         (inline_expand_builtin_string_cmp): Likewise.
14861         (inline_string_cmp): Likewise.  Use c_readstr instead of
14862         builtin_memcpy_read_str.  Add unit_mode temporary.
14864 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
14866         PR middle-end/86528
14867         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
14868         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
14870 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14872         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
14873         Alphabetize prototypes of built-in functions, separating out
14874         built-in functions that are listed in this section but should be
14875         described elsewhere.
14877 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
14879         PR target/86511
14880         * expmed.c (emit_store_flag): Do not emit setcc followed by a
14881         conditional move when trapping comparison was split to a
14882         non-trapping one (and vice versa).
14884 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
14886         * config/s390/s390.c (s390_function_profiler): Generate nops
14887         instead of profiler call sequences.
14888         * config/s390/s390.opt: Add the new option.
14890 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
14892         * config/s390/s390.c (s390_function_profiler): Generate
14893         __mcount_loc section.
14894         * config/s390/s390.opt: Add the new option.
14896 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
14898         * common.opt: Add the new warning.
14899         * config/s390/s390.c (s390_function_profiler): Emit "brasl
14900         %r0,__fentry__" when -mfentry is specified.
14901         (s390_option_override_internal): Disallow -mfentry for 31-bit
14902         CPUs.
14903         * config/s390/s390.opt: Add the new option.
14905 2018-07-16  Richard Biener  <rguenther@suse.de>
14907         PR lto/86523
14908         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
14909         for function-local FUNCTION_DECL and RESULT_DECL immediately.
14911 2018-07-16  Martin Liska  <mliska@suse.cz>
14913         PR ipa/86529
14914         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
14915         to ::get_create.
14917 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
14919         * config/arc/arcHS.md: Update ARCHS scheduling rules.
14921 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
14923         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
14924         for ARCHS4x.
14925         * config/arc/arc-cpus.def (hs4x): New cpu.
14926         (hs4xd): Likewise.
14927         * config/arc/arc-tables.opt: Regenerate.
14928         * config/arc/arc.c (arc_sched_issue_rate): New function.
14929         (TARGET_SCHED_ISSUE_RATE): Define.
14930         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
14931         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
14932         fpu_cvt.
14933         (attr tune): Add ARCHS4x tune values.
14934         (attr tune_dspmpy): Define.
14935         (*tst): Correct instruction type.
14936         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
14937         * config/arc/arcHS4x.md: New file.
14938         * config/arc/fpu.md: Update instruction type attributes.
14939         * config/arc/t-multilib: Regenerate.
14941 2018-07-16  Tom de Vries  <tdevries@suse.de>
14943         PR debug/86455
14944         * var-tracking.c (vt_initialize): Fix pre_dec handling.
14946 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
14948         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
14949         early clobber.
14951 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
14953         PR tree-optimization/86514
14954         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
14955         conversion to a boolean type from a type with greater precision.
14957 2018-07-16  Tom de Vries  <tdevries@suse.de>
14959         * var-tracking.c (vt_initialize): Print adjusted insn slim if
14960         dump_flags request TDF_SLIM.
14962 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
14964         * fold-const.c (int_const_binop_1): Abstract...
14965         (wide_int_binop): ...wide int code here.
14966         (poly_int_binop): ...poly int code here.
14967         Abstract the rest of int_const_binop_1 into int_const_binop.
14968         * fold-const.h (wide_int_binop): New.
14969         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
14970         Remove useless PLUS/MINUS_EXPR case.
14971         (zero_nonzero_bits_from_vr): Move wide int code...
14972         (zero_nonzero_bits_from_bounds): ...here.
14973         (extract_range_from_binary_expr_1): Move mask optimization code...
14974         (range_easy_mask_min_max): ...here.
14975         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
14976         (range_easy_mask_min_max): New.
14978 2018-07-15  Jeff Law  <law@redhat.com>
14980         PR target/85993
14981         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
14982         block.
14984 2018-07-14  Jim Wilson  <jimw@sifive.com>
14986         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
14988 2018-07-14  Paul Koning  <ni1d@arrl.net>
14990         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
14992 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
14994         * lto-streamer-out.c (copy_function_or_variable): Dump info about
14995         copying section.
14997 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
14998             Steve Munroe  <munroesj52@gmail.com>
15000         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
15001         (_mm_andnot_si128): Likewise.
15002         (_mm_or_si128): Likewise.
15003         (_mm_xor_si128): Likewise.
15005 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
15007         PR middle-end/78809
15008         * builtins.c (expand_builtin_memcmp): Inline the calls first
15009         when result_eq is false.
15010         (expand_builtin_strcmp): Inline the calls first.
15011         (expand_builtin_strncmp): Likewise.
15012         (inline_string_cmp): New routine. Expand a string compare
15013         call by using a sequence of char comparison.
15014         (inline_expand_builtin_string_cmp): New routine. Inline expansion
15015         a call to str(n)cmp/memcmp.
15016         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
15017         New option.
15018         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
15020 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
15022         * config/arm/driver-arm.c: Include arm-native.h.
15023         (host_detect_local_cpu): Use auto-generated data tables.
15024         (vendors, arm_cpu_table): Delete.  Move part information to ...
15025         * config/arm/arm-cpus.in: ... here.
15026         * config/arm/parsecpu.awk (gen_native): New function.
15027         (vendor, part): New CPU fields.
15028         (END): Add support for building the native CPU detection tables.
15029         * config/arm/t-arm (arm-native.h): Add build rule.
15030         (driver-arm.o): Add dependency on arm-native.h.
15032 2018-07-13  Richard Biener  <rguenther@suse.de>
15034         PR middle-end/85974
15035         * match.pd (addr1 - addr2): Allow either of the operand to
15036         have a conversion.
15038 2018-07-13  Tom de Vries  <tdevries@suse.de>
15040         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
15041         in remap_ssa_name.
15043 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
15045         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
15046         arrays instead of numbered variables.
15048 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
15050         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
15051         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
15053 2018-07-13  Richard Biener  <rguenther@suse.de>
15055         PR debug/86452
15056         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
15057         instead of get_context_die.
15059 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
15060             Richard Biener  <rguenther@suse.de>
15062         PR middle-end/86489
15063         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
15064         that the loop latch destination where phi is defined.
15066 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
15068         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
15069         (riscv_expand_epilogue): Add assertion to check interrupt mode.
15070         (riscv_set_current_function): Extract getting interrupt type to new
15071         function.
15072         (riscv_get_interrupt_type): New function.
15073         (riscv_merge_decl_attributes): New function, checking interrupt type is
15074         same.
15075         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
15077 2018-07-12  Paul Koning  <ni1d@arrl.net>
15079         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
15080         directive.
15082 2018-07-12  Paul Koning  <ni1d@arrl.net>
15084         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
15085         zero reference, add doloop_end instead.
15086         * doc/md.texi (decrement_and_branch_until_zero): Remove.
15087         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
15088         detail for doloop_end.
15090 2018-07-12  Martin Sebor  <msebor@redhat.com>
15092         PR c/86453
15093         * attribs.c (decl_attributes): Reject conflicting attributes before
15094         calling attribute handlers.
15096 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
15098         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
15099          parameter.
15100         (gcc::dump_manager::get_dump_file_name): likewise.
15101         (dump_begin): Likewise.
15102         * dumpfile.h (dump_begin): Update prototype.
15103         (gcc::dump_manager::get_dump_file_name,
15104         gcc::dump_manager::get_dump_file_name): Update prototype.
15106 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
15108         * internal-fn.h (vectorizable_internal_fn_p): New function.
15109         * tree-vect-slp.c (compatible_calls_p): Likewise.
15110         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
15111         to internal functions.
15112         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
15114 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
15116         * fold-const.h (inverse_conditions_p): Declare.
15117         * fold-const.c (inverse_conditions_p): New function.
15118         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
15119         that test the inverse condition of a conditional internal function.
15120         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
15121         * internal-fn.c (internal_fn_mask_index): Handle conditional
15122         internal functions.
15123         (vectorized_internal_fn_supported_p): New function.
15124         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
15125         (any_pred_load_store): Replace with...
15126         (need_to_predicate): ...this new variable.
15127         (redundant_ssa_names): New variable.
15128         (ifcvt_can_use_mask_load_store): Move initial checks to...
15129         (ifcvt_can_predicate): ...this new function.  Handle tree codes
15130         for which a conditional internal function exists.
15131         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
15132         instead of ifcvt_can_use_mask_load_store.  Update after variable
15133         name change.
15134         (predicate_load_or_store): New function, split out from
15135         predicate_mem_writes.
15136         (check_redundant_cond_expr): New function.
15137         (value_available_p): Likewise.
15138         (predicate_rhs_code): Likewise.
15139         (predicate_mem_writes): Rename to...
15140         (predicate_statements): ...this.  Use predicate_load_or_store
15141         and predicate_rhs_code.
15142         (combine_blocks, tree_if_conversion): Update after above name changes.
15143         (ifcvt_local_dce): Handle redundant_ssa_names.
15144         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
15145         general conditional functions.
15146         * tree-vect-stmts.c (vectorizable_call): Likewise.
15148 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
15149             Alan Hayward  <alan.hayward@arm.com>
15150             David Sherwood  <david.sherwood@arm.com>
15152         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
15153         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
15154         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
15155         plus and minus and convert them into IFN_COND_FMA-based sequences.
15156         (convert_mult_to_fma): Handle conditional plus and minus.
15158 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
15160         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
15161         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
15162         (cond_fnms_optab): New optabs.
15163         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
15164         internal functions.
15165         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
15166         * internal-fn.h (get_conditional_internal_fn): Declare.
15167         (get_unconditional_internal_fn): Likewise.
15168         * internal-fn.c (cond_ternary_direct): New macro.
15169         (expand_cond_ternary_optab_fn): Likewise.
15170         (direct_cond_ternary_optab_supported_p): Likewise.
15171         (FOR_EACH_COND_FN_PAIR): Likewise.
15172         (get_conditional_internal_fn): New function.
15173         (get_unconditional_internal_fn): Likewise.
15174         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
15175         (gimple_match_op::gimple_match_op): Add a new overload for 5
15176         operands.
15177         (gimple_match_op::set_op): Likewise.
15178         (gimple_resimplify5): Declare.
15179         * genmatch.c (decision_tree::gen): Generate simplifications for
15180         5 operands.
15181         * gimple-match-head.c (gimple_simplify): Define an overload for
15182         5 operands.  Handle calls with 5 arguments in the top-level overload.
15183         (convert_conditional_op): Handle conversions from unconditional
15184         internal functions to conditional ones.
15185         (gimple_resimplify5): New function.
15186         (build_call_internal): Pass a fifth operand.
15187         (maybe_push_res_to_seq): Likewise.
15188         (try_conditional_simplification): Try converting conditional
15189         internal functions to unconditional internal functions.
15190         Handle 3-operand unconditional forms.
15191         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
15192         Define ternary equivalents of the current rules for binary conditional
15193         internal functions.
15194         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
15195         ternary operations.
15196         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
15197         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
15198         (optab): Handle them.
15199         (SVE_COND_FP_TERNARY): New int iterator.
15200         (sve_fmla_op, sve_fmad_op): New int attributes.
15201         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
15202         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
15203         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
15205 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
15207         * target.def (preferred_else_value): New target hook.
15208         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
15209         * doc/tm.texi: Regenerate.
15210         * targhooks.h (default_preferred_else_value): Declare.
15211         * targhooks.c (default_preferred_else_value): New function.
15212         * internal-fn.h (conditional_internal_fn_code): Declare.
15213         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
15214         (get_conditional_internal_fn): Use it.
15215         (conditional_internal_fn_code): New function.
15216         * gimple-match.h (gimple_match_cond): New struct.
15217         (gimple_match_op): Add a cond member function.
15218         (gimple_match_op::gimple_match_op): Update all forms to take a
15219         gimple_match_cond.
15220         * genmatch.c (expr::gen_transform): Use the same condition as res_op
15221         for the suboperation, but don't specify a particular else_value.
15222         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
15223         (visit_nary_op, visit_reference_op_load): Pass
15224         gimple_match_cond::UNCOND to the gimple_match_op constructor.
15225         * gimple-match-head.c: Include tree-eh.h
15226         (convert_conditional_op): New function.
15227         (maybe_resimplify_conditional_op): Likewise.
15228         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
15229         (gimple_resimplify2): Likewise.
15230         (gimple_resimplify3): Likewise.
15231         (gimple_resimplify4): Likewise.
15232         (maybe_push_res_to_seq): Return null for conditional operations.
15233         (try_conditional_simplification): New function.
15234         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
15235         constructor.
15236         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
15237         IFN_COND_* call.
15238         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
15239         function.
15240         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
15242 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
15244         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
15245         DECL_FCONTEXT
15246         (hash_tree): Do not hash DECL_FCONTEXT
15247         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
15248         Do not stream DECL_FCONTEXT.
15249         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
15250         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
15252 2018-07-12  Richard Biener  <rguenther@suse.de>
15254         PR debug/86462
15255         * dwarf2out.c (gen_block_die): Only output blocks when they have
15256         at least one !DECL_IGNORED_P variable.
15258 2018-07-12  Richard Biener  <rguenther@suse.de>
15260         PR target/84829
15261         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
15262         Remove -mieee-fp handling.
15264 2018-07-12  Richard Biener  <rguenther@suse.de>
15266         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
15267         left-over from last patch.
15269 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
15271         PR tree-optimization/86492
15272         * gimple-ssa-store-merging.c
15273         (imm_store_chain_info::coalesce_immediate_stores): Call
15274         check_no_overlap even for the merge_overlapping case.  Formatting fix.
15276 2018-07-12  Richard Biener  <rguenther@suse.de>
15278         PR middle-end/86479
15279         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
15280         move possibly trapping operations into the conditional.
15282 2018-07-12  Richard Biener  <rguenther@suse.de>
15284         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
15285         (vn_lookup_simplify_result): Remove recursion limit applied
15286         here.
15287         (vn_nary_build_or_lookup_1): Adjust.
15288         (try_to_simplify): Likewise.
15289         * gimple-match-head.c (gimple_resimplify1): Instead apply one
15290         here.
15291         (gimple_resimplify2): Likewise.
15292         (gimple_resimplify3): Likewise.
15293         (gimple_resimplify4): Likewise.
15295 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
15297         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
15298         Use __mmask64 type instead of __mmask8 for __M argument.
15299         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
15300         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
15301         __U argument.
15302         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
15303         __mmask16 for __M argument.
15304         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
15305         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
15306         to __mmask16 instead of __mmask8.
15307         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
15308         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
15309         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
15310         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
15311         instead of __mmask16 for __U argument.
15312         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
15313         __mmask16 instead of __mmask8 for __U argument.
15314         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
15315         __U argument.
15316         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
15317         __mmask16.
15318         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
15319         argument.
15320         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
15321         __U argument.
15322         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
15323         __mmask16.
15324         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
15325         of __mmask16.
15326         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
15327         __U argument.
15328         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
15329         __U argument.
15330         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
15331         __U argument.
15332         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
15333         __U argument.
15334         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
15335         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
15336         return type as well as __M argument type and all casts from __mmask8
15337         to __mmask32.
15338         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
15339         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
15340         return type as well as __M argument type and all casts from __mmask8
15341         to __mmask16.
15342         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
15343         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
15344         return type as well as __M argument type and all casts from __mmask8
15345         to __mmask32.
15346         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
15347         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
15348         return type as well as __M argument type and all casts from __mmask8
15349         to __mmask16.
15350         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
15351         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
15352         __mmask16.
15354 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
15356         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
15357         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
15358         for __U argument.
15360 2018-07-11  Paul Koning  <ni1d@arrl.net>
15362         * doc/md.texi (define_subst): Document how multiple occurrences of
15363         the same argument in the replacement pattern are handled.
15365 2018-07-11  Paul Koning  <ni1d@arrl.net>
15367         * doc/extend.texi (Common Variable Attributes): Move "mode" into
15368         alphabetical order.
15369         (Common Type Attributes): Add "mode" attribute.
15371 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
15373         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
15374         stream DECL_ORIGINAL_TYPE.
15375         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
15376         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
15377         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
15378         Do not walk original type.
15379         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
15380         external decls.
15381         (write_ts_decl_non_common_tree_pointers): Do not stream
15382         DECL_ORIGINAL_TYPE
15383         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
15384         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
15386 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
15388         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
15389         thread twice from the same starting edge.
15391 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
15393         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
15394         * gimple.c (gimple_call_nonnull_result_p): ...here...
15395         (gimple_call_nonnull_arg): ...and here.
15396         * gimple.h (gimple_call_nonnull_result_p): New.
15397         (gimple_call_nonnull_arg): New.
15399 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
15401         * config/arm/arm-cpus.in: Move information from fpu field of each
15402         cpu definition to the isa field.
15403         * config/arm/parsecpu.awk (fpu): Delete match rule.
15404         (gen_comm_data): Don't add bits from the CPU's FPU entry.
15406 2018-07-11  Richard Biener  <rguenther@suse.de>
15408         PR debug/86457
15409         * dwarf2out.c (init_sections_and_labels): Use
15410         output_asm_line_debug_info consistently.
15411         (dwarf2out_early_finish): Likewise.
15412         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
15413         type units.
15415 2018-07-11  Richard Biener  <rguenther@suse.de>
15417         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
15418         Rework father_bb setting in a way to avoid propagating constants
15419         multiple times on a loop body.
15421 2018-07-10  Mark Wielaard  <mark@klomp.org>
15423         PR debug/86459
15424         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
15426 2018-07-10  Richard Biener  <rguenther@suse.de>
15428         * hash-map.h (hash_map::iterator::operator*): Return
15429         references to key and value.
15431 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
15433         PR c++/86443
15434         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
15435         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
15436         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
15437         (gimplify_omp_for): For composite loops, move outer
15438         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
15439         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
15440         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
15441         TREE_LIST for both the original class iterator and the "last" helper
15442         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
15443         loop, remember has_decl_expr from outer composite loops for the
15444         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
15446 2018-07-09  Martin Sebor  <msebor@redhat.com>
15448         PR middle-end/77357
15449         PR middle-end/86428
15450         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
15451         accessing implicitly initialized array elements.
15452         * expr.c (string_constant): Handle string initializers of
15453         character arrays within aggregates.
15454         * gimple-fold.c (fold_array_ctor_reference): Add argument.
15455         Store element offset.  As a special case, handle zero size.
15456         (fold_nonarray_ctor_reference): Same.
15457         (fold_ctor_reference): Add argument.  Store subobject offset.
15458         * gimple-fold.h (fold_ctor_reference): Add argument.
15460 2018-07-09  Paul Koning  <ni1d@arrl.net>
15462         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
15463         (pdp11_insn_cost): New function.
15464         (pdp11_md_asm_adjust): New function.
15465         (TARGET_INVALID_WITHIN_DOLOOP): Define.
15466         (pdp11_rtx_costs): Update to match machine better.
15467         (output_addr_const_pdp11): Correct format mismatch warnings.
15468         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
15469         * config/pdp11/pdp11.md: General change to add base_cost and/or
15470         length attributes for use by new pdp11_insn_cost function.
15471         (MIN_BRANCH): Correct definition.
15472         (MIN_SOB): Ditto.
15473         (doloop_end): Use standard pattern name for looping pattern.
15474         (doloop_end_nocc): New.
15475         (movsf): Add another constraint alternative.
15476         (zero_extendqihi2): Add constraint alternatives for not in place
15477         extend.
15478         (zero_extendhisi2): Remove.
15479         (shift patterns): Add CC handling variants.
15480         (bswaphi2): New.
15481         (bswapsi2): New.
15482         (rothi3): New.
15483         (define_peephole2): New peephole to recognize mov that sets CC for
15484         subsequent test.
15486 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15488         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
15489         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
15490         wi::add.
15492 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
15494         PR c/86420
15495         * real.c (real_nextafter): Return true if result is denormal.
15497 2018-07-09  Martin Liska  <mliska@suse.cz>
15499         * common.opt: Add back wrongly removed attribute.
15501 2018-07-09  Richard Biener  <rguenther@suse.de>
15503         PR debug/86413
15504         * dwarf2out.c (gen_block_die): For an early generated DIE
15505         always output high/low PC attributes.
15507 2018-07-09  Tom de Vries  <tdevries@suse.de>
15509         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
15510         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
15511         onto VAR_DECL with abstract origin.
15513 2018-07-07  Jim Wilson  <jimw@sifive.com>
15515         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
15517 2018-07-07  Tom de Vries  <tdevries@suse.de>
15519         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
15521 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
15523         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
15524         overflow_type.
15525         (combine_bound): Use wide-int overflow calculation instead of
15526         rolling our own.
15527         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
15528         overflow_type.
15529         * fold-const.c (int_const_binop_2): Same.
15530         (extract_muldiv_1): Same.
15531         (fold_div_compare): Same.
15532         (fold_abs_const): Same.
15533         * match.pd: Same.
15534         * poly-int.h (add): Same.
15535         (sub): Same.
15536         (neg): Same.
15537         (mul): Same.
15538         * predict.c (predict_iv_comparison): Same.
15539         * profile-count.c (slow_safe_scale_64bit): Same.
15540         * simplify-rtx.c (simplify_const_binary_operation): Same.
15541         * tree-chrec.c (tree_fold_binomial): Same.
15542         * tree-data-ref.c (split_constant_offset_1): Same.
15543         * tree-if-conv.c (idx_within_array_bound): Same.
15544         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
15545         * tree-ssa-phiopt.c (minmax_replacement): Same.
15546         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
15547         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
15548         * vr-values.c (vr_values::adjust_range_with_scev): Same.
15549         * wide-int.cc (wi::add_large): Same.
15550         (wi::mul_internal): Same.
15551         (wi::sub_large): Same.
15552         (wi::divmod_internal): Same.
15553         * wide-int.h: Change overflow type to overflow_type for neg, add,
15554         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
15555         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
15556         mul_internal, divmod_internal.
15557         (overflow_type): New enum.
15558         (accumulate_overflow): New.
15560 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
15562         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
15563         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
15565 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
15567         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
15568         argument is checked for zero before entering loop, avoid checking again.
15570 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
15572         * gimplify.h (generic_expr_could_trap_p): Set as global function.
15573         * gimplify.h (generic_expr_could_trap_p): Likwise.
15574         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
15576 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
15578         PR tree-optimization/86401
15579         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
15580         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
15581         (fold_bit_and_mask): ... here.  New helper function for match.pd.
15582         * fold-const.h (fold_bit_and_mask): Declare.
15583         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
15585 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
15587         PR target/86324
15588         * target.def (translate_mode_attribute): New hook.
15589         * targhooks.h (default_translate_mode_attribute): Declare.
15590         * targhooks.c (default_translate_mode_attribute): New function.
15591         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
15592         * doc/tm.texi: Regenerate.
15593         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
15594         (rs6000_translate_mode_attribute): New function.
15596 2018-07-06  Paul Koning  <ni1d@arrl.net>
15598         * doc/md.texi (define_split): Document DONE and FAIL.
15599         (define_peephole2): Ditto.
15601 2018-07-05  Jeff Law  <law@redhat.com>
15603         PR tree-optimization/86010
15604         * tree-ssa-dse.c (compute_trims): More aggressively trim at
15605         both the head and tail of mem* and str* calls.
15607 2018-07-05  Jim Wilson  <jimw@sifive.com>
15609         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
15611 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
15613         * config/aarch64/aarch64-simd.md: correct flags text for
15614         MIN_EXPR replacement.
15616 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
15618         * configure: Regenerated.
15620 2018-07-05  Carl Love  <cel@us.ibm.com>
15622         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
15623         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
15624         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
15625         VSX_BUILTIN_DOUBLEL_V4SF.
15627 2018-07-05  Martin Sebor  <msebor@redhat.com>
15629         PR c++/86400
15630         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
15631         than its domain to compute its the upper bound of a char array.
15633 2018-07-05  Nathan Sidwell  <nathan@acm.org>
15635         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
15636         * doc/cpp.texi: Update comment.
15637         * doc/tm.texi: Rebuilt.
15638         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
15639         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
15640         * doc/extend.texi (Backwards Compatibility): Clarify it is system
15641         headers affected by extern "C".
15642         * system.h: Poison NO_IMPLICIT_EXTERN_C.
15643         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
15644         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
15645         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
15646         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
15647         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
15648         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
15649         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
15650         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
15651         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
15652         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
15653         config/sparc/sp64-elf.h, config/spu/spu.h,
15654         config/stormy16/stormy16.h, config/v850/v850.h,
15655         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
15656         define NO_IMPLICIT_EXTERN_C.
15657         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
15659 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
15661         PR target/84711
15662         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
15663         instead of GET_MODE_SIZE when comparing Units.
15665 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
15667         PR target/84711
15668         * rtlanal.c (set_noop_p): Constrain on mode change,
15669         include hard-reg-set.h
15671 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
15673         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
15675 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
15677         Revert
15678         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
15680         PR sanitizer/84250
15681         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
15682         libasan.
15683         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
15685 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
15687         PR sanitizer/84250
15688         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
15689         libasan.
15690         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
15692 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
15694         PR middle-end/86380
15695         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
15697 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
15699         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
15700         neg_*_op* variables.
15702 2018-07-04  Martin Liska  <mliska@suse.cz>
15704         * tree-switch-conversion.c: Define
15705         max_ratio_for_speed and max_ratio_for_size constants.
15707 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
15708             Martin Liska  <mliska@suse.cz>
15710         PR middle-end/66240
15711         PR target/45996
15712         PR c/84100
15713         * common.opt: Rename align options with 'str_' prefix.
15714         * common/config/i386/i386-common.c (set_malign_value): New
15715         function.
15716         (ix86_handle_option): Use it to set -falign-* options/
15717         * config/aarch64/aarch64-protos.h (struct tune_params): Change
15718         type from int to string.
15719         * config/aarch64/aarch64.c: Update default values from int
15720         to string.
15721         * config/alpha/alpha.c (alpha_override_options_after_change):
15722         Likewise.
15723         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
15724         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15725         max skip conditionally.
15726         * config/i386/freebsd.h (SUBALIGN_LOG): New.
15727         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15728         max skip conditionally.
15729         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15730         max skip conditionally.
15731         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
15732         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15733         max skip conditionally.
15734         * config/i386/i386.c (struct ptt): Change type from int to
15735         string.
15736         (ix86_default_align): Set default values.
15737         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
15738         max skip conditionally.
15739         * config/i386/iamcu.h (SUBALIGN_LOG): New.
15740         (ASM_OUTPUT_MAX_SKIP_ALIGN):
15741         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
15742         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15743         max skip conditionally.
15744         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
15745         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
15746         * config/i386/x86-64.h (SUBALIGN_LOG): New.
15747         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15748         max skip conditionally.
15749         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
15750         * config/ia64/ia64.c (ia64_option_override): Set default values
15751         for alignment options.
15752         * config/m68k/m68k.c: Handle new str_align_* options.
15753         * config/mips/mips.c (mips_set_compression_mode): Change
15754         type of constants.
15755         (mips_option_override): Set default values for options.
15756         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
15757         Likewise.
15758         * config/rs6000/rs6000.c (rs6000_option_override_internal):
15759         Likewise.
15760         * config/rx/rx.c (rx_option_override): Likewise.
15761         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
15762         (LABEL_ALIGN): Use align_labels_log.
15763         (LOOP_ALIGN): Use align_loops_align.
15764         * config/s390/s390.c (s390_asm_output_function_label): Use new
15765         macros.
15766         * config/sh/sh.c (sh_override_options_after_change):
15767         Change type of constants.
15768         * config/spu/spu.c (spu_sched_init): Likewise.
15769         * config/sparc/sparc.c (sparc_option_override): Set default
15770         values for options.
15771         * config/visium/visium.c (visium_option_override): Likewise.
15772         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
15773         emit p2align format with last argument if it's not needed.
15774         * doc/invoke.texi: Document extended format of -falign-*.
15775         * final.c: Use align_labels alignment.
15776         * flags.h (struct target_flag_state): Change type to use
15777         align_flags.
15778         (struct align_flags_tuple): New.
15779         (struct align_flags): Likewise.
15780         (align_loops_log): Redefine macro to use new types.
15781         (align_loops_max_skip): Redefine macro to use new types.
15782         (align_jumps_log): Redefine macro to use new types.
15783         (align_jumps_max_skip): Redefine macro to use new types.
15784         (align_labels_log): Redefine macro to use new types.
15785         (align_labels_max_skip): Redefine macro to use new types.
15786         (align_functions_log): Redefine macro to use new types.
15787         (align_loops): Redefine macro to use new types.
15788         (align_jumps): Redefine macro to use new types.
15789         (align_labels): Redefine macro to use new types.
15790         (align_functions): Redefine macro to use new types.
15791         (align_functions_max_skip): Redefine macro to use new types.
15792         (align_loops_value): New macro.
15793         (align_jumps_value): New macro.
15794         (align_labels_value): New macro.
15795         (align_functions_value): New macro.
15796         * function.c (invoke_set_current_function_hook): Propagate
15797         alignment values from flags to global variables default in
15798         topleev.h.
15799         * ipa-icf.c (sem_function::equals_wpa): Use
15800         cl_optimization_option_eq instead of memcmp.
15801         * lto-streamer.h (cl_optimization_stream_out): Support streaming
15802         of string types.
15803         (cl_optimization_stream_in): Likewise.
15804         * optc-save-gen.awk: Support strings in cl_optimization.
15805         * opth-gen.awk: Likewise.
15806         * opts.c (finish_options): Remove error checking of invalid
15807         value ranges.
15808         (MAX_CODE_ALIGN): Remove.
15809         (MAX_CODE_ALIGN_VALUE): Likewise.
15810         (parse_and_check_align_values): New function.
15811         (check_alignment_argument): Likewise.
15812         (common_handle_option): Use check_alignment_argument.
15813         * opts.h (parse_and_check_align_values): Declare.
15814         * toplev.c (init_alignments): Remove.
15815         (read_log_maxskip): New.
15816         (parse_N_M): Likewise.
15817         (parse_alignment_opts): Likewise.
15818         (backend_init_target): Remove usage of init_alignments.
15819         * toplev.h (parse_alignment_opts): Declare.
15820         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
15821         argument.
15822         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
15823         * tree.c (cl_option_hasher::equal): New.
15824         * varasm.c: Use new global macros.
15826 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
15828         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
15829         Use a simpler align directive also if MAXSKIP = ALIGN-1.
15830         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15831         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15832         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15833         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
15834         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
15835         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
15836         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
15837         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15838         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15839         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15840         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15842 2018-07-04  Martin Liska  <mliska@suse.cz>
15843             Jonathan Wakely  <jwakely@redhat.com>
15845         * coverage.c: Use correct type.
15846         * doc/invoke.texi: Language correction.
15848 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
15850         PR target/85620
15851         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
15852         ENDBRANCH for non-tail call which may return via indirect branch.
15853         * doc/extend.texi: Document indirect_return attribute.
15855 2018-07-03  Martin Sebor  <msebor@redhat.com>
15857         PR tree-optimization/86274
15858         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
15859         precondition.
15860         (format_floating): Correct handling of infinities and NaNs.
15862 2018-07-03  Martin Sebor  <msebor@redhat.com>
15864         * print-tree.c (print_real_cst): New function.
15865         (print_node_brief): Call it.
15866         (print_node): Ditto.
15868 2018-07-03  Jeff Law  <law@redhat.com>
15870         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
15871         into a single pattern.
15873         * config/h8300/h8300.md (ors code_iterator): New.
15874         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
15875         a single pattern and single splitter.
15876         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
15877         (iorqi3_1, xorqi3_1): Likewise.
15878         (iorqi3, xorqi3 expanders): Similarly.
15880         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
15881         (movmd_internal) into a single pattern using the P mode iterator.
15882         (movmd splitters): Similarly.
15883         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
15884         (movsd splitters): Similarly.
15886         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
15887         ADDB, ADDW and ADDL into a single ADD attribute which selects the
15888         right table based on the size of the operand.
15889         * config/h8300/h8300.md (length_table): Corresponding changes. All
15890         references to "addb", "addw" and "addl" changed to "add".
15891         (btst patterns): Merge two variants into a single pattern.
15892         (tstqi, tsthi): Likewise.
15893         (addhi3_incdec, addsi3_incdec): Likewise.
15894         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
15895         (mulhi3, mulsi3): Likewise.
15896         (udivhi3, udivsi3): Likewise.
15897         (divhi3, divsi3): Likewise.
15898         (andorqi3, andorhi3, andorsi3): Likewise.
15900 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
15902         PR target/85694
15903         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
15904         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
15906 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
15908         PR tree-optimization/85694
15909         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
15910         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
15911         UNSPEC_URHADD.
15912         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
15913         (<u>avg<mode>3_ceil): New patterns.
15915 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
15917         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
15918         scan-tree-dump directive.
15919         * gcc.dg/vect/slp-perm-2.c: Likewise.
15920         * gcc.dg/vect/slp-perm-3.c: Likewise.
15921         * gcc.dg/vect/slp-perm-5.c: Likewise.
15922         * gcc.dg/vect/slp-perm-6.c: Likewise.
15923         * gcc.dg/vect/slp-perm-7.c: Likewise.
15924         * gcc.dg/vect/slp-perm-8.c: Likewise.
15926 2018-07-03  Marek Polacek  <polacek@redhat.com>
15928         PR middle-end/86202
15929         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
15931 2018-07-03  Richard Biener  <rguenther@suse.de>
15933         PR ipa/86389
15934         * tree-ssa-structalias.c (find_func_clobbers): Properly
15935         handle indirect calls.
15937 2018-07-03  Jeff Law  <law@redhat.com>
15939         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
15940         (shifts): New code iterator.
15941         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
15942         expander.  Fix HImode handling on H8/SX.
15943         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
15944         (subqi3, subhi3, subsi3 expanders): Likewise.
15945         (andqi3, andhi3, andsi3 expanders): Likewise.
15946         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
15947         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
15948         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
15949         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
15950         (zero_extendqihi2, zero_extendqisi2): Likewise.
15951         (extendqihi2, extendqisi2): Likewise.
15952         (rotlqi3, rotlhi3, rotlsi3): Likewise.
15953         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
15954         (rotlqi3_1, rotlhi3_1): Likewise.
15955         (logicalhi3_sn, logicalsi3_sn): Likewise.
15956         (logicalhi3, logicalsi3): Likewise.
15958 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
15960         * tree-vect-patterns.c (vect_recog_rotate_pattern)
15961         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
15962         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
15963         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
15964         type to append_pattern_def_seq instead of creating a stmt_vec_info
15965         directly.
15966         (build_mask_conversion): Likewise.  Remove vinfo argument.
15967         (vect_add_conversion_to_patterm): Likewise, renaming to...
15968         (vect_add_conversion_to_pattern): ...this.
15969         (vect_recog_mask_conversion_pattern): Update call to
15970         build_mask_conversion.  Pass the vector type to
15971         append_pattern_def_seq here too.
15972         (vect_recog_gather_scatter_pattern): Update call to
15973         vect_add_conversion_to_pattern.
15975 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
15977         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
15978         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
15979         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
15980         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
15981         STMT_VINFO_PATTERN_DEF_SEQ to null here.
15982         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
15983         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
15984         append_pattern_def_seq instead of new_pattern_def_seq.
15985         (vect_recog_divmod_pattern): Do both of the above.
15986         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
15987         is null.
15989 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
15991         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
15992         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
15993         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
15994         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
15995         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
15996         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
15997         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
15998         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
15999         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
16000         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
16001         parameter with a single stmt_vec_info.
16002         (vect_recog_func_ptr): Likewise.
16003         (vect_recog_gather_scatter_pattern): Likewise, folding in...
16004         (vect_try_gather_scatter_pattern): ...this.
16005         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
16006         the stmt_vec_info of the statement to be matched.  Don't clear
16007         STMT_VINFO_RELATED_STMT.
16008         (vect_pattern_recog): Update call accordingly.
16010 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
16012         PR tree-optimization/85694
16013         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
16014         (uavgM3_ceil): Document new optabs.
16015         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
16016         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
16017         functions.
16018         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
16019         (savg_ceil_optab): New optabs.
16020         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
16021         (vect_vect_recog_func_ptrs): Add it.
16022         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
16023         constant directly from the associated lhs.
16025 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
16027         * tree-vect-patterns.c (vect_split_statement): New function.
16028         (vect_convert_input): Use it to try to split an existing cast.
16030 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
16032         * poly-int.h (print_hex): New function.
16033         * dumpfile.h (dump_dec, dump_hex): Declare.
16034         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
16035         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
16036         min_input_precision, operation_precision and operation_sign.
16037         * tree-vect-patterns.c (vect_get_range_info): New function.
16038         (vect_same_loop_or_bb_p, vect_single_imm_use)
16039         (vect_operation_fits_smaller_type): Delete.
16040         (vect_look_through_possible_promotion): Add an optional
16041         single_use_p parameter.
16042         (vect_recog_over_widening_pattern): Rewrite to use new
16043         stmt_vec_info infomration.  Handle one operation at a time.
16044         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
16045         (vect_truncatable_operation_p, vect_set_operation_type)
16046         (vect_set_min_input_precision): New functions.
16047         (vect_determine_min_output_precision_1): Likewise.
16048         (vect_determine_min_output_precision): Likewise.
16049         (vect_determine_precisions_from_range): Likewise.
16050         (vect_determine_precisions_from_users): Likewise.
16051         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
16052         (vect_vect_recog_func_ptrs): Put over_widening first.
16053         Add cast_forwprop.
16054         (vect_pattern_recog): Call vect_determine_precisions.
16056 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
16058         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
16059         statements that have been replaced by further pattern statements.
16060         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
16062 2018-07-03  Richard Biener  <rguenther@suse.de>
16064         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
16065         always set *dt.  Dump vectype in vectype overload.
16066         * dumpfile.h (dump_gimple_expr): New function.
16067         (dump_gimple_expr_loc): Likewise.
16068         * dumpfile.c (dump_gimple_expr): New function.
16069         (dump_gimple_expr_loc): Likewise.
16071 2018-07-02  Jeff Law  <law@redhat.com>
16073         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
16074         the H8/300, H8/300H and H8/S variants into a single pattern.
16075         (movhi_h8300, movqi_h8300hs): Similarly.
16076         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
16077         (QHI mode iterator): New.
16079         * config/h8300/h8300.md: Remove trailing whitespace.
16081 2018-07-02  Jim Wilson  <jimw@sifive.com>
16083         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
16084         instead of emit_insn for interrupt returns.
16085         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
16086         (riscv_sret, riscv_uret): Likewise.
16088 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
16090         * pretty-print.c (selftest::test_pp_format): Move save and restore
16091         of quotes to class auto_fix_quotes, and add an instance.
16092         * selftest.c: Include "intl.h".
16093         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
16094         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
16095         * selftest.h (selftest::auto_fix_quotes): New class.
16097 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
16099         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
16100         (aarch64_sve_prepare_conditional_op): Remove.
16101         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
16102         Allow aarch64_simd_reg_or_zero as select operand; remove
16103         the aarch64_sve_prepare_conditional_op call.
16104         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
16105         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
16106         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
16107         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
16108         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
16109         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
16110         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
16111         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
16112         and a splitters to match all of the *_any patterns.
16113         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
16115         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
16116         (SVE_COND_FP_BINARY_REV): Remove.
16117         (sve_int_op_rev, sve_fp_op_rev): New.
16118         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
16119         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
16120         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
16121         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
16122         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
16123         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
16124         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
16125         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
16126         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
16128         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
16129         Remove match_dup 1 from the inner unspec.
16130         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
16132         * config/aarch64/aarch64.md (movprfx): New attr.
16133         (length): Default movprfx to 8.
16134         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
16135         (*madd<SVE_I>, *msub<SVE_I): Likewise.
16136         (*<su>mul<SVE_I>3_highpart): Likewise.
16137         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
16138         (*v<ASHIFT><SVE_I>3): Likewise.
16139         (*<su><MAXMIN><SVE_I>3): Likewise.
16140         (*<su><MAXMIN><SVE_F>3): Likewise.
16141         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
16142         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
16143         (*div<SVE_F>4): Likewise.
16145 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
16147         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
16148         in dump string.
16150 2018-07-02  Richard Biener  <rguenther@suse.de>
16152         PR tree-optimization/86363
16153         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
16154         memset argument refers to a non-variable address.
16156 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
16158         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
16159         {PLUS,MINUS}_EXPR code to...
16160         (adjust_symbolic_bound): ...here,
16161         (combine_bound): ...here,
16162         (set_value_range_with_overflow): ...and here.
16164 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
16166         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
16167         code...
16168         (extract_range_from_abs_expr): ...here.
16170 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
16172         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
16173         -fno-omit-frame-pointer when not optimizing.
16175 2018-07-02  Martin Liska  <mliska@suse.cz>
16177         PR ipa/86279
16178         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
16179         (propagate_nothrow): Likewise.
16181 2018-07-02  Martin Liska  <mliska@suse.cz>
16183         PR ipa/86323
16184         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
16186 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
16188         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
16189         function in r262149, changing "loc" param from source_location to
16190         const dump_location_t &.
16191         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
16192         declaration, as above.
16194 2018-07-01  Paul Koning  <ni1d@arrl.net>
16196         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
16197         -munit-asm, -mgnu-asm, -mdec-asm.
16198         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
16199         (pdp11_output_labelref): New.
16200         (pdp11_output_def): New.
16201         (pdp11_output_addr_vec_elt): New.
16202         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
16203         %# and %@ format codes.
16204         (pdp11_option_override): New.
16205         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
16206         (pdp11_output_ident): New.
16207         (pdp11_asm_named_section): New.
16208         (pdp11_asm_init_sections): New.
16209         (pdp11_file_start): New.
16210         (pdp11_file_end): New.
16211         (output_ascii): Use .ascii/.asciz for -mdec-asm.
16212         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
16213         %o, like %c but octal.
16214         (pdp11_option_override): New.
16215         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
16216         -mdec-asm.
16217         (DATA_SECTION_ASM_OP): Ditto.
16218         (READONLY_DATA_SECTION_ASM_OP): New.
16219         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
16220         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
16221         (ASM_OUTPUT_LABELREF): Ditto.
16222         (ASM_OUTPUT_DEF): Ditto.
16223         (ASM_OUTPUT_EXTERNAL): New.
16224         (ASM_OUTPUT_SOURCE_FILENAME): New.
16225         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
16226         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
16227         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
16228         %# and %@ format codes.
16229         * config/pdp11/pdp11.opt (mgnu-asm): New.
16230         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
16231         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
16232         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
16234 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
16236         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
16237         dereferencing path[] beyond its length.
16238         (debug_path): New.
16239         (debug_all_paths): New.
16240         (rewire_first_differing_edge): New.
16241         (adjust_paths_after_duplication): New.
16242         (duplicate_thread_path): Call adjust_paths_after_duplication.
16243         Add new argument.
16244         (thread_through_all_blocks): Add new argument to
16245         duplicate_thread_path.
16247 2018-06-30  Jim Wilson  <jimw@sifive.com>
16249         * config/riscv/predicates.md (p2m1_shift_operand): New.
16250         (high_mask_shift_operand): New.
16251         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
16252         pattern using p2m1_shift_operand.
16253         (lshsi3_zero_extend_3+2): New combiner pattern using
16254         high_mask_shift_operand.
16256 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
16258         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
16259         split out from...
16260         (vect_recog_rotate_pattern): ...here.
16261         (vect_convert_input): Try to insert casts of invariants in the
16262         preheader.
16263         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
16264         preheader to be empty.
16266 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
16268         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
16269         vector type.  If given, install it in the new statement's
16270         STMT_VINFO_VECTYPE.
16271         (vect_element_precision): New function.
16272         (vect_unpromoted_value): New struct.
16273         (vect_unpromoted_value::vect_unpromoted_value): New function.
16274         (vect_unpromoted_value::set_op): Likewise.
16275         (vect_look_through_possible_promotion): Likewise.
16276         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
16277         (vect_widened_op_tree, vect_convert_input): Likewise.
16278         (vect_convert_inputs, vect_convert_output): Likewise.
16279         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
16280         to handle the optional cast of the multiplication result and
16281         vect_widened_op_tree to detect the widened multiplication itself.
16282         Do not require the input and output of promotion casts to have
16283         the same sign, but base the signedness of the operation on the
16284         input rather than the result.  If the pattern includes two
16285         promotions, check that those promotions have the same sign.
16286         Do not restrict the MULT_EXPR handling to a double-width result;
16287         handle quadruple-width results and wider.  Use vect_convert_inputs
16288         to convert the inputs to the common type.
16289         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
16290         to handle the optional cast of the ABS result.  Also allow a sign
16291         change or a sign extension between the ABS and MINUS.
16292         Use vect_widened_op_tree to detect the widened subtraction and use
16293         vect_convert_inputs to convert the inputs to the common type.
16294         (vect_handle_widen_op_by_const): Delete.
16295         (vect_recog_widen_op_pattern): New function.
16296         (vect_recog_widen_mult_pattern): Use it.
16297         (vect_recog_widen_shift_pattern): Likewise.
16298         (vect_recog_widen_sum_pattern): Use
16299         vect_look_through_possible_promotion to handle the promoted
16300         PLUS_EXPR operand.
16302 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
16304         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
16305         the containing gimple_seq *.
16306         * gimple-iterator.h (gsi_for_stmt): Declare it.
16307         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
16308         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
16309         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
16310         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
16311         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
16312         checks.
16313         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
16314         split out from...
16315         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
16316         statement being replaced is part of an existing pattern
16317         definition sequence, inserting the new pattern statements before
16318         the original one.
16319         (vect_pattern_recog_1): Don't return a bool.  If the statement
16320         is already part of a pattern, instead apply pattern matching
16321         to the pattern definition statements.  Don't clear the
16322         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
16323         (vect_pattern_recog): Don't break after the first match;
16324         continue processing the pattern definition statements instead.
16325         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
16327 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
16329         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
16330         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
16331         (vect_recog_widen_sum_pattern): Use it.
16333 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
16335         * tree-vect-loop.c (vectorizable_reduction): Assert that the
16336         phi is not a pattern statement and has not been replaced by
16337         a pattern statement.
16338         * tree-vect-patterns.c (type_conversion_p): Don't check
16339         STMT_VINFO_IN_PATTERN_P.
16340         (vect_recog_vector_vector_shift_pattern): Likewise.
16341         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
16342         the pattern statement rather than the original statement; check
16343         directly for a WIDEN_MULT_EXPR here.
16344         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
16345         vect_is_simple_use to return the pattern statement rather
16346         than the original statement; use is_pattern_stmt_p to check
16347         for such a pattern statement.
16348         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
16349         to return the pattern statement rather than the original statement;
16350         don't do the same transformation here.
16351         (vect_is_simple_use): If the defining statement has been replaced
16352         by a pattern statement, return the pattern statement instead.
16353         Remove the corresponding (local) transformation from the vectype
16354         overload.
16356 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
16358         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
16359         end and default to null.
16360         * tree-vect-loop.c (vect_create_epilog_for_reduction)
16361         (vectorizable_reduction): Update calls accordingly, dropping the
16362         gimple ** argument if the passed-back statement isn't needed.
16363         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
16364         (vect_recog_rotate_pattern): Likewise.
16365         (vect_recog_mask_conversion_pattern): Likewise.
16366         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
16367         (vect_mask_constant_operand_p): Likewise.
16368         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
16369         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
16370         (get_group_load_store_type, get_load_store_type): Likewise.
16371         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
16372         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
16373         (vectorizable_conversion, vectorizable_assignment): Likewise.
16374         (vectorizable_shift, vectorizable_operation): Likewise.
16375         (vectorizable_store, vect_is_simple_cond): Likewise.
16376         (vectorizable_condition, vectorizable_comparison): Likewise.
16377         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
16378         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
16379         and move it to the end.  Cope with null def_stmt_outs.
16381 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
16383         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
16385 2018-06-29  Jeff Law  <law@redhat.com>
16387         * config/v850/v850.c (v850_legitimate_address_p): Handle large
16388         displacements for TARGET_V850E2V3 and newer.
16389         (TARGET_LRA_P): Remove.  Defaults to LRA now.
16390         * config/v850/v850.md (sign23byte_load): Remove.
16391         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
16392         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
16394 2018-06-29  Martin Liska  <mliska@suse.cz>
16396         PR lto/85759
16397         * coverage.c (coverage_init): Mangle full path name.
16398         * doc/invoke.texi: Document the change.
16399         * gcov-io.c (mangle_path): New.
16400         * gcov-io.h (mangle_path): Likewise.
16401         * gcov.c (mangle_name): Use mangle_path for path mangling.
16403 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16405         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
16406         if starting source register is not even.
16408 2018-06-29  Martin Liska  <mliska@suse.cz>
16410         PR tree-optimization/86263
16411         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
16412         Make edge redirection.
16414 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
16416         * dumpfile.c (dump_loc): Add indentation based on scope depth.
16417         (dump_scope_depth): New variable.
16418         (get_dump_scope_depth): New function.
16419         (dump_begin_scope): New function.
16420         (dump_end_scope): New function.
16421         * dumpfile.h (get_dump_scope_depth): New declaration.
16422         (dump_begin_scope): New declaration.
16423         (dump_end_scope): New declaration.
16424         (class auto_dump_scope): New class.
16425         (AUTO_DUMP_SCOPE): New macro.
16426         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
16427         AUTO_DUMP_SCOPE.
16429 2018-06-29  Richard Biener  <rguenther@suse.de>
16431         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
16432         compute_all_dependences succeeds.
16433         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
16434         exceed --param loop-max-datarefs-for-datadeps.
16436 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
16438         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
16440 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
16442         PR target/86348
16443         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
16444         alternative 0 in preferred_for_speed attribute.
16446 2018-06-28  Paul Koning  <ni1d@arrl.net>
16448         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
16449         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
16450         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
16451         * config/pdp11/pdp11.md: Correct "length" attribute calculation
16452         for shift insn patterns.
16454 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
16456         * cgraph.c (cgraph_node::get_body): Replace assignments to
16457         "dump_file" with calls to set_dump_file.
16458         * dumpfile.c (alt_dump_file): Make static, and group with...
16459         (alt_flags): ...this definition.
16460         (dumps_are_enabled): New variable.
16461         (refresh_dumps_are_enabled): New function.
16462         (set_dump_file): New function.
16463         (set_alt_dump_file): New function.
16464         (gcc::dump_manager::dump_start): Replace assignments to
16465         "dump_file" and "alt_dump_file" with calls to set_dump_file and
16466         set_alt_dump_file.
16467         (gcc::dump_manager::dump_finish): Likewise.
16468         * dumpfile.h (alt_dump_file): Delete decl.
16469         (dumps_are_enabled): New variable decl.
16470         (set_dump_file): New function decl.
16471         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
16472         global.
16473         * tree-nested.c (lower_nested_functions): Replace assignments to
16474         "dump_file" with calls to set_dump_file.
16476 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
16478         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
16479         goto_locus of each outgoing edge of each basic block.
16481 2018-06-28  Richard Biener  <rguenther@suse.de>
16483         * dwarf2out.c (decl_scope_table): Remove.
16484         (push_decl_scope): Likewise.
16485         (pop_decl_scope): Likewise.
16486         (gen_type_die_for_member): Do not call push/pop_decl_scope.
16487         (gen_struct_or_union_type_die): Likewise.
16488         (gen_tagged_type_die): Likewise.
16489         (dwarf2out_init): Do not initialize decl_scope_table.
16490         (dwarf2out_c_finalize): Do not free it.
16492 2018-06-28  Richard Biener  <rguenther@suse.de>
16494         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
16495         deciding whether to not re-use a DIE.
16497 2018-06-28  Richard Biener  <rguenther@suse.de>
16499         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
16500         DW_AT_abstract_origin attribute.
16502 2018-06-28  Martin Liska  <mliska@suse.cz>
16504         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
16505         Use newly introduced constants.
16506         * tree-switch-conversion.h (struct jump_table_cluster):
16507         Define max_ratio_for_size and max_ratio_for_speed.
16509 2018-06-28  Martin Liska  <mliska@suse.cz>
16511         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
16512         Add new checking assert to catch invalid state.
16513         (jump_table_cluster::can_be_handled): Handle single case
16514         clusters.
16515         (jump_table_cluster::is_beneficial): Bail out for such case.
16516         (bit_test_cluster::find_bit_tests):
16517         Add new checking assert to catch invalid state.
16518         (bit_test_cluster::can_be_handled): Handle single case
16519         clusters.
16520         (bit_test_cluster::is_beneficial): Bail out for such case.
16521         (switch_decision_tree::analyze_switch_statement):
16522         Fix comment.
16524 2018-06-28  Martin Liska  <mliska@suse.cz>
16526         * common.opt: Introduce -completion option.
16527         * gcc.c (driver_handle_option): Handle it.
16528         (driver::main): Print completions if completion
16529         is set.
16530         * opt-suggestions.c (option_proposer::get_completions):
16531         New function.
16532         (option_proposer::suggest_completion): Likewise.
16533         (option_proposer::find_param_completions): Likewise.
16534         (verify_autocompletions): Likewise.
16535         (test_completion_valid_options): Likewise.
16536         (test_completion_valid_params): Likewise.
16537         (in_completion_p): Likewise.
16538         (empty_completion_p): Likewise.
16539         (test_completion_partial_match): Likewise.
16540         (test_completion_garbage): Likewise.
16541         (opt_proposer_c_tests): Likewise.
16542         * opt-suggestions.h: Declare new functions.
16543         * opts.c (common_handle_option): Handle OPT__completion_.
16544         * selftest-run-tests.c (selftest::run_tests): Add
16545         opt_proposer_c_tests.
16546         * selftest.c (assert_str_startswith): New.
16547         * selftest.h (assert_str_startswith): Likewise.
16548         (opt_proposer_c_tests): New.
16549         (ASSERT_STR_STARTSWITH): Likewise.
16551 2018-06-28  Martin Liska  <mliska@suse.cz>
16553         * Makefile.in: Add opt-suggestions.o.
16554         * gcc-main.c: Include opt-suggestions.h.
16555         * gcc.c (driver::driver): Likewise.
16556         (driver::~driver): Remove m_option_suggestions.
16557         (driver::build_option_suggestions): Moved to option_proposer.
16558         (driver::suggest_option): Likewise.
16559         (driver::handle_unrecognized_options): Use option_proposer.
16560         * gcc.h (class driver): Add new memver m_option_proposer.
16561         * opt-suggestions.c: New file.
16562         * opt-suggestions.h: New file.
16564 2018-06-28  Martin Liska  <mliska@suse.cz>
16566         * vec.h (class auto_string_vec): New (moved from auto_argvec).
16567         (auto_string_vec::~auto_string_vec): Likewise.
16569 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
16571         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
16572         prevent_decl_creation_for_types fields up and add reset_location field.
16573         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
16574         statement if id->reset_location is true.
16575         (copy_edges_for_bb): Do not set goto_locus on the new edges if
16576         id->reset_location is true.
16577         (copy_phis_for_bb): Force input_location on the arguments if
16578         id->reset_location is true.
16579         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
16580         is set on the function to be inlined.
16582 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
16584         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
16586 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
16588         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
16589         registers for Pmode.
16590         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
16591         hard registers for the clobbered pseudo.
16593 2018-06-27  Paul Koning  <ni1d@arrl.net>
16595         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
16596         mutually exclusive options.
16597         * config/pdp11/constraints.md (h): New constraint.
16598         (O): Update definition to match shift code generation.
16599         (D): New constraint.
16600         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
16601         (CCFP): Remove.
16602         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
16603         function.
16604         (output_jump): Change arguments.
16605         (pdp11_fixed_cc_regs): New function.
16606         (pdp11_cc_mode): Ditto.
16607         (pdp11_expand_shift): Ditto.
16608         (pdp11_assemble_shift): Ditto.
16609         (pdp11_small_shift): Ditto.
16610         (pdp11_branch_cost): Remove.
16611         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
16612         from output.
16613         (pdp11_register_move_cost): Update for CC registers.
16614         (pdp11_rtx_costs): Add case for LSHIFTRT.
16615         (pdp11_output_jump): Add CCNZ mode conditional branches.
16616         (notice_update_cc_on_set): Remove.
16617         (pdp11_cc_mode): New function.
16618         (simple_memory_operand): Correct pre/post decrement case.
16619         (no_side_effect_operand): New function.
16620         (pdp11_regno_reg_class): Add CC_REGS class.
16621         (pdp11_fixed_cc_regs): New function.
16622         (pdp11_small_shift): New function.
16623         (pdp11_expand_shift): New function to expand shift insns.
16624         (pdp11_assemble_shift): New function to output shifts.
16625         (pdp11_branch_cost): Remove.
16626         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
16627         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
16628         (WCHAR_TYPE): Ditto.
16629         (PTRDIFF_TYPE): Ditto.
16630         (ADJUST_INSN_LENGTH): New macro.
16631         (FIXED_REGISTERS): Add CC registers.
16632         (CALL_USED_REGISTERS): Ditto.
16633         (reg_class): Ditto.
16634         (REG_CLASS_NAMES): Ditto.
16635         (REG_CLASS_CONTENTS): Ditto.
16636         (SELECT_CC_MODE): Use new function.
16637         (TARGET_FLAGS_REGNUM): New macro.
16638         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
16639         (cc0_reg_rtx): Remove.
16640         (CC_STATUS_MDEP): Remove.
16641         (CC_STATUS_MDEFP_INIT): Remove.
16642         (CC_IN_FPU): Remove.
16643         (NOTICE_UPDATE_CC): Remove.
16644         (REGISTER_NAMES): Add CC registers.
16645         (BRANCH_COST): Change to constant 1.
16646         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
16647         handling.
16648         * config/pdp11/pdp11.opt (mbcopy): Remove.
16649         (mbcopy-builtin): Remove.
16650         (mbranch-cheap): Remove.
16651         (mbranch-expensive): Remove.
16652         * config/pdp11/predicates.md (expand_shift_operand): Update to
16653         match shift code generation.
16654         (ccnz_operator): New predicate.
16655         * doc/invoke.texi (PDP-11 Options): Remove deleted options
16656         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
16657         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
16658         exclusive options.
16659         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
16660         description of O constraint.
16662 2018-06-27  Jeff Law  <law@redhat.com>
16663             Austin Law  <austinklaw@gmail.com>
16665         * config/v850/v850.md (addsi3_set_flags): New pattern.
16666         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
16667         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
16668         (zero_extendhisi2_v850_set_flags): Likewise.
16669         (zero_extendqisi2_v850_set_flags): Likewise.
16670         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
16671         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
16672         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
16674         * config/v850/v850-protos.h (notice_update_cc): Remove.
16675         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
16676         (v850_print_operand): Handle 'D' and "d".
16677         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
16678         Add handling of arithmetic/logical operations compared against zero.
16679         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
16680         Do not look at v850_compare_op, instead get mode from last argument.
16681         (v850_gen_compare): Remove
16682         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
16683         after reload for prologue insns.
16684         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
16685         patterns.
16686         (construct_save_jarl): Likewise.
16687         (TARGET_FLAGS_REGNUM): Define.
16688         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
16689         (NOTICE_UPDATE_CC): Remove.
16690         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
16691         than cc0.  Conditionalize on reload_completed.
16692         (cmpsi_insn, setfcc_insn): Likewise.
16693         (tst1 splitter): Turn into define_and_split which sets the flags
16694         after reload.
16695         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
16696         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
16697         (cstoresf4, cstoredf4): Clobber the flags.
16698         (cmpsi, cmpsf, cmpdf): Remove expanders.
16699         (setf_insn): Remove pattern.
16700         (addsi3): Turn into define_and_split which clobbers the flags after
16701         reload and a suitable pattern (addsi3_clobber_flags) for use after
16702         reload.
16703         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
16704         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
16705         (ashrsi3, ashrsi3_v850e2): Likewise.
16706         (bins): Clobber the flags.
16707         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
16708         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
16709         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
16710         (call_value_internal_short, call_value_internal_long): Likewise.
16711         (callt_save_interrupt, callt_return_interrupt): Likewise.
16712         (save_interrupt, return_interrupt): Likewise.
16713         (callt_save_all_interrupt, save_all_interrupt): Likewise.
16714         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
16715         (restore_all_interrupt, _restore_all_interrupt): Likewise.
16716         (All FP comparisons): Only allow after reload has completed.
16717         (trfsr): Likewise.
16718         (divh, divhu): Tweak output template.
16719         (branch_z_normal, branch_z_invert): Remove
16720         (branch_nz_normal, branch_nz_invert): Likewise.
16721         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
16723         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
16724         * config/v850/v850.c (notice_update_cc): Remove.
16725         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
16726         (CC_NO_CARRY): Likewise.
16727         (NOTICE_UPDATE_CC): Define to nothing.
16728         * config/v850/v850.md: Remove block comment on cc0 handling
16729         Remove "cc" attribute from all patterns.  Remove cc_status handling
16730         from all patterns.  Minor formatting fixes.
16732 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16734         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
16735         (cortex-a76.cortex-a55): Likewise.
16736         * config/aarch64/aarch64-tune.md: Regenerate.
16737         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
16738         cortex-a76.cortex-a55.
16740 2018-06-27  Jeff Law  <law@redhat.com>
16742         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
16743         (MULTILIB_DIRNAMES): Similarly.
16745 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
16747         * gimple.h (gimple_return_retbnd): Delete.
16748         (gimple_return_set_retbnd): Likewise.
16749         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
16750         gimple_return_set_retbnd.
16751         * gimple-pretty-print.c (dump_gimple_return): Remove call to
16752         gimple_return_retbnd and adjust.
16753         * tree-inline.h (struct copy_body_data): Remove retbnd field.
16754         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
16755         Explicitly return NULL in a couple more cases.  Move assertion
16756         on debug statements and remove unreachable code.
16757         (reset_debug_binding): Do not test id->retbnd.
16758         (expand_call_inline): Do not set it.
16760 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
16762         * configure.ac: Add --disable-gcov option.
16763         * configure: Regenerate.
16764         * Makefile.in: Honour @enable_gcov@.
16765         * doc/install.texi: Document --disable-gcov.
16767 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16769         * config/arm/arm-cpus.in (cortex-a76): New entry.
16770         (cortex-a76.cortex-a55): Likewise.
16771         * config/arm/arm-tables.opt: Regenerate.
16772         * config/arm/arm-tune.md: Likewise.
16773         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
16774         * doc/invoke.texi (ARM Options): Document cortex-a76 and
16775         cortex-a76.cortex-a55.
16777 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
16779         PR target/85769
16780         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
16782 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
16784         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
16785         comment.
16786         (EPILOGUE_USES): Likewise.
16788 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
16790         * tree-inline.c (remap_location): New function extracted from...
16791         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
16792         (copy_phis_for_bb): ...here.  Call remap_location.
16793         (copy_cfg_body): Adjust call to copy_edges_for_bb.
16795 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
16797         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
16798         unaligned vsx for 16B memset.
16800 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
16802         PR target/86285
16803         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
16804         ieee128_float_type_node to long_double_type_node unless
16805         TARGET_LONG_DOUBLE_128 is set.
16807 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
16809         * cfgloop.c (get_loop_location): Convert return type from
16810         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
16811         by implicit construction from rtx_insn *, and using
16812         dump_user_location_t::from_function_decl for the fallback case.
16813         * cfgloop.h (get_loop_location): Convert return type from
16814         location_t to dump_user_location_t.
16815         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
16816         dump_printf_loc to pass in a dump_location_t rather than a
16817         location_t, via the gimple stmt.
16818         * coverage.c (get_coverage_counts): Update calls to
16819         dump_printf_loc to pass in dump_location_t rather than a
16820         location_t.
16821         * doc/optinfo.texi (Dump types): Convert example of
16822         dump_printf_loc from taking "locus" to taking "insn".  Update
16823         description of the "_loc" calls to cover dump_location_t.
16824         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
16825         "selftest.h".
16826         (dump_user_location_t::dump_user_location_t): New constructors,
16827         from gimple *stmt and rtx_insn *.
16828         (dump_user_location_t::from_function_decl): New function.
16829         (dump_loc): Make static.
16830         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
16831         const dump_location_t &.
16832         (dump_generic_expr_loc): Delete.
16833         (dump_printf_loc): Convert param "loc" from location_t to
16834         const dump_location_t &.
16835         (selftest::test_impl_location): New function.
16836         (selftest::dumpfile_c_tests): New function.
16837         * dumpfile.h: Include "profile-count.h".
16838         (class dump_user_location_t): New class.
16839         (struct dump_impl_location_t): New struct.
16840         (class dump_location_t): New class.
16841         (dump_printf_loc): Convert 2nd param from source_location to
16842         const dump_location_t &.
16843         (dump_generic_expr_loc): Delete.
16844         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
16845         const dump_location_t &.
16846         * gimple-fold.c (fold_gimple_assign): Update call to
16847         dump_printf_loc to pass in a dump_location_t rather than a
16848         location_t, via the gimple stmt.
16849         (gimple_fold_call): Likewise.
16850         * gimple-loop-interchange.cc
16851         (loop_cand::analyze_iloop_reduction_var): Update for change to
16852         check_reduction_path.
16853         (tree_loop_interchange::interchange): Update for change to
16854         find_loop_location.
16855         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
16856         change in return-type of find_loop_location.
16857         (graphite_regenerate_ast_isl): Likewise.
16858         * graphite-optimize-isl.c (optimize_isl): Likewise.
16859         * graphite.c (graphite_transform_loops): Likewise.
16860         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
16861         pass in a dump_location_t rather than a location_t, via the
16862         gimple stmt.
16863         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
16864         * ipa.c (walk_polymorphic_call_targets): Likewise.
16865         * loop-unroll.c (report_unroll): Convert "locus" param from
16866         location_t to dump_location_t.
16867         (decide_unrolling): Update for change to get_loop_location's
16868         return type.
16869         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
16870         location_t to dump_user_location_t.
16871         (grid_find_single_omp_among_assignments_1): Updates calls to
16872         dump_printf_loc to pass in a dump_location_t rather than a
16873         location_t, via the gimple stmt.
16874         (grid_parallel_clauses_gridifiable): Convert "tloc" from
16875         location_t to dump_location_t.  Updates calls to dump_printf_loc
16876         to pass in a dump_location_t rather than a location_t, via the
16877         gimple stmt.
16878         (grid_inner_loop_gridifiable_p): Likewise.
16879         (grid_dist_follows_simple_pattern): Likewise.
16880         (grid_gfor_follows_tiling_pattern): Likewise.
16881         (grid_target_follows_gridifiable_pattern): Likewise.
16882         (grid_attempt_target_gridification): Convert initialization
16883         of local "grid" from memset to zero-initialization; FIXME: does
16884         this require C++11?  Update call to dump_printf_loc to pass in a
16885         optinfo_location rather than a location_t, via the gimple stmt.
16886         * profile.c (read_profile_edge_counts): Updates call to
16887         dump_printf_loc to pass in a dump_location_t rather than a
16888         location_t
16889         (compute_branch_probabilities): Likewise.
16890         * selftest-run-tests.c (selftest::run_tests): Call
16891         dumpfile_c_tests.
16892         * selftest.h (dumpfile_c_tests): New decl.
16893         * tree-loop-distribution.c (pass_loop_distribution::execute):
16894         Update for change in return type of find_loop_location.
16895         * tree-parloops.c (parallelize_loops): Likewise.
16896         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
16897         "locus" from location_t to dump_user_location_t.
16898         (canonicalize_loop_induction_variables): Likewise.
16899         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
16900         for change in return type of find_loop_location.
16901         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
16902         to dump_printf_loc to pass in a dump_location_t rather than a
16903         location_t, via the stmt.
16904         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
16905         Likewise.
16906         * tree-vect-loop-manip.c (find_loop_location): Convert return
16907         type from source_location to dump_user_location_t.
16908         (vect_do_peeling): Update for above change.
16909         (vect_loop_versioning): Update for change in type of
16910         vect_location.
16911         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
16912         from location_t to dump_user_location_t.
16913         (vect_estimate_min_profitable_iters): Update for change in type
16914         of vect_location.
16915         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
16916         location_t to dump_location_t.
16917         (vect_slp_bb): Update for change in type of vect_location.
16918         * tree-vectorizer.c (vect_location): Convert from source_location
16919         to dump_user_location_t.
16920         (try_vectorize_loop_1): Update for change in vect_location's type.
16921         (vectorize_loops): Likewise.
16922         (increase_alignment): Likewise.
16923         * tree-vectorizer.h (vect_location): Convert from source_location
16924         to dump_user_location_t.
16925         (find_loop_location): Convert return type from source_location to
16926         dump_user_location_t.
16927         (check_reduction_path): Convert 1st param from location_t to
16928         dump_user_location_t.
16929         * value-prof.c (check_counter): Update call to dump_printf_loc to
16930         pass in a dump_user_location_t rather than a location_t; update
16931         call to error_at for change in type of "locus".
16932         (check_ic_target): Update call to dump_printf_loc to
16933         pass in a dump_user_location_t rather than a location_t, via the
16934         call_stmt.
16936 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
16938         * config/s390/s390.h (enum processor_flags): Do not use
16939         default tune parameter when -march was specified.
16941 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
16943         PR target/86314
16944         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
16945         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
16946         operands.
16948 2018-06-26  Richard Biener  <rguenther@suse.de>
16950         PR tree-optimization/86287
16951         PR bootstrap/86316
16952         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
16953         (vect_analyze_loop): Initialize n_stmts.
16955 2018-06-26  Richard Biener  <rguenther@suse.de>
16957         PR middle-end/86271
16958         * fold-const.c (fold_convertible_p): Pointer extension
16959         isn't valid.
16961 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
16963         PR debug/86064
16964         * dwarf2out.c (loc_list_has_views): Adjust comments.
16965         (dw_loc_list): Split single cross-partition range with
16966         nonzero locview.
16968 2018-06-25  Jeff Law  <law@redhat.com>
16970         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
16971         on -mbig-switch by default.
16973         * config/v850/predicates.md (const_float_1_operand): Fix match_code
16974         test.
16975         (const_float_0_operand): Remove unused predicate.
16976         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
16977         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
16978         (recipsf2): New expander.  Original pattern now called
16979         (recipsf2_insn).
16980         (recipdf2, recipdf2_insn): Similarly.
16981         (rsqrtsf2, rsqrtsf2_insn): Similarly
16982         (rsqrtdf2, rsqrtdf2_insn): Similarly
16984 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
16986         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
16987         Simplify logic for FreeBSD (twice).
16989 2018-06-25  Martin Sebor  <msebor@redhat.com>
16991         PR tree-optimization/86204
16992         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
16993         a strnlen result if it's less than the length of the string.
16995 2018-06-25  Martin Sebor  <msebor@redhat.com>
16997         PR tree-optimization/85700
16998         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
16999         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
17000         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
17002 2018-06-25  Martin Sebor  <msebor@redhat.com>
17004         * doc/extend.texi (Zero-length arrays): Update and clarify.
17006 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
17008         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
17009         added IEEE/IBM long double multilib support on PowerPC little
17010         endian Linux systems.
17011         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
17012         (MULTILIB_DEFAULTS): Likewise.
17013         * config/rs6000/rs6000.c (rs6000_option_override_internal):
17014         Likewise.
17015         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
17016         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
17017         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
17019 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
17021         PR middle-end/86311
17022         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
17023         (REORDER_45): Likewise.
17025 2018-06-25  Jeff Law  <law@redhat.com>
17027         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
17028         dividend to 32 bits.  Adjust length.
17029         (udivmodhi4): Cleanup output template.  Fix length.
17031 2018-06-25  Carl Love  <cel@us.ibm.com>
17033         * config/rs6000/vsx.md: Change word selector to prefered location.
17035 2018-06-25  Richard Biener  <rguenther@suse.de>
17037         PR tree-optimization/86304
17038         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
17039         epilogue-if-converted loops as well.
17041 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
17043         * lto-section-out.c (lto_begin_section): Do not print section
17044         name for noaddr and unnumbered dumps.
17046 2018-06-25  Richard Biener  <rguenther@suse.de>
17048         * tree-vectorizer.h (struct vec_info_shared): New structure
17049         with parts split out from struct vec_info and loop_nest from
17050         struct _loop_vec_info.
17051         (struct vec_info): Adjust accordingly.
17052         (struct _loop_vec_info): Likewise.
17053         (LOOP_VINFO_LOOP_NEST): Adjust.
17054         (LOOP_VINFO_DATAREFS): Likewise.
17055         (LOOP_VINFO_DDRS): Likewise.
17056         (struct _bb_vec_info): Likewise.
17057         (BB_VINFO_DATAREFS): Likewise.
17058         (BB_VINFO_DDRS): Likewise.
17059         (struct _stmt_vec_info): Add dr_aux member.
17060         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
17061         (DR_MISALIGNMENT_UNINITIALIZED): New.
17062         (set_dr_misalignment): Adjust.
17063         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
17064         (vect_analyze_loop): Adjust prototype.
17065         (vect_analyze_loop_form): Likewise.
17066         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
17067         Compute dependences lazily.
17068         (vect_record_base_alignments): Use shared datarefs/ddrs.
17069         (vect_verify_datarefs_alignment): Likewise.
17070         (vect_analyze_data_refs_alignment): Likewise.
17071         (vect_analyze_data_ref_accesses): Likewise.
17072         (vect_analyze_data_refs): Likewise.
17073         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
17074         constructor parameter for shared part.
17075         (vect_analyze_loop_form): Pass in shared part and adjust.
17076         (vect_analyze_loop_2): Pass in storage for the number of
17077         stmts.  Move loop nest finding to the caller.  Compute
17078         datarefs lazily.
17079         (vect_analyze_loop): Pass in shared part.
17080         (vect_transform_loop): Verify shared datarefs are unchanged.
17081         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
17082         constructor parameter for shared part.
17083         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
17084         (vect_slp_bb): Verify shared datarefs are unchanged before
17085         transform.
17086         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
17087         change.
17088         (new_stmt_vec_info): Initialize DR_AUX misalignment to
17089         DR_MISALIGNMENT_UNINITIALIZED.
17090         * tree-vectorizer.c (vec_info::vec_info): Add constructor
17091         parameter for shared part.
17092         (vec_info::~vec_info): Adjust.
17093         (vec_info_shared::vec_info_shared): New.
17094         (vec_info_shared::~vec_info_shared): Likewise.
17095         (vec_info_shared::save_datarefs): Likewise.
17096         (vec_info_shared::check_datarefs): Likewise.
17097         (try_vectorize_loop_1): Construct shared part live for analyses
17098         of a single loop for multiple vector sizes.
17099         * tree-parloops.c (gather_scalar_reductions): Adjust.
17101 2018-06-25  Richard Biener  <rguenther@suse.de>
17103         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
17104         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
17105         (vect_analyze_data_refs): Remove similar code from here and
17106         simplify accordingly.
17108 2018-06-25  Richard Biener  <rguenther@suse.de>
17110         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
17111         for reverse storage order accesses rather than asserting
17112         they cannot happen here.
17114 2018-06-25  Tom de Vries  <tdevries@suse.de>
17116         PR debug/86257
17117         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
17118         Use data16 instead of .byte for insn prefix.
17120 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
17122         PR C++/86082
17123         * parser.c (make_char_string_pack): Pass this literal chars
17124         through cpp_interpret_string.
17125         (cp_parser_userdef_numeric_literal): Check the result of
17126         make_char_string_pack.
17128 2018-06-24  Maya Rashish  <coypu@sdf.org>
17130         * ginclude/stddef.h: Simplify conditions around avoiding
17131         re-definition of __size_t.
17133 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
17135         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
17136         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
17138 2018-06-22  Maya Rashish  <coypu@sdf.org>
17140         * doc/invoke.texi (mno-fancy-math-387): Update for changes
17141         made to OpenBSD and NetBSD through the years.
17143 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17145         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
17146         behavior of vec_pack (vector double, vector double) to match
17147         behavior of vec_float2 (vector double, vector double).
17149 2018-06-22  Olivier Hainque  <hainque@adacore.com>
17151         * gimplify.c (gimplify_function_tree): Prevent creation
17152         of a trampoline for the address of the current function
17153         passed to entry/exit instrumentation hooks.
17155 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
17157         PR target/86222
17158         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
17159         correctly.
17161 2018-06-22  Martin Liska  <mliska@suse.cz>
17163         PR tree-optimization/86263
17164         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
17165         Bail out if is_enabled is false.
17166         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
17167         New declaration.
17168         (jump_table_cluster::is_enabled): New function.
17170 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
17172         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
17173         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
17174         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
17175         (lto_input_ts_binfo_tree_pointers): Likewise.
17176         * tree-streamer-out.c (streamer_write_tree_bitfields,
17177         write_ts_binfo_tree_pointers): Likewise.
17178         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
17180 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
17182         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
17184 2018-06-22  Martin Liska  <mliska@suse.cz>
17186         * symbol-summary.h (get): Make it pure and inline move
17187         functionality from ::get function.
17188         (get): Remove and inline into ::get and ::get_create.
17189         (get_create): Move code from ::get function.
17191 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17193         PR target/85994
17194         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
17195         -x assembler-with-cpp.
17197 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17199         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
17200         _FILE_OFFSET_BITS=64 for C++.
17202 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
17204         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
17205         conversion insn that shows up when pr85657-3.c is compiled using
17206         IEEE 128-bit long double.
17207         (neg<mode>2_internal): Use the correct mode to check whether the
17208         mode is IBM extended.
17209         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
17210         multiply and divide external functions from being created more
17211         than once.
17213 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
17215         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
17216         functions.
17217         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
17218         the edge can be forwarded.
17219         (cfg_layout_merge_blocks): Likewise.
17221 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
17223         * except.c (finish_eh_generation): Commit edge insertions only after
17224         the EH edges have been redirected from post-landing to landing pads.
17226 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
17228         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
17229         create_tmp_var_for to create the FRAME decl.
17230         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
17232 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
17234         * tree-inline.c (copy_edges_for_bb): Minor tweak.
17235         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
17236         debug statement when resetting its value.
17237         (expand_call_inline): Copy the locus of the call onto the assignment
17238         of the return value, if any.  Use local variable in more cases.
17240 2018-06-21  Martin Liska  <mliska@suse.cz>
17242         * ipa-pure-const.c (propagate_nothrow): Use
17243         funct_state_summaries->get.
17244         (dump_malloc_lattice): Likewise.
17245         (propagate_malloc): Likewise.
17247 2018-06-21  Richard Biener  <rguenther@suse.de>
17249         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
17250         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
17251         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
17252         comment.
17253         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
17254         BLOCK_ABSTRACT_ORIGIN unconditionally.
17256 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
17258         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
17259         deleting it.
17260         * ipa-reference.c (ipa_reference_c_finalize): Delete
17261         ipa_ref_opt_sum_summaries and set it to NULL.
17263 2018-06-21  Tom de Vries  <tdevries@suse.de>
17265         PR tree-optimization/85859
17266         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
17267         test with comment from bb_no_side_effects_p.
17269 2018-06-21  Richard Biener  <rguenther@suse.de>
17271         PR tree-optimization/86232
17272         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
17273         max for constant niter.
17275 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
17277         * config/aarch64/aarch64-simd.md
17278         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
17280 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
17282         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
17283         Make opernads of the unspec commutative.
17285 2018-06-21  Richard Biener  <rguenther@suse.de>
17287         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
17288         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
17289         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
17290         (vect_analyze_data_ref_dependence): Re-order checks to deal with
17291         NULL DR_STEP.
17292         (vect_record_base_alignments): Do not record base alignment
17293         for gathers or scatters.
17294         (vect_compute_data_ref_alignment): Drop return value that is always
17295         true.  Bail out early for gathers or scatters.
17296         (vect_enhance_data_refs_alignment): Bail out early for gathers
17297         or scatters.
17298         (vect_find_same_alignment_drs): Likewise.
17299         (vect_analyze_data_refs_alignment): Remove dead code.
17300         (vect_slp_analyze_and_verify_node_alignment): Likewise.
17301         (vect_analyze_data_refs): For possible gathers or scatters do
17302         not create an alternate DR, just check their possible validity
17303         and mark them.  Adjust DECL_NONALIASED handling to not rely
17304         on DR_BASE_ADDRESS.
17305         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
17306         update inits of gathers or scatters.
17307         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
17308         Also copy gather/scatter flag to pattern vinfo.
17310 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17312         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
17313         behavior of vec_packsu (vector unsigned long long, vector unsigned
17314         long long) to match behavior of vec_packs with same signature.
17316 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
17317             Thomas Schwinge <thomas@codesourcery.com>
17318             Cesar Philippidis  <cesar@codesourcery.com>
17320         * gimplify.c (gimplify_scan_omp_clauses): Add support for
17321         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
17322         (gimplify_adjust_omp_clauses): Likewise.
17323         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
17324         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
17325         (gimplify_omp_target_update): Update handling of acc update and
17326         enter/exit data.
17327         * omp-low.c (install_var_field): Remove unused parameter
17328         base_pointers_restrict.
17329         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
17330         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
17331         FINALIZE}
17332         (omp_target_base_pointers_restrict_p): Delete.
17333         (scan_omp_target): Update call to scan_sharing_clauses.
17334         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
17335         FINALIZE}.
17336         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
17337         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
17338         (convert_local_omp_clauses): Likewise.
17339         * tree-pretty-print.c (dump_omp_clause): Likewise.
17340         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
17341         FINALIZE}.
17342         (omp_clause_code_name): Likewise.
17344 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
17346         PR debug/86194
17347         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
17348         be narrowed.
17350         PR tree-optimization/86231
17351         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
17352         anti-range don't overwrite *vr0min before using it to compute *vr0max.
17354 2018-06-20  Tom de Vries  <tdevries@suse.de>
17356         PR tree-optimization/86097
17357         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
17358         iv type if signedness of iv type is not the same as that of *nit.
17360 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
17362         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
17363         EDGE_EH edges, verify they are all EDGE_EH.
17365 2018-06-20  Maya Rashish  <coypu@sdf.org>
17367         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
17369 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17371         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
17372         * config/aarch64/aarch64.c (xgene1_tunings): Add
17373         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
17374         (aarch64_mode_valid_for_sched_fusion_p):
17375         Allow 16-byte modes.
17376         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
17377         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
17378         128-bit modes.
17379         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
17380         New pattern.
17381         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
17382         * config/aarch64/iterators.md (VQ2): New mode iterator.
17384 2018-06-20  Martin Liska  <mliska@suse.cz>
17386         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
17387         Change default ratio from 10 to 8.
17389 2018-06-20  Martin Liska  <mliska@suse.cz>
17391         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
17392         New.
17393         (bit_test_cluster::find_bit_tests): Likewise.
17394         (switch_decision_tree::analyze_switch_statement): Find clusters.
17395         * tree-switch-conversion.h (struct jump_table_cluster): Document
17396         hierarchy.
17398 2018-06-20  Martin Liska  <mliska@suse.cz>
17400         * tree-switch-conversion.c (switch_conversion::collect):
17401         Record m_uniq property.
17402         (switch_conversion::expand): Bail out for special conditions.
17403         (group_cluster::~group_cluster): New.
17404         (group_cluster::group_cluster): Likewise.
17405         (group_cluster::dump): Likewise.
17406         (jump_table_cluster::emit): New.
17407         (switch_decision_tree::fix_phi_operands_for_edges): New.
17408         (struct case_node): Remove struct.
17409         (jump_table_cluster::can_be_handled): New.
17410         (case_values_threshold): Moved to header.
17411         (reset_out_edges_aux): Likewise.
17412         (jump_table_cluster::is_beneficial): New.
17413         (bit_test_cluster::can_be_handled): Likewise.
17414         (add_case_node): Remove.
17415         (bit_test_cluster::is_beneficial): New.
17416         (case_bit_test::cmp): New.
17417         (bit_test_cluster::emit): New.
17418         (expand_switch_as_decision_tree_p): Remove.
17419         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
17420         (fix_phi_operands_for_edge): Likewise.
17421         (switch_decision_tree::analyze_switch_statement): New.
17422         (compute_cases_per_edge): Move ...
17423         (switch_decision_tree::compute_cases_per_edge): ... here.
17424         (try_switch_expansion): Likewise.
17425         (switch_decision_tree::try_switch_expansion): Likewise.
17426         (record_phi_operand_mapping): Likewise.
17427         (switch_decision_tree::record_phi_operand_mapping): Likewise.
17428         (emit_case_decision_tree): Likewise.
17429         (switch_decision_tree::emit): Likewise.
17430         (balance_case_nodes): Likewise.
17431         (switch_decision_tree::balance_case_nodes): Likewise.
17432         (dump_case_nodes): Likewise.
17433         (switch_decision_tree::dump_case_nodes): Likewise.
17434         (emit_jump): Likewise.
17435         (switch_decision_tree::emit_jump): Likewise.
17436         (emit_cmp_and_jump_insns): Likewise.
17437         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
17438         (emit_case_nodes): Likewise.
17439         (switch_decision_tree::emit_case_nodes): Likewise.
17440         (conditional_probability): Remove.
17441         * tree-switch-conversion.h (enum cluster_type): New.
17442         (PRINT_CASE): New.
17443         (struct cluster): Likewise.
17444         (cluster::cluster): Likewise.
17445         (struct simple_cluster): Likewise.
17446         (simple_cluster::simple_cluster): Likewise.
17447         (struct group_cluster): Likewise.
17448         (struct jump_table_cluster): Likewise.
17449         (struct bit_test_cluster): Likewise.
17450         (struct min_cluster_item): Likewise.
17451         (struct case_tree_node): Likewise.
17452         (case_tree_node::case_tree_node): Likewise.
17453         (jump_table_cluster::case_values_threshold): Likewise.
17454         (struct case_bit_test): Likewise.
17455         (struct switch_decision_tree): Likewise.
17456         (struct switch_conversion): Likewise.
17457         (switch_decision_tree::reset_out_edges_aux): Likewise.
17459 2018-06-20  Martin Liska  <mliska@suse.cz>
17461         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
17462         (hoist_edge_and_branch_if_true): Likewise.
17463         (expand_switch_using_bit_tests_p): Likewise.
17464         (struct case_bit_test): Likewise.
17465         (case_bit_test_cmp): Likewise.
17466         (emit_case_bit_tests): Likewise.
17467         (switch_conversion::switch_conversion): New class.
17468         (struct switch_conv_info): Remove old struct.
17469         (collect_switch_conv_info): More to ...
17470         (switch_conversion::collect): ... this.
17471         (check_range): Likewise.
17472         (switch_conversion::check_range): Likewise.
17473         (check_all_empty_except_final): Likewise.
17474         (switch_conversion::check_all_empty_except_final): Likewise.
17475         (check_final_bb): Likewise.
17476         (switch_conversion::check_final_bb): Likewise.
17477         (create_temp_arrays): Likewise.
17478         (switch_conversion::create_temp_arrays): Likewise.
17479         (free_temp_arrays): Likewise.
17480         (gather_default_values): Likewise.
17481         (switch_conversion::gather_default_values): Likewise.
17482         (build_constructors): Likewise.
17483         (switch_conversion::build_constructors): Likewise.
17484         (constructor_contains_same_values_p): Likewise.
17485         (switch_conversion::contains_same_values_p): Likewise.
17486         (array_value_type): Likewise.
17487         (switch_conversion::array_value_type): Likewise.
17488         (build_one_array): Likewise.
17489         (switch_conversion::build_one_array): Likewise.
17490         (build_arrays): Likewise.
17491         (switch_conversion::build_arrays): Likewise.
17492         (gen_def_assigns): Likewise.
17493         (switch_conversion::gen_def_assigns): Likewise.
17494         (prune_bbs): Likewise.
17495         (switch_conversion::prune_bbs): Likewise.
17496         (fix_phi_nodes): Likewise.
17497         (switch_conversion::fix_phi_nodes): Likewise.
17498         (gen_inbound_check): Likewise.
17499         (switch_conversion::gen_inbound_check): Likewise.
17500         (process_switch): Use the newly created class.
17501         (switch_conversion::expand): New.
17502         (switch_conversion::~switch_conversion): New.
17503         * tree-switch-conversion.h: New file.
17505 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
17507         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
17508         tree-vect-patterns.c.
17509         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
17510         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
17511         (vect_recog_sad_pattern): Likewise.
17512         (vect_recog_widen_sum_pattern): Likewise.
17513         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
17514         (vect_recog_widen_shift_pattern): Remove the type_in argument.
17515         (vect_recog_rotate_pattern): Likewise.
17516         (vect_recog_mult_pattern): Likewise.
17517         (vect_recog_vector_vector_shift_pattern): Likewise.
17518         (vect_recog_divmod_pattern): Likewise.
17519         (vect_recog_mixed_size_cond_pattern): Likewise.
17520         (vect_recog_bool_pattern): Likewise.
17521         (vect_recog_mask_conversion_pattern): Likewise.
17522         (vect_try_gather_scatter_pattern): Likewise.
17523         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
17524         (vect_recog_over_widening_pattern): Likewise.
17525         (vect_recog_gather_scatter_pattern): Likewise.
17526         (vect_recog_func_ptr): Move from tree-vectorizer.h
17527         (vect_vect_recog_func_ptrs): Move further down the file.
17528         (vect_recog_func): Likewise.  Remove the third argument.
17529         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
17530         (vect_pattern_recog_1): Expect the pattern function to do any
17531         necessary target tests.  Also expect it to provide a vector type.
17532         Remove the type_in handling.
17534 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
17536         * tree-vect-patterns.c (vect_pattern_detected): New function.
17537         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
17538         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
17539         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
17540         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
17541         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
17542         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
17543         (vect_recog_mask_conversion_pattern)
17544         (vect_try_gather_scatter_pattern): Likewise.
17546 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
17548         * tree-vect-patterns.c (vect_get_internal_def): New function.
17549         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
17550         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
17551         (search_type_for_mask_1): Use it.
17553 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
17555         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
17556         redundant WIDEN_SUM_EXPR handling.
17557         (vect_recog_sad_pattern): Likewise.
17559 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
17561         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
17562         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
17563         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
17564         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
17565         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
17567 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
17569         * tree-vect-stmts.c (vectorizable_call): Make sure that we
17570         use the stmt_vec_info of the original bb statement for the
17571         new zero assignment, even if the call is part of a pattern.
17573 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
17575         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
17576         that the sequence is attached to the original statement rather
17577         than the pattern statement.
17578         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
17579         PATTERN_DEF_SEQ from the original statement rather than
17580         the main pattern statement.
17581         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
17582         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
17583         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
17585 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
17587         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
17588         definition statements before the early exit for statements that aren't
17589         live or relevant.
17590         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
17591         split out from...
17592         (vect_transform_loop): ...here.  Process pattern definition
17593         statements without first checking whether the main pattern
17594         statement is live or relevant.
17596 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
17598         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
17599         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
17601 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
17603         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
17604         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
17605         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
17606         (expand_block_compare): Change select_block_compare_mode call.
17607         (expand_strncmp_align_check): Use new functions, fix comment.
17608         (emit_final_str_compare_gpr): New function.
17609         (expand_strn_compare): Refactor and clean up code.
17610         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
17612 2018-06-19  Tony Reix  <tony.reix@atos.com>
17613             Damien Bergamini  <damien.bergamini@atos.com>
17614             David Edelsohn  <dje.gcc@gmail.com>
17616         * collect2.c (static_obj): New variable.
17617         (static_libs): New variable.
17618         (is_in_list): Uncomment declaration.
17619         (main): Track AIX libraries linked statically.
17620         (is_in_list): Uncomment definition.
17621         (scan_prog_file): Don't add AIX shared libraries initializer
17622         to constructor list if linking statically.
17624 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
17626         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
17627         constant.
17628         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
17630 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
17632         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
17633         blocks.
17635 2018-06-19  Martin Liska  <mliska@suse.cz>
17637         * config/i386/i386.c (ix86_can_inline_p): Do not use
17638         ipa_fn_summaries::get_create.
17639         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
17640         get.
17641         (devirtualization_time_bonus): Likewise.
17642         (ipcp_propagate_stage): Likewise.
17643         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
17644         (edge_set_predicate): Likewise.
17645         (evaluate_conditions_for_known_args): Likewise.
17646         (evaluate_properties_for_edge): Likewise.
17647         (ipa_call_summary::reset): Tranform to ...
17648         (ipa_call_summary::~ipa_call_summary): ... this.
17649         (ipa_fn_summary::reset): Transform to ...
17650         (ipa_fn_summary::~ipa_fn_summary): ... this.
17651         (ipa_fn_summary_t::remove): Rename to ...
17652         (ipa_fn_summary_t::remove_callees): ... this.
17653         (ipa_fn_summary_t::duplicate): Use placement new
17654         instead of memory copy.
17655         (ipa_call_summary_t::duplicate): Likewise.
17656         (ipa_call_summary_t::remove): Remove.
17657         (dump_ipa_call_summary): Change get_create to get.
17658         (ipa_dump_fn_summary): Dump only when summary exists.
17659         (analyze_function_body): Use symbol_summary::get instead
17660         of get_create.
17661         (compute_fn_summary): Likewise.
17662         (estimate_edge_devirt_benefit): Likewise.
17663         (estimate_edge_size_and_time): Likewise.
17664         (inline_update_callee_summaries): Likewise.
17665         (remap_edge_change_prob): Likewise.
17666         (remap_edge_summaries): Likewise.
17667         (ipa_merge_fn_summary_after_inlining): Likewise.
17668         (write_ipa_call_summary): Likewise.
17669         (ipa_fn_summary_write): Likewise.
17670         (ipa_free_fn_summary): Likewise.
17671         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
17672         (struct ipa_call_summary): Likewise.
17673         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
17674         of get_create.
17675         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
17676         (estimate_size_after_inlining): Likewise.
17677         (estimate_growth): Likewise.
17678         (growth_likely_positive): Likewise.
17679         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
17680         (inline_call): Likewise.
17681         * ipa-inline.c (caller_growth_limits): Likewise.
17682         (can_inline_edge_p): Likewise.
17683         (can_inline_edge_by_limits_p): Likewise.
17684         (compute_uninlined_call_time): Likewise.
17685         (compute_inlined_call_time): Likewise.
17686         (want_inline_small_function_p): Likewise.
17687         (edge_badness): Likewise.
17688         (update_caller_keys): Likewise.
17689         (update_callee_keys): Likewise.
17690         (inline_small_functions): Likewise.
17691         (inline_to_all_callers_1): Likewise.
17692         (dump_overall_stats): Likewise.
17693         (early_inline_small_functions): Likewise.
17694         (early_inliner): Likewise.
17695         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
17696         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
17697         * ipa-pure-const.c (malloc_candidate_p): Likewise.
17698         * ipa-split.c (execute_split_functions): Likewise.
17699         * symbol-summary.h: Likewise.
17700         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
17702 2018-06-19  Richard Biener  <rguenther@suse.de>
17704         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
17705         (vectorize_loops): ... here.  Fix dbgcnt handling.
17706         (try_vectorize_loop): Wrap try_vectorize_loop_1.
17708 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
17710         PR target/86197
17711         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
17712         ieee128 argument takes up only one (vector) register, not two (floating
17713         point) registers.
17715 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
17717         * gimplify.c (gimplify_init_constructor): Really never clear for an
17718         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
17720 2018-06-19  Richard Biener  <rguenther@suse.de>
17722         PR tree-optimization/86179
17723         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
17724         after failed recognition.
17726 2018-06-18  Martin Sebor  <msebor@redhat.com>
17728         PR middle-end/85602
17729         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
17730         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
17731         Handle integer subtraction.
17732         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
17733         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
17735 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
17737         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
17738         param from rtx to rtx_insn *.
17739         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
17740         param.
17741         (frv_ifcvt_modify_insn): Likwise.
17742         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
17743         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
17744         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
17745         as_a <rtx_insn *> cast to local "unprotected_region" once
17746         it's been established that it's not NULL or pc_rtx.
17747         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
17748         param "sethi" from rtx to rtx_insn *.
17749         (nds32_group_float_insns): Likewise for param "insn".
17750         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
17751         param.
17752         (vax_output_int_subtract): Likewise.
17753         * config/vax/vax.c (vax_output_int_add): Likewise for param
17754         "insn".
17755         (vax_output_int_subtract): Likewise.
17756         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
17757         (emit_pattern_after): Likewise for param "after".
17758         (emit_insn_after): Likewise.
17759         (emit_jump_insn_after): Likewise.
17760         (emit_call_insn_after): Likewise.
17761         (emit_debug_insn_after): Likewise.
17762         (emit_pattern_before): Likewise for param "before".
17763         (emit_insn_before): Likewise.
17764         (emit_jump_insn_before): Likewise.
17765         * final.c (get_insn_template): Likewise for param "insn", removing
17766         a cast.
17767         * output.h (get_insn_template): Likewise for 2nd param.
17768         * rtl.h (emit_insn_before): Likewise.
17769         (emit_jump_insn_before): Likewise.
17770         (emit_debug_insn_before_noloc): Likewise.
17771         (emit_insn_after): Likewise.
17772         (emit_jump_insn_after): Likewise.
17773         (emit_call_insn_after): Likewise.
17774         (emit_debug_insn_after): Likewise.
17775         (set_insn_deleted): Likewise for param.
17777 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
17779         PR target/85358
17780         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
17781         floating point modes, so that IFmode is numerically greater than
17782         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
17783         to declare the ordering.  This prevents IFmode from being
17784         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
17785         machine.  Include rs6000-modes.h to share the fractional values
17786         between genmodes* and the rest of the compiler.
17787         (IFmode): Likewise.
17788         (KFmode): Likewise.
17789         (TFmode): Likewise.
17790         * config/rs6000/rs6000-modes.h: New file.
17791         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
17792         meaning of rs6000_long_double_size so that 126..128 selects an
17793         appropriate 128-bit floating point type.
17794         (rs6000_option_override_internal): Likewise.
17795         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
17796         (TARGET_LONG_DOUBLE_128): Change the meaning of
17797         rs6000_long_double_size so that 126..128 selects an appropriate
17798         128-bit floating point type.
17799         (LONG_DOUBLE_TYPE_SIZE): Update comment.
17800         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
17801         source and destination to match the standard usage.
17802         (truncifkf2): Likewise.
17803         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
17804         ISA 2.07 to use an explicit clobber, instead of passing in a
17805         temporary.
17806         (copysign<mode>3_soft): Likewise.
17808 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
17810         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
17811         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
17812         (vect_slp_analyze_instance_dependence): Likewise.
17813         (vect_enhance_data_refs_alignment): Likewise.
17814         (vect_analyze_data_refs_alignment): Likewise.
17815         (vect_slp_analyze_and_verify_instance_alignment
17816         (vect_analyze_data_ref_accesses): Likewise.
17817         (vect_prune_runtime_alias_test_list): Likewise.
17818         (vect_analyze_data_refs): Likewise.
17819         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
17820         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
17821         (vect_analyze_scalar_cycles_1): Likewise.
17822         (vect_get_loop_niters): Likewise.
17823         (vect_analyze_loop_form_1): Likewise.
17824         (vect_update_vf_for_slp): Likewise.
17825         (vect_analyze_loop_operations): Likewise.
17826         (vect_analyze_loop): Likewise.
17827         (vectorizable_induction): Likewise.
17828         (vect_transform_loop): Likewise.
17829         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
17830         * tree-vect-slp.c (vect_analyze_slp): Likewise.
17831         (vect_make_slp_decision): Likewise.
17832         (vect_detect_hybrid_slp): Likewise.
17833         (vect_slp_analyze_operations): Likewise.
17834         (vect_slp_bb): Likewise.
17835         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
17836         (vectorizable_bswap): Likewise.
17837         (vectorizable_call): Likewise.
17838         (vectorizable_simd_clone_call): Likewise.
17839         (vectorizable_conversion): Likewise.
17840         (vectorizable_assignment): Likewise.
17841         (vectorizable_shift): Likewise.
17842         (vectorizable_operation): Likewise.
17843         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
17845 2018-06-18  Martin Sebor  <msebor@redhat.com>
17847         PR tree-optimization/81384
17848         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
17849         * builtins.c (expand_builtin_strnlen): New function.
17850         (expand_builtin): Call it.
17851         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
17852         * builtins.def (BUILT_IN_STRNLEN): New.
17853         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
17854         Warn for bounds in excess of maximum object size.
17855         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
17856         single-value ranges.  Handle strnlen.
17857         (handle_builtin_strlen): Handle strnlen.
17858         (strlen_check_and_optimize_stmt): Same.
17859         * doc/extend.texi (Other Builtins): Document strnlen.
17861 2018-06-18  Maya Rashish  <coypu@sdf.org>
17863         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
17864         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
17865         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
17867         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
17868         here to ...
17869         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
17871 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
17873         * tree.c (escaped_string::escape): Replace cast to char * by
17874         const_cast<char *> (unescaped).
17876 2018-06-18  Nick Clifton  <nickc@redhat.com>
17878         PR 84195
17879         * tree.c (escaped_string): New class.  Converts an unescaped
17880         string into its escaped equivalent.
17881         (warn_deprecated_use): Use the new class to convert the
17882         deprecation message, if present.
17883         (test_escaped_strings): New self test.
17884         (test_c_tests): Add test_escaped_strings.
17885         * doc/extend.texi (deprecated): Add a note that the
17886         deprecation message is affected by the -fmessage-length
17887         option, and that control characters will be escaped.
17888         (#pragma GCC error): Document this pragma.
17889         (#pragma GCC warning): Likewise.
17890         * doc/invoke.texi (-fmessage-length): Document this option's
17891         effect on the #warning and #error preprocessor directives and
17892         the deprecated attribute.
17894 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
17896         * tree.c (decl_value_expr_lookup): Revert latest change.
17897         (decl_value_expr_insert): Likewise.
17899 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
17901         * gimplify.c (nonlocal_vlas): Delete.
17902         (nonlocal_vla_vars): Likewise.
17903         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
17904         referenced VLAs.
17905         (gimplify_body): Do not create and destroy nonlocal_vlas.
17906         * tree-nested.c: Include diagnostic.h.
17907         (use_pointer_in_frame): Tweak.
17908         (lookup_field_for_decl): Add assertion and declare the transformation.
17909         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
17910         internal error when the reference is in a wrong context.  Do not
17911         create a debug decl by default.
17912         (note_nonlocal_block_vlas): Delete.
17913         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
17914         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
17915         create a debug decl by default.
17916         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
17917         call is in a wrong context.
17918         (fixup_vla_decls): New function.
17919         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
17920         debug variables were created.
17921         * tree.c (decl_value_expr_lookup): Add checking assertion.
17922         (decl_value_expr_insert): Likewise.
17924 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
17926         PR middle-end/82479
17927         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
17928         * tree-scalar-evolution.c (interpret_expr): Likewise.
17929         (expression_expensive_p): Likewise.
17930         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
17931         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
17932         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
17933         (ssa_defined_by_minus_one_stmt_p): New.
17935 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
17937         PR middle-end/64946
17938         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
17939         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
17940         * dojump.c (do_jump): Likewise.
17941         * expr.c (expand_expr_real_2): Check operand type's sign.
17942         * fold-const.c (const_unop): Handle ABSU_EXPR.
17943         (fold_abs_const): Likewise.
17944         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
17945         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
17946         (strip_sign_op_1): Likesise.
17947         * match.pd: Add new pattern to generate ABSU_EXPR.
17948         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
17949         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
17950         * tree-eh.c (operation_could_trap_helper_p): Likewise.
17951         * tree-inline.c (estimate_operator_cost): Likewise.
17952         * tree-pretty-print.c (dump_generic_node): Likewise.
17953         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
17954         * tree.def (ABSU_EXPR): New.
17956 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
17958         PR middle-end/86095
17959         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
17960         documented as preserved for backward compatibility only.
17961         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
17963         PR rtl-optimization/86108
17964         * bb-reorder.c (create_forwarder_block): Renamed to ...
17965         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
17966         jump from new landing pad to the second part.
17967         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
17968         Adjust callers.
17970 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
17972         PR middle-end/85878
17973         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
17974         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
17975         Only call store_expr for halves if the mode is the same.
17977         PR middle-end/86123
17978         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
17979         Fix up comment formatting.
17981 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
17983         * typed-splay-tree.h (typed_splay_tree::remove): New function.
17984         (typed_splay_tree::closure,
17985         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
17986         (typed_splay_tree::typed_splay_tree,
17987         typed_splay_tree::operator =): Declared private.
17988         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
17989         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
17990         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
17991         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
17992         typed_splay_tree::splay_tree_splay,
17993         typed_splay_tree::splay_tree_foreach_helper,
17994         typed_splay_tree::splay_tree_insert,
17995         typed_splay_tree::splay_tree_remove,
17996         typed_splay_tree::splay_tree_lookup,
17997         typed_splay_tree::splay_tree_predecessor,
17998         typed_splay_tree::splay_tree_successor,
17999         typed_splay_tree::splay_tree_min,
18000         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
18001         (typed_splay_tree::root, typed_splay_tree::comp,
18002         typed_splay_tree::delete_key,
18003         typed_splay_tree::delete_value): New data members.
18004         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
18005         typed_splay_tree::remove.
18007 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
18009         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
18010         -mginv and -mno-ginv to the assembler.
18011         * config/mips/mips.opt (-mcrc): New option.
18012         (-mginv): Likewise.
18013         * doc/invoke.text (-mcrc): Document.
18014         (-mginv): Likewise.
18016 2018-06-15  Nick Clifton  <nickc@redhat.com>
18018         PR 84195
18019         * tree.c (escaped_string): New class.  Converts an unescaped
18020         string into its escaped equivalent.
18021         (warn_deprecated_use): Use the new class to convert the
18022         deprecation message, if present.
18023         (test_escaped_strings): New self test.
18024         (test_c_tests): Add test_escaped_strings.
18025         * doc/extend.texi (deprecated): Add a note that the
18026         deprecation message is affected by the -fmessage-length
18027         option, and that control characters will be escaped.
18028         (#pragma GCC error): Document this pragma.
18029         (#pragma GCC warning): Likewise.
18030         * doc/invoke.texi (-fmessage-length): Document this option's
18031         effect on the #warning and #error preprocessor directives and
18032         the deprecated attribute.
18034 2018-06-15  Richard Biener  <rguenther@suse.de>
18036         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
18037         here, also noting vector size used.
18038         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
18039         size used in MSG_OPTIMIZED_LOCATIONS dump.
18040         (pass_slp_vectorize::execute): Adjust.
18042 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
18044         PR target/85968
18045         * config/arc/arc.c (arc_return_address_register): Fix
18046         if-condition.
18048 2018-06-15  Richard Biener  <rguenther@suse.de>
18050         PR middle-end/86159
18051         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
18052         leave useless conversion stripping to force_gimple_operand_gsi.
18053         (gimplify_build2): Likewise.
18054         (gimplify_build1): Likewise.
18056 2018-06-15  Richard Biener  <rguenther@suse.de>
18058         PR middle-end/86076
18059         * tree-cfg.c (move_stmt_op): unshare invariant addresses
18060         before adjusting their block.
18062 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
18064         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
18065         multilibs for *-*-rtems*.
18066         * config/riscv/t-rtems: New file.
18068 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
18070         PR middle-end/86122
18071         * match.pd ((A +- CST1) +- CST2): Punt if last resort
18072         unsigned_type_for returns NULL.
18074         PR target/85945
18075         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
18076         subregs of multi-word pseudos unless the float mode has word size.
18078 2018-06-14  Richard Biener  <rguenther@suse.de>
18080         PR middle-end/86139
18081         * tree-vect-generic.c (build_word_mode_vector_type): Remove
18082         duplicate and harmful type_hash_canon.
18083         * tree.c (type_hash_canon): Assert we didn't find ourselves.
18085 2018-06-14  Richard Biener  <rguenther@suse.de>
18087         PR ipa/86124
18088         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
18089         NULL cgraph_node.
18091 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
18093         * config/rtems.h (STDINT_LONG32): Define.
18095 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
18096             Prachi Godbole  <prachi.godbole@imgtec.com>
18098         * config/mips/mips-cpus.def: Define P6600.
18099         * config/mips/mips-tables.opt: Regenerate.
18100         * config/mips/mips.c (mips_ucbranch_type): New enum.
18101         (mips_rtx_cost_data): Add support for P6600.
18102         (mips_issue_rate): Likewise.
18103         (mips_multipass_dfa_lookahead): Likewise.
18104         (mips_avoid_hazard): Likewise.
18105         (mips_reorg_process_insns): Likewise.
18106         (mips_classify_branch_p6600): New function.
18107         * config/mips/mips.h (TUNE_P6600): New define.
18108         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
18109         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
18110         * config/mips/mips.md: Include p6600.md.
18111         (processor): Add p6600.
18112         * config/mips/p6600.md: New file.
18113         * doc/invoke.texi: Add p6600 to supported architectures.
18115 2018-06-13  Martin Sebor  <msebor@redhat.com>
18117         PR tree-optimization/86114
18118         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
18119         of integer types.
18120         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
18122 2018-06-13  Richard Biener  <rguenther@suse.de>
18124         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
18125         Properly set vector type of the intermediate stmt.
18126         * tree-vect-stmts.c (vectorizable_operation): The destination
18127         var always has vectype_out type.
18129 2018-06-13  Jeff Law  <law@redhat.com>
18131         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
18132         integer 0 for argument to print_rtl_with_bb.
18133         (rl78_reorg): Likewise.
18135 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
18137         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
18138         from rtx to rtx_insn *.
18139         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
18140         "label".
18141         (add_sched_insns_for_speculation): Likewise for local "target",
18142         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
18143         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
18144         from rtx_insn ** to rtx_code_label **.
18145         (reorg_emit_nops): Likewise.
18146         (c6x_reorg): Likewise for local "call_labels".
18147         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
18148         rtx to rtx_insn *.
18149         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
18150         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
18151         the loops over LABEL_REFS.
18152         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
18153         braf_label.
18154         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
18155         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
18156         (split_branches): Strengthen local "olabel" from rtx to
18157         rtx_insn *, adding a safe_as_a cast.
18158         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
18159         to "rtx_insn *".
18160         (add_insn_after): Likewise for first two params.
18161         (add_insn_before): Likewise.
18162         (remove_insn): Likewise for param.
18163         (emit_pattern_before_noloc): Likewise for second and third params.
18164         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
18165         (emit_call_insn_before_noloc): Likewise.
18166         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
18167         to "rtx_insn *".
18168         (emit_barrier_before): Likewise.
18169         (emit_label_before): Strengthen "label" param from "rtx" to
18170         "rtx_code_label *".  Strengthen "before" param from "rtx" to
18171         "rtx_insn *".
18172         (emit_insn_after_1): Strengthen "after" param from "rtx" to
18173         "rtx_insn *".
18174         (emit_pattern_after_noloc): Likewise.
18175         (emit_insn_after_noloc): Likewise.
18176         (emit_jump_insn_after_noloc): Likewise.
18177         (emit_call_insn_after_noloc): Likewise.
18178         (emit_debug_insn_after_noloc): Likewise.
18179         (emit_barrier_after): Likewise.
18180         (emit_label_after): Likewise for both params.
18181         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
18182         "loc" param from "int" to "location_t".
18183         (emit_insn_after_setloc): Likewise.
18184         (emit_jump_insn_after_setloc): Likewise.
18185         (emit_call_insn_after_setloc): Likewise.
18186         (emit_debug_insn_after_setloc): Likewise.
18187         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
18188         "loc" param from "int" to "location_t".
18189         (emit_pattern_before): Convert NULL_RTX to NULL.
18190         (emit_insn_before_setloc): Convert "loc" param from "int" to
18191         "location_t".
18192         (emit_jump_insn_before_setloc): Likewise.
18193         (emit_call_insn_before_setloc): Likewise.
18194         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
18195         rtx_insn *.  Convert "loc" param from "int" to "location_t".
18196         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
18197         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
18198         Convert 3rd param from "int" to "location_t".
18199         (emit_barrier_before, emit_barrier_after, next_real_insn):
18200         Strengthen param from rtx to rtx_insn *.
18201         (emit_label_before): Strengthen 1st param from "rtx" to
18202         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
18203         "rtx_insn *".
18204         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
18205         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
18206         Strengthen 2nd param from "rtx" to "rtx_insn *".
18207         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
18208         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
18209         Likewise. Convert 3rd param from "int" to "location_t".
18210         (emit_label_after): Strengthen 1st param from "rtx" to
18211         "rtx_code_label *".
18212         (next_real_insn, remove_insn): Strengthen param from "rtx" to
18213         "rtx_insn *".
18214         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
18215         from "rtx" to "rtx_insn *".
18217 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
18219         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
18220         bodies streamed in with -Q.
18221         * dumpfile.c (dump_files): Add lto-stream-out dump file.
18222         * dumpfile.h (tree_dump_index): Add lto_stream_out.
18223         * gimple-streamer-out.c: Include gimple-pretty-print.h
18224         (output_bb): Dump stmts streamed.
18225         * lto-section-out.c: Include print-tree.h
18226         (lto_begin_section): Dump sections created.
18227         (lto_output_decl_index): Dump decl encoded.
18228         * lto-streamer-out.c: Include print-tree.h
18229         (create_output_block): Dump output block created.
18230         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
18231         (output_function): Dump function output.
18232         (output_constructor): Dump constructor streamed.
18233         (write_global_stream): Output indexes encoded.
18234         (produce_asm_for_decls): Dump streams encoded.
18235         * lto-streamer.c (streamer_dump_file): New global var.
18236         * lto-streamer.h (streamer_dump_file): Declare.
18237         * passes.c (ipa_write_summaries): Initialize streamer dump.
18238         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
18239         in.
18241 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
18243         PR target/86048
18244         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
18245         offsets for register save directives.  Emit a second batch of save
18246         directives, if need be, when the function accesses prior frames.
18248 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
18250         * config/arc/fpu.md (fmasf4): Force operand to register.
18251         (fnmasf4): Likewise.
18253 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
18255         * config/arc/arc-protos.h (arc_pad_return): Remove.
18256         * config/arc/arc.c (machine_function): Remove force_short_suffix
18257         and size_reason.
18258         (arc_print_operand): Adjust printing of '&'.
18259         (arc_verify_short): Remove conditional printing of short suffix.
18260         (arc_final_prescan_insn): Remove reference to size_reason.
18261         (pad_return): New function.
18262         (arc_reorg): Call pad_return.
18263         (arc_pad_return): Remove.
18264         (arc_init_machine_status): Remove reference to force_short_suffix.
18265         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
18266         (attr length): When attribute iscompact is true force to 2
18267         regardless; in the case of maybe check if we want to force the
18268         instruction to have 4 bytes length.
18269         (nopv): Change it to generate 4 byte long nop as well.
18270         (blockage): New pattern.
18271         (simple_return): Remove call to arc_pad_return.
18272         (p_return_i): Likewise.
18274 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
18276         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
18278 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
18280         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
18281         ARC cores.
18283 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
18285         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
18286         for ARC700 and ARCv2.
18288 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
18290         PR target/86076
18291         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
18292         operands[2] instead of operands[1].
18295 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
18297         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
18298         case, check whether the outer register overlaps an unallocatable
18299         register, not just whether it fits the required class.
18301 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
18303         * poly-int.h (can_div_trunc_p): Add new overload in which all values
18304         are poly_ints.
18305         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
18306         (memrefs_conflict_p): Likewise.
18307         (init_alias_analysis): Likewise.
18308         * cfgexpand.c (expand_debug_expr): Likewise.
18309         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
18310         * cse.c (fold_rtx): Likewise.
18311         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
18312         * expr.c (emit_block_move_hints): Likewise.
18313         (clear_storage_hints, push_block, emit_push_insn): Likewise.
18314         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
18315         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
18316         (emit_group_store): Likewise.
18317         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
18318         to read the PRE/POST_MODIFY increment.
18319         * calls.c (store_one_arg): Use strip_offset.
18320         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
18321         poly_int_rtx_p.
18322         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
18323         by a VEC_SELECT.
18324         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
18325         (simplify_binary_operation_1): Extend CONST_INT handling to
18326         poly_int_rtx_p.
18327         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
18328         than a HOST_WIDE_INT.
18329         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
18330         poly_int64.
18331         (adjust_mems, add_stores): Update accodingly.
18332         (vt_canonicalize_addr): Track polynomial offsets.
18333         (emit_note_insn_var_location): Likewise.
18334         (vt_add_function_parameter): Likewise.
18335         (vt_initialize): Likewise.
18337 2018-06-12  Jeff Law  <law@redhat.com>
18339         * config.gcc (alpha*-*-freebsd*): Remove.
18340         * config/alpha/freebsd.h: Remove.
18342 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
18344         PR other/69968
18345         * spellcheck-tree.c (levenshtein_distance): Rename to...
18346         (get_edit_distance): ...this, and update for underlying renaming.
18347         * spellcheck-tree.h (levenshtein_distance): Rename to...
18348         (get_edit_distance): ...this.
18349         * spellcheck.c (levenshtein_distance): Rename to...
18350         (get_edit_distance): ...this.  Convert from Levenshtein distance
18351         to Damerau-Levenshtein distance by supporting transpositions of
18352         adjacent characters.  Rename "v1" to "v_next" and "v0" to
18353         "v_one_ago".
18354         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
18355         (selftest::test_edit_distance_unit_test_oneway): ...this, and
18356         update for underlying renaming.
18357         (selftest::levenshtein_distance_unit_test): Rename to...
18358         (selftest::test_get_edit_distance_unit): ...this, and update for
18359         underlying renaming.
18360         (selftest::test_find_closest_string): Add example from PR 69968
18361         where transposition helps
18362         (selftest::test_metric_conditions): Update for renaming.
18363         (selftest::test_metric_conditions): Likewise.
18364         (selftest::spellcheck_c_tests): Likewise.
18365         * spellcheck.h (levenshtein_distance): Rename both overloads to...
18366         (get_edit_distance): ...this.
18367         (best_match::consider): Update for renaming.
18369 2018-06-12  Martin Sebor  <msebor@redhat.com>
18371         PR tree-optimization/85259
18372         * builtins.c (compute_objsize): Handle constant offsets.
18373         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
18374         true iff a warning has been issued.
18375         * gimple.h (gimple_nonartificial_location): New function.
18376         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
18377         gimple_nonartificial_location and handle -Wno-system-headers.
18378         (handle_builtin_stxncpy): Same.
18380 2018-06-12  Martin Sebor  <msebor@redhat.com>
18382         PR c/85931
18383         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
18385 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
18387         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
18388         BUILTIN_VEC_XST entries for pointer to double and long long.
18390 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
18392         PR target/85990
18393         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
18394         Update comments.
18395         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
18396         Likewise.
18398 2018-06-12  Martin Liska  <mliska@suse.cz>
18400         * doc/options.texi: Document IntegerRange.
18402 2018-06-12  Martin Liska  <mliska@suse.cz>
18404         * config/i386/i386.opt: Make MPX-related options as Deprecated.
18405         * opt-functions.awk: Handle Deprecated flag.
18406         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
18407         and report error.
18408         (read_cmdline_option): Report warning for a deprecated option.
18409         * opts.h (struct cl_option): Add new field cl_deprecated.
18410         (CL_ERR_DEPRECATED): New.
18412 2018-06-12  Martin Liska  <mliska@suse.cz>
18414         * doc/options.texi: Document Deprecated option flag.
18416 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
18418         * config/arc/arc-arch.h (arc_extras): New enum.
18419         (arc_cpu_t):Add field extra.
18420         (arc_cpu_types): Consider the extras.
18421         * config/arc/arc-cpus.def: Add extras info.
18422         * config/arc/arc-opts.h (processor_type): Consider extra field.
18423         * config/arc/arc.c (arc_override_options): Handle extra field.
18425 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
18427         * config/arc/arc-arch.h: Update ARC_OPTX macro.
18428         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
18429         field.
18430         * config/arc/arc.c (arc_init): Update pic warning.
18431         (irq_range): Update irq range parsing warnings.
18432         (arc_override_options): Update various warning messages.
18433         (arc_handle_aux_attribute): Likewise.
18435 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
18437         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
18439 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
18441         * doc/sourcebuild.texi: Document usage of line number 0 in verify
18442         compiler messages directives.
18444 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
18446         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
18447         * config/mips/mips-tables.opt: Regenerate.
18448         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
18449         mips64r6.
18450         * doc/invoke.texi: Document -march=i6500.
18452 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
18454         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
18455         (i6400_gpmul): Add cpu_unit.
18456         (i6400_gpdiv): Likewise.
18457         (i6400_msa_add_d): Update reservations.
18458         (i6400_msa_int_add) Likewise.
18459         (i6400_msa_short_logic3) Likewise.
18460         (i6400_msa_short_logic2) Likewise.
18461         (i6400_msa_short_logic) Likewise.
18462         (i6400_msa_move) Likewise.
18463         (i6400_msa_cmp) Likewise.
18464         (i6400_msa_short_float2) Likewise.
18465         (i6400_msa_div_d) Likewise.
18466         (i6400_msa_long_logic1) Likewise.
18467         (i6400_msa_long_logic2) Likewise.
18468         (i6400_msa_mult) Likewise.
18469         (i6400_msa_long_float2) Likewise.
18470         (i6400_msa_long_float4) Likewise.
18471         (i6400_msa_long_float5) Likewise.
18472         (i6400_msa_long_float8) Likewise.
18473         (i6400_fpu_fadd): Include frint type.
18474         (i6400_fpu_store): New define_insn_reservation.
18475         (i6400_fpu_load): Likewise.
18476         (i6400_fpu_move): Likewise.
18477         (i6400_fpu_fcmp): Likewise.
18478         (i6400_fpu_fmadd): Likewise.
18479         (i6400_int_mult): Include imul3nc type and update reservation.
18480         (i6400_int_div): Include idiv3 type and update reservation.
18481         (i6400_int_load): Update to check type not move_type.
18482         (i6400_int_store): Likewise.
18483         (i6400_int_prefetch): Set zero latency.
18485 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
18487         * gcc.c: Document new %@{...} sequence.
18488         (LINK_COMMAND_SPEC): Use it for the -L switches.
18489         (cpp_unique_options): Use it for the -I switches.
18490         (at_file_argbuf): New global variable.
18491         (in_at_file): Likewise.
18492         (alloc_args): Create at_file_argbuf.
18493         (clear_args): Truncate at_file_argbuf.
18494         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
18495         (open_at_file): New function.
18496         (close_at_file): Likewise.
18497         (create_at_file): Delete.
18498         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
18499         <'o'>: Likewise.
18500         <'@'>: New case.
18501         (validate_switches_from_spec): Deal with %@{...} sequence.
18502         (validate_switches): Likewise.
18503         (driver::finalize): Call clear_args.
18505 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
18507         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
18509 2018-06-11  Martin Sebor  <msebor@redhat.com>
18511         * doc/invoke.texi (-Wall): List -Wc++17-compat.
18512         (Wno-class-memaccess): Add @opindex.
18513         (Wno-templates, Wno-multiple-inheritance): Same.
18514         (Wno-virtual-inheritance, Wno-namespaces): Same.
18515         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
18516         (Wno-format-overflow, Wno-format-truncation): Same.
18517         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
18518         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
18519         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
18520         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
18521         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
18522         (Wno-misspelled-isr): Same.
18524 2018-06-11  Martin Sebor  <msebor@redhat.com>
18526         * PR tree-optimization/86083
18527         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
18529 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
18531         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
18533 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
18535         PR target/85755
18536         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
18537         on the correct operand.
18538         (*movdi_internal64): Ditto.
18540 2018-06-11  Martin Liska  <mliska@suse.cz>
18542         PR tree-optimization/86089
18543         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
18545 2018-06-11  Julia Koval  <julia.koval@intel.com>
18547         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
18548         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
18549         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
18551 2018-06-11  Olivier Hainque  <hainque@adacore.com>
18553         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
18554         for Ada with strict dwarf2.
18556 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
18558         PR target/85755
18559         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
18560         addresses.
18562 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
18564         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
18566 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
18568         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
18569         TARGET_ELF.
18571 2018-06-08  Martin Liska  <mliska@suse.cz>
18573         * tree-cfg.h (debug_function): Fix argument type to match
18574         implementation.
18576 2018-06-08  Martin Liska  <mliska@suse.cz>
18578         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
18579         Remove usage of MPX-related (and removed) fields.
18580         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
18582 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
18584         * cfg.c (debug): Use TDF_NONE rather than 0.
18585         * cfghooks.c (debug): Likewise.
18586         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
18587         (struct dump_option_value_info): Convert to...
18588         (struct kv_pair): ...this template type.
18589         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
18590         rather than 0.
18591         (optinfo_verbosity_options): Likewise.
18592         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
18593         OPTGROUP_NONE.
18594         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
18595         than int for "optgroup_flags" param.
18596         (dump_generic_expr_loc): Use dump_flags_t rather than int for
18597         "dump_kind" param.
18598         (dump_dec): Likewise.
18599         (dump_finish): Use TDF_NONE rather than 0.
18600         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
18601         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
18602         than 0.  Update for change to option_ptr.
18603         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
18604         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
18605         0.  Update for changes to optinfo_verbosity_options and
18606         optgroup_options.
18607         (opt_info_switch_p): Convert optgroup_flags from int to
18608         optgroup_flags_t.
18609         (dump_basic_block): Use dump_flags_t rather than int
18610         for "dump_kind" param.
18611         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
18612         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
18613         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
18614         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
18615         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
18616         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
18617         TDF_NONE): Convert from macros to...
18618         (enum dump_flag): ...this new enum.
18619         (dump_flags_t): Update to use enum.
18620         (operator|, operator&, operator~, operator|=, operator&=):
18621         Implement for dump_flags_t.
18622         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
18623         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
18624         Convert from macros to...
18625         (enum optgroup_flag): ...this new enum.
18626         (optgroup_flags_t): New typedef.
18627         (operator|, operator|=): Implement for optgroup_flags_t.
18628         (struct dump_file_info): Convert field "alt_flags" to
18629         dump_flags_t.  Convert field "optgroup_flags" to
18630         optgroup_flags_t.
18631         (dump_basic_block): Use dump_flags_t rather than int for param.
18632         (dump_generic_expr_loc): Likewise.
18633         (dump_dec): Likewise.
18634         (dump_register): Convert param "optgroup_flags" to
18635         optgroup_flags_t.
18636         (opt_info_enable_passes): Likewise.
18637         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
18638         than 0.
18639         * gimple-pretty-print.c (debug): Likewise.
18640         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
18641         (merged_store_group::apply_stores): Likewise.
18642         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
18643         * gimple.c (verify_gimple_pp): Likewise.
18644         * graphite-poly.c (print_pbb_body): Likewise.
18645         * passes.c (pass_manager::register_one_dump_file): Convert
18646         local "optgroup_flags" to optgroup_flags_t.
18647         * print-tree.c (print_node): Use TDF_NONE rather than 0.
18648         (debug): Likewise.
18649         (debug_body): Likewise.
18650         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
18651         to optgroup_flags_t.
18652         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
18653         than 0.
18654         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
18655         (convert_mult_to_fma): Likewise.
18656         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
18657         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
18658         * tree-vect-data-refs.c (dump_lower_bound): Convert param
18659         "dump_kind" to dump_flags_t.
18661 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
18663         * config/rs6000/rs6000.c (min, max): Delete.
18665 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
18667         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
18668         -mabi=spe and -mabi=no-spe.
18670 2018-06-08  Martin Liska  <mliska@suse.cz>
18672         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
18673         where we expect an existing summary.
18675 2018-06-08  Martin Liska  <mliska@suse.cz>
18677         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
18678         * ipa-inline.h (estimate_edge_growth): Likewise.
18680 2018-06-08  Martin Liska  <mliska@suse.cz>
18682         * cgraph.c (function_version_hasher::hash): Use
18683         cgraph_node::get_uid ().
18684         (function_version_hasher::equal):
18685         * cgraph.h (cgraph_node::get_uid): New method.
18686         * ipa-inline.c (update_caller_keys): Use
18687         cgraph_node::get_uid ().
18688         (update_callee_keys): Likewise.
18689         * ipa-utils.c (searchc): Likewise.
18690         (ipa_reduced_postorder): Likewise.
18691         * lto-cgraph.c (input_node): Likewise.
18692         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
18693         * symbol-summary.h (symtab_insertion): Likewise.
18694         (symtab_removal): Likewise.
18695         (symtab_duplication): Likewise.
18696         * tree-pretty-print.c (dump_function_header): Likewise.
18697         * tree-sra.c (convert_callers_for_node): Likewise.
18699 2018-06-08  Martin Liska  <mliska@suse.cz>
18701         * cgraph.c (symbol_table::create_edge): Always assign a new
18702         unique number.
18703         (symbol_table::free_edge): Do not recycle numbers.
18704         * cgraph.h (cgraph_edge::get): New method.
18705         * symbol-summary.h (symtab_removal): Use it.
18706         (symtab_duplication): Likewise.
18707         (call_summary::hashable_uid): Remove.
18709 2018-06-08  Martin Liska  <mliska@suse.cz>
18711         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
18712         (initialize_growth_caches): Remove.
18713         (free_growth_caches): Likewise.
18714         (do_estimate_edge_time): Use edge_growth_cache.
18715         (do_estimate_edge_size): Likewise.
18716         (do_estimate_edge_hints): Likewise.
18717         * ipa-inline.c (reset_edge_caches): Likewise.
18718         (recursive_inlining): Likewise.
18719         (inline_small_functions): Likewise.
18720         * ipa-inline.h (initialize_growth_caches): Remove.
18721         (estimate_edge_size): Likewise.
18722         (estimate_edge_time): Likewise.
18723         (estimate_edge_hints): Likewise.
18724         (reset_edge_growth_cache): Likewise.
18725         * symbol-summary.h (call_summary::remove): New method.
18727 2018-06-08  Martin Liska  <mliska@suse.cz>
18729         * ipa-cp.c (class edge_clone_summary): New summary.
18730         (grow_edge_clone_vectors): Remove.
18731         (ipcp_edge_duplication_hook): Remove.
18732         (class edge_clone_summary_t): New call_summary class.
18733         (ipcp_edge_removal_hook): Remove.
18734         (edge_clone_summary_t::duplicate): New function.
18735         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
18736         (create_specialized_node): Likewise.
18737         (ipcp_driver): Initialize edge_clone_summaries and do not
18738         register hooks.
18740 2018-06-08  Martin Liska  <mliska@suse.cz>
18742         * symbol-summary.h (get): New function.
18743         (call_summary::m_initialize_when_cloning): New class member.
18745 2018-06-08  Martin Liska  <mliska@suse.cz>
18747         * cgraph.c (cgraph_node::remove): Do not recycle uid.
18748         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
18749         (symbol_table::allocate_cgraph_symbol): Do not set uid.
18750         * passes.c (uid_hash_t): Record removed_nodes by their uids.
18751         (remove_cgraph_node_from_order): Use the removed_nodes set.
18752         (do_per_function_toporder): Likwise.
18753         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
18754         instead of summary_uid.
18755         (symtab_removal): Likewise.
18756         (symtab_duplication): Likewise.
18758 2018-06-08  Martin Liska  <mliska@suse.cz>
18760         * ipa-cp.c (ipcp_store_bits_results): Use
18761         ipcp_transformation_sum.
18762         (ipcp_store_vr_results): Likewise.
18763         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
18764         to ...
18765         (ipcp_transformation_initialize): ... this.
18766         (ipa_set_node_agg_value_chain):
18767         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
18768         (write_ipcp_transformation_info): Likewise.
18769         (read_ipcp_transformation_info): Likewise.
18770         (ipcp_update_bits): Likewise.
18771         (ipcp_update_vr): Likewise.
18772         (ipcp_transform_function): Likewise.
18773         * ipa-prop.h: Rename ipcp_transformation_summary to
18774         ipcp_transformation.
18775         (class ipcp_transformation_t): New function summary.
18776         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
18777         (ipa_get_agg_replacements_for_node): Likewise.
18779 2018-06-08  Martin Liska  <mliska@suse.cz>
18781         * ipa-pure-const.c (struct funct_state_d): Do it class instead
18782         of struct.
18783         (class funct_state_summary_t): New function_summary class.
18784         (has_function_state): Remove.
18785         (get_function_state): Likewise.
18786         (set_function_state): Likewise.
18787         (add_new_function): Likewise.
18788         (funct_state_summary_t::insert): New function.
18789         (duplicate_node_data): Remove.
18790         (remove_node_data): Remove.
18791         (funct_state_summary_t::duplicate): New function.
18792         (register_hooks): Create new funct_state_summaries.
18793         (pure_const_generate_summary): Use it.
18794         (pure_const_write_summary): Likewise.
18795         (pure_const_read_summary): Likewise.
18796         (propagate_pure_const): Likewise.
18797         (propagate_nothrow): Likewise.
18798         (dump_malloc_lattice): Likewise.
18799         (propagate_malloc): Likewise.
18800         (execute): Do not register hooks, just remove summary
18801         instead.
18802         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
18803         constructor.
18805 2018-06-08  Martin Liska  <mliska@suse.cz>
18807         * ipa-reference.c (remove_node_data): Remove.
18808         (duplicate_node_data): Likewise.
18809         (class ipa_ref_var_info_summary_t): New class.
18810         (class ipa_ref_opt_summary_t): Likewise.
18811         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
18812         (get_reference_optimization_summary): Use
18813         ipa_ref_opt_sum_summaries.
18814         (set_reference_vars_info): Remove.
18815         (set_reference_optimization_summary): Likewise.
18816         (ipa_init): Create summaries.
18817         (init_function_info): Use function summary.
18818         (ipa_ref_opt_summary_t::duplicate): New function.
18819         (ipa_ref_opt_summary_t::remove): New function.
18820         (get_read_write_all_from_node): Fix GNU coding style.
18821         (propagate): Use function summary.
18822         (write_node_summary_p): Fix GNU coding style.
18823         (stream_out_bitmap): Likewise.
18824         (ipa_reference_read_optimization_summary): Use function summary.
18825         (ipa_reference_c_finalize): Do not release hooks.
18827 2018-06-08  Martin Liska  <mliska@suse.cz>
18829         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
18830         (analyze_function_body): Extract multiple calls of get_create.
18831         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
18832         * ipa-inline.c (recursive_inlining): Use ::get method.
18833         * ipa-inline.h (estimate_edge_growth): Likewise.
18835 2018-06-08  Martin Liska  <mliska@suse.cz>
18837         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
18838         HSA_INVALID.
18839         (hsa_function_summary::hsa_function_summary): Use the new enum
18840         value.
18841         (hsa_gpu_implementation_p): Use hsa_summaries::get.
18842         * hsa-gen.c (hsa_get_host_function): Likewise.
18843         (get_brig_function_name): Likewise.
18844         * ipa-hsa.c (process_hsa_functions): Likewise.
18845         (ipa_hsa_write_summary): Likewise.
18846         * symbol-summary.h (symtab_duplication): Use ::get function/
18847         (get): New function.
18849 2018-06-08  Martin Liska  <mliska@suse.cz>
18851         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
18852         of get.
18853         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
18854         (hsa_register_kernel): Likewise.
18855         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
18856         * hsa-gen.c (hsa_get_host_function): Likewise.
18857         (get_brig_function_name): Likewise.
18858         (generate_hsa): Likewise.
18859         (pass_gen_hsail::execute): Likewise.
18860         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
18861         (devirtualization_time_bonus): Likewise.
18862         (ipcp_propagate_stage): Likewise.
18863         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
18864         (edge_set_predicate): Likewise.
18865         (evaluate_conditions_for_known_args): Likewise.
18866         (evaluate_properties_for_edge): Likewise.
18867         (ipa_fn_summary::reset): Likewise.
18868         (ipa_fn_summary_t::duplicate): Likewise.
18869         (dump_ipa_call_summary): Likewise.
18870         (ipa_dump_fn_summary): Likewise.
18871         (analyze_function_body): Likewise.
18872         (compute_fn_summary): Likewise.
18873         (estimate_edge_devirt_benefit): Likewise.
18874         (estimate_edge_size_and_time): Likewise.
18875         (estimate_calls_size_and_time): Likewise.
18876         (estimate_node_size_and_time): Likewise.
18877         (inline_update_callee_summaries): Likewise.
18878         (remap_edge_change_prob): Likewise.
18879         (remap_edge_summaries): Likewise.
18880         (ipa_merge_fn_summary_after_inlining): Likewise.
18881         (ipa_update_overall_fn_summary): Likewise.
18882         (read_ipa_call_summary): Likewise.
18883         (inline_read_section): Likewise.
18884         (write_ipa_call_summary): Likewise.
18885         (ipa_fn_summary_write): Likewise.
18886         (ipa_free_fn_summary): Likewise.
18887         * ipa-hsa.c (process_hsa_functions): Likewise.
18888         (ipa_hsa_write_summary): Likewise.
18889         (ipa_hsa_read_section): Likewise.
18890         * ipa-icf.c (sem_function::merge): Likewise.
18891         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
18892         (do_estimate_edge_time): Likewise.
18893         (estimate_size_after_inlining): Likewise.
18894         (estimate_growth): Likewise.
18895         (growth_likely_positive): Likewise.
18896         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
18897         (inline_call): Likewise.
18898         * ipa-inline.c (caller_growth_limits): Likewise.
18899         (can_inline_edge_p): Likewise.
18900         (can_inline_edge_by_limits_p): Likewise.
18901         (compute_uninlined_call_time): Likewise.
18902         (compute_inlined_call_time): Likewise.
18903         (want_inline_small_function_p): Likewise.
18904         (edge_badness): Likewise.
18905         (update_caller_keys): Likewise.
18906         (update_callee_keys): Likewise.
18907         (recursive_inlining): Likewise.
18908         (inline_small_functions): Likewise.
18909         (inline_to_all_callers_1): Likewise.
18910         (dump_overall_stats): Likewise.
18911         (early_inline_small_functions): Likewise.
18912         (early_inliner): Likewise.
18913         * ipa-inline.h (estimate_edge_growth): Likewise.
18914         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
18915         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
18916         * ipa-prop.h (IPA_NODE_REF): Likewise.
18917         (IPA_EDGE_REF): Likewise.
18918         * ipa-pure-const.c (malloc_candidate_p): Likewise.
18919         (propagate_malloc): Likewise.
18920         * ipa-split.c (execute_split_functions): Likewise.
18921         * symbol-summary.h: Rename get to get_create.
18922         (get): Likewise.
18923         (get_create): Likewise.
18924         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
18926 2018-06-08  Martin Liska  <mliska@suse.cz>
18928         * symbol-summary.h (release): Move definition out of class
18929         declaration.
18930         (symtab_removal): Likewise.
18931         (symtab_duplication): Likewise.
18933 2018-06-08  Martin Liska  <mliska@suse.cz>
18935         * symbol-summary.h (function_summary): Move constructor
18936         implementation out of class declaration.
18937         (release): Likewise.
18938         (symtab_insertion): Likewise.
18939         (symtab_removal): Likewise.
18940         (symtab_duplication): Likewise.
18941         (get): Likewise.
18943 2018-06-08  Martin Liska  <mliska@suse.cz>
18945         * Makefile.in: Remove support for MPX (macros, related functions,
18946         fields in cgraph_node, ...).
18947         * builtin-types.def (BT_BND): Likewise.
18948         (BT_FN_BND_CONST_PTR): Likewise.
18949         (BT_FN_CONST_PTR_BND): Likewise.
18950         (BT_FN_VOID_PTR_BND): Likewise.
18951         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
18952         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
18953         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
18954         (expand_builtin_mempcpy_with_bounds): Likewise.
18955         (expand_builtin_memset_with_bounds): Likewise.
18956         (expand_builtin_memset_args): Likewise.
18957         (std_expand_builtin_va_start): Likewise.
18958         (expand_builtin): Likewise.
18959         (expand_builtin_with_bounds): Likewise.
18960         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
18961         (DEF_LIB_BUILTIN_CHKP): Likewise.
18962         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
18963         (DEF_CHKP_BUILTIN): Likewise.
18964         (BUILT_IN_MEMCPY): Likewise.
18965         (BUILT_IN_MEMMOVE): Likewise.
18966         (BUILT_IN_MEMPCPY): Likewise.
18967         (BUILT_IN_MEMSET): Likewise.
18968         (BUILT_IN_STPCPY): Likewise.
18969         (BUILT_IN_STRCAT): Likewise.
18970         (BUILT_IN_STRCHR): Likewise.
18971         (BUILT_IN_STRCPY): Likewise.
18972         (BUILT_IN_STRLEN): Likewise.
18973         (BUILT_IN_MEMCPY_CHK): Likewise.
18974         (BUILT_IN_MEMMOVE_CHK): Likewise.
18975         (BUILT_IN_MEMPCPY_CHK): Likewise.
18976         (BUILT_IN_MEMSET_CHK): Likewise.
18977         (BUILT_IN_STPCPY_CHK): Likewise.
18978         (BUILT_IN_STRCAT_CHK): Likewise.
18979         (BUILT_IN_STRCPY_CHK): Likewise.
18980         * calls.c (store_bounds): Likewise.
18981         (emit_call_1): Likewise.
18982         (special_function_p): Likewise.
18983         (maybe_warn_nonstring_arg): Likewise.
18984         (initialize_argument_information): Likewise.
18985         (finalize_must_preallocate): Likewise.
18986         (compute_argument_addresses): Likewise.
18987         (expand_call): Likewise.
18988         * cfgexpand.c (expand_call_stmt): Likewise.
18989         (expand_return): Likewise.
18990         (expand_gimple_stmt_1): Likewise.
18991         (pass_expand::execute): Likewise.
18992         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
18993         (cgraph_node::remove): Likewise.
18994         (cgraph_node::dump): Likewise.
18995         (cgraph_node::verify_node): Likewise.
18996         * cgraph.h (chkp_function_instrumented_p): Likewise.
18997         (symtab_node::get_alias_target): Likewise.
18998         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
18999         (cgraph_local_p): Likewise.
19000         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
19001         (cgraph_edge::rebuild_references): Likewise.
19002         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
19003         (walk_polymorphic_call_targets): Likewise.
19004         (cgraph_node::expand_thunk): Likewise.
19005         (symbol_table::output_weakrefs): Likewise.
19006         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
19007         (ix86_handle_option): Likewise.
19008         * config/i386/constraints.md: Likewise.
19009         * config/i386/i386-builtin-types.def (BND): Likewise.
19010         (VOID): Likewise.
19011         (PVOID): Likewise.
19012         (ULONG): Likewise.
19013         * config/i386/i386-builtin.def (BDESC_END): Likewise.
19014         (BDESC_FIRST): Likewise.
19015         (BDESC): Likewise.
19016         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
19017         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
19018         * config/i386/i386.c (enum reg_class): Likewise.
19019         (ix86_target_string): Likewise.
19020         (ix86_option_override_internal): Likewise.
19021         (ix86_conditional_register_usage): Likewise.
19022         (ix86_valid_target_attribute_inner_p): Likewise.
19023         (ix86_set_indirect_branch_type): Likewise.
19024         (ix86_set_current_function): Likewise.
19025         (ix86_function_arg_regno_p): Likewise.
19026         (init_cumulative_args): Likewise.
19027         (ix86_function_arg_advance): Likewise.
19028         (ix86_function_arg): Likewise.
19029         (ix86_pass_by_reference): Likewise.
19030         (ix86_function_value_regno_p): Likewise.
19031         (ix86_function_value_1): Likewise.
19032         (ix86_function_value_bounds): Likewise.
19033         (ix86_return_in_memory): Likewise.
19034         (ix86_setup_incoming_vararg_bounds): Likewise.
19035         (ix86_va_start): Likewise.
19036         (indirect_thunk_need_prefix): Likewise.
19037         (print_reg): Likewise.
19038         (ix86_print_operand): Likewise.
19039         (ix86_expand_call): Likewise.
19040         (ix86_output_function_return): Likewise.
19041         (reg_encoded_number): Likewise.
19042         (BDESC_VERIFYS): Likewise.
19043         (ix86_init_mpx_builtins): Likewise.
19044         (ix86_init_builtins): Likewise.
19045         (ix86_emit_cmove): Likewise.
19046         (ix86_emit_move_max): Likewise.
19047         (ix86_expand_builtin): Likewise.
19048         (ix86_builtin_mpx_function): Likewise.
19049         (ix86_get_arg_address_for_bt): Likewise.
19050         (ix86_load_bounds): Likewise.
19051         (ix86_store_bounds): Likewise.
19052         (ix86_load_returned_bounds): Likewise.
19053         (ix86_store_returned_bounds): Likewise.
19054         (ix86_class_likely_spilled_p): Likewise.
19055         (ix86_hard_regno_mode_ok): Likewise.
19056         (x86_order_regs_for_local_alloc): Likewise.
19057         (ix86_mitigate_rop): Likewise.
19058         (ix86_bnd_prefixed_insn_p): Likewise.
19059         (ix86_mpx_bound_mode): Likewise.
19060         (ix86_make_bounds_constant): Likewise.
19061         (ix86_initialize_bounds): Likewise.
19062         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
19063         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
19064         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
19065         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
19066         (TARGET_CHKP_BOUND_MODE): Likewise.
19067         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
19068         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
19069         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
19070         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
19071         * config/i386/i386.h (TARGET_MPX): Likewise.
19072         (TARGET_MPX_P): Likewise.
19073         (VALID_BND_REG_MODE): Likewise.
19074         (FIRST_BND_REG): Likewise.
19075         (LAST_BND_REG): Likewise.
19076         (enum reg_class): Likewise.
19077         (BND_REG_P): Likewise.
19078         (BND_REGNO_P): Likewise.
19079         (BNDmode): Likewise.
19080         (ADJUST_INSN_LENGTH): Likewise.
19081         * config/i386/i386.md: Likewise.
19082         * config/i386/i386.opt: Likewise.
19083         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
19084         (defined): Likewise.
19085         (LINK_MPX): Likewise.
19086         (MPX_SPEC): Likewise.
19087         (LIBMPX_SPEC): Likewise.
19088         (LIBMPXWRAPPERS_SPEC): Likewise.
19089         (CHKP_SPEC): Likewise.
19090         * config/i386/predicates.md: Likewise.
19091         * dbxout.c (dbxout_type): Likewise.
19092         * doc/extend.texi: Likewise.
19093         * doc/invoke.texi: Likewise.
19094         * doc/md.texi: Likewise.
19095         * doc/tm.texi: Likewise.
19096         * doc/tm.texi.in: Likewise.
19097         * dwarf2out.c (is_base_type): Likewise.
19098         (gen_formal_types_die): Likewise.
19099         (gen_subprogram_die): Likewise.
19100         (gen_type_die_with_usage): Likewise.
19101         (gen_decl_die): Likewise.
19102         (dwarf2out_late_global_decl): Likewise.
19103         * expr.c (expand_assignment): Likewise.
19104         (emit_storent_insn): Likewise.
19105         (store_expr_with_bounds): Likewise.
19106         (store_expr): Likewise.
19107         (expand_expr_real_1): Likewise.
19108         * expr.h (store_expr_with_bounds): Likewise.
19109         * function.c (use_register_for_decl): Likewise.
19110         (struct bounds_parm_data): Likewise.
19111         (assign_parms_augmented_arg_list): Likewise.
19112         (assign_parm_find_entry_rtl): Likewise.
19113         (assign_parm_is_stack_parm): Likewise.
19114         (assign_parm_load_bounds): Likewise.
19115         (assign_bounds): Likewise.
19116         (assign_parms): Likewise.
19117         (expand_function_start): Likewise.
19118         * gcc.c (CHKP_SPEC): Likewise.
19119         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
19120         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
19121         (wrestrict_dom_walker::check_call): Likewise.
19122         * gimple.c (gimple_build_call_from_tree): Likewise.
19123         * gimple.h (enum gf_mask): Likewise.
19124         (gimple_call_with_bounds_p): Likewise.
19125         (gimple_call_set_with_bounds): Likewise.
19126         * gimplify.c (gimplify_init_constructor): Likewise.
19127         * ipa-cp.c (initialize_node_lattices): Likewise.
19128         (propagate_constants_across_call): Likewise.
19129         (find_more_scalar_values_for_callers_subset): Likewise.
19130         * ipa-hsa.c (process_hsa_functions): Likewise.
19131         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
19132         * ipa-icf.c (sem_function::merge): Likewise.
19133         * ipa-inline.c (early_inliner): Likewise.
19134         * ipa-pure-const.c (warn_function_noreturn): Likewise.
19135         (warn_function_cold): Likewise.
19136         (propagate_pure_const): Likewise.
19137         * ipa-ref.h (enum GTY): Likewise.
19138         * ipa-split.c (find_retbnd): Likewise.
19139         (consider_split): Likewise.
19140         (split_function): Likewise.
19141         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
19142         * ipa.c (walk_polymorphic_call_targets): Likewise.
19143         (symbol_table::remove_unreachable_nodes): Likewise.
19144         (process_references): Likewise.
19145         (cgraph_build_static_cdtor_1): Likewise.
19146         * lto-cgraph.c (lto_output_node): Likewise.
19147         (output_refs): Likewise.
19148         (compute_ltrans_boundary): Likewise.
19149         (input_overwrite_node): Likewise.
19150         (input_node): Likewise.
19151         (input_cgraph_1): Likewise.
19152         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
19153         * passes.c (pass_manager::execute_early_local_passes): Likewise.
19154         (class pass_chkp_instrumentation_passes): Likewise.
19155         (make_pass_chkp_instrumentation_passes): Likewise.
19156         * passes.def: Likewise.
19157         * rtl.h (struct GTY): Likewise.
19158         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
19159         * stor-layout.c (layout_type): Likewise.
19160         * symtab.c: Likewise.
19161         * target.def: Likewise.
19162         * targhooks.c (default_chkp_bound_type): Likewise.
19163         (default_chkp_bound_mode): Likewise.
19164         (default_builtin_chkp_function): Likewise.
19165         (default_chkp_function_value_bounds): Likewise.
19166         (default_chkp_make_bounds_constant): Likewise.
19167         (default_chkp_initialize_bounds): Likewise.
19168         * targhooks.h (default_chkp_bound_type): Likewise.
19169         (default_chkp_bound_mode): Likewise.
19170         (default_builtin_chkp_function): Likewise.
19171         (default_chkp_function_value_bounds): Likewise.
19172         (default_chkp_make_bounds_constant): Likewise.
19173         (default_chkp_initialize_bounds): Likewise.
19174         * toplev.c (compile_file): Likewise.
19175         (process_options): Likewise.
19176         * tree-core.h (DEF_BUILTIN): Likewise.
19177         (DEF_BUILTIN_CHKP): Likewise.
19178         * tree-inline.c (declare_return_variable): Likewise.
19179         (remap_gimple_stmt): Likewise.
19180         (copy_bb): Likewise.
19181         (initialize_inlined_parameters): Likewise.
19182         (expand_call_inline): Likewise.
19183         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
19184         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
19185         (make_pass_ipa_chkp_produce_thunks): Likewise.
19186         (make_pass_chkp): Likewise.
19187         (make_pass_chkp_opt): Likewise.
19188         (make_pass_chkp_instrumentation_passes): Likewise.
19189         * tree-pretty-print.c (dump_generic_node): Likewise.
19190         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
19191         * tree-ssa-dce.c (propagate_necessity): Likewise.
19192         (eliminate_unnecessary_stmts): Likewise.
19193         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
19194         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
19195         * tree-ssa-sccvn.h: Likewise.
19196         * tree-ssa-strlen.c (get_string_length): Likewise.
19197         (valid_builtin_call): Likewise.
19198         (adjust_last_stmt): Likewise.
19199         (handle_builtin_strchr): Likewise.
19200         (handle_builtin_strcpy): Likewise.
19201         (handle_builtin_stxncpy): Likewise.
19202         (handle_builtin_memcpy): Likewise.
19203         (handle_builtin_strcat): Likewise.
19204         (strlen_check_and_optimize_stmt): Likewise.
19205         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
19206         * tree-streamer-in.c: Likewise.
19207         * tree-streamer.c (record_common_node): Likewise.
19208         * tree.c (tree_code_size): Likewise.
19209         (wide_int_to_tree_1): Likewise.
19210         (type_contains_placeholder_1): Likewise.
19211         (build_common_tree_nodes): Likewise.
19212         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
19213         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
19214         (POINTER_BOUNDS_P): Likewise.
19215         (BOUNDED_TYPE_P): Likewise.
19216         (BOUNDED_P): Likewise.
19217         (CALL_WITH_BOUNDS_P): Likewise.
19218         (pointer_bounds_type_node): Likewise.
19219         * value-prof.c (gimple_ic): Likewise.
19220         * var-tracking.c (vt_add_function_parameters): Likewise.
19221         * varasm.c (make_decl_rtl): Likewise.
19222         (assemble_start_function): Likewise.
19223         (output_constant): Likewise.
19224         (maybe_assemble_visibility): Likewise.
19225         * varpool.c (ctor_for_folding): Likewise.
19226         * chkp-builtins.def: Remove.
19227         * ipa-chkp.c: Remove.
19228         * ipa-chkp.h: Remove.
19229         * rtl-chkp.c: Remove.
19230         * rtl-chkp.h: Remove.
19231         * tree-chkp-opt.c: Remove.
19232         * tree-chkp.c: Remove.
19233         * tree-chkp.h: Remove.
19235 2018-06-07  Carl Love  <cel@us.ibm.com>
19237         * config/rs6000/vsx.md (vextract_fp_from_shorth,
19238         vextract_fp_from_shortl): Add BE support.
19240 2018-06-07  Paul Koning  <ni1d@arrl.net>
19242         * compare-elim.c (try_merge_compare): Don't merge compare if
19243         address contains a side effect.
19244         (try_eliminate_compare): Likewise.
19246 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
19248         * config.gcc: Support "tremont".
19249         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
19250         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19251         PROCESSOR_TREMONT.
19252         * config/i386/i386.c (m_TREMONT): Define.
19253         (processor_target_table): Add "tremont".
19254         (PTA_TREMONT): Define.
19255         (ix86_lea_outperforms): Add TARGET_TREMONT.
19256         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
19257         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
19258         and M_INTEL_GOLDMONT_PLUS.
19259         (fold_builtin_cpu): Add "tremont".
19260         (ix86_add_stmt_cost): Add TARGET_TREMONT.
19261         (ix86_option_override_internal): Add "tremont".
19262         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
19263         (processor_type): Add PROCESSOR_TREMONT.
19264         * config/i386/x86-tune.def: Add m_TREMONT.
19265         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
19267 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
19269         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
19270         symbol defined for msp430i* devices to be lower case.
19272 2018-06-07  Richard Biener  <rguenther@suse.de>
19274         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
19275         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
19276         Properly wrap signed arithmetic if overflow wraps.
19278 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
19280         PR tree-optimization/69615
19281         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
19282         of a cast from a same precision integral SSA_NAME in a bb dominated
19283         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
19284         cast to utype if rhs2 has already a compatible type.
19286 2018-06-07  Richard Biener  <rguenther@suse.de>
19288         PR tree-optimization/85935
19289         * graphite-scop-detection.c (find_params_in_bb): Analyze
19290         condition operands with respect to the correct loop.  Assert
19291         the analysis doesn't fail.
19293 2018-06-04  Carl Love  <cel@us.ibm.com>
19295         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
19296         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
19297         as it is slightly cheaper.
19298         (first_match_or_eos_index_<mode>):
19299         Calculate index using natural element order.
19300         (first_match_index_<mode>):
19301         Calculate index using natural element order.
19302         (first_match_or_eos_index_<mode>):
19303         Calculate index using natural order.
19304         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
19305         for BE and LE modes.
19306         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
19307         P9V_BUILTIN_VCLZLSBB_V16QI.
19308         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
19309         specific.
19311 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19313         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
19314         indentation and line wrap for many prototypes.  Add missing
19315         @smallexample directives around block of prototypes for vec_xl and
19316         vec_xst.
19318 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
19320         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
19321         track if we pass or return IEEE 128-bit floating point.
19322         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
19323         C++ mangling that is compatible with GCC 8.1.
19324         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
19325         (init_cumulative_args): Note if we pass or return IEEE 128-bit
19326         floating point types.
19327         (rs6000_function_arg_advance_1): Likewise.
19328         (rs6000_mangle_type): Optionally generate mangled names that match
19329         what GCC 8.1 generated for IEEE 128-bit floating point types.
19330         (rs6000_globalize_decl_name): If we have an external function that
19331         passes or returns IEEE 128-bit types, generate a weak reference
19332         from the mangled name used in GCC 8.1 to the current mangled
19333         name.
19334         (rs6000_init_builtins): Make __ibm128 use the long double type if
19335         long double is IBM extended double.  Make __float128 use the long
19336         double type if long double is IEEE 128-bit.
19338         PR target/85657
19339         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
19340         macro for __ibm128 built-in functions.
19341         (PACK_IF): Add __ibm128 pack/unpack functions.
19342         (UNPACK_IF): Likewise.
19343         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
19344         enable long double built-in functions if long double is IEEE
19345         128-bit floating point.
19346         (rs6000_invalid_builtin): Update long double built-in function
19347         error message.
19348         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
19349         functions, adjust the built-in function to use the long double
19350         built-in function if __ibm128 and long double are the same type.
19351         * doc/extend.texi (PowerPC builtins): Update documention for
19352         __builtin_{,un}pack_longdouble.  Add documentation for
19353         __builtin_{,un}pack_ibm128.
19355 2018-06-06  Jim Wilson  <jimw@sifive.com>
19357         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
19358         (struct machine_function): New field interrupt_mode.
19359         (riscv_handle_type_attribute): New function.  Add forward declaration.
19360         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
19361         (riscv_expand_epilogue): Check interrupt_mode field.
19362         (riscv_set_current_function): Check interrupt attribute args and
19363         set interrupt_mode field.
19364         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
19365         (riscv_sret, riscv_uret): New.
19366         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
19367         new arguments to interrupt attribute.
19369 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
19371         PR target/63177
19372         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
19373         Don't handle -mcpu=power8 if -mpower9-vector is also used.
19375 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19377         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
19378         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
19379         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
19380         several redundant entries.
19382 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
19384         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
19385         type from "rtx" to "rtx_insn *".
19386         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
19387         for local "call_insn", removing cast.
19388         (ix86_expand_call): Likewise, introducing a "call_insn" local.
19390 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
19392         PR tree-optimization/86066
19393         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
19394         for BIT_INSERT_EXPR stores.
19396 2018-06-06  Richard Biener  <rguenther@suse.de>
19398         PR tree-optimization/86062
19399         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
19400         component refs ontop
19401         of to be offsetted base.
19403 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
19405         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
19406         to be static and remove check on interrupt attribute name.
19408 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19410         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
19411         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
19413 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
19415         PR target/79924
19416         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
19417         second argument.
19418         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
19419         Remove second argument, change how error is called.
19420         (aarch64_layout_arg): Remove second argument from
19421         aarch64_err_no_fpadvsimd call.
19422         (aarch64_init_cumulative_args): Ditto.
19423         (aarch64_gimplify_va_arg_expr): Ditto.
19424         * config/aarch64/aarch64.md (mov<mode>): Ditto.
19426 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
19428         * config/i386/i386.md (simple_return_indirect_internal): New expander.
19429         (*simple_return_indirect_internal<mode>): Rename from
19430         simple_return_indirect_internal.  Use W mode iterator.
19431         (rstorssp): New expander.
19432         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
19433         (clrssbsy): New expander.
19434         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
19436 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
19438         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
19439         __typeof__.
19440         (cmse_check_pointed_object): Likewise.
19442 2018-06-05  Martin Liska  <mliska@suse.cz>
19444         PR gcov-profile/47618
19445         * doc/invoke.texi: Document how -fprofile-dir format
19446         is extended.
19448 2018-06-05  Richard Biener  <rguenther@suse.de>
19450         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
19451         removal pretend DOM info isn't available so we do not update
19452         it and only remove edges, not dominated blocks.  Actually free
19453         DOM info in case we removed something.  Remove unreachable blocks.
19454         (mfb_keep_latches): Work with either DOM info or marked backedges.
19455         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
19456         first.  Mark backedges if DOM info isn't available.
19457         (Re-)compute DOM info after cleanup_control_flow_pre.
19459 2018-06-05  Richard Biener  <rguenther@suse.de>
19461         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
19462         (locus_discrim_hasher::hash): Adjust.
19463         (locus_discrim_hasher::equal): Likewise.
19464         (next_discriminator_for_locus): Work on line directly.
19465         (same_line_p): Pass in expanded locus1 as well.
19466         (assign_discriminators): Avoid redundant location expansions.
19468 2018-06-05  Richard Biener  <rguenther@suse.de>
19470         PR tree-optimization/86046
19471         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
19472         if required after clearing TREE_ADDRESSABLE.
19474 2018-06-05  Richard Biener  <rguenther@suse.de>
19476         PR tree-optimization/86047
19477         * tree-ssa-loop.c (for_each_index): Glob handling of all
19478         decls and constants and really handle all of them.
19480 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19482         PR target/81497
19483         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
19484         qualifier_void_pointer and qualifier_const_void_pointer.
19485         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
19486         (arm_init_builtins): Handle the above.
19487         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
19488         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
19489         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
19490         void intrinsics.
19492 2018-06-05  Martin Liska  <mliska@suse.cz>
19494         * auto-profile.c (read_autofdo_file): Do not use
19495         gcov_ctr_summary struct.
19496         (afdo_callsite_hot_enough_for_early_inline): Likewise.
19497         * coverage.c (struct counts_entry): Likewise.
19498         (read_counts_file): Read just single summary entry.
19499         (get_coverage_counts): Use gcov_summary struct.
19500         * coverage.h (get_coverage_counts): Likewise.
19501         * gcov-dump.c (dump_working_sets): Likewise.
19502         (tag_summary): Dump just single summary.
19503         * gcov-io.c (gcov_write_summary): Write just histogram
19504         summary.
19505         (gcov_read_summary): Read just single summary.
19506         (compute_working_sets): Use gcov_summary struct.
19507         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
19508         of GCOV_COUNTERS_SUMMABLE.
19509         (GCOV_COUNTERS_SUMMABLE): Remove.
19510         (GCOV_FIRST_VALUE_COUNTER): Replace with
19511         GCOV_COUNTER_V_INTERVAL.
19512         (struct gcov_ctr_summary): Remove.
19513         (struct gcov_summary): Directly use fields of former
19514         gcov_ctr_summary.
19515         (compute_working_sets): Use gcov_summary struct.
19516         * gcov.c (read_count_file): Do not use ctrs fields.
19517         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
19518         struct.
19519         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
19520         struct.
19521         * profile.c: Likewise.
19522         * profile.h: Likewise.
19524 2018-06-05  Martin Liska  <mliska@suse.cz>
19526         PR gcov-profile/84846
19527         * gcov.c (output_lines): Print working directory only
19528         in intermediate format.
19530 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
19532         * config/s390/s390-builtin-types.def: Add void function type.
19533         * config/s390/s390-builtins.def: Use the function type for the
19534         tbeginc builtin.
19536 2018-06-04  Jim Wilson  <jimw@sifive.com>
19538         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
19539         to int.
19540         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
19541         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
19542         handle EH_RETURN_DATA_REGNO registers properly.
19543         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
19544         (riscv_expand_epilogue): Update comment.  Change argument name and
19545         type.  Update code to use new name and type.  Pass new args to
19546         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
19547         EXCEPTION_RETURN.
19548         * config/riscv/riscv.md (NORMAL_RETURN): New.
19549         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
19550         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
19551         (eh_return): Call gen_eh_return_internal and emit barrier.
19552         (eh_return_internal): Call riscv_expand_epilogue.
19554 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
19556         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
19557         bit_insertion field and declare can_be_merged_into method.
19558         (merged_store_group::can_be_merged_into): New method.
19559         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
19560         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
19561         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
19563 2018-06-04  Richard Biener  <rguenther@suse.de>
19565         PR tree-optimization/85955
19566         * builtins.c (fold_builtin_sincos): Convert pointers to
19567         destination to appropriate type before dereferencing.
19569 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
19571         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
19573 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
19575         * expr.c (expand_expr_real_1): Force the operand into memory if
19576         its TYPE_MODE is BLKmode and if there is no integer mode for
19577         the number of bits being extracted.
19579 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
19581         PR target/85832
19582         PR target/86036
19583         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
19584         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
19586 2018-06-04  Richard Biener  <rguenther@suse.de>
19588         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
19589         (cleanup_tree_cfg_noloop): ... single caller.  Do
19590         start_recording_case_labels later.
19592 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
19594         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
19595         to _IMMINTRIN_H_INCLUDED.
19596         * config/i386/pconfigintrin.h: Ditto.
19597         * config/i386/waitpkgintrin.h: Ditto.
19598         * config/i386/immintrin.h: Add includes for sgxintrin.h,
19599         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
19600         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
19601         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
19602         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
19603         waitpkgintrin.h and cldemoteintrin.h.
19605 2018-06-04  Richard Biener  <rguenther@suse.de>
19607         PR tree-optimization/86038
19608         * tracer.c (find_best_successor): Check probability for
19609         being initialized, bail out if not.
19611 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
19613         PR target/86003
19614         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
19615         of bits to ignore when comparing architectures.
19617 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
19619         PR tree-optimization/69615
19620         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
19621         maximum or minimum of the type, try to merge it also as if
19622         range1 is + [-, x - 1] or + [x + 1, -].
19624         PR c++/86025
19625         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
19627 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
19629         PR tree-optimization/86034
19630         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
19631         the unsigned bitfield type in a bit insertion sequence if it does not
19632         have a larger precision than the bitfield size.
19633         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
19635 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
19637         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
19639 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
19641         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
19642         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
19643         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
19644         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
19646 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
19648         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
19649         Disable -fdelete-null-pointer-checks for ELF toolchain.
19651 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
19652             Kito Cheng  <kito.cheng@gmail.com>
19654         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
19655         (nds32le-*-*, nds32be-*-*): Integrate checking process.
19656         (nds32*-*-*): Add glibc and uclibc conditions.
19657         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
19658         (TARGET_EXCEPT_UNWIND_INFO): Define.
19659         * config/nds32/elf.h: New file.
19660         * config/nds32/linux.h: New file.
19661         * config/nds32/nds32-elf.opt: New file.
19662         * config/nds32/nds32-linux.opt: New file.
19663         * config/nds32/nds32-fp-as-gp.c
19664         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
19665         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
19666         TARGET_LINUX_ABI.
19667         (nds32_asm_file_end): Ditto.
19668         (nds32_print_operand): Ditto.
19669         (nds32_insert_attributes): Ditto.
19670         (nds32_init_libfuncs): New function.
19671         (TARGET_HAVE_TLS): Define.
19672         (TARGET_INIT_LIBFUNCS): Define.
19673         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
19674         spec content.
19675         (TARGET_ELF): Apply different mcmodel setting.
19676         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
19677         been migrated into elf.h and linux.h files.
19678         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
19679         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
19680         (mcmodel): The content has been migrated into nds32-elf.opt and
19681         nds32-linux.opt files.
19682         * config/nds32/t-elf: New file.
19683         * config/nds32/t-linux: New file.
19685 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
19686             Shiva Chen  <shiva0217@gmail.com>
19688         * config/nds32/constants.md (unspec_volatile_element): Add
19689         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
19690         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
19691         optimization.
19692         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
19693         (make_pass_nds32_fp_as_gp): Declare.
19694         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
19695         optmization pass.
19696         (nds32_asm_function_end_prologue): Remove unused asm output.
19697         (nds32_asm_function_begin_epilogue): Remove unused asm output.
19698         (nds32_asm_file_start): Output necessary fp_as_gp information.
19699         (nds32_option_override): Adjust register usage.
19700         (nds32_expand_prologue): Consider fp_as_gp situation.
19701         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
19702         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
19703         (epilogue): Ditto.
19704         (return): Ditto.
19705         (simple_return): Ditto.
19706         (omit_fp_begin): Output special directive for fp_as_gp.
19707         (omit_fp_end): Output special directive for fp_as_gp.
19708         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
19709         mforbid-fp-as-gp): New options.
19711 2018-06-01  Mark Wielaard  <mark@klomp.org>
19713         * dwarf2out.c (dwarf2out_finish): Remove generation of
19714         DW_AT_loclists_base.
19716 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
19718         * gimple-ssa-store-merging.c: Include gimple-fold.h.
19719         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
19720         (struct merged_store_group): Add bit_insertion field.
19721         (dump_char_array): Use standard hexadecimal format.
19722         (merged_store_group::merged_store_group): Set bit_insertion to false.
19723         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
19724         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
19725         also print the mask in the dump file.
19726         (pass_store_merging::gate): Minor tweak.
19727         (imm_store_chain_info::coalesce_immediate): Fix wrong association
19728         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
19729         stores with INTEGER_CST stores.
19730         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
19731         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
19732         and use it throughout.  Generate bit insertion sequences if need be.
19733         (pass_store_merging::process_store): Remove redundant condition.
19734         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
19736 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
19738         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
19739         the 128-bit floating point types.  Fix function comment.
19741 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19743         * config/aarch64/aarch64-simd.md
19744         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
19745         mnemonics.
19746         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
19747         mnemonics.
19749 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
19751         PR tree-optimization/85989
19752         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
19753         variable.
19754         (backprop::intersect_uses): Check it when deciding whether this
19755         is a backedge reference.
19756         (backprop::process_block): Add each phi to m_visited_phis
19757         after visiting it, then clear it at the end.
19759 2018-06-01  Richard Biener  <rguenther@suse.de>
19761         * tree-vectorizer.h (vect_dr_stmt): New function.
19762         (vect_get_load_cost): Adjust.
19763         (vect_get_store_cost): Likewise.
19764         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
19765         Use vect_dr_stmt instead of DR_SMTT.
19766         (vect_record_base_alignments): Likewise.
19767         (vect_calculate_target_alignment): Likewise.
19768         (vect_compute_data_ref_alignment): Likewise and make static.
19769         (vect_update_misalignment_for_peel): Likewise.
19770         (vect_verify_datarefs_alignment): Likewise.
19771         (vector_alignment_reachable_p): Likewise.
19772         (vect_get_data_access_cost): Likewise.  Pass down
19773         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
19774         (vect_get_peeling_costs_all_drs): Likewise.
19775         (vect_peeling_hash_get_lowest_cost): Likewise.
19776         (vect_enhance_data_refs_alignment): Likewise.
19777         (vect_find_same_alignment_drs): Likewise.
19778         (vect_analyze_data_refs_alignment): Likewise.
19779         (vect_analyze_group_access_1): Likewise.
19780         (vect_analyze_group_access): Likewise.
19781         (vect_analyze_data_ref_access): Likewise.
19782         (vect_analyze_data_ref_accesses): Likewise.
19783         (vect_vfa_segment_size): Likewise.
19784         (vect_small_gap_p): Likewise.
19785         (vectorizable_with_step_bound_p): Likewise.
19786         (vect_prune_runtime_alias_test_list): Likewise.
19787         (vect_analyze_data_refs): Likewise.
19788         (vect_supportable_dr_alignment): Likewise.
19789         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
19790         (vect_gen_prolog_loop_niters): Likewise.
19791         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
19792         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
19793         modify DR_STMT.
19794         (vect_recog_mask_conversion_pattern): Likewise.
19795         (vect_try_gather_scatter_pattern): Likewise.
19796         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
19797         to vect_get_store_cost.
19798         (vect_get_store_cost): Get stmt_info instead of DR.
19799         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
19800         (vect_get_load_cost): Get stmt_info instead of DR.
19802 2018-06-01  Richard Biener  <rguenther@suse.de>
19804         PR middle-end/86017
19805         * gimple-fold.c (var_decl_component_p): Also allow offsetted
19806         vars wrapped in MEM_REFs.
19808 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
19810         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
19811         Fix subreg tests so that we only return a choice between
19812         GENERAL_REGS and FP_REGS if the original classes included both.
19814 2018-06-01  Richard Biener  <rguenther@suse.de>
19816         PR ipa/85960
19817         * tree-ssa-structalias.c (get_function_part_constraint):
19818         Handle NULL fi->decl.
19819         (find_func_aliases_for_call): Properly handle indirect
19820         fi from direct call.
19821         (find_func_clobbers): Likewise.
19822         (ipa_pta_execute): Likewise.
19823         (create_variable_info_for): For functions that are ifunc_resolver
19824         resolve to a varinfo that contains the result of the resolver call.
19825         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
19826         aliases.
19828 2018-05-31  Michael Collison  <michael.collison@arm.com>
19830         * config/aarch64/aarch64.md:
19831         (*fix_to_zero_extenddfdi2): New pattern.
19832         * gcc.target/aarch64/fix_extend1.c: New testcase.
19834 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
19836         PR middle-end/78809
19837         PR middle-end/83026
19838         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
19839         and BUILT_IN_STRNCMP_EQ.
19840         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
19841         BUILT_IN_STRNCMP_EQ.
19842         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
19843         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
19844         (gimple_fold_builtin): Likewise.
19845         * tree-ssa-strlen.c (compute_string_length): New function.
19846         (determine_min_obsize): New function.
19847         (handle_builtin_string_cmp): New function to handle calls to
19848         string compare functions.
19849         (strlen_optimize_stmt): Add handling to builtin string compare
19850         calls.
19851         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
19852         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
19853         * tree.c (build_common_builtin_nodes): Add new defines of
19854         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
19856 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
19858         PR target/85984
19859         * bb-reorder.c (pass_partition_blocks::gate): Return false for
19860         functions with naked attribute.
19862 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
19864         * config/i386/sse.md (avx_vec_concat<mode>):
19865         Substitute concat_tg_mode mode attribute with xtg_mode.
19866         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
19867         (concat_tg_mode): Remove mode attribute.
19869 2018-05-31  Martin Sebor  <msebor@redhat.com>
19871         PR c/82063
19872         * calls.c (alloc_max_size): Correct a logic error/typo.
19873         Treat excessive arguments as infinite.  Warn for invalid arguments.
19874         * doc/invoke.texi (-Walloc-size-larger-than): Update.
19876 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
19878         PR target/85829
19879         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
19880         and movx for Haswell.
19882 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
19883             Cesar Philippidis  <cesar@codesourcery.com>
19885         PR middle-end/85879
19886         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
19887         when emitting error on private/firstprivate reductions.
19888         * omp-low.c (lower_omp_target): Avoid reference-type processing
19889         on pointers for firstprivate clause.
19891 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
19893         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
19894         (st1x2): Likewise.
19895         (st1x3): Likewise.
19896         * config/aarch64/aarch64-simd.md
19897         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
19898         (aarch64_ld1_x3_<mode>): Likewise
19899         (aarch64_st1x2<VALLDIF:mode>): Likewise
19900         (aarch64_st1_x2_<mode>): Likewise
19901         (aarch64_st1x3<VALLDIF:mode>): Likewise
19902         (aarch64_st1_x3_<mode>): Likewise
19903         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
19904         (vld1_s8_x3): Likewise.
19905         (vld1_u16_x3): Likewise.
19906         (vld1_s16_x3): Likewise.
19907         (vld1_u32_x3): Likewise.
19908         (vld1_s32_x3): Likewise.
19909         (vld1_u64_x3): Likewise.
19910         (vld1_s64_x3): Likewise.
19911         (vld1_f16_x3): Likewise.
19912         (vld1_f32_x3): Likewise.
19913         (vld1_f64_x3): Likewise.
19914         (vld1_p8_x3): Likewise.
19915         (vld1_p16_x3): Likewise.
19916         (vld1_p64_x3): Likewise.
19917         (vld1q_u8_x3): Likewise.
19918         (vld1q_s8_x3): Likewise.
19919         (vld1q_u16_x3): Likewise.
19920         (vld1q_s16_x3): Likewise.
19921         (vld1q_u32_x3): Likewise.
19922         (vld1q_s32_x3): Likewise.
19923         (vld1q_u64_x3): Likewise.
19924         (vld1q_s64_x3): Likewise.
19925         (vld1q_f16_x3): Likewise.
19926         (vld1q_f32_x3): Likewise.
19927         (vld1q_f64_x3): Likewise.
19928         (vld1q_p8_x3): Likewise.
19929         (vld1q_p16_x3): Likewise.
19930         (vld1q_p64_x3): Likewise.
19931         (vst1_s64_x2): Likewise.
19932         (vst1_u64_x2): Likewise.
19933         (vst1_f64_x2): Likewise.
19934         (vst1_s8_x2): Likewise.
19935         (vst1_p8_x2): Likewise.
19936         (vst1_s16_x2): Likewise.
19937         (vst1_p16_x2): Likewise.
19938         (vst1_s32_x2): Likewise.
19939         (vst1_u8_x2): Likewise.
19940         (vst1_u16_x2): Likewise.
19941         (vst1_u32_x2): Likewise.
19942         (vst1_f16_x2): Likewise.
19943         (vst1_f32_x2): Likewise.
19944         (vst1_p64_x2): Likewise.
19945         (vst1q_s8_x2): Likewise.
19946         (vst1q_p8_x2): Likewise.
19947         (vst1q_s16_x2): Likewise.
19948         (vst1q_p16_x2): Likewise.
19949         (vst1q_s32_x2): Likewise.
19950         (vst1q_s64_x2): Likewise.
19951         (vst1q_u8_x2): Likewise.
19952         (vst1q_u16_x2): Likewise.
19953         (vst1q_u32_x2): Likewise.
19954         (vst1q_u64_x2): Likewise.
19955         (vst1q_f16_x2): Likewise.
19956         (vst1q_f32_x2): Likewise.
19957         (vst1q_f64_x2): Likewise.
19958         (vst1q_p64_x2): Likewise.
19959         (vst1_s64_x3): Likewise.
19960         (vst1_u64_x3): Likewise.
19961         (vst1_f64_x3): Likewise.
19962         (vst1_s8_x3): Likewise.
19963         (vst1_p8_x3): Likewise.
19964         (vst1_s16_x3): Likewise.
19965         (vst1_p16_x3): Likewise.
19966         (vst1_s32_x3): Likewise.
19967         (vst1_u8_x3): Likewise.
19968         (vst1_u16_x3): Likewise.
19969         (vst1_u32_x3): Likewise.
19970         (vst1_f16_x3): Likewise.
19971         (vst1_f32_x3): Likewise.
19972         (vst1_p64_x3): Likewise.
19973         (vst1q_s8_x3): Likewise.
19974         (vst1q_p8_x3): Likewise.
19975         (vst1q_s16_x3): Likewise.
19976         (vst1q_p16_x3): Likewise.
19977         (vst1q_s32_x3): Likewise.
19978         (vst1q_s64_x3): Likewise.
19979         (vst1q_u8_x3): Likewise.
19980         (vst1q_u16_x3): Likewise.
19981         (vst1q_u32_x3): Likewise.
19982         (vst1q_u64_x3): Likewise.
19983         (vst1q_f16_x3): Likewise.
19984         (vst1q_f32_x3): Likewise.
19985         (vst1q_f64_x3): Likewise.
19986         (vst1q_p64_x3): Likewise.
19988 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
19990         * config/msp430/msp430.c (msp430_output_labelref): Prepend
19991         user_label_prefix to name.
19993         * tree-core.h: Update comment about the format of NAME string
19994         passed to handler in attribute_spec.
19996         * config/msp430/msp430.md: Remove erroneous subreg expression from
19997         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
19998         zero_extend{q,h}isi2.
20000 2018-05-30  Borislav Petkov  <bp@suse.de>
20002         * doc/extend.texi: Document some architecture specific
20003         constraints and sort entries.
20005 2018-05-30  Martin Sebor  <msebor@redhat.com>
20007         PR middle-end/85369
20008         * builtins.c (expand_builtin_stpcpy_1): New function.
20009         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
20010         only if the former succeeds.
20012 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
20014         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
20015         in saphira.
20017 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
20019         * doc/invoke.texi (-flinker-output): Document
20021 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
20023         * passes.c (ipa_write_summaries): Only modify statements if body
20024         is in memory.
20025         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
20026         incrementally linking.
20027         (ipa_passes): Likewise.
20028         * lto-cgraph.c (lto_output_node): When incrementally linking do not
20029         pass down resolution info.
20030         * common.opt (flag_incremental_link): Update info.
20031         * gcc.c (plugin specs): Turn flinker-output=* to
20032         -plugin-opt=-linker-output-known
20033         * toplev.c (compile_file): Also cut compilation when doing incremental
20034         link.
20035         * flag-types. (enum lto_partition_model): Add
20036         LTO_LINKER_OUTPUT_NOLTOREL.
20037         (invoke.texi): Add -flinker-output docs.
20038         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
20039         link same way as WPA; do not stream in dead initializers.
20041         * dwarf2out.c (dwarf2out_die_ref_for_decl,
20042         darf2out_register_external_decl): Support incremental link.
20044 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
20046         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
20048 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
20050         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
20051         it down to simple_object_copy_lto_debug_sections.
20052         (run_gcc): Determine incremental LTO link time and configure
20053         lto1 into non-wpa mode, disable renaming of debug sections.
20055 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20057         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
20058         descriptions of various incorrectly documented functions.
20060 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
20062         Revert:
20063         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
20064         address check not strict.
20066 2018-05-30  Richard Biener  <rguenther@suse.de>
20068         PR tree-optimization/85964
20069         * tracer.c (better_p): Drop initialized count check, we only
20070         call the function with initialized counts now.
20071         (find_best_successor): Do find a best edge if one
20072         has uninitialized count.
20073         (find_best_predecessor): Likewise.  Do BB frequency check only
20074         if count is initialized.
20076 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
20078         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
20079         (aarch64_ldrstr_offset_compare): New.
20080         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
20081         load/store orderings.
20082         (aarch64_gen_adjusted_ldpstp): Likewise.
20084 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
20086         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
20087         Check for subset of GENERAL_REGS and FP_REGS.
20088         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
20089         r=w alternative.
20091 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
20093         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
20094         and wi::to_poly_offset.  Add the current offset and then check
20095         whether the sum fits, rather than using an unchecked addition of
20096         a checked term.  Check for a shwi rather than a uhwi.
20097         * expr.c (get_bit_range): Use tree_to_poly_uint64.
20098         (store_constructor): Use poly_int_tree_p.
20099         (expand_expr_real_1): Likewise.
20100         * function.c (assign_temp): Likewise.
20101         * fold-const.c (const_binop): Use poly_int_tree_p and
20102         wi::to_poly_offset.
20103         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
20104         division.
20105         * ipa-icf-gimple.c (func_checker::compare_operand): Use
20106         to_poly_offset for MEM offsets.
20107         * ipa-icf.c (sem_variable::equals): Likewise.
20108         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
20109         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
20110         wi::to_poly_offset for BIT_FIELD_REF offsets.
20111         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
20112         wi::to_poly_offset.
20113         * var-tracking.c (emit_note_insn_var_location): Use
20114         tree_to_poly_uint64.
20116 2018-05-29  Jim Wilson  <jimw@sifive.com>
20118         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
20120 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
20122         PR target/85950
20123         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
20124         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
20125         sequence.
20126         (sse4_1_round<mode>2): Use nonimmediate_operand
20127         for operand 1 predicate.
20129 2018-05-29  Martin Sebor  <msebor@redhat.com>
20130             Richard Biener  <rguenther@suse.de>
20132         PR testsuite/85888
20133         * calls.c (get_size_range): Call determine_value_range instead
20134         of get_value_range..
20135         * tree-vrp.h (determine_value_range): Declared new function.
20136         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
20138 2018-05-29  Richard Biener  <rguenther@suse.de>
20140         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
20141         sure to use non-pattern stmts for get_earlier_stmt arguments.
20142         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
20143         called on pattern stmts.
20144         (get_later_stmt): Likewise.
20146 2018-05-29  Martin Liska  <mliska@suse.cz>
20148         PR gcov-profile/85759
20149         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
20150         env variables.
20152 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
20154         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
20155         VEC_UNPACK_*_EXPR.
20156         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
20157         VEC_PACK_*_EXPR.
20159         PR target/85918
20160         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
20161         VEC_PACK_FLOAT_EXPR): New tree codes.
20162         * tree-pretty-print.c (op_code_prio): Handle
20163         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
20164         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
20165         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
20166         * tree-inline.c (estimate_operator_cost): Likewise.
20167         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
20168         * fold-const.c (const_binop): Likewise.
20169         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
20170         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
20171         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
20172         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
20173         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
20174         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
20175         * expr.c (expand_expr_real_2): Likewise.
20176         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
20177         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
20178         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
20179         optabs.
20180         * optabs.c (expand_widen_pattern_expr): For
20181         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
20182         sign from result type rather than operand's type.
20183         (expand_binop_directly): For vec_packu_float_optab and
20184         vec_packs_float_optab allow result type to be different from operand's
20185         type.
20186         * optabs-tree.c (optab_for_tree_code): Handle
20187         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
20188         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
20189         * tree-vect-generic.c (expand_vector_operations_1):  Handle
20190         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
20191         VEC_PACK_FLOAT_EXPR.
20192         * tree-vect-stmts.c (supportable_widening_operation): Handle
20193         FIX_TRUNC_EXPR.
20194         (supportable_narrowing_operation): Handle FLOAT_EXPR.
20195         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
20196         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
20197         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
20198         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
20199         mode attributes.
20200         (vec_pack<floatprefix>_float_<mode>): New expander.
20201         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
20202         attributes.
20203         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
20204         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
20205         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
20206         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
20207         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
20208         Document.
20209         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
20210         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
20211         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
20212         VEC_PACK_FLOAT_EXPR): Document.
20214 2018-05-29  Richard Biener  <rguenther@suse.de>
20216         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
20217         member.
20218         (stmt_vec_info_vec): Make pointer.
20219         (init_stmt_vec_info_vec): Remove.
20220         (free_stmt_vec_info_vec): Likewise.
20221         (set_stmt_vec_info_vec): New function.
20222         (free_stmt_vec_infos): Likewise.
20223         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
20224         (set_vinfo_for_stmt): Likewise.
20225         (get_earlier_stmt): Likewise.
20226         (get_later_stmt): Likewise.
20227         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
20228         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
20229         (vec_info::~vec_info): Free stmt_vec_infos.
20230         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
20231         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
20232         (pass_slp_vectorize::execute): Likewise.
20233         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
20234         (free_stmt_vec_info_vec): Likewise.
20235         (set_stmt_vec_info_vec): New function.
20236         (free_stmt_vec_infos): Likewise.
20237         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
20238         the global stmt_vec_info_vec.
20239         * tree-parloops.c (gather_scalar_reductions): Use
20240         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
20241         vector.
20243 2018-05-29  Richard Biener  <rguenther@suse.de>
20245         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
20247 2018-05-29  Martin Liska  <mliska@suse.cz>
20248             David Malcolm  <dmalcolm@redhat.com>
20250         * vec.c (test_reverse): New.
20251         (vec_c_tests): Add new test.
20252         * vec.h (vl_ptr>::reverse): New function.
20254 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
20256         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
20258         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
20259         and later.
20261 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
20263         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
20265 2018-05-28  Richard Biener  <rguenther@suse.de>
20267         PR tree-optimization/85933
20268         * tree-vect-data-refs.c (vect_record_base_alignments): Only
20269         look at stmts marked as vectorizable.
20271 2018-05-28  Richard Biener  <rguenther@suse.de>
20273         PR tree-optimization/85934
20274         * tree-vect-generic.c (expand_vector_operations_1): Hoist
20275         vector boolean check before scalar optimization.
20277 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
20279         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
20280         for armv5te.
20282 2018-05-28  Mark Wielaard  <mark@klomp.org>
20284         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
20285         if it is an expression containing a minus sign.
20287 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
20289         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
20291 2018-05-27  Paul Koning  <ni1d@arrl.net>
20293         * config/pdp11/pdp11.md (truncsihi2): Remove.
20295 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
20296             Chung-Ju Wu  <jasonwucj@gmail.com>
20298         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
20299         implementation.
20300         (unaligned_store_dw): Ditto.
20301         * config/nds32/nds32-memory-manipulation.c
20302         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
20303         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
20304         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
20305         (emit_setmem_word_loop): Rename to ...
20306         (emit_setmem_doubleword_loop): ... this.
20307         (nds32_gen_dup_4_byte_to_word_value): New function.
20308         (nds32_gen_dup_8_byte_to_double_word_value): New function.
20309         (nds32_expand_setmem_loop): Refine implementation.
20310         (nds32_expand_setmem_loop_v3m): Ditto.
20311         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
20312         pattern.
20314 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
20316         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
20318 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
20320         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
20321         (nds32_init_machine_status): Initialize machine->attr_naked_p and
20322         machine->attr_no_prologue_p.
20323         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
20324         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
20325         (nds32_expand_epilogue): Consider attr_naked_p.
20326         (nds32_expand_epilogue_v3pop): Likewise.
20327         (nds32_can_use_return_insn): Likewise.
20328         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
20329         attr_no_prologue_p fields.
20330         * config/nds32/nds32.opt (mret-in-naked-func): New option.
20332 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
20334         PR target/85918
20335         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
20336         attributes.
20337         * config/i386/sse.md
20338         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
20339         Rename to ...
20340         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
20341         ... this.
20342         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
20343         Rename to ...
20344         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
20345         ... this.
20346         (*<floatsuffix>floatv2div2sf2): Rename to ...
20347         (*float<floatunssuffix>v2div2sf2): ... this.
20348         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
20349         (float<floatunssuffix>v2div2sf2_mask): ... this.
20350         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
20351         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
20352         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
20353         to ...
20354         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
20355         ... this.
20356         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
20357         Rename to ...
20358         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
20359         ... this.
20360         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
20361         Rename to ...
20362         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
20363         ... this.
20364         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
20365         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
20366         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
20367         gen_ufix_truncv8dfv8si2.
20368         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
20369         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
20370         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
20371         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
20372         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
20373         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
20374         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
20375         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
20377 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
20379         PR target/85900
20380         PR target/85345
20381         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
20383 2018-05-25  Jim Wilson  <jimw@sifive.com>
20385         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
20386         * config/riscv/riscv.c (struct machine_function): Add
20387         interrupt_handler_p and attribute_checked_p fields.
20388         (riscv_attribute_table): Add interrupt.
20389         (riscv_interrupt_type_p): New.
20390         (riscv_save_reg_p): Save extra regs for interrupt handler.
20391         (riscv_use_save_libcall): Return false  for interrupt handler.
20392         (riscv_first_stack_step): Add forward declaration.
20393         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
20394         for interrupt handler with large frame.  Use it for saved reg list.
20395         (riscv_expand_prologue): Move flag_stack_usage_info support to
20396         eliminate duplication.
20397         (riscv_expand_epilogue): Generate mret for interrupt handler.
20398         (riscv_epilogue_uses): New.
20399         (riscv_can_use_return_insn): Return false for interrupt handler.
20400         (riscv_function_ok_for_sibcall): Likewise.
20401         (riscv_set_current_function): Add interrupt handler support.
20402         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
20403         * config/riscv/riscv.md (UNSPECV_MRET): New.
20404         (GP_REGNUM): New.
20405         (riscv_frflags, riscv_fsflags): Use tab after opcode.
20406         (riscv_mret): New.
20407         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
20409 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
20411         PR tree-optimization/85712
20412         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
20413         this candidate has already been replaced in-situ by a copy.
20415 2018-05-25  Jason Merrill  <jason@redhat.com>
20417         PR c++/80485 - inline function non-zero address.
20418         * symtab.c (nonzero_address): Check DECL_COMDAT.
20420 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
20422         PR target/83628
20423         * config/alpha/alpha.md (ashlsi3): New insn pattern.
20424         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
20425         extension of SImode operation.  Use const123_operand predicate.
20426         (*saddsi_1): Remove.
20427         (*saddl_se_1): Ditto.
20428         (*ssubsi_1): Ditto.
20429         (*ssubl_se_1): Ditto.
20430         * config/alpha/predicates.md (const123_operand): New predicate.
20431         * config/alpha/constraints.md (P): Use IN_RANGE.
20433 2018-05-25  Richard Biener  <rguenther@suse.de>
20435         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
20436         defaulted to true.
20437         (ref_maybe_used_by_stmt_p): Likewise.
20438         (stmt_may_clobber_ref_p): Likewise.
20439         (stmt_may_clobber_ref_p_1): Likewise.
20440         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
20441         and pass it along.
20442         (ref_maybe_used_by_stmt_p): Likewise.
20443         (stmt_may_clobber_ref_p): Likewise.
20444         (stmt_may_clobber_ref_p_1): Likewise.
20445         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
20446         the alias oracle to disambiguate DRs with stmts DR analysis
20447         couldn't handle.
20448         (vect_analyze_data_refs): Do not give up on not analyzable
20449         DRs for BB vectorization.  Remove code truncating the dataref
20450         vector.
20452 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
20454         PR target/85832
20455         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
20456         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
20457         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
20459 2018-05-25  Richard Biener  <rguenther@suse.de>
20461         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
20462         function, combining stmt data ref gathering and fatal analysis
20463         parts.
20464         (vect_analyze_data_refs): Remove now redudnant code and simplify.
20465         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
20466         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
20467         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
20468         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
20470 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
20472         PR tree-optimization/85720
20473         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
20474         SCC if all partitions are builtins.
20475         (version_loop_by_alias_check): New parameter.  Generate cancelable
20476         runtime alias check if all partitions are builtins.
20477         (distribute_loop): Update call to above function.
20479 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
20481         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
20482         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
20483         (parm_default_def_partition_arg): Ditto.
20484         (set_parm_default_def_partition): Ditto.
20485         (get_parm_default_def_partitions): Ditto and make it static.
20486         (get_undefined_value_partitions): Ditto and make it static.
20487         (remove_ssa_form): Refactor call to init_var_map here.
20488         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
20489         computation for loop region.
20490         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
20491         (register_default_def): Delete.
20492         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
20493         (parm_default_def_partition_arg): Ditto.
20494         (set_parm_default_def_partition): Ditto.
20495         (get_parm_default_def_partitions): Ditto and make it static.
20496         (get_undefined_value_partitions): Ditto and make it static.
20497         (coalesce_with_default, coalesce_with_default): Update comment.
20498         (create_coalesce_list_for_region): New func factored out from
20499         create_outofssa_var_map.
20500         (populate_coalesce_list_for_outofssa): New func factored out from
20501         create_outofssa_var_map and coalesce_ssa_name.
20502         (create_outofssa_var_map): Delete.
20503         (coalesce_ssa_name): Refactor to support live range computation.
20504         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
20505         (get_parm_default_def_partitions): Delete.
20506         (get_undefined_value_partitions): Ditto.
20507         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
20508         computation for loop region.
20509         (new_tree_live_info, loe_visit_block): Ditto.
20510         (live_worklist, set_var_live_on_entry): Ditto.
20511         (calculate_live_on_exit, verify_live_on_entry): Ditto.
20512         * tree-ssa-live.h (struct _var_map): New fields.
20513         (init_var_map): Change decl.
20514         (region_contains_p): New.
20516 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
20518         * tree-ssa-live.h (live_merge_and_clear): Delete.
20520 2018-05-25  Richard Biener  <rguenther@suse.de>
20522         PR c++/85912
20523         * tree-dump.c (dequeue_and_dump): Remove access to removed
20524         operand 2 of a SWITCH_EXPR.
20526 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
20528         * doc/sourcebuild.texi (vect_double_cond_arith): Include
20529         multiplication and division.
20530         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
20531         (cond_udiv@var{m}, cond_umod@var{m}): Document.
20532         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
20533         (cond_udiv_optab, cond_umod_optab): New optabs.
20534         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
20535         (IFN_COND_RDIV): New internal functions.
20536         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
20537         TRUNC_MOD_EXPR and RDIV_EXPR.
20538         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
20539         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
20540         New unspecs.
20541         (SVE_INT_BINARY): Include mult.
20542         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
20543         (optab, sve_int_op): Handle mult.
20544         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
20545         UNSPEC_COND_DIV.
20546         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
20547         for SVE_INT_BINARY_SD.
20549 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
20551         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
20552         (optab, sve_int_op): Handle div and udiv.
20553         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
20554         for SVE_INT_BINARY_SD.
20555         (*<optab><mode>3): New insn for the same.
20557 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
20559         * tree-vect-patterns.c: Include predict.h.
20560         (vect_recog_divmod_pattern): Restrict check for division support
20561         to when optimizing for size.
20563 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
20565         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
20566         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
20567         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
20568         (gimple_match_op::set_op): Likewise.
20569         (gimple_resimplify4): Declare.
20570         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
20571         (expr::gen_transform): Likewise.
20572         (decision_tree::gen): Generate a simplification routine for 4 operands.
20573         * gimple-match-head.c (gimple_simplify): Add an overload for
20574         4 operands.  In the top-level function, handle up to 4 call
20575         arguments and call gimple_resimplify4.
20576         (gimple_resimplify4): New function.
20577         (build_call_internal): Pass a fourth operand.
20578         (maybe_push_to_seq): Likewise.
20579         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
20580         Fold VEC_COND_EXPRs of an operation and a default value into
20581         an IFN_COND_* function if possible.
20582         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
20583         New unspecs.
20584         (SVE_COND_FP_BINARY): Include them.
20585         (optab, sve_fp_op): Handle them.
20586         (SVE_INT_BINARY_REV): New code iterator.
20587         (SVE_COND_FP_BINARY_REV): New int iterator.
20588         (commutative): New int attribute.
20589         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
20590         Declare.
20591         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
20592         function.
20593         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
20594         (*cond_<optab><mode>): New patterns for reversed operands.
20596 2018-05-25  Richard Biener  <rguenther@suse.de>
20598         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
20599         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
20600         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
20601         (STMT_VINFO_GROUPED_ACCESS): Adjust.
20602         * tree-vect-data-refs.c (everywhere): Adjust users.
20603         * tree-vect-loop.c (everywhere): Likewise.
20604         * tree-vect-slp.c (everywhere): Likewise.
20605         * tree-vect-stmts.c (everywhere): Likewise.
20606         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
20608 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20610         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
20611         Rename to...
20612         (gcc_cv_as_section_exclude): ... this.
20613         Try Solaris as #exclude syntax.
20614         * configure: Regenerate.
20615         * config.in: Regenerate.
20616         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
20617         SECTION_EXCLUDE.
20618         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
20619         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
20621         * varasm.c (default_elf_asm_named_section): Don't check if
20622         HAVE_GAS_SECTION_EXCLUDE is defined.
20624 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
20626         * doc/md.texi: Update the documentation of the cond_* optabs
20627         to mention the new final operand.  Fix GET_MODE_NUNITS call.
20628         Describe the scalar case too.
20629         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
20630         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
20631         instead of 2.
20632         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
20633         (get_conditional_internal_fn): Update comment.
20634         * tree-vect-loop.c (vectorizable_reduction): Pass the original
20635         accumulator value as a final argument to conditional functions.
20636         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
20637         a define_expand and add an "else" operand.  Assert for now that
20638         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
20639         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
20640         (*cond_<optab><mode>): New patterns.
20641         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
20642         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
20643         (UNSPEC_COND_EOR): Delete.
20644         (optab): Remove associated mappings.
20645         (SVE_INT_BINARY): New code iterator.
20646         (sve_int_op): Remove int attribute and add "minus" to the code
20647         attribute.
20648         (SVE_COND_INT_OP): Delete.
20649         (SVE_COND_FP_OP): Rename to...
20650         (SVE_COND_FP_BINARY): ...this.
20652 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
20654         * optabs.c (can_reuse_operands_p): New function.
20655         (maybe_legitimize_operands): Try to reuse the results for
20656         earlier operands.
20658 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
20660         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
20661         Add {q} suffix to insn mnemonic.
20663 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
20665         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
20666         (msp430_warn_func_return): New.
20668 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
20670         * fold-const.c (tree_nonzero_bits): New function.
20671         * fold-const.h (tree_nonzero_bits): Likewise.
20672         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
20673         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
20675 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
20677         PR target/85900
20678         PR target/85345
20679         * varasm.c (assemble_alias): Check ifunc_resolver only on
20680         FUNCTION_DECL.
20682 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
20684         PR target/85903
20685         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
20686         when memory input operand is handled.
20688 2018-05-24  Luis Machado  <luis.machado@linaro.org>
20690         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
20691         global.
20692         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
20694 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
20696         * match.pd: Delay FMA folds until after vectorization.
20698 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
20700         PR target/83009
20701         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
20702         address check not strict.
20704 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
20706         * gimple-match.h (gimple_match_op): New class.
20707         (mprts_hook): Replace parameters with a gimple_match_op *.
20708         (maybe_build_generic_op): Likewise.
20709         (gimple_simplified_result_is_gimple_val): Replace parameters with
20710         a const gimple_match_op *.
20711         (gimple_simplify): Replace code_helper * and tree * parameters with
20712         a gimple_match_op * parameter.
20713         (gimple_resimplify1): Replace code_helper *, tree and tree *
20714         parameters with a gimple_match_op * parameter.
20715         (gimple_resimplify2): Likewise.
20716         (gimple_resimplify3): Likewise.
20717         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
20718         parameters with a gimple_match_op * parameter.
20719         * gimple-match-head.c (gimple_simplify): Change prototypes of
20720         auto-generated functions to take a gimple_match_op * instead of
20721         separate code_helper * and tree * parameters.  Make the same
20722         change in the top-level overload and update calls to the
20723         gimple_resimplify routines.  Update calls to the auto-generated
20724         functions and to maybe_push_res_to_seq in the publicly-facing
20725         operation-specific gimple_simplify overloads.
20726         (gimple_match_op::MAX_NUM_OPS): Define.
20727         (gimple_resimplify1): Replace rcode and ops with a single res_op
20728         parameter.  Update call to gimple_simplify.
20729         (gimple_resimplify2): Likewise.
20730         (gimple_resimplify3): Likewise.
20731         (mprts_hook): Replace parameters with a gimple_match_op *.
20732         (maybe_build_generic_op): Likewise.
20733         (build_call_internal): Replace type, nargs and ops with
20734         a gimple_match_op *.
20735         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
20736         with a single gimple_match_op *.  Update calls to mprts_hook,
20737         build_call_internal and gimple_simplified_result_is_gimple_val.
20738         Factor out code that is common to the tree_code and combined_fn cases.
20739         * genmatch.c (expr::gen_transform): Replace tem_code and
20740         tem_ops with a gimple_match_op called tem_op.  Update calls
20741         to the gimple_resimplify functions and maybe_push_res_to_seq.
20742         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
20743         res_ops.  Update call to the gimple_resimplify functions.
20744         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
20745         (decision_tree::gen): Make the functions take a gimple_match_op *
20746         called res_op instead of separate res_code and res_ops parameters.
20747         Update call accordingly.
20748         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
20749         and ops with a single res_op parameter.  Update calls to
20750         maybe_build_generic_op and maybe_push_res_to_seq.
20751         (fold_stmt_1): Update calls to gimple_simplify and
20752         replace_stmt_with_simplification.
20753         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
20754         and gimple_simplified_result_is_gimple_val.
20755         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
20756         gimple_simplify.
20757         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
20758         with a gimple_match_op *.
20759         (vn_nary_build_or_lookup): Likewise.  Update call to
20760         vn_nary_build_or_lookup_1.
20761         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
20762         gimple_match_op *.  Update calls to the gimple_resimplify routines
20763         and to gimple_simplified_result_is_gimple_val.
20764         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
20765         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
20766         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
20767         (visit_nary_op): Likewise.
20768         (visit_reference_op_load): Likewise.
20770 2018-05-23  Luis Machado  <luis.machado@linaro.org>
20772         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
20773         modifier for printing the step amount.
20775 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
20777         PR target/78849
20778         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
20779         types.
20781 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
20783         * doc/sourcebuild.texi (Endianness): New subsubsection.
20785 2018-05-23  Luis Machado  <luis.machado@linaro.org>
20787         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20788         <prefetch_dynamic_strides>: New const bool field.
20789         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20790         prefetch_dynamic_strides.
20791         (exynosm1_prefetch_tune): Likewise.
20792         (thunderxt88_prefetch_tune): Likewise.
20793         (thunderx_prefetch_tune): Likewise.
20794         (thunderx2t99_prefetch_tune): Likewise.
20795         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
20796         false.
20797         (aarch64_override_options_internal): Update to set
20798         PARAM_PREFETCH_DYNAMIC_STRIDES.
20799         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
20800         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
20801         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
20802         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
20803         prefetch-dynamic-strides setting.
20805 2018-05-23  Luis Machado  <luis.machado@linaro.org>
20807         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20808         <minimum_stride>: New const int field.
20809         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20810         minimum_stride field defaulting to -1.
20811         (exynosm1_prefetch_tune): Likewise.
20812         (thunderxt88_prefetch_tune): Likewise.
20813         (thunderx_prefetch_tune): Likewise.
20814         (thunderx2t99_prefetch_tune): Likewise.
20815         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
20816         <default_opt_level>: Set to 3.
20817         (aarch64_override_options_internal): Update to set
20818         PARAM_PREFETCH_MINIMUM_STRIDE.
20819         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
20820         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
20821         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
20822         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
20823         stride is constant and is below the minimum stride threshold.
20825 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20827         * config/arm/arm-cpus.in (mode26): Delete.
20828         (armv4): Delete mode26 reference.
20829         * config/arm/arm.c (arm_configure_build_target): Delete use of
20830         isa_bit_mode26.
20832 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
20834         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
20835         New insn pattern.
20836         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
20837         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
20838         for non-SSE modes.
20839         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
20840         (floatunsdidf2): Ditto.
20842 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
20844         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
20845         (fixuns_trunc<mode>si2_avx512f): Ditto.
20846         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
20847         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
20848         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
20850 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
20852         PR rtl-optimization/79985
20853         * df-scan.c (df_insn_refs_collect): Remove special case for
20854         global registers and asm statements.
20856 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
20858         * extend.texi (Global Register Variables): Rewrite the bullet list.
20859         Note that the register is available for allocation. Note that access
20860         via inline asm must use constraints. Add note about async-signal
20861         handlers. Remove paragraph about automagic register selection.
20863 2018-05-23  Richard Biener  <rguenther@suse.de>
20865         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
20866         of fixed offset from memset VN.
20868 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
20870         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
20871         first_interp field.
20872         (alloc_cand_and_find_basis): Initialize first_interp field.
20873         (slsr_process_mul): Modify first_interp field.
20874         (slsr_process_add): Likewise.
20875         (slsr_process_cast): Modify first_interp field for each new
20876         interpretation.
20877         (slsr_process_copy): Likewise.
20878         (dump_candidate): Dump first_interp field.
20879         (replace_mult_candidate): Process all interpretations, not just
20880         subsequent ones.
20881         (replace_rhs_if_not_dup): Likewise.
20882         (replace_one_candidate): Likewise.
20884 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
20886         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
20887         Add new boolean.
20888         (aarch64_needs_frame_chain): New function.
20889         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
20891 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
20893         PR target/84882
20894         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
20895         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
20896         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
20897         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
20898         as true for strict-align.
20899         (aarch64_can_inline_p): Perform checks even when callee has no
20900         attributes to check for strict alignment.
20901         * doc/extend.texi (AArch64 Function Attributes): Document
20902         no-strict-align.
20903         * doc/invoke.texi: (AArch64 Options): Likewise.
20905 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
20907         PR tree-optimization/85853
20908         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
20909         the handling of the root of the node to...
20910         (vect_slp_analyze_node_operations_1): ...this new function,
20911         and run the whole thing with the child nodes' def types
20912         set according to their SLP node's def type.
20914 2018-05-23  Richard Biener  <rguenther@suse.de>
20916         PR middle-end/85874
20917         * tree-data-ref.c (create_runtime_alias_checks): Defer
20918         and ignore overflow warnings.
20920 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
20922         PR tree-optimization/85822
20923         * tree-vrp.c (is_masked_range_test): Fix handling of negative
20924         constants.
20926 2018-05-23  Richard Biener  <rguenther@suse.de>
20928         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
20929         memset constants via native_interpret_expr.
20931 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
20933         PR target/85345
20934         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
20935         attribute.
20936         (cgraph_node::create_alias): Likewise.
20937         (cgraph_node::get_availability): Check ifunc_resolver instead
20938         of looking up ifunc attribute.
20939         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
20940         * varasm.c (do_assemble_alias): Likewise.
20941         (assemble_alias): Likewise.
20942         (default_binds_local_p_3): Likewise.
20943         * cgraph.h (cgraph_node): Add ifunc_resolver.
20944         (cgraph_node::only_called_directly_or_aliased_p): Return false
20945         for IFUNC resolver.
20946         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
20947         attribute.
20948         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
20949         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
20950         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
20951         instead of looking up ifunc attribute.
20953 2018-05-22  Luis Machado  <luis.machado@linaro.org>
20955         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
20957 2018-05-22  Martin Sebor  <msebor@redhat.com>
20959         PR middle-end/85359
20960         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
20961         only when expasion succeeds.
20962         (expand_builtin_strcmp): Same.
20963         (expand_builtin_strncmp): Same.
20965 2018-05-22  Martin Sebor  <msebor@redhat.com>
20967         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
20969 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
20970             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20972         * config/aarch64/aarch64-ldpstp.md: Replace uses of
20973         aarch64_mem_pair_operand with memory_operand and delete operand swapping
20974         code.
20975         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
20976         Add check for legitimate_address.
20977         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
20978         (aarch64_swap_ldrstr_operands): New.
20979         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
20980         Define prototype.
20982 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
20983             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20985         * config/aarch64/aarch64.md: New patterns to generate stp
20986         and ldp.
20987         (store_pair_sw, store_pair_dw): New patterns to generate stp for
20988         single words and double words.
20989         (load_pair_sw, load_pair_dw): Likewise.
20990         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
20991         Delete.
20992         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
20993         Delete.
20994         * config/aarch64/aarch64-ldpstp.md: Modify peephole
20995         for different mode ldpstp and add peephole for merged zero stores.
20996         Likewise for loads.
20997         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
20998         Add size check.
20999         (aarch64_gen_store_pair): Rename calls to match new patterns.
21000         (aarch64_gen_load_pair): Rename calls to match new patterns.
21001         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
21002         (load_pair<DREG:mode><DREG2:mode>): ... This.
21003         (store_pair<mode>): Rename to...
21004         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
21005         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
21006         New mode iterators.
21007         (V_INT_EQUIV): Handle SImode.
21008         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
21009         New predicate.
21011 2018-05-22  Martin Sebor  <msebor@redhat.com>
21013         PR c/85623
21014         * calls.c (maybe_warn_nonstring_arg): Use string length to set
21015         or ajust the presumed bound on an operation to avoid unnecessary
21016         warnings.
21018 2018-05-22  Martin Sebor  <msebor@redhat.com>
21020         PR tree-optimization/85826
21021         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
21022         assuming that a DECL necesarily has a constant size.
21024 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
21026         PR middle-end/85862
21027         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
21029 2018-05-22  Richard Biener  <rguenther@suse.de>
21031         PR tree-optimization/85834
21032         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
21033         non-constant and non-zero memset arguments.
21035 2018-05-22  Martin Liska  <mliska@suse.cz>
21037         PR ipa/85607
21038         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
21040 2018-05-22  Richard Biener  <rguenther@suse.de>
21042         PR tree-optimization/85863
21043         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
21044         comparisons when vectype is specified.
21045         (vectorizable_condition): Do not specify vectype for
21046         vect_is_simple_cond when SLP vectorizing.
21048 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
21050         PR target/85657
21051         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
21052         define __ibm128 as long double.
21053         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
21054         as a distinct type when IEEE 128-bit support is enabled.
21055         (init_float128_ieee): Fix up conversions between IFmode and IEEE
21056         128-bit types to use the correct functions.
21057         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
21058         convert between 128-bit floating point types that have different
21059         modes but the same representation, instead of using gen_lowpart to
21060         makean alias.
21061         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
21062         KFmode.
21063         (IFKF_reg): New attributes to give the register constraints for
21064         IFmode and KFmode.
21065         (extend<mode>tf2_internal): New insns to mark an explicit
21066         conversion between 128-bit floating point types that have a
21067         different mode but share the same representation.
21069 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
21071         PR tree-optimization/85814
21072         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
21073         a null return from get_strinfo when unsharing the next
21074         strinfo in the chain.
21076 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
21078         PR gcc/84923
21079         * varasm.c (weak_finish): Clean up weak_decls.
21081 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21083         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
21084         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
21085         UNSPEC_UADALP values.
21086         * config/aarch64/iterators.md (ABAL): New int iterator.
21087         (ABDL2): Likewise.
21088         (ADALP): Likewise.
21089         (sur): Add mappings for the above.
21090         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
21091         New define_insn.
21092         (aarch64_<sur>abal<mode>_4): Likewise.
21093         (aarch64_<sur>adalp<mode>_3): Likewise.
21094         (<sur>sadv16qi): New define_expand.
21096 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
21098         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
21099         (*movdf_internal): Ditto.
21100         (*rcpsf2_sse): Ditto.
21101         (*rsqrtsf2_sse): Ditto.
21102         (*sqrt<mode>2_sse): Ditto.
21104 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
21106         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
21107         eor3q<mode>4.
21108         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
21109         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
21110         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
21111         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
21112         vbcaxq_s64): New.
21113         * config/aarch64/arm_neon.h: Likewise.
21114         * config/aarch64/iterators.md (VQ_I): New.
21116 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
21118         * config.gcc: Add arc/t-multilib-linux to tmake_file for
21119         arc*-*-linux*.
21120         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
21121         MULTILIB_DIRNAMES
21123 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
21125         * config/nds32/constraints.md (S): New constraint.
21126         * config/nds32/nds32.md (call_internal): Use constraint S.
21127         (call_value_internal): Likewise.
21128         (sibcall_internal): Likewise.
21129         (sibcall_value_internal): Likewise.
21131 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
21132             Chung-Ju Wu  <jasonwucj@gmail.com>
21134         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
21135         into consideration.
21137 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
21138             Chung-Ju Wu  <jasonwucj@gmail.com>
21140         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
21141         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
21142         (nds32_rtx_costs_impl): Simplify.
21143         (nds32_address_cost_impl): Simplify.
21144         (nds32_init_rtx_costs): New function.
21145         (nds32_rtx_costs_speed_prefer): Likewise.
21146         (nds32_rtx_costs_size_prefer): Likewise.
21147         (nds32_address_cost_speed_prefer): Likewise.
21148         (nds32_address_cost_speed_fwprop): Likewise.
21149         (nds32_address_cost_size_prefer): Likewise.
21150         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
21151         * config/nds32/nds32.c (nds32_option_override): Use
21152         nds32_init_rtx_costs function.
21154 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
21156         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
21157         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
21158         (TARGET_PIPELINE_N8): Likewise.
21159         (TARGET_PIPELINE_N10): Likewise.
21160         (TARGET_PIPELINE_N13): Likewise.
21161         (TARGET_PIPELINE_GRAYWOLF): Likewise.
21163 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
21165         * config/nds32/nds32-fpu.md: Update copyright year.
21167 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
21169         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
21171 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
21173         * config/nds32/nds32.c
21174         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
21175         * config/nds32/nds32.opt (minline-asm-r15): New option.
21177 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
21179         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
21180         MASK_HW_ABS.
21181         * config/nds32/nds32.md (abssi2): New pattern.
21183 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
21185         * config/i386/i386.md (rex64namesuffix): New mode attribute.
21186         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
21187         Merge insn pattern from sse_cvtsi2ss<round_name> and
21188         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
21189         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
21190         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
21191         using SWI48 mode iterator.
21192         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
21193         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
21194         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
21195         pattern from sse_cvttss2si<round_saeonly_name>
21196         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
21197         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
21198         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
21199         using SWI48 mode iterator.
21200         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
21201         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
21202         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
21203         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
21204         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
21205         using SWI48 mode iterator.
21206         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
21207         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
21208         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
21209         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
21210         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
21211         SWI48 mode iterator.
21212         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
21213         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
21214         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
21215         pattern from sse_cvttsd2si<round_saeonly_name>
21216         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
21218 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
21220         * config/nds32/nds32-md-auxiliary.c
21221         (nds32_valid_smw_lwm_base_p): Refine.
21222         (nds32_output_smw_single_word): Refine.
21223         (nds32_output_smw_double_word): New.
21224         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
21226 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
21228         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
21229         (nds32_output_stack_pop): Refine.
21230         (nds32_expand_unaligned_load): Refine.
21231         (nds32_expand_unaligned_store): Refine.
21233 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
21234             Chung-Ju Wu  <jasonwucj@gmail.com>
21236         * config/nds32/constants.md: Add TP_REGNUM constant.
21237         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
21238         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
21239         UNSPEC_ADD32.
21240         * config/nds32/nds32-doubleword.md: Consider flag_pic.
21241         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
21242         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
21243         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
21244         and PIC code generation.
21245         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
21246         code generation.
21247         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
21248         optimization.
21249         * config/nds32/nds32.md: Support TLS and PIC.
21250         * config/nds32/nds32.c: Support TLS and PIC.
21251         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
21252         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
21253         predicate.
21255 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
21257         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
21258         mode with E_ prefix.
21260 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
21261             Chung-Ju Wu  <jasonwucj@gmail.com>
21263         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
21264         * config/nds32/nds32-md-auxiliary.c
21265         (symbolic_reference_mentioned_p): New.
21266         (nds32_legitimize_ict_address): New.
21267         (nds32_expand_ict_move): New.
21268         (nds32_indirect_call_referenced_p): New.
21269         (nds32_symbol_binds_local_p): Delete.
21270         (nds32_long_call_p): Modify.
21271         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
21272         * config/nds32/nds32-protos.h
21273         (symbolic_reference_mentioned_p): Declare.
21274         (nds32_legitimize_ict_address): Declare.
21275         (nds32_expand_ict_move): Declare.
21276         (nds32_indirect_call_referenced_p): Declare.
21277         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
21278         (nds32_relax_group): Use nds32_ict_const_p as condition.
21279         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
21280         (nds32_asm_file_start): Output ict_model directive in asm code.
21281         (nds32_legitimate_address_p): Consider indirect call.
21282         (nds32_print_operand): Consider indirect call.
21283         (nds32_print_operand_address): Consider indirect call.
21284         (nds32_insert_attributes): Handle "indirect_call" attribute.
21285         (TARGET_LEGITIMATE_ADDRESS_P): Define.
21286         (TARGET_LEGITIMATE_CONSTANT_P): Define.
21287         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
21288         (TARGET_DELEGITIMIZE_ADDRESS): Define.
21289         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
21290         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
21291         (TARGET_ICT_MODEL_SMALL): Define.
21292         (TARGET_ICT_MODEL_LARGE): Define.
21293         * config/nds32/nds32.md (movsi): Consider ict model.
21294         (call, call_value): Consider ict model.
21295         (sibcall, sibcall_value): Consider ict model.
21296         * config/nds32/nds32.opt (mict-model): New option.
21297         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
21298         model.
21300 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
21301             Monk Chiang  <sh.chiang04@gmail.com>
21302             Jim Wilson <jimw@sifive.com>
21304         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
21305         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
21306         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
21307         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
21308         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
21309         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
21310         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
21311         compute save_libcall_adjustment properly.
21312         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
21313         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
21314         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
21315         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
21316         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
21317         (ABI_SPEC): Handle mabi=ilp32e.
21318         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
21319         (RVE): Add RVE mask.
21320         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
21321         <-march>: Add rv32e as an example.
21323 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
21325         PR c++/82899
21326         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
21327         (intra_create_variable_infos): Handle C++ constructors.
21329 2018-05-18  Martin Liska  <mliska@suse.cz>
21331         * passes.def: Remove a redundant pass.
21333 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
21335         PR bootstrap/85838
21336         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
21338 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21340         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
21341         (ARMv4): Update.
21342         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
21343         (ARMv6m): Update.
21344         (armv2, armv2a, armv3, armv3m): Delete architectures.
21345         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
21346         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
21347         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
21348         Delete cpus.
21349         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
21350         (*mulsidi3adddi): Likewise.
21351         (mulsidi3): Likewise.
21352         (*mulsidi3_nov6): Likewise.
21353         (umulsidi3): Likewise.
21354         (umulsidi3_nov6): Likewise.
21355         (umaddsidi4): Likewise.
21356         (*umulsidi3adddi): Likewise.
21357         (smulsi3_highpart): Likewise.
21358         (*smulsi3_highpart_nov6): Likewise.
21359         (umulsi3_highpart): Likewise.
21360         (*umulsi3_highpart_nov6): Likewise.
21361         * config/arm/arm.h (arm_arch3m): Delete.
21362         * config/arm/arm.c (arm_arch3m): Delete.
21363         (arm_option_override_internal): Update armv3-related comment.
21364         (arm_configure_build_target): Delete use of isa_bit_mode32.
21365         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
21366         (arm_rtx_costs_internal): Delete check of arm_arch3m.
21367         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
21368         (mulsa3): Likewise.
21369         (mulusa3): Likewise.
21370         * config/arm/arm-protos.h (arm_arch3m): Delete.
21371         * config/arm/arm-tables.opt: Regenerate.
21372         * config/arm/arm-tune.md: Likewise.
21373         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
21374         deleted architectures.
21376 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21378         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
21379         (armv5t, armv5te): New features.
21380         (ARMv5, ARMv5e): Delete fgroups.
21381         (ARMv5t, ARMv5te): Adjust for above changes.
21382         (ARMv6m): Likewise.
21383         (armv5, armv5e): Delete arches.
21384         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
21385         arm_arch5.
21386         (*call_reg_arm): Likewise.
21387         (*call_value_reg_armv5): Likewise.
21388         (*call_value_reg_arm): Likewise.
21389         (*call_symbol): Likewise.
21390         (*call_value_symbol): Likewise.
21391         (*sibcall_insn): Likewise.
21392         (*sibcall_value_insn): Likewise.
21393         (clzsi2): Likewise.
21394         (prefetch): Likewise.
21395         (define_split and define_peephole2 dependent on arm_arch5):
21396         Likewise.
21397         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
21398         arm_arch5e.
21399         (TARGET_ARM_QBIT): Likewise.
21400         (TARGET_DSP_MULTIPLY): Likewise.
21401         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
21402         (arm_arch5, arm_arch5e): Delete.
21403         (arm_arch5t, arm_arch5te): Declare.
21404         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
21405         (arm_arch5t): Declare.
21406         (arm_option_reconfigure_globals): Update for the above.
21407         (arm_options_perform_arch_sanity_checks): Update comment, replace
21408         use of arm_arch5 with arm_arch5t.
21409         (use_return_insn): Likewise.
21410         (arm_emit_call_insn): Likewise.
21411         (output_return_instruction): Likewise.
21412         (arm_final_prescan_insn): Likewise.
21413         (arm_coproc_builtin_available): Likewise.
21414         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
21415         arm_arch5e with arm_arch5t and arm_arch5te.
21416         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
21417         (arm_arch5t, arm_arch5te): Declare.
21418         * config/arm/arm-tables.opt: Regenerate.
21419         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
21420         * config/arm/t-multilib: Likewise.
21421         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
21422         instead of arm_arch5.
21423         (*call_reg_thumb1): Likewise.
21424         (*call_value_reg_thumb1_v5): Likewise.
21425         (*call_value_reg_thumb1): Likewise.
21426         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
21427         unreachable path.
21428         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
21430 2018-05-18  Martin Liska  <mliska@suse.cz>
21432         PR gcov-profile/84846
21433         * doc/gcov.texi: Document -t option of gcov tool.
21435 2018-05-18  Martin Liska  <mliska@suse.cz>
21437         PR gcov-profile/84846
21438         * gcov.c (print_usage): Add new -t option.
21439         (process_args): Handle the option.
21440         (generate_results): Use stdout as output when requested by
21441         the option.
21443 2018-05-18  Martin Liska  <mliska@suse.cz>
21445         PR gcov-profile/84846
21446         * coverage.c (coverage_init): Write PWD to .gcno file.
21447         * doc/gcov.texi: Document how working directory is printed.
21448         * gcov-dump.c (dump_gcov_file): Print PWD.
21449         * gcov.c (output_intermediate_file): Likewise.
21450         (read_graph_file): Read PWD string.
21451         (output_lines): Print PWD.
21453 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21455         PR middle-end/85817
21456         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
21457         for retval and return false if all args to phi are zero.
21459 2018-05-18  Richard Biener  <rguenther@suse.de>
21461         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
21462         method.
21463         (evrp_dom_walker::before_dom_children): Call it.
21465 2018-05-18  Richard Biener  <rguenther@suse.de>
21467         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
21468         results when processing array refs with variable index.
21470 2018-05-18  Toon Moene  <toon@moene.org>
21472         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
21473         directly after that of -floop-interchange. Indicate that both
21474         options are enabled by default when specifying -O3.
21476 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21478         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
21479         iterator.  Delete separate integer-mode vec_set<mode> expander.
21480         (aarch64_simd_vec_setv2di): Delete.
21481         (vec_setv2di): Delete.
21482         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
21483         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
21484         the "w, r" alternative.
21486 2018-05-18  Martin Liska  <mliska@suse.cz>
21488         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
21489         * tree-pass.h (make_pass_lower_switch_O0): New function.
21490         * tree-switch-conversion.c (node_has_low_bound): Remove.
21491         (node_has_high_bound): Likewise.
21492         (node_is_bounded): Likewise.
21493         (class pass_lower_switch): Make it a template type and create
21494         two instances.
21495         (pass_lower_switch::execute): Add template argument.
21496         (make_pass_lower_switch): New function.
21497         (make_pass_lower_switch_O0): New function.
21498         (do_jump_if_equal): Remove.
21499         (emit_case_nodes): Simplify to just handle all 3 cases and leave
21500         all the hard work to tree optimization passes.
21502 2018-05-18  Martin Liska  <mliska@suse.cz>
21504         * dbgcnt.c (limit_low): Renamed from limit.
21505         (limit_high): New variable.
21506         (dbg_cnt_is_enabled): Check for upper limit.
21507         (dbg_cnt): Adjust dumping.
21508         (dbg_cnt_set_limit_by_index): Add new argument for high
21509         value.
21510         (dbg_cnt_set_limit_by_name): Likewise.
21511         (dbg_cnt_process_single_pair): Parse new format.
21512         (dbg_cnt_process_opt): Use strtok.
21513         (dbg_cnt_list_all_counters): Remove 'value' and add
21514         'limit_high'.
21515         * doc/invoke.texi: Document changes.
21517 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
21519         * doc/sourcebuild.texi (scalar_all_fma): Document.
21520         * tree.def (FMA_EXPR): Delete.
21521         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
21522         * internal-fn.c (ternary_direct): New macro.
21523         (expand_ternary_optab_fn): Likewise.
21524         (direct_ternary_optab_supported_p): Likewise.
21525         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
21526         * builtins.c (fold_builtin_fma): Delete.
21527         (fold_builtin_3): Don't call it.
21528         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
21529         * expr.c (expand_expr_real_2): Likewise.
21530         * fold-const.c (operand_equal_p): Likewise.
21531         (fold_ternary_loc): Likewise.
21532         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
21533         * gimple.c (DEFTREECODE): Likewise.
21534         * gimplify.c (gimplify_expr): Likewise.
21535         * optabs-tree.c (optab_for_tree_code): Likewise.
21536         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
21537         * tree-eh.c (operation_could_trap_p): Likewise.
21538         (stmt_could_throw_1_p): Likewise.
21539         * tree-inline.c (estimate_operator_cost): Likewise.
21540         * tree-pretty-print.c (dump_generic_node): Likewise.
21541         (op_code_prio): Likewise.
21542         * tree-ssa-loop-im.c (stmt_cost): Likewise.
21543         * tree-ssa-operands.c (get_expr_operands): Likewise.
21544         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
21545         * fold-const-call.h (fold_fma): Delete.
21546         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
21547         CFN_FNMA and CFN_FNMS.
21548         (fold_fma): Delete.
21549         * genmatch.c (combined_fn): New enum.
21550         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
21551         (commutative_op): New function.
21552         (commutate): Use it.  Handle more than 2 operands.
21553         (dt_operand::gen_gimple_expr): Use commutative_op.
21554         (parser::parse_expr): Allow :c to be used with non-binary
21555         operators if the commutative operand is known.
21556         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
21557         CFN_FMS, CFN_FNMA and CFN_FNMS.
21558         (backprop::process_assign_use): Remove FMA_EXPR handling.
21559         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
21560         (gen_hsa_fma): New function.
21561         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
21562         IFN_FNMA and IFN_FNMS.
21563         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
21564         * gimple-fold.h (follow_all_ssa_edges): Declare.
21565         * gimple-fold.c (follow_all_ssa_edges): New function.
21566         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
21567         gimple_build interface and use follow_all_ssa_edges to fold the result.
21568         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
21569         instead of checking for optabs directly.
21570         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
21571         rather than FMA_EXPRs.
21572         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
21573         call to IFN_FMA instead of an FMA_EXPR.
21575 2018-05-17  Jim Wilson  <jimw@sifive.com>
21577         * expr.c (do_tablejump): When converting index to Pmode, if we have a
21578         sign extended promoted subreg, and the range does not have the sign bit
21579         set, then do a sign extend.
21581         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
21582         test, check for sign extended subreg and/or constant operands, and
21583         do a sign extend in that case.
21585 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
21587         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
21588         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
21589         Add untyped.
21590         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
21591         Change logics_shift_reg to logics_shift_imm.
21592         (thunderx2t99_fp_loadpair_basic): Delete.
21593         (thunderx2t99_fp_storepair_basic): Delete.
21594         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
21595         (thunderx2t99_asimd_polynomial): Delete.
21596         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
21597         and neon_fp_mul_d_scalar_q.
21598         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
21599         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
21600         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
21601         (thunderx2t99_asimd_lut): Add missing tbl types.
21602         (thunderx2t99_asimd_ext): Delete.
21603         (thunderx2t99_asimd_load1_1_mult): Delete.
21604         (thunderx2t99_asimd_load1_2_mult): Delete.
21605         (thunderx2t99_asimd_load1_ldp): New.
21606         (thunderx2t99_asimd_load1): New.
21607         (thunderx2t99_asimd_load2): Add missing *load2* types.
21608         (thunderx2t99_asimd_load3): New.
21609         (thunderx2t99_asimd_load4): New.
21610         (thunderx2t99_asimd_store1_1_mult): Delete.
21611         (thunderx2t99_asimd_store1_2_mult): Delete.
21612         (thunderx2t99_asimd_store2_mult): Delete.
21613         (thunderx2t99_asimd_store2_onelane): Delete.
21614         (thunderx2t99_asimd_store_stp): New.
21615         (thunderx2t99_asimd_store1): New.
21616         (thunderx2t99_asimd_store2): New.
21617         (thunderx2t99_asimd_store3): New.
21618         (thunderx2t99_asimd_store4): New.
21620 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
21622         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
21623         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
21625 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
21626             Segher Boessenkool  <segher@kernel.crashing.org>
21628         PR target/85698
21629         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
21630         operand.
21632 2018-05-17  Richard Biener  <rguenther@suse.de>
21634         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
21635         for pruning loop and prune defs feeding only already visited PHIs.
21637 2018-05-17  Richard Biener  <rguenther@suse.de>
21639         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
21641 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
21642             Richard Biener  <rguenther@suse.de>
21644         PR tree-optimization/85793
21645         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
21646         for VMAT_ELEMENTWISE.
21648 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
21650         * internal-fn.h (lookup_internal_fn): Declare
21651         * internal-fn.c (lookup_internal_fn): New function.
21652         * gimple.c (gimple_build_call_from_tree): Handle calls to
21653         internal functions.
21654         * gimple-pretty-print.c (dump_gimple_call): Print "." before
21655         internal function names.
21656         * tree-pretty-print.c (dump_generic_node): Likewise.
21657         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
21659 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
21661         * gimple-fold.h (gimple_build): Make the function forms take
21662         combined_fn rather than built_in_function.
21663         (gimple_simplify): Likewise.
21664         * gimple-match-head.c (gimple_simplify): Likewise.
21665         * gimple-fold.c (gimple_build): Likewise.
21666         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
21667         rather than gimple_build_call_internal.
21668         (get_initial_defs_for_reduction): Likewise.
21669         (vect_create_epilog_for_reduction): Likewise.
21670         (vectorizable_live_operation): Likewise.
21672 2018-05-17  Martin Liska  <mliska@suse.cz>
21674         * gimple-ssa-sprintf.c (format_directive): Do not use
21675         space in between 'G_' and '('.
21677 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
21679         PR target/85323
21680         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
21681         even if the mask is not all ones.
21683         PR target/85323
21684         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
21685         vector.
21686         (ix86_gimple_fold_builtin): Likewise.
21688         PR target/85323
21689         * config/i386/i386.c: Include tree-vector-builder.h.
21690         (ix86_vector_shift_count): New function.
21691         (ix86_fold_builtin): Fold shift builtins by scalar count.
21692         (ix86_gimple_fold_builtin): Likewise.
21694         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
21695         _mm512_setzero): New intrinsics.
21697 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
21698             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21700         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
21701         code generation for cases where splatting a value is not useful.
21702         * simplify-rtx.c (simplify_ternary_operation): Simplify
21703         vec_merge across a vec_duplicate and a paradoxical subreg forming
21704         a vector mode to a vec_concat.
21706 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
21708         * config.gcc: Support "goldmont-plus".
21709         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
21710         "goldmont-plus".
21711         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
21712         PROCESSOR_GOLDMONT_PLUS.
21713         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
21714         (processor_target_table): Add "goldmont-plus".
21715         (PTA_GOLDMONT_PLUS): Define.
21716         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
21717         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
21718         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
21719         (fold_builtin_cpu): Add "goldmont-plus".
21720         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
21721         (ix86_option_override_internal): Add "goldmont-plus".
21722         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
21723         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
21724         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
21725         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
21727 2018-05-17  Richard Biener  <rguenther@suse.de>
21729         PR tree-optimization/85757
21730         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
21731         remove defs that only feed that PHI from further processing.
21733 2018-05-16  Jim Wilson  <jimw@sifive.com>
21735         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
21736         asterisk to name.
21737         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
21739 2018-05-16  Mark Wielaard  <mark@klomp.org>
21741         * dwarf2out.c (count_index_strings): New function.
21742         (output_indirect_strings): Call count_index_strings and generate
21743         header for dwarf_version >= 5.
21745 2018-05-16  Mark Wielaard  <mark@klomp.org>
21747         * dwarf2out.c (dwarf_FORM): New function.
21748         (set_indirect_string): Use dwarf_FORM.
21749         (reset_indirect_string): Likewise.
21750         (size_of_die): Likewise.
21751         (value_format): Likewise.
21752         (output_die): Likewise.
21753         (add_skeleton_AT_string): Likewise.
21754         (output_macinfo_op): Likewise.
21755         (index_string): Likewise.
21756         (output_index_string_offset): Likewise.
21757         (output_index_string): Likewise.
21758         (count_index_strings): Likewise.
21760 2018-05-16  Carl Love  <cel@us.ibm.com>
21762         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
21763         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
21765 2018-05-16  Martin Jambor  <mjambor@suse.cz>
21767         * ipa-prop.c (ipa_free_all_edge_args): Remove.
21768         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
21770 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
21772         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
21773         (fnma<mode>4): Likewise.
21774         (fms<mode>4): Likewise.
21775         (fnms<mode>4): Likewise.
21776         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
21777         (aarch64_fnma<mode>4): Likewise.
21778         (aarch64_fms<mode>4): Likewise.
21779         (aarch64_fnms<mode>4): Likewise.
21780         (aarch64_fnmadd<mode>4): Likewise.
21782 2018-05-16  Jason Merrill  <jason@redhat.com>
21784         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
21786 2018-05-16  Richard Biener  <rguenther@suse.de>
21788         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
21789         (dump_stmt_cost): Declare.
21790         (add_stmt_cost): Dump cost we add.
21791         (add_stmt_costs): New function.
21792         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
21793         No longer exported.
21794         (vect_analyze_stmt): Adjust prototype.
21795         (vectorizable_condition): Likewise.
21796         (vectorizable_live_operation): Likewise.
21797         (vectorizable_reduction): Likewise.
21798         (vectorizable_induction): Likewise.
21799         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
21800         cost vector to pass to vectorizable_ and record afterwards.
21801         (vect_model_reduction_cost): Take cost vector argument and adjust.
21802         (vect_model_induction_cost): Likewise.
21803         (vectorizable_reduction): Likewise.
21804         (vectorizable_induction): Likewise.
21805         (vectorizable_live_operation): Likewise.
21806         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
21807         SLP_TREE_NUMBER_OF_VEC_STMTS.
21808         (vect_analyze_slp_cost_1): Remove.
21809         (vect_analyze_slp_cost): Likewise.
21810         (vect_slp_analyze_node_operations): Take visited args and
21811         a target cost vector.  Avoid processing already visited stmt sets.
21812         (vect_slp_analyze_operations): Use a local cost vector to gather
21813         costs and register those of non-discarded instances.
21814         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
21815         (vect_schedule_slp_instance): Remove copying of
21816         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
21817         zero.
21818         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
21819         adding cost.  Record cost entry location.
21820         (vect_prologue_cost_for_slp_op): Function to compute cost of
21821         a constant or invariant generated for SLP vect in the prologue,
21822         split out from vect_analyze_slp_cost_1.
21823         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
21824         (vect_model_promotion_demotion_cost): Likewise.
21825         (vect_model_store_cost): Likewise, make static.
21826         (vect_model_load_cost): Likewise.
21827         (vectorizable_bswap): Add cost vector arg and adjust.
21828         (vectorizable_call): Likewise.
21829         (vectorizable_simd_clone_call): Likewise.
21830         (vectorizable_conversion): Likewise.
21831         (vectorizable_assignment): Likewise.
21832         (vectorizable_shift): Likewise.
21833         (vectorizable_operation): Likewise.
21834         (vectorizable_store): Likewise.
21835         (vectorizable_load): Likewise.
21836         (vectorizable_condition): Likewise.
21837         (vectorizable_comparison): Likewise.
21838         (can_vectorize_live_stmts): Likewise.
21839         (vect_analyze_stmt): Likewise.
21840         (vect_transform_stmt): Adjust calls to vectorizable_*.
21841         * tree-vectorizer.c: Include gimple-pretty-print.h.
21842         (dump_stmt_cost): New function.
21844 2018-05-16  Richard Biener  <rguenther@suse.de>
21846         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
21847         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
21848         * tree-ssa-dse.c: Include tree-ssa-loop.h.
21849         (check_name): New callback.
21850         (dse_classify_store): Track cycles via a visited bitmap of PHI
21851         defs and simplify handling of in-loop and across loop dead stores
21852         and properly fail for loop-variant refs.  Handle byte-tracking with
21853         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
21854         limiting the walk.
21856 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
21858         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
21859         (vect_get_mask_type_for_stmt): Likewise.
21860         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
21861         split out from...
21862         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
21863         to determine the statement's vector type and the vector type that
21864         should be used for calculating nunits.  Deal with cases in which
21865         the type has to be deferred.
21866         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
21867         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
21868         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
21869         (vect_determine_vf_for_stmt): New functions, split out from...
21870         (vect_determine_vectorization_factor): ...here.
21871         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
21872         (vect_get_mask_type_for_stmt): New functions, split out from
21873         vect_determine_vectorization_factor.
21875 2018-05-16  Richard Biener  <rguenther@suse.de>
21877         * tree-cfg.c (verify_gimple_assign_ternary): Properly
21878         verify the [VEC_]COND_EXPR embedded comparison.
21880 2018-05-15  Martin Sebor  <msebor@redhat.com>
21882         PR tree-optimization/85753
21883         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
21884         RECORD_TYPE in addition to ARRAY_TYPE.
21886 2018-05-15  Martin Sebor  <msebor@redhat.com>
21888         PR middle-end/85643
21889         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
21891 2018-05-15  Richard Biener  <rguenther@suse.de>
21893         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
21894         add by_clobber_p one.  Change algorithm to collect all defs
21895         representing uses we need to walk and try reducing them to
21896         a single one before failing.
21897         (dse_dom_walker::dse_optimize_stmt): Adjust.
21899 2018-05-13  Mark Wielaard  <mark@klomp.org>
21901         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
21902         (size_of_loc_descr): Likewise.
21903         (output_loc_operands): Likewise.
21904         (output_loc_operands_raw): Likewise.
21905         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
21906         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
21907         (hash_loc_operands): Likewise.
21908         (compare_loc_operands): Likewise.
21910 2018-05-14  Mark Wielaard  <mark@klomp.org>
21912         * dwarf2out.c (count_index_addrs): New function.
21913         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
21915 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21917         PR tree-optimization/83648
21918         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
21919         return value as malloc candidate.
21921 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21923         PR ipa/85734
21924         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
21925         param as true in call to suggest_attribute.
21927 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
21929         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
21930         -mreadonly-in-sdata.
21932 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21934         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
21935         New pattern.
21936         (aarch64_crypto_aesd_fused): Likewise.
21938 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
21940         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
21941         (movsi_aarch64): Likewise.
21942         (load_pairsi): Likewise.
21943         (load_pairdi): Likewise.
21944         (store_pairsi): Likewise.
21945         (store_pairdi): Likewise.
21946         (load_pairsf): Likewise.
21947         (load_pairdf): Likewise.
21948         (store_pairsf): Likewise.
21949         (store_pairdf): Likewise.
21950         (zero_extend): Likewise.
21951         (trunc): Swap alternatives.
21952         (fcvt_target): Add '?' to prefer w over r.
21954 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
21956         PR target/85756
21957         * config/i386/i386.md: Disallow non-commutative arithmetics in
21958         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
21959         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
21960         in the peephole2 before it.
21962 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
21964         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
21965         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
21966         (ix86_handle_option): Handle -mcldemote.
21967         * config.gcc: New header.
21968         * config/i386/cldemoteintrin.h: New file.
21969         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
21970         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
21971         -mcldemote.
21972         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
21973         OPTION_MASK_ISA_CLDEMOTE.
21974         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
21975         (ix86_valid_target_attribute_inner_p): Ditto.
21976         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
21977         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
21978         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
21979         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
21980         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
21981         (cldemote): New.
21982         * config/i386/i386.opt: Add -mcldemote.
21983         * config/i386/x86intrin.h: New header.
21984         * doc/invoke.texi: Add -mcldemote.
21986 2018-05-14  Richard Biener  <rguenther@suse.de>
21988         * doc/match-and-simplify.texi: Adjust :s documentation.
21990 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
21992         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
21993         intended memcpy size.
21994         (REORDER_45): Likewise.
21996 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
21998         * sort.cc: New file.
21999         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
22000         * vec.c (qsort_chk): Use gcc_qsort.
22001         * Makefile.in (OBJS-libcommon): Add sort.o.
22002         (build/sort.o): New target.  Use it...
22003         (BUILD_RTL): ... here, and...
22004         (build/gencfn-macros): ... here, and...
22005         (build/genmatch): ... here.
22007 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
22008             Chung-Ju Wu  <jasonwucj@gmail.com>
22010         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
22011         * config/nds32/nds32-graywolf.md: New file.
22012         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
22013         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
22014         pipeline.
22015         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
22016         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
22017         * config/nds32/nds32.md (pipeline_model): Add graywolf.
22018         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
22019         * config/nds32/pipelines.md: Include n15 settings.
22021 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
22022             Chung-Ju Wu  <jasonwucj@gmail.com>
22024         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
22025         * config/nds32/nds32-n13.md: New file.
22026         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
22027         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
22028         pipeline.
22029         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
22030         * config/nds32/nds32.md (pipeline_model): Add n13.
22031         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
22032         * config/nds32/pipelines.md: Include n13 settings.
22034 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
22035             Chung-Ju Wu  <jasonwucj@gmail.com>
22037         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
22038         * config/nds32/nds32-n10.md: New file.
22039         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
22040         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
22041         pipeline.
22042         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
22043         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
22044         * config/nds32/nds32.md (pipeline_model): Add n10.
22045         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
22046         * config/nds32/pipelines.md: Include n10 settings.
22048 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
22049             Kito Cheng  <kito.cheng@gmail.com>
22050             Chung-Ju Wu  <jasonwucj@gmail.com>
22052         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
22053         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
22054         Add enum values for DSP extension instructions.
22055         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
22056         New constraints.
22057         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
22058         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
22059         New code iterators.
22060         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
22061         * config/nds32/nds32-dspext.md: New file for DSP implementation.
22062         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
22063         * config/nds32/nds32-intrinsic.md: Likewise.
22064         * config/nds32/nds32_intrinsic.h: Likewise.
22065         * config/nds32/nds32-md-auxiliary.c: Likewise.
22066         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
22067         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
22068         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
22069         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
22070         * config/nds32/nds32-protos.h: New declarations for DSP extension.
22071         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
22072         TYPE_DMAC in switch statement.
22073         * config/nds32/nds32.c: New checking and implementation for DSP
22074         extension instructions.
22075         * config/nds32/nds32.h: Likewise.
22076         * config/nds32/nds32.md: Likewise.
22077         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
22078         * config/nds32/predicates.md: Implement new predicates for DSP
22079         extension.
22081 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
22083         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
22084         Reformat alternatives and attributes so it is easier to identify
22085         which constraints/attributes go with which instruction.
22086         (mov<mode>_hardfloat32, FMOVE64): Likewise.
22087         (mov<mode>_softfloat32, FMOVE64): Likewise.
22088         (mov<mode>_hardfloat64, FMOVE64): Likewise.
22089         (mov<mode>_softfloat64, FMOVE64): Likewise.
22091 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
22093         * doc/extend.texi (PowerPC Built-in Functions): Rename this
22094         subsection.
22095         (Basic PowerPC Built-in Functions): The new name of the
22096         subsection previously known as "PowerPC Built-in Functions".
22097         (Basic PowerPC Built-in Functions Available on all Configurations):
22098         New subsubsection.
22099         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
22100         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
22101         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
22102         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
22104 2018-05-11  Martin Jambor  <mjambor@suse.cz>
22106         PR ipa/85655
22107         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
22108         single const.
22110 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
22112         PR target/85733
22113         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
22115 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
22117         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
22118         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
22119         (ix86_handle_option): Handle -mwaitpkg.
22120         * config.gcc: New header.
22121         * config/i386/cpuid.h (bit_WAITPKG): New bit.
22122         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
22123         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
22124         function type.
22125         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
22126         OPTION_MASK_ISA_WAITPKG.
22127         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
22128         (ix86_option_override_internal): Add PTA_WAITPKG.
22129         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
22130         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
22131         IX86_BUILTIN_TPAUSE.
22132         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
22133         __builtin_ia32_umwait and __builtin_ia32_tpause.
22134         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
22135         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
22136         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
22137         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
22138         UNSPECV_TPAUSE): New.
22139         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
22140         * config/i386/i386.opt: Add -mwaitpkg.
22141         * config/i386/waitpkgintrin.h: New file.
22142         * config/i386/x86intrin.h: New header.
22143         * doc/invoke.texi: Add -mwaitpkg.
22145 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
22147         PR target/85606
22148         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
22149         equivalent.
22150         (cortex-m0): Use armv6s-m isa.
22151         (cortex-m0plus): Likewise.
22152         (cortex-m1): Likewise.
22153         (cortex-m0.small-multiply): Likewise.
22154         (cortex-m0plus.small-multiply): Likewise.
22155         (cortex-m1.small-multiply): Likewise.
22157 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
22158             Jakub Jelinek  <jakub@redhat.com>
22160         PR tree-optimization/85692
22161         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
22162         source permute as well.
22164 2018-05-11  Martin Liska  <mliska@suse.cz>
22166         PR sanitizer/85556
22167         * doc/extend.texi: Document LLVM style format for no_sanitize
22168         attribute.
22170 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
22172         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
22173         mode_supports_vsx_dform_quad to mode_supports_dq_form.
22174         (mode_supports_vsx_dform_quad): Likewise.
22175         (mode_supports_vmx_dform): Move these functions to be next to the
22176         other mode_supports functions.
22177         (mode_supports_dq_form): Likewise.
22178         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
22179         mode_supports_dq_form.
22180         (reg_offset_addressing_ok_p): Likewise.
22181         (offsettable_ok_by_alignment): Likewise.
22182         (rs6000_legitimate_offset_address_p): Likewise.
22183         (legitimate_lo_sum_address_p): Likewise.
22184         (rs6000_legitimize_address): Likewise.
22185         (rs6000_legitimize_reload_address): Likewise.
22186         (rs6000_secondary_reload_inner): Likewise.
22187         (rs6000_preferred_reload_class): Likewise.
22188         (rs6000_output_move_128bit): Likewise.
22190 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
22192         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
22193         Generate SImode target register for null target.
22194         <case IX86_BUILTIN_XGETBV>: Ditto.
22195         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
22196         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
22198 2018-05-10  Carl Love  <cel@us.ibm.com>
22200         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
22201         dcbtt and dcbtstt if operands[2] is 0.
22203 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
22205         PR target/85693
22206         * config/i386/sse.md (usadv64qi): New expander.
22208 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
22210         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
22211         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
22212         -maltivec=be support.
22213         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
22214         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
22215         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
22216         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
22217         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
22218         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
22219         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
22220         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
22221         altivec_vsumsws): Adjust.
22222         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
22223         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
22224         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
22225         support.
22226         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
22227         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
22228         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
22229         (altivec_lve<VI_char>x): Delete expand.
22230         (*altivec_lve<VI_char>x_internal): Rename to...
22231         (altivec_lve<VI_char>x): ... this.
22232         (altivec_lvxl_<mode>): Delete expand.
22233         (*altivec_lvxl_<mode>_internal): Rename to ...
22234         (altivec_lvxl_<mode>): ... this.
22235         (altivec_stvxl_<mode>): Delete expand.
22236         (*altivec_stvxl_<mode>_internal): Rename to ...
22237         (altivec_stvxl_<mode>): ... this.
22238         (altivec_stve<VI_char>x): Delete expand.
22239         (*altivec_stve<VI_char>x_internal): Rename to ...
22240         (altivec_stve<VI_char>x): ... this.
22241         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
22242         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
22243         reduc_plus_scal_<mode>): Adjust.
22244         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
22245         comment.
22246         (rs6000_cpu_cpp_builtins): Adjust.
22247         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
22248         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
22249         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
22250         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
22251         -maltivec=be support.
22252         (rs6000_split_vec_extract_var): Adjust.
22253         (rs6000_split_v4si_init): Adjust.
22254         (swap_selector_for_mode): Delete.
22255         (altivec_expand_lvx_be, altivec_expand_stvx_be,
22256         altivec_expand_stvex_be): Delete.
22257         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
22258         -maltivec=be support.
22259         (rs6000_gimple_fold_builtin): Ditto.
22260         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
22261         Adjust.
22262         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
22263         (TARGET_DIRECT_MOVE_64BIT): Adjust.
22264         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
22265         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
22266         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
22267         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
22268         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
22269         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
22270         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
22271         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
22272         anonymous split): Adjust.
22273         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
22274         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
22276 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
22278         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
22279         when --with-gxx-include-dir is also specified.
22280         * configure: Regenerate.
22282 2018-05-09  Jim Wilson  <jimw@sifive.com>
22284         PR target/84797
22285         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
22286         * config/riscv/t-withmultilib: New.
22287         * config/riscv/withmultilib.h: New.
22288         * doc/install.texi: Document RISC-V --with-multilib-list support.
22290 2018-05-09  Richard Biener  <rguenther@suse.de>
22292         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
22293         vector.
22294         (vect_bb_vectorization_profitable_p): Adjust.  Compute
22295         actual scalar cost using the cost vector and the add_stmt_cost
22296         machinery.
22298 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
22300         PR rtl-optimization/85645
22301         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
22302         in the REG_CFA_REGISTER note for LR, don't leave it empty.
22304 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
22306         PR rtl-optimization/85645
22307         * shrink-wrap.c (spread_components): Return a boolean saying if
22308         anything was changed.
22309         (try_shrink_wrapping_separate): Iterate spread_components until
22310         nothing changes anymore.
22312 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
22314         PR rtl-optimization/85645
22315         * regrename.c (build_def_use): Also kill the chains that include the
22316         destination of a REG_CFA_REGISTER note.
22318 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
22320         PR rtl-optimization/85645
22321         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
22322         insn that has a REG_CFA_REGISTER note.
22324 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
22326         * cfgexpand.c (expand_clobber): New function.
22327         (expand_gimple_stmt_1): Use it.
22328         * tree-vect-stmts.c (vect_clobber_variable): New function,
22329         split out from...
22330         (vectorizable_simd_clone_call): ...here.
22331         (vectorizable_store): Emit a clobber either side of an
22332         IFN_STORE_LANES sequence.
22333         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
22335 2018-05-09  Tom de Vries  <tom@codesourcery.com>
22337         PR target/85626
22338         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
22339         (define_insn "trap_if_false"): Add exit after trap.
22341 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
22343         PR rtl-optimization/85638
22344         * bb-reorder.c: Include common/common-target.h.
22345         (create_forwarder_block): New function extracted from...
22346         (fix_up_crossing_landing_pad): ...here.  Rename into...
22347         (dw2_fix_up_crossing_landing_pad): ...this.
22348         (sjlj_fix_up_crossing_landing_pad): New function.
22349         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
22350         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
22351         from both partitions and exit the loop after one iteration.
22353 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
22355         Revert:
22356         * doc/extend.texi (PowerPC Built-in Functions): Rename this
22357         subsection.
22358         (Basic PowerPC Built-in Functions): The new name of the
22359         subsection previously known as "PowerPC Built-in Functions".
22360         (Basic PowerPC Built-in Functions Available on all Configurations):
22361         New subsubsection.
22362         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
22363         subsubsection.
22364         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
22365         subsubsection.
22366         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
22367         subsubsection.
22368         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
22369         subsubsection.
22371 2018-05-08  Jim Wilson  <jimw@sifive.com>
22373         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
22374         (LD_EMUL_SUFFIX): New.
22375         (LINK_SPEC): Use it.
22377 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
22379         * doc/extend.texi (PowerPC Built-in Functions): Rename this
22380         subsection.
22381         (Basic PowerPC Built-in Functions): The new name of the
22382         subsection previously known as "PowerPC Built-in Functions".
22383         (Basic PowerPC Built-in Functions Available on all Configurations):
22384         New subsubsection.
22385         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
22386         subsubsection.
22387         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
22388         subsubsection.
22389         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
22390         subsubsection.
22391         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
22392         subsubsection.
22394 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
22396         PR target/85683
22397         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
22398         after cmpelim optimization.
22400 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
22402         * config.gcc: Support "goldmont".
22403         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
22404         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
22405         PROCESSOR_GOLDMONT.
22406         * config/i386/i386.c (m_GOLDMONT): Define.
22407         (processor_target_table): Add "goldmont".
22408         (PTA_GOLDMONT): Define.
22409         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
22410         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
22411         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
22412         (fold_builtin_cpu): Add "goldmont".
22413         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
22414         (ix86_option_override_internal): Add "goldmont".
22415         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
22416         (processor_type): Add PROCESSOR_GOLDMONT.
22417         * config/i386/i386.md: Add CPU "glm".
22418         * config/i386/glm.md: New file.
22419         * config/i386/x86-tune.def: Add m_GOLDMONT.
22420         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
22422 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
22424         PR target/85572
22425         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
22426         E_V4DImode.
22427         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
22428         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
22429         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
22431         PR target/85317
22432         * config/i386/i386.c (ix86_fold_builtin): Handle
22433         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
22435         PR target/85480
22436         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
22437         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
22439 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
22441         PR target/85658
22442         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
22443         (check_arch): Likewise.
22444         (check_fpu): Return the result rather than printing it.
22445         (end arch): Fix operator precedence.
22446         (end cpu): Likewise.
22447         (END): Print the result from check_fpu.
22449 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
22450             Alan Hayward  <alan.hayward@arm.com>
22451             David Sherwood  <david.sherwood@arm.com>
22453         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
22454         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
22455         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
22456         (*fcmuo<mode>_and): New patterns.
22458 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
22460         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
22461         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
22462         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
22463         (cmp_op, sve_imm_con): New code attributes.
22464         (SVE_COND_INT_CMP, imm_con): Delete.
22465         (cmp_op): Remove above unspecs from int attribute.
22466         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
22467         to...
22468         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
22469         comparison-specific unspecs.
22470         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
22471         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
22472         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
22473         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
22474         (*vec_fcm<cmp_op><mode>): Rename to...
22475         (*fcm<cmp_op><mode>): ...this and adjust likewise.
22476         (*vec_fcmuo<mode>): Rename to...
22477         (*fcmuo<mode>): ...this and adjust likewise.
22478         (*pred_fcm<cmp_op><mode>): New pattern.
22479         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
22480         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
22481         functions.
22482         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
22483         and UNORDERED.
22484         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
22485         (aarch64_emit_sve_predicated_cond): New function.
22486         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
22487         (aarch64_emit_unspec_cond_or): Replace with...
22488         (aarch64_emit_sve_or_conds): ...this new function.  Use
22489         aarch64_emit_sve_ptrue_op for the individual comparisons and
22490         aarch64_emit_binop to OR them together.
22491         (aarch64_emit_inverted_unspec_cond): Replace with...
22492         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
22493         aarch64_emit_sve_ptrue_op for the comparison and
22494         aarch64_emit_unop to invert the result.
22495         (aarch64_expand_sve_vec_cmp_float): Update after the above
22496         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
22498 2018-05-07  Nathan Sidwell  <nathan@acm.org>
22500         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
22501         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
22502         (Backwards Compatibility): Likewise.
22504 2018-05-07  Luis Machado  <luis.machado@linaro.org>
22506         PR bootstrap/85681
22507         Revert:
22508         2018-05-07  Luis Machado  <luis.machado@linaro.org>
22510         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
22511         <prefetch_dynamic_strides>: New const bool field.
22512         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
22513         prefetch_dynamic_strides.
22514         (exynosm1_prefetch_tune): Likewise.
22515         (thunderxt88_prefetch_tune): Likewise.
22516         (thunderx_prefetch_tune): Likewise.
22517         (thunderx2t99_prefetch_tune): Likewise.
22518         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
22519         to false.
22520         (aarch64_override_options_internal): Update to set
22521         PARAM_PREFETCH_DYNAMIC_STRIDES.
22522         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
22523         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
22524         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
22525         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
22526         prefetch-dynamic-strides setting.
22528         2018-05-07  Luis Machado  <luis.machado@linaro.org>
22530         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
22531         <minimum_stride>: New const int field.
22532         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
22533         minimum_stride field.
22534         (exynosm1_prefetch_tune): Likewise.
22535         (thunderxt88_prefetch_tune): Likewise.
22536         (thunderx_prefetch_tune): Likewise.
22537         (thunderx2t99_prefetch_tune): Likewise.
22538         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
22539         (aarch64_override_options_internal): Update to set
22540         PARAM_PREFETCH_MINIMUM_STRIDE.
22541         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
22542         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
22543         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
22544         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
22545         stride is constant and is below the minimum stride threshold.
22547 2018-05-07  Luis Machado  <luis.machado@linaro.org>
22549         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
22550         to 512.
22552 2018-05-07  Luis Machado  <luis.machado@linaro.org>
22554         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
22555         <prefetch_dynamic_strides>: New const bool field.
22556         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
22557         prefetch_dynamic_strides.
22558         (exynosm1_prefetch_tune): Likewise.
22559         (thunderxt88_prefetch_tune): Likewise.
22560         (thunderx_prefetch_tune): Likewise.
22561         (thunderx2t99_prefetch_tune): Likewise.
22562         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
22563         to false.
22564         (aarch64_override_options_internal): Update to set
22565         PARAM_PREFETCH_DYNAMIC_STRIDES.
22566         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
22567         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
22568         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
22569         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
22570         prefetch-dynamic-strides setting.
22572 2018-05-07  Luis Machado  <luis.machado@linaro.org>
22574         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
22575         <minimum_stride>: New const int field.
22576         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
22577         minimum_stride field.
22578         (exynosm1_prefetch_tune): Likewise.
22579         (thunderxt88_prefetch_tune): Likewise.
22580         (thunderx_prefetch_tune): Likewise.
22581         (thunderx2t99_prefetch_tune): Likewise.
22582         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
22583         (aarch64_override_options_internal): Update to set
22584         PARAM_PREFETCH_MINIMUM_STRIDE.
22585         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
22586         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
22587         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
22588         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
22589         stride is constant and is below the minimum stride threshold.
22591 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
22593         PR c++/85659
22594         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
22595         the type is addressable.  Don't force op into register if it has
22596         BLKmode.
22598 2018-05-05  Roland McGrath  <mcgrathr@google.com>
22600         PR other/77609
22601         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
22602         any section for which we don't know a specific type it should have,
22603         regardless of name.  Previously this was done only for the exact
22604         names ".init_array", ".fini_array", and ".preinit_array".
22605         (default_elf_asm_named_section): Add comment about
22606         relationship with default_section_type_flags and SECTION_NOTYPE.
22607         (get_section): Don't consider it a type conflict if one side has
22608         SECTION_NOTYPE and the other doesn't, as long as neither has the
22609         SECTION_BSS et al used in the default_section_type_flags logic.
22611 2018-05-05  Tom de Vries  <tom@codesourcery.com>
22613         PR target/85653
22614         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
22615         (workaround_barsyncs): New function.
22616         (nvptx_reorg): Use workaround_barsyncs.
22617         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
22618         (define_expand "nvptx_membar_cta"): New define_expand.
22619         (define_insn "*nvptx_membar_cta"): New insn.
22621 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
22623         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
22624         To improve optimization opportunities.
22625         * builtin-types.def: The new needed builtin types for the above.
22627 2018-05-04  Richard Biener  <rguenther@suse.de>
22629         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
22630         * gimple-ssa-store-merging.c
22631         (imm_store_chain_info::output_merged_store): Remove redundant create,
22632         release split_store vector contents on failure.
22633         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
22634         scalar stmt vector on cache hit.
22636 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
22638         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
22639         Xilinx FP support.
22640         * config.gcc (powerpc-xilinx-eabi*): Remove.
22641         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
22642         support.
22643         (fusion_addis_mem_combo_load): Ditto.
22644         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
22645         FP support.
22646         (rs6000_cpu_cpp_builtins): Ditto.
22647         * config/rs6000/rs6000-linux.c
22648         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
22649         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
22650         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
22651         support.
22652         (rs6000_setup_reg_addr_masks): Ditto.
22653         (rs6000_init_hard_regno_mode_ok): Ditto.
22654         (rs6000_option_override_internal): Ditto.
22655         (legitimate_lo_sum_address_p): Ditto.
22656         (rs6000_legitimize_address): Ditto.
22657         (rs6000_legitimize_reload_address): Ditto.
22658         (rs6000_legitimate_address_p): Ditto.
22659         (abi_v4_pass_in_fpr): Ditto.
22660         (setup_incoming_varargs): Ditto.
22661         (rs6000_gimplify_va_arg): Ditto.
22662         (rs6000_split_multireg_move): Ditto.
22663         (rs6000_savres_strategy): Ditto.
22664         (rs6000_emit_prologue_components): Ditto.
22665         (rs6000_emit_epilogue_components): Ditto.
22666         (rs6000_emit_prologue): Ditto.
22667         (rs6000_emit_epilogue): Ditto.
22668         (rs6000_elf_file_end): Ditto.
22669         (rs6000_function_value): Ditto.
22670         (rs6000_libcall_value): Ditto.
22671         * config/rs6000/rs6000.h: Ditto.
22672         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
22673         (TARGET_MINMAX): ... this.  New.
22674         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
22675         * config/rs6000/rs6000.md: Remove Xilinx FP support.
22676         (*movsi_internal1_single): Delete.
22677         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
22678         mfpu=, mxilinx-fpu): Delete.
22679         * config/rs6000/singlefp.h: Delete.
22680         * config/rs6000/sysv4.h: Remove Xilinx FP support.
22681         * config/rs6000/t-rs6000: Ditto.
22682         * config/rs6000/t-xilinx: Delete.
22683         * config/rs6000/titan.md: Adjust for fp_type removal.
22684         * config/rs6000/vsx.md: Remove Xilinx FP support.
22685         (VStype_simple): Delete.
22686         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
22687         * config/rs6000/xfpu.h: Delete.
22688         * config/rs6000/xfpu.md: Delete.
22689         * config/rs6000/xilinx.h: Delete.
22690         * config/rs6000/xilinx.opt: Delete.
22691         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
22692         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
22694 2018-05-04  Tom de Vries  <tom@codesourcery.com>
22696         PR libgomp/85639
22697         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
22698         if ignore == 0.
22700 2018-05-04  Richard Biener  <rguenther@suse.de>
22702         PR middle-end/85627
22703         * tree-complex.c (update_complex_assignment): We are always in SSA form.
22704         (expand_complex_div_wide): Likewise.
22705         (expand_complex_operations_1): Likewise.
22706         (expand_complex_libcall): Preserve EH info of the original stmt.
22707         (tree_lower_complex): Handle removed blocks.
22708         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
22709         on complex multiplication and division libcall builtins.
22711 2018-05-04  Richard Biener  <rguenther@suse.de>
22713         PR middle-end/85574
22714         * fold-const.c (negate_expr_p): Restrict negation of operand
22715         zero of a division to when we know that can happen without
22716         overflow.
22717         (fold_negate_expr_1): Likewise.
22719 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
22721         PR libstdc++/85466
22722         * real.h (real_nextafter): Declare.
22723         * real.c (real_nextafter): New function.
22724         * fold-const-call.c (fold_const_nextafter): New function.
22725         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
22726         CASE_CFN_NEXTTOWARD.
22727         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
22728         even when arg1_mode is different from arg0_mode.
22730 2018-05-03  Nathan Sidwell  <nathan@acm.org>
22732         * doc/extend.texi (Deprecated Features): Remove
22733         -ffriend-injection.
22734         (Backwards Compatibility): Likewise.
22735         * doc/invoke.texi (C++ Language Options): Likewise.
22736         (C++ Dialect Options): Likewise.
22738 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
22740         PR target/85530
22741         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
22742         _mm512_mask_mullox_epi64): New intrinsics.
22744 2018-05-03  Tom de Vries  <tom@codesourcery.com>
22746         PR testsuite/85106
22747         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
22748         dump files): Add offload-tree.
22750 2018-05-03  Richard Biener  <rguenther@suse.de>
22752         PR tree-optimization/85615
22753         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
22754         to loops not nested in BBs loop father to avoid creating multi-entry
22755         loops.
22757 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22759         PR tree-optimization/70291
22760         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
22761         arguments.  Change return type to tree.  Emit libcall as a new
22762         statement rather than replacing existing one when inplace_p is true.
22763         (expand_complex_multiplication_components): New function.
22764         (expand_complex_multiplication): Expand floating-point complex
22765         multiplication using the above.
22766         (expand_complex_division): Rename inner_type parameter to type.
22767         Update expand_complex_libcall call-site.
22768         (expand_complex_operations_1): Update expand_complex_multiplication
22769         and expand_complex_division call-sites.
22771 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
22773         PR target/85582
22774         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
22775         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
22776         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
22777         the highest significant bit of the shift count mask is clear.  In
22778         check whether and[sq]i3 is needed verify that all significant bits
22779         of the shift count other than the highest are set.
22781 2018-05-02  Tom de Vries  <tom@codesourcery.com>
22783         PR libgomp/82428
22784         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
22785         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
22786         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
22787         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
22788         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
22789         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
22790         __builtin_goacc_parlevel_size.
22792 2018-05-02  Richard Biener  <rguenther@suse.de>
22794         PR tree-optimization/85597
22795         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
22796         do not use split vect_get_vec_defs call but call vect_get_slp_defs
22797         directly.
22799 2018-05-02  Tom de Vries  <tom@codesourcery.com>
22801         PR testsuite/85106
22802         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
22803         dump files): Add ltrans-tree.
22805 2018-05-02  Tom de Vries  <tom@codesourcery.com>
22807         PR testsuite/85106
22808         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
22809         dump files): Add wpa-ipa.
22811 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
22813         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
22814         powerpc*-*-linux*paired* target.
22815         * config/rs6000/750cl.h: Delete.
22816         * config/rs6000/paired.h: Delete.
22817         * config/rs6000/paired.md: Delete.
22818         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
22819         float support.
22820         * config/rs6000/rs6000-builtin.def: Remove paired float support.
22821         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
22822         comment.  Remove paired float support.
22823         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
22824         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
22825         VECTOR_PAIRED.
22826         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
22827         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
22828         declarations.
22829         * config/rs6000/rs6000.c: Remove paired float support.
22830         (paired_expand_vector_init, paired_expand_vector_move,
22831         paired_emit_vector_compare, paired_emit_vector_cond_expr,
22832         (paired_expand_lv_builtin, paired_expand_stv_builtin,
22833         paired_expand_builtin, paired_expand_predicate_builtin,
22834         paired_init_builtins): Delete.
22835         * config/rs6000/rs6000.h: Remove paired float support.
22836         * config/rs6000/rs6000.md: Remove paired float support.
22837         (move_from_CR_ov_bit): Delete.
22838         * config/rs6000/rs6000.opt (mpaired): Delete.
22839         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
22840         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
22842 2018-05-02  Richard Biener  <rguenther@suse.de>
22844         PR middle-end/85567
22845         * gimplify.c (gimplify_save_expr): When in SSA form allow
22846         SAVE_EXPRs to compute to SSA vars.
22848 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
22850         PR target/85582
22851         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
22852         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
22853         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
22854         clobber operands[2], instead use a new pseudo.  Formatting fixes.
22856 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
22858         PR tree-optimization/85586
22859         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
22860         exit early for statements in the same group if the accesses are
22861         not strided.
22863 2018-05-02  Tom de Vries  <tom@codesourcery.com>
22865         PR lto/85451
22866         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
22867         error message.
22869 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
22871         PR tree-optimization/85143
22872         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
22874 2018-05-01  Tom de Vries  <tom@codesourcery.com>
22876         PR lto/85451
22877         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
22878         not found" error message.
22880 2018-05-01  Tom de Vries  <tom@codesourcery.com>
22882         PR other/83786
22883         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
22884         * vec.c (test_ordered_remove_if): New function.
22885         (vec_c_tests): Call test_ordered_remove_if.
22886         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
22887         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
22888         * tree-vect-patterns.c (vect_pattern_recog_1): Use
22889         VEC_ORDERED_REMOVE_IF.
22891 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
22893         PR tree-optimization/82665
22894         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
22895         pointer subtraction where arguments come from a memchr call.
22897 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
22899         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
22900         --push-state --as-needed and --pop-state instead of --as-needed and
22901         --no-as-needed if ld supports it.
22902         * configure: Regenerated.
22904         PR web/85578
22905         * doc/install.texi2html: Replace _002d with - and _002a with * in
22906         generated html files using sed.
22908 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
22910         PR c++/85523
22911         * gcc-rich-location.c (blank_line_before_p): New function.
22912         (use_new_line): New function.
22913         (gcc_rich_location::add_fixit_insert_formatted): New function.
22914         * gcc-rich-location.h
22915         (gcc_rich_location::add_fixit_insert_formatted): New function.
22917 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
22919         * selftest.c (assert_streq): Rename "expected" and "actual" to
22920         "val1" and "val2".  Extend NULL-handling to cover both inputs
22921         symmetrically, while still requiring both to be non-NULL for a pass.
22922         * selftest.h (assert_streq): Rename "expected" and "actual" to
22923         "val1" and "val2".
22924         (ASSERT_EQ): Likewise.
22925         (ASSERT_EQ_AT): Likewise.
22926         (ASSERT_KNOWN_EQ): Likewise.
22927         (ASSERT_KNOWN_EQ_AT): Likewise.
22928         (ASSERT_NE): Likewise.
22929         (ASSERT_MAYBE_NE): Likewise.
22930         (ASSERT_MAYBE_NE_AT): Likewise.
22931         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
22932         the assertion to pass.
22933         (ASSERT_STREQ_AT): Likewise.
22935 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
22937         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
22938         interaction with -pie.
22940 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
22942         * selftest.h: Fix alphabetization of per-source-file selftest
22943         declarations.
22945 2018-04-30  Jason Merrill  <jason@redhat.com>
22947         PR c++/61982 - dead stores to destroyed objects.
22948         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
22949         of clobber.
22951 2018-04-30  Jason Merrill  <jason@redhat.com>
22953         * tree.c (build_clobber): New.
22954         * tree.h: Declare it.
22955         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
22957 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
22959         * diagnostic-show-locus.c (layout::layout): Update for
22960         location_get_source_line returning a char_span.
22961         (struct char_span): Move to input.h.
22962         (struct correction): Update for fields in char_span becoming
22963         private.
22964         (struct source_line): Update for location_get_source_line
22965         returning a char_span.
22966         (layout::print_line): Likewise.
22967         * edit-context.c (edited_file::print_content): Likewise.
22968         (edited_file::print_diff_hunk): Likewise.
22969         (edited_file::print_run_of_changed_lines): Likewise.
22970         (edited_file::get_num_lines): Likewise.
22971         (edited_line::edited_line): Likewise.
22972         * final.c (asm_show_source): Likewise.
22973         * input.c (location_get_source_line): Convert return type
22974         from const char * to char_span, losing the final "line_len"
22975         param.
22976         (dump_location_info): Update for the above.
22977         (get_substring_ranges_for_loc): Likewise.  Use a char_span
22978         when handling the literal within the line.
22979         (test_reading_source_line): Update for location_get_source_line
22980         returning a char_span.
22981         * input.h (class char_span): Move here from
22982         diagnostic-show-locus.c, converting from a struct to a class.
22983         Make data members private.
22984         (char_span::operator bool): New.
22985         (char_span::length): New.
22986         (char_span::get_buffer): New.
22987         (char_span::operator[]): New.
22988         (char_span::subspan): Make const.
22989         (char_span::xstrdup): New.
22990         (location_get_source_line): Convert return type from const char *
22991         to char_span, losing the final "line_size" param.
22993 2018-04-30  Jan Hubicka  <jh@suse.cz>
22995         * lto-wrapper.c (ltrans_priorities): New static var.
22996         (cmp_priority): New.
22997         (run_gcc): Read priorities and if doing parallel build order
22998         the Makefile by them.
23000 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
23002         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
23004 2018-04-30  Richard Biener  <rguenther@suse.de>
23006         * tree-cfg.c (verify_address): Remove base argument, add
23007         flag whether to check TREE_ADDRESSABLE and do that.
23008         (verify_expr): Remove.
23009         (verify_types_in_gimple_reference): Add pieces from verify_expr.
23010         (verify_gimple_assign_single): Likewise.
23011         (verify_gimple_switch): Likewise.
23012         (verify_expr_location_1): Dereference tp once.  Add (disabled)
23013         piece from verify_expr.
23014         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
23016 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
23018         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
23020 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
23022         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
23023         (small_data_pattern): Likewise.
23024         (arc_rewrite_small_data): Likewise.
23025         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
23026         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
23027         (get_symbol_alignment): New function.
23028         (legitimate_small_data_address_p): Likewise.
23029         (legitimate_scaled_address): Update, call
23030         legitimate_small_data_address_p.
23031         (output_sdata): New static variable.
23032         (arc_print_operand): Update how we handle small data operands.
23033         (arc_print_operand_address): Likewise.
23034         (arc_legitimate_address_p): Update, use
23035         legitimate_small_data_address_p.
23036         (arc_rewrite_small_data_p): Remove.
23037         (arc_rewrite_small_data_1): Likewise.
23038         (arc_rewrite_small_data): Likewise.
23039         (small_data_pattern): Likewise.
23040         (compact_sda_memory_operand): Update to use
23041         legitimate_small_data_address_p and get_symbol_alignment.
23042         (prepare_move_operands): Don't rewite sdata pattern.
23043         (prepare_extend_operands): Remove.
23044         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
23045         pattern.
23046         (zero_extendqisi2): Likewise.
23047         (zero_extendhisi2): Likewise.
23048         (extendqihi2): Likewise.
23049         (extendqisi2): Likewise.
23050         (extendhisi2): Likewise.
23051         (addsi3): Likewise.
23052         (subsi3): Likewise.
23053         (andsi3): Likewise.
23054         * config/arc/constraints.md (Usd): Change it to memory constraint.
23056 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
23058         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
23059         as source of std instructions.
23060         * config/arc/arc.md (movsi_insn): Update pattern predicate to
23061         allow 6-bit constants as source for store instructions.
23062         (movdi_insn): Update instruction pattern to allow 6-bit constants
23063         as source for store instructions.
23065 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
23067         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
23069 2018-04-30  Nathan Sidwell  <nathan@acm.org>
23070             Sandra Loosemore <sandra@codesourcery.com>
23072         * dumpfile.c (dump_open): Allow '-' for stdout.
23073         * doc/invoke.texi (Developer Options): Document dump filename
23074         determination early.  Document stdin/stdout selection.
23076 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
23078         Microblaze Target: PIC data text relative
23080         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
23081         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
23082         Add declaration.
23083         * config/microblaze/microblaze.h (microblaze_constant_address_p):
23084         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
23085         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
23086         New addressing mode for data-text relative position indepenedent code.
23087         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
23088         'ADDRESS_SYMBOLIC_TXT_REL'.
23089         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
23090         (microblaze_legitimate_pic_operand): Exclude function calls from
23091         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
23092         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
23093         addresses cases.
23094         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
23095         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
23096         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
23097         for 'address + offset'.
23098         (microblaze_expand_prologue): Add new function prologue call for
23099         'r20' assignation.
23100         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
23101         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
23102         table in case of TARGET_PIC_DATA_TEXT_REL.
23103         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
23104         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
23105         Add new macros 'UNSPEC_TEXT',
23106         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
23107         + exclude function calls from 'UNSPEC_PLT' in case of data text
23108         relative mode.
23109         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
23110         new target hook for generating address diff vector tables in case of
23111         flag_pic.
23112         * doc/tm.texi : Regenerate.
23113         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
23114         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
23115         of addr diff vector generation.
23116         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
23117         target hook definition.
23118         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
23119         Add default function for generate_pic_addr_diff_vec -> flag_pic.
23120         * doc/invoke.texi (Add new pic option): Add new microblaze pic
23121         option for data text relative.
23123 2018-04-30  Richard Biener  <rguenther@suse.de>
23125         * tree-chrec.h (evolution_function_is_constant_p): Remove
23126         redundant check.
23127         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
23129 2018-04-30  Richard Biener  <rguenther@suse.de>
23131         PR bootstrap/85571
23132         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
23134 2018-04-30  Richard Biener  <rguenther@suse.de>
23136         PR tree-optimization/28364
23137         PR tree-optimization/85275
23138         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
23139         copying first exit test.
23141 2018-04-28  Mark Wielaard  <mark@klomp.org>
23143         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
23144         dwarf_version >= 5.
23145         (dwarf_AT): Handle DW_AT_addr_base.
23146         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
23148 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
23150         PR target/84431
23151         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
23152         (*ashl<dwi>3_doubleword_mask_1): Ditto.
23153         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
23154         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
23156 2018-04-28  Richard Biener  <rguenther@suse.de>
23158         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
23159         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
23160         to reflect use.  Only add interesting stmts.
23162 2018-04-27  Martin Jambor  <mjambor@suse.cz>
23164         PR ipa/85549
23165         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
23166         the jump function allows for passing through aggregate values.
23168 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
23170         * input.h (in_system_header_at): Convert from macro to inline
23171         function.
23172         (from_macro_expansion_at): Likewise.
23173         (from_macro_definition_at): Likewise.
23175 2018-04-27  Jeff Law  <law@redhat.com>
23177         * config.gcc: Mark tile* targets as deprecated/obsolete.
23179 2018-04-27  Richard Biener  <rguenther@suse.de>
23181         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
23182         fix for ILP32.
23184 2018-04-27  Richard Biener  <rguenther@suse.de>
23186         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
23188 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
23190         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
23191         with Yd constraint. Set "preferred_for_speed" attribute from
23192         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
23193         with Yd constraint.
23194         (*movdi_internal): Ditto.
23195         (movti_interunit splitters): Remove
23196         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
23197         (movdi_interunit splitters): Ditto.
23198         * config/i386/constraints.md (Ye): Remove.
23199         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
23201 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23203         PR target/85512
23204         * config/aarch64/constraints.md (Usg): Limit to 31.
23205         (Usj): Limit to 63.
23207 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
23209         PR tree-optimization/85529
23210         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
23211         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
23212         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
23213         zero extension or masking of the MSB bit.
23214         (optimize_range_tests): Add FIRST_BB argument, pass it through
23215         to optimize_range_tests_var_bound.
23216         (maybe_optimize_range_tests, reassociate_bb): Adjust
23217         optimize_range_tests callers.
23219 2018-04-26  Richard Biener  <rguenther@suse.de>
23220             Jakub Jelinek  <jakub@redhat.com>
23222         * cgraph.h (symbol_table): Just declare debug method here.
23223         * symtab.c (symbol_table::debug): Define.
23225 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
23227         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
23229 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
23231         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
23232         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
23233         (*movdi_internal): Substitute Yi and Yj constraint with x
23234         and Ym and Yn constraint with y constraint.  Update "isa"
23235         attribute and set "preferred_for_speed" attribute from
23236         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
23237         (*movsi_internal): Ditto.
23238         (*movdf_internal): Ditto.
23239         (*movsf_internal): Ditto.
23240         (*zero_extendsidi2): Ditto.
23241         * config/i386/sse.md (vec_set<mode>_0): Ditto.
23242         (sse2_loadld): Ditto.
23243         (*vec_extract<ssevecmodelower>_0): Ditto.
23244         (*vec_extractv4si_0_zext_sse4): Ditto.
23245         (vec_concatv2di): Ditto.
23246         (*vec_dup<mode>): Ditto.
23247         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
23248         * config/i386/constraints.md (Yi): Remove.
23249         (Yj): Remove.
23250         (Ym): Remove.
23251         (Yn): Remove.
23253 2018-04-26  Nathan Sidwell  <nathan@acm.org>
23255         * dumpfile.c (dump_open): New.
23256         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
23257         (dump_finish): Detect stdio/stderr by value not name.
23259 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
23261         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
23263 2018-04-26  Tom de Vries  <tom@codesourcery.com>
23265         PR target/84952
23266         * config/nvptx/nvptx.c (verify_neutering_jumps)
23267         (verify_neutering_labels): New function
23268         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
23270 2018-04-26  Tom de Vries  <tom@codesourcery.com>
23272         PR target/84025
23273         * config/nvptx/nvptx.c (needs_neutering_p): New function.
23274         (nvptx_single): Use needs_neutering_p to skip over insns that do not
23275         need neutering.
23277 2018-04-26  Richard Biener <rguenther@suse.de>
23278             Tom de Vries  <tom@codesourcery.com>
23280         PR lto/85422
23281         * lto-streamer-out.c (output_function): Fixup loops if required to match
23282         discovery done in the reader.
23284 2018-04-26  Richard Biener  <rguenther@suse.de>
23286         PR tree-optimization/85116
23287         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
23288         have a loop exit from the single latch predecessor.  Remove
23289         case of header with just condition.
23290         (ch_base::copy_headers): Exclude infinite loops from any
23291         processing.
23292         (pass_ch::execute): Record exits.
23294 2018-04-26  Richard Biener  <rguenther@suse.de>
23296         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
23297         prologue cost vector and pass it to vect_get_load_cost.
23298         (vect_get_peeling_costs_all_drs): Likewise.
23299         (vect_peeling_hash_get_lowest_cost): Likewise.
23300         (vect_enhance_data_refs_alignment): Likewise.
23302 2018-04-26  Richard Biener  <rguenther@suse.de>
23304         PR middle-end/85450
23305         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
23306         checking of integer<->pointer conversions.
23307         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
23308         sign-/zero-extending pointer types.
23309         (expand_omp_for_static_chunk): Likewise.
23311 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
23312             Jean Lee  <xiaoyur347@gmail.com>
23314         * config/mips/mips.c (mips_asan_shadow_offset): New function.
23315         (TARGET_ASAN_SHADOW_OFFSET): Define.
23316         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
23317         true for -fsanitize=address.
23319 2018-04-25  Mark Wielaard  <mark@klomp.org>
23321         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
23322         shorter ones.
23324 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
23326         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
23327         than "alu", remove explicit "memory" and "imm_disp" attributes.
23328         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
23330         PR middle-end/85414
23331         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
23332         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
23333         gen_lowpart_no_emit.
23335 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
23337         PR target/85473
23338         * config/i386/i386.c (ix86_expand_builtin): Change memory
23339         operand to XI, extend p0 to Pmode.
23340         * config/i386/i386.md: Change unspec volatile and operand
23341         1 mode to XI, change operand 0 mode to P.
23343 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
23345         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
23346         GET_MODE_MASK before any checking.
23347         (nds32_can_use_bset_p): Likewise.
23348         (nds32_can_use_btgl_p): Likewise.
23350 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
23352         * config/nds32/nds32-doubleword.md: New define_split pattern for
23353         illegal register number.
23355 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
23357         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
23359 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
23361         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
23363 2018-04-25  Richard Biener  <rguenther@suse.de>
23365         * lto-streamer.h (LTO_major_version): Bump to 8.
23367 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
23369         * BASE-VER: Set to 9.0.0.
23371 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
23373         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
23374         in __abskf2 and __powikf2.
23376 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23378         PR target/85512
23379         * config/aarch64/constraints.md (Usg, Usj): New constraints.
23380         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
23381         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
23382         Use the above on operand 2.  Reindent.
23383         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
23385 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
23387         PR target/85485
23388         * common/config/i386/i386-common.c (ix86_handle_option): Don't
23389         handle OPT_mcet.
23390         * config/i386/i386.opt (mcet): Removed.
23391         * doc/install.texi: Remove -mcet documentation.
23392         * doc/invoke.texi: Likewise.
23394 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
23396         PR target/85485
23397         * doc/install.texi: Remove -mcet from bootstrap-cet.
23399 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
23401         PR target/85511
23402         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
23403         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
23404         if TARGET_64BIT.
23406         PR target/85503
23407         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
23408         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
23409         containing a CONST_VECTOR.
23411 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
23413         * doc/install.texi: Update newlib dependency for nvptx.
23415 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
23417         PR target/85508
23418         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
23419         instead of INTVAL when shifting x left.
23421 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
23423         PR tree-optimization/85478
23424         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
23425         vect_grouped_store_supported for single element vectors.
23427 2018-04-24  Richard Biener  <rguenther@suse.de>
23429         PR target/85491
23430         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
23431         load cost increase to the case of non-constant step.
23433 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
23435         PR target/84828
23436         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
23437         destination if any_malformed_asm.
23439 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
23441         PR middle-end/85496
23442         * expr.c (store_field): In the bitfield case, if the value comes from
23443         a function call and is returned in registers by means of a PARALLEL,
23444         do not change the mode of the temporary unless BLKmode and VOIDmode.
23446 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
23448         PR rtl-optimization/85423
23449         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
23450         dependencies to debug insns when the previous insn is non-debug.
23452 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
23454         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
23455         enums into a single definition.
23456         (fls): Fix predicates and printing.
23457         (seti): Likewise.
23459 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
23461         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
23462         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
23463         and short u6 immediate.
23464         (check_if_valid_sleep_operand): Remove.
23465         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
23467 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
23469         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
23470         flag_always_save_lp condition.
23471         * config/nds32/nds32.opt (malways-save-lp): New option.
23473 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
23475         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
23476         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
23477         * config/nds32/nds32.h
23478         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
23479         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
23481 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
23483         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
23484         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
23486 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
23487             Chung-Ju Wu  <jasonwucj@gmail.com>
23489         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
23490         Declare.
23491         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
23492         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
23494 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
23496         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
23498 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
23500         * config/nds32/nds32-protos.h (nds32_data_alignment,
23501         nds32_local_alignment): Declare.
23502         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
23503         nds32_local_alignment): New functions.
23504         (TARGET_CONSTANT_ALIGNMENT): Define.
23505         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
23507 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
23509         * config/nds32/nds32.c
23510         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
23511         (TARGET_MODES_TIEABLE_P): Likewise.
23513 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
23515         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
23516         level Ofast and Og.
23518 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
23519             Chung-Ju Wu  <jasonwucj@gmail.com>
23521         * config/nds32/constants.md (unspec_volatile_element): Add enum values
23522         for unaligned access.
23523         * config/nds32/nds32-intrinsic.c: Implementation of expanding
23524         unaligned access.
23525         * config/nds32/nds32-intrinsic.md: Likewise.
23526         * config/nds32/nds32_intrinsic.h: Likewise.
23527         * config/nds32/nds32.h (nds32_builtins): Likewise.
23528         * config/nds32/nds32.opt (munaligned-access): New option.
23529         * config/nds32/nds32.c (nds32_asm_file_start): Display
23530         flag_unaligned_access status.
23532 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
23534         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
23535         -mno-relax is present.
23536         * config/riscv/linux.h (LINK_SPEC): Ditto.
23538 2018-04-20  Martin Sebor  <msebor@redhat.com>
23540         PR c/85365
23541         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
23542         for null pointers.
23543         (gimple_fold_builtin_stxcpy_chk): Same.
23544         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
23546 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
23548         PR target/85456
23549         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
23550         __powikf2 when long double is IEEE 128-bit.
23552 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
23554         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
23555         step to make sure stack always aligned.
23557 2018-04-20  Carl Love  <cel@us.ibm.com>
23559         PR target/83402
23560         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
23561         size check for arg0.
23563 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
23564             Tom de Vries  <tom@codesourcery.com>
23566         PR target/85445
23567         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
23568         Emit insns for calls too.
23569         (nvptx_find_par): Always look for worker-level predecessor insn.
23570         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
23571         calls.
23572         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
23573         (nvptx_process_pars): Propagate frames for calls.
23575 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
23577         PR target/85469
23578         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
23579         Removed.
23580         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
23581         (ix86_handle_option): Don't handle OPT_mibt.
23582         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
23583         __SHSTK__.
23584         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
23585         has_ibt and ibt.
23586         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
23587         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
23588         (ix86_target_macros): Define __CET__ with flag_cf_protection
23589         for -fcf-protection.
23590         * config/i386/i386.c (isa2_opts): Remove -mibt.
23591         * config/i386/i386.h (TARGET_IBT): Removed.
23592         (TARGET_IBT_P): Likewise.
23593         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
23594         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
23595         * config/i386/i386.opt (mcet): Update help message.
23596         (mshstk): Likewise.
23597         (mibt): Removed.
23598         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
23599         -mcet as an alias for -mshstk.
23601 2018-04-20  Richard Biener <rguenther@suse.de>
23603         PR middle-end/85475
23604         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
23605         complexity by forcing a single use of the multiply operand.
23607 2018-04-20  Martin Jambor  <mjambor@suse.cz>
23609         ipa/85449
23610         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
23611         recursion dependency to only apply to non-clones.
23613 2018-04-20  Martin Jambor  <mjambor@suse.cz>
23615         ipa/85447
23616         * ipa-cp.c (create_specialized_node): Check that clones of
23617         self-recursive edges exist during IPA-CP.
23619 2018-04-19  Toon Moene  <toon@moene.org>
23621         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
23622         by -O3.
23624 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
23626         PR tree-optimization/85467
23627         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
23628         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
23629         VECTOR_CST element to type.
23631 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
23633         PR target/85397
23634         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
23635         * config/i386/i386.md (builtin_setjmp_setup): Removed.
23636         (builtin_longjmp): Likewise.
23637         (save_stack_nonlocal): New pattern.
23638         (restore_stack_nonlocal): Likewise.
23640 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
23642         PR target/85404
23643         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
23644         Replace ASM_OUTPUT_LABEL with fprintf.
23646 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
23648         PR target/85417
23649         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
23650         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
23651         * config/i386/i386-c.c (ix86_target_macros_internal): Also
23652         define __IBT__ and __SHSTK__ for -fcf-protection.
23653         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
23654         TARGET_IBT.
23655         (ix86_trampoline_init): Likewise.
23656         (x86_output_mi_thunk): Likewise.
23657         (ix86_notrack_prefixed_insn_p): Likewise.
23658         (ix86_option_override_internal): Don't disallow -fcf-protection.
23659         * config/i386/i386.md (rdssp<mode>): Also enable for
23660         -fcf-protection.
23661         (incssp<mode>): Likewise.
23662         (nop_endbr): Likewise.
23663         * config/i386/i386.opt (mcet): Change help message to built-in
23664         functions only.
23665         (mibt): Likewise.
23666         (mshstk): Likewise.
23667         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
23668         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
23669         enable CET built-in functions.
23671 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
23673         * common/config/i386/i386-common.c
23674         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
23675         OPTION_MASK_ISA_MOVDIRI_UNSET,
23676         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
23677         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
23678         * config.gcc (movdirintrin.h): New header.
23679         * config/i386/cpuid.h (bit_MOVDIRI,
23680         bit_MOVDIR64B): New bits.
23681         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
23682         and -mmvodir64b.
23683         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
23684         (VOID, PVOID, PCVOID)): New function types.
23685         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
23686         __builtin_ia32_directstoreu_u64,
23687         __builtin_ia32_movdir64b): New builtins.
23688         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
23689         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
23690         and -mmovdiri.
23691         (ix86_valid_target_attribute_inner_p): Ditto.
23692         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
23693         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
23694         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
23695         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
23696         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
23697         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
23698         (movdiri<mode>, movdir64b_<mode>): New.
23699         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
23700         * config/i386/immintrin.h: Include movdirintrin.h.
23701         * config/i386/movdirintrin.h: New file.
23702         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
23704 2018-04-19  Richard Biener  <rguenther@suse.de>
23706         PR middle-end/85455
23707         * cfg.c (clear_bb_flags): When loop state says we have
23708         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
23710 2018-04-19  Richard Biener  <rguenther@suse.de>
23712         PR tree-optimization/84737
23713         * tree-vect-data-refs.c (vect_copy_ref_info): New function
23714         copying restrict info.
23715         (vect_setup_realignment): Use it.
23716         * tree-vectorizer.h (vect_copy_ref_info): Declare.
23717         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
23718         the first DR to all generated stores.
23719         (vectorizable_load): Likewise for loads.
23721 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
23723         PR tree-optimization/85446
23724         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
23725         the integral and pointer types to have the same precision.
23727         * doc/install.texi: Document --disable-cet being the default and
23728         --enable-cet=auto.
23730 2018-04-18  Martin Liska  <mliska@suse.cz>
23732         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
23733         style.
23735 2018-04-18  Martin Liska  <mliska@suse.cz>
23737         Revert
23738         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
23740         PR ipa/83983
23741         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
23742         arguments if they are comparable.
23744 2018-04-18  Martin Liska  <mliska@suse.cz>
23746         Revert
23747         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
23749         PR lto/84805
23750         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
23751         incomplete types.
23753 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
23755         PR target/85388
23756         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
23757         ENDBR after calling __morestack.
23759 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
23761         PR jit/85384
23762         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
23763         by using gcc_base_ver to generate a gcc_driver_version, and use
23764         it when generating GCC_DRIVER_NAME.
23765         * configure: Regenerate.
23767 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
23769         PR target/81084
23770         * config.gcc: Obsolete powerpc*-*-*spe*.
23772 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
23774         PR debug/84637
23775         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
23776         (stabstr_D): Change type of unum from unsigned int to
23777         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
23778         type.
23780 2018-04-17  Jim Wilson  <jimw@sifive.com>
23782         PR 84856
23783         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
23784         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
23785         Set arg_pointer_offset after using pretend_args_size.
23787 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
23789         PR rtl-optimization/85431
23790         * dse.c (record_store): Ignore zero width stores.
23792         PR sanitizer/85230
23793         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
23794         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
23795         __builtin_stack_restore rather than after it.
23796         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
23797         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
23798         argument instead of virtual_dynamic_stack_rtx.
23800 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
23802         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
23803         New prototype.
23804         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
23805         Add note to error message to explain internal mapping of overloaded
23806         built-in function name to non-overloaded built-in function name.
23807         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
23808         function.
23810 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
23812         PR target/85424
23813         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
23814         where the inputs overlap with the output.
23816 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
23818         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
23819         (=v, v) alternative and explicit "memory" attribute.
23820         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
23821         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
23822         attributes.
23823         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
23824         "sselog1" type instead of "sselog".
23825         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
23826         "sselog".  Remove explicit "memory" attribute.
23827         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
23828         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
23829         attributes.
23830         (vec_extract_hi_v32hi): Merge all alternatives into one, use
23831         "sselog1" type instead of "sselog".  Remove explicit "memory"
23832         attribute.
23833         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
23834         use "sselog1" type instead of "sselog".  Remove explicit "memory"
23835         attribute.
23836         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
23837         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
23838         attributes.
23839         (vec_extract_hi_v64qi): Merge all alternatives into one, use
23840         "sselog1" type instead of "sselog".  Remove explicit "memory"
23841         attribute.
23842         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
23843         use "sselog1" type instead of "sselog".  Remove explicit "memory"
23844         attribute.
23846         PR target/85430
23847         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
23849         PR middle-end/85414
23850         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
23851         on a SUBREG.
23853 2018-04-17  Martin Jambor  <mjambor@suse.cz>
23855         PR ipa/85421
23856         * ipa-cp.c (create_specialized_node): Call
23857         expand_all_artificial_thunks if necessary.
23859 2018-04-17  Martin Liska  <mliska@suse.cz>
23861         PR lto/85405
23862         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
23863         in message, remote space in between '_G' and '('.
23865 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
23867         PR target/85281
23868         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
23869         avx512f_vmcmp<mode>3<round_saeonly_name>,
23870         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
23871         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
23872         avx512f_rndscale<mode><round_saeonly_name>,
23873         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
23874         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
23875         Use %<iptr>2 instead of %2 for -masm=intel.
23876         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
23877         avx512f_vcvttss2usi<round_saeonly_name>,
23878         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
23879         -masm=intel.
23880         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
23881         avx512f_vcvttsd2usi<round_saeonly_name>,
23882         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
23883         Use %q1 instead of %1 for -masm=intel.
23884         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
23885         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
23886         of %3 for -masm=intel.
23887         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
23888         -masm=intel.
23889         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
23890         -masm=intel.
23891         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
23892         -masm=intel.
23893         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
23894         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
23895         %g1.
23896         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
23897         -masm=intel.
23898         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
23899         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
23900         %g1 and one with %0 and %1.
23901         (avx512er_vmrcp28<mode><round_saeonly_name>,
23902         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
23903         %1 for -masm=intel.
23904         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
23905         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
23906         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
23907         of %0 and %{%4%} for -masm=intel.
23908         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
23909         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
23910         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
23911         order of %0 and %{%5%}%{z%} for -masm=intel.
23913 2018-04-17  Jan Hubicka  <jh@suse.cz>
23915         PR lto/85405
23916         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
23918 2018-04-17  Martin Liska  <mliska@suse.cz>
23920         PR ipa/85329
23921         * multiple_target.c (create_dispatcher_calls): Set apostrophes
23922         for target_clone error message.  Make default implementation
23923         clone to be a local declaration.
23924         (separate_attrs): Add new argument and check for an empty
23925         string.
23926         (expand_target_clones): Handle it.
23927         (ipa_target_clone): Make redirection just for target_clones
23928         functions.
23930 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
23931             Tom de Vries  <tom@codesourcery.com>
23933         PR middle-end/84955
23934         * omp-expand.c (expand_oacc_for): Add dummy false branch for
23935         tiled basic blocks without omp continue statements.
23937 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
23939         PR target/83660
23940         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
23941         vec_extract expression as having side effects to make sure it gets
23942         a cleanup point.
23944 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
23946         PR target/85403
23947         * config/i386/i386.c (get_builtin_code_for_version): Check
23948         error_mark_node.
23950 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
23952         PR target/84331
23953         * config.gcc: Support "skylake".
23954         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
23955         PROCESSOR_SKYLAKE.
23956         * config/i386/i386.c (m_SKYLAKE): Define.
23957         (processor_target_table): Add "skylake".
23958         (ix86_option_override_internal): Add "skylake".
23959         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
23960         PROCESSOR_CANNONLAKE.
23961         (get_builtin_code_for_version): Fix priority for
23962         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
23963         PROCESSOR_SKYLAKE-AVX512.
23964         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
23965         (processor_type): Add PROCESSOR_SKYLAKE.
23967 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
23968             Jason Merrill  <jason@redhat.com>
23970         PR c++/85112
23971         * convert.c (convert_to_integer_1): Use direct recursion for
23972         enumeral types and types with a precision less than the number
23973         of bits in their mode.
23975 2018-04-16  Julia Koval  <julia.koval@intel.com>
23977         PR target/84413
23978         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
23979         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
23981 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
23983         PR target/85293
23984         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
23985         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
23986         and -mno-direct-move.
23988 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
23990         PR target/83402
23991         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
23992         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
23993         Ensure negative shifts result in {0}.
23995 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
23997         PR rtl-optimization/79916
23998         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
23999         regs (if any) to define how to gnerate SD moves when LRA is in
24000         progress.
24002 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
24004         PR rtl-optimization/85393
24005         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
24006         * except.c (expand_dw2_landing_pad_for_region): Make static.
24007         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
24008         a label and unconditional jump to old_bb, rather than
24009         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
24010         basic block.
24012         PR rtl-optimization/85376
24013         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
24014         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
24015         instead of a specific value.
24017 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
24018             Bin Cheng  <bin.cheng@arm.com>
24020         PR tree-optimization/82965
24021         PR tree-optimization/83991
24022         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
24023         by_profile_only parameter.
24024         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
24025         information if the loop was predicted to iterate too many times.
24026         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
24028 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
24030         PR lto/71991
24031         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
24032         always inline.
24034 2018-04-13  Martin Liska  <mliska@suse.cz>
24035             Jakub Jelinek  <jakub@redhat.com>
24037         PR middle-end/81657
24038         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
24039         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
24040         * builtins.c (expand_builtin_memory_copy_args): Use
24041         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
24042         handle dest_addr == pc_rtx.
24044 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
24046         PR target/85291
24047         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
24048         asked to not generate direct moves.
24049         (fix_trunc<mode>si2_stfiwx): Similar.
24050         (fix_trunc<mode>si2_internal): Similar.
24052 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
24054         PR debug/83157
24055         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
24056         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
24057         lookup if dest in some wider mode is known to be const0_rtx and
24058         if so, record permanent equivalence for it to be ZERO_EXTEND of
24059         the narrower mode destination.
24061 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
24063         * lto-streamer-out.c (output_function): Revert 259346.
24064         * omp-expand.c (expand_oacc_for): Likewise.
24066 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
24068         PR rtl-optimization/85354
24069         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
24070         * sel-sched.c (sel_global_init): ... here.
24072 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
24074         PR target/85238
24075         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
24076         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
24077         mode for PE-COFF targets.
24078         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
24079         (i386_pe_asm_lto_end): Likewise.
24080         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
24081         (TARGET_ASM_LTO_END): Likewise.
24082         * config/i386/winnt.c (saved_debug_info_level): New static variable.
24083         (i386_pe_asm_lto_start): New function.
24084         (i386_pe_asm_lto_end): Likewise.
24086 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
24087             Richard Biener  <rguenther@suse.de>
24089         PR middle-end/84955
24090         * lto-streamer-out.c (output_function): Fix CFG loop state before
24091         streaming out.
24092         * omp-expand.c (expand_oacc_for): Handle calls to internal
24093         functions like regular functions.
24095 2018-04-12  Richard Biener  <rguenther@suse.de>
24097         PR lto/85371
24098         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
24099         for the early LTO debug to properly generate references to it
24100         during DIE emission.  Do not re-use that for the skeleton for
24101         split-dwarf.
24102         (dwarf2out_early_finish): Likewise.
24104 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
24106         PR target/85328
24107         * config/i386/sse.md
24108         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
24109         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
24110         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
24111         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
24112         and output is a reg, avoid creating invalid lowpart subreg, but
24113         instead split into a 512-bit move.  Don't split if not AVX512VL,
24114         input is xmm16+ reg and output is a mem.
24115         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
24116         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
24117         xmm16+ reg and output is a mem.
24119 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24121         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
24122         also for flag_dwarf2_cfi_asm.
24124 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
24126         PR rtl-optimization/85342
24127         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
24128         a bool scalar var inside of the loop instead.  Don't try to update
24129         recog_data.operand after failed apply_change_group.
24131 2018-04-12  Tom de Vries  <tom@codesourcery.com>
24133         PR target/85296
24134         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
24135         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
24136         array with flexible array member as array without given dimension.
24137         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
24138         argument for undefined param to true.
24140 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
24142         PR target/85321
24143         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
24144         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
24145         from PowerPC section.
24146         * config/rs6000/sysv4.opt (mcall-): Improve help text.
24147         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
24148         help text that is too long.
24149         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
24150         help text that is too long.
24151         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
24152         help text that is too long.
24154 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
24156         * config/alpha/alpha.md (stack_probe_internal): Rename
24157         from "probe_stack".  Update all callers.
24159 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
24161         PR rtl-optimization/84566
24162         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
24163         sched_macro_fuse_insns.
24165 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
24167         PR target/84301
24168         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
24169         (compute_block_dependences): ... from here.
24171 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
24173         PR tree-optimization/85331
24174         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
24175         from int to HOST_WIDE_INT.
24177 2018-04-11  Martin Jambor  <mjambor@suse.cz>
24179         PR ipa/84149
24180         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
24181         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
24182         not the same as the source val.
24183         (cgraph_edge_brings_value_p): New parameter.
24184         (gather_edges_for_value): Pass destination value to
24185         cgraph_edge_brings_value_p.
24186         (perhaps_add_new_callers): Likewise.
24187         (get_info_about_necessary_edges): Likewise and exclude values brought
24188         only by self-recursive edges.
24189         (create_specialized_node): Redirect only clones of self-calling edges.
24190         (+self_recursive_pass_through_p): New function.
24191         (find_more_scalar_values_for_callers_subset): Use it.
24192         (find_aggregate_values_for_callers_subset): Likewise.
24193         (known_aggs_to_agg_replacement_list): Removed.
24194         (decide_whether_version_node): Re-calculate known constants for all
24195         remaining context clones.
24197 2018-04-11  Richard Biener  <rguenther@suse.de>
24199         PR lto/85339
24200         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
24201         from early DWARF output.
24202         (dwarf2out_early_finish): Output line info unconditionally into
24203         early DWARF and add reference to it.
24205 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
24207         PR target/85281
24208         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
24209         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
24210         other than V2DFmode using iptr mode attribute.
24211         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
24213 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
24215         PR rtl-optimization/84659
24216         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
24218 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
24220         PR debug/85302
24221         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
24222         SIZEP is NULL.
24223         (output_loc_list): Pass address of a dummy size variable even in the
24224         locview handling loop.
24225         (index_location_lists): Add comment on why skip_loc_list_entry can't
24226         call size_of_locs.
24228 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
24230         PR target/85261
24231         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
24232         into register.
24234 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
24236         PR target/85321
24237         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
24238         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
24239         and -mstring-compare-inline-limit.
24241 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
24243         PR target/85287
24244         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
24245         for stack clash protection in a register whenever we need it to be in
24246         a register.
24248 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
24250         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
24251         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
24253 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
24255         PR target/85321
24256         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
24257         the help text.
24258         (mlong-double-): Ditto.
24259         * config/rs6000/sysv4.opt (msdata=): Ditto.
24260         (mtls-size=): Ditto.
24262 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
24264         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
24265         erroneous entries for
24266         "vector int vec_ldl (int, long int *)", and
24267         "vector unsigned int vec_ldl (int, unsigned long int *)".
24268         Add comments and entries for
24269         "vector bool char vec_ldl (int, bool char *)",
24270         "vector bool short vec_ldl (int, bool short *)",
24271         "vector bool int vec_ldl (int, bool int *)",
24272         "vector bool long long vec_ldl (int, bool long long *)",
24273         "vector pixel vec_ldl (int, pixel *)",
24274         "vector long long vec_ldl (int, long long *)",
24275         "vector unsigned long long vec_ldl (int, unsigned long long *)".
24276         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
24277         type tree bool_long_long_type_node and correct definition of
24278         bool_V2DI_type_node to make reference to this new type tree.
24279         (rs6000_mangle_type): Replace erroneous reference to
24280         bool_long_type_node with bool_long_long_type_node.
24281         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
24282         comments to emphasize sign distinctions for char and int types and
24283         replace RS6000_BTI_bool_long constant with
24284         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
24285         use of RS6000_BTI_pixel.
24286         (bool_long_type_node): Remove this macro definition.
24287         (bool_long_long_type_node): New macro definition
24289 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
24291         PR rtl-optimization/85300
24292         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
24293         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
24294         simplify_unary_operation fails.
24296 2018-04-10  Martin Liska  <mliska@suse.cz>
24298         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
24299         cgraph_edge and ipa_ref.
24301 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
24303         PR target/85177
24304         PR target/85255
24305         * config/i386/sse.md
24306         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
24307         computation of the VEC_MERGE selector from mask.
24308         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
24309         Fix decoding of the VEC_MERGE selector into mask.
24311 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
24313         PR tree-optimization/85286
24314         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
24316 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
24318         * final.c (final_1): Set insn_last_address as well as
24319         insn_current_address.
24321 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24323         PR target/85173
24324         * explow.c (emit_stack_probe): Call validize_mem on memory location
24325         before passing it to gen_probe_stack.  Create address operand and
24326         legitimize it for the probe_stack_address case.
24328 2018-04-09  Jan Hubicka  <jh@suse.cz>
24330         PR lto/85078
24331         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
24332         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
24333         * tree.c (free_lang_data_in_type): Fix handling of binfos;
24334         walk basetypes.
24335         (free_lang_data): Rebuild type inheritance graph.
24337 2018-04-09  Martin Sebor  <msebor@redhat.com>
24339         * invoke.texi (-finline-small-functions): Mention other optimization
24340         options.
24341         (-findirect-inlining, -fpartial-inlining): Same.
24342         (-finline-functions-called-once): Same.
24343         (-freorder-blocks-and-partition): Same.
24345 2018-04-09  Jan Hubicka  <jh@suse.cz>
24347         PR rtl/84058
24348         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
24349         jumps; choose last target that matches the criteria (i.e.
24350         no partition changes for non-crossing jumps).
24351         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
24352         support for redirecting crossing jumps to non-crossing.
24354 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
24356         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
24357         also for naked functions.
24359 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
24361         * config/arc/arc.md (add_shift): New pattern.
24362         (add_shift2): Likewise.
24363         (sub_shift): Likewise.
24364         (sub_shift_cmp0_noout): Likewise.
24365         (compare_si_ashiftsi): Likewise.
24366         (xbfu_cmp0_noout): New combine pattern.
24367         (xbfu_cmp0"): Likewise.
24368         (movsi_set_cc_insn): Place the predicable variant first.
24369         (commutative_binary_cmp0_noout): Remove clobber.
24370         (commutative_binary_cmp0): New pattern.
24371         (noncommutative_binary_cmp0): Likewise.
24372         (noncommutative_binary_cmp0_noout): Likewise.
24373         (noncommutative_binary_comparison_result_used): Removed.
24374         (rsub_cmp0): New pattern.
24375         (rsub_cmp0_noout): Likewise.
24376         (extzvsi): Changed, keep only meaningful variants.
24377         (SQH, SEZ): New iterators.
24378         (SQH_postfix): New mode attribute.
24379         (SEZ_prefix): New code attribute.
24380         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
24381         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
24382         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
24383         of numerical value.
24384         (noncommutative_operator): Check the availability of barrel
24385         shifter option.
24387 2018-04-09  Richard Biener  <rguenther@suse.de>
24389         PR tree-optimization/85284
24390         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
24391         Only use the niter constraining form of simple_iv when the exit
24392         is always executed.
24394 2018-04-09  Tom de Vries  <tom@codesourcery.com>
24396         PR target/84041
24397         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
24398         (define_expand "*memory_barrier"): New define_expand.
24399         (define_insn "memory_barrier"): New insn.
24401 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
24403         PR rtl-optimization/80463
24404         PR rtl-optimization/83972
24405         PR rtl-optimization/83480
24407         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
24408         correct producer for the insn.
24409         (tidy_control_flow): Fixup seqnos in case of debug insns.
24411 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
24413         PR rtl-optimization/83913
24415         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
24416         different sched-times when merging exprs.
24418 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
24420         PR rtl-optimization/83962
24422         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
24423         tidy_fallthru_edge and tidy_control_flow.
24425 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
24427         PR rtl-optimization/83530
24429         * sel-sched.c (force_next_insn): New global variable.
24430         (remove_insn_for_debug): When force_next_insn is true, also leave only
24431         next insn in the ready list.
24432         (sel_sched_region): When the region wasn't scheduled, make another pass
24433         over it with force_next_insn set to 1.
24435 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
24437         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
24438         into tm_file.
24439         * config/nds32/constants.md (unspec_volatile_element): Add enum values
24440         for interrupt control.
24441         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
24442         functions for interrupt control.
24443         * config/nds32/nds32-intrinsic.md: Likewise.
24444         * config/nds32/nds32_intrinsic.h: Likewise.
24445         * config/nds32/nds32.h (nds32_builtins): Likewise.
24447 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
24449         * config/nds32/nds32.c (nds32_init_machine_status,
24450         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
24451         strict_aligned_p field.
24452         (nds32_expand_to_rtl_hook): New function.
24453         (TARGET_EXPAND_TO_RTL_HOOK): Define.
24454         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
24456 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
24457             Chung-Ju Wu  <jasonwucj@gmail.com>
24459         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
24460         * config/nds32/nds32-n7.md: New file.
24461         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
24462         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
24463         pipeline.
24464         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
24465         * config/nds32/nds32.md (pipeline_model): Add n7.
24466         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
24467         * config/nds32/pipelines.md: Include n7 settings.
24469 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
24470             Chung-Ju Wu  <jasonwucj@gmail.com>
24472         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
24473         * config/nds32/nds32-e8.md: New file.
24474         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
24475         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
24476         pipeline.
24477         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
24478         * config/nds32/nds32.md (pipeline_model): Add e8.
24479         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
24480         * config/nds32/pipelines.md: Include e8 settings.
24482 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
24483             Chung-Ju Wu  <jasonwucj@gmail.com>
24485         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
24486         * config/nds32/nds32-n8.md: New file.
24487         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
24488         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
24489         pipeline.
24490         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
24491         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
24492         * config/nds32/nds32.md (pipeline_model): Add n8.
24493         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
24494         * config/nds32/pipelines.md: Include n8 settings.
24496 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
24497             Chung-Ju Wu  <jasonwucj@gmail.com>
24499         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
24500         * config/nds32/nds32-n9-2r1w.md: New file.
24501         * config/nds32/nds32-n9-3r2w.md: New file.
24502         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
24503         nds32_register_ports): New or modify for cpu n9.
24504         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
24505         pipeline.
24506         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
24507         * config/nds32/nds32-utils.c: New file.
24508         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
24509         TARGET_MUL_SLOW): Define.
24510         * config/nds32/nds32.md (pipeline_model): New attribute.
24511         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
24512         New options that support cpu n9.
24513         * config/nds32/pipelines.md: Include n9 settings.
24514         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
24516 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
24518         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
24519         information if necessary.
24520         (output_cond_branch_compare_zero): Likewise.
24521         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
24522         (nds32_target_alignment): Refine for alignment.
24523         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
24524         (FUNCTION_BOUNDARY): Modify.
24525         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
24526         align case.
24527         * config/nds32/nds32.opt (malways-align, malign-functions): New.
24529 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
24531         * config/nds32/constants.md (unspec_volatile_element): Add values for
24532         TLB operation and data prefetch.
24533         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
24534         functions for TLB operation and data prefetch.
24535         * config/nds32/nds32-intrinsic.md: Likewise.
24536         * config/nds32/nds32_intrinsic.h: Likewise.
24537         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
24538         (nds32_print_operand): Likewise.
24539         * config/nds32/nds32.h (nds32_builtins): Likewise.
24541 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
24542         Andrew Pinski <pinsika@gcc.gnu.org>
24544         PR middle-end/82976
24545         * match.pd: Use constant_boolean_node of correct type instead of
24546         boolean_true_node or boolean_false_node for simplifying
24547         pointer comparisons to zero.
24549 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
24551         PR tree-optimization/80021
24552         * tree.c (verify_type_variant): Make error call in verify_variant_match
24553         translatable and remove final full stop.
24555 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
24557         * config/nds32/constants.md (unspec_volatile_element): Add
24558         UNSPEC_VOLATILE_EH_RETURN.
24559         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
24560         nds32_output_stack_pop): Support dwarf exception handling process.
24561         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
24562         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
24563         exception handling process.
24564         (nds32_compute_stack_frame): Likewise.
24565         (nds32_return_addr_rtx): Likewise.
24566         (nds32_initial_elimination_offset): Likewise.
24567         (nds32_expand_prologue): Likewise.
24568         (nds32_expand_epilogue): Likewise.
24569         (nds32_dynamic_chain_address): New function.
24570         * config/nds32/nds32.h (machine_function): Add fields for dwarf
24571         exception handling.
24572         (DYNAMIC_CHAIN_ADDRESS): Define.
24573         (EH_RETURN_DATA_REGNO): Define.
24574         (EH_RETURN_STACKADJ_RTX): Define.
24575         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
24576         patterns for dwarf exception handling.
24578 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
24580         * config/nds32/nds32.h: Clean up obsolete macros.
24582 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
24584         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
24585         Add enum values for particular instructions.
24586         * config/nds32/nds32-intrinsic.c: Implementation of expanding
24587         particular intrinsic functions.
24588         * config/nds32/nds32-intrinsic.md: Likewise.
24589         * config/nds32/nds32_intrinsic.h: Likewise.
24590         * config/nds32/nds32.h (nds32_builtins): Likewise.
24591         * config/nds32/nds32.md (type): Add pbsad and pbsada.
24592         (btst, ave): New patterns for particular instructions.
24594 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
24596         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
24597         Add enum values for atomic load/store and memory sync.
24598         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
24599         and memory sync.
24600         * config/nds32/nds32-intrinsic.md: Likewise.
24601         * config/nds32/nds32_intrinsic.h: Likewise.
24602         * config/nds32/nds32.h (nds32_builtins): Likewise.
24604 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
24606         PR tree-optimization/85257
24607         * fold-const.c (native_encode_vector): If not all elts could fit
24608         and off is -1, return 0 rather than offset.
24609         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
24610         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
24611         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
24612         adjust buffer in native_interpret_expr call.
24614 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
24616         * config/nds32/constants.md (unspec_volatile_element): Add cache
24617         control enum values.
24618         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
24619         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
24620         * config/nds32/nds32.c (nds32_cctl_names): New.
24621         (nds32_print_operand): Handle cache control register names.
24622         * config/nds32/nds32.h (nds32_builtins): New enum values.
24623         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
24624         macros.
24625         * config/nds32/nds32.md (type): Add mmu.
24626         * config/nds32/pipelines.md (simple_insn): Add mmu.
24628 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
24630         * config/nds32/nds32.md (type): Remove call.
24631         * config/nds32/pipelines.md (simple_insn): Likewise.
24633 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
24635         * config/nds32/constants.md (unspec_volatile_element): Add
24636         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
24637         UNSPEC_VOLATILE_FMFCFG.
24638         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
24639         description for fmfcfg and fmfcsr.
24640         (bdesc_1arg): Add fmtcsr.
24641         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
24642         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
24643         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
24644         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
24645         unspec_fmfcfg): New patterns.
24646         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
24647         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
24648         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
24649         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
24650         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
24651         __nds32__fmfcfg): Define.
24653 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
24655         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
24656         intrinsic register names.
24657         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
24658         intrinsic register enum values and macros.
24660 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
24662         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
24663         for load/store addressing form.
24664         (nds32_print_operand_address): Likewise.
24666 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
24668         PR target/85196
24669         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
24670         based on LABEL_REF.  Remove useless assertion.
24671         (pic_address_needs_scratch): Fix formatting.
24672         (sparc_legitimize_pic_address): Minor tweaks.
24673         (sparc_delegitimize_address): Adjust assertion accordingly.
24674         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
24675         into symbolic_operand.
24676         (movsi_high_pic_label_ref): Likewise.
24677         (movsi_lo_sum_pic_label_ref): Likewise.
24678         (movdi_pic_label_ref): Likewise.
24679         (movdi_high_pic_label_ref): Likewise.
24680         (movdi_lo_sum_pic_label_ref): Likewise.
24682 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
24684         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
24685         custom LIB_SPEC setup.
24687 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
24688             Kito Cheng  <kito.cheng@gmail.com>
24690         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
24691         * config/riscv/freebsd.h: New.
24693 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
24695         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
24696         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
24697         file.
24699 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
24700             Kito Cheng  <kito.cheng@gmail.com>
24702         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
24703         nds32_output_call, nds32_symbol_binds_local_p): New functions.
24704         * config/nds32/nds32-protos.h (nds32_output_call,
24705         nds32_output_return): Declare.
24706         * config/nds32/nds32.md: Refine all the call and return patterns.
24708 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
24710         PR debug/85252
24711         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
24712         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
24714         PR rtl-optimization/84872
24715         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
24716         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
24717         EDGE_CROSSING edge.
24719 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
24721         * expr.c (copy_blkmode_to_reg): Revert 254862.
24722         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
24724 2018-04-06  Richard Biener  <rguenther@suse.de>
24726         PR middle-end/85244
24727         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
24728         after seeing a component reference with an adjacent field.  Treat
24729         refs to arrays at struct end of external decls similar to
24730         refs to unconstrained commons.
24732 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
24734         PR sanitizer/85213
24735         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
24736         look through SAVE_EXPRs with non-side-effects argument.  Adjust
24737         recursive calls.
24738         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
24739         save_p here.
24741 2018-04-06  Richard Biener  <rguenther@suse.de>
24743         PR middle-end/85180
24744         * alias.c (find_base_term): New wrapper around find_base_term
24745         unwinding CSELIB_VAL_PTR changes.
24746         (find_base_term): Do not restore CSELIB_VAL_PTR during the
24747         recursion.
24749 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24751         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
24752         instructions.
24753         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
24754         constant definitions.
24755         ("nop"): lr 0,0 -> nopr r0
24756         ("nop_lr0", "nop_lr1"): New insn definitions.
24758 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
24760         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
24761         NDS32_V3PUSH_AVAILABLE_P macro.
24763 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
24764             Chung-Ju Wu  <jasonwucj@gmail.com>
24766         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
24767         (nds32*-*-*): Add float and fpu_config into supported_defaults.
24768         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
24769         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
24770         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
24771         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
24772         * config/nds32/constraints.md: New constraints and checking for hard
24773         float configuration.
24774         * config/nds32/iterators.md: New mode iterator and attribute for hard
24775         float configuration.
24776         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
24777         patterns.
24778         * config/nds32/nds32-fpu.md: New file.
24779         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
24780         deal with hard float code generation.
24781         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
24782         ARCH_V3S.
24783         (abi_type, float_reg_number): New enum type.
24784         * config/nds32/nds32-predicates.c: New predicates for hard float.
24785         * config/nds32/nds32-protos.h: Declare functions for hard float.
24786         * config/nds32/nds32.c: Implementation for hard float configuration.
24787         * config/nds32/nds32.h: Definitions for hard float configuration.
24788         * config/nds32/nds32.md: Include hard float machine description and
24789         modify patterns for hard float configuration.
24790         * config/nds32/nds32.opt: New options for hard float configuration.
24791         * config/nds32/predicates.md: New predicates for hard float
24792         configuration.
24794 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
24796         * common/config/nds32/nds32-common.c
24797         (nds32_option_optimization_table): Enable -mreleax-hint by default.
24799 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
24801         PR middle-end/85195
24802         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
24803         CONSTRUCTOR_ELT (ctor, ...)->value.
24805 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
24807         PR target/85193
24808         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
24810 2018-04-05  Tom de Vries  <tom@codesourcery.com>
24812         PR target/85204
24813         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
24814         cond jump.
24816 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
24817             Kito Cheng  <kito.cheng@gmail.com>
24819         * config/nds32/constraints.md (U33): Fine-tune checking condition.
24820         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
24821         * config/nds32/nds32.h (nds32_16bit_address_type): Add
24822         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
24824 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
24825             Kito Cheng  <kito.cheng@gmail.com>
24827         * config/nds32/constraints.md (Ufe): New memory constraint.
24828         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
24829         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
24830         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
24831         operands.
24832         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
24833         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
24835 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
24837         * config/nds32/nds32.md: Use optimize_size in the condition for
24838         alu-shift instructions.
24840 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
24842         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
24844 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
24846         * config/nds32/nds32.md (negsi2): Refine pattern.
24848 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
24849             Chung-Ju Wu  <jasonwucj@gmail.com>
24851         * config/nds32/iterators.md (shift_rotate): New code iterator.
24852         (shift): New code attribute.
24853         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
24854         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
24855         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
24856         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
24857         bit-wise operations.
24858         (andsi3, *andsi3): Ditto.
24859         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
24860         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
24861         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
24862         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
24863         nds32_ior_operand, nds32_xor_operand): New predicates.
24865 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
24867         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
24868         (addsi3, subsi3): ... this.
24870 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
24872         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
24874 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
24876         * config/nds32/nds32.md: Adjust indention.
24878 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
24880         * config/nds32/nds32.md (feature): New attribute.
24882 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
24884         * config/nds32/nds32.md (subtype): New attribute.
24886 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
24888         PR target/85203
24889         * config/arm/arm-builtins.c (arm_expand_builtin): Change
24890         expansion to perform a bitwise AND of the argument followed by a
24891         boolean negation of the result.
24893 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
24895         PR rtl-optimization/84878
24896         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
24897         the basic block.  Assert the use reference is not artificial and that
24898         it has an associated insn.
24900 2018-04-04  Michael Matz  <matz@suse.de>
24902         * builtins.c (compute_objsize): Pass correct operand
24903         to array_at_struct_end_p.
24905 2018-04-04  Richard Biener  <rguenther@suse.de>
24907         PR lto/85176
24908         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
24909         from contexts for DINFO_LEVEL_TERSE and below.
24911 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
24913         * config/nds32/nds32-doubleword.md (move_<mode>): Require
24914         resiter_operand condition.
24915         * config/nds32/nds32.md (*move<mode>): Ditto.
24917 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
24918             Monk Chiang  <sh.chiang04@gmail.com>
24920         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
24922 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
24924         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
24926 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
24927             Kito Cheng  <kito.cheng@gmail.com>
24929         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
24930         nds32_cond_code_str, output_cond_branch,
24931         output_cond_branch_compare_zero, nds32_expand_cbranch,
24932         nds32_expand_cstore, nds32_expand_movcc,
24933         nds32_output_cbranchsi4_equality_zero,
24934         nds32_output_cbranchsi4_equality_reg,
24935         nds32_output_cbranchsi4_equality_reg_or_const_int,
24936         nds32_output_cbranchsi4_greater_less_zero: New functions.
24937         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
24938         nds32_expand_cstore, nds32_expand_movcc,
24939         nds32_output_cbranchsi4_equality_zero,
24940         nds32_output_cbranchsi4_equality_reg,
24941         nds32_output_cbranchsi4_equality_reg_or_const_int,
24942         nds32_output_cbranchsi4_greater_less_zero): Declare.
24943         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
24944         nds32_rimm11s_operand): New predicates.
24945         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
24946         * config/nds32/nds32.md: Rewrite all the branch and conditional move
24947         patterns.
24949 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
24951         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
24952         * config/nds32/nds32.md: Ditto.
24953         * config/nds32/pipelines.md: Ditto.
24955 2018-04-04  Richard Biener  <rguenther@suse.de>
24957         PR tree-optimization/85168
24958         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
24959         propagating abnormals.
24961 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
24963         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
24965 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
24966             Kito Cheng  <kito.cheng@gmail.com>
24968         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
24969         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
24970         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
24971         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
24972         * config/nds32/nds32.md (sibcall_internal): New.
24973         (sibcall_register): Remove.
24974         (sibcall_immediate): Remove.
24975         (sibcall_value_internal): New.
24976         (sibcall_value_register): Remove.
24977         (sibcall_value_immediate): Remove.
24978         * config/nds32/predicates.md (nds32_general_register_operand): New.
24979         (nds32_call_address_operand): New.
24981 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
24983         PR rtl-optimization/85167
24984         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
24985         bb_defs if *split_p, instead preinitialize it to NULL.
24987         PR tree-optimization/85156
24988         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
24989         evaluating the argument multiple times.
24991 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
24993         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
24994         than vector.
24995         (_mm_cvtpd_ps): Likewise.
24996         (_mm_cvttpd_epi32): Likewise.
24997         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
24998         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
24999         vector, pixel, and bool following altivec.h include.
25001 2018-04-03  Martin Sebor  <msebor@redhat.com>
25003         * doc/extend.texi (Common Function Attributes): Clarify.
25004         (const attribute): Likewise.
25005         (pure attribute): Likewise.
25007 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
25009         PR target/85169
25010         * config/i386/i386.c (ix86_expand_vector_set): Use
25011         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
25013 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
25015         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
25016         instructions when changing rounding bits to preserve precision bits
25017         in the x87 control word.
25019 2018-04-03  Martin Liska  <mliska@suse.cz>
25021         PR tree-optimization/82491
25022         * rtl.h (strip_offset_and_add): Replace += suboffset with
25023         poly_uint64 () + suboffset.
25025 2018-03-29  Martin Liska  <mliska@suse.cz>
25026             Martin Jambor  <mjambor@suse.cz>
25028         PR ipa/84947
25029         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
25030         param_type is not an integral or pointer type.
25032 2018-04-03  Richard Biener  <rguenther@suse.de>
25034         * sese.h (recompute_all_dominators): Remove.
25036 2018-04-02  Martin Sebor  <msebor@redhat.com>
25038         * doc/invoke.texi (-Wrestrict): Fix typos.
25040 2018-04-02  Jim Wilson  <jimw@sifive.com>
25042         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
25043         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
25044         (<optab>di3, <optab>si3_extend): Likewise.
25045         (<optab>si3_mask, <optab>si3_mask_1): New.
25046         (<optab>di3_mask, <optab>di3_mask_1): New.
25047         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
25048         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
25049         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
25051 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
25053         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
25054         example.
25056 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
25058         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
25059         (nds32_canonicalize_comparison): New function.
25061 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
25062             Kito Cheng  <kito.cheng@gmail.com>
25063             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
25065         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
25066         * config/nds32/constants.md (unspec_volatile_element): Add
25067         UNSPEC_VOLATILE_RELAX_GROUP.
25068         * config/nds32/nds32-relax-opt.c: New file.
25069         * config/nds32/nds32-predicates.c
25070         (nds32_symbol_load_store_p): New function.
25071         * config/nds32/nds32-protos.h
25072         (nds32_symbol_load_store_p): Declare function.
25073         (make_pass_nds32_relax_opt): Declare new rtl pass function.
25074         * config/nds32/nds32.c
25075         (nds32_register_pass): New function to register pass.
25076         (nds32_register_passes): New function to register passes.
25077         * config/nds32/nds32.md (relax_group): New pattern.
25078         * config/nds32/nds32.opt (mrelax-hint): New option.
25079         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
25081 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
25083         * config/nds32/t-nds32: Modify files dependency.
25085 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
25087         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
25088         (PROFILE_HOOK): Define its implementation.
25090 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
25092         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
25093         type and 32-bit size.
25095 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
25097         PR middle-end/85090
25098         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
25099         (V_128_256): New mode iterator.
25100         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
25101         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
25102         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
25103         of V.
25104         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
25105         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
25107 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
25109         PR target/83315
25110         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
25111         NaN inputs correctly.
25113 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
25115         PR target/80546
25116         * config/rs6000/vsx.md (??r): New mode attribute.
25117         (*vsx_mov<mode>_64bit): Use it.
25118         (*vsx_mov<mode>_32bit): Likewise.
25120 2018-03-30  Martin Sebor  <msebor@redhat.com>
25122         PR tree-optimization/84818
25123         * builtins.c (check_access): Use warning_n.
25125 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
25127         PR target/83822
25128         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
25129         condition.
25130         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
25131         condition.
25133 2018-03-30  Julia Koval  <julia.koval@intel.com>
25135         PR target/84413
25136         * x86-tune.def (movx, partial_reg_dependency): Enable for
25137         m_SKYLAKE_AVX512.
25139 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
25141         PR inline-asm/84985
25142         * lra-constraints.c (process_alt_operands): Move setting
25143         this_alternative_matches below.
25145 2018-03-29  Martin Liska  <mliska@suse.cz>
25147         PR lto/84995.
25148         * doc/invoke.texi: Document how LTO works with debug info.
25149         Describe auto-load support of binutils.  Mention 'x86-64'
25150         as valid option value of -march option.
25152 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
25154         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
25156         PR c/85094
25157         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
25158         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
25159         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
25160         checking.
25162 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
25164         PR target/84912
25165         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
25166         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
25167         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
25168         for RS6000_BTM_POWERPC64.
25169         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
25170         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
25171         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
25172         definition.
25173         (DIVDE): Use it.
25174         (DIVDEU): Likewise.
25176 2018-03-28  Carl Love  <cel@us.ibm.com>
25178         Revert
25179         2017-09-27  Carl Love  <cel@us.ibm.com>
25181         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
25182         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
25183         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
25184         fctiw instruction.
25186 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25188         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
25189         instead of __vector bool.
25190         (_mm_max_pu8): Likewise.
25191         (_mm_min_pi16): Likewise.
25193 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
25195         PR target/84912
25196         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
25197         (DIVWEUO): Likewise.
25198         (DIVDEO): Likewise.
25199         (DIVDEUO): Likewise.
25200         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
25201         DIVWEUO and DIVDEUO.
25202         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
25203         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
25204         (div_extend): Likewise.
25205         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
25206         builtin function.
25207         (__builtin_divweuo): Likewise.
25208         (__builtin_divdeo): Likewise.
25209         (__builtin_divdeuo): Likewise.
25211 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
25213         PR target/85095
25214         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
25215         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
25217         PR tree-optimization/82004
25218         * gimple-match-head.c (optimize_pow_to_exp): New function.
25219         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
25220         Don't fold to exp if optimize_pow_to_exp is false.
25222 2018-03-28  Martin Liska  <mliska@suse.cz>
25224         PR other/84819
25225         * calls.c (initialize_argument_information): Fix trailing space.
25226         * common.opt: Fix typo and provide better explanation for
25227         -fsanitize-coverage option.
25228         * config/i386/i386.opt: Fix typo.
25230 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
25231             Martin Liska  <mliska@suse.cz>
25233         PR sanitizer/85081
25234         * gimplify.c (asan_poison_variable): Don't do the check for
25235         gimplify_omp_ctxp here.
25236         (gimplify_decl_expr): Do it here.
25237         (gimplify_target_expr): Likewise.
25239 2018-03-28  Martin Liska  <mliska@suse.cz>
25241         PR target/84988
25242         * config/i386/i386.c (ix86_function_arg_advance): Do not call
25243         chkp_type_bounds_count if MPX is not enabled.
25245 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
25247         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
25249 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
25251         PR target/84914
25252         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
25253         function to create the function decl for complex long double
25254         multiply and divide for -mabi=ieeelongdouble.
25255         (init_float128_ieee): Call it.
25257 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
25259         PR target/85044
25260         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
25261         -fcf-protection=branch -mibt.
25262         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
25264 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
25266         PR target/81863
25267         * config/arm/arm.c (arm_valid_symbolic_address): Handle
25268         arm_word_relocations.
25270 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
25272         PR target/85056
25273         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
25274         extern array declarations.
25276 2018-03-27  Richard Biener  <rguenther@suse.de>
25278         PR middle-end/84067
25279         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
25280         explicit single_use checks.
25282 2018-03-27  Richard Biener  <rguenther@suse.de>
25284         PR tree-optimization/85082
25285         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
25286         Valueize the VUSE.
25288 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
25290         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
25291         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
25292         Turn on fasynchronous-unwind-tables and funwind-tables.
25294 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
25296         PR target/85073
25297         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
25298         (*bmi_blsr_<mode>_ccz): Ditto.
25300 2018-03-26  Tom de Vries  <tom@codesourcery.com>
25302         PR tree-optimization/85063
25303         * omp-general.c (offloading_function_p): New function.  Factor out
25304         of ...
25305         * omp-offload.c (pass_omp_target_link::gate): ... here.
25306         * omp-general.h (offloading_function_p): Declare.
25307         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
25308         with attribute omp declare target for offloading functions.
25310 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
25312         PR tree-optimization/84005
25313         * tree-data-ref.h (get_base_for_alignment): Declare.
25314         * tree-data-ref.c (get_base_for_alignment_1): New function.
25315         (get_base_for_alignment): Likewise.
25316         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
25317         get_base_for_alignment to find a suitable base object, instead
25318         of always using drb->base_address.
25320 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
25322         PR inline-asm/85022
25323         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
25324         known size by default.
25326 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
25328         PR inline-asm/85030
25329         * lra-constraints.c (process_alt_operands): Don't match BLKmode
25330         and non BLKmode operands.
25332 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25334         PR target/85026
25335         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
25336         Clean up attributes.
25338 2018-03-23  Richard Biener  <rguenther@suse.de>
25340         PR debug/85020
25341         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
25342         we are going to emit early debug for LTO.
25344 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
25346         PR inline-asm/85034
25347         * function.c (match_asm_constraints_1): Don't optimize if input
25348         doesn't satisfy general_operand predicate for output's mode.
25350         PR inline-asm/85022
25351         * alias.c (write_dependence_p): Don't require for x_canonicalized
25352         non-VOIDmode if x has VOIDmode.
25354         PR sanitizer/85029
25355         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
25356         just don't try to optimize it rather than assert it never happens.
25358 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
25360         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
25361         macro expansions for definition of ST_INTERNAL_<mode> and
25362         LD_INTERNAL_<mode> builtins.
25363         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
25364         Remove prototype.
25365         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
25366         function.
25367         (altivec_expand_st_builtin): Likewise.
25368         (altivec_expand_builtin): Remove calls to deleted functions.
25369         (rs6000_address_for_altivec): Delete this function.
25370         * config/rs6000/vector.md: Remove expands for
25371         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
25373 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
25375         PR target/84826
25376         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
25377         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
25378         re-computing once computed.
25379         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
25380         (arm_init_machine_status): Initialize
25381         machine->static_chain_stack_bytes.
25383 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
25385         PR target/84760
25386         * doc/extend.texi: Add four new prototypes for vec_ld.
25387         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
25388         definitions for more logical presentation.
25389         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
25390         entries for V1TI variants of __builtin_altivec_ld builtin.
25391         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
25392         handling of V1TI variant of LVX icode pattern.
25393         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
25394         (rs6000_gimple_fold_builtin): Likewise.
25395         (altivec_init_builtins): Add code to define
25396         __builtin_altivec_lvx_v1ti function.
25398 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
25400         PR inline-asm/84941
25401         * function.c (match_asm_constraints_1): Don't do the optimization
25402         if input isn't a REG, SUBREG, MEM or constant.
25404 2018-03-22  Tom de Vries  <tom@codesourcery.com>
25406         PR tree-optimization/84956
25407         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
25408         bb_has_abnormal_pred.
25410 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
25412         PR sanitizer/85018
25413         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
25414         DECL_INITIAL (decl) to decl at the end.
25415         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
25416         adjust the comment.
25418 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
25420         * doc/extend.texi (__builtin_tgmath): Document when complex
25421         integer types are treated as _Complex _Float64.
25423 2018-03-21  Tom de Vries  <tom@codesourcery.com>
25425         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
25427 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
25429         PR tree-optimization/84960
25430         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
25431         if it is ENTRY block, move them into single succ of ENTRY in that case.
25433 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
25435         PR tree-optimization/84811
25436         * poly-int.h (poly_span_traits): Remove the T3 parameter and
25437         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
25438         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
25439         (known_subrange_p): Update accordingly.  Cast each value involved
25440         in the size comparison, rather than casting the result of the
25441         subtraction.
25443 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
25445         PR tree-optimization/84982
25446         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
25447         by flipping the least significant bit rather than all bits from
25448         bitpos to bitpos + bitsize - 1.
25450 2018-03-21  Nathan Sidwell  <nathan@acm.org>
25452         * doc/extend.texi (Deprecated Features): Remove mention of
25453         long-deleted deprecations.
25455 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
25457         PR jit/84288
25458         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
25459         * configure: Regenerate.
25461 2018-03-21  Tom de Vries  <tom@codesourcery.com>
25463         PR tree-optimization/83126
25464         * tree-parloops.c (num_phis): New function.
25465         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
25467 2018-03-21  Nathan Sidwell  <nathan@acm.org>
25469         * doc/extend.texi (Deprecated Features): Update deprecated flags,
25470         mention anon-struct/union members and trailing attributes.
25472 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
25474         PR tree-optimization/84969
25475         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
25476         builtin memset partitions if they set different rhs values.
25478 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
25480         PR rtl-optimization/84989
25481         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
25482         VEC_DUPLICATE with scalar result mode.
25484 2018-03-21  Martin Liska  <mliska@suse.cz>
25486         PR ipa/84963
25487         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
25488         not intended return statement.
25490 2018-03-21  Martin Liska  <mliska@suse.cz>
25492         PR target/84988
25493         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
25494         (chkp_find_bound_slots_1): Limit number of iterations.
25496 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
25498         PR target/84838
25499         * Minor grammar fixes for x86 options.
25501 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
25503         PR debug/84875
25504         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
25505         holding REG_CFA_RESTORE notes, instead turn them into a USE.
25507 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
25509         PR target/83789
25510         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
25511         (altivec_lvx_<mode>_1op): Likewise.
25512         (altivec_stvx_<mode>_2op): Likewise.
25513         (altivec_stvx_<mode>_1op): Likewise.
25514         (altivec_lvx_<VM2:mode>): New define_expand.
25515         (altivec_stvx_<VM2:mode>): Likewise.
25516         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
25517         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
25518         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
25519         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
25520         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
25521         (rs6000_gen_lvx): Likewise.
25522         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
25523         (altivec_expand_stv_builtin): Likewise.
25524         (altivec_expand_builtin): Likewise.
25525         * config/rs6000/vector.md: Likewise.
25527 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25529         PR target/82518
25530         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
25531         BYTES_BIG_ENDIAN.
25533 2018-03-20  Richard Biener  <rguenther@suse.de>
25535         PR target/84986
25536         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
25537         sign-conversions as zero, fall back to standard scalar_stmt
25538         cost for the rest.
25540 2018-03-20  Martin Liska  <mliska@suse.cz>
25542         PR ipa/84825
25543         * predict.c (rebuild_frequencies): Handle case when we have
25544         PROFILE_ABSENT, but flag_guess_branch_prob is false.
25546 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
25548         PR target/84990
25549         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
25550         flag_section_anchors.
25551         * varasm.c (use_blocks_for_decl_p): Remove hack for
25552         dw2_force_const_mem.
25554         PR target/84845
25555         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
25556         to ...
25557         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
25558         be created, use lowpart_subreg of operands[0] rather than operands[0]
25559         itself.
25560         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
25561         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
25562         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
25563         and n constraint instead of aarch64_shift_imm_di and Usd.
25564         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
25565         (*aarch64_<optab>_reg_minus<mode>3): ... this.
25567 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
25569         PR target/82989
25570         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
25571         to favor GPR over NEON registers.
25572         (<shift>di3_neon): Likewise.
25574 2018-03-20  Tom de Vries  <tom@codesourcery.com>
25576         PR target/84952
25577         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
25578         (nvptx_process_pars): Emit bar.sync asap and alap.
25580 2018-03-20  Tom de Vries  <tom@codesourcery.com>
25582         PR target/84954
25583         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
25584         seen_label if seen_label is already set.
25586 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
25588         PR target/84945
25589         * config/i386/i386.c (fold_builtin_cpu): For features above 31
25590         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
25591         Use 1U instead of 1.  Formatting fixes.
25593         PR c/84953
25594         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
25595         instead of TREE_TYPE (s1) for the return value.
25597 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
25599         PR tree-optimization/84946
25600         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
25601         bitsize + bitsize in poly_uint64 rather than poly_int64.
25603         PR sanitizer/78651
25604         * dwarf2asm.c: Include fold-const.c.
25605         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
25606         of decl rather than decl itself.
25608         PR rtl-optimization/84643
25609         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
25611 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
25613         PR sanitizer/78651
25614         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
25615         calling assemble_variable.
25617 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
25619         PR target/81647
25620         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
25621         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
25623 2018-03-19  Jim Wilson  <jimw@sifive.com>
25625         PR bootstrap/84856
25626         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
25627         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
25628         (riscv_first_stack_step): Likewise.
25629         (riscv_option_override): Use STACK_BOUNDARY instead of
25630         MIN_STACK_BOUNDARY.
25631         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
25632         MIN_STACK_BOUNDARY.
25633         (BIGGEST_ALIGNMENT): Set to 128.
25634         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
25635         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
25636         STACK_BOUNDARY.
25638 2018-03-19  Richard Biener  <rguenther@suse.de>
25640         PR tree-optimization/84933
25641         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
25642         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
25644 2018-03-19  Richard Biener  <rguenther@suse.de>
25646         PR tree-optimization/84859
25647         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
25648         (cond_if_else_store_replacement): Perform sinking operation on
25649         single-store BBs regardless of MAX_STORES_TO_SINK setting.
25650         Generalize what a BB with a single eligible store is.
25652 2018-03-19  Richard Biener  <rguenther@suse.de>
25654         PR tree-optimization/84929
25655         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
25656         chrec_is_positive against non-chrec arg.
25658 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
25660         PR target/84711
25661         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
25663 2018-03-18  Martin Liska  <mliska@suse.cz>
25665         PR rtl-optimization/84635
25666         * regrename.c (build_def_use): Use matches_mode only when
25667         matches >= 0.
25669 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
25671         PR tree-optimization/84913
25672         * tree-vect-loop.c (vectorizable_reduction): Don't try to
25673         vectorize chains of COND_EXPRs.
25675 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
25677         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
25679 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
25681         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
25683 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
25685         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
25687 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
25688             Kito Cheng  <kito.cheng@gmail.com>
25690         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
25691         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
25692         (nds32_adjust_reg_alloc_order): New function.
25693         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
25695 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
25697         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
25698         nds32_print_operand, nds32_print_operand_address): Use
25699         HOST_WIDE_INT_PRINT_DEC instead.
25701 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
25703         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
25705 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
25707         PR target/84902
25708         * config/i386/i386.c (initial_ix86_tune_features,
25709         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
25710         unsigned long long.
25711         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
25712         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
25713         rather than 1u << ix86_tune.  Formatting fix.
25714         (ix86_option_override_internal): Change ix86_arch_mask from
25715         unsigned int to unsigned HOST_WIDE_INT, initialize to
25716         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
25717         (ix86_function_specific_restore): Likewise.
25719 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
25721         PR target/84899
25722         * postreload.c (reload_combine_recognize_pattern): Perform
25723         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
25724         truncate_int_for_mode the result for the destination's mode.
25726         PR c/84909
25727         * hsa-gen.c (mem_type_for_type): Fix comment typo.
25728         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
25729         Likewise.
25730         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
25731         Likewise.
25733 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
25735         PR target/84876
25736         * lra-assigns.c (lra_split_hard_reg_for): Don't use
25737         regno_allocno_class_array and sorted_pseudos.
25738         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
25739         insns where regno is used.
25741 2018-03-16  Martin Liska  <mliska@suse.cz>
25743         PR ipa/84833
25744         * multiple_target.c (create_dispatcher_calls): Redirect
25745         reference in the symbol table.
25747 2018-03-16  Martin Liska  <mliska@suse.cz>
25749         PR ipa/84722
25750         * multiple_target.c (create_dispatcher_calls): Redirect also
25751         an alias.
25753 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
25755         PR c++/79937
25756         PR c++/82410
25757         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
25758         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
25759         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
25761 2018-03-16  Julia Koval  <julia.koval@intel.com>
25763         * doc/invoke.texi (Skylake Server): Add CLWB.
25764         Cannonlake): Remove CLWB.
25766 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
25768         PR tree-optimization/84841
25769         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
25770         1 << 3.
25771         (FLOAT_ONE_CONST_TYPE): Define.
25772         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
25773         (sort_by_operand_rank): Put entries with higher constant_type last
25774         rather than first to match comments.
25776 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
25778         * config/nios2/nios2.md (movsi_internal): Fix thinko in
25779         split predicate.
25781 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
25783         PR c++/79085
25784         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
25785         check and use address of target always.
25787 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
25789         PR target/84574
25790         * config/i386/i386.c (indirect_thunk_needed): Update comments.
25791         (indirect_thunk_bnd_needed): Likewise.
25792         (indirect_thunks_used): Likewise.
25793         (indirect_thunks_bnd_used): Likewise.
25794         (indirect_return_needed): New.
25795         (indirect_return_bnd_needed): Likewise.
25796         (output_indirect_thunk_function): Add a bool argument for
25797         function return.
25798         (output_indirect_thunk_function): Don't generate alias for
25799         function return thunk.
25800         (ix86_code_end): Call output_indirect_thunk_function to generate
25801         function return thunks.
25802         (ix86_output_function_return): Set indirect_return_bnd_needed
25803         and indirect_return_needed instead of indirect_thunk_bnd_needed
25804         and indirect_thunk_needed.
25806 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
25808         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
25809         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
25810         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
25812 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
25813             Paul Hua <paul.hua.gm@gmail.com>
25815         PR c/84852
25816         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
25818 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
25820         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
25821         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
25822         resp. SFmode cases.
25824 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
25826         PR target/84711
25827         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
25828         instead of GET_MODE_SIZE when comparing Units.
25830 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
25832         PR target/68256
25833         * varasm.c (hash_section): Return an unchangeble hash value
25834         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
25835         Return !aarch64_can_use_per_function_literal_pools_p ().
25837 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
25839         PR target/84860
25840         * optabs.c (emit_conditional_move): Pass address of cmode's copy
25841         rather than address of cmode as last argument to prepare_cmp_insn.
25843 2018-03-15  Julia Koval  <julia.koval@intel.com>
25845         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
25846         F_AVX512VNNI, F_AVX512BITALG): New.
25848 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
25850         PR target/83451
25851         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
25852         insn for floating-point loads and stores.
25854 2018-03-14  Carl Love  <cel@us.ibm.com>
25856         * config/rs6000/rs6000-c.c: Add macro definitions for
25857         ALTIVEC_BUILTIN_VEC_PERMXOR.
25858         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
25859         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
25860         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
25861         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
25862         UNSPEC_VPERMXOR.
25863         * config/doc/extend.texi: Add prototypes for vec_permxor.
25865 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
25867         PR c/84852
25868         * diagnostic-show-locus.c (class layout_point): Convert m_line
25869         from int to linenum_type.
25870         (line_span::comparator): Use linenum "compare" function when
25871         comparing line numbers.
25872         (test_line_span): New function.
25873         (layout_range::contains_point): Convert param "row" from int to
25874         linenum_type.
25875         (layout_range::intersects_line_p): Likewise.
25876         (layout::will_show_line_p): Likewise.
25877         (layout::print_source_line): Likewise.
25878         (layout::should_print_annotation_line_p): Likewise.
25879         (layout::print_annotation_line): Likewise.
25880         (layout::print_leading_fixits): Likewise.
25881         (layout::annotation_line_showed_range_p): Likewise.
25882         (struct line_corrections): Likewise for field m_row.
25883         (line_corrections::line_corrections): Likewise for param "row".
25884         (layout::print_trailing_fixits): Likewise.
25885         (layout::get_state_at_point): Likewise.
25886         (layout::get_x_bound_for_row): Likewise.
25887         (layout::print_line): Likewise.
25888         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
25889         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
25890         * input.c (selftest::test_linenum_comparisons): New function.
25891         (selftest::input_c_tests): Call it.
25892         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
25893         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
25894         * selftest.h (ASSERT_GT): New macro.
25895         (ASSERT_GT_AT): New macro.
25896         (ASSERT_LT): New macro.
25897         (ASSERT_LT_AT): New macro.
25899 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
25901         PR rtl-optimization/84780
25902         * combine.c (distribute_links): Don't make a link based on pc_rtx.
25904 2018-03-14  Martin Liska  <mliska@suse.cz>
25906         * tree.c (record_node_allocation_statistics): Use
25907         get_stats_node_kind.
25908         (get_stats_node_kind): New function extracted from
25909         record_node_allocation_statistics.
25910         (free_node): Use get_stats_node_kind.
25912 2018-03-14  Richard Biener  <rguenther@suse.de>
25914         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
25915         that the value-set of ANTIC_IN doesn't grow.
25917         Revert
25918         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
25919         member.
25920         (BB_VISITED_WITH_VISITED_SUCCS): New define.
25921         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
25923 2018-03-14  Julia Koval  <julia.koval@intel.com>
25925         * config.gcc (icelake-client, icelake-server): New.
25926         (icelake): Remove.
25927         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
25928         (initial_ix86_arch_features): Ditto.
25929         (PTA_SKYLAKE): Add SGX.
25930         (PTA_ICELAKE): Remove.
25931         (PTA_ICELAKE_CLIENT): New.
25932         (PTA_ICELAKE_SERVER): New.
25933         (ix86_option_override_internal): Split up icelake on icelake client and
25934         icelake server.
25935         (get_builtin_code_for_version): Ditto.
25936         (fold_builtin_cpu): Ditto.
25937         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
25938         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
25939         * config/i386/i386.h (processor_type): Ditto.
25940         * doc/invoke.texi: Ditto.
25942 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
25944         PR sanitizer/83392
25945         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
25946         INTEGER_CST offset, add it together with bitpos / 8 and
25947         sign extend based on POINTER_SIZE.
25949         PR target/84844
25950         Revert
25951         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
25953         PR target/78090
25954         * config/i386/constraints.md (Yc): New register constraint.
25955         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
25956         Use Yc constraint for alternative 2 of operand 0.  Remove
25957         preferred_for_speed attribute.
25959 2018-03-14  Richard Biener  <rguenther@suse.de>
25961         PR tree-optimization/84830
25962         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
25963         with the old one to avoid oscillations.
25965 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
25967         PR target/83712
25968         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
25969         pseudos.
25970         (assign_by_spills): Return a flag of reload assignment failure.
25971         Do not process the reload assignment failures.  Do not spill other
25972         reload pseudos if they has the same reg class.  Update n if
25973         necessary.
25974         (lra_assign): Add a return arg.  Set up from the result of
25975         assign_by_spills call.
25976         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
25977         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
25978         usage_insns if it is not NULL.
25979         (spill_hard_reg_in_range): New function.
25980         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
25981         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
25982         function prototypes.
25983         (lra_assign): Change prototype.
25984         * lra.c (lra): Add code to deal with fails by splitting hard reg
25985         live ranges.
25987 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
25989         * config/riscv/riscv.opt (mrelax): New option.
25990         * config/riscv/riscv.c (riscv_file_start): Emit ".option
25991         "norelax" when riscv_mrelax is disabled.
25992         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
25994 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
25996         PR target/84743
25997         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
25998         reassociation for int modes.
26000 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
26002         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
26003         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
26004         for big-endian.
26005         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
26006         * config/aarch64/aarch64-sve.md
26007         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
26008         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
26009         (*extend<mode><Vwide>2): Rename to...
26010         (aarch64_sve_extend<mode><Vwide>2): ...this.
26011         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
26012         renaming the old pattern to...
26013         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
26014         unsigned packs.
26015         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
26016         define_expand, renaming the old pattern to...
26017         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
26018         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
26019         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
26020         account when deciding which SVE instruction the optab should use.
26021         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
26023 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
26025         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
26026         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
26027         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
26028         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
26029         (tlsdesc_small_<mode>): Turn a define_expand and use
26030         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
26031         (tlsdesc_small_advsimd_<mode>): ...this.
26032         (tlsdesc_small_sve_<mode>): New pattern.
26034 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
26036         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
26037         (UNSPEC_UMUL_HIGHPART): New constants.
26038         (MUL_HIGHPART): New int iteraor.
26039         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
26040         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
26041         define_expand.
26042         (*<su>mul<mode>3_highpart): New define_insn.
26044 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
26046         PR lto/84805
26047         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
26048         incomplete types.
26050 2018-03-13  Martin Liska  <mliska@suse.cz>
26052         PR ipa/84658.
26053         * (sem_item_optimizer::sem_item_optimizer): Initialize new
26054         vector.
26055         (sem_item_optimizer::~sem_item_optimizer): Release it.
26056         (sem_item_optimizer::merge_classes): Register variable aliases.
26057         (sem_item_optimizer::fixup_pt_set): New function.
26058         (sem_item_optimizer::fixup_points_to_sets): Likewise.
26059         * ipa-icf.h: Declare new variables and functions.
26061 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
26063         PR middle-end/84834
26064         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
26065         integer_pow2p@2 and test integer_pow2p in condition.
26066         (A < 0 ? C : 0): Similarly for @1.
26068         PR middle-end/84831
26069         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
26070         characters starting at p contain '\0' character, don't look beyond
26071         that.
26073         PR target/84827
26074         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
26075         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
26077         PR target/84828
26078         * reg-stack.c (change_stack): Change update_end var from int to
26079         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
26080         also call set_block_for_insn on the newly added insns and rescan.
26082         PR target/84786
26083         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
26084         on the last operand.
26086         PR c++/84704
26087         * tree.c (stabilize_reference_1): Return save_expr (e) for
26088         STATEMENT_LIST even if it doesn't have side-effects.
26090 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
26092         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
26094 2018-03-12  Renlin Li  <renlin.li@arm.com>
26096         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
26097         aarch64_output_scalar_simd_mov_immediate.
26099 2018-03-12  Martin Sebor  <msebor@redhat.com>
26101         PR tree-optimization/83456
26102         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
26103         for perfectly overlapping calls to memcpy.
26104         (gimple_fold_builtin_memory_chk): Same.
26105         (gimple_fold_builtin_strcpy): Handle no-warning.
26106         (gimple_fold_builtin_stxcpy_chk): Same.
26107         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
26109 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
26111         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
26112         parameter.  Use it for SFmode.
26113         (rs6000_function_arg_advance_1): Adjust.
26114         (rs6000_function_arg): Adjust.
26115         (rs6000_gimplify_va_arg): Pass false for that new parameter.
26117 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
26119         PR rtl-optimization/84169
26120         PR rtl-optimization/84780
26121         * combine.c (can_combine_p): Check for a 2-insn combination whether
26122         the destination register is used between the two insns, too.
26124 2018-03-12  Richard Biener  <rguenther@suse.de>
26126         PR tree-optimization/84803
26127         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
26128         for refs DR analysis didn't process.
26130 2018-03-12  Richard Biener  <rguenther@suse.de>
26132         PR tree-optimization/84777
26133         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
26134         force-vectorize loops ignore whether we are optimizing for size.
26136 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
26138         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
26139         (TARGET_MD_ASM_ADJUST): Define.
26141 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
26142             Kito Cheng  <kito.cheng@gmail.com>
26143             Chung-Ju Wu  <jasonwucj@gmail.com>
26145         * config/nds32/nds32.c (nds32_compute_stack_frame,
26146         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
26147         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
26148         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
26149         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
26150         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
26151         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
26152         * config/nds32/nds32.md (prologue, epilogue): Use macro
26153         NDS32_V3PUSH_AVAILABLE_P to do checking.
26155 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
26157         PR debug/58150
26158         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
26159         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
26160         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
26161         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
26162         addition of most attributes on !orig_type_die or the attribute not
26163         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
26165 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
26166             Chung-Ju Wu  <jasonwucj@gmail.com>
26168         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
26169         __NDS32_VH__ macro.
26170         * config/nds32/nds32.opt (mvh): New option.
26172 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
26173             Chung-Ju Wu  <jasonwucj@gmail.com>
26175         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
26176         function.
26177         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
26178         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
26179         definition.
26181 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
26182             Chung-Ju Wu  <jasonwucj@gmail.com>
26184         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
26185         function.
26186         * config/nds32/nds32-multiple.md (strlensi): New pattern.
26187         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
26189 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
26190             Kito Cheng  <kito.cheng@gmail.com>
26191             Chung-Ju Wu  <jasonwucj@gmail.com>
26193         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
26194         UNSPEC_FFMISM and UNSPEC_FLMISM.
26195         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
26196         for ffb, ffmism and flmism.
26197         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
26198         (unspec_ffmism): Ditto.
26199         (unspec_flmism): Ditto.
26200         (nds32_expand_builtin_impl): Check if string extension is available.
26201         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
26202         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
26204 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
26206         Reverting patch:
26207         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
26209         PR target/83712
26210         * lra-assigns.c (assign_by_spills): Return a flag of reload
26211         assignment failure.  Do not process the reload assignment
26212         failures.  Do not spill other reload pseudos if they has the same
26213         reg class.
26214         (lra_assign): Add a return arg.  Set up from the result of
26215         assign_by_spills call.
26216         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
26217         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
26218         usage_insns if it is not NULL.
26219         (spill_hard_reg_in_range): New function.
26220         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
26221         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
26222         function prototypes.
26223         (lra_assign): Change prototype.
26224         * lra.c (lra): Add code to deal with fails by splitting hard reg
26225         live ranges.
26227 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
26229         PR target/84807
26230         * config/i386/i386.opt: Replace Enforcment with Enforcement.
26232 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
26234         PR debug/84620
26235         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
26236         (dw_val_node): Add val_symbolic_view.
26237         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
26238         (symview_upper_bound): New.
26239         (new_line_info_table): Initialize symviews_since_reset.
26240         (dwarf2out_source_line): Count symviews_since_reset and set
26241         symview_upper_bound.
26242         (dw_val_equal_p): Handle symview.
26243         (add_AT_symview): New.
26244         (print_dw_val): Handle symview.
26245         (attr_checksum, attr_checksum_ordered): Likewise.
26246         (same_dw_val_p, size_of_die): Likewise.
26247         (value_format, output_die): Likewise.
26248         (add_high_low_attributes): Use add_AT_symview for entry_view.
26249         (dwarf2out_finish): Reset symview_upper_bound, clear
26250         zero_view_p.
26252 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
26254         PR target/83969
26255         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
26256         Add strict argument and use it.
26257         (rs6000_split_multireg_move): Update for new strict argument.
26258         (mem_operand_gpr): Disallow all non-offsettable addresses.
26259         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
26261 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
26263         PR target/84772
26264         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
26265         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
26266         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
26268         PR c++/84767
26269         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
26270         decl, use remap_type if we want to use the type.
26272 2018-03-09  Martin Sebor  <msebor@redhat.com>
26274         PR tree-optimization/84526
26275         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
26276         Remove dead code.
26277         (builtin_access::generic_overlap): Be prepared to handle non-array
26278         base objects.
26280 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
26282         PR rtl-optimization/84682
26283         * lra-constraints.c (process_address_1): Check is_address flag
26284         for address constraints.
26285         (process_alt_operands): Likewise.
26286         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
26287         preprocess_constraints.
26288         * recog.h (preprocess_constraints): Add oploc parameter.
26289         Adjust callers.
26290         * recog.c (preprocess_constraints): Test address_operand for
26291         CT_ADDRESS constraints.
26293 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
26295         PR target/83712
26296         * lra-assigns.c (assign_by_spills): Return a flag of reload
26297         assignment failure.  Do not process the reload assignment
26298         failures.  Do not spill other reload pseudos if they has the same
26299         reg class.
26300         (lra_assign): Add a return arg.  Set up from the result of
26301         assign_by_spills call.
26302         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
26303         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
26304         usage_insns if it is not NULL.
26305         (spill_hard_reg_in_range): New function.
26306         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
26307         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
26308         function prototypes.
26309         (lra_assign): Change prototype.
26310         * lra.c (lra): Add code to deal with fails by splitting hard reg
26311         live ranges.
26313 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26315         PR target/83193
26316         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
26317         Accept complain bool parameter.  Only emit errors if it is true.
26318         (arm_parse_cpu_option_name): Likewise.
26319         (arm_target_thumb_only): Adjust callers of the above.
26320         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
26321         prototype to take a default true bool parameter.
26322         (arm_parse_arch_option_name): Likewise.
26324 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
26325             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
26327         PR jit/64089
26328         PR jit/84288
26329         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
26330         * configure: Regenerate.
26331         * configure.ac ("linker --version-script option"): New.
26332         ("linker soname option"): New.
26334 2018-03-09  Richard Biener  <rguenther@suse.de>
26336         PR tree-optimization/84775
26337         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
26338         immediate uses of predicate stmts and mark them modified.
26340         Revert
26341         PR tree-optimization/84178
26342         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
26343         to caller.
26344         (version_loop_for_if_conversion): Delay update_ssa call.
26345         (tree_if_conversion): Delay update_ssa until after predicate
26346         insertion.
26348 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
26350         PR target/84763
26351         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
26352         when the function accesses prior frames.
26354 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
26356         PR debug/84456
26357         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
26358         gen_llsym, otherwise call maybe_gen_llsym.
26360         PR inline-asm/84742
26361         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
26362         has ',' character inside of it.
26364 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26366         PR target/84748
26367         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
26368         as clobbering CC_REGNUM.
26370 2018-03-08  Richard Biener  <rguenther@suse.de>
26372         PR middle-end/84552
26373         * tree-scalar-evolution.c: Include tree-into-ssa.h.
26374         (follow_copies_to_constant): Do not follow SSA names registered
26375         for update.
26377 2018-03-08  Richard Biener  <rguenther@suse.de>
26379         PR tree-optimization/84178
26380         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
26381         to caller.
26382         (version_loop_for_if_conversion): Delay update_ssa call.
26383         (tree_if_conversion): Delay update_ssa until after predicate
26384         insertion.
26386 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
26388         PR tree-optimization/84178
26389         * tree-if-conv.c (release_bb_predicate): Remove the
26390         the assertion that the stmts have NULL use_ops.
26391         Discard the statements, asserting that they haven't
26392         yet been added to a BB.
26394 2018-03-08  Richard Biener  <rguenther@suse.de>
26396         PR tree-optimization/84746
26397         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
26398         (phi_translate): Pass in destination ANTIC_OUT set.
26399         (phi_translate_1): Likewise.  For a simplified result lookup
26400         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
26401         (phi_translate_set): Adjust.
26402         (do_pre_regular_insertion): Likewise.
26403         (do_pre_partial_partial_insertion): Likewise.
26405 2018-03-08  Martin Liska  <mliska@suse.cz>
26407         PR gcov-profile/84735
26408         * doc/gcov.texi: Document usage of profile files.
26409         * gcov-io.h: Document changes in the format.
26411 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
26413         PR debug/84404
26414         PR debug/84408
26415         * dwarf2out.c (struct dw_line_info_table): Update comments for
26416         view == -1.
26417         (FORCE_RESET_NEXT_VIEW): New.
26418         (FORCE_RESETTING_VIEW_P): New.
26419         (RESETTING_VIEW_P): Check for -1 too.
26420         (ZERO_VIEW_P): Likewise.
26421         (new_line_info_table): Force-reset next view.
26422         (dwarf2out_begin_function): Likewise.
26423         (dwarf2out_source_line): Simplify zero_view_p initialization.
26424         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
26425         view directly.  Omit view when omitting .loc at line 0.
26427 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
26429         PR tree-optimization/84740
26430         * tree-switch-conversion.c (process_switch): Call build_constructors
26431         only if info.phi_count is non-zero.
26433         PR tree-optimization/84739
26434         * tree-tailcall.c (find_tail_calls): Check call arguments against
26435         DECL_ARGUMENTS (current_function_decl) rather than
26436         DECL_ARGUMENTS (func) when checking for tail recursion.
26438 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
26440         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
26441         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
26442         Volker Reichelt's entry and add entries for people that perform
26443         GCC fuzzy testing and report numerous bugs.
26445 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
26447         PR target/82411
26448         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
26449         readonly data in sdata, if that is disabled.
26450         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
26451         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
26452         -mreadonly-in-sdata option.
26454 2018-03-07  Martin Sebor  <msebor@redhat.com>
26456         PR tree-optimization/84468
26457         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
26458         basic block when looking for nul assignment.
26460 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
26462         PR target/84277
26463         * except.h (output_function_exception_table): Adjust prototype.
26464         * except.c (output_function_exception_table): Remove FNNAME parameter
26465         and add SECTION parameter.  Ouput one part of the table at a time.
26466         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
26467         the first part of the exception table and emit unwind directives.
26468         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
26469         (i386_pe_seh_cold_init): Likewise.
26470         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
26471         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
26472         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
26473         (ix86_output_call_insn): Emit a nop in one more case for SEH.
26474         * config/i386/winnt.c: Include except.h.
26475         (struct seh_frame_state): Add reg_offset, after_prologue and
26476         in_cold_section fields.
26477         (i386_pe_seh_end_prologue): Set seh->after_prologue.
26478         (i386_pe_seh_cold_init): New function.
26479         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
26480         to seh->in_cold_section.
26481         (seh_emit_push): Record the offset of the push.
26482         (seh_emit_save): Record the offet of the save.
26483         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
26484         Test seh->after_prologue to disregard the epilogue.
26485         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
26486         (i386_pe_end_cold_function): New function.
26488 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
26490         PR fortran/84565
26491         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
26492         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
26494         PR c++/84704
26495         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
26496         on tmp_var.
26497         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
26498         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
26500         PR middle-end/84723
26501         * multiple_target.c: Include tree-inline.h and intl.h.
26502         (expand_target_clones): Diagnose and fail if node->definition and
26503         !tree_versionable_function_p (node->decl).
26505 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
26507         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
26508         sprint_ul.
26509         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
26510         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
26511         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
26513 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
26515         PR target/84710
26516         * combine.c (try_combine): Use reg_or_subregno instead of handling
26517         just paradoxical SUBREGs and REGs.
26519 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
26521         * config/arc/arc.c (arc_finalize_pic): Remove function.
26522         (arc_must_save_register): We use single base PIC register, remove
26523         checks to save/restore the PIC register.
26524         (arc_expand_prologue): Likewise.
26525         * config/arc/arc-protos.h (arc_set_default_type_attributes):
26526         Remove.
26527         (arc_verify_short): Likewise.
26528         (arc_attr_type): Likewise.
26529         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
26530         (walk_stores): Likewise.
26531         (arc_address_cost): Make it static.
26532         (arc_verify_short): Likewise.
26533         (branch_dest): Likewise.
26534         (arc_attr_type): Likewise.
26535         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
26536         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
26537         (arc_final_prescan_insn): Remove inserting the nops due to
26538         hardware hazards.  It is done in reorg step.
26539         (insn_length_variant_t): Remove.
26540         (insn_length_parameters_t): Likewise.
26541         (arc_insn_length_parameters): Likewise.
26542         (arc_get_insn_variants): Likewise.
26543         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
26545 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
26547         PR inline-asm/84683
26548         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
26549         assertion failure.
26551         PR tree-optimization/84687
26552         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
26553         on new_node->decl.
26554         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
26556 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26558         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
26559         Rename to ppc_speculation_barrier.
26560         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
26561         __builtin_ppc_speculation_barrier.
26563 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
26565         PR target/84700
26566         * combine.c (combine_simplify_rtx): Don't try to simplify if
26567         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
26568         are equal to x.
26570 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
26572         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
26573         to 32 bytes when compiling for POWER9.
26575 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
26577         PR target/84564
26578         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
26579         regparm >= 3 with no arg reg available also for calls with
26580         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
26582         PR target/84524
26583         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
26584         orig,vex.
26585         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
26587 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
26589         PR target/84264
26590         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
26592 2018-03-05  Richard Biener  <rguenther@suse.de>
26594         PR tree-optimization/84486
26595         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
26596         When inserting a __builtin_assume_aligned call set the LHS
26597         SSA name alignment info accordingly.
26599 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
26601         PR tree-optimization/84114
26602         * config/aarch64/aarch64.c (aarch64_reassociation_width)
26603         Avoid reassociation of FLOAT_MODE addition.
26605 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
26607         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
26608         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
26609         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
26610         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
26611         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
26612         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
26613         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
26614         and -mwbnoinvd.
26615         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
26616         __builtin_ia32_wbinvd): New builtins.
26617         (SPECIAL_ARGS2): New.
26618         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
26619         (SPECIAL_ARGS2): New.
26620         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
26621         (ix86_valid_target_attribute_inner_p): Ditto.
26622         (ix86_init_mmx_sse_builtins): Add special_args2.
26623         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
26624         TARGET_WBNOINVD_P): New.
26625         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
26626         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
26627         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
26628         * config/i386/immintrin.h (_wbinvd): New intrinsic.
26629         * config/i386/pconfigintrin.h: New file.
26630         * config/i386/wbnoinvdintrin.h: Ditto.
26631         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
26632         wbnoinvdintrin.h.
26633         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
26635 2018-03-05  Richard Biener  <rguenther@suse.de>
26637         PR tree-optimization/84670
26638         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
26639         member.
26640         (BB_VISITED_WITH_VISITED_SUCCS): New define.
26641         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
26642         (compute_antic_aux): Only assert the number of values in ANTIC_IN
26643         doesn't grow if all successors (recursively) were visited at least
26644         once.
26646 2018-03-05  Richard Biener  <rguenther@suse.de>
26648         PR tree-optimization/84650
26649         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
26650         if executed in the loop pipeline.
26652 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
26654         * doc/configfiles.texi (Configuration Files): Move info about
26655         conditionalizing $target-protos.h to...
26656         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
26657         differs from $target-protos.h.
26659 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
26660             Chung-Ju Wu  <jasonwucj@gmail.com>
26662         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
26663         * config/nds32/nds32-multiple.md (setmemsi): Define.
26664         * config/nds32/nds32-memory-manipulation.c
26665         (nds32_gen_dup_4_byte_to_word_value): New.
26666         (emit_setmem_word_loop): New.
26667         (emit_setmem_byte_loop): New.
26668         (nds32_expand_setmem_loop): New.
26669         (nds32_expand_setmem_loop_v3m): New.
26670         (nds32_expand_setmem_unroll): New.
26671         (nds32_expand_setmem): New.
26673 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
26674             Chung-Ju Wu  <jasonwucj@gmail.com>
26676         * config/nds32/nds32-memory-manipulation.c
26677         (nds32_emit_load_store): New.
26678         (nds32_emit_post_inc_load_store): New.
26679         (nds32_emit_mem_move): New.
26680         (nds32_emit_mem_move_block): New.
26681         (nds32_expand_movmemsi_loop_unknown_size): New.
26682         (nds32_expand_movmemsi_loop_known_size): New.
26683         (nds32_expand_movmemsi_loop): New.
26684         (nds32_expand_movmemsi_unroll): New.
26685         (nds32_expand_movmemqi): Rename ...
26686         (nds32_expand_movmemsi): ... to this.
26687         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
26688         (movmemsi): ... to this.
26689         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
26690         (nds32_expand_movmemsi): ... to this.
26692 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
26693             Monk Chiang  <sh.chiang04@gmail.com>
26694             Chung-Ju Wu  <jasonwucj@gmail.com>
26696         * config/nds32/nds32-protos.h
26697         (nds32_expand_load_multiple): New arguments.
26698         (nds32_expand_store_multiple): Ditto.
26699         (nds32_valid_multiple_load_store): Rename ...
26700         (nds32_valid_multiple_load_store_p): ... to this.
26701         * config/nds32/nds32-memory-manipulation.c
26702         (nds32_expand_load_multiple): Refine implementation.
26703         (nds32_expand_store_multiple): Ditto.
26704         * config/nds32/nds32-multiple.md
26705         (load_multiple): Update nds32_expand_load_multiple interface.
26706         (store_multiple): Update nds32_expand_store_multiple interface.
26707         * config/nds32/nds32-predicates.c
26708         (nds32_valid_multiple_load_store): Rename ...
26709         (nds32_valid_multiple_load_store_p): ... to this and refine
26710         implementation.
26711         * config/nds32/predicates.md
26712         (nds32_load_multiple_and_update_address_operation): New predicate.
26713         (nds32_store_multiple_and_update_address_operation): New predicate.
26715 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
26716             Chung-Ju Wu  <jasonwucj@gmail.com>
26718         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
26719         (combo): New attribute.
26720         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
26722 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
26724         * config/nds32/nds32.opt: Change -mcmodel= default value.
26726 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
26727             Monk Chiang  <sh.chiang04@gmail.com>
26728             Chung-Ju Wu  <jasonwucj@gmail.com>
26730         * config/nds32/constants.md (unspec_element): New enum.
26731         * config/nds32/constraints.md (Umw): New constraint.
26732         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
26733         * config/nds32/nds32-intrinsic.md: Likewise.
26734         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
26735         (nds32_valid_smw_lwm_base_p): New.
26736         (nds32_output_smw_single_word): New.
26737         (nds32_output_lmw_single_word): New.
26738         (nds32_expand_unaligned_load): New.
26739         (nds32_expand_unaligned_store): New.
26740         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
26741         (nds32_output_smw_single_word): Declare.
26742         (nds32_output_lmw_single_word): Declare.
26743         (nds32_expand_unaligned_load): Declare.
26744         (nds32_expand_unaligned_store): Declare.
26745         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
26746         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
26747         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
26748         NDS32_BUILTIN_UASTORE_DW.
26749         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
26750         predicate.
26752 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
26753             Kito Cheng  <kito.cheng@gmail.com>
26754             Chung-Ju Wu  <jasonwucj@gmail.com>
26756         * config/nds32/nds32-intrinsic.c
26757         (nds32_expand_builtin_null_ftype_reg): Delete.
26758         (nds32_expand_builtin_reg_ftype_imm): Ditto.
26759         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
26760         (nds32_read_argument): New.
26761         (nds32_legitimize_target): Ditto.
26762         (nds32_legitimize_argument): Ditto.
26763         (nds32_check_constant_argument): Ditto.
26764         (nds32_expand_unop_builtin): Ditto.
26765         (nds32_expand_unopimm_builtin): Ditto.
26766         (nds32_expand_binop_builtin): Ditto.
26767         (nds32_builtin_decl_impl): Ditto.
26768         (builtin_description): Ditto.
26769         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
26770         (nds32_init_builtins_impl): Ditto.
26771         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
26772         (nds32_builtin_decl): New.
26773         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
26774         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
26776 2018-03-02  Jeff Law  <law@redhat.com>
26778         * reorg.c (stop_search_p): Handle DEBUG_INSN.
26779         (redundant_insn, fill_simple_delay_slots): Likewise.
26780         (fill_slots_from_thread): Likewise.
26781         * resource.c (mark_referenced_resources): Likewise.
26782         (mark_set_resources, find_dead_or_set_registers): Likewise.
26784 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
26786         * substring-locations.h (format_warning_va): Formatting fix for
26787         ATTRIBUTE_GCC_DIAG.
26788         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
26789         argument.
26790         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
26791         * substring-locations.c: Include intl.h.
26792         (format_warning_va): Turned into small wrapper around
26793         format_warning_n_va, renamed to ...
26794         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
26795         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
26796         use ngettext.
26797         (format_warning_at_substring_n): New function.
26798         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
26799         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
26800         format_warning_at_substring with just a shorter name instead of
26801         const function pointer.
26802         (fmtwarn_n): New function.
26803         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
26804         appropriate, get rid of all the fmtstr temporaries, move conditionals
26805         with G_() wrapped string literals directly into fmtwarn arguments,
26806         cast dir.len to (int), formatting fixes.
26808 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
26810         * doc/invoke.texi: Remove "Cilk Plus" references.
26812 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
26813             Richard Biener  <rguenther@suse.de>
26815         PR ipa/84628
26816         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
26817         for error or warning attributes if CALL_FROM_THUNK_P is set.
26818         Formatting fixes.
26820 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
26822         PR target/56540
26823         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
26824         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
26826         PR target/56540
26827         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
26828         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
26830         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
26831         instead of -1U in last predictors element's probability member.
26833 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
26835         PR ipa/83983
26836         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
26837         arguments if they are comparable.
26839 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
26841         PR tree-optimization/84634
26842         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
26843         masks and masked_loop_p with a single loop_masks, making sure it's
26844         null for bb vectorization.
26846 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
26848         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
26849         (vect_analyze_data_ref_access): Use loop->safe_len rather than
26850         loop->force_vectorize to check whether there is no alias.
26852 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
26854         PR target/84614
26855         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
26856         prototypes.
26857         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
26858         comments.
26859         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
26860         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
26861         instead of a loop around prev_real_insn.
26862         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
26863         prev_real_insn.
26865         PR inline-asm/84625
26866         * config/i386/i386.c (ix86_print_operand): Use conditional
26867         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
26868         zero vector.
26870 2018-03-02  Richard Biener  <rguenther@suse.de>
26872         PR tree-optimization/84427
26873         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
26874         (bitmap_set_subtract_values): Rewrite to handle multiple
26875         exprs per value.
26876         (clean): Likewise.
26877         (prune_clobbered_mems): Likewise.
26878         (phi_translate): Take edge instead of pred/phiblock.
26879         (phi_translate_1): Likewise.
26880         (phi_translate_set): Likewise.  Insert all translated
26881         exprs for a value into the set, keeping possibly multiple
26882         expressions per value.
26883         (compute_antic_aux): Adjust for phi_translate changes.
26884         When intersecting union the expressions and prune those
26885         not in the final value set, keeping possibly multiple
26886         expressions per value.  Do not use value-insertion
26887         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
26888         all expressions.  Add verification that the value-sets
26889         only shrink during iteration.
26890         (compute_partial_antic_aux): Adjust for the phi_translate changes.
26891         (do_pre_regular_insertion): Likewise.
26892         (do_pre_partial_partial_insertion): Likewise.
26894 2018-03-02  Richard Biener  <rguenther@suse.de>
26896         PR target/82005
26897         * config/darwin.c (saved_debug_info_level): New static global.
26898         (darwin_asm_lto_start): Disable debug info generation for LTO out.
26899         (darwin_asm_lto_end): Restore debug info generation settings.
26901 2018-03-01  Martin Liska  <mliska@suse.cz>
26903         PR sanitizer/82484
26904         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
26905         volatile arguments.
26907 2018-03-01  Richard Biener  <rguenther@suse.de>
26909         PR debug/84645
26910         * dwarf2out.c (gen_variable_die): Properly handle late VLA
26911         type annotation with LTO when debug was disabled at compile-time.
26913 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
26915         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
26916         XINT with INTVAL.
26917         (mips_final_postscan_insn): Likewise.
26919 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
26921         PR rtl-optimization/84528
26922         * alias.c (init_alias_target): Add commentary.
26923         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
26924         a unique base value if the frame pointer is not eliminated
26925         to the stack pointer.
26927 2018-03-01  Tom de Vries  <tom@codesourcery.com>
26929         PR rtl-optimization/83327
26930         * lra-int.h (hard_regs_spilled_into): Declare.
26931         * lra.c (hard_regs_spilled_into): Define.
26932         (init_reg_info): Init hard_regs_spilled_into.
26933         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
26934         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
26935         (process_bb_lives): Handle hard_regs_spilled_into.
26936         (lra_create_live_ranges_1): Before doing liveness propagation, clear
26937         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
26939 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
26941         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
26942         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
26943         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
26944         * config/rs6000/aix72.h: New file.
26946 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
26948         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
26949         instead of warning_at with conditional singular and plural messages
26950         where possible.
26952         PR target/52991
26953         * stor-layout.c (update_alignment_for_field): For
26954         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
26955         && !DECL_PACKED (field), do the alignment update, just use
26956         only desired_align instead of MAX (type_align, desired_align)
26957         as the alignment.
26958         (place_field): Don't do known_align < desired_align handling
26959         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
26960         is non-NULL, instead do it after rli->prev_field handling and
26961         only if not within a bitfield word.  For DECL_PACKED (field)
26962         use type_align of BITS_PER_UNIT.
26964 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
26966         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
26967         superfluous parentheses and trailing spaces.
26969 2018-02-28  Richard Biener  <rguenther@suse.de>
26971         PR tree-optimization/84584
26972         * graphite-scop-detection.c (scop_detection::add_scop): Discard
26973         SCoPs with fake exit edge.
26975 2018-02-28  Martin Liska  <mliska@suse.cz>
26977         PR testsuite/84597
26978         * timevar.c (timer::print): Fix format to properly print 100%
26979         values.
26981 2018-02-28  Richard Biener  <rguenther@suse.de>
26983         PR middle-end/84607
26984         * genmatch.c (capture_info::walk_match): Do not mark
26985         captured expressions without operands as expr_p given
26986         they act more like predicates and should be subject to
26987         "lost tail" side-effect preserving.
26989 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
26991         PR rtl-optimization/81611
26992         * auto-inc-dec.c (attempt_change): Move dead note from
26993         mem_insn if it's the next use of regno
26994         (find_address): Take address use of reg holding
26995         non-incremented value.  Add parm to limit search to the named
26996         reg only.
26997         (merge_in_block): Attempt to use a mem insn that is the next
26998         use of the original regno.
27000 2018-02-27  Martin Sebor  <msebor@redhat.com>
27002         PR c++/83871
27003         * doc/invoke.texi (-Wmissing-attributes): New option.
27004         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
27006 2018-02-27  Martin Sebor  <msebor@redhat.com>
27008         PR translation/84207
27009         * diagnostic-core.h (warning_n, error_n, inform_n): Change
27010         n argument to unsigned HOST_WIDE_INT.
27011         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
27012         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
27013         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
27014         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
27016 2018-02-27  Richard Biener  <rguenther@suse.de>
27018         PR tree-optimization/84512
27019         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
27020         Do not use the estimate returned from record_stmt_cost for
27021         the scalar iteration cost but sum properly using add_stmt_cost.
27023 2018-02-27  Richard Biener  <rguenther@suse.de>
27025         PR tree-optimization/84466
27026         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
27027         Adjust last change to less strictly validate use operands.
27029 2018-02-27  Martin Liska  <mliska@suse.cz>
27031         PR gcov-profile/84548
27032         * gcov.c (process_file): Allow partial overlap and consider it
27033         also as group functions.
27034         (output_lines): Properly calculate range of lines for a group.
27036 2018-02-27  Martin Liska  <mliska@suse.cz>
27038         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
27039         'ggc' suffixes.  Change first column width.
27040         (timer::print): Fix formatting of the column.
27042 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
27044         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
27045         preserve inline entry blocks for the sake of debug inline
27046         entry point markers alone.
27047         (remove_unused_locals): Suggest in comments a better place to
27048         force the preservation of inline entry blocks that are
27049         otherwise unused, but do not preserve them.
27051 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
27053         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
27055 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
27057         PR target/84039
27058         * config/i386/constraints.md (Bs): Replace
27059         ix86_indirect_branch_register with
27060         TARGET_INDIRECT_BRANCH_REGISTER.
27061         (Bw): Likewise.
27062         * config/i386/i386.md (indirect_jump): Likewise.
27063         (tablejump): Likewise.
27064         (*sibcall_memory): Likewise.
27065         (*sibcall_value_memory): Likewise.
27066         Peepholes of indirect call and jump via memory: Likewise.
27067         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
27068         (*sibcall_value_GOT_32): Likewise.
27069         * config/i386/predicates.md (indirect_branch_operand): Likewise.
27070         (GOT_memory_operand): Likewise.
27071         (call_insn_operand): Likewise.
27072         (sibcall_insn_operand): Likewise.
27073         (GOT32_symbol_operand): Likewise.
27074         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
27076 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
27078         PR rtl-optimization/83496
27079         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
27080         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
27081         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
27082         redundant insn, if any.
27083         (relax_delay_slots): Likewise.
27084         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
27086 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
27088         PR tree-optimization/83965
27089         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
27090         that grouped statements are part of a reduction chain.  Return
27091         true if the statement is not marked as a reduction itself but
27092         is part of a group.
27093         (vect_recog_dot_prod_pattern): Don't check whether the statement
27094         is part of a group here.
27095         (vect_recog_sad_pattern): Likewise.
27096         (vect_recog_widen_sum_pattern): Likewise.
27098 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
27100         PR debug/84545
27101         * final.c (rest_of_clean_state): Also look for calls inside sequences.
27103 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
27105         PR target/84530
27106         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
27107         the bool argument.
27108         (ix86_output_indirect_function_return): New prototype.
27109         (ix86_split_simple_return_pop_internal): Likewise.
27110         * config/i386/i386.c (indirect_return_via_cx): New.
27111         (indirect_return_via_cx_bnd): Likewise.
27112         (indirect_thunk_name): Handle return va CX_REG.
27113         (output_indirect_thunk_function): Create alias for
27114         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
27115         (ix86_output_indirect_jmp): Remove the bool argument.
27116         (ix86_output_indirect_function_return): New function.
27117         (ix86_split_simple_return_pop_internal): Likewise.
27118         * config/i386/i386.md (*indirect_jump): Don't pass false
27119         to ix86_output_indirect_jmp.
27120         (*tablejump_1): Likewise.
27121         (simple_return_pop_internal): Change it to define_insn_and_split.
27122         Call ix86_split_simple_return_pop_internal to split it for
27123         -mfunction-return=.
27124         (simple_return_indirect_internal): Call
27125         ix86_output_indirect_function_return instead of
27126         ix86_output_indirect_jmp.
27128 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
27130         PR bootstrap/84405
27131         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
27132         memset and value initialization afterwards.
27134 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
27136         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
27138 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
27140         PR target/84521
27141         * common/config/aarch64/aarch64-common.c
27142         (aarch_option_optimization_table[]): Switch
27143         off fomit-frame-pointer
27145 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
27146             Chung-Ju Wu  <jasonwucj@gmail.com>
27148         * config/nds32/nds32-multiple.md (load_multiple): Disallow
27149         volatile memory.
27150         (store_multiple): Ditto.
27152 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
27154         * config.gcc: Add --with-cpu support for nds32 target.
27155         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
27156         * config/nds32/nds32.opt: Add -mcpu= option.
27158 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
27160         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
27161         isel=yes): Warn for these deprecated options.
27163 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
27165         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
27166         ISA_2_5_MASKS_EMBEDDED.
27168 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
27170         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
27171         p->max as pointers rather than using iterative_hash_expr.
27173 2018-02-23  Carl Love  <cel@us.ibm.com>
27175         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
27176         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
27177         BU_P8V_OVERLOAD_2.
27178         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
27179         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
27180         P8V_BUILTIN_VEC_VUNSIGNED2.
27182 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
27184         PR target/81572
27185         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
27186         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
27187         LRA_UNKNOWN_ALT.
27188         * lra-constraints.c (curr_insn_transform): Set up
27189         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
27190         LRA_UNKNOWN_ALT.
27191         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
27192         * lra-eliminations.c (spill_pseudos): Ditto.
27193         (process_insn_for_elimination): Ditto.
27194         * lra-lives.c (reg_early_clobber_p): Use the new macros.
27195         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
27196         LRA_NON_CLOBBERED_ALT.
27198 2018-02-22  Martin Sebor  <msebor@redhat.com>
27200         PR tree-optimization/84480
27201         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
27202         to maybe_diag_stxncpy_trunc.  Call it.
27203         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
27204         from gimple_fold_builtin_strcpy.  Print inlining stack.
27205         (handle_builtin_stxncpy): Print inlining stack.
27206         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
27208 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
27210         PR target/84176
27211         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
27212         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
27213         and -fcheck-pointer-bounds are used together.
27214         (indirect_thunk_prefix): New enum.
27215         (indirect_thunk_need_prefix): New function.
27216         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
27217         "_nt" instead of "_bnd" for NOTRACK prefix.
27218         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
27219         (output_indirect_thunk_function): Likewise.
27220         (): Likewise.
27221         (ix86_code_end): Update output_indirect_thunk_function calls.
27222         (ix86_output_indirect_branch_via_reg): Replace
27223         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
27224         (ix86_output_indirect_branch_via_push): Likewise.
27225         (ix86_output_function_return): Likewise.
27226         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
27227         incompatible with -fcf-protection=branch and
27228         -fcheck-pointer-bounds.
27230 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
27232         PR target/83335
27233         * config/aarch64/aarch64.c (aarch64_print_address_internal):
27234         Change gcc_assert call to output_operand_lossage.
27236 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
27238         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
27240 2018-02-22  DJ Delorie  <dj@redhat.com>
27241             Sebastian Perta  <sebastian.perta@renesas.com>
27242             Oleg Endo  <olegendo@gcc.gnu.org>
27244         * config/rx/rx.c (rx_rtx_costs): New function.
27245         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
27247 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
27249         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
27251 2018-02-22  Martin Liska  <mliska@suse.cz>
27253         PR driver/83193
27254         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
27255         Add "native" as a possible value.
27257 2018-02-22  Martin Liska  <mliska@suse.cz>
27259         PR driver/83193
27260         * config/i386/i386.c (ix86_option_override_internal):
27261         Add "native" as a possible value for -march and -mtune.
27263 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
27265         PR target/84502
27266         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
27267         to all type variants.
27269         PR tree-optimization/84503
27270         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
27271         width as info->bitpos + info->bitsize - start.
27272         (merged_store_group::merge_overlapping): Simplify width computation.
27273         (check_no_overlap): New function.
27274         (imm_store_chain_info::try_coalesce_bswap): Compute expected
27275         start + width and last_order of the group, fail if check_no_overlap
27276         fails.
27277         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
27278         to group if check_no_overlap fails.
27280 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
27282         * config/rs6000/altivec.md: Delete contraint arguments to
27283         define_expand, define_split, and define_peephole2, and in
27284         define_insn_and_split if always unused.
27285         * config/rs6000/darwin.md: Ditto.
27286         * config/rs6000/dfp.md: Ditto.
27287         * config/rs6000/rs6000.md: Ditto.
27288         * config/rs6000/sync.md: Ditto.
27289         * config/rs6000/vector.md: Ditto.
27290         * config/rs6000/vsx.md: Ditto.
27292 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
27294         * config/rs6000/altivec.md: Write output control strings as braced
27295         blocks instead of double-quoted strings.
27296         * config/rs6000/darwin.md: Ditto.
27297         * config/rs6000/rs6000.md: Ditto.
27298         * config/rs6000/vector.md: Ditto.
27299         * config/rs6000/vsx.md: Ditto.
27301 2018-02-21  Jason Merrill  <jason@redhat.com>
27303         PR c++/84314 - ICE with templates and fastcall attribute.
27304         * attribs.c (build_type_attribute_qual_variant): Remove assert.
27306 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
27308         * ipa-cp.c (determine_versionability): Fix comment typos.
27310 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
27312         PR c/84229
27313         * ipa-cp.c (determine_versionability): Do not version functions caling
27314         va_arg_pack.
27316 2018-02-21  Martin Liska  <mliska@suse.cz>
27318         PR driver/83193
27319         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
27320         Add "native" as a possible value.
27321         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
27322         the macro when native cpu detection is available.
27324 2018-02-21  Martin Liska  <mliska@suse.cz>
27326         PR driver/83193
27327         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
27328         Add "native" as a possible value.
27329         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
27330         when native cpu detection is available.
27332 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
27333             Martin Sebor  <msebor@redhat.com>
27335         PR tree-optimization/84478
27336         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
27337         false.
27338         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
27339         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
27340         support which is conservatively correct, for 2 only stay conservative
27341         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
27342         argument to the 2 argument get_range_strlen, adjust 6 arg
27343         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
27344         false.
27345         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
27346         (gimple_fold_builtin_strlen): Pass true as last argument to
27347         get_range_strlen.
27349 2018-02-20  Martin Sebor  <msebor@redhat.com>
27351         PR middle-end/84095
27352         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
27353         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
27354         (builtin_memref::builtin_memref): Factor out parts into
27355         set_base_and_offset and call it.
27357 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
27359         PR middle-end/84406
27360         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
27361         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
27362         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
27363         search at the associated MODE_INT.
27365 2018-02-20  Jeff Law  <law@redhat.com>
27367         PR middle-end/82123
27368         PR tree-optimization/81592
27369         PR middle-end/79257
27370         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
27371         for range data rather than using global data.
27372         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
27373         range data rather than using global data.
27374         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
27375         pass it to children as needed.
27376         (struct directive::fmtresult): Similarly.
27377         (struct directive::set_width): Similarly.
27378         (struct directive::set_precision): Similarly.
27379         (format_integer, format_directive, parse_directive): Similarly.
27380         (format_none): Accept unnamed vr_values parameter.
27381         (format_percent, format_floating, format_character): Similarly.
27382         (format_string, format_plain): Similarly.
27383         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
27384         the EVRP range analyzer for range data rather than using global data.
27385         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
27386         gimple-ssa-evrp-analyze.h
27387         (class sprintf_dom_walker): Add after_dom_children member function.
27388         Add evrp_range_analyzer member.
27389         (sprintf_dom_walker::before_dom_children): Call into the EVRP
27390         range analyzer as needed.
27391         (sprintf_dom_walker::after_dom_children): New member function.
27392         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
27393         if not optimizing.
27394         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
27395         (evrp_range_analyzer::pop_to_marker): Likewise.
27397 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
27399         PR tree-optimization/84419
27400         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
27401         with the required type if its current type is compatible but
27402         different.
27404 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
27406         PR middle-end/82004
27407         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
27408         after vectorization.
27410 2018-02-20  Martin Liska  <mliska@suse.cz>
27412         PR driver/83193
27413         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
27414         possible values if we don't have a hint.
27416 2018-02-20  Martin Liska  <mliska@suse.cz>
27418         PR c/84310
27419         PR target/79747
27420         * final.c (shorten_branches): Build align_tab array with one
27421         more element.
27422         * opts.c (finish_options): Add alignment option limit check.
27423         (MAX_CODE_ALIGN): Likewise.
27424         (MAX_CODE_ALIGN_VALUE): Likewise.
27425         * doc/invoke.texi: Document maximum allowed option value for
27426         all -falign-* options.
27428 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
27430         PR target/84146
27431         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
27432         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
27433         * var-tracking.c (emit_note_insn_var_location): Remove all references
27434         to NOTE_INSN_CALL_ARG_LOCATION.
27435         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
27436         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
27437         Use copy_rtx_if_shared.
27438         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
27439         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
27440         (dwarf2out_var_location): Remove handling of
27441         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
27442         on call_insn.
27443         * final.c (final_scan_insn): Remove all references to
27444         NOTE_INSN_CALL_ARG_LOCATION.
27445         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
27446         before dumping final insns.
27447         * except.c (emit_note_eh_region_end): Remove all references to
27448         NOTE_INSN_CALL_ARG_LOCATION.
27449         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
27450         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
27451         * config/arc/arc.c (hwloop_optimize): Likewise.
27452         * config/arm/arm.c (create_fix_barrier): Likewise.
27453         * config/s390/s390.c (s390_chunkify_start): Likewise.
27454         * config/sh/sh.c (find_barrier): Likewise.
27455         * config/i386/i386.c (rest_of_insert_endbranch,
27456         ix86_seh_fixup_eh_fallthru): Likewise.
27457         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
27458         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
27459         * config/frv/frv.c (frv_function_prologue): Likewise.
27460         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
27461         reg note.
27462         (note_outside_basic_block_p): Remove all references to
27463         NOTE_INSN_CALL_ARG_LOCATION.
27464         * gengtype.c (adjust_field_rtx_def): Likewise.
27465         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
27466         Likewise.
27467         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
27468         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
27470         PR c++/84444
27471         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
27472         is ADDR_EXPR.
27474         PR tree-optimization/84452
27475         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
27476         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
27477         is NULL.
27479 2018-02-19  Martin Liska  <mliska@suse.cz>
27481         PR sanitizer/82183
27482         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
27484 2018-02-19  Martin Liska  <mliska@suse.cz>
27485             Richard Sandiford  <richard.sandiford@linaro.org>
27487         PR tree-optimization/82491
27488         * gimple-fold.c (get_base_constructor): Make earlier bail out
27489         to prevent ubsan.
27491 2018-02-19  Carl Love  <cel@us.ibm.com>
27493         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
27494         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
27495         BU_P8V_OVERLOAD_1.
27496         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
27497         P8V_BUILTIN_VEC_NEG.
27499 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
27501         * config/rl78/rl78.md (movdf): New define expand.
27503 2018-02-19  Martin Liska  <mliska@suse.cz>
27505         PR other/80589
27506         * doc/invoke.texi: Fix typo.
27507         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
27509 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
27511         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
27512         handle rs6000_single_float and rs6000_double_float specially for
27513         e500 family CPUs.
27515 2018-02-16  Jeff Law  <law@redhat.com>
27517         * config/rx/rx.c (add_pop_cfi_notes): New function.;
27518         (pop_regs): Use it.
27520 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
27522         PR ipa/84425
27523         * ipa-inline.c (inline_small_functions): Fix a typo.
27525 2018-02-16  Nathan Sidwell  <nathan@acm.org>
27527         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
27529 2018-02-16  Carl Love  <cel@us.ibm.com>
27531         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
27532         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
27533         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
27534         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
27535         expansion to P8V_BUILTIN_VEC_FLOAT2.
27537 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
27539         PR rtl-optimization/70023
27540         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
27541         src_regno into account.
27543 2018-02-16  Carl Love  <cel@us.ibm.com>
27545         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
27546         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
27547         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
27548         * config/rs6000/rs6000.c: Remove case statements for
27549         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
27550         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
27551         and P9V_BUILTIN_VEC_VINSERT4B.
27552         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
27553         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
27554         * config/rs6000/vsx.md:
27555         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
27556         vec_insert4b.
27558 2018-02-16  Carl Love  <cel@us.ibm.com>
27560         * config/rs6000/altivec.h: Add builtin names vec_extract4b
27561         vec_insert4b.
27562         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
27563         definitions.
27564         * config/rs6000/rs6000-c.c: Add the definitions for
27565         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
27566         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
27567         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
27568         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
27569         definition for insert4b and define insn *insert3b_internal.
27570         * doc/extend.texi: Add documentation for vec_extract4b.
27572 2018-02-16  Nathan Sidwell  <nathan@acm.org>
27574         * doc/extend.texi (Backwards Compatibility): Mention friend
27575         injection.  Note for-scope is deprecated.
27576         * doc/invoke.texi (-ffriend-injection): Deprecate.
27578 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
27580         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
27581         that moved to I2, also allow destinations that are a paradoxical
27582         subreg (instead of a normal reg).
27584 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
27586         PR target/83831
27587         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
27588         to QImode.
27590 2018-02-16  Richard Biener  <rguenther@suse.de>
27592         PR tree-optimization/84037
27593         PR tree-optimization/84016
27594         PR target/82862
27595         * config/i386/i386.c (ix86_builtin_vectorization_cost):
27596         Adjust vec_construct for the fact we need additional higher latency
27597         128bit inserts for AVX256 and AVX512 vector builds.
27598         (ix86_add_stmt_cost): Scale vector construction cost for
27599         elementwise loads.
27601 2018-02-16  Richard Biener  <rguenther@suse.de>
27603         PR tree-optimization/84417
27604         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
27605         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
27606         (non_rewritable_lvalue_p): Likewise, use poly-ints.
27608 2018-02-16  Martin Liska  <mliska@suse.cz>
27610         PR sanitizer/84307
27611         * internal-fn.def (ASAN_CHECK): Set proper flags.
27612         (ASAN_MARK): Likewise.
27614 2018-02-16  Julia Koval  <julia.koval@intel.com>
27616         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
27617         from PTA_CANNONLAKE.
27619 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
27621         PR target/84272
27622         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
27623         Use ++iter rather than iter++ for std::list iterators.
27624         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
27625         defer deleting them until all nodes in the forest are processed.  Do
27626         free even leaf nodes.  Change to_process into auto_vec.
27628         PR bootstrap/84405
27629         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
27630         * vec.h (vec_default_construct): Use memset instead of placement new
27631         if BROKEN_VALUE_INITIALIZATION is defined.
27632         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
27633         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
27634         is defined.
27636         PR rtl-optimization/83723
27637         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
27638         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
27639         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
27640         recursive calls.
27641         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
27642         callers.
27643         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
27645 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
27647         PR rtl-optimization/81443
27648         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
27649         from inner REGs to paradoxical SUBREGs.
27651 2018-02-16  Richard Biener  <rguenther@suse.de>
27653         PR tree-optimization/84399
27654         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
27655         For operands we can analyze at their definition make sure we can
27656         analyze them at each use as well.
27658 2018-02-16  Richard Biener  <rguenther@suse.de>
27660         PR tree-optimization/84190
27661         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
27662         volatile accesses if the decl isn't volatile.
27664 2018-02-15  Jason Merrill  <jason@redhat.com>
27666         PR c++/84314 - ICE with templates and fastcall attribute.
27667         * attribs.c (build_type_attribute_qual_variant): Don't clobber
27668         TYPE_CANONICAL on an existing type.
27670 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
27672         PR tree-optimization/84383
27673         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
27674         dstoff nor call operand_equal_p if dstbase is NULL.
27676         PR tree-optimization/84334
27677         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
27678         also a CONSTANT_CLASS_P, punt.
27680 2018-02-14  Jim Wilson  <jimw@sifive.com>
27682         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
27683         first SMALL_OPERAND check.  New local min_second_step.  Move assert
27684         to where locals are set.  Add TARGET_RVC support.
27685         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
27687 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
27689         * doc/invoke.texi: Correct -Wformat-overflow code sample.
27691 2018-02-14  Martin Sebor  <msebor@redhat.com>
27693         PR tree-optimization/83698
27694         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
27695         arrays constrain the offset range to their bounds.
27696         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
27697         (builtin_access::overlap): Avoid setting the size of overlap if it's
27698         already been set.
27699         (maybe_diag_overlap): Also consider arrays when deciding what values
27700         of offsets to include in diagnostics.
27702 2018-02-14  Martin Sebor  <msebor@redhat.com>
27704         PR c/84108
27705         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
27706         that correspond to the kind of a declaration.
27708 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
27710         PR target/83984
27711         * config/pa/pa.md: Load address of PIC label using the linkage table
27712         if the label is nonlocal.
27714 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
27716         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
27717         warning message if user requests -maltivec=be.
27718         * doc/invoke.texi: Document deprecation of -maltivec=be.
27720 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
27722         PR target/84220
27723         * config/rs6000/rs6000-c.c: Update definitions for
27724         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
27725         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
27727 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
27729         PR target/84239
27730         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
27731         add _get_ssp intrinsics. Remove argument from
27732         __builtin_ia32_rdssp[d|q].
27733         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
27734         * config/i386/i386-builtin.def: Remove argument from
27735         __builtin_ia32_rdssp[d|q].
27736         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
27737         ix86_expand_special_args_builtin for _rdssp[d|q].
27738         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
27739         Clear register before usage.
27740         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
27741         Add documentation for new _get_ssp and _inc_ssp intrinsics.
27743 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
27745         PR tree-optimization/84357
27746         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
27747         operand 1 of an ARRAY_REF too.
27749 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
27751         PR target/83831
27752         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
27753         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
27754         declarations.
27755         (set_of_reg): New struct.
27756         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
27757         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
27758         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
27759         functions.
27760         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
27761         Split into bitclr, bitset, bitinvert patterns if appropriate.
27762         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
27763         use rx_fuse_in_memory_bitop.
27764         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
27765         to named insn, correct maximum insn length.
27767 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
27769         PR target/79242
27770         * machmode.def: Define a complex mode for PARTIAL_INT.
27771         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
27772         MODE_PARTIAL_INT.
27773         * doc/rtl.texi: Document CSPImode.
27774         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
27775         handling.
27776         (msp430_hard_regno_nregs_with_padding): Likewise.
27778 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
27780         PR target/84279
27781         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
27783 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
27785         PR rtl-optimization/84169
27786         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
27787         we generated a parallel as new i3 and we split that to new i2 and i3
27788         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
27789         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
27790         those to i2, not i1.  Partially rewrite this scan code.
27792 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
27794         PR c/82210
27795         * stor-layout.c (place_field): For variable length fields, adjust
27796         offset_align afterwards not just based on the field's alignment,
27797         but also on the size.
27799         PR middle-end/84309
27800         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
27801         of exps and logs in the use_exp2 case.
27803 2018-02-13  Jeff Law  <law@redhat.com>
27805         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
27806         entry for "vector".
27808         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
27809         ARGS as unused.
27811 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
27813         PR debug/84342
27814         PR debug/84319
27815         * common.opt (gas-loc-support, gas-locview-support): New.
27816         (ginline-points, ginternal-reset-location-views): New.
27817         * doc/invoke.texi: Document them.  Use @itemx where intended.
27818         (gvariable-location-views): Adjust.
27819         * target.def (reset_location_view): New.
27820         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
27821         (TARGET_RESET_LOCATION_VIEW): New.
27822         * doc/tm.texi: Rebuilt.
27823         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
27824         (dwarf2out_default_as_locview_support): New.
27825         (output_asm_line_debug_info): Use option variables.
27826         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
27827         (output_loc_list): Likewise.
27828         (add_high_low_attributes): Check option variables.
27829         Don't output entry view attribute in strict mode.
27830         (gen_inlined_subroutine_die): Check option variables.
27831         (dwarf2out_inline_entry): Likewise.
27832         (init_sections_and_labels): Likewise.
27833         (dwarf2out_early_finish): Likewise.
27834         (maybe_reset_location_view): New, from...
27835         (dwarf2out_var_location): ... here.  Call it.
27836         * debug.h (dwarf2out_default_as_loc_support): Declare.
27837         (dwarf2out_default_as_locview_support): Declare.
27838         * hooks.c (hook_int_rtx_insn_0): New.
27839         * hooks.h (hook_int_rtx_insn_0): Declare.
27840         * toplev.c (process_options): Take -gas-loc-support and
27841         -gas-locview-support from dwarf2out.  Enable
27842         -gvariable-location-views by default only with locview
27843         assembler support.  Enable -ginternal-reset-location-views by
27844         default only if the target defines the corresponding hook.
27845         Enable -ginline-points by default if location views are
27846         enabled; force it disabled if statement frontiers are
27847         disabled.
27848         * tree-inline.c (expand_call_inline): Check option variables.
27849         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
27851 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
27853         PR tree-optimization/84321
27854         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
27855         handling.  Also check whether the anti-range contains any values
27856         that satisfy the mask; switch to a VR_RANGE if not.
27858 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
27860         PR sanitizer/84340
27861         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
27863 2018-02-13  Martin Jambor  <mjambor@suse.cz>
27865         PR c++/83990
27866         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
27867         of call statements, also set location of a load to a temporary.
27869 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
27871         * config/rl78/rl78.c (add_vector_labels): New function.
27872         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
27873         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
27874         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
27875         which checks that no arguments are passed.
27876         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
27877         * doc/extend.texi: Documentation for the new attribute.
27879 2018-02-13  Andreas Schwab  <schwab@suse.de>
27881         * config/riscv/linux.h (CPP_SPEC): Define.
27883 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
27885         PR target/84335
27886         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
27887         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
27888         OPTION_MASK_ISA_AES as first argument to def_builtin_const
27889         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
27890         instead of OPTION_MASK_ISA_PCLMUL as first argument to
27891         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
27892         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
27893         temporarily for AES and PCLMUL builtins.
27895         PR tree-optimization/84339
27896         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
27897         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
27898         Formatting fixes.
27900         PR middle-end/84309
27901         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
27902         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
27903         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
27904         inline function.
27905         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
27906         inline function.
27907         * omp-simd-clone.h: New file.
27908         * omp-simd-clone.c: Include omp-simd-clone.h.
27909         (expand_simd_clones): No longer static.
27910         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
27911         cgraph.h and omp-simd-clone.h.
27912         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
27913         (vect_recog_widen_shift_pattern): Formatting fix.
27914         (vect_pattern_recog_1): Don't check optab for calls.
27916         PR target/84336
27917         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
27918         operands[2] into a REG before using gen_lowpart on it.
27920 2018-02-12  Jeff Law  <law@redhat.com>
27922         PR target/83760
27923         * config/sh/sh.c (find_barrier): Consider a sibling call
27924         a barrier as well.
27926         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
27927         successfully back substituting a reg.
27929 2018-02-12  Richard Biener  <rguenther@suse.de>
27931         PR tree-optimization/84037
27932         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
27933         parameter, move visited init to caller.
27934         (vect_slp_analyze_operations): Separate cost from validity
27935         check, initialize visited once for all instances.
27936         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
27937         for all instances.
27938         * tree-vect-stmts.c (vect_model_simple_cost): Make early
27939         out an assert.
27940         (vect_model_promotion_demotion_cost): Likewise.
27941         (vectorizable_bswap): Guard cost modeling with !slp_node
27942         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
27943         SLP stmts.
27944         (vectorizable_call): Likewise.
27945         (vectorizable_conversion): Likewise.
27946         (vectorizable_assignment): Likewise.
27947         (vectorizable_shift): Likewise.
27948         (vectorizable_operation): Likewise.
27949         (vectorizable_store): Likewise.
27950         (vectorizable_load): Likewise.
27951         (vectorizable_condition): Likewise.
27952         (vectorizable_comparison): Likewise.
27954 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
27956         PR sanitizer/84307
27957         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
27958         (ASAN_MARK): Fix fnspec to account for return value, change pointer
27959         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
27961 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
27963         PR middle-end/83665
27964         * params.def (inline-min-speedup): Increase from 8 to 15.
27965         (max-inline-insns-auto): Decrease from 40 to 30.
27966         * ipa-split.c (consider_split): Add some buffer for function to
27967         be considered inlining candidate.
27968         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
27969         default values.
27971 2018-02-12  Richard Biener  <rguenther@suse.de>
27973         PR tree-optimization/84037
27974         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
27975         matched stmts if we cannot swap the non-matched ones.
27977 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
27979         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
27980         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
27981         _mm_maskz_scalef_round_ss): New intrinsics.
27982         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
27983         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
27984         __builtin_ia32_scalefss_round): Remove.
27985         (__builtin_ia32_scalefsd_mask_round,
27986         __builtin_ia32_scalefss_mask_round): New intrinsics.
27987         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
27988         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
27989         ((match_operand:VF_128 2 "<round_nimm_predicate>"
27990         "<round_constraint>")): Changed to ...
27991         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
27992         "<round_scalar_constraint>")): ... this.
27993         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
27994         %0, %1, %2<round_op3>}"): Changed to ...
27995         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
27996         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
27997         %2<round_scalar_mask_op3>}"): ... this.
27998         * config/i386/subst.md (round_scalar_nimm_predicate): New.
28000 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
28002         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
28003         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
28004         (_mm_maskz_sqrt_round_ss): New intrinsics.
28005         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
28006         (__builtin_ia32_sqrtsd_mask_round)
28007         (__builtin_ia32_sqrtss_mask_round): New builtins.
28008         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
28009         (__builtin_ia32_sqrtss_round): Remove.
28010         (__builtin_ia32_sqrtsd_mask_round)
28011         (__builtin_ia32_sqrtss_mask_round): New builtins.
28012         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
28013         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
28014         ((match_operand:VF_128 1 "vector_operand"
28015         "xBm,<round_constraint>")): Changed to ...
28016         ((match_operand:VF_128 1 "vector_operand"
28017         "xBm,<round_scalar_constraint>")): ... this.
28018         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
28019         %0, %2, %<iptr>1<round_op3>}): Changed to ...
28020         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
28021         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
28022         %<iptr>1<round_scalar_mask_op3>}): ... this.
28023         ((set_attr "prefix" "<round_prefix>")): Changed to ...
28024         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
28026 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
28028         PR target/84266
28029         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
28030         Cast vec_cmpeq result to correct type.
28031         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
28032         Cast vec_cmpgt result to correct type.
28034 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
28036         * final.c (final_scan_insn_1): Renamed from...
28037         (final_scan_insn): ... this.  New wrapper, to recover
28038         seen from the outermost call in recursive ones.
28039         * config/sparc/sparc.c (output_return): Drop seen from call.
28040         (output_sibcall): Likewise.
28041         * config/visium/visium.c (output_branch): Likewise.
28043 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
28045         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
28046         function label.
28048 2018-02-10  Alan Modra  <amodra@gmail.com>
28050         PR target/84300
28051         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
28052         Specify LR as an input.
28054 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
28056         PR sanitizer/83987
28057         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
28058         remove_member_access_dummy_vars): New functions.
28059         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
28060         lower_omp_1, execute_lower_omp): Use them.
28062         PR rtl-optimization/84308
28063         * shrink-wrap.c (spread_components): Release todo vector.
28065 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
28067         PR rtl-optimization/57193
28068         * ira-color.c (struct allocno_color_data): Add member
28069         conflict_allocno_hard_prefs.
28070         (update_conflict_allocno_hard_prefs): New.
28071         (bucket_allocno_compare_func): Add a preference based on
28072         conflict_allocno_hard_prefs.
28073         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
28074         (color_allocnos): Remove a dead code.  Initiate
28075         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
28077 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
28079         PR target/84226
28080         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
28081         constraint from =wa to wa.  Avoid a subreg on the output operand,
28082         instead use a pseudo and subreg it in a move.
28083         (p9_xxbrd_<mode>): Changed to ...
28084         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
28085         (p9_xxbrd_v2df): New expander.
28086         (p9_xxbrw_<mode>): Changed to ...
28087         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
28088         (p9_xxbrw_v4sf): New expander.
28090 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
28092         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
28094 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
28096         PR target/83926
28097         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
28098         multiply in 32-bit mode.
28099         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
28100         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
28101         mode.
28103 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
28105         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
28106         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
28107         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
28108         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
28110 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
28112         PR lto/84213
28113         * dwarf2out.c (is_trivial_indirect_ref): New function.
28114         (dwarf2out_late_global_decl): Do not generate a location
28115         attribute for variables that have a non-trivial DECL_VALUE_EXPR
28116         and that are not defined in the current unit.
28118 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
28120         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
28121         instead of a libcall for UNORDERED.
28123 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
28125         PR target/82641
28126         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
28127         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
28129 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
28131         PR target/PR84295
28132         * config/s390/s390.c (s390_set_current_function): Invoke
28133         s390_indirect_branch_settings also if fndecl didn't change.
28135 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
28137         * config/rs6000/rs6000.md (blockage): Set length to zero.
28139 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
28141         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
28143 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
28145         PR sanitizer/84285
28146         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
28147         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
28148         -static-lib*san.
28150         PR debug/84252
28151         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
28152         PARALLEL incoming that failed vt_get_decl_and_offset check.
28154         PR middle-end/84237
28155         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
28156         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
28157         TREE_READONLY bit.
28158         (get_variable_section): For decls in named .bss* sections pass true as
28159         second argument to bss_initializer_p.
28161 2018-02-09  Marek Polacek  <polacek@redhat.com>
28162             Jakub Jelinek  <jakub@redhat.com>
28164         PR c++/83659
28165         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
28166         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
28167         Sync some changes from cxx_fold_indirect_ref.
28169 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
28171         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
28172         markers.
28173         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
28174         (BLOCK_INLINE_ENTRY_LABEL): New.
28175         (dwarf2out_var_location): Disregard inline entry markers.
28176         (inline_entry_data): New struct.
28177         (inline_entry_data_hasher): New hashtable type.
28178         (inline_entry_data_hasher::hash): New.
28179         (inline_entry_data_hasher::equal): New.
28180         (inline_entry_data_table): New variable.
28181         (add_high_low_attributes): Add DW_AT_entry_pc and
28182         DW_AT_GNU_entry_view attributes if a pending entry is found
28183         in inline_entry_data_table.  Add old entry_pc attribute only
28184         if debug nonbinding markers are disabled.
28185         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
28186         markers are enabled.
28187         (block_within_block_p, dwarf2out_inline_entry): New.
28188         (dwarf2out_finish): Check that no entries remained in
28189         inline_entry_data_table.
28190         * final.c (reemit_insn_block_notes): Handle inline entry notes.
28191         (final_scan_insn, notice_source_line): Likewise.
28192         (rest_of_clean_state): Skip inline entry markers.
28193         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
28194         markers.
28195         * gimple.c (gimple_build_debug_inline_entry): New.
28196         * gimple.h (enum gimple_debug_subcode): Add
28197         GIMPLE_DEBUG_INLINE_ENTRY.
28198         (gimple_build_debug_inline_entry): Declare.
28199         (gimple_debug_inline_entry_p): New.
28200         (gimple_debug_nonbind_marker_p): Adjust.
28201         * insn-notes.def (INLINE_ENTRY): New.
28202         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
28203         inline entry marker notes.
28204         (print_insn): Likewise.
28205         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
28206         (INSN_DEBUG_MARKER_KIND): Likewise.
28207         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
28208         * tree-inline.c (expand_call_inline): Build and insert
28209         debug_inline_entry stmt.
28210         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
28211         inline entry blocks early, if nonbind markers are enabled.
28212         (dump_scope_block): Dump fragment info.
28213         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
28214         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
28215         (gimple_build_debug_inline_entry): New.
28216         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
28217         Enable/disable inline entry points too.
28218         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
28219         (DEBUG_INSN): Describe inline entry markers.
28221         * common.opt (gvariable-location-views): New.
28222         (gvariable-location-views=incompat5): New.
28223         * config.in: Rebuilt.
28224         * configure: Rebuilt.
28225         * configure.ac: Test assembler for view support.
28226         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
28227         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
28228         * dwarf2out.c (var_loc_view): New typedef.
28229         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
28230         (dwarf2out_locviews_in_attribute): New.
28231         (dwarf2out_locviews_in_loclist): New.
28232         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
28233         (enum dw_line_info_opcode): Add LI_adv_address.
28234         (struct dw_line_info_table): Add view.
28235         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
28236         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
28237         (zero_view_p): New variable.
28238         (ZERO_VIEW_P): New macro.
28239         (output_asm_line_debug_info): New.
28240         (struct var_loc_node): Add view.
28241         (add_AT_view_list, AT_loc_list): New.
28242         (add_var_loc_to_decl): Add view param.  Test it against last.
28243         (new_loc_list): Add view params.  Record them.
28244         (AT_loc_list_ptr): Handle loc and view lists.
28245         (view_list_to_loc_list_val_node): New.
28246         (print_dw_val): Handle dw_val_class_view_list.
28247         (size_of_die): Likewise.
28248         (value_format): Likewise.
28249         (loc_list_has_views): New.
28250         (gen_llsym): Set vl_symbol too.
28251         (maybe_gen_llsym, skip_loc_list_entry): New.
28252         (dwarf2out_maybe_output_loclist_view_pair): New.
28253         (output_loc_list): Output view list or entries too.
28254         (output_view_list_offset): New.
28255         (output_die): Handle dw_val_class_view_list.
28256         (output_dwarf_version): New.
28257         (output_compilation_unit_header): Use it.
28258         (output_skeleton_debug_sections): Likewise.
28259         (output_rnglists, output_line_info): Likewise.
28260         (output_pubnames, output_aranges): Update version comments.
28261         (output_one_line_info_table): Output view numbers in asm comments.
28262         (dw_loc_list): Determine current endview, pass it to new_loc_list.
28263         Call maybe_gen_llsym.
28264         (loc_list_from_tree_1): Adjust.
28265         (add_AT_location_description): Create view list attribute if
28266         needed, check it's absent otherwise.
28267         (convert_cfa_to_fb_loc_list): Adjust.
28268         (maybe_emit_file): Call output_asm_line_debug_info for test.
28269         (dwarf2out_var_location): Reset views as needed.  Precompute
28270         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
28271         attribute.  Set view.
28272         (new_line_info_table): Reset next view.
28273         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
28274         (dwarf2out_source_line): Likewise.  Output view resets and labels to
28275         the assembler, or select appropriate line info opcodes.
28276         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
28277         (optimize_string_length): Catch it.  Adjust.
28278         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
28279         dw_val_class_view_list, and remove it if no longer needed.
28280         (hash_loc_list): Hash view numbers.
28281         (loc_list_hasher::equal): Compare them.
28282         (optimize_location_lists): Check whether a view list symbol is
28283         needed, and whether the locview attribute is present, and
28284         whether they match.  Remove the locview attribute if no longer
28285         needed.
28286         (index_location_lists): Call skip_loc_list_entry for test.
28287         (dwarf2out_finish): Call output_asm_line_debug_info for test.
28288         Use output_dwarf_version.
28289         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
28290         (struct dw_val_node): Add val_view_list.
28291         * final.c (SEEN_NEXT_VIEW): New.
28292         (set_next_view_needed): New.
28293         (clear_next_view_needed): New.
28294         (maybe_output_next_view): New.
28295         (final_start_function): Rename to...
28296         (final_start_function_1): ... this.  Take pointer to FIRST,
28297         add SEEN parameter.  Emit param bindings in the initial view.
28298         (final_start_function): Reintroduce SEEN-less interface.
28299         (final): Rename to...
28300         (final_1): ... this.  Take SEEN parameter.  Output final pending
28301         next view at the end.
28302         (final): Reintroduce seen-less interface.
28303         (final_scan_insn): Output pending next view before switching
28304         sections or ending a block.  Mark the next view as needed when
28305         outputting variable locations.  Notify debug backend of section
28306         changes, and of location view changes.
28307         (rest_of_handle_final): Adjust.
28308         * toplev.c (process_options): Autodetect value for debug variable
28309         location views option.  Warn on incompat5 without -gdwarf-5.
28310         * doc/invoke.texi (gvariable-location-views): New.
28311         (gvariable-location-views=incompat5): New.
28312         (gno-variable-location-views): New.
28314 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
28316         PR tree-optimization/84136
28317         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
28318         that the result of find_edge is non-NULL.
28320 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
28322         PR target/83008
28323         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
28324         storing integer register in SImode.  Fix cost of 256 and 512
28325         byte aligned SSE register store.
28327 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
28329         * config/i386/i386.c (ix86_multiplication_cost): Fix
28330         multiplication cost for TARGET_AVX512DQ.
28332 2018-02-08  Marek Polacek  <polacek@redhat.com>
28334         PR tree-optimization/84238
28335         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
28336         get_range_strlen.
28338 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
28340         PR tree-optimization/84265
28341         * tree-vect-stmts.c (vectorizable_store): Don't treat
28342         VMAT_CONTIGUOUS accesses as grouped.
28343         (vectorizable_load): Likewise.
28345 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
28347         PR tree-optimization/81635
28348         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
28349         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
28350         (test_round_for_mask): New functions.
28351         (wide_int_cc_tests): Call test_round_for_mask.
28352         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
28353         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
28354         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
28355         range returned by get_range_info.
28357 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
28359         PR ipa/81360
28360         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
28361         * symtab.c: Include builtins.h
28362         (symtab_node::output_to_lto_symbol_table_p): Move here
28363         from lto-streamer-out.c:output_symbol_p.
28364         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
28365         (output_symbol_p): Move all logic to symtab.c
28366         (produce_symtab): Update.
28368 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
28370         * config/s390/s390-opts.h (enum indirect_branch): Define.
28371         * config/s390/s390-protos.h (s390_return_addr_from_memory)
28372         (s390_indirect_branch_via_thunk)
28373         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
28374         (enum s390_indirect_branch_type): Define.
28375         * config/s390/s390.c (struct s390_frame_layout, struct
28376         machine_function): Remove.
28377         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
28378         (indirect_branch_table_label_no, indirect_branch_table_name):
28379         Define variables.
28380         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
28381         (enum s390_indirect_branch_option): Define.
28382         (s390_return_addr_from_memory): New function.
28383         (s390_handle_string_attribute): New function.
28384         (s390_attribute_table): Add new attribute handler.
28385         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
28386         (s390_indirect_branch_via_thunk): New function.
28387         (s390_indirect_branch_via_inline_thunk): New function.
28388         (s390_function_ok_for_sibcall): When jumping via thunk disallow
28389         sibling call optimization for non z10 compiles.
28390         (s390_emit_call): Force indirect branch target to be a single
28391         register.  Add r1 clobber for non-z10 compiles.
28392         (s390_emit_epilogue): Emit return jump via return_use expander.
28393         (s390_reorg): Handle JUMP_INSNs as execute targets.
28394         (s390_option_override_internal): Perform validity checks for the
28395         new command line options.
28396         (s390_indirect_branch_attrvalue): New function.
28397         (s390_indirect_branch_settings): New function.
28398         (s390_set_current_function): Invoke s390_indirect_branch_settings.
28399         (s390_output_indirect_thunk_function):  New function.
28400         (s390_code_end): Implement target hook.
28401         (s390_case_values_threshold): Implement target hook.
28402         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
28403         macros.
28404         * config/s390/s390.h (struct s390_frame_layout)
28405         (struct machine_function): Move here from s390.c.
28406         (TARGET_INDIRECT_BRANCH_NOBP_RET)
28407         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
28408         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
28409         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
28410         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
28411         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
28412         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
28413         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
28414         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
28415         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
28416         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
28417         (mnemonic attribute): Add values which aren't recognized
28418         automatically.
28419         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
28420         pattern for branch conversion.  Fix mnemonic attribute.
28421         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
28422         indirect branch via thunk if requested.
28423         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
28424         ("*indirect_jump"): Disable for branch conversion using out of
28425         line thunks.
28426         ("indirect_jump_via_thunk<mode>_z10")
28427         ("indirect_jump_via_thunk<mode>")
28428         ("indirect_jump_via_inlinethunk<mode>_z10")
28429         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
28430         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
28431         ("casesi_jump_via_inlinethunk<mode>_z10")
28432         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
28433         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
28434         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
28435         ("*indirect2_jump"): Disable for branch conversion.
28436         ("casesi_jump"): Turn into expander and expand patterns for branch
28437         conversion.
28438         ("return_use"): New expander.
28439         ("*return"): Emit return via thunk and rename it to ...
28440         ("*return<mode>"): ... this one.
28441         * config/s390/s390.opt: Add new options and and enum for the
28442         option values.
28444 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
28446         * lra-constraints.c (match_reload): Unconditionally use
28447         gen_lowpart_SUBREG, rather than selecting between that
28448         and equivalent gen_rtx_SUBREG code.
28450 2018-02-08  Richard Biener  <rguenther@suse.de>
28452         PR tree-optimization/84233
28453         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
28454         changed flag instead of boguously re-using phi_inserted.
28456 2018-02-08  Martin Jambor  <mjambor@suse.cz>
28458         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
28459         static local variables.
28461 2018-02-08  Richard Biener  <rguenther@suse.de>
28463         PR tree-optimization/84278
28464         * tree-vect-stmts.c (vectorizable_store): When looking for
28465         smaller vector types to perform grouped strided loads/stores
28466         make sure the mode is supported by the target.
28467         (vectorizable_load): Likewise.
28469 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
28471         * config/aarch64/aarch64.c (aarch64_components_for_bb):
28472         Increase LDP/STP opportunities by adding adjacent callee-saves.
28474 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
28476         PR rtl-optimization/84068
28477         PR rtl-optimization/83459
28478         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
28480 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
28482         PR tree-optimization/84224
28483         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
28484         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
28485         non-zero arguments.
28487 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
28489         PR target/84113
28490         * config/rs6000/altivec.md (*restore_world): Remove LR use.
28491         * config/rs6000/predicates.md (restore_world_operation): Adjust op
28492         count, remove one USE.
28494 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
28496         * doc/install.texi (Configuration): Document the
28497         --with-long-double-format={ibm,ieee} PowerPC configuration
28498         options.
28500         PR target/84154
28501         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
28502         Convert from define_expand to be define_insn_and_split.  Rework
28503         float/double/_Float128 conversions to QI/HI/SImode to work with
28504         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
28505         conversions to QI/HImode types did a store and then a load to
28506         truncate the value.  For conversions to VSX registers, don't split
28507         the insn, instead emit the code directly.  Use the code iterator
28508         any_fix to combine signed and unsigned conversions.
28509         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
28510         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
28511         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
28512         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
28513         (fix_<mode>di2_hw): Likewise.
28514         (fixuns_<mode>di2_hw): Likewise.
28515         (fix_<mode>si2_hw): Likewise.
28516         (fixuns_<mode>si2_hw): Likewise.
28517         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
28518         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
28519         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
28520         fix<uns>_trunc<SFDF:mode>si2_p8.
28521         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
28522         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
28523         (fix<uns>_<mode>_mem): Likewise.
28524         (fctiw<u>z_<mode>_mem): Likewise.
28525         (fix<uns>_<mode>_mem): Likewise.
28526         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
28527         the register allocator from doing a direct move to the GPRs to do
28528         a store, and instead use the ISA 3.0 store byte/half-word from
28529         vector register instruction.  For IEEE 128-bit floating point,
28530         also optimize stores of 32-bit ints.
28531         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
28533 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
28535         * genextract.c (push_pathstr_operand): New function to support
28536         [a-zA-Z].
28537         (walk_rtx): Call push_pathstr_operand.
28538         (print_path): Support [a-zA-Z].
28540 2018-02-07  Richard Biener  <rguenther@suse.de>
28542         PR tree-optimization/84037
28543         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
28544         (cse_and_gimplify_to_preheader): Declare.
28545         (vect_get_place_in_interleaving_chain): Likewise.
28546         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
28547         ivexpr_map.
28548         (_loop_vec_info::~_loop_vec_info): Delete it.
28549         (cse_and_gimplify_to_preheader): New function.
28550         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
28551         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
28552         (vectorizable_load): Likewise.  For grouped stores always base
28553         the IV on the first element.
28554         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
28555         condition before gimplifying.
28557 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
28559         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
28560         *DIV_EXPR and *MOD_EXPR.
28562 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
28564         PR target/84248
28565         * config/i386/i386.c (ix86_option_override_internal): Mask out
28566         the CF_SET bit when checking -fcf-protection.
28568 2018-02-07  Tom de Vries  <tom@codesourcery.com>
28570         PR libgomp/84217
28571         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
28572         enough.
28574 2018-02-07  Richard Biener  <rguenther@suse.de>
28576         PR tree-optimization/84204
28577         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
28578         this place.
28580         PR tree-optimization/84205
28581         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
28582         special-case isl_ast_op_zdiv_r.
28584         PR tree-optimization/84223
28585         * graphite-scop-detection.c (gather_bbs::before_dom_children):
28586         Only add conditions from within the region.
28587         (gather_bbs::after_dom_children): Adjust.
28589 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
28591         PR target/84209
28592         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
28593         * config/avr/avr.md: Only post-reload split REG-REG moves if
28594         either register is GENERAL_REG_P.
28596 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
28598         PR tree-optimization/84235
28599         * tree-ssa-scopedtables.c
28600         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
28601         if the subtraction is performed in floating point type where NaNs are
28602         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
28603         build 1.  Formatting fix.
28605 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
28607         PR target/84146
28608         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
28609         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
28610         and skip it regardless of bb boundaries.  Use CALL_P macro,
28611         don't test INSN_P (insn) together with CALL_P or JUMP_P check
28612         unnecessarily, formatting fix.
28614 2018-02-06  Michael Collison  <michael.collison@arm.com>
28616         * config/arm/thumb2.md:
28617         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
28618         (*thumb_mov_notscc): Ditto.
28620 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
28622         PR target/84154
28623         * config/rs6000/rs6000.md (su code attribute): Use "u" for
28624         unsigned_fix, not "s".
28626 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
28628         * configure.ac (gcc_fn_eh_frame_ro): New function.
28629         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
28630         correct .eh_frame permissions.
28631         * configure: Regenerate.
28633 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
28635         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
28636         irrelevant options.
28638 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
28640         * config/rs6000/rs6000.c (rs6000_option_override_internal):
28641         Display warning message for -mno-speculate-indirect-jumps.
28643 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
28645         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
28646         Undocumented.
28647         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
28649 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
28651         PR tree-optimization/84225
28652         * tree-eh.c (find_trapping_overflow): Only call
28653         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
28655 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
28657         PR target/84145
28658         * config/i386/i386.c: Reimplement the check of possible options
28659         -mibt/-mshstk conbination. Change error messages.
28660         * doc/invoke.texi: Fix a typo: remove extra '='.
28662 2018-02-06  Marek Polacek  <polacek@redhat.com>
28664         PR tree-optimization/84228
28665         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
28667 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
28669         PR target/82641
28670         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
28671         emitted arch directives.
28672         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
28673         __ARM_FEATURE_COPROC before changing architectures.
28675 2018-02-06  Richard Biener  <rguenther@suse.de>
28677         * config/i386/i386.c (print_reg): Fix typo.
28678         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
28680 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
28682         * configure: Regenerate.
28684 2018-02-05  Martin Sebor  <msebor@redhat.com>
28686         PR tree-optimization/83369
28687         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
28688         inlining context.
28690 2018-02-05  Martin Liska  <mliska@suse.cz>
28692         * doc/invoke.texi: Cherry-pick upstream r323995.
28694 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
28696         * ira.c (ira_init_register_move_cost): Adjust comment.
28698 2018-02-05  Martin Liska  <mliska@suse.cz>
28700         PR gcov-profile/84137
28701         * doc/gcov.texi: Fix typo in documentation.
28703 2018-02-05  Martin Liska  <mliska@suse.cz>
28705         PR gcov-profile/83879
28706         * doc/gcov.texi: Document necessity of --dynamic-list-data when
28707         using dlopen functionality.
28709 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
28711         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
28712         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
28713         _mm_maskz_range_ss, _mm_mask_range_round_ss,
28714         _mm_maskz_range_round_ss): New intrinsics.
28715         (__builtin_ia32_rangesd128_round)
28716         (__builtin_ia32_rangess128_round): Remove.
28717         (__builtin_ia32_rangesd128_mask_round,
28718         __builtin_ia32_rangess128_mask_round): New builtins.
28719         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
28720         __builtin_ia32_rangess128_round): Remove.
28721         (__builtin_ia32_rangesd128_mask_round,
28722         __builtin_ia32_rangess128_mask_round): New builtins.
28723         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
28724         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
28725         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
28726         "<round_saeonly_constraint>")): Changed to ...
28727         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
28728         "<round_saeonly_scalar_constraint>")): ... this.
28729         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
28730         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
28731         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
28732         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
28733         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
28735 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
28737         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
28738         options.
28739         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
28740         Remove all values except native, 8540 and 8548.
28742 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
28744         * config/i386/i386.c (ix86_output_function_return): Pass
28745         INVALID_REGNUM, instead of -1, as invalid register number to
28746         indirect_thunk_name and output_indirect_thunk.
28748 2018-02-02  Julia Koval  <julia.koval@intel.com>
28750         * config.gcc: Add -march=icelake.
28751         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
28752         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
28753         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
28754         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
28755         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
28756         (processor_target_table): Add icelake.
28757         (ix86_option_override_internal): Handle new PTAs.
28758         (get_builtin_code_for_version): Handle icelake.
28759         (M_INTEL_COREI7_ICELAKE): New.
28760         (fold_builtin_cpu): Handle icelake.
28761         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
28762         * doc/invoke.texi: Add -march=icelake.
28764 2018-02-02  Julia Koval  <julia.koval@intel.com>
28766         * config/i386/i386.c (ix86_option_override_internal): Change flags type
28767         to wide_int_bitmask.
28768         * wide-int-bitmask.h: New.
28770 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
28772         PR target/84066
28773         * config/i386/i386.md: Replace Pmode with word_mode in
28774         builtin_setjmp_setup and builtin_longjmp to support x32.
28776 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
28778         PR target/56010
28779         PR target/83743
28780         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
28781         #include "opts.h".
28782         (rs6000_supported_cpu_names): New static variable.
28783         (linux_cpu_translation_table): Likewise.
28784         (elf_platform) <cpu>: Define new static variable and use it.
28785         Translate kernel AT_PLATFORM name to canonical name if needed.
28786         Error if platform name is unknown.
28788 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
28790         PR target/84089
28791         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
28793 2018-02-01  Jeff Law  <law@redhat.com>
28795         PR target/84128
28796         * config/i386/i386.c (release_scratch_register_on_entry): Add new
28797         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
28798         the scratch if RELEASE_VIA_POP is false.
28799         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
28800         If we have to save a temporary register, decrement SIZE appropriately.
28801         Pass new arguments to release_scratch_register_on_entry.
28802         (ix86_adjust_stack_and_probe): Likewise.
28803         (ix86_emit_probe_stack_range): Pass new arguments to
28804         release_scratch_register_on_entry.
28806 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
28808         PR rtl-optimization/84157
28809         * combine.c (change_zero_ext): Use REG_P predicate in
28810         front of HARD_REGISTER_P predicate.
28812 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
28814         * config/avr/avr.c (avr_option_override): Move disabling of
28815         -fdelete-null-pointer-checks to...
28816         * common/config/avr/avr-common.c (avr_option_optimization_table):
28817         ...here.
28819 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
28821         PR tree-optimization/81635
28822         * tree-data-ref.c (split_constant_offset_1): For types that
28823         wrap on overflow, try to use range info to prove that wrapping
28824         cannot occur.
28826 2018-02-01  Renlin Li  <renlin.li@arm.com>
28828         PR target/83370
28829         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
28830         TAILCALL_ADDR_REGS.
28831         (aarch64_register_move_cost): Likewise.
28832         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
28833         TAILCALL_ADDR_REGS.
28834         (REG_CLASS_NAMES): Likewise.
28835         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
28836         TAILCALL_ADDR_REGS. Remove IP registers.
28837         * config/aarch64/aarch64.md (Ucs): Update register constraint.
28839 2018-02-01  Richard Biener  <rguenther@suse.de>
28841         * domwalk.h (dom_walker::dom_walker): Add additional constructor
28842         for specifying RPO order and allow NULL for that.
28843         * domwalk.c (dom_walker::dom_walker): Likewise.
28844         (dom_walker::walk): Handle NULL RPO order.
28845         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
28846         in RPO order.
28847         (rewrite_update_dom_walker): Likewise.
28848         (mark_def_dom_walker): Likewise.
28850 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
28852         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
28853         (aarch64_maybe_expand_sve_subreg_move): Declare.
28854         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
28855         * config/aarch64/predicates.md (aarch64_any_register_operand): New
28856         predicate.
28857         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
28858         that are semantically a reverse operation.
28859         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
28860         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
28861         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
28862         functions.
28863         (aarch64_can_change_mode_class): For big-endian, forbid changes
28864         between two SVE modes if they have different element sizes.
28866 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
28868         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
28869         the TImode handling for big-endian targets.
28871 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
28873         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
28874         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
28875         not just bytes.
28876         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
28877         Remove BSWAP handing for big-endian targets and use the form of
28878         LD1RQ appropariate for the mode.
28880 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
28882         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
28883         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
28884         duplicated element.
28886 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
28888         PR tearget/83845
28889         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
28890         check for operands that need to go through aarch64_sve_reload_be.
28892 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
28894         PR tree-optimization/81661
28895         PR tree-optimization/84117
28896         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
28897         * tree-eh.c: Include gimplify.h.
28898         (find_trapping_overflow, replace_trapping_overflow,
28899         rewrite_to_non_trapping_overflow): New functions.
28900         * tree-vect-loop.c: Include tree-eh.h.
28901         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
28902         * tree-data-ref.c: Include tree-eh.h.
28903         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
28905 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
28907         PR rtl-optimization/84123
28908         * combine.c (change_zero_ext): Check if hard register satisfies
28909         can_change_dest_mode before calling gen_lowpart_SUBREG.
28911 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
28913         PR target/82444
28914         * ira.c (ira_init_register_move_cost): Remove assert.
28916 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
28918         PR rtl-optimization/84071
28919         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
28920         * doc/tm.texi: Regenerate.
28922 2018-01-31  Richard Biener  <rguenther@suse.de>
28924         PR tree-optimization/84132
28925         * tree-data-ref.c (analyze_miv_subscript): Properly
28926         check whether evolution_function_is_affine_multivariate_p
28927         before calling gcd_of_steps_may_divide_p.
28929 2018-01-31  Julia Koval  <julia.koval@intel.com>
28931         PR target/83618
28932         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
28933         * config/i386/i386.md (rdpid_rex64) New.
28934         (rdpid): Make 32bit only.
28936 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
28938         PR lto/84105
28939         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
28940         an IDENTIFIER_NODE for FUNCTION_TYPE's.
28942 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
28944         Revert
28945         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
28947         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
28949 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
28951         PR rtl-optimization/84071
28952         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
28953         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
28955 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
28957         * config/arc/arc.c (arc_handle_aux_attribute): New function.
28958         (arc_attribute_table): Add 'aux' attribute.
28959         (arc_in_small_data_p): Consider aux like variables.
28960         (arc_is_aux_reg_p): New function.
28961         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
28962         (arc_get_aux_arg): New function.
28963         (prepare_move_operands): Handle aux-register access.
28964         (arc_handle_aux_attribute): New function.
28965         * doc/extend.texi (ARC Variable attributes): Add subsection.
28967 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
28969         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
28970         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
28971         (arc_attribute_table): Add 'uncached' attribute.
28972         (arc_print_operand): Print '.di' flag for uncached memory
28973         accesses.
28974         (arc_in_small_data_p): Do not consider for small data the uncached
28975         types.
28976         (arc_is_uncached_mem_p): New function.
28977         * config/arc/predicates.md (compact_store_memory_operand): Check
28978         for uncached memory accesses.
28979         (nonvol_nonimm_operand): Likewise.
28980         * doc/extend.texi (ARC Type Attribute): New subsection.
28982 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
28984         PR c/84100
28985         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
28986         falign-loops=): Add Optimization flag.
28988 2018-01-30  Jeff Law  <law@redhat.com>
28990         PR target/84064
28991         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
28992         INT_REGISTERS_SAVED.  Check it prior to calling
28993         get_scratch_register_on_entry.
28994         (ix86_adjust_stack_and_probe): Similarly.
28995         (ix86_emit_probe_stack_range): Similarly.
28996         (ix86_expand_prologue): Corresponding changes.
28998 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
29000         PR target/40411
29001         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
29002         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
29004 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
29006         PR target/84112
29007         * lra-constraints.c (curr_insn_transform): Process AND in the
29008         address.
29010 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
29012         PR rtl-optimization/83986
29013         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
29014         dependence against last_pending_memory_flush in addition to
29015         pending_jump_insns.
29017 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
29019         PR tree-optimization/81611
29020         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
29021         copies.
29023 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
29025         PR target/83758
29026         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
29027         a reg rtx.
29029 2018-01-30  Richard Biener  <rguenther@suse.de>
29030             Jakub Jelinek  <jakub@redhat.com>
29032         PR tree-optimization/84111
29033         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
29034         inner loops added during recursion, as they don't have up-to-date
29035         SSA form.
29037 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
29039         PR ipa/81360
29040         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
29041         (can_inline_edge_by_limits_p): ... here.
29042         (can_early_inline_edge_p, check_callers,
29043         update_caller_keys, update_callee_keys, recursive_inlining,
29044         add_new_edges_to_heap, speculation_useful_p,
29045         inline_small_functions,
29046         inline_small_functions, flatten_function,
29047         inline_to_all_callers_1): Update.
29049 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
29051         * profile-count.c (profile_count::combine_with_ipa_count): Handle
29052         zeros correctly.
29054 2018-01-30  Richard Biener  <rguenther@suse.de>
29056         PR tree-optimization/83008
29057         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
29058         invariant and constant vector uses in stmts when they need
29059         more than one stmt.
29061 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
29063         PR bootstrap/84017
29064         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
29065         * configure: Regenerate.
29067 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
29069         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
29070         pattern.
29071         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
29072         Use gen_rtx_REG rather than gen_lowpart.
29074 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
29076         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
29077         rather than 0 when creating partial subregs.
29079 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
29081         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
29082         of usage.
29084 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
29086         PR target/81550
29087         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
29088         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
29089         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
29090         flags.  This restores the settings used before the 2017-07-24.
29091         Turning off pre increment/decrement/modify allows IVOPTS to
29092         optimize DF/SF loops where the index is an int.
29094 2018-01-29  Richard Biener  <rguenther@suse.de>
29095             Kelvin Nilsen  <kelvin@gcc.gnu.org>
29097         PR bootstrap/80867
29098         * tree-vect-stmts.c (vectorizable_call): Don't call
29099         targetm.vectorize_builtin_md_vectorized_function if callee is
29100         NULL.
29102 2018-01-22  Carl Love  <cel@us.ibm.com>
29104         * doc/extend.tex: Fix typo in second arg in
29105         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
29107 2018-01-29  Richard Biener  <rguenther@suse.de>
29109         PR tree-optimization/84086
29110         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
29111         (flush_ssaname_freelist): When SSA names were released reset
29112         the SCEV hash table.
29114 2018-01-29  Richard Biener  <rguenther@suse.de>
29116         PR tree-optimization/84057
29117         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
29118         removed paths when removing edges.
29120 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
29122         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
29123         -mfunction-return=@var{choice}.
29125 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
29127         PR diagnostic/84034
29128         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
29129         Handle CR like TAB.
29130         (layout::print_source_line): Likewise.
29131         (test_get_line_width_without_trailing_whitespace): Add test cases.
29133 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
29135         PR middle-end/84040
29136         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
29137         debug insns.
29139 2018-01-26  Jim Wilson  <jimw@sifive.com>
29141         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
29143         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
29144         specified.
29146 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
29148         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
29149         and CMP + SUB-immediate -> SUBS.
29151 2018-01-26  Martin Sebor  <msebor@redhat.com>
29153         PR tree-optimization/83896
29154         * tree-ssa-strlen.c (get_string_len): Rename...
29155         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
29156         Avoid assuming length is constant.
29157         (handle_char_store): Use HOST_WIDE_INT for string length.
29159 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
29161         PR target/81763
29162         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
29163         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
29165 2018-01-26  Richard Biener  <rguenther@suse.de>
29167         PR rtl-optimization/84003
29168         * dse.c (record_store): Only record redundant stores when
29169         the earlier store aliases at least all accesses the later one does.
29171 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
29173         PR rtl-optimization/83985
29174         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
29175         REG_CFA_RESTORE insns.
29176         (delete_unmarked_insns): Don't ignore separate shrink wrapping
29177         REG_CFA_RESTORE insns here.
29179         PR c/83989
29180         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
29181         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
29183 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
29185         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
29186         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
29187         (arc_init): Likewise.
29188         (arc_override_options): Likewise.
29189         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
29190         value.
29191         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
29192         support.
29193         * config/arc/arc.h (TARGET_DBNZ): Define.
29194         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
29195         properly set the tune attribute.
29196         (dbnz): Use TARGET_DBNZ guard.
29197         * config/arc/arc.opt (mtune): Add core3 option.
29199 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
29201         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
29202         recognize new pic like addresses.
29203         (arc_delegitimize_address): Clean up.
29205 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
29207         * config/arc/arc-arches.def: Option mrf16 valid for all
29208         architectures.
29209         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
29210         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
29211         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
29212         * config/arc/arc-tables.opt: Regenerate.
29213         * config/arc/arc.c (arc_conditional_register_usage): Handle
29214         reduced register file case.
29215         (arc_file_start): Set must have build attributes.
29216         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
29217         mrf16 option value.
29218         * config/arc/arc.opt (mrf16): Add new option.
29219         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
29220         * config/arc/genmultilib.awk: Handle new mrf16 option.
29221         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
29222         * config/arc/t-multilib: Regenerate.
29223         * doc/invoke.texi (ARC Options): Document mrf16 option.
29225 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
29227         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
29228         * config/arc/arc.c (arc_handle_secure_attribute): New function.
29229         (arc_attribute_table): Add 'secure_call' attribute.
29230         (arc_print_operand): Print secure call operand.
29231         (arc_function_ok_for_sibcall): Don't optimize tail calls when
29232         secure.
29233         (arc_is_secure_call_p): New function.  * config/arc/arc.md
29234         (call_i): Add support for sjli instruction.
29235         (call_value_i): Likewise.
29236         * config/arc/constraints.md (Csc): New constraint.
29238 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
29239             John Eric Martin  <John.Martin@emmicro-us.com>
29241         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
29242         * config/arc/arc.c (_arc_jli_section): New struct.
29243         (arc_jli_section): New type.
29244         (rc_jli_sections): New static variable.
29245         (arc_handle_jli_attribute): New function.
29246         (arc_attribute_table): Add jli_always and jli_fixed attribute.
29247         (arc_file_end): New function.
29248         (TARGET_ASM_FILE_END): Define.
29249         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
29250         (arc_add_jli_section): New function.
29251         (jli_call_scan): Likewise.
29252         (arc_reorg): Call jli_call_scan.
29253         (arc_output_addsi): Remove 'S' from printing asm operand.
29254         (arc_is_jli_call_p): New function.
29255         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
29256         operand.
29257         (movhi_insn): Likewise.
29258         (movsi_insn): Likewise.
29259         (movsi_set_cc_insn): Likewise.
29260         (loadqi_update): Likewise.
29261         (load_zeroextendqisi_update): Likewise.
29262         (load_signextendqisi_update): Likewise.
29263         (loadhi_update): Likewise.
29264         (load_zeroextendhisi_update): Likewise.
29265         (load_signextendhisi_update): Likewise.
29266         (loadsi_update): Likewise.
29267         (loadsf_update): Likewise.
29268         (movsicc_insn): Likewise.
29269         (bset_insn): Likewise.
29270         (bxor_insn): Likewise.
29271         (bclr_insn): Likewise.
29272         (bmsk_insn): Likewise.
29273         (bicsi3_insn): Likewise.
29274         (cmpsi_cc_c_insn): Likewise.
29275         (movsi_ne): Likewise.
29276         (movsi_cond_exec): Likewise.
29277         (clrsbsi2): Likewise.
29278         (norm_f): Likewise.
29279         (normw): Likewise.
29280         (swap): Likewise.
29281         (divaw): Likewise.
29282         (flag): Likewise.
29283         (sr): Likewise.
29284         (kflag): Likewise.
29285         (ffs): Likewise.
29286         (ffs_f): Likewise.
29287         (fls): Likewise.
29288         (call_i): Remove 'S' asm letter, add jli instruction.
29289         (call_value_i): Likewise.
29290         * config/arc/arc.op (mjli-always): New option.
29291         * config/arc/constraints.md (Cji): New constraint.
29292         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
29293         operand.
29294         (subsf3_fpx): Likewise.
29295         (mulsf3_fpx): Likewise.
29296         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
29297         asm operand.
29298         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
29299         function attrbutes.
29300         * doc/invoke.texi (ARC): Document mjli-always option.
29302 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
29304         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
29305         avoid addition with 0 and use incw and decw where possible.
29307 2018-01-26  Richard Biener  <rguenther@suse.de>
29309         PR tree-optimization/81082
29310         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
29311         association if it requires casting to unsigned.
29312         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
29313         from fold_plusminus_mult_expr to catch important cases late when
29314         range info is available.
29316 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
29318         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
29319         * configure.ac (hidden_linkonce): New test.
29320         * configure: Regenerate.
29321         * config.in: Regenerate.
29323 2018-01-26  Julia Koval  <julia.koval@intel.com>
29325         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
29326         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
29327         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
29328         _mm_mask_bitshuffle_epi64_mask): Fix type.
29329         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
29330         USI_FTYPE_V4DI_V4DI_USI): Remove.
29331         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
29332         __builtin_ia32_vpshufbitqmb256_mask,
29333         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
29334         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
29335         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
29337 2018-01-26  Alan Modra  <amodra@gmail.com>
29339         PR target/84033
29340         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
29341         UNSPEC_VBPERMQ.  Sort other unspecs.
29343 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
29345         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
29347 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
29349         PR middle-end/83055
29350         * predict.c (drop_profile): Do not push/pop cfun; update also
29351         node->count.
29352         (handle_missing_profiles): Fix logic looking for zero profiles.
29354 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
29356         PR middle-end/83977
29357         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
29358         on functions with #pragma omp declare simd or functions with simd
29359         attribute.
29360         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
29361         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
29362         Remove trailing \n from warning_at calls.
29364 2018-01-25  Tom de Vries  <tom@codesourcery.com>
29366         PR target/84028
29367         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
29368         for neutered workers.
29370 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
29372         PR target/68467
29373         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
29374         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
29376 2018-01-24  Jeff Law  <law@redhat.com>
29378         PR target/83994
29379         * i386.c (get_probe_interval): Move to earlier point.
29380         (ix86_compute_frame_layout): If -fstack-clash-protection and
29381         the frame is larger than the probe interval, then use pushes
29382         to save registers rather than reg->mem moves.
29383         (ix86_expand_prologue): Remove conditional for int_registers_saved
29384         assertion.
29386 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
29388         PR target/84014
29389         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
29390         min/max for never referenced object.
29392 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
29394         PR middle-end/83977
29395         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
29396         here.
29397         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
29398         attributes from DECL_ATTRIBUTES (decl) without affecting
29399         DECL_ATTRIBUTES (current_function_decl).
29400         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
29401         functions with non-NULL DECL_ABSTRACT_ORIGIN.
29403 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
29405         PR tree-optimization/83979
29406         * fold-const.c (fold_comparison): Use constant_boolean_node
29407         instead of boolean_{true,false}_node.
29409 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
29411         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
29412         with zero counts.
29414 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29416         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
29417         Simplify the clause that sets the length attribute.
29418         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
29419         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
29420         clause that sets the length attribute.
29421         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
29423 2018-01-24  Tom de Vries  <tom@codesourcery.com>
29425         PR target/83589
29426         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
29427         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
29428         Add strict parameter.
29429         (prevent_branch_around_nothing): Insert dummy insn between branch to
29430         label and label with no ptx insn inbetween.
29431         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
29433 2018-01-24  Tom de Vries  <tom@codesourcery.com>
29435         PR target/81352
29436         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
29437         for neutered threads in warp.
29438         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
29440 2018-01-24  Richard Biener  <rguenther@suse.de>
29442         PR tree-optimization/83176
29443         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
29444         operands.
29446 2018-01-24  Richard Biener  <rguenther@suse.de>
29448         PR tree-optimization/82819
29449         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
29450         code generating pluses that are no-ops in the target precision.
29452 2018-01-24  Richard Biener  <rguenther@suse.de>
29454         PR middle-end/84000
29455         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
29457 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
29459         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
29460         to merge probabilities.
29461         * predict.c (probably_never_executed): Also mark as cold functions
29462         with global 0 profile and guessed local profile.
29463         * profile-count.c (profile_probability::combine_with_count): New
29464         member function.
29465         * profile-count.h (profile_probability::operator*,
29466         profile_probability::operator*=, profile_probability::operator/,
29467         profile_probability::operator/=): Reduce precision to adjusted
29468         and set value to guessed on contradictory divisions.
29469         (profile_probability::combine_with_freq): Remove.
29470         (profile_probability::combine_wiht_count): Declare.
29471         (profile_count::force_nonzero):: Set to adjusted.
29472         (profile_count::probability_in):: Set quality to adjusted.
29473         * tree-ssa-tail-merge.c (replace_block_by): Use
29474         combine_with_count.
29476 2018-01-23  Andrew Waterman  <andrew@sifive.com>
29477             Jim Wilson  <jimw@sifive.com>
29479         * config/riscv/riscv.c (riscv_stack_boundary): New.
29480         (riscv_option_override): Set riscv_stack_boundary.  Handle
29481         riscv_preferred_stack_boundary_arg.
29482         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
29483         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
29484         (STACK_BOUNDARY): Set to riscv_stack_boundary.
29485         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
29486         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
29487         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
29489 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
29491         PR target/83905
29492         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
29493         of struct ix86_frame.
29494         (ix86_expand_epilogue): Likewise.  Add a local variable for
29495         the reg_save_offset field in struct ix86_frame.
29497 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
29499         PR tree-optimization/82604
29500         * tree-loop-distribution.c (enum partition_kind): New enum item
29501         PKIND_PARTIAL_MEMSET.
29502         (partition_builtin_p): Support above new enum item.
29503         (generate_code_for_partition): Ditto.
29504         (compute_access_range): Differentiate cases that equality can be
29505         proven at all loops, the innermost loops or no loops.
29506         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
29507         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
29508         (finalize_partitions, distribute_loop): Don't fuse partition of
29509         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
29510         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
29511         parloop is enabled.
29513 2018-01-23  Martin Liska  <mliska@suse.cz>
29515         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
29516         order to ignore the predictor.
29517         (PRED_POLYMORPHIC_CALL): Likewise.
29518         (PRED_RECURSIVE_CALL): Likewise.
29520 2018-01-23  Martin Liska  <mliska@suse.cz>
29522         * tree-profile.c (tree_profiling): Print function header to
29523         aware reader which function we are working on.
29524         * value-prof.c (gimple_find_values_to_profile): Do not print
29525         not interesting value histograms.
29527 2018-01-23  Martin Liska  <mliska@suse.cz>
29529         * profile-count.h (enum profile_quality): Add
29530         profile_uninitialized as the first value. Do not number values
29531         as they are zero based.
29532         (profile_count::verify): Update sanity check.
29533         (profile_probability::verify): Likewise.
29535 2018-01-23  Nathan Sidwell  <nathan@acm.org>
29537         * doc/invoke.texi (ffor-scope): Deprecate.
29539 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
29541         PR tree-optimization/83510
29542         * domwalk.c (set_all_edges_as_executable): New function.
29543         (dom_walker::dom_walker): Convert bool param
29544         "skip_unreachable_blocks" to enum reachability.  Move setup of
29545         edge flags to set_all_edges_as_executable and only do it when
29546         reachability is REACHABLE_BLOCKS.
29547         * domwalk.h (enum dom_walker::reachability): New enum.
29548         (dom_walker::dom_walker): Convert bool param
29549         "skip_unreachable_blocks" to enum reachability.
29550         (set_all_edges_as_executable): New decl.
29551         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
29552         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
29553         "reachability".
29554         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
29555         but converting true to REACHABLE_BLOCKS.
29556         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
29557         * tree-vrp.c
29558         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
29559         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
29560         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
29561         REACHABLE_BLOCKS.
29562         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
29563         if check_all_array_refs will be called.
29565 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
29567         * tree.c (selftest::test_location_wrappers): Add more test
29568         coverage.
29570 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
29572         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
29573         (selftest::test_bit_in_range): Likewise.
29575 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
29577         PR testsuite/83888
29578         * doc/sourcebuild.texi (vect_float): Say that the selector
29579         only describes the situation when -funsafe-math-optimizations is on.
29580         (vect_float_strict): Document.
29582 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
29584         PR tree-optimization/83965
29585         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
29586         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
29587         instead of checking only for a reduction.
29588         (vect_recog_widen_sum_pattern): Likewise.
29590 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
29592         * predict.c (probably_never_executed): Only use precise profile info.
29593         (compute_function_frequency): Skip after inlining hack since we now
29594         have quality checking.
29596 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
29598         * profile-count.h (profile_probability::very_unlikely,
29599         profile_probability::unlikely, profile_probability::even): Set
29600         precision to guessed.
29602 2018-01-23  Richard Biener  <rguenther@suse.de>
29604         PR tree-optimization/83963
29605         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
29606         Properly terminate dominator walk when crossing the exit edge not
29607         when visiting its source block.
29609 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
29611         PR c++/83918
29612         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
29613         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
29615 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
29617         PR tree-optimization/83957
29618         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
29619         semicolon after for body surrounded by braces.
29621         PR tree-optimization/83081
29622         * profile-count.h (profile_probability::split): New method.
29623         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
29624         Use profile_probability::split.
29625         (do_compare_rtx_and_jump): Fix adjustment of probabilities
29626         when splitting a single conditional jump into 2.
29628 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
29630         PR tree-optimization/69452
29631         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
29632         decl.
29634 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
29636         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
29637         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
29638         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
29640 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
29642         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
29643         declaration.
29644         * config/rl78/rl78.md (movdi): New define_expand.
29645         * config/rl78/rl78.c (rl78_split_movdi): New function.
29647 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
29649         PR target/83862
29650         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
29651         no longer used.
29652         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
29653         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
29654         128-bit to produce an UNSPEC move to get the double word with the
29655         signbit and then a shift directly to do signbit.
29656         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
29657         implementation with a new version that just does either a direct
29658         move or a regular move.  Move memory interface to separate insns.
29659         Move insns so they are next to the expander.
29660         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
29661         with signbit move.  Split big and little endian case.
29662         (signbit<mode>2_dm_mem_le): Likewise.
29663         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
29664         (signbit<mode>2_dm2): Likewise.
29666 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
29668         * config/rl78/rl78.md (anddi3): New define_expand.
29670 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
29672         * config/rl78/rl78.md (umindi3): New define_expand.
29674 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
29676         * config/rl78/rl78.md (smindi3): New define_expand.
29678 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
29680         * config/rl78/rl78.md (smaxdi3): New define_expand.
29682 2018-01-22  Carl Love  <cel@us.ibm.com>
29684         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
29685         LVX_V1TI): Add macro expansion.
29686         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
29687         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
29688         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
29689         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
29690         Change check to determine if the instruction is a byte reversing
29691         entry.  Fix typo in comment.
29692         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
29693         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
29694         Add def_builtin calls for new builtins.
29695         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
29696         Add define_insn expansion.
29698 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
29700         * config/rl78/rl78.md (umaxdi3): New define_expand.
29702 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
29704         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
29705         for non-QImode registers.
29707 2018-01-22  Richard Biener  <rguenther@suse.de>
29709         PR tree-optimization/83963
29710         * graphite-scop-detection.c (scop_detection::get_sese): Delay
29711         including the loop exit block.
29712         (scop_detection::merge_sese): Likewise.
29713         (scop_detection::add_scop): Do it here instead.
29715 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
29717         * doc/sourcebuild.texi (arm_softfloat): Document.
29719 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
29721         PR gcc/77734
29722         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
29723         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
29724         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
29726 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29727             David Edelsohn  <dje.gcc@gmail.com>
29729         PR target/83946
29730         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
29731         Change "crset eq" to "crset 2".
29732         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
29733         (*call_indirect_aix<mode>_nospec): Likewise.
29734         (*call_value_indirect_aix<mode>_nospec): Likewise.
29735         (*call_indirect_elfv2<mode>_nospec): Likewise.
29736         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
29737         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
29738         change assembly output from . to $.
29739         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
29740         (indirect_jump<mode>_nospec): Change assembly output from . to $.
29741         (*tablejump<mode>_internal1_nospec): Likewise.
29743 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
29745         PR target/80870
29746         * config/sh/sh_optimize_sett_clrt.cc:
29747         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
29749 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
29751         PR tree-optimization/83940
29752         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
29753         offset_dt to vect_constant_def rather than vect_unknown_def_type.
29754         (vect_check_load_store_mask): Add a mask_dt_out parameter and
29755         use it to pass back the definition type.
29756         (vect_check_store_rhs): Likewise rhs_dt_out.
29757         (vect_build_gather_load_calls): Add a mask_dt argument and use
29758         it instead of a call to vect_is_simple_use.
29759         (vectorizable_store): Update calls to vect_check_load_store_mask
29760         and vect_check_store_rhs.  Use the dt returned by the latter instead
29761         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
29762         instead of calls to vect_is_simple_use.  Pass the scalar rather
29763         than the vector operand to vect_is_simple_use when handling
29764         second and subsequent copies of an rhs value.
29765         (vectorizable_load): Update calls to vect_check_load_store_mask
29766         and vect_build_gather_load_calls.  Use the cached mask_dt and
29767         gs_info.offset_dt instead of calls to vect_is_simple_use.
29769 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
29771         PR middle-end/83945
29772         * tree-emutls.c: Include gimplify.h.
29773         (lower_emutls_2): New function.
29774         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
29775         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
29776         it before further processing.
29778         PR target/83930
29779         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
29780         UINTVAL (trueop1) instead of INTVAL (op1).
29782 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
29784         PR debug/81570
29785         PR debug/83728
29786         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
29787         INCOMING_FRAME_SP_OFFSET if not defined.
29788         (scan_trace): Add ENTRY argument.  If true and
29789         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
29790         emit a note to adjust the CFA offset.
29791         (create_cfi_notes): Adjust scan_trace callers.
29792         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
29793         INCOMING_FRAME_SP_OFFSET in the CIE.
29794         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
29795         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
29796         Likewise.
29797         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
29798         * doc/tm.texi: Regenerated.
29800 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
29802         PR rtl-optimization/83147
29803         * lra-constraints.c (remove_inheritance_pseudos): Use
29804         lra_substitute_pseudo_within_insn.
29806 2018-01-19  Tom de Vries  <tom@codesourcery.com>
29807             Cesar Philippidis  <cesar@codesourcery.com>
29809         PR target/83920
29810         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
29812 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
29814         PR target/83790
29815         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
29816         spaces for function labels.
29818 2018-01-19  Martin Liska  <mliska@suse.cz>
29820         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
29821         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
29822         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
29823         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
29824         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
29825         (PRED_CONST_RETURN): Change from 69 to 65.
29826         (PRED_NULL_RETURN): Change from 91 to 71.
29827         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
29828         (PRED_LOOP_GUARD): Change from 66 to 73.
29830 2018-01-19  Martin Liska  <mliska@suse.cz>
29832         * predict.c (predict_insn_def): Add new assert.
29833         (struct branch_predictor): Change type to signed integer.
29834         (test_prediction_value_range): Amend test to cover
29835         PROB_UNINITIALIZED.
29836         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
29837         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
29838         (PRED_LOOP_ITERATIONS_MAX): Likewise.
29839         (PRED_LOOP_IV_COMPARE): Likewise.
29840         * predict.h (PROB_UNINITIALIZED): Define new constant.
29842 2018-01-19  Martin Liska  <mliska@suse.cz>
29844         * predict.c (dump_prediction): Add new format for
29845         analyze_brprob.py script which is enabled with -details
29846         suboption.
29847         * profile-count.h (precise_p): New function.
29849 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
29851         PR tree-optimization/83922
29852         * tree-vect-loop.c (vect_verify_full_masking): Return false if
29853         there are no statements that need masking.
29854         (vect_active_double_reduction_p): New function.
29855         (vect_analyze_loop_operations): Use it when handling phis that
29856         are not in the loop header.
29858 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
29860         PR tree-optimization/83914
29861         * tree-vect-loop.c (vectorizable_induction): Don't convert
29862         init_expr or apply the peeling adjustment for inductions
29863         that are nested within the vectorized loop.
29865 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
29867         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
29868         instead of NEG.
29870 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
29872         PR sanitizer/81715
29873         PR testsuite/83882
29874         * function.h (gimplify_parameters): Add gimple_seq * argument.
29875         * function.c: Include gimple.h and options.h.
29876         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
29877         for the added local temporaries if needed.
29878         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
29879         if there are any parameter cleanups, wrap whole body into a
29880         try/finally with the cleanups.
29882 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
29884         PR target/82964
29885         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
29886         Use GET_MODE_CLASS for scalar floating point.
29888 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
29890         PR ipa/82256
29891         patch by PaX Team
29892         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
29893         Fix call of call_cgraph_insertion_hooks.
29895 2018-01-18  Martin Sebor  <msebor@redhat.com>
29897         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
29899 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
29901         PR ipa/83619
29902         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
29903         frequencies.
29905 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
29907         PR other/70268
29908         * common.opt: (-ffile-prefix-map): New option.
29909         * opts.c (common_handle_option): Defer it.
29910         * opts-global.c (handle_common_deferred_options): Handle it.
29911         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
29912         * file-prefix-map.h: New file.
29913         (remap_debug_filename, add_debug_prefix_map): ...here.
29914         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
29915         * final.c (debug_prefix_map, add_debug_prefix_map
29916         remap_debug_filename): Move to...
29917         * file-prefix-map.c: New file.
29918         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
29919         generalize, get rid of alloca(), use strrchr() instead of strchr().
29920         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
29921         Implement in terms of add_prefix_map().
29922         (remap_macro_filename, remap_debug_filename): Implement in term of
29923         remap_filename().
29924         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
29925         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
29926         * dbxout.c: Include file-prefix-map.h.
29927         * varasm.c: Likewise.
29928         * vmsdbgout.c: Likewise.
29929         * xcoffout.c: Likewise.
29930         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
29931         * doc/cppopts.texi (-fmacro-prefix-map): Document.
29932         * doc/invoke.texi (-ffile-prefix-map): Document.
29933         (-fdebug-prefix-map): Update description.
29935 2018-01-18  Martin Liska  <mliska@suse.cz>
29937         * config/i386/i386.c (indirect_thunk_name): Document that also
29938         lfence is emitted.
29939         (output_indirect_thunk): Document why both instructions
29940         (pause and lfence) are generated.
29942 2018-01-18  Richard Biener  <rguenther@suse.de>
29944         PR tree-optimization/83887
29945         * graphite-scop-detection.c
29946         (scop_detection::get_nearest_dom_with_single_entry): Remove.
29947         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
29948         (scop_detection::merge_sese): Re-implement with a flood-fill
29949         algorithm that properly finds a SESE region if it exists.
29951 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
29953         PR c/61240
29954         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
29955         pointer_diff optimizations use view_convert instead of convert.
29957 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29959         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
29960         Generate different code for -mno-speculate-indirect-jumps.
29961         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
29962         (*call_indirect_aix<mode>): Disable for
29963         -mno-speculate-indirect-jumps.
29964         (*call_indirect_aix<mode>_nospec): New define_insn.
29965         (*call_value_indirect_aix<mode>): Disable for
29966         -mno-speculate-indirect-jumps.
29967         (*call_value_indirect_aix<mode>_nospec): New define_insn.
29968         (*sibcall_nonlocal_sysv<mode>): Generate different code for
29969         -mno-speculate-indirect-jumps.
29970         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
29972 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
29974         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
29975         long double type, set the flags for noting the default long double
29976         type, even if we don't pass or return a long double type.
29978 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
29980         PR ipa/83051
29981         * ipa-inline.c (flatten_function): Do not overwrite final inlining
29982         failure.
29984 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
29986         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
29987         support for merge[hl].
29988         (fold_mergehl_helper): New helper function.
29989         (tree-vector-builder.h): New #include for tree_vector_builder usage.
29990         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
29991         (altivec_vmrglw_direct): Add xxmrglw insn.
29993 2018-01-17  Andrew Waterman  <andrew@sifive.com>
29995         * config/riscv/riscv.c (riscv_conditional_register_usage): If
29996         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
29998 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
30000         PR lto/83121
30001         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
30002         call the lto_location_cache before reading the
30003         DECL_SOURCE_LOCATION of the types.
30005 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
30006             Richard Sandiford  <richard.sandiford@linaro.org>
30008         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
30009         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
30010         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
30011         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
30012         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
30013         Add declaration.
30014         * config/aarch64/constraints.md (aarch64_movti_operand):
30015         Limit immediates.
30016         * config/aarch64/predicates.md (Uti): Add new constraint.
30018 2018-01-17  Carl Love  <cel@us.ibm.com>
30020         * config/rs6000/vsx.md (define_expand xl_len_r,
30021         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
30022         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
30023         lxvll.
30024         (define_expand, define_insn): Move the shift left from  the
30025         define_insn to the define_expand for lxvl and stxvl instructions.
30026         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
30027         and XL_LEN_R definitions to PURE.
30029 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
30031         * config/i386/i386.c (indirect_thunk_name): Declare regno
30032         as unsigned int.  Compare regno with INVALID_REGNUM.
30033         (output_indirect_thunk): Ditto.
30034         (output_indirect_thunk_function): Ditto.
30035         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
30036         in the call to output_indirect_thunk_function.
30038 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
30040         PR middle-end/83884
30041         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
30042         rather than the size of inner_type to determine the stack slot size
30043         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
30045 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
30047         PR target/83546
30048         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
30049         to PTA_SILVERMONT.
30051 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
30053         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
30054         endian Linux systems to optionally enable multilibs for selecting
30055         the long double type if the user configured an explicit type.
30056         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
30057         have no long double multilibs if not defined.
30058         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
30059         warn if the user used -mabi={ieee,ibm}longdouble and we built
30060         multilibs for long double.
30061         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
30062         appropriate multilib option.
30063         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
30064         multilib options.
30065         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
30066         for building long double multilibs.
30067         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
30069 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
30071         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
30072         copies.
30074         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
30075         64 bits.
30076         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
30077         128 bits.
30079         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
30080         variables.
30082         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
30083         return value.
30085 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
30087         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
30088         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
30090 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
30092         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
30093         different rtl trees depending on TARGET_64BIT.
30094         (rs6000_gen_lvx): Likewise.
30096 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
30098         * config/visium/visium.md (nop): Tweak comment.
30099         (hazard_nop): Likewise.
30101 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
30103         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
30104         -mspeculate-indirect-jumps.
30105         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
30106         for -mno-speculate-indirect-jumps.
30107         (*call_indirect_elfv2<mode>_nospec): New define_insn.
30108         (*call_value_indirect_elfv2<mode>): Disable for
30109         -mno-speculate-indirect-jumps.
30110         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
30111         (indirect_jump): Emit different RTL for
30112         -mno-speculate-indirect-jumps.
30113         (*indirect_jump<mode>): Disable for
30114         -mno-speculate-indirect-jumps.
30115         (*indirect_jump<mode>_nospec): New define_insn.
30116         (tablejump): Emit different RTL for
30117         -mno-speculate-indirect-jumps.
30118         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
30119         (tablejumpsi_nospec): New define_expand.
30120         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
30121         (tablejumpdi_nospec): New define_expand.
30122         (*tablejump<mode>_internal1): Disable for
30123         -mno-speculate-indirect-jumps.
30124         (*tablejump<mode>_internal1_nospec): New define_insn.
30125         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
30126         option.
30128 2018-01-16  Artyom Skrobov tyomitch@gmail.com
30130         * caller-save.c (insert_save): Drop unnecessary parameter.  All
30131         callers updated.
30133 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
30134             Richard Biener  <rguenth@suse.de>
30136         PR libgomp/83590
30137         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
30138         return early, inline manually is_gimple_sizepos.  Make sure if we
30139         call gimplify_expr we don't end up with a gimple constant.
30140         * tree.c (variably_modified_type_p): Don't return true for
30141         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
30142         * gimplify.h (is_gimple_sizepos): Remove.
30144 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
30146         PR tree-optimization/83857
30147         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
30148         vectorizable_live_operation for pure SLP statements.
30149         (vectorizable_live_operation): Handle PHIs.
30151 2018-01-16  Richard Biener  <rguenther@suse.de>
30153         PR tree-optimization/83867
30154         * tree-vect-stmts.c (vect_transform_stmt): Precompute
30155         nested_in_vect_loop_p since the scalar stmt may get invalidated.
30157 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
30159         PR c/83844
30160         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
30161         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
30162         If off is not INTEGER_CST, issue a may not be aligned warning
30163         rather than isn't aligned.  Use isn%'t rather than isn't.
30164         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
30165         into MULT_EXPR.
30166         <case MULT_EXPR>: Improve the case when bottom and one of the
30167         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
30168         operand, in that case check if the other operand is multiple of
30169         bottom divided by the INTEGER_CST operand.
30171 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
30173         PR target/83858
30174         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
30175         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
30176         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
30177         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
30178         * config/pa/pa.c (pa_function_arg_advance): Likewise.
30179         (pa_function_arg, pa_arg_partial_bytes): Likewise.
30180         (pa_function_arg_size): New function.
30182 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
30184         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
30185         in a separate statement.
30187 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
30189         PR tree-optimization/83847
30190         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
30191         group gathers and scatters.
30193 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
30195         PR rtl-optimization/86620
30196         * params.def (max-sched-ready-insns): Bump minimum value to 1.
30198         PR rtl-optimization/83213
30199         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
30200         to last if both are JUMP_INSNs.
30202         PR tree-optimization/83843
30203         * gimple-ssa-store-merging.c
30204         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
30205         store_immediate_info for bswap/nop orig_stores.
30207 2018-01-15  Andrew Waterman  <andrew@sifive.com>
30209         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
30210         !TARGET_MUL.
30211         <UDIV>: Increase cost if !TARGET_DIV.
30213 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
30215         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
30216         (define_attr "cr_logical_3op"): New.
30217         (cceq_ior_compare): Adjust.
30218         (cceq_ior_compare_complement): Adjust.
30219         (*cceq_rev_compare): Adjust.
30220         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
30221         (is_cracked_insn): Adjust.
30222         (insn_must_be_first_in_group): Adjust.
30223         * config/rs6000/40x.md: Adjust.
30224         * config/rs6000/440.md: Adjust.
30225         * config/rs6000/476.md: Adjust.
30226         * config/rs6000/601.md: Adjust.
30227         * config/rs6000/603.md: Adjust.
30228         * config/rs6000/6xx.md: Adjust.
30229         * config/rs6000/7450.md: Adjust.
30230         * config/rs6000/7xx.md: Adjust.
30231         * config/rs6000/8540.md: Adjust.
30232         * config/rs6000/cell.md: Adjust.
30233         * config/rs6000/e300c2c3.md: Adjust.
30234         * config/rs6000/e500mc.md: Adjust.
30235         * config/rs6000/e500mc64.md: Adjust.
30236         * config/rs6000/e5500.md: Adjust.
30237         * config/rs6000/e6500.md: Adjust.
30238         * config/rs6000/mpc.md: Adjust.
30239         * config/rs6000/power4.md: Adjust.
30240         * config/rs6000/power5.md: Adjust.
30241         * config/rs6000/power6.md: Adjust.
30242         * config/rs6000/power7.md: Adjust.
30243         * config/rs6000/power8.md: Adjust.
30244         * config/rs6000/power9.md: Adjust.
30245         * config/rs6000/rs64.md: Adjust.
30246         * config/rs6000/titan.md: Adjust.
30248 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
30250         * config/i386/predicates.md (indirect_branch_operand): Rewrite
30251         ix86_indirect_branch_register logic.
30253 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
30255         * config/i386/constraints.md (Bs): Update
30256         ix86_indirect_branch_register check.  Don't check
30257         ix86_indirect_branch_register with GOT_memory_operand.
30258         (Bw): Likewise.
30259         * config/i386/predicates.md (GOT_memory_operand): Don't check
30260         ix86_indirect_branch_register here.
30261         (GOT32_symbol_operand): Likewise.
30263 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
30265         * config/i386/predicates.md (constant_call_address_operand):
30266         Rewrite ix86_indirect_branch_register logic.
30267         (sibcall_insn_operand): Likewise.
30269 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
30271         * config/i386/constraints.md (Bs): Replace
30272         ix86_indirect_branch_thunk_register with
30273         ix86_indirect_branch_register.
30274         (Bw): Likewise.
30275         * config/i386/i386.md (indirect_jump): Likewise.
30276         (tablejump): Likewise.
30277         (*sibcall_memory): Likewise.
30278         (*sibcall_value_memory): Likewise.
30279         Peepholes of indirect call and jump via memory: Likewise.
30280         * config/i386/i386.opt: Likewise.
30281         * config/i386/predicates.md (indirect_branch_operand): Likewise.
30282         (GOT_memory_operand): Likewise.
30283         (call_insn_operand): Likewise.
30284         (sibcall_insn_operand): Likewise.
30285         (GOT32_symbol_operand): Likewise.
30287 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
30289         PR middle-end/83837
30290         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
30291         type rather than type addr's type points to.
30292         (expand_omp_atomic_mutex): Likewise.
30293         (expand_omp_atomic): Likewise.
30295 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
30297         PR target/83839
30298         * config/i386/i386.c (output_indirect_thunk_function): Use
30299         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
30300         for  __x86_return_thunk.
30302 2018-01-15  Richard Biener  <rguenther@suse.de>
30304         PR middle-end/83850
30305         * expmed.c (extract_bit_field_1): Fix typo.
30307 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
30309         PR target/83687
30310         * config/arm/iterators.md (VF): New mode iterator.
30311         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
30312         Remove integer-related logic from pattern.
30313         (neon_vabd<mode>_3): Likewise.
30315 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
30317         PR middle-end/82694
30318         * common.opt (fstrict-overflow): No longer an alias.
30319         (fwrapv-pointer): New option.
30320         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
30321         also for pointer types based on flag_wrapv_pointer.
30322         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
30323         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
30324         opts->x_flag_wrapv got set.
30325         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
30326         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
30327         POINTER_TYPE_OVERFLOW_UNDEFINED.
30328         * match.pd: Likewise in address comparison pattern.
30329         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
30331 2018-01-15  Richard Biener  <rguenther@suse.de>
30333         PR lto/83804
30334         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
30335         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
30336         Reset type names to their identifier if their TYPE_DECL doesn't
30337         have linkage (and thus is used for ODR and devirt).
30338         (save_debug_info_for_decl): Remove.
30339         (save_debug_info_for_type): Likewise.
30340         (add_tree_to_fld_list): Adjust.
30341         * tree-pretty-print.c (dump_generic_node): Make dumping of
30342         type names more robust.
30344 2018-01-15  Richard Biener  <rguenther@suse.de>
30346         * BASE-VER: Bump to 8.0.1.
30348 2018-01-14  Martin Sebor  <msebor@redhat.com>
30350         PR other/83508
30351         * builtins.c (check_access): Avoid warning when the no-warning bit
30352         is set.
30354 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
30356         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
30357         * ira-color (allocno_hard_regs_compare): Likewise.
30359 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
30361         PR target/83013
30362         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
30363         Use .pushsection/.popsection.
30365 2018-01-14  Martin Sebor  <msebor@redhat.com>
30367         PR c++/81327
30368         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
30370 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
30372         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
30373         entry from extra_headers.
30374         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
30375         extra_headers, make the list bitwise identical to the i?86-*-* one.
30377 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
30379         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
30380         -mcmodel=large with -mindirect-branch=thunk,
30381         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
30382         -mfunction-return=thunk-extern.
30383         * doc/invoke.texi: Document -mcmodel=large is incompatible with
30384         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
30385         -mfunction-return=thunk and -mfunction-return=thunk-extern.
30387 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
30389         * config/i386/i386.c (print_reg): Print the name of the full
30390         integer register without '%'.
30391         (ix86_print_operand): Handle 'V'.
30392         * doc/extend.texi: Document 'V' modifier.
30394 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
30396         * config/i386/constraints.md (Bs): Disallow memory operand for
30397         -mindirect-branch-register.
30398         (Bw): Likewise.
30399         * config/i386/predicates.md (indirect_branch_operand): Likewise.
30400         (GOT_memory_operand): Likewise.
30401         (call_insn_operand): Likewise.
30402         (sibcall_insn_operand): Likewise.
30403         (GOT32_symbol_operand): Likewise.
30404         * config/i386/i386.md (indirect_jump): Call convert_memory_address
30405         for -mindirect-branch-register.
30406         (tablejump): Likewise.
30407         (*sibcall_memory): Likewise.
30408         (*sibcall_value_memory): Likewise.
30409         Disallow peepholes of indirect call and jump via memory for
30410         -mindirect-branch-register.
30411         (*call_pop): Replace m with Bw.
30412         (*call_value_pop): Likewise.
30413         (*sibcall_pop_memory): Replace m with Bs.
30414         * config/i386/i386.opt (mindirect-branch-register): New option.
30415         * doc/invoke.texi: Document -mindirect-branch-register option.
30417 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
30419         * config/i386/i386-protos.h (ix86_output_function_return): New.
30420         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
30421         set function_return_type.
30422         (indirect_thunk_name): Add ret_p to indicate thunk for function
30423         return.
30424         (output_indirect_thunk_function): Pass false to
30425         indirect_thunk_name.
30426         (ix86_output_indirect_branch_via_reg): Likewise.
30427         (ix86_output_indirect_branch_via_push): Likewise.
30428         (output_indirect_thunk_function): Create alias for function
30429         return thunk if regno < 0.
30430         (ix86_output_function_return): New function.
30431         (ix86_handle_fndecl_attribute): Handle function_return.
30432         (ix86_attribute_table): Add function_return.
30433         * config/i386/i386.h (machine_function): Add
30434         function_return_type.
30435         * config/i386/i386.md (simple_return_internal): Use
30436         ix86_output_function_return.
30437         (simple_return_internal_long): Likewise.
30438         * config/i386/i386.opt (mfunction-return=): New option.
30439         (indirect_branch): Mention -mfunction-return=.
30440         * doc/extend.texi: Document function_return function attribute.
30441         * doc/invoke.texi: Document -mfunction-return= option.
30443 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
30445         * config/i386/i386-opts.h (indirect_branch): New.
30446         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
30447         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
30448         with local indirect jump when converting indirect call and jump.
30449         (ix86_set_indirect_branch_type): New.
30450         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
30451         (indirectlabelno): New.
30452         (indirect_thunk_needed): Likewise.
30453         (indirect_thunk_bnd_needed): Likewise.
30454         (indirect_thunks_used): Likewise.
30455         (indirect_thunks_bnd_used): Likewise.
30456         (INDIRECT_LABEL): Likewise.
30457         (indirect_thunk_name): Likewise.
30458         (output_indirect_thunk): Likewise.
30459         (output_indirect_thunk_function): Likewise.
30460         (ix86_output_indirect_branch_via_reg): Likewise.
30461         (ix86_output_indirect_branch_via_push): Likewise.
30462         (ix86_output_indirect_branch): Likewise.
30463         (ix86_output_indirect_jmp): Likewise.
30464         (ix86_code_end): Call output_indirect_thunk_function if needed.
30465         (ix86_output_call_insn): Call ix86_output_indirect_branch if
30466         needed.
30467         (ix86_handle_fndecl_attribute): Handle indirect_branch.
30468         (ix86_attribute_table): Add indirect_branch.
30469         * config/i386/i386.h (machine_function): Add indirect_branch_type
30470         and has_local_indirect_jump.
30471         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
30472         to true.
30473         (tablejump): Likewise.
30474         (*indirect_jump): Use ix86_output_indirect_jmp.
30475         (*tablejump_1): Likewise.
30476         (simple_return_indirect_internal): Likewise.
30477         * config/i386/i386.opt (mindirect-branch=): New option.
30478         (indirect_branch): New.
30479         (keep): Likewise.
30480         (thunk): Likewise.
30481         (thunk-inline): Likewise.
30482         (thunk-extern): Likewise.
30483         * doc/extend.texi: Document indirect_branch function attribute.
30484         * doc/invoke.texi: Document -mindirect-branch= option.
30486 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
30488         PR ipa/83051
30489         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
30491 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
30493         * ipa-inline.c (want_inline_small_function_p): Return false if
30494         inlining has already failed with CIF_FINAL_ERROR.
30495         (update_caller_keys): Call want_inline_small_function_p before
30496         can_inline_edge_p.
30497         (update_callee_keys): Likewise.
30499 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
30501         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
30502         New function.
30503         (rs6000_quadword_masked_address_p): Likewise.
30504         (quad_aligned_load_p): Likewise.
30505         (quad_aligned_store_p): Likewise.
30506         (const_load_sequence_p): Add comment to describe the outer-most loop.
30507         (mimic_memory_attributes_and_flags): New function.
30508         (rs6000_gen_stvx): Likewise.
30509         (replace_swapped_aligned_store): Likewise.
30510         (rs6000_gen_lvx): Likewise.
30511         (replace_swapped_aligned_load): Likewise.
30512         (replace_swapped_load_constant): Capitalize argument name in
30513         comment describing this function.
30514         (rs6000_analyze_swaps): Add a third pass to search for vector loads
30515         and stores that access quad-word aligned addresses and replace
30516         with stvx or lvx instructions when appropriate.
30517         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
30518         New function prototype.
30519         (rs6000_quadword_masked_address_p): Likewise.
30520         (rs6000_gen_lvx): Likewise.
30521         (rs6000_gen_stvx): Likewise.
30522         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
30523         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
30524         when memory address is aligned.
30525         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
30526         this split to select lvx instruction when memory address is aligned.
30527         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
30528         instruction when memory address is aligned.
30529         (*vsx_le_perm_load_v16qi): Likewise.
30530         (four unnamed splitters): Modify to select the stvx instruction
30531         when memory is aligned.
30533 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
30535         * predict.c (determine_unlikely_bbs): Handle correctly BBs
30536         which appears in the queue multiple times.
30538 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30539             Alan Hayward  <alan.hayward@arm.com>
30540             David Sherwood  <david.sherwood@arm.com>
30542         * tree-vectorizer.h (vec_lower_bound): New structure.
30543         (_loop_vec_info): Add check_nonzero and lower_bounds.
30544         (LOOP_VINFO_CHECK_NONZERO): New macro.
30545         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
30546         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
30547         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
30548         fields.  Make seg_len the distance travelled, not including the
30549         access size.
30550         (dr_direction_indicator): Declare.
30551         (dr_zero_step_indicator): Likewise.
30552         (dr_known_forward_stride_p): Likewise.
30553         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
30554         tree-ssanames.h.
30555         (runtime_alias_check_p): Allow runtime alias checks with
30556         variable strides.
30557         (operator ==): Compare access_size and align.
30558         (prune_runtime_alias_test_list): Rework for new distinction between
30559         the access_size and seg_len.
30560         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
30561         segment lengths.
30562         (get_segment_min_max): New function.
30563         (create_intersect_range_checks): Use it.
30564         (dr_step_indicator): New function.
30565         (dr_direction_indicator): Likewise.
30566         (dr_zero_step_indicator): Likewise.
30567         (dr_known_forward_stride_p): Likewise.
30568         * tree-loop-distribution.c (data_ref_segment_size): Return
30569         DR_STEP * (niters - 1).
30570         (compute_alias_check_pairs): Update call to the dr_with_seg_len
30571         constructor.
30572         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
30573         (vect_preserves_scalar_order_p): New function, split out from...
30574         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
30575         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
30576         (vect_vfa_access_size): New function.
30577         (vect_vfa_align): Likewise.
30578         (vect_compile_time_alias): Take access_size_a and access_b arguments.
30579         (dump_lower_bound): New function.
30580         (vect_check_lower_bound): Likewise.
30581         (vect_small_gap_p): Likewise.
30582         (vectorizable_with_step_bound_p): Likewise.
30583         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
30584         depencies if the vectorization factor is 1.  Convert the checks
30585         for nonzero steps into checks on the bounds of DR_STEP.  Try using
30586         a bunds check for variable steps if the minimum required step is
30587         relatively small. Update calls to the dr_with_seg_len
30588         constructor and to vect_compile_time_alias.
30589         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
30590         function.
30591         (vect_loop_versioning): Call it.
30592         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
30593         when retrying.
30594         (vect_estimate_min_profitable_iters): Account for any bounds checks.
30596 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30597             Alan Hayward  <alan.hayward@arm.com>
30598             David Sherwood  <david.sherwood@arm.com>
30600         * doc/sourcebuild.texi (vect_scatter_store): Document.
30601         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
30602         optabs.
30603         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
30604         Document.
30605         * genopinit.c (main): Add supports_vec_scatter_store and
30606         supports_vec_scatter_store_cached to target_optabs.
30607         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
30608         IFN_MASK_SCATTER_STORE.
30609         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
30610         functions.
30611         * internal-fn.h (internal_store_fn_p): Declare.
30612         (internal_fn_stored_value_index): Likewise.
30613         * internal-fn.c (scatter_store_direct): New macro.
30614         (expand_scatter_store_optab_fn): New function.
30615         (direct_scatter_store_optab_supported_p): New macro.
30616         (internal_store_fn_p): New function.
30617         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
30618         IFN_MASK_SCATTER_STORE.
30619         (internal_fn_mask_index): Likewise.
30620         (internal_fn_stored_value_index): New function.
30621         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
30622         for scatter stores.
30623         * optabs-query.h (supports_vec_scatter_store_p): Declare.
30624         * optabs-query.c (supports_vec_scatter_store_p): New function.
30625         * tree-vectorizer.h (vect_get_store_rhs): Declare.
30626         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
30627         true for scatter stores.
30628         (vect_gather_scatter_fn_p): Handle scatter stores too.
30629         (vect_check_gather_scatter): Consider using scatter stores if
30630         supports_vec_scatter_store_p.
30631         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
30632         scatter stores too.
30633         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
30634         internal_fn_stored_value_index.
30635         (check_load_store_masking): Handle scatter stores too.
30636         (vect_get_store_rhs): Make public.
30637         (vectorizable_call): Use internal_store_fn_p.
30638         (vectorizable_store): Handle scatter store internal functions.
30639         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
30640         when deciding whether the end of the group has been reached.
30641         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
30642         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
30643         (mask_scatter_store<mode>): New insns.
30645 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30646             Alan Hayward  <alan.hayward@arm.com>
30647             David Sherwood  <david.sherwood@arm.com>
30649         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
30650         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
30651         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
30652         function.
30653         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
30654         Use vect_truncate_gather_scatter_offset if we can't treat the
30655         operation as a normal gather load or scatter store.
30656         (get_group_load_store_type): Take the gather_scatter_info
30657         as argument.  Try using a gather load or scatter store for
30658         single-element groups.
30659         (get_load_store_type): Update calls to get_group_load_store_type
30660         and vect_use_strided_gather_scatters_p.
30662 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30663             Alan Hayward  <alan.hayward@arm.com>
30664             David Sherwood  <david.sherwood@arm.com>
30666         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
30667         optional tree argument.
30668         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
30669         null target hooks.
30670         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
30671         but continue to use the current value as a fallback.
30672         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
30673         to compare the updates.
30674         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
30675         (get_load_store_type): Use it when handling a strided access.
30676         (vect_get_strided_load_store_ops): New function.
30677         (vect_get_data_ptr_increment): Likewise.
30678         (vectorizable_load): Handle strided gather loads.  Always pass
30679         a step to vect_create_data_ref_ptr and bump_vector_ptr.
30681 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30682             Alan Hayward  <alan.hayward@arm.com>
30683             David Sherwood  <david.sherwood@arm.com>
30685         * doc/md.texi (gather_load@var{m}): Document.
30686         (mask_gather_load@var{m}): Likewise.
30687         * genopinit.c (main): Add supports_vec_gather_load and
30688         supports_vec_gather_load_cached to target_optabs.
30689         * optabs-tree.c (init_tree_optimization_optabs): Use
30690         ggc_cleared_alloc to allocate target_optabs.
30691         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
30692         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
30693         functions.
30694         * internal-fn.h (internal_load_fn_p): Declare.
30695         (internal_gather_scatter_fn_p): Likewise.
30696         (internal_fn_mask_index): Likewise.
30697         (internal_gather_scatter_fn_supported_p): Likewise.
30698         * internal-fn.c (gather_load_direct): New macro.
30699         (expand_gather_load_optab_fn): New function.
30700         (direct_gather_load_optab_supported_p): New macro.
30701         (direct_internal_fn_optab): New function.
30702         (internal_load_fn_p): Likewise.
30703         (internal_gather_scatter_fn_p): Likewise.
30704         (internal_fn_mask_index): Likewise.
30705         (internal_gather_scatter_fn_supported_p): Likewise.
30706         * optabs-query.c (supports_at_least_one_mode_p): New function.
30707         (supports_vec_gather_load_p): Likewise.
30708         * optabs-query.h (supports_vec_gather_load_p): Declare.
30709         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
30710         and memory_type field.
30711         (NUM_PATTERNS): Bump to 15.
30712         * tree-vect-data-refs.c: Include internal-fn.h.
30713         (vect_gather_scatter_fn_p): New function.
30714         (vect_describe_gather_scatter_call): Likewise.
30715         (vect_check_gather_scatter): Try using internal functions for
30716         gather loads.  Recognize existing calls to a gather load function.
30717         (vect_analyze_data_refs): Consider using gather loads if
30718         supports_vec_gather_load_p.
30719         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
30720         (vect_get_gather_scatter_offset_type): Likewise.
30721         (vect_convert_mask_for_vectype): Likewise.
30722         (vect_add_conversion_to_patterm): Likewise.
30723         (vect_try_gather_scatter_pattern): Likewise.
30724         (vect_recog_gather_scatter_pattern): New pattern recognizer.
30725         (vect_vect_recog_func_ptrs): Add it.
30726         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
30727         internal_fn_mask_index and internal_gather_scatter_fn_p.
30728         (check_load_store_masking): Take the gather_scatter_info as an
30729         argument and handle gather loads.
30730         (vect_get_gather_scatter_ops): New function.
30731         (vectorizable_call): Check internal_load_fn_p.
30732         (vectorizable_load): Likewise.  Handle gather load internal
30733         functions.
30734         (vectorizable_store): Update call to check_load_store_masking.
30735         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
30736         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
30737         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
30738         (aarch64_gather_scale_operand_d): New predicates.
30739         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
30740         (mask_gather_load<mode>): New insns.
30742 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30743             Alan Hayward  <alan.hayward@arm.com>
30744             David Sherwood  <david.sherwood@arm.com>
30746         * optabs.def (fold_left_plus_optab): New optab.
30747         * doc/md.texi (fold_left_plus_@var{m}): Document.
30748         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
30749         * internal-fn.c (fold_left_direct): Define.
30750         (expand_fold_left_optab_fn): Likewise.
30751         (direct_fold_left_optab_supported_p): Likewise.
30752         * fold-const-call.c (fold_const_fold_left): New function.
30753         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
30754         * tree-parloops.c (valid_reduction_p): New function.
30755         (gather_scalar_reductions): Use it.
30756         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
30757         (vect_finish_replace_stmt): Declare.
30758         * tree-vect-loop.c (fold_left_reduction_fn): New function.
30759         (needs_fold_left_reduction_p): New function, split out from...
30760         (vect_is_simple_reduction): ...here.  Accept reductions that
30761         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
30762         (vect_force_simple_reduction): Also store the reduction type in
30763         the assignment's STMT_VINFO_REDUC_TYPE.
30764         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
30765         (merge_with_identity): New function.
30766         (vect_expand_fold_left): Likewise.
30767         (vectorize_fold_left_reduction): Likewise.
30768         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
30769         scalar phi in place for it.  Check for target support and reject
30770         cases that would reassociate the operation.  Defer the transform
30771         phase to vectorize_fold_left_reduction.
30772         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
30773         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
30774         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
30776 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30778         * tree-if-conv.c (predicate_mem_writes): Remove redundant
30779         call to ifc_temp_var.
30781 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30782             Alan Hayward  <alan.hayward@arm.com>
30783             David Sherwood  <david.sherwood@arm.com>
30785         * target.def (legitimize_address_displacement): Take the original
30786         offset as a poly_int.
30787         * targhooks.h (default_legitimize_address_displacement): Update
30788         accordingly.
30789         * targhooks.c (default_legitimize_address_displacement): Likewise.
30790         * doc/tm.texi: Regenerate.
30791         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
30792         as an argument, moving assert of ad->disp == ad->disp_term to...
30793         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
30794         Try calling targetm.legitimize_address_displacement before expanding
30795         the address rather than afterwards, and adjust for the new interface.
30796         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
30797         Match the new hook interface.  Handle SVE addresses.
30798         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
30799         new hook interface.
30801 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30803         * Makefile.in (OBJS): Add early-remat.o.
30804         * target.def (select_early_remat_modes): New hook.
30805         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
30806         * doc/tm.texi: Regenerate.
30807         * targhooks.h (default_select_early_remat_modes): Declare.
30808         * targhooks.c (default_select_early_remat_modes): New function.
30809         * timevar.def (TV_EARLY_REMAT): New timevar.
30810         * passes.def (pass_early_remat): New pass.
30811         * tree-pass.h (make_pass_early_remat): Declare.
30812         * early-remat.c: New file.
30813         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
30814         function.
30815         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
30817 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30818             Alan Hayward  <alan.hayward@arm.com>
30819             David Sherwood  <david.sherwood@arm.com>
30821         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
30822         vfm1 with a bound_epilog parameter.
30823         (vect_do_peeling): Update calls accordingly, and move the prologue
30824         call earlier in the function.  Treat the base bound_epilog as 0 for
30825         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
30826         this base when peeling for gaps.
30827         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
30828         with fully-masked loops.
30829         (vect_estimate_min_profitable_iters): Handle the single peeled
30830         iteration in that case.
30832 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30833             Alan Hayward  <alan.hayward@arm.com>
30834             David Sherwood  <david.sherwood@arm.com>
30836         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
30837         single-element interleaving even if the size is not a power of 2.
30838         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
30839         accesses for single-element interleaving if the group size is
30840         not a power of 2.
30842 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30843             Alan Hayward  <alan.hayward@arm.com>
30844             David Sherwood  <david.sherwood@arm.com>
30846         * doc/md.texi (fold_extract_last_@var{m}): Document.
30847         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
30848         * optabs.def (fold_extract_last_optab): New optab.
30849         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
30850         * internal-fn.c (fold_extract_direct): New macro.
30851         (expand_fold_extract_optab_fn): Likewise.
30852         (direct_fold_extract_optab_supported_p): Likewise.
30853         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
30854         * tree-vect-loop.c (vect_model_reduction_cost): Handle
30855         EXTRACT_LAST_REDUCTION.
30856         (get_initial_def_for_reduction): Do not create an initial vector
30857         for EXTRACT_LAST_REDUCTION reductions.
30858         (vectorizable_reduction): Leave the scalar phi in place for
30859         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
30860         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
30861         epilogue code for EXTRACT_LAST_REDUCTION and defer the
30862         transform phase to vectorizable_condition.
30863         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
30864         split out from...
30865         (vect_finish_stmt_generation): ...here.
30866         (vect_finish_replace_stmt): New function.
30867         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
30868         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
30869         pattern.
30870         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
30872 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30873             Alan Hayward  <alan.hayward@arm.com>
30874             David Sherwood  <david.sherwood@arm.com>
30876         * doc/md.texi (extract_last_@var{m}): Document.
30877         * optabs.def (extract_last_optab): New optab.
30878         * internal-fn.def (EXTRACT_LAST): New internal function.
30879         * internal-fn.c (cond_unary_direct): New macro.
30880         (expand_cond_unary_optab_fn): Likewise.
30881         (direct_cond_unary_optab_supported_p): Likewise.
30882         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
30883         loops using EXTRACT_LAST.
30884         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
30885         (extract_last_<mode>): ...this optab.
30886         (vec_extract<mode><Vel>): Update accordingly.
30888 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30889             Alan Hayward  <alan.hayward@arm.com>
30890             David Sherwood  <david.sherwood@arm.com>
30892         * target.def (empty_mask_is_expensive): New hook.
30893         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
30894         * doc/tm.texi: Regenerate.
30895         * targhooks.h (default_empty_mask_is_expensive): Declare.
30896         * targhooks.c (default_empty_mask_is_expensive): New function.
30897         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
30898         if the target says that empty masks are expensive.
30899         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
30900         New function.
30901         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
30903 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30904             Alan Hayward  <alan.hayward@arm.com>
30905             David Sherwood  <david.sherwood@arm.com>
30907         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
30908         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
30909         (vect_use_loop_mask_for_alignment_p): New function.
30910         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
30911         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
30912         niters_skip argument.  Make sure that the first niters_skip elements
30913         of the first iteration are inactive.
30914         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
30915         Update call to vect_set_loop_masks_directly.
30916         (get_misalign_in_elems): New function, split out from...
30917         (vect_gen_prolog_loop_niters): ...here.
30918         (vect_update_init_of_dr): Take a code argument that specifies whether
30919         the adjustment should be added or subtracted.
30920         (vect_update_init_of_drs): Likewise.
30921         (vect_prepare_for_masked_peels): New function.
30922         (vect_do_peeling): Skip prologue peeling if we're using a mask
30923         instead.  Update call to vect_update_inits_of_drs.
30924         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
30925         mask_skip_niters.
30926         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
30927         alignment.  Do not include the number of peeled iterations in
30928         the minimum threshold in that case.
30929         (vectorizable_induction): Adjust the start value down by
30930         LOOP_VINFO_MASK_SKIP_NITERS iterations.
30931         (vect_transform_loop): Call vect_prepare_for_masked_peels.
30932         Take the number of skipped iterations into account when calculating
30933         the loop bounds.
30934         * tree-vect-stmts.c (vect_gen_while_not): New function.
30936 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30937             Alan Hayward  <alan.hayward@arm.com>
30938             David Sherwood  <david.sherwood@arm.com>
30940         * doc/sourcebuild.texi (vect_fully_masked): Document.
30941         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
30942         default value to 0.
30943         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
30944         split out from...
30945         (vect_analyze_loop_2): ...here. Don't check the vectorization
30946         factor against the number of loop iterations if the loop is
30947         fully-masked.
30949 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30950             Alan Hayward  <alan.hayward@arm.com>
30951             David Sherwood  <david.sherwood@arm.com>
30953         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
30954         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
30955         (dump_groups): Update accordingly.
30956         (iv_use::mem_type): New member variable.
30957         (address_p): New function.
30958         (record_use): Add a mem_type argument and initialize the new
30959         mem_type field.
30960         (record_group_use): Add a mem_type argument.  Use address_p.
30961         Remove obsolete null checks of base_object.  Update call to record_use.
30962         (find_interesting_uses_op): Update call to record_group_use.
30963         (find_interesting_uses_cond): Likewise.
30964         (find_interesting_uses_address): Likewise.
30965         (get_mem_type_for_internal_fn): New function.
30966         (find_address_like_use): Likewise.
30967         (find_interesting_uses_stmt): Try find_address_like_use before
30968         calling find_interesting_uses_op.
30969         (addr_offset_valid_p): Use the iv mem_type field as the type
30970         of the addressed memory.
30971         (add_autoinc_candidates): Likewise.
30972         (get_address_cost): Likewise.
30973         (split_small_address_groups_p): Use address_p.
30974         (split_address_groups): Likewise.
30975         (add_iv_candidate_for_use): Likewise.
30976         (autoinc_possible_for_pair): Likewise.
30977         (rewrite_groups): Likewise.
30978         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
30979         (determine_group_iv_cost): Update after split of USE_ADDRESS.
30980         (get_alias_ptr_type_for_ptr_address): New function.
30981         (rewrite_use_address): Rewrite address uses in calls that were
30982         identified by find_address_like_use.
30984 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30985             Alan Hayward  <alan.hayward@arm.com>
30986             David Sherwood  <david.sherwood@arm.com>
30988         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
30989         TARGET_MEM_REFs.
30990         * gimple-expr.h (is_gimple_addressable: Likewise.
30991         * gimple-expr.c (is_gimple_address): Likewise.
30992         * internal-fn.c (expand_call_mem_ref): New function.
30993         (expand_mask_load_optab_fn): Use it.
30994         (expand_mask_store_optab_fn): Likewise.
30996 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30997             Alan Hayward  <alan.hayward@arm.com>
30998             David Sherwood  <david.sherwood@arm.com>
31000         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
31001         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
31002         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
31003         (cond_umax@var{mode}): Document.
31004         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
31005         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
31006         (cond_umin_optab, cond_umax_optab): New optabs.
31007         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
31008         (COND_IOR, COND_XOR): New internal functions.
31009         * internal-fn.h (get_conditional_internal_fn): Declare.
31010         * internal-fn.c (cond_binary_direct): New macro.
31011         (expand_cond_binary_optab_fn): Likewise.
31012         (direct_cond_binary_optab_supported_p): Likewise.
31013         (get_conditional_internal_fn): New function.
31014         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
31015         Cope with reduction statements that are vectorized as calls rather
31016         than assignments.
31017         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
31018         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
31019         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
31020         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
31021         (UNSPEC_COND_EOR): New unspecs.
31022         (optab): Add mappings for them.
31023         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
31024         (sve_int_op, sve_fp_op): New int attributes.
31026 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31027             Alan Hayward  <alan.hayward@arm.com>
31028             David Sherwood  <david.sherwood@arm.com>
31030         * optabs.def (while_ult_optab): New optab.
31031         * doc/md.texi (while_ult@var{m}@var{n}): Document.
31032         * internal-fn.def (WHILE_ULT): New internal function.
31033         * internal-fn.h (direct_internal_fn_supported_p): New override
31034         that takes two types as argument.
31035         * internal-fn.c (while_direct): New macro.
31036         (expand_while_optab_fn): New function.
31037         (convert_optab_supported_p): Likewise.
31038         (direct_while_optab_supported_p): New macro.
31039         * wide-int.h (wi::udiv_ceil): New function.
31040         * tree-vectorizer.h (rgroup_masks): New structure.
31041         (vec_loop_masks): New typedef.
31042         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
31043         and fully_masked_p.
31044         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
31045         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
31046         (vect_max_vf): New function.
31047         (slpeel_make_loop_iterate_ntimes): Delete.
31048         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
31049         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
31050         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
31051         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
31052         internal-fn.h, stor-layout.h and optabs-query.h.
31053         (vect_set_loop_mask): New function.
31054         (add_preheader_seq): Likewise.
31055         (add_header_seq): Likewise.
31056         (interleave_supported_p): Likewise.
31057         (vect_maybe_permute_loop_masks): Likewise.
31058         (vect_set_loop_masks_directly): Likewise.
31059         (vect_set_loop_condition_masked): Likewise.
31060         (vect_set_loop_condition_unmasked): New function, split out from
31061         slpeel_make_loop_iterate_ntimes.
31062         (slpeel_make_loop_iterate_ntimes): Rename to..
31063         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
31064         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
31065         (vect_do_peeling): Update call accordingly.
31066         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
31067         loops.
31068         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
31069         mask_compare_type, can_fully_mask_p and fully_masked_p.
31070         (release_vec_loop_masks): New function.
31071         (_loop_vec_info): Use it to free the loop masks.
31072         (can_produce_all_loop_masks_p): New function.
31073         (vect_get_max_nscalars_per_iter): Likewise.
31074         (vect_verify_full_masking): Likewise.
31075         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
31076         retries, and free the mask rgroups before retrying.  Check loop-wide
31077         reasons for disallowing fully-masked loops.  Make the final decision
31078         about whether use a fully-masked loop or not.
31079         (vect_estimate_min_profitable_iters): Do not assume that peeling
31080         for the number of iterations will be needed for fully-masked loops.
31081         (vectorizable_reduction): Disable fully-masked loops.
31082         (vectorizable_live_operation): Likewise.
31083         (vect_halve_mask_nunits): New function.
31084         (vect_double_mask_nunits): Likewise.
31085         (vect_record_loop_mask): Likewise.
31086         (vect_get_loop_mask): Likewise.
31087         (vect_transform_loop): Handle the case in which the final loop
31088         iteration might handle a partial vector.  Call vect_set_loop_condition
31089         instead of slpeel_make_loop_iterate_ntimes.
31090         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
31091         (check_load_store_masking): New function.
31092         (prepare_load_store_mask): Likewise.
31093         (vectorizable_store): Handle fully-masked loops.
31094         (vectorizable_load): Likewise.
31095         (supportable_widening_operation): Use vect_halve_mask_nunits for
31096         booleans.
31097         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
31098         (vect_gen_while): New function.
31099         * config/aarch64/aarch64.md (umax<mode>3): New expander.
31100         (aarch64_uqdec<mode>): New insn.
31102 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31103             Alan Hayward  <alan.hayward@arm.com>
31104             David Sherwood  <david.sherwood@arm.com>
31106         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
31107         (reduc_xor_scal_optab): New optabs.
31108         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
31109         (reduc_xor_scal_@var{m}): Document.
31110         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
31111         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
31112         internal functions.
31113         * fold-const-call.c (fold_const_call): Handle them.
31114         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
31115         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
31116         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
31117         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
31118         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
31119         (UNSPEC_XORV): New unspecs.
31120         (optab): Add entries for them.
31121         (BITWISEV): New int iterator.
31122         (bit_reduc_op): New int attributes.
31124 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31125             Alan Hayward  <alan.hayward@arm.com>
31126             David Sherwood  <david.sherwood@arm.com>
31128         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
31129         * internal-fn.def (VEC_SHL_INSERT): New internal function.
31130         * optabs.def (vec_shl_insert_optab): New optab.
31131         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
31132         (duplicate_and_interleave): Likewise.
31133         * tree-vect-loop.c: Include internal-fn.h.
31134         (neutral_op_for_slp_reduction): New function, split out from
31135         get_initial_defs_for_reduction.
31136         (get_initial_def_for_reduction): Handle option 2 for variable-length
31137         vectors by loading the neutral value into a vector and then shifting
31138         the initial value into element 0.
31139         (get_initial_defs_for_reduction): Replace the code argument with
31140         the neutral value calculated by neutral_op_for_slp_reduction.
31141         Use gimple_build_vector for constant-length vectors.
31142         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
31143         but the first group_size elements have a neutral value.
31144         Use duplicate_and_interleave otherwise.
31145         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
31146         Update call to get_initial_defs_for_reduction.  Handle SLP
31147         reductions for variable-length vectors by creating one vector
31148         result for each scalar result, with the elements associated
31149         with other scalar results stubbed out with the neutral value.
31150         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
31151         Require IFN_VEC_SHL_INSERT for double reductions on
31152         variable-length vectors, or SLP reductions that have
31153         a neutral value.  Require can_duplicate_and_interleave_p
31154         support for variable-length unchained SLP reductions if there
31155         is no neutral value, such as for MIN/MAX reductions.  Also require
31156         the number of vector elements to be a multiple of the number of
31157         SLP statements when doing variable-length unchained SLP reductions.
31158         Update call to vect_create_epilog_for_reduction.
31159         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
31160         and remove initial values.
31161         (duplicate_and_interleave): Make public.
31162         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
31163         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
31165 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31166             Alan Hayward  <alan.hayward@arm.com>
31167             David Sherwood  <david.sherwood@arm.com>
31169         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
31170         (can_duplicate_and_interleave_p): New function.
31171         (vect_get_and_check_slp_defs): Take the vector of statements
31172         rather than just the current one.  Remove excess parentheses.
31173         Restriction rejectinon of vect_constant_def and vect_external_def
31174         for variable-length vectors to boolean types, or types for which
31175         can_duplicate_and_interleave_p is false.
31176         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
31177         (duplicate_and_interleave): New function.
31178         (vect_get_constant_vectors): Use gimple_build_vector for
31179         constant-length vectors and suitable variable-length constant
31180         vectors.  Use duplicate_and_interleave for other variable-length
31181         vectors.  Don't defer the update when inserting new statements.
31183 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31184             Alan Hayward  <alan.hayward@arm.com>
31185             David Sherwood  <david.sherwood@arm.com>
31187         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
31188         min_profitable_iters doesn't go negative.
31190 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31191             Alan Hayward  <alan.hayward@arm.com>
31192             David Sherwood  <david.sherwood@arm.com>
31194         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
31195         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
31196         * optabs.def (vec_mask_load_lanes_optab): New optab.
31197         (vec_mask_store_lanes_optab): Likewise.
31198         * internal-fn.def (MASK_LOAD_LANES): New internal function.
31199         (MASK_STORE_LANES): Likewise.
31200         * internal-fn.c (mask_load_lanes_direct): New macro.
31201         (mask_store_lanes_direct): Likewise.
31202         (expand_mask_load_optab_fn): Handle masked operations.
31203         (expand_mask_load_lanes_optab_fn): New macro.
31204         (expand_mask_store_optab_fn): Handle masked operations.
31205         (expand_mask_store_lanes_optab_fn): New macro.
31206         (direct_mask_load_lanes_optab_supported_p): Likewise.
31207         (direct_mask_store_lanes_optab_supported_p): Likewise.
31208         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
31209         parameter.
31210         (vect_load_lanes_supported): Likewise.
31211         * tree-vect-data-refs.c (strip_conversion): New function.
31212         (can_group_stmts_p): Likewise.
31213         (vect_analyze_data_ref_accesses): Use it instead of checking
31214         for a pair of assignments.
31215         (vect_store_lanes_supported): Take a masked_p parameter.
31216         (vect_load_lanes_supported): Likewise.
31217         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
31218         vect_store_lanes_supported and vect_load_lanes_supported.
31219         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
31220         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
31221         parameter.  Don't allow gaps for masked accesses.
31222         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
31223         and vect_load_lanes_supported.
31224         (get_load_store_type): Take a masked_p parameter and update
31225         call to get_group_load_store_type.
31226         (vectorizable_store): Update call to get_load_store_type.
31227         Handle IFN_MASK_STORE_LANES.
31228         (vectorizable_load): Update call to get_load_store_type.
31229         Handle IFN_MASK_LOAD_LANES.
31231 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31232             Alan Hayward  <alan.hayward@arm.com>
31233             David Sherwood  <david.sherwood@arm.com>
31235         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
31236         modes for SVE.
31237         * config/aarch64/aarch64-protos.h
31238         (aarch64_sve_struct_memory_operand_p): Declare.
31239         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
31240         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
31241         (VPRED, vpred): Handle SVE structure modes.
31242         * config/aarch64/constraints.md (Utx): New constraint.
31243         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
31244         (aarch64_sve_struct_nonimmediate_operand): New predicates.
31245         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
31246         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
31247         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
31248         structure modes.  Split into pieces after RA.
31249         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
31250         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
31251         New patterns.
31252         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
31253         SVE structure modes.
31254         (aarch64_classify_address): Likewise.
31255         (sizetochar): Move earlier in file.
31256         (aarch64_print_operand): Handle SVE register lists.
31257         (aarch64_array_mode): New function.
31258         (aarch64_sve_struct_memory_operand_p): Likewise.
31259         (TARGET_ARRAY_MODE): Redefine.
31261 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31262             Alan Hayward  <alan.hayward@arm.com>
31263             David Sherwood  <david.sherwood@arm.com>
31265         * target.def (array_mode): New target hook.
31266         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
31267         * doc/tm.texi: Regenerate.
31268         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
31269         * hooks.c (hook_optmode_mode_uhwi_none): New function.
31270         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
31271         targetm.array_mode.
31272         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
31273         type sizes.
31275 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31276             Alan Hayward  <alan.hayward@arm.com>
31277             David Sherwood  <david.sherwood@arm.com>
31279         * fold-const.c (fold_binary_loc): Check the argument types
31280         rather than the result type when testing for a vector operation.
31282 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31284         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
31285         * doc/tm.texi: Regenerate.
31287 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31288             Alan Hayward  <alan.hayward@arm.com>
31289             David Sherwood  <david.sherwood@arm.com>
31291         * doc/invoke.texi (-msve-vector-bits=): Document new option.
31292         (sve): Document new AArch64 extension.
31293         * doc/md.texi (w): Extend the description of the AArch64
31294         constraint to include SVE vectors.
31295         (Upl, Upa): Document new AArch64 predicate constraints.
31296         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
31297         enum.
31298         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
31299         (msve-vector-bits=): New option.
31300         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
31301         SVE when these are disabled.
31302         (sve): New extension.
31303         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
31304         modes.  Adjust their number of units based on aarch64_sve_vg.
31305         (MAX_BITSIZE_MODE_ANY_MODE): Define.
31306         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
31307         aarch64_addr_query_type.
31308         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
31309         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
31310         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
31311         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
31312         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
31313         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
31314         (aarch64_simd_imm_zero_p): Delete.
31315         (aarch64_check_zero_based_sve_index_immediate): Declare.
31316         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
31317         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
31318         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
31319         (aarch64_sve_float_mul_immediate_p): Likewise.
31320         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
31321         rather than an rtx.
31322         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
31323         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
31324         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
31325         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
31326         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
31327         (aarch64_regmode_natural_size): Likewise.
31328         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
31329         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
31330         left one place.
31331         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
31332         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
31333         for VG and the SVE predicate registers.
31334         (V_ALIASES): Add a "z"-prefixed alias.
31335         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
31336         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
31337         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
31338         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
31339         (REG_CLASS_NAMES): Add entries for them.
31340         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
31341         and the predicate registers.
31342         (aarch64_sve_vg): Declare.
31343         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
31344         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
31345         (REGMODE_NATURAL_SIZE): Define.
31346         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
31347         SVE macros.
31348         * config/aarch64/aarch64.c: Include cfgrtl.h.
31349         (simd_immediate_info): Add a constructor for series vectors,
31350         and an associated step field.
31351         (aarch64_sve_vg): New variable.
31352         (aarch64_dbx_register_number): Handle VG and the predicate registers.
31353         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
31354         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
31355         (VEC_ANY_DATA, VEC_STRUCT): New constants.
31356         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
31357         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
31358         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
31359         (aarch64_get_mask_mode): New functions.
31360         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
31361         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
31362         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
31363         predicate modes and predicate registers.  Explicitly restrict
31364         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
31365         to store a vector mode if it is recognized by
31366         aarch64_classify_vector_mode.
31367         (aarch64_regmode_natural_size): New function.
31368         (aarch64_hard_regno_caller_save_mode): Return the original mode
31369         for predicates.
31370         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
31371         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
31372         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
31373         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
31374         functions.
31375         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
31376         does not overlap dest if the function is frame-related.  Handle
31377         SVE constants.
31378         (aarch64_split_add_offset): New function.
31379         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
31380         them aarch64_add_offset.
31381         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
31382         and update call to aarch64_sub_sp.
31383         (aarch64_add_cfa_expression): New function.
31384         (aarch64_expand_prologue): Pass extra temporary registers to the
31385         functions above.  Handle the case in which we need to emit new
31386         DW_CFA_expressions for registers that were originally saved
31387         relative to the stack pointer, but now have to be expressed
31388         relative to the frame pointer.
31389         (aarch64_output_mi_thunk): Pass extra temporary registers to the
31390         functions above.
31391         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
31392         IP0 and IP1 values for SVE frames.
31393         (aarch64_expand_vec_series): New function.
31394         (aarch64_expand_sve_widened_duplicate): Likewise.
31395         (aarch64_expand_sve_const_vector): Likewise.
31396         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
31397         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
31398         into the register, rather than emitting a SET directly.
31399         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
31400         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
31401         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
31402         (offset_9bit_signed_scaled_p): New functions.
31403         (aarch64_replicate_bitmask_imm): New function.
31404         (aarch64_bitmask_imm): Use it.
31405         (aarch64_cannot_force_const_mem): Reject expressions involving
31406         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
31407         (aarch64_classify_index): Handle SVE indices, by requiring
31408         a plain register index with a scale that matches the element size.
31409         (aarch64_classify_address): Handle SVE addresses.  Assert that
31410         the mode of the address is VOIDmode or an integer mode.
31411         Update call to aarch64_classify_symbol.
31412         (aarch64_classify_symbolic_expression): Update call to
31413         aarch64_classify_symbol.
31414         (aarch64_const_vec_all_in_range_p): New function.
31415         (aarch64_print_vector_float_operand): Likewise.
31416         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
31417         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
31418         and the FP immediates 1.0 and 0.5.
31419         (aarch64_print_address_internal): Handle SVE addresses.
31420         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
31421         (aarch64_regno_regclass): Handle predicate registers.
31422         (aarch64_secondary_reload): Handle big-endian reloads of SVE
31423         data modes.
31424         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
31425         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
31426         (aarch64_convert_sve_vector_bits): New function.
31427         (aarch64_override_options): Use it to handle -msve-vector-bits=.
31428         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
31429         rather than an rtx.
31430         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
31431         Handle SVE vector and predicate modes.  Accept VL-based constants
31432         that need only one temporary register, and VL offsets that require
31433         no temporary registers.
31434         (aarch64_conditional_register_usage): Mark the predicate registers
31435         as fixed if SVE isn't available.
31436         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
31437         Return true for SVE vector and predicate modes.
31438         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
31439         rather than an unsigned int.  Handle SVE modes.
31440         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
31441         SVE modes.
31442         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
31443         if SVE is enabled.
31444         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
31445         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
31446         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
31447         (aarch64_sve_float_mul_immediate_p): New functions.
31448         (aarch64_sve_valid_immediate): New function.
31449         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
31450         Explicitly reject structure modes.  Check for INDEX constants.
31451         Handle PTRUE and PFALSE constants.
31452         (aarch64_check_zero_based_sve_index_immediate): New function.
31453         (aarch64_simd_imm_zero_p): Delete.
31454         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
31455         vector modes.  Accept constants in the range of CNT[BHWD].
31456         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
31457         ask for an Advanced SIMD mode.
31458         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
31459         (aarch64_simd_vector_alignment): Handle SVE predicates.
31460         (aarch64_vectorize_preferred_vector_alignment): New function.
31461         (aarch64_simd_vector_alignment_reachable): Use it instead of
31462         the vector size.
31463         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
31464         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
31465         functions.
31466         (MAX_VECT_LEN): Delete.
31467         (expand_vec_perm_d): Add a vec_flags field.
31468         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
31469         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
31470         (aarch64_evpc_ext): Don't apply a big-endian lane correction
31471         for SVE modes.
31472         (aarch64_evpc_rev): Rename to...
31473         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
31474         (aarch64_evpc_rev_global): New function.
31475         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
31476         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
31477         MAX_VECT_LEN.
31478         (aarch64_evpc_sve_tbl): New function.
31479         (aarch64_expand_vec_perm_const_1): Update after rename of
31480         aarch64_evpc_rev.  Handle SVE permutes too, trying
31481         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
31482         than aarch64_evpc_tbl.
31483         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
31484         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
31485         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
31486         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
31487         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
31488         (aarch64_expand_sve_vcond): New functions.
31489         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
31490         of aarch64_vector_mode_p.
31491         (aarch64_dwarf_poly_indeterminate_value): New function.
31492         (aarch64_compute_pressure_classes): Likewise.
31493         (aarch64_can_change_mode_class): Likewise.
31494         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
31495         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
31496         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
31497         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
31498         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
31499         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
31500         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
31501         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
31502         constraints.
31503         (Dn, Dl, Dr): Accept const as well as const_vector.
31504         (Dz): Likewise.  Compare against CONST0_RTX.
31505         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
31506         of "vector" where appropriate.
31507         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
31508         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
31509         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
31510         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
31511         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
31512         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
31513         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
31514         (v_int_equiv): Extend to SVE modes.
31515         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
31516         mode attributes.
31517         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
31518         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
31519         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
31520         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
31521         (SVE_COND_FP_CMP): New int iterators.
31522         (perm_hilo): Handle the new unpack unspecs.
31523         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
31524         attributes.
31525         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
31526         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
31527         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
31528         (aarch64_equality_operator, aarch64_constant_vector_operand)
31529         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
31530         (aarch64_sve_nonimmediate_operand): Likewise.
31531         (aarch64_sve_general_operand): Likewise.
31532         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
31533         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
31534         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
31535         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
31536         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
31537         (aarch64_sve_float_arith_immediate): Likewise.
31538         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
31539         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
31540         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
31541         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
31542         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
31543         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
31544         (aarch64_sve_float_arith_operand): Likewise.
31545         (aarch64_sve_float_arith_with_sub_operand): Likewise.
31546         (aarch64_sve_float_mul_operand): Likewise.
31547         (aarch64_sve_vec_perm_operand): Likewise.
31548         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
31549         (aarch64_mov_operand): Accept const_poly_int and const_vector.
31550         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
31551         as well as const_vector.
31552         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
31553         in file.  Use CONST0_RTX and CONSTM1_RTX.
31554         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
31555         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
31556         Use aarch64_simd_imm_zero.
31557         * config/aarch64/aarch64-sve.md: New file.
31558         * config/aarch64/aarch64.md: Include it.
31559         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
31560         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
31561         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
31562         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
31563         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
31564         (sve): New attribute.
31565         (enabled): Disable instructions with the sve attribute unless
31566         TARGET_SVE.
31567         (movqi, movhi): Pass CONST_POLY_INT operaneds through
31568         aarch64_expand_mov_immediate.
31569         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
31570         CNT[BHSD] immediates.
31571         (movti): Split CONST_POLY_INT moves into two halves.
31572         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
31573         Split additions that need a temporary here if the destination
31574         is the stack pointer.
31575         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
31576         (*add<mode>3_poly_1): New instruction.
31577         (set_clobber_cc): New expander.
31579 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31581         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
31582         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
31583         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
31584         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
31585         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
31586         Change innermode from fixed_mode_size to machine_mode.
31587         (simplify_subreg): Update call accordingly.  Handle a constant-sized
31588         subreg of a variable-length CONST_VECTOR.
31590 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31591             Alan Hayward  <alan.hayward@arm.com>
31592             David Sherwood  <david.sherwood@arm.com>
31594         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
31595         (add_offset_to_base): New function, split out from...
31596         (create_mem_ref): ...here.  When handling a scale other than 1,
31597         check first whether the address is valid without the offset.
31598         Add it into the base if so, leaving the index and scale as-is.
31600 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
31602         PR c++/83778
31603         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
31604         fold_for_warn before checking if arg2 is INTEGER_CST.
31606 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
31608         * config/rs6000/predicates.md (load_multiple_operation): Delete.
31609         (store_multiple_operation): Delete.
31610         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
31611         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
31612         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
31613         guarded by TARGET_STRING.
31614         (rs6000_output_load_multiple): Delete.
31615         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
31616         OPTION_MASK_STRING / TARGET_STRING handling.
31617         (print_operand) <'N', 'O'>: Add comment that these are unused now.
31618         (const rs6000_opt_masks) <"string">: Change mask to 0.
31619         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
31620         (MASK_STRING): Delete.
31621         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
31622         parts.  Simplify.
31623         (load_multiple): Delete.
31624         (*ldmsi8): Delete.
31625         (*ldmsi7): Delete.
31626         (*ldmsi6): Delete.
31627         (*ldmsi5): Delete.
31628         (*ldmsi4): Delete.
31629         (*ldmsi3): Delete.
31630         (store_multiple): Delete.
31631         (*stmsi8): Delete.
31632         (*stmsi7): Delete.
31633         (*stmsi6): Delete.
31634         (*stmsi5): Delete.
31635         (*stmsi4): Delete.
31636         (*stmsi3): Delete.
31637         (movmemsi_8reg): Delete.
31638         (corresponding unnamed define_insn): Delete.
31639         (movmemsi_6reg): Delete.
31640         (corresponding unnamed define_insn): Delete.
31641         (movmemsi_4reg): Delete.
31642         (corresponding unnamed define_insn): Delete.
31643         (movmemsi_2reg): Delete.
31644         (corresponding unnamed define_insn): Delete.
31645         (movmemsi_1reg): Delete.
31646         (corresponding unnamed define_insn): Delete.
31647         * config/rs6000/rs6000.opt (mno-string): New.
31648         (mstring): Replace by deprecation warning stub.
31649         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
31651 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
31653         * regrename.c (regrename_do_replace): If replacing the same
31654         reg multiple times, try to reuse last created gen_raw_REG.
31656         PR debug/81155
31657         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
31658         main to workaround a bug in GDB.
31660 2018-01-12  Tom de Vries  <tom@codesourcery.com>
31662         PR target/83737
31663         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
31665 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
31667         PR rtl-optimization/80481
31668         * ira-color.c (get_cap_member): New function.
31669         (allocnos_conflict_by_live_ranges_p): Use it.
31670         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
31671         (setup_slot_coalesced_allocno_live_ranges): Ditto.
31673 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
31675         PR target/83628
31676         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
31677         (*saddl_se_1): Ditto.
31678         (*ssubsi_1): Ditto.
31679         (*ssubl_se_1): Ditto.
31681 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
31683         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
31684         rather than wi::to_widest for DR_INITs.
31685         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
31686         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
31687         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
31688         INTEGER_CSTs.
31689         (vect_analyze_group_access_1): Note that here.
31691 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
31693         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
31694         polynomial type sizes.
31696 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
31698         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
31699         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
31700         (gimple_add_tmp_var): Likewise.
31702 2018-01-12  Martin Liska  <mliska@suse.cz>
31704         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
31705         (gimple_alloc_sizes): Likewise.
31706         (dump_gimple_statistics): Use PRIu64 in printf format.
31707         * gimple.h: Change uint64_t to int.
31709 2018-01-12  Martin Liska  <mliska@suse.cz>
31711         * tree-core.h: Use uint64_t instead of int.
31712         * tree.c (tree_node_counts): Likewise.
31713         (tree_node_sizes): Likewise.
31714         (dump_tree_statistics): Use PRIu64 in printf format.
31716 2018-01-12  Martin Liska  <mliska@suse.cz>
31718         * Makefile.in: As qsort_chk is implemented in vec.c, add
31719         vec.o to linkage of gencfn-macros.
31720         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
31721         passing the info to record_node_allocation_statistics.
31722         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
31723         and pass the info.
31724         * ggc-common.c (struct ggc_usage): Add operator== and use
31725         it in operator< and compare function.
31726         * mem-stats.h (struct mem_usage): Likewise.
31727         * vec.c (struct vec_usage): Remove operator< and compare
31728         function. Can be simply inherited.
31730 2018-01-12  Martin Jambor  <mjambor@suse.cz>
31732         PR target/81616
31733         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
31734         * tree-ssa-math-opts.c: Include domwalk.h.
31735         (convert_mult_to_fma_1): New function.
31736         (fma_transformation_info): New type.
31737         (fma_deferring_state): Likewise.
31738         (cancel_fma_deferring): New function.
31739         (result_of_phi): Likewise.
31740         (last_fma_candidate_feeds_initial_phi): Likewise.
31741         (convert_mult_to_fma): Added deferring logic, split actual
31742         transformation to convert_mult_to_fma_1.
31743         (math_opts_dom_walker): New type.
31744         (math_opts_dom_walker::after_dom_children): New method, body moved
31745         here from pass_optimize_widening_mul::execute, added deferring logic
31746         bits.
31747         (pass_optimize_widening_mul::execute): Moved most of code to
31748         math_opts_dom_walker::after_dom_children.
31749         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
31750         * config/i386/i386.c (ix86_option_override_internal): Added
31751         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
31753 2018-01-12  Richard Biener  <rguenther@suse.de>
31755         PR debug/83157
31756         * dwarf2out.c (gen_variable_die): Do not reset old_die for
31757         inline instance vars.
31759 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
31761         PR target/81819
31762         * config/rx/rx.c (rx_is_restricted_memory_address):
31763         Handle SUBREG case.
31765 2018-01-12  Richard Biener  <rguenther@suse.de>
31767         PR tree-optimization/80846
31768         * target.def (split_reduction): New target hook.
31769         * targhooks.c (default_split_reduction): New function.
31770         * targhooks.h (default_split_reduction): Declare.
31771         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
31772         target requests first reduce vectors by combining low and high
31773         parts.
31774         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
31775         (get_vectype_for_scalar_type_and_size): Export.
31776         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
31777         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
31778         * doc/tm.texi: Regenerate.
31779         * config/i386/i386.c (ix86_split_reduction): Implement
31780         TARGET_VECTORIZE_SPLIT_REDUCTION.
31782 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
31784         PR target/83368
31785         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
31786         in PIC mode except for TARGET_VXWORKS_RTP.
31787         * config/sparc/sparc.c: Include cfgrtl.h.
31788         (TARGET_INIT_PIC_REG): Define.
31789         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
31790         (sparc_pic_register_p): New predicate.
31791         (sparc_legitimate_address_p): Use it.
31792         (sparc_legitimize_pic_address): Likewise.
31793         (sparc_delegitimize_address): Likewise.
31794         (sparc_mode_dependent_address_p): Likewise.
31795         (gen_load_pcrel_sym): Remove 4th parameter.
31796         (load_got_register): Adjust call to above.  Remove obsolete stuff.
31797         (sparc_expand_prologue): Do not call load_got_register here.
31798         (sparc_flat_expand_prologue): Likewise.
31799         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
31800         (sparc_use_pseudo_pic_reg): New function.
31801         (sparc_init_pic_reg): Likewise.
31802         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
31803         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
31805 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
31807         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
31808         Add item for branch_cost.
31810 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
31812         PR rtl-optimization/83565
31813         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
31814         not extend the result to a larger mode for rotate operations.
31815         (num_sign_bit_copies1): Likewise.
31817 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
31819         PR target/40411
31820         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
31821         -symbolic.
31822         Use values-Xc.o for -pedantic.
31823         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
31825 2018-01-12  Martin Liska  <mliska@suse.cz>
31827         PR ipa/83054
31828         * ipa-devirt.c (final_warning_record::grow_type_warnings):
31829         New function.
31830         (possible_polymorphic_call_targets): Use it.
31831         (ipa_devirt): Likewise.
31833 2018-01-12  Martin Liska  <mliska@suse.cz>
31835         * profile-count.h (enum profile_quality): Use 0 as invalid
31836         enum value of profile_quality.
31838 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
31840         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
31841         -mext-string options.
31843 2018-01-12  Richard Biener  <rguenther@suse.de>
31845         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
31846         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
31847         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
31848         Likewise.
31849         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
31851 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
31853         * configure.ac (--with-long-double-format): Add support for the
31854         configuration option to change the default long double format on
31855         PowerPC systems.
31856         * config.gcc (powerpc*-linux*-*): Likewise.
31857         * configure: Regenerate.
31858         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
31859         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
31860         used without modification.
31862 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
31864         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
31865         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
31866         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
31867         MISC_BUILTIN_SPEC_BARRIER.
31868         (rs6000_init_builtins): Likewise.
31869         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
31870         enum value.
31871         (speculation_barrier): New define_insn.
31872         * doc/extend.texi: Document __builtin_speculation_barrier.
31874 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
31876         PR target/83203
31877         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
31878         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
31879         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
31880         iterators.
31881         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
31882         integral modes instead of "ss" and "sd".
31883         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
31884         vectors with 32-bit and 64-bit elements.
31885         (vecdupssescalarmodesuffix): New mode attribute.
31886         (vec_dup<mode>): Use it.
31888 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
31890         PR target/83330
31891         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
31892         frame if argument is passed on stack.
31894 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
31896         PR target/82682
31897         * ree.c (combine_reaching_defs): Optimize also
31898         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
31899         reg2=any_extend(exp); reg1=reg2;, formatting fix.
31901 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
31903         PR middle-end/83189
31904         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
31906 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
31908         PR middle-end/83718
31909         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
31910         after they are computed.
31912 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
31914         PR tree-optimization/83695
31915         * gimple-loop-linterchange.cc
31916         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
31917         reset cached scev information after interchange.
31918         (pass_linterchange::execute): Remove call to scev_reset_htab.
31920 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
31922         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
31923         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
31924         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
31925         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
31926         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
31927         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
31928         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
31929         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
31930         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
31931         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
31932         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
31933         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
31934         (V_lane_reg): Likewise.
31935         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
31936         New define_expand.
31937         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
31938         (vfmal_lane_low<mode>_intrinsic,
31939         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
31940         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
31941         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
31942         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
31943         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
31944         vfmsl_lane_high<mode>_intrinsic): New define_insns.
31946 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
31948         * config/arm/arm-cpus.in (fp16fml): New feature.
31949         (ALL_SIMD): Add fp16fml.
31950         (armv8.2-a): Add fp16fml as an option.
31951         (armv8.3-a): Likewise.
31952         (armv8.4-a): Add fp16fml as part of fp16.
31953         * config/arm/arm.h (TARGET_FP16FML): Define.
31954         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
31955         when appropriate.
31956         * config/arm/arm-modes.def (V2HF): Define.
31957         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
31958         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
31959         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
31960         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
31961         vfmsl_low, vfmsl_high): New set of builtins.
31962         * config/arm/iterators.md (PLUSMINUS): New code iterator.
31963         (vfml_op): New code attribute.
31964         (VFMLHALVES): New int iterator.
31965         (VFML, VFMLSEL): New mode attributes.
31966         (V_reg): Define mapping for V2HF.
31967         (V_hi, V_lo): New mode attributes.
31968         (VF_constraint): Likewise.
31969         (vfml_half, vfml_half_selector): New int attributes.
31970         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
31971         define_expand.
31972         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
31973         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
31974         New define_insn.
31975         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
31976         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
31977         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
31978         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
31979         documentation.
31980         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
31981         Document new effective target and option set.
31983 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
31985         * config/arm/arm-cpus.in (armv8_4): New feature.
31986         (ARMv8_4a): New fgroup.
31987         (armv8.4-a): New arch.
31988         * config/arm/arm-tables.opt: Regenerate.
31989         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
31990         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
31991         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
31992         Add matching rules for -march=armv8.4-a and extensions.
31993         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
31995 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
31997         PR target/81821
31998         * config/rx/rx.md (BW): New mode attribute.
31999         (sync_lock_test_and_setsi): Add mode suffix to insn output.
32001 2018-01-11  Richard Biener  <rguenther@suse.de>
32003         PR tree-optimization/83435
32004         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
32005         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
32006         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
32008 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
32009             Alan Hayward  <alan.hayward@arm.com>
32010             David Sherwood  <david.sherwood@arm.com>
32012         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
32013         field.
32014         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
32015         (aarch64_print_address_internal): Use it to check for a zero offset.
32017 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
32018             Alan Hayward  <alan.hayward@arm.com>
32019             David Sherwood  <david.sherwood@arm.com>
32021         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
32022         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
32023         Return a poly_int64 rather than a HOST_WIDE_INT.
32024         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
32025         rather than a HOST_WIDE_INT.
32026         * config/aarch64/aarch64.h (aarch64_frame): Protect with
32027         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
32028         hard_fp_offset, frame_size, initial_adjust, callee_offset and
32029         final_offset from HOST_WIDE_INT to poly_int64.
32030         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
32031         to_constant when getting the number of units in an Advanced SIMD
32032         mode.
32033         (aarch64_builtin_vectorized_function): Check for a constant number
32034         of units.
32035         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
32036         GET_MODE_SIZE.
32037         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
32038         attribute instead of GET_MODE_NUNITS.
32039         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
32040         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
32041         GET_MODE_SIZE for fixed-size registers.
32042         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
32043         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
32044         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
32045         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
32046         (aarch64_print_operand, aarch64_print_address_internal)
32047         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
32048         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
32049         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
32050         Handle polynomial GET_MODE_SIZE.
32051         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
32052         wider than SImode without modification.
32053         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
32054         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
32055         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
32056         passing and returning SVE modes.
32057         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
32058         rather than GEN_INT.
32059         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
32060         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
32061         (aarch64_allocate_and_probe_stack_space): Likewise.
32062         (aarch64_layout_frame): Cope with polynomial offsets.
32063         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
32064         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
32065         polynomial offsets.
32066         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
32067         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
32068         poly_int64 rather than a HOST_WIDE_INT.
32069         (aarch64_get_separate_components, aarch64_process_components)
32070         (aarch64_expand_prologue, aarch64_expand_epilogue)
32071         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
32072         (aarch64_anchor_offset): New function, split out from...
32073         (aarch64_legitimize_address): ...here.
32074         (aarch64_builtin_vectorization_cost): Handle polynomial
32075         TYPE_VECTOR_SUBPARTS.
32076         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
32077         GET_MODE_NUNITS.
32078         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
32079         number of elements from the PARALLEL rather than the mode.
32080         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
32081         rather than GET_MODE_BITSIZE.
32082         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
32083         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
32084         (aarch64_expand_vec_perm_const_1): Handle polynomial
32085         d->perm.length () and d->perm elements.
32086         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
32087         Apply to_constant to d->perm elements.
32088         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
32089         polynomial CONST_VECTOR_NUNITS.
32090         (aarch64_move_pointer): Take amount as a poly_int64 rather
32091         than an int.
32092         (aarch64_progress_pointer): Avoid temporary variable.
32093         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
32094         the mode attribute instead of GET_MODE.
32096 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
32097             Alan Hayward  <alan.hayward@arm.com>
32098             David Sherwood  <david.sherwood@arm.com>
32100         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
32101         x exists before using it.
32102         (aarch64_add_constant_internal): Rename to...
32103         (aarch64_add_offset_1): ...this.  Replace regnum with separate
32104         src and dest rtxes.  Handle the case in which they're different,
32105         including when the offset is zero.  Replace scratchreg with an rtx.
32106         Use 2 additions if there is no spare register into which we can
32107         move a 16-bit constant.
32108         (aarch64_add_constant): Delete.
32109         (aarch64_add_offset): Replace reg with separate src and dest
32110         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
32111         Use aarch64_add_offset_1.
32112         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
32113         an rtx rather than an int.  Take the delta as a poly_int64
32114         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
32115         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
32116         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
32117         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
32118         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
32119         and aarch64_add_sp.
32120         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
32121         aarch64_add_constant.
32123 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
32125         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
32126         Use scalar_float_mode.
32128 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
32130         * config/aarch64/aarch64-simd.md
32131         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
32132         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
32133         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
32134         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
32135         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
32136         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
32137         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
32138         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
32139         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
32140         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
32142 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
32144         PR target/83514
32145         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
32146         targ_options->x_arm_arch_string is non NULL.
32148 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
32150         * config/aarch64/aarch64.h
32151         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
32153 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
32155         PR target/82096
32156         * expmed.c (emit_store_flag_force): Swap if const op0
32157         and change VOIDmode to mode of op0.
32159 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
32161         PR rtl-optimization/83761
32162         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
32163         than bytes to mode_for_size.
32165 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
32167         PR middle-end/83189
32168         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
32169         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
32170         profile.
32172 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
32174         PR middle-end/83575
32175         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
32176         when in layout mode.
32177         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
32178         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
32179         partition fixup.
32181 2018-01-10  Michael Collison  <michael.collison@arm.com>
32183         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
32184         * config/aarch64/aarch64-option-extension.def: Add
32185         AARCH64_OPT_EXTENSION of 'fp16fml'.
32186         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
32187         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
32188         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
32189         * config/aarch64/constraints.md (Ui7): New constraint.
32190         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
32191         (VFMLA_SEL_W): Ditto.
32192         (f16quad): Ditto.
32193         (f16mac1): Ditto.
32194         (VFMLA16_LOW): New int iterator.
32195         (VFMLA16_HIGH): Ditto.
32196         (UNSPEC_FMLAL): New unspec.
32197         (UNSPEC_FMLSL): Ditto.
32198         (UNSPEC_FMLAL2): Ditto.
32199         (UNSPEC_FMLSL2): Ditto.
32200         (f16mac): New code attribute.
32201         * config/aarch64/aarch64-simd-builtins.def
32202         (aarch64_fmlal_lowv2sf): Ditto.
32203         (aarch64_fmlsl_lowv2sf): Ditto.
32204         (aarch64_fmlalq_lowv4sf): Ditto.
32205         (aarch64_fmlslq_lowv4sf): Ditto.
32206         (aarch64_fmlal_highv2sf): Ditto.
32207         (aarch64_fmlsl_highv2sf): Ditto.
32208         (aarch64_fmlalq_highv4sf): Ditto.
32209         (aarch64_fmlslq_highv4sf): Ditto.
32210         (aarch64_fmlal_lane_lowv2sf): Ditto.
32211         (aarch64_fmlsl_lane_lowv2sf): Ditto.
32212         (aarch64_fmlal_laneq_lowv2sf): Ditto.
32213         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
32214         (aarch64_fmlalq_lane_lowv4sf): Ditto.
32215         (aarch64_fmlsl_lane_lowv4sf): Ditto.
32216         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
32217         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
32218         (aarch64_fmlal_lane_highv2sf): Ditto.
32219         (aarch64_fmlsl_lane_highv2sf): Ditto.
32220         (aarch64_fmlal_laneq_highv2sf): Ditto.
32221         (aarch64_fmlsl_laneq_highv2sf): Ditto.
32222         (aarch64_fmlalq_lane_highv4sf): Ditto.
32223         (aarch64_fmlsl_lane_highv4sf): Ditto.
32224         (aarch64_fmlalq_laneq_highv4sf): Ditto.
32225         (aarch64_fmlsl_laneq_highv4sf): Ditto.
32226         * config/aarch64/aarch64-simd.md:
32227         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
32228         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
32229         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
32230         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
32231         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
32232         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
32233         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
32234         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
32235         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
32236         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
32237         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
32238         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
32239         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
32240         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
32241         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
32242         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
32243         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
32244         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
32245         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
32246         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
32247         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
32248         (vfmlsl_low_u32): Ditto.
32249         (vfmlalq_low_u32): Ditto.
32250         (vfmlslq_low_u32): Ditto.
32251         (vfmlal_high_u32): Ditto.
32252         (vfmlsl_high_u32): Ditto.
32253         (vfmlalq_high_u32): Ditto.
32254         (vfmlslq_high_u32): Ditto.
32255         (vfmlal_lane_low_u32): Ditto.
32256         (vfmlsl_lane_low_u32): Ditto.
32257         (vfmlal_laneq_low_u32): Ditto.
32258         (vfmlsl_laneq_low_u32): Ditto.
32259         (vfmlalq_lane_low_u32): Ditto.
32260         (vfmlslq_lane_low_u32): Ditto.
32261         (vfmlalq_laneq_low_u32): Ditto.
32262         (vfmlslq_laneq_low_u32): Ditto.
32263         (vfmlal_lane_high_u32): Ditto.
32264         (vfmlsl_lane_high_u32): Ditto.
32265         (vfmlal_laneq_high_u32): Ditto.
32266         (vfmlsl_laneq_high_u32): Ditto.
32267         (vfmlalq_lane_high_u32): Ditto.
32268         (vfmlslq_lane_high_u32): Ditto.
32269         (vfmlalq_laneq_high_u32): Ditto.
32270         (vfmlslq_laneq_high_u32): Ditto.
32271         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
32272         (AARCH64_FL_FOR_ARCH8_4): New.
32273         (AARCH64_ISA_F16FML): New ISA flag.
32274         (TARGET_F16FML): New feature flag for fp16fml.
32275         (doc/invoke.texi): Document new fp16fml option.
32277 2018-01-10  Michael Collison  <michael.collison@arm.com>
32279         * config/aarch64/aarch64-builtins.c:
32280         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
32281         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
32282         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
32283         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
32284         (AARCH64_ISA_SHA3): New ISA flag.
32285         (TARGET_SHA3): New feature flag for sha3.
32286         * config/aarch64/iterators.md (sha512_op): New int attribute.
32287         (CRYPTO_SHA512): New int iterator.
32288         (UNSPEC_SHA512H): New unspec.
32289         (UNSPEC_SHA512H2): Ditto.
32290         (UNSPEC_SHA512SU0): Ditto.
32291         (UNSPEC_SHA512SU1): Ditto.
32292         * config/aarch64/aarch64-simd-builtins.def
32293         (aarch64_crypto_sha512hqv2di): New builtin.
32294         (aarch64_crypto_sha512h2qv2di): Ditto.
32295         (aarch64_crypto_sha512su0qv2di): Ditto.
32296         (aarch64_crypto_sha512su1qv2di): Ditto.
32297         (aarch64_eor3qv8hi): Ditto.
32298         (aarch64_rax1qv2di): Ditto.
32299         (aarch64_xarqv2di): Ditto.
32300         (aarch64_bcaxqv8hi): Ditto.
32301         * config/aarch64/aarch64-simd.md:
32302         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
32303         (aarch64_crypto_sha512su0qv2di): Ditto.
32304         (aarch64_crypto_sha512su1qv2di): Ditto.
32305         (aarch64_eor3qv8hi): Ditto.
32306         (aarch64_rax1qv2di): Ditto.
32307         (aarch64_xarqv2di): Ditto.
32308         (aarch64_bcaxqv8hi): Ditto.
32309         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
32310         (vsha512h2q_u64): Ditto.
32311         (vsha512su0q_u64): Ditto.
32312         (vsha512su1q_u64): Ditto.
32313         (veor3q_u16): Ditto.
32314         (vrax1q_u64): Ditto.
32315         (vxarq_u64): Ditto.
32316         (vbcaxq_u16): Ditto.
32317         * config/arm/types.md (crypto_sha512): New type attribute.
32318         (crypto_sha3): Ditto.
32319         (doc/invoke.texi): Document new sha3 option.
32321 2018-01-10  Michael Collison  <michael.collison@arm.com>
32323         * config/aarch64/aarch64-builtins.c:
32324         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
32325         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
32326         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
32327         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
32328         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
32329         (AARCH64_ISA_SM4): New ISA flag.
32330         (TARGET_SM4): New feature flag for sm4.
32331         * config/aarch64/aarch64-simd-builtins.def
32332         (aarch64_sm3ss1qv4si): Ditto.
32333         (aarch64_sm3tt1aq4si): Ditto.
32334         (aarch64_sm3tt1bq4si): Ditto.
32335         (aarch64_sm3tt2aq4si): Ditto.
32336         (aarch64_sm3tt2bq4si): Ditto.
32337         (aarch64_sm3partw1qv4si): Ditto.
32338         (aarch64_sm3partw2qv4si): Ditto.
32339         (aarch64_sm4eqv4si): Ditto.
32340         (aarch64_sm4ekeyqv4si): Ditto.
32341         * config/aarch64/aarch64-simd.md:
32342         (aarch64_sm3ss1qv4si): Ditto.
32343         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
32344         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
32345         (aarch64_sm4eqv4si): Ditto.
32346         (aarch64_sm4ekeyqv4si): Ditto.
32347         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
32348         (sm3part_op): Ditto.
32349         (CRYPTO_SM3TT): Ditto.
32350         (CRYPTO_SM3PART): Ditto.
32351         (UNSPEC_SM3SS1): New unspec.
32352         (UNSPEC_SM3TT1A): Ditto.
32353         (UNSPEC_SM3TT1B): Ditto.
32354         (UNSPEC_SM3TT2A): Ditto.
32355         (UNSPEC_SM3TT2B): Ditto.
32356         (UNSPEC_SM3PARTW1): Ditto.
32357         (UNSPEC_SM3PARTW2): Ditto.
32358         (UNSPEC_SM4E): Ditto.
32359         (UNSPEC_SM4EKEY): Ditto.
32360         * config/aarch64/constraints.md (Ui2): New constraint.
32361         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
32362         * config/arm/types.md (crypto_sm3): New type attribute.
32363         (crypto_sm4): Ditto.
32364         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
32365         (vsm3tt1aq_u32): Ditto.
32366         (vsm3tt1bq_u32): Ditto.
32367         (vsm3tt2aq_u32): Ditto.
32368         (vsm3tt2bq_u32): Ditto.
32369         (vsm3partw1q_u32): Ditto.
32370         (vsm3partw2q_u32): Ditto.
32371         (vsm4eq_u32): Ditto.
32372         (vsm4ekeyq_u32): Ditto.
32373         (doc/invoke.texi): Document new sm4 option.
32375 2018-01-10  Michael Collison  <michael.collison@arm.com>
32377         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
32378         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
32379         (AARCH64_FL_FOR_ARCH8_4): New.
32380         (AARCH64_FL_V8_4): New flag.
32381         (doc/invoke.texi): Document new armv8.4-a option.
32383 2018-01-10  Michael Collison  <michael.collison@arm.com>
32385         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
32386         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
32387         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
32388         * config/aarch64/aarch64-option-extension.def: Add
32389         AARCH64_OPT_EXTENSION of 'sha2'.
32390         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
32391         (crypto): Disable sha2 and aes if crypto disabled.
32392         (crypto): Enable aes and sha2 if enabled.
32393         (simd): Disable sha2 and aes if simd disabled.
32394         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
32395         New flags.
32396         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
32397         (TARGET_SHA2): New feature flag for sha2.
32398         (TARGET_AES): New feature flag for aes.
32399         * config/aarch64/aarch64-simd.md:
32400         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
32401         conditional on TARGET_AES.
32402         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
32403         (aarch64_crypto_sha1hsi): Make pattern conditional
32404         on TARGET_SHA2.
32405         (aarch64_crypto_sha1hv4si): Ditto.
32406         (aarch64_be_crypto_sha1hv4si): Ditto.
32407         (aarch64_crypto_sha1su1v4si): Ditto.
32408         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
32409         (aarch64_crypto_sha1su0v4si): Ditto.
32410         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
32411         (aarch64_crypto_sha256su0v4si): Ditto.
32412         (aarch64_crypto_sha256su1v4si): Ditto.
32413         (doc/invoke.texi): Document new aes and sha2 options.
32415 2018-01-10  Martin Sebor  <msebor@redhat.com>
32417         PR tree-optimization/83781
32418         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
32419         as string arrays.
32421 2018-01-11  Martin Sebor  <msebor@gmail.com>
32422             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
32424         PR tree-optimization/83501
32425         PR tree-optimization/81703
32427         * tree-ssa-strlen.c (get_string_cst): Rename...
32428         (get_string_len): ...to this.  Handle global constants.
32429         (handle_char_store): Adjust.
32431 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
32432             Jim Wilson  <jimw@sifive.com>
32434         * config/riscv/riscv-protos.h (riscv_output_return): New.
32435         * config/riscv/riscv.c (struct machine_function): New naked_p field.
32436         (riscv_attribute_table, riscv_output_return),
32437         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
32438         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
32439         (riscv_compute_frame_info): Only compute frame->mask if not a naked
32440         function.
32441         (riscv_expand_prologue): Add early return for naked function.
32442         (riscv_expand_epilogue): Likewise.
32443         (riscv_function_ok_for_sibcall): Return false for naked function.
32444         (riscv_set_current_function): New.
32445         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
32446         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
32447         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
32448         * doc/extend.texi (RISC-V Function Attributes): New.
32450 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
32452         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
32453         check for 128-bit long double before checking TCmode.
32454         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
32455         128-bit long doubles before checking TFmode or TCmode.
32456         (FLOAT128_IBM_P): Likewise.
32458 2018-01-10  Martin Sebor  <msebor@redhat.com>
32460         PR tree-optimization/83671
32461         * builtins.c (c_strlen): Unconditionally return zero for the empty
32462         string.
32463         Use -Warray-bounds for warnings.
32464         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
32465         for non-constant array indices with COMPONENT_REF, arrays of
32466         arrays, and pointers to arrays.
32467         (gimple_fold_builtin_strlen): Determine and set length range for
32468         non-constant character arrays.
32470 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
32472         PR middle-end/81897
32473         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
32474         empty blocks.
32476 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
32478         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
32480 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
32482         PR target/83399
32483         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
32484         VECTOR_MEM_ALTIVEC_OR_VSX_P.
32485         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
32486         indexed_or_indirect_operand predicate.
32487         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
32488         (*vsx_le_perm_load_v8hi): Likewise.
32489         (*vsx_le_perm_load_v16qi): Likewise.
32490         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
32491         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
32492         (*vsx_le_perm_store_v8hi): Likewise.
32493         (*vsx_le_perm_store_v16qi): Likewise.
32494         (eight unnamed splitters): Likewise.
32496 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
32498         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
32499         * config/rs6000/emmintrin.h: Likewise.
32500         * config/rs6000/mmintrin.h: Likewise.
32501         * config/rs6000/xmmintrin.h: Likewise.
32503 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
32505         PR c++/43486
32506         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
32507         "public_flag".
32508         * tree.c (tree_nop_conversion): Return true for location wrapper
32509         nodes.
32510         (maybe_wrap_with_location): New function.
32511         (selftest::check_strip_nops): New function.
32512         (selftest::test_location_wrappers): New function.
32513         (selftest::tree_c_tests): Call it.
32514         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
32515         (maybe_wrap_with_location): New decl.
32516         (EXPR_LOCATION_WRAPPER_P): New macro.
32517         (location_wrapper_p): New inline function.
32518         (tree_strip_any_location_wrapper): New inline function.
32520 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
32522         PR target/83735
32523         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
32524         stack_realign_offset for the largest alignment of stack slot
32525         actually used.
32526         (ix86_find_max_used_stack_alignment): New function.
32527         (ix86_finalize_stack_frame_flags): Use it.  Set
32528         max_used_stack_alignment if we don't realign stack.
32529         * config/i386/i386.h (machine_function): Add
32530         max_used_stack_alignment.
32532 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
32534         * config/arm/arm.opt (-mbranch-cost): New option.
32535         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
32536         account.
32538 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
32540         PR target/83629
32541         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
32542         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
32544 2018-01-10  Richard Biener  <rguenther@suse.de>
32546         PR debug/83765
32547         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
32548         early out so it also covers the case where we have a non-NULL
32549         origin.
32551 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
32553         PR tree-optimization/83753
32554         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
32555         for non-strided grouped accesses if the number of elements is 1.
32557 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
32559         PR target/81616
32560         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
32561         * i386.h (TARGET_USE_GATHER): Define.
32562         * x86-tune.def (X86_TUNE_USE_GATHER): New.
32564 2018-01-10  Martin Liska  <mliska@suse.cz>
32566         PR bootstrap/82831
32567         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
32568         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
32569         partitioning.
32570         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
32571         CLEANUP_NO_PARTITIONING is not set.
32573 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
32575         * doc/rtl.texi: Remove documentation of (const ...) wrappers
32576         for vectors, as a partial revert of r254296.
32577         * rtl.h (const_vec_p): Delete.
32578         (const_vec_duplicate_p): Don't test for vector CONSTs.
32579         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
32580         * expmed.c (make_tree): Likewise.
32582         Revert:
32583         * common.md (E, F): Use CONSTANT_P instead of checking for
32584         CONST_VECTOR.
32585         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
32586         checking for CONST_VECTOR.
32588 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
32590         PR middle-end/83575
32591         * predict.c (force_edge_cold): Handle in more sane way edges
32592         with no prediction.
32594 2018-01-09  Carl Love  <cel@us.ibm.com>
32596         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
32597         V4SI, V4SF types.
32598         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
32599         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
32600         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
32601         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
32602         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
32603         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
32604         * config/rs6000/rs6000-protos.h: Add extern defition for
32605         rs6000_generate_float2_double_code.
32606         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
32607         function.
32608         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
32609         (float2_v2df): Add define_expand.
32611 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
32613         PR target/83628
32614         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
32615         op_mode in the force_to_mode call.
32617 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
32619         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
32620         instead of checking each element individually.
32621         (aarch64_evpc_uzp): Likewise.
32622         (aarch64_evpc_zip): Likewise.
32623         (aarch64_evpc_ext): Likewise.
32624         (aarch64_evpc_rev): Likewise.
32625         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
32626         instead of checking each element individually.  Return true without
32627         generating rtl if
32628         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
32629         whether all selected elements come from the same input, instead of
32630         checking each element individually.  Remove calls to gen_rtx_REG,
32631         start_sequence and end_sequence and instead assert that no rtl is
32632         generated.
32634 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
32636         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
32637         order of HIGH and CONST checks.
32639 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
32641         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
32642         if the destination isn't an SSA_NAME.
32644 2018-01-09  Richard Biener  <rguenther@suse.de>
32646         PR tree-optimization/83668
32647         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
32648         move prologue...
32649         (canonicalize_loop_form): ... here, renamed from ...
32650         (canonicalize_loop_closed_ssa_form): ... this and amended to
32651         swap successor edges for loop exit blocks to make us use
32652         the RPO order we need for initial schedule generation.
32654 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
32656         PR tree-optimization/64811
32657         * match.pd: When optimizing comparisons with Inf, avoid
32658         introducing or losing exceptions from comparisons with NaN.
32660 2018-01-09  Martin Liska  <mliska@suse.cz>
32662         PR sanitizer/82517
32663         * asan.c (shadow_mem_size): Add gcc_assert.
32665 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
32667         Don't save registers in main().
32669         PR target/83738
32670         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
32671         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
32672         * config/avr/avr.c (avr_set_current_function): Don't error if
32673         naked, OS_task or OS_main are specified at the same time.
32674         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
32675         OS_main.
32676         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
32677         attribute.
32678         * common/config/avr/avr-common.c (avr_option_optimization_table):
32679         Switch on -mmain-is-OS_task for optimizing compilations.
32681 2018-01-09  Richard Biener  <rguenther@suse.de>
32683         PR tree-optimization/83572
32684         * graphite.c: Include cfganal.h.
32685         (graphite_transform_loops): Connect infinite loops to exit
32686         and remove fake edges at the end.
32688 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
32690         * ipa-inline.c (edge_badness): Revert accidental checkin.
32692 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
32694         PR ipa/80763
32695         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
32696         symbols; not inline clones.
32698 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
32700         PR target/83507
32701         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
32702         hard registers.  Formatting fixes.
32704         PR preprocessor/83722
32705         * gcc.c (try_generate_repro): Pass
32706         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
32707         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
32708         do_report_bug.
32710 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
32711             Kito Cheng  <kito.cheng@gmail.com>
32713         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
32714         (riscv_leaf_function_p): Delete.
32715         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
32717 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
32719         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
32720         function.
32721         (do_ifelse): New function.
32722         (do_isel): New function.
32723         (do_sub3): New function.
32724         (do_add3): New function.
32725         (do_load_mask_compare): New function.
32726         (do_overlap_load_compare): New function.
32727         (expand_compare_loop): New function.
32728         (expand_block_compare): Call expand_compare_loop() when appropriate.
32729         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
32730         option description.
32731         (-mblock-compare-inline-loop-limit): New option.
32733 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
32735         PR target/83677
32736         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
32737         Reverse order of second and third operands in first alternative.
32738         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
32739         of first and second elements in UNSPEC_VPERMR vector.
32740         (altivec_expand_vec_perm_le): Likewise.
32742 2018-01-08  Jeff Law  <law@redhat.com>
32744         PR rtl-optimizatin/81308
32745         * tree-switch-conversion.c (cfg_altered): New file scoped static.
32746         (process_switch): If group_case_labels makes a change, then set
32747         cfg_altered.
32748         (pass_convert_switch::execute): If a switch is converted, then
32749         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
32751         PR rtl-optimization/81308
32752         * recog.c (split_all_insns): Conditionally cleanup the CFG after
32753         splitting insns.
32755 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
32757         PR target/83663 - Revert r255946
32758         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
32759         generation for cases where splatting a value is not useful.
32760         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
32761         across a vec_duplicate and a paradoxical subreg forming a vector
32762         mode to a vec_concat.
32764 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
32766         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
32767         -march=armv8.3-a variants.
32768         * config/arm/t-multilib: Likewise.
32769         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
32771 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
32773         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
32774         to generate rtl.
32775         (cceq_ior_compare_complement): Give it a name so I can use it, and
32776         change boolean_or_operator predicate to boolean_operator so it can
32777         be used to generate a crand.
32778         (eqne): New code iterator.
32779         (bd/bd_neg): New code_attrs.
32780         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
32781         a single define_insn.
32782         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
32783         decrement (bdnzt/bdnzf/bdzt/bdzf).
32784         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
32785         with the new names of the branch decrement patterns, and added the
32786         names of the branch decrement conditional patterns.
32788 2018-01-08  Richard Biener  <rguenther@suse.de>
32790         PR tree-optimization/83563
32791         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
32792         cache.
32794 2018-01-08  Richard Biener  <rguenther@suse.de>
32796         PR middle-end/83713
32797         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
32799 2018-01-08  Richard Biener  <rguenther@suse.de>
32801         PR tree-optimization/83685
32802         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
32803         references to abnormals.
32805 2018-01-08  Richard Biener  <rguenther@suse.de>
32807         PR lto/83719
32808         * dwarf2out.c (output_indirect_strings): Handle empty
32809         skeleton_debug_str_hash.
32810         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
32812 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
32814         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
32815         (emit_store_direct): Likewise.
32816         (arc_trampoline_adjust_address): Likewise.
32817         (arc_asm_trampoline_template): New function.
32818         (arc_initialize_trampoline): Use asm_trampoline_template.
32819         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
32820         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
32821         * config/arc/arc.md (flush_icache): Delete pattern.
32823 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
32825         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
32826         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
32827         munaligned-access.
32829 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
32831         PR target/83681
32832         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
32833         by not USED_FOR_TARGET.
32834         (make_pass_resolve_sw_modes): Likewise.
32836 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
32838         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
32839         USED_FOR_TARGET.
32841 2018-01-08  Richard Biener  <rguenther@suse.de>
32843         PR middle-end/83580
32844         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
32846 2018-01-08  Richard Biener  <rguenther@suse.de>
32848         PR middle-end/83517
32849         * match.pd ((t * 2) / 2) -> t): Add missing :c.
32851 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
32853         PR middle-end/81897
32854         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
32855         basic blocks with a small number of successors.
32856         (convert_control_dep_chain_into_preds): Improve handling of
32857         forwarder blocks.
32858         (dump_predicates): Split apart into...
32859         (dump_pred_chain): ...here...
32860         (dump_pred_info): ...and here.
32861         (can_one_predicate_be_invalidated_p): Add debugging printfs.
32862         (can_chain_union_be_invalidated_p): Improve check for invalidation
32863         of paths.
32864         (uninit_uses_cannot_happen): Avoid unnecessary if
32865         convert_control_dep_chain_into_preds yielded nothing.
32867 2018-01-06  Martin Sebor  <msebor@redhat.com>
32869         PR tree-optimization/83640
32870         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
32871         subtracting negative offset from size.
32872         (builtin_access::overlap): Adjust offset bounds of the access to fall
32873         within the size of the object if possible.
32875 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
32877         PR rtl-optimization/83699
32878         * expmed.c (extract_bit_field_1): Restrict the vector usage of
32879         extract_bit_field_as_subreg to cases in which the extracted
32880         value is also a vector.
32882         * lra-constraints.c (process_alt_operands): Test for the equivalence
32883         substitutions when detecting a possible reload cycle.
32885 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
32887         PR debug/83480
32888         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
32889         by default if flag_selective_schedling{,2}.  Formatting fixes.
32891         PR rtl-optimization/83682
32892         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
32893         if it has non-VECTOR_MODE element mode.
32894         (vec_duplicate_p): Likewise.
32896         PR middle-end/83694
32897         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
32898         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
32900 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
32902         PR target/83604
32903         * config/i386/i386-builtin.def
32904         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
32905         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
32906         Require also OPTION_MASK_ISA_AVX512F in addition to
32907         OPTION_MASK_ISA_GFNI.
32908         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
32909         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
32910         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
32911         to OPTION_MASK_ISA_GFNI.
32912         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
32913         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
32914         OPTION_MASK_ISA_AVX512BW.
32915         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
32916         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
32917         addition to OPTION_MASK_ISA_GFNI.
32918         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
32919         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
32920         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
32921         to OPTION_MASK_ISA_GFNI.
32922         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
32923         a requirement for all ISAs rather than any of them with a few
32924         exceptions.
32925         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
32926         processing.
32927         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
32928         bitmasks to be enabled with 3 exceptions, instead of requiring any
32929         enabled ISA with lots of exceptions.
32930         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
32931         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
32932         Change avx512bw in isa attribute to avx512f.
32933         * config/i386/sgxintrin.h: Add license boilerplate.
32934         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
32935         to __AVX512F__ and __AVX512VL to __AVX512VL__.
32936         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
32937         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
32938         defined.
32939         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
32940         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
32941         temporarily sse2 rather than sse if not enabled already.
32943         PR target/83604
32944         * config/i386/sse.md (VI248_VLBW): Rename to ...
32945         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
32946         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
32947         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
32948         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
32949         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
32950         mode iterator instead of VI248_VLBW.
32952 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
32954         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
32955         (record_modified): Skip clobbers; add debug output.
32956         (param_change_prob): Use sreal frequencies.
32958 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
32960         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
32961         punt for user-aligned variables.
32963 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
32965         * tree-chrec.c (chrec_contains_symbols): Return true for
32966         POLY_INT_CST.
32968 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
32970         PR target/82439
32971         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
32972         of (x|y) == x for BICS pattern.
32974 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
32976         PR tree-optimization/83605
32977         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
32978         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
32979         can throw.
32981 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
32983         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
32984         * config/epiphany/rtems.h: New file.
32986 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
32987             Uros Bizjak  <ubizjak@gmail.com>
32989         PR target/83554
32990         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
32991         QIreg_operand instead of register_operand predicate.
32992         * config/i386/i386.c (ix86_rop_should_change_byte_p,
32993         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
32994         comments instead of -fmitigate[-_]rop.
32996 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
32998         PR bootstrap/81926
32999         * cgraphunit.c (symbol_table::compile): Switch to text_section
33000         before calling assembly_start debug hook.
33001         * run-rtl-passes.c (run_rtl_passes): Likewise.
33002         Include output.h.
33004 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
33006         * tree-vrp.c (extract_range_from_binary_expr_1): Check
33007         range_int_cst_p rather than !symbolic_range_p before calling
33008         extract_range_from_multiplicative_op_1.
33010 2018-01-04  Jeff Law  <law@redhat.com>
33012         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
33013         redundant test in assertion.
33015 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
33017         * doc/rtl.texi: Document machine_mode wrapper classes.
33019 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
33021         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
33022         using tree_to_uhwi.
33024 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
33026         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
33027         the VEC_PERM_EXPR fold to fail.
33029 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
33031         PR debug/83585
33032         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
33033         to switched_sections.
33035 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
33037         PR target/83680
33038         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
33039         test for d.testing.
33041 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
33043         PR target/83387
33044         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
33045         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
33047 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
33049         PR debug/83666
33050         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
33051         is BLKmode and bitpos not zero or mode change is needed.
33053 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
33055         PR target/83675
33056         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
33057         TARGET_VIS2.
33059 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
33061         PR target/83628
33062         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
33063         instead of MULT rtx.  Update all corresponding splitters.
33064         (*saddl_se): Ditto.
33065         (*ssub<modesuffix>): Ditto.
33066         (*ssubl_se): Ditto.
33067         (*cmp_sadd_di): Update split patterns.
33068         (*cmp_sadd_si): Ditto.
33069         (*cmp_sadd_sidi): Ditto.
33070         (*cmp_ssub_di): Ditto.
33071         (*cmp_ssub_si): Ditto.
33072         (*cmp_ssub_sidi): Ditto.
33073         * config/alpha/predicates.md (const23_operand): New predicate.
33074         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
33075         Look for ASHIFT, not MULT inner operand.
33076         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
33078 2018-01-04  Martin Liska  <mliska@suse.cz>
33080         PR gcov-profile/83669
33081         * gcov.c (output_intermediate_file): Add version to intermediate
33082         gcov file.
33083         * doc/gcov.texi: Document new field 'version' in intermediate
33084         file format. Fix location of '-k' option of gcov command.
33086 2018-01-04  Martin Liska  <mliska@suse.cz>
33088         PR ipa/82352
33089         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
33091 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
33093         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
33095 2018-01-03  Martin Sebor  <msebor@redhat.com>
33097         PR tree-optimization/83655
33098         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
33099         checking calls with invalid arguments.
33101 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33103         * tree-vect-stmts.c (vect_get_store_rhs): New function.
33104         (vectorizable_mask_load_store): Delete.
33105         (vectorizable_call): Return false for masked loads and stores.
33106         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
33107         instead of gimple_assign_rhs1.
33108         (vectorizable_load): Handle IFN_MASK_LOAD.
33109         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
33111 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33113         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
33114         split out from..,
33115         (vectorizable_mask_load_store): ...here.
33116         (vectorizable_load): ...and here.
33118 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33120         * tree-vect-stmts.c (vect_build_all_ones_mask)
33121         (vect_build_zero_merge_argument): New functions, split out from...
33122         (vectorizable_load): ...here.
33124 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33126         * tree-vect-stmts.c (vect_check_store_rhs): New function,
33127         split out from...
33128         (vectorizable_mask_load_store): ...here.
33129         (vectorizable_store): ...and here.
33131 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33133         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
33134         split out from...
33135         (vectorizable_mask_load_store): ...here.
33137 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33139         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
33140         (vect_model_store_cost): Take a vec_load_store_type instead of a
33141         vect_def_type.
33142         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
33143         (vect_model_store_cost): Take a vec_load_store_type instead of a
33144         vect_def_type.
33145         (vectorizable_mask_load_store): Update accordingly.
33146         (vectorizable_store): Likewise.
33147         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
33149 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33151         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
33152         IFN_MASK_LOAD calls here rather than...
33153         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
33155 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33156             Alan Hayward  <alan.hayward@arm.com>
33157             David Sherwood  <david.sherwood@arm.com>
33159         * expmed.c (extract_bit_field_1): For vector extracts,
33160         fall back to extract_bit_field_as_subreg if vec_extract
33161         isn't available.
33163 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33164             Alan Hayward  <alan.hayward@arm.com>
33165             David Sherwood  <david.sherwood@arm.com>
33167         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
33168         they are variable or constant sized.
33169         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
33170         slots for constant-sized data.
33172 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33173             Alan Hayward  <alan.hayward@arm.com>
33174             David Sherwood  <david.sherwood@arm.com>
33176         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
33177         handling COND_EXPRs with boolean comparisons, try to find a better
33178         basis for the mask type than the boolean itself.
33180 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33182         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
33183         is calculated and how it can be overridden.
33184         * genmodes.c (max_bitsize_mode_any_mode): New variable.
33185         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
33186         if defined.
33187         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
33188         if nonzero.
33190 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33191             Alan Hayward  <alan.hayward@arm.com>
33192             David Sherwood  <david.sherwood@arm.com>
33194         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
33195         Remove the mode argument.
33196         (aarch64_simd_valid_immediate): Remove the mode and inverse
33197         arguments.
33198         * config/aarch64/iterators.md (bitsize): New iterator.
33199         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
33200         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
33201         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
33202         aarch64_simd_valid_immediate.
33203         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
33204         (aarch64_reg_or_bic_imm): Likewise.
33205         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
33206         with an insn_type enum and msl with a modifier_type enum.
33207         Replace element_width with a scalar_mode.  Change the shift
33208         to unsigned int.  Add constructors for scalar_float_mode and
33209         scalar_int_mode elements.
33210         (aarch64_vect_float_const_representable_p): Delete.
33211         (aarch64_can_const_movi_rtx_p)
33212         (aarch64_simd_scalar_immediate_valid_for_move)
33213         (aarch64_simd_make_constant): Update call to
33214         aarch64_simd_valid_immediate.
33215         (aarch64_advsimd_valid_immediate_hs): New function.
33216         (aarch64_advsimd_valid_immediate): Likewise.
33217         (aarch64_simd_valid_immediate): Remove mode and inverse
33218         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
33219         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
33220         and aarch64_float_const_representable_p on the result.
33221         (aarch64_output_simd_mov_immediate): Remove mode argument.
33222         Update call to aarch64_simd_valid_immediate and use of
33223         simd_immediate_info.
33224         (aarch64_output_scalar_simd_mov_immediate): Update call
33225         accordingly.
33227 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33228             Alan Hayward  <alan.hayward@arm.com>
33229             David Sherwood  <david.sherwood@arm.com>
33231         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
33232         (mode_nunits): Likewise CONST_MODE_NUNITS.
33233         * machmode.def (ADJUST_NUNITS): Document.
33234         * genmodes.c (mode_data::need_nunits_adj): New field.
33235         (blank_mode): Update accordingly.
33236         (adj_nunits): New variable.
33237         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
33238         parameter.
33239         (emit_mode_size_inline): Set need_bytesize_adj for all modes
33240         listed in adj_nunits.
33241         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
33242         listed in adj_nunits.  Don't emit case statements for such modes.
33243         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
33244         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
33245         nothing if adj_nunits is nonnull.
33246         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
33247         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
33248         (emit_mode_fbit): Update use of print_maybe_const_decl.
33249         (emit_move_size): Likewise.  Treat the array as non-const
33250         if adj_nunits.
33251         (emit_mode_adjustments): Handle adj_nunits.
33253 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33255         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
33256         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
33257         (VECTOR_MODES): Use it.
33258         (make_vector_modes): Take the prefix as an argument.
33260 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33261             Alan Hayward  <alan.hayward@arm.com>
33262             David Sherwood  <david.sherwood@arm.com>
33264         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
33265         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
33266         for MODE_VECTOR_BOOL.
33267         * machmode.def (VECTOR_BOOL_MODE): Document.
33268         * genmodes.c (VECTOR_BOOL_MODE): New macro.
33269         (make_vector_bool_mode): New function.
33270         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
33271         MODE_VECTOR_BOOL.
33272         * lto-streamer-in.c (lto_input_mode_table): Likewise.
33273         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
33274         Likewise.
33275         * stor-layout.c (int_mode_for_mode): Likewise.
33276         * tree.c (build_vector_type_for_mode): Likewise.
33277         * varasm.c (output_constant_pool_2): Likewise.
33278         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
33279         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
33280         for MODE_VECTOR_BOOL.
33281         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
33282         of mode class checks.
33283         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
33284         instead of a list of mode class checks.
33285         (expand_vector_scalar_condition): Likewise.
33286         (type_for_widest_vector_mode): Handle BImode as an inner mode.
33288 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33289             Alan Hayward  <alan.hayward@arm.com>
33290             David Sherwood  <david.sherwood@arm.com>
33292         * machmode.h (mode_size): Change from unsigned short to
33293         poly_uint16_pod.
33294         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
33295         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
33296         or if measurement_type is not polynomial.
33297         (fixed_size_mode::includes_p): Check for constant-sized modes.
33298         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
33299         return a poly_uint16 rather than an unsigned short.
33300         (emit_mode_size): Change the type of mode_size from unsigned short
33301         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
33302         (emit_mode_adjustments): Cope with polynomial vector sizes.
33303         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
33304         for GET_MODE_SIZE.
33305         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
33306         for GET_MODE_SIZE.
33307         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
33308         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
33309         * caller-save.c (setup_save_areas): Likewise.
33310         (replace_reg_with_saved_mem): Likewise.
33311         * calls.c (emit_library_call_value_1): Likewise.
33312         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
33313         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
33314         (gen_lowpart_for_combine): Likewise.
33315         * convert.c (convert_to_integer_1): Likewise.
33316         * cse.c (equiv_constant, cse_insn): Likewise.
33317         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
33318         (cselib_subst_to_values): Likewise.
33319         * dce.c (word_dce_process_block): Likewise.
33320         * df-problems.c (df_word_lr_mark_ref): Likewise.
33321         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
33322         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
33323         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
33324         (rtl_for_decl_location): Likewise.
33325         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
33326         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
33327         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
33328         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
33329         (expand_expr_real_1): Likewise.
33330         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
33331         (pad_below): Likewise.
33332         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
33333         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
33334         * ira.c (get_subreg_tracking_sizes): Likewise.
33335         * ira-build.c (ira_create_allocno_objects): Likewise.
33336         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
33337         (ira_sort_regnos_for_alter_reg): Likewise.
33338         * ira-costs.c (record_operand_costs): Likewise.
33339         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
33340         (resolve_simple_move): Likewise.
33341         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
33342         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
33343         (lra_constraints): Likewise.
33344         (CONST_POOL_OK_P): Reject variable-sized modes.
33345         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
33346         (add_pseudo_to_slot, lra_spill): Likewise.
33347         * omp-low.c (omp_clause_aligned_alignment): Likewise.
33348         * optabs-query.c (get_best_extraction_insn): Likewise.
33349         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
33350         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
33351         (expand_mult_highpart, valid_multiword_target_p): Likewise.
33352         * recog.c (offsettable_address_addr_space_p): Likewise.
33353         * regcprop.c (maybe_mode_change): Likewise.
33354         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
33355         * regrename.c (build_def_use): Likewise.
33356         * regstat.c (dump_reg_info): Likewise.
33357         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
33358         (find_reloads, find_reloads_subreg_address): Likewise.
33359         * reload1.c (eliminate_regs_1): Likewise.
33360         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
33361         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
33362         (simplify_binary_operation_1, simplify_subreg): Likewise.
33363         * targhooks.c (default_function_arg_padding): Likewise.
33364         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
33365         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
33366         (verify_gimple_assign_ternary): Likewise.
33367         * tree-inline.c (estimate_move_cost): Likewise.
33368         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
33369         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
33370         (get_address_cost_ainc): Likewise.
33371         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
33372         (vect_supportable_dr_alignment): Likewise.
33373         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
33374         (vectorizable_reduction): Likewise.
33375         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
33376         (vectorizable_operation, vectorizable_load): Likewise.
33377         * tree.c (build_same_sized_truth_vector_type): Likewise.
33378         * valtrack.c (cleanup_auto_inc_dec): Likewise.
33379         * var-tracking.c (emit_note_insn_var_location): Likewise.
33380         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
33381         (ADDR_VEC_ALIGN): Likewise.
33383 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33384             Alan Hayward  <alan.hayward@arm.com>
33385             David Sherwood  <david.sherwood@arm.com>
33387         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
33388         unsigned short.
33389         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
33390         or if measurement_type is polynomial.
33391         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
33392         * combine.c (make_extraction): Likewise.
33393         * dse.c (find_shift_sequence): Likewise.
33394         * dwarf2out.c (mem_loc_descriptor): Likewise.
33395         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
33396         (extract_bit_field, extract_low_bits): Likewise.
33397         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
33398         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
33399         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
33400         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
33401         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
33402         * reload.c (find_reloads): Likewise.
33403         * reload1.c (alter_reg): Likewise.
33404         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
33405         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
33406         * tree-if-conv.c (predicate_mem_writes): Likewise.
33407         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
33408         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
33409         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
33410         * valtrack.c (dead_debug_insert_temp): Likewise.
33411         * varasm.c (mergeable_constant_section): Likewise.
33412         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
33414 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33415             Alan Hayward  <alan.hayward@arm.com>
33416             David Sherwood  <david.sherwood@arm.com>
33418         * expr.c (expand_assignment): Cope with polynomial mode sizes
33419         when assigning to a CONCAT.
33421 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33422             Alan Hayward  <alan.hayward@arm.com>
33423             David Sherwood  <david.sherwood@arm.com>
33425         * machmode.h (mode_precision): Change from unsigned short to
33426         poly_uint16_pod.
33427         (mode_to_precision): Return a poly_uint16 rather than an unsigned
33428         short.
33429         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
33430         or if measurement_type is not polynomial.
33431         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
33432         in which the mode is already known to be a scalar_int_mode.
33433         * genmodes.c (emit_mode_precision): Change the type of mode_precision
33434         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
33435         initializer.
33436         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
33437         for GET_MODE_PRECISION.
33438         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
33439         for GET_MODE_PRECISION.
33440         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
33441         as polynomial.
33442         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
33443         (expand_field_assignment, make_extraction): Likewise.
33444         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
33445         (get_last_value): Likewise.
33446         * convert.c (convert_to_integer_1): Likewise.
33447         * cse.c (cse_insn): Likewise.
33448         * expr.c (expand_expr_real_1): Likewise.
33449         * lra-constraints.c (simplify_operand_subreg): Likewise.
33450         * optabs-query.c (can_atomic_load_p): Likewise.
33451         * optabs.c (expand_atomic_load): Likewise.
33452         (expand_atomic_store): Likewise.
33453         * ree.c (combine_reaching_defs): Likewise.
33454         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
33455         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
33456         * tree.h (type_has_mode_precision_p): Likewise.
33457         * ubsan.c (instrument_si_overflow): Likewise.
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         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
33464         polynomial numbers of units.
33465         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
33466         (valid_vector_subparts_p): New function.
33467         (build_vector_type): Remove temporary shim and take the number
33468         of units as a poly_uint64 rather than an int.
33469         (build_opaque_vector_type): Take the number of units as a
33470         poly_uint64 rather than an int.
33471         * tree.c (build_vector_from_ctor): Handle polynomial
33472         TYPE_VECTOR_SUBPARTS.
33473         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
33474         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
33475         (build_vector_from_val): If the number of units is variable,
33476         use build_vec_duplicate_cst for constant operands and
33477         VEC_DUPLICATE_EXPR otherwise.
33478         (make_vector_type): Remove temporary is_constant ().
33479         (build_vector_type, build_opaque_vector_type): Take the number of
33480         units as a poly_uint64 rather than an int.
33481         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
33482         VECTOR_CST_NELTS.
33483         * cfgexpand.c (expand_debug_expr): Likewise.
33484         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
33485         (store_constructor, expand_expr_real_1): Likewise.
33486         (const_scalar_mask_from_tree): Likewise.
33487         * fold-const-call.c (fold_const_reduction): Likewise.
33488         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
33489         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
33490         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
33491         (fold_relational_const): Likewise.
33492         (native_interpret_vector): Likewise.  Change the size from an
33493         int to an unsigned int.
33494         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
33495         TYPE_VECTOR_SUBPARTS.
33496         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
33497         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
33498         duplicating a non-constant operand into a variable-length vector.
33499         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
33500         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
33501         * ipa-icf.c (sem_variable::equals): Likewise.
33502         * match.pd: Likewise.
33503         * omp-simd-clone.c (simd_clone_subparts): Likewise.
33504         * print-tree.c (print_node): Likewise.
33505         * stor-layout.c (layout_type): Likewise.
33506         * targhooks.c (default_builtin_vectorization_cost): Likewise.
33507         * tree-cfg.c (verify_gimple_comparison): Likewise.
33508         (verify_gimple_assign_binary): Likewise.
33509         (verify_gimple_assign_ternary): Likewise.
33510         (verify_gimple_assign_single): Likewise.
33511         * tree-pretty-print.c (dump_generic_node): Likewise.
33512         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
33513         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
33514         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
33515         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
33516         (vect_shift_permute_load_chain): Likewise.
33517         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
33518         (expand_vector_condition, optimize_vector_constructor): Likewise.
33519         (lower_vec_perm, get_compute_type): Likewise.
33520         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
33521         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
33522         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
33523         (vect_recog_mask_conversion_pattern): Likewise.
33524         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
33525         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
33526         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
33527         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
33528         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
33529         (vectorizable_shift, vectorizable_operation, vectorizable_store)
33530         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
33531         (supportable_widening_operation): Likewise.
33532         (supportable_narrowing_operation): Likewise.
33533         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
33534         Likewise.
33535         * varasm.c (output_constant): Likewise.
33537 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33538             Alan Hayward  <alan.hayward@arm.com>
33539             David Sherwood  <david.sherwood@arm.com>
33541         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
33542         so that both the length == 3 and length != 3 cases set up their
33543         own permute vectors.  Add comments explaining why we know the
33544         number of elements is constant.
33545         (vect_permute_load_chain): Likewise.
33547 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33548             Alan Hayward  <alan.hayward@arm.com>
33549             David Sherwood  <david.sherwood@arm.com>
33551         * machmode.h (mode_nunits): Change from unsigned char to
33552         poly_uint16_pod.
33553         (ONLY_FIXED_SIZE_MODES): New macro.
33554         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
33555         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
33556         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
33557         New typedefs.
33558         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
33559         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
33560         or if measurement_type is not polynomial.
33561         * genmodes.c (ZERO_COEFFS): New macro.
33562         (emit_mode_nunits_inline): Make mode_nunits_inline return a
33563         poly_uint16.
33564         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
33565         Use ZERO_COEFFS when emitting initializers.
33566         * data-streamer.h (bp_pack_poly_value): New function.
33567         (bp_unpack_poly_value): Likewise.
33568         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
33569         for GET_MODE_NUNITS.
33570         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
33571         for GET_MODE_NUNITS.
33572         * tree.c (make_vector_type): Remove temporary shim and make
33573         the real function take the number of units as a poly_uint64
33574         rather than an int.
33575         (build_vector_type_for_mode): Handle polynomial nunits.
33576         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
33577         * emit-rtl.c (const_vec_series_p_1): Likewise.
33578         (gen_rtx_CONST_VECTOR): Likewise.
33579         * fold-const.c (test_vec_duplicate_folding): Likewise.
33580         * genrecog.c (validate_pattern): Likewise.
33581         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
33582         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
33583         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
33584         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
33585         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
33586         * rtlanal.c (subreg_get_info): Likewise.
33587         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
33588         (vect_grouped_load_supported): Likewise.
33589         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
33590         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
33591         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
33592         (simplify_const_unary_operation, simplify_binary_operation_1)
33593         (simplify_const_binary_operation, simplify_ternary_operation)
33594         (test_vector_ops_duplicate, test_vector_ops): Likewise.
33595         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
33596         instead of CONST_VECTOR_NUNITS.
33597         * varasm.c (output_constant_pool_2): Likewise.
33598         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
33599         explicit-encoded elements in the XVEC for variable-length vectors.
33601 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33603         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
33605 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33606             Alan Hayward  <alan.hayward@arm.com>
33607             David Sherwood  <david.sherwood@arm.com>
33609         * coretypes.h (fixed_size_mode): Declare.
33610         (fixed_size_mode_pod): New typedef.
33611         * builtins.h (target_builtins::x_apply_args_mode)
33612         (target_builtins::x_apply_result_mode): Change type to
33613         fixed_size_mode_pod.
33614         * builtins.c (apply_args_size, apply_result_size, result_vector)
33615         (expand_builtin_apply_args_1, expand_builtin_apply)
33616         (expand_builtin_return): Update accordingly.
33618 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33620         * cse.c (hash_rtx_cb): Hash only the encoded elements.
33621         * cselib.c (cselib_hash_rtx): Likewise.
33622         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
33623         CONST_VECTOR encoding.
33625 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
33626             Jeff Law  <law@redhat.com>
33628         PR target/83641
33629         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
33630         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
33631         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
33632         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
33634         PR target/83641
33635         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
33636         explicitly probe *sp in a noreturn function if there were any callee
33637         register saves or frame pointer is needed.
33639 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
33641         PR debug/83621
33642         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
33643         BLKmode for ternary, binary or unary expressions.
33645         PR debug/83645
33646         * var-tracking.c (delete_vta_debug_insn): New inline function.
33647         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
33648         insns from get_insns () to NULL instead of each bb separately.
33649         Use delete_vta_debug_insn.  No longer static.
33650         (vt_debug_insns_local, variable_tracking_main_1): Adjust
33651         delete_vta_debug_insns callers.
33652         * rtl.h (delete_vta_debug_insns): Declare.
33653         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
33654         instead of variable_tracking_main.
33656 2018-01-03  Martin Sebor  <msebor@redhat.com>
33658         PR tree-optimization/83603
33659         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
33660         arguments past the endof the argument list in functions declared
33661         without a prototype.
33662         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
33663         Avoid checking when arguments are null.
33665 2018-01-03  Martin Sebor  <msebor@redhat.com>
33667         PR c/83559
33668         * doc/extend.texi (attribute const): Fix a typo.
33669         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
33670         issuing -Wsuggest-attribute for void functions.
33672 2018-01-03  Martin Sebor  <msebor@redhat.com>
33674         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
33675         offset_int::from instead of wide_int::to_shwi.
33676         (maybe_diag_overlap): Remove assertion.
33677         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
33678         * gimple-ssa-sprintf.c (format_directive): Same.
33679         (parse_directive): Same.
33680         (sprintf_dom_walker::compute_format_length): Same.
33681         (try_substitute_return_value): Same.
33683 2018-01-03  Jeff Law  <law@redhat.com>
33685         PR middle-end/83654
33686         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
33687         non-constant residual for zero at runtime and avoid probing in
33688         that case.  Reorganize code for trailing problem to mirror handling
33689         of the residual.
33691 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
33693         PR tree-optimization/83501
33694         * tree-ssa-strlen.c (get_string_cst): New.
33695         (handle_char_store): Call get_string_cst.
33697 2018-01-03  Martin Liska  <mliska@suse.cz>
33699         PR tree-optimization/83593
33700         * tree-ssa-strlen.c: Include tree-cfg.h.
33701         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
33702         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
33703         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
33704         to false.
33705         (strlen_dom_walker::before_dom_children): Call
33706         gimple_purge_dead_eh_edges. Dump tranformation with details
33707         dump flags.
33708         (strlen_dom_walker::before_dom_children): Update call by adding
33709         new argument cleanup_eh.
33710         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
33712 2018-01-03  Martin Liska  <mliska@suse.cz>
33714         PR ipa/83549
33715         * cif-code.def (VARIADIC_THUNK): New enum value.
33716         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
33717         thunks.
33719 2018-01-03  Jan Beulich  <jbeulich@suse.com>
33721         * sse.md (mov<mode>_internal): Tighten condition for when to use
33722         vmovdqu<ssescalarsize> for TI and OI modes.
33724 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
33726         Update copyright years.
33728 2018-01-03  Martin Liska  <mliska@suse.cz>
33730         PR ipa/83594
33731         * ipa-visibility.c (function_and_variable_visibility): Skip
33732         functions with noipa attribure.
33734 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
33736         * gcc.c (process_command): Update copyright notice dates.
33737         * gcov-dump.c (print_version): Ditto.
33738         * gcov.c (print_version): Ditto.
33739         * gcov-tool.c (print_version): Ditto.
33740         * gengtype.c (create_file): Ditto.
33741         * doc/cpp.texi: Bump @copying's copyright year.
33742         * doc/cppinternals.texi: Ditto.
33743         * doc/gcc.texi: Ditto.
33744         * doc/gccint.texi: Ditto.
33745         * doc/gcov.texi: Ditto.
33746         * doc/install.texi: Ditto.
33747         * doc/invoke.texi: Ditto.
33749 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33751         * vector-builder.h (vector_builder::m_full_nelts): Change from
33752         unsigned int to poly_uint64.
33753         (vector_builder::full_nelts): Update prototype accordingly.
33754         (vector_builder::new_vector): Likewise.
33755         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
33756         (vector_builder::operator ==): Likewise.
33757         (vector_builder::finalize): Likewise.
33758         * int-vector-builder.h (int_vector_builder::int_vector_builder):
33759         Take the number of elements as a poly_uint64 rather than an
33760         unsigned int.
33761         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
33762         from unsigned int to poly_uint64.
33763         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
33764         (vec_perm_indices::new_vector): Likewise.
33765         (vec_perm_indices::length): Likewise.
33766         (vec_perm_indices::nelts_per_input): Likewise.
33767         (vec_perm_indices::input_nelts): Likewise.
33768         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
33769         number of elements per input as a poly_uint64 rather than an
33770         unsigned int.  Use the original encoding for variable-length
33771         vectors, rather than clamping each individual element.
33772         For the second and subsequent elements in each pattern,
33773         clamp the step and base before clamping their sum.
33774         (vec_perm_indices::series_p): Handle polynomial element counts.
33775         (vec_perm_indices::all_in_range_p): Likewise.
33776         (vec_perm_indices_to_tree): Likewise.
33777         (vec_perm_indices_to_rtx): Likewise.
33778         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
33779         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
33780         (tree_vector_builder::new_binary_operation): Handle polynomial
33781         element counts.  Return false if we need to know the number
33782         of elements at compile time.
33783         * fold-const.c (fold_vec_perm): Punt if the number of elements
33784         isn't known at compile time.
33786 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33788         * vec-perm-indices.h (vec_perm_builder): Change element type
33789         from HOST_WIDE_INT to poly_int64.
33790         (vec_perm_indices::element_type): Update accordingly.
33791         (vec_perm_indices::clamp): Handle polynomial element_types.
33792         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
33793         (vec_perm_indices::all_in_range_p): Likewise.
33794         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
33795         than shwi trees.
33796         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
33797         polynomial vec_perm_indices element types.
33798         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
33799         * fold-const.c (fold_vec_perm): Likewise.
33800         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
33801         * tree-vect-generic.c (lower_vec_perm): Likewise.
33802         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
33803         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
33804         element type to HOST_WIDE_INT.
33806 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33807             Alan Hayward  <alan.hayward@arm.com>
33808             David Sherwood  <david.sherwood@arm.com>
33810         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
33811         rather than an int.  Use plus_constant.
33812         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
33813         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
33815 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33816             Alan Hayward  <alan.hayward@arm.com>
33817             David Sherwood  <david.sherwood@arm.com>
33819         * calls.c (emit_call_1, expand_call): Change struct_value_size from
33820         a HOST_WIDE_INT to a poly_int64.
33822 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33823             Alan Hayward  <alan.hayward@arm.com>
33824             David Sherwood  <david.sherwood@arm.com>
33826         * calls.c (load_register_parameters): Cope with polynomial
33827         mode sizes.  Require a constant size for BLKmode parameters
33828         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
33829         forces a parameter to be padded at the lsb end in order to
33830         fill a complete number of words, require the parameter size
33831         to be ordered wrt UNITS_PER_WORD.
33833 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33834             Alan Hayward  <alan.hayward@arm.com>
33835             David Sherwood  <david.sherwood@arm.com>
33837         * reload1.c (spill_stack_slot_width): Change element type
33838         from unsigned int to poly_uint64_pod.
33839         (alter_reg): Treat mode sizes as polynomial.
33841 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33842             Alan Hayward  <alan.hayward@arm.com>
33843             David Sherwood  <david.sherwood@arm.com>
33845         * reload.c (complex_word_subreg_p): New function.
33846         (reload_inner_reg_of_subreg, push_reload): Use it.
33848 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33849             Alan Hayward  <alan.hayward@arm.com>
33850             David Sherwood  <david.sherwood@arm.com>
33852         * lra-constraints.c (process_alt_operands): Reject matched
33853         operands whose sizes aren't ordered.
33854         (match_reload): Refer to this check here.
33856 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33857             Alan Hayward  <alan.hayward@arm.com>
33858             David Sherwood  <david.sherwood@arm.com>
33860         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
33861         that the mode size is in the set {1, 2, 4, 8, 16}.
33863 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33864             Alan Hayward  <alan.hayward@arm.com>
33865             David Sherwood  <david.sherwood@arm.com>
33867         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
33868         Use plus_constant instead of gen_rtx_PLUS.
33870 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33871             Alan Hayward  <alan.hayward@arm.com>
33872             David Sherwood  <david.sherwood@arm.com>
33874         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
33875         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
33876         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
33877         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
33878         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
33879         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
33880         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
33881         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
33882         * config/i386/i386.c (ix86_push_rounding): ...this new function.
33883         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
33884         a poly_int64.
33885         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
33886         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
33887         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
33888         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
33889         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
33890         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
33891         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
33892         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
33893         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
33894         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
33895         function.
33896         * expr.c (emit_move_resolve_push): Treat the input and result
33897         of PUSH_ROUNDING as a poly_int64.
33898         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
33899         (emit_push_insn): Likewise.
33900         * lra-eliminations.c (mark_not_eliminable): Likewise.
33901         * recog.c (push_operand): Likewise.
33902         * reload1.c (elimination_effects): Likewise.
33903         * rtlanal.c (nonzero_bits1): Likewise.
33904         * calls.c (store_one_arg): Likewise.  Require the padding to be
33905         known at compile time.
33907 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33908             Alan Hayward  <alan.hayward@arm.com>
33909             David Sherwood  <david.sherwood@arm.com>
33911         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
33912         Use plus_constant instead of gen_rtx_PLUS.
33914 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33915             Alan Hayward  <alan.hayward@arm.com>
33916             David Sherwood  <david.sherwood@arm.com>
33918         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
33919         rather than an int.
33921 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33922             Alan Hayward  <alan.hayward@arm.com>
33923             David Sherwood  <david.sherwood@arm.com>
33925         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
33926         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
33927         via stack temporaries.  Treat the mode size as polynomial too.
33929 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33930             Alan Hayward  <alan.hayward@arm.com>
33931             David Sherwood  <david.sherwood@arm.com>
33933         * expr.c (expand_expr_real_2): When handling conversions involving
33934         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
33935         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
33936         as a poly_uint64 too.
33938 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33939             Alan Hayward  <alan.hayward@arm.com>
33940             David Sherwood  <david.sherwood@arm.com>
33942         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
33944 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33945             Alan Hayward  <alan.hayward@arm.com>
33946             David Sherwood  <david.sherwood@arm.com>
33948         * combine.c (can_change_dest_mode): Handle polynomial
33949         REGMODE_NATURAL_SIZE.
33950         * expmed.c (store_bit_field_1): Likewise.
33951         * expr.c (store_constructor): Likewise.
33952         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
33953         and polynomial REGMODE_NATURAL_SIZE.
33954         (gen_lowpart_common): Likewise.
33955         * reginfo.c (record_subregs_of_mode): Likewise.
33956         * rtlanal.c (read_modify_subreg_p): Likewise.
33958 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33959             Alan Hayward  <alan.hayward@arm.com>
33960             David Sherwood  <david.sherwood@arm.com>
33962         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
33963         numbers of elements.
33965 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33966             Alan Hayward  <alan.hayward@arm.com>
33967             David Sherwood  <david.sherwood@arm.com>
33969         * match.pd: Cope with polynomial numbers of vector elements.
33971 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33972             Alan Hayward  <alan.hayward@arm.com>
33973             David Sherwood  <david.sherwood@arm.com>
33975         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
33976         in a POINTER_PLUS_EXPR.
33978 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33979             Alan Hayward  <alan.hayward@arm.com>
33980             David Sherwood  <david.sherwood@arm.com>
33982         * omp-simd-clone.c (simd_clone_subparts): New function.
33983         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
33984         (ipa_simd_modify_function_body): Likewise.
33986 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33987             Alan Hayward  <alan.hayward@arm.com>
33988             David Sherwood  <david.sherwood@arm.com>
33990         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
33991         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
33992         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
33993         (expand_vector_condition, vector_element): Likewise.
33994         (subparts_gt): New function.
33995         (get_compute_type): Use subparts_gt.
33996         (count_type_subparts): Delete.
33997         (expand_vector_operations_1): Use subparts_gt instead of
33998         count_type_subparts.
34000 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34001             Alan Hayward  <alan.hayward@arm.com>
34002             David Sherwood  <david.sherwood@arm.com>
34004         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
34005         (vect_compile_time_alias): ...this new function.  Do the calculation
34006         on poly_ints rather than trees.
34007         (vect_prune_runtime_alias_test_list): Update call accordingly.
34009 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34010             Alan Hayward  <alan.hayward@arm.com>
34011             David Sherwood  <david.sherwood@arm.com>
34013         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
34014         numbers of units.
34015         (vect_schedule_slp_instance): Likewise.
34017 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34018             Alan Hayward  <alan.hayward@arm.com>
34019             David Sherwood  <david.sherwood@arm.com>
34021         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
34022         constant and extern definitions for variable-length vectors.
34023         (vect_get_constant_vectors): Note that the number of units
34024         is known to be constant.
34026 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34027             Alan Hayward  <alan.hayward@arm.com>
34028             David Sherwood  <david.sherwood@arm.com>
34030         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
34031         of units as polynomial.  Choose between WIDE and NARROW based
34032         on multiple_p.
34034 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34035             Alan Hayward  <alan.hayward@arm.com>
34036             David Sherwood  <david.sherwood@arm.com>
34038         * tree-vect-stmts.c (simd_clone_subparts): New function.
34039         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
34041 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34042             Alan Hayward  <alan.hayward@arm.com>
34043             David Sherwood  <david.sherwood@arm.com>
34045         * tree-vect-stmts.c (vectorizable_call): Treat the number of
34046         vectors as polynomial.  Use build_index_vector for
34047         IFN_GOMP_SIMD_LANE.
34049 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34050             Alan Hayward  <alan.hayward@arm.com>
34051             David Sherwood  <david.sherwood@arm.com>
34053         * tree-vect-stmts.c (get_load_store_type): Treat the number of
34054         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
34055         for variable-length vectors.
34056         (vectorizable_mask_load_store): Treat the number of units as
34057         polynomial, asserting that it is constant if the condition has
34058         already been enforced.
34059         (vectorizable_store, vectorizable_load): Likewise.
34061 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34062             Alan Hayward  <alan.hayward@arm.com>
34063             David Sherwood  <david.sherwood@arm.com>
34065         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
34066         of units as polynomial.  Punt if we can't tell at compile time
34067         which vector contains the final result.
34069 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34070             Alan Hayward  <alan.hayward@arm.com>
34071             David Sherwood  <david.sherwood@arm.com>
34073         * tree-vect-loop.c (vectorizable_induction): Treat the number
34074         of units as polynomial.  Punt on SLP inductions.  Use an integer
34075         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
34076         cast of such a series for variable-length floating-point
34077         reductions.
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.h (build_index_vector): Declare.
34084         * tree.c (build_index_vector): New function.
34085         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
34086         of units as polynomial, forcibly converting it to a constant if
34087         vectorizable_reduction has already enforced the condition.
34088         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
34089         to create a {1,2,3,...} vector.
34090         (vectorizable_reduction): Treat the number of units as polynomial.
34091         Choose vectype_in based on the largest scalar element size rather
34092         than the smallest number of units.  Enforce the restrictions
34093         relied on above.
34095 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34096             Alan Hayward  <alan.hayward@arm.com>
34097             David Sherwood  <david.sherwood@arm.com>
34099         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
34100         number of units as polynomial.
34102 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34103             Alan Hayward  <alan.hayward@arm.com>
34104             David Sherwood  <david.sherwood@arm.com>
34106         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
34107         * target.def (autovectorize_vector_sizes): Return the vector sizes
34108         by pointer, using vector_sizes rather than a bitmask.
34109         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
34110         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
34111         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
34112         Likewise.
34113         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
34114         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
34115         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
34116         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
34117         * omp-general.c (omp_max_vf): Likewise.
34118         * omp-low.c (omp_clause_aligned_alignment): Likewise.
34119         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
34120         * tree-vect-loop.c (vect_analyze_loop): Likewise.
34121         * tree-vect-slp.c (vect_slp_bb): Likewise.
34122         * doc/tm.texi: Regenerate.
34123         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
34124         to a poly_uint64.
34125         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
34126         the vector size as a poly_uint64 rather than an unsigned int.
34127         (current_vector_size): Change from an unsigned int to a poly_uint64.
34128         (get_vectype_for_scalar_type): Update accordingly.
34129         * tree.h (build_truth_vector_type): Take the size and number of
34130         units as a poly_uint64 rather than an unsigned int.
34131         (build_vector_type): Add a temporary overload that takes
34132         the number of units as a poly_uint64 rather than an unsigned int.
34133         * tree.c (make_vector_type): Likewise.
34134         (build_truth_vector_type): Take the number of units as a poly_uint64
34135         rather than an unsigned int.
34137 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34138             Alan Hayward  <alan.hayward@arm.com>
34139             David Sherwood  <david.sherwood@arm.com>
34141         * target.def (get_mask_mode): Take the number of units and length
34142         as poly_uint64s rather than unsigned ints.
34143         * targhooks.h (default_get_mask_mode): Update accordingly.
34144         * targhooks.c (default_get_mask_mode): Likewise.
34145         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
34146         * doc/tm.texi: Regenerate.
34148 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34149             Alan Hayward  <alan.hayward@arm.com>
34150             David Sherwood  <david.sherwood@arm.com>
34152         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
34153         * omp-general.c (omp_max_vf): Likewise.
34154         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
34155         (expand_omp_simd): Handle polynomial safelen.
34156         * omp-low.c (omplow_simd_context): Add a default constructor.
34157         (omplow_simd_context::max_vf): Change from int to poly_uint64.
34158         (lower_rec_simd_input_clauses): Update accordingly.
34159         (lower_rec_input_clauses): Likewise.
34161 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34162             Alan Hayward  <alan.hayward@arm.com>
34163             David Sherwood  <david.sherwood@arm.com>
34165         * tree-vectorizer.h (vect_nunits_for_cost): New function.
34166         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
34167         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
34168         (vect_analyze_slp_cost): Likewise.
34169         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
34170         (vect_model_load_cost): Likewise.
34172 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34173             Alan Hayward  <alan.hayward@arm.com>
34174             David Sherwood  <david.sherwood@arm.com>
34176         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
34177         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
34178         from an unsigned int * to a poly_uint64_pod *.
34179         (calculate_unrolling_factor): New function.
34180         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
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         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
34187         from an unsigned int to a poly_uint64.
34188         (_loop_vec_info::slp_unrolling_factor): Likewise.
34189         (_loop_vec_info::vectorization_factor): Change from an int
34190         to a poly_uint64.
34191         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
34192         (vect_get_num_vectors): New function.
34193         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
34194         (vect_get_num_copies): Use vect_get_num_vectors.
34195         (vect_analyze_data_ref_dependences): Change max_vf from an int *
34196         to an unsigned int *.
34197         (vect_analyze_data_refs): Change min_vf from an int * to a
34198         poly_uint64 *.
34199         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
34200         than an unsigned HOST_WIDE_INT.
34201         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
34202         (vect_analyze_data_ref_dependence): Change max_vf from an int *
34203         to an unsigned int *.
34204         (vect_analyze_data_ref_dependences): Likewise.
34205         (vect_compute_data_ref_alignment): Handle polynomial vf.
34206         (vect_enhance_data_refs_alignment): Likewise.
34207         (vect_prune_runtime_alias_test_list): Likewise.
34208         (vect_shift_permute_load_chain): Likewise.
34209         (vect_supportable_dr_alignment): Likewise.
34210         (dependence_distance_ge_vf): Take the vectorization factor as a
34211         poly_uint64 rather than an unsigned HOST_WIDE_INT.
34212         (vect_analyze_data_refs): Change min_vf from an int * to a
34213         poly_uint64 *.
34214         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
34215         vfm1 as a poly_uint64 rather than an int.  Make the same change
34216         for the returned bound_scalar.
34217         (vect_gen_vector_loop_niters): Handle polynomial vf.
34218         (vect_do_peeling): Likewise.  Update call to
34219         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
34220         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
34221         be constant.
34222         * tree-vect-loop.c (vect_determine_vectorization_factor)
34223         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
34224         (vect_get_known_peeling_cost): Likewise.
34225         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
34226         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
34227         (vect_transform_loop): Likewise.  Use the lowest possible VF when
34228         updating the upper bounds of the loop.
34229         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
34230         rather than an int.
34231         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
34232         polynomial unroll factors.
34233         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
34234         (vect_make_slp_decision): Likewise.
34235         (vect_supported_load_permutation_p): Likewise, and polynomial
34236         vf too.
34237         (vect_analyze_slp_cost): Handle polynomial vf.
34238         (vect_slp_analyze_node_operations): Likewise.
34239         (vect_slp_analyze_bb_1): Likewise.
34240         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
34241         than an unsigned HOST_WIDE_INT.
34242         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
34243         (vectorizable_load): Handle polynomial vf.
34244         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
34245         a poly_uint64.
34246         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
34248 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34249             Alan Hayward  <alan.hayward@arm.com>
34250             David Sherwood  <david.sherwood@arm.com>
34252         * match.pd: Handle bit operations involving three constants
34253         and try to fold one pair.
34255 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
34257         * tree-vect-loop-manip.c: Include gimple-fold.h.
34258         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
34259         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
34260         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
34261         Add a path that uses a step of VF instead of 1, but disable it
34262         for now.
34263         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
34264         and niters_no_overflow parameters.  Update calls to
34265         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
34266         Create a new SSA name if the latter choses to use a ste other
34267         than zero, and return it via niters_vector_mult_vf_var.
34268         * tree-vect-loop.c (vect_transform_loop): Update calls to
34269         vect_do_peeling, vect_gen_vector_loop_niters and
34270         slpeel_make_loop_iterate_ntimes.
34271         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
34272         (vect_gen_vector_loop_niters): Update declarations after above changes.
34274 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
34276         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
34277         128-bit round to integer instructions.
34278         (ceil<mode>2): Likewise.
34279         (btrunc<mode>2): Likewise.
34280         (round<mode>2): Likewise.
34282 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
34284         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
34285         unaligned VSX load/store on P8/P9.
34286         (expand_block_clear): Allow the use of unaligned VSX
34287         load/store on P8/P9.
34289 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
34291         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
34292         New function.
34293         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
34294         swap associated with both a load and a store.
34296 2018-01-02  Andrew Waterman  <andrew@sifive.com>
34298         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
34299         * config/riscv/riscv.md (clear_cache): Use it.
34301 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
34303         * web.c: Remove out-of-date comment.
34305 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34307         * expr.c (fixup_args_size_notes): Check that any existing
34308         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
34309         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
34310         (emit_single_push_insn): ...here.
34312 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34314         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
34315         (const_vector_encoded_nelts): New function.
34316         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
34317         (const_vector_int_elt, const_vector_elt): Declare.
34318         * emit-rtl.c (const_vector_int_elt_1): New function.
34319         (const_vector_elt): Likewise.
34320         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
34321         of CONST_VECTOR_ELT.
34323 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34325         * expr.c: Include rtx-vector-builder.h.
34326         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
34327         directly on the tree encoding.
34328         (const_vector_from_tree): Likewise.
34329         * optabs.c: Include rtx-vector-builder.h.
34330         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
34331         sequence of "u" values.
34332         * vec-perm-indices.c: Include rtx-vector-builder.h.
34333         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
34334         directly on the vec_perm_indices encoding.
34336 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34338         * doc/rtl.texi (const_vector): Describe new encoding scheme.
34339         * Makefile.in (OBJS): Add rtx-vector-builder.o.
34340         * rtx-vector-builder.h: New file.
34341         * rtx-vector-builder.c: Likewise.
34342         * rtl.h (rtx_def::u2): Add a const_vector field.
34343         (CONST_VECTOR_NPATTERNS): New macro.
34344         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
34345         (CONST_VECTOR_DUPLICATE_P): Likewise.
34346         (CONST_VECTOR_STEPPED_P): Likewise.
34347         (CONST_VECTOR_ENCODED_ELT): Likewise.
34348         (const_vec_duplicate_p): Check for a duplicated vector encoding.
34349         (unwrap_const_vec_duplicate): Likewise.
34350         (const_vec_series_p): Check for a non-duplicated vector encoding.
34351         Say that the function only returns true for integer vectors.
34352         * emit-rtl.c: Include rtx-vector-builder.h.
34353         (gen_const_vec_duplicate_1): Delete.
34354         (gen_const_vector): Call gen_const_vec_duplicate instead of
34355         gen_const_vec_duplicate_1.
34356         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
34357         (gen_const_vec_duplicate): Use rtx_vector_builder.
34358         (gen_const_vec_series): Likewise.
34359         (gen_rtx_CONST_VECTOR): Likewise.
34360         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
34361         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
34362         Build a new vector rather than modifying a CONST_VECTOR in-place.
34363         (handle_special_swappables): Update call accordingly.
34364         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
34365         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
34366         Build a new vector rather than modifying a CONST_VECTOR in-place.
34367         (handle_special_swappables): Update call accordingly.
34369 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34371         * simplify-rtx.c (simplify_const_binary_operation): Use
34372         CONST_VECTOR_ELT instead of XVECEXP.
34374 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34376         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
34377         the selector elements to be different from the data elements
34378         if the selector is a VECTOR_CST.
34379         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
34380         ssizetype for the selector.
34382 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34384         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
34385         before testing each element individually.
34386         * tree-vect-generic.c (lower_vec_perm): Likewise.
34388 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34390         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
34391         * selftest-run-tests.c (selftest::run_tests): Call it.
34392         * vector-builder.h (vector_builder::operator ==): New function.
34393         (vector_builder::operator !=): Likewise.
34394         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
34395         (vec_perm_indices::all_from_input_p): New function.
34396         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
34397         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
34398         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
34399         instead of reading the VECTOR_CST directly.  Detect whether both
34400         vector inputs are the same before constructing the vec_perm_indices,
34401         and update the number of inputs argument accordingly.  Use the
34402         utility functions added above.  Only construct sel2 if we need to.
34404 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34406         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
34407         the broadcast of the low byte.
34408         (expand_mult_highpart): Use an explicit encoding for the permutes.
34409         * optabs-query.c (can_mult_highpart_p): Likewise.
34410         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
34411         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
34412         (vectorizable_bswap): Likewise.
34413         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
34414         explicit encoding for the power-of-2 permutes.
34415         (vect_permute_store_chain): Likewise.
34416         (vect_grouped_load_supported): Likewise.
34417         (vect_permute_load_chain): Likewise.
34419 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34421         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
34422         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
34423         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
34424         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
34425         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
34426         (vect_gen_perm_mask_any): Likewise.
34428 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34430         * int-vector-builder.h: New file.
34431         * vec-perm-indices.h: Include int-vector-builder.h.
34432         (vec_perm_indices): Redefine as an int_vector_builder.
34433         (auto_vec_perm_indices): Delete.
34434         (vec_perm_builder): Redefine as a stand-alone class.
34435         (vec_perm_indices::vec_perm_indices): New function.
34436         (vec_perm_indices::clamp): Likewise.
34437         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
34438         (vec_perm_indices::new_vector): New function.
34439         (vec_perm_indices::new_expanded_vector): Update for new
34440         vec_perm_indices class.
34441         (vec_perm_indices::rotate_inputs): New function.
34442         (vec_perm_indices::all_in_range_p): Operate directly on the
34443         encoded form, without computing elided elements.
34444         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
34445         encoding.  Update for new vec_perm_indices class.
34446         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
34447         the given vec_perm_builder.
34448         (expand_vec_perm_var): Update vec_perm_builder constructor.
34449         (expand_mult_highpart): Use vec_perm_builder instead of
34450         auto_vec_perm_indices.
34451         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
34452         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
34453         or double series encoding as appropriate.
34454         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
34455         vec_perm_indices instead of auto_vec_perm_indices.
34456         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
34457         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
34458         (vect_permute_store_chain): Likewise.
34459         (vect_grouped_load_supported): Likewise.
34460         (vect_permute_load_chain): Likewise.
34461         (vect_shift_permute_load_chain): Likewise.
34462         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
34463         (vect_transform_slp_perm_load): Likewise.
34464         (vect_schedule_slp_instance): Likewise.
34465         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
34466         (vectorizable_mask_load_store): Likewise.
34467         (vectorizable_bswap): Likewise.
34468         (vectorizable_store): Likewise.
34469         (vectorizable_load): Likewise.
34470         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
34471         vec_perm_indices instead of auto_vec_perm_indices.  Use
34472         tree_to_vec_perm_builder to read the vector from a tree.
34473         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
34474         vec_perm_builder instead of a vec_perm_indices.
34475         (have_whole_vector_shift): Use vec_perm_builder and
34476         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
34477         truncation to calc_vec_perm_mask_for_shift.
34478         (vect_create_epilog_for_reduction): Likewise.
34479         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
34480         from auto_vec_perm_indices to vec_perm_indices.
34481         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
34482         instead of changing individual elements.
34483         (aarch64_vectorize_vec_perm_const): Use new_vector to install
34484         the vector in d.perm.
34485         * config/arm/arm.c (expand_vec_perm_d::perm): Change
34486         from auto_vec_perm_indices to vec_perm_indices.
34487         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
34488         instead of changing individual elements.
34489         (arm_vectorize_vec_perm_const): Use new_vector to install
34490         the vector in d.perm.
34491         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
34492         Update vec_perm_builder constructor.
34493         (rs6000_expand_interleave): Likewise.
34494         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
34495         (rs6000_expand_interleave): Likewise.
34497 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34499         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
34500         to qimode could truncate the indices.
34501         * optabs.c (expand_vec_perm_var): Likewise.
34503 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34505         * Makefile.in (OBJS): Add vec-perm-indices.o.
34506         * vec-perm-indices.h: New file.
34507         * vec-perm-indices.c: Likewise.
34508         * target.h (vec_perm_indices): Replace with a forward class
34509         declaration.
34510         (auto_vec_perm_indices): Move to vec-perm-indices.h.
34511         * optabs.h: Include vec-perm-indices.h.
34512         (expand_vec_perm): Delete.
34513         (selector_fits_mode_p, expand_vec_perm_var): Declare.
34514         (expand_vec_perm_const): Declare.
34515         * target.def (vec_perm_const_ok): Replace with...
34516         (vec_perm_const): ...this new hook.
34517         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
34518         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
34519         * doc/tm.texi: Regenerate.
34520         * optabs.def (vec_perm_const): Delete.
34521         * doc/md.texi (vec_perm_const): Likewise.
34522         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
34523         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
34524         expand_vec_perm for constant permutation vectors.  Assert that
34525         the mode of variable permutation vectors is the integer equivalent
34526         of the mode that is being permuted.
34527         * optabs-query.h (selector_fits_mode_p): Declare.
34528         * optabs-query.c: Include vec-perm-indices.h.
34529         (selector_fits_mode_p): New function.
34530         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
34531         is defined, instead of checking whether the vec_perm_const_optab
34532         exists.  Use targetm.vectorize.vec_perm_const instead of
34533         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
34534         fit in the vector mode before using a variable permute.
34535         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
34536         vec_perm_indices instead of an rtx.
34537         (expand_vec_perm): Replace with...
34538         (expand_vec_perm_const): ...this new function.  Take the selector
34539         as a vec_perm_indices rather than an rtx.  Also take the mode of
34540         the selector.  Update call to shift_amt_for_vec_perm_mask.
34541         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
34542         Use vec_perm_indices::new_expanded_vector to expand the original
34543         selector into bytes.  Check whether the indices fit in the vector
34544         mode before using a variable permute.
34545         (expand_vec_perm_var): Make global.
34546         (expand_mult_highpart): Use expand_vec_perm_const.
34547         * fold-const.c: Includes vec-perm-indices.h.
34548         * tree-ssa-forwprop.c: Likewise.
34549         * tree-vect-data-refs.c: Likewise.
34550         * tree-vect-generic.c: Likewise.
34551         * tree-vect-loop.c: Likewise.
34552         * tree-vect-slp.c: Likewise.
34553         * tree-vect-stmts.c: Likewise.
34554         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
34555         Delete.
34556         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
34557         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
34558         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
34559         (aarch64_vectorize_vec_perm_const): ...this new function.
34560         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
34561         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
34562         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
34563         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
34564         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
34565         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
34566         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
34567         into...
34568         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
34569         check for NEON modes.
34570         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
34571         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
34572         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
34573         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
34574         into...
34575         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
34576         the old VEC_PERM_CONST conditions.
34577         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
34578         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
34579         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
34580         (ia64_vectorize_vec_perm_const_ok): Merge into...
34581         (ia64_vectorize_vec_perm_const): ...this new function.
34582         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
34583         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
34584         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
34585         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
34586         * config/mips/mips.c (mips_expand_vec_perm_const)
34587         (mips_vectorize_vec_perm_const_ok): Merge into...
34588         (mips_vectorize_vec_perm_const): ...this new function.
34589         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
34590         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
34591         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
34592         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
34593         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
34594         (rs6000_expand_vec_perm_const): Delete.
34595         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
34596         Delete.
34597         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
34598         (altivec_expand_vec_perm_const_le): Take each operand individually.
34599         Operate on constant selectors rather than rtxes.
34600         (altivec_expand_vec_perm_const): Likewise.  Update call to
34601         altivec_expand_vec_perm_const_le.
34602         (rs6000_expand_vec_perm_const): Delete.
34603         (rs6000_vectorize_vec_perm_const_ok): Delete.
34604         (rs6000_vectorize_vec_perm_const): New function.
34605         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
34606         an element count and rtx array.
34607         (rs6000_expand_extract_even): Update call accordingly.
34608         (rs6000_expand_interleave): Likewise.
34609         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
34610         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
34611         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
34612         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
34613         (rs6000_expand_vec_perm_const): Delete.
34614         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
34615         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
34616         (altivec_expand_vec_perm_const_le): Take each operand individually.
34617         Operate on constant selectors rather than rtxes.
34618         (altivec_expand_vec_perm_const): Likewise.  Update call to
34619         altivec_expand_vec_perm_const_le.
34620         (rs6000_expand_vec_perm_const): Delete.
34621         (rs6000_vectorize_vec_perm_const_ok): Delete.
34622         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
34623         reference to the SPE evmerge intructions.
34624         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
34625         an element count and rtx array.
34626         (rs6000_expand_extract_even): Update call accordingly.
34627         (rs6000_expand_interleave): Likewise.
34628         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
34629         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
34630         new function.
34631         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
34633 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34635         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
34636         vector mode and that that mode matches the mode of the data
34637         being permuted.
34638         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
34639         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
34640         directly using expand_vec_perm_1 when forcing selectors into
34641         registers.
34642         (expand_vec_perm_var): New function, split out from expand_vec_perm.
34644 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34646         * optabs-query.h (can_vec_perm_p): Delete.
34647         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
34648         * optabs-query.c (can_vec_perm_p): Split into...
34649         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
34650         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
34651         particular selector is valid.
34652         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
34653         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
34654         (vect_grouped_load_supported): Likewise.
34655         (vect_shift_permute_load_chain): Likewise.
34656         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
34657         (vect_transform_slp_perm_load): Likewise.
34658         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
34659         (vectorizable_bswap): Likewise.
34660         (vect_gen_perm_mask_checked): Likewise.
34661         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
34662         implementations of variable permutation vectors into account
34663         when deciding which selector to use.
34664         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
34665         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
34666         with a false third argument.
34667         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
34668         to test whether the constant selector is valid and can_vec_perm_var_p
34669         to test whether a variable selector is valid.
34671 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34673         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
34674         * optabs-query.c (can_vec_perm_p): Likewise.
34675         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
34676         instead of vec_perm_indices.
34677         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
34678         (vect_gen_perm_mask_checked): Likewise,
34679         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
34680         (vect_gen_perm_mask_checked): Likewise,
34682 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34684         * optabs-query.h (qimode_for_vec_perm): Declare.
34685         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
34686         (qimode_for_vec_perm): ...this new function.
34687         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
34689 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
34691         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
34692         does not have a conditional at the top.
34694 2018-01-02  Richard Biener  <rguenther@suse.de>
34696         * ipa-inline.c (big_speedup_p): Fix expression.
34698 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
34700         PR target/81616
34701         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
34702         for generic 4->6.
34704 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
34706         PR target/81616
34707         Generic tuning.
34708         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
34709         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
34710         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
34711         cond_taken_branch_cost 3->4.
34713 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
34715         PR tree-optimization/83581
34716         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
34717         TODO_cleanup_cfg if any changes have been made.
34719         PR middle-end/83608
34720         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
34721         convert_modes if target mode has the right side, but different mode
34722         class.
34724         PR middle-end/83609
34725         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
34726         last argument when extracting from CONCAT.  If either from_real or
34727         from_imag is NULL, use expansion through memory.  If result is not
34728         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
34729         the parts directly to inner mode, if even that fails, use expansion
34730         through memory.
34732         PR middle-end/83623
34733         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
34734         check for bswap in mode rather than HImode and use that in expand_unop
34735         too.
34737 Copyright (C) 2018 Free Software Foundation, Inc.
34739 Copying and distribution of this file, with or without modification,
34740 are permitted in any medium without royalty provided the copyright
34741 notice and this notice are preserved.